@goodfish/jarvy 0.3.0 → 0.4.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.
@@ -1,505 +0,0 @@
1
- var GE=Object.defineProperty;var nx=t=>{throw TypeError(t)};var XE=(t,i,a)=>i in t?GE(t,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[i]=a;var ec=(t,i,a)=>XE(t,typeof i!="symbol"?i+"":i,a),ix=(t,i,a)=>i.has(t)||nx("Cannot "+a);var Ln=(t,i,a)=>(ix(t,i,"read from private field"),a?a.call(t):i.get(t)),ax=(t,i,a)=>i.has(t)?nx("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,a),km=(t,i,a,l)=>(ix(t,i,"write to private field"),l?l.call(t,a):i.set(t,a),a);function QE(t,i){for(var a=0;a<i.length;a++){const l=i[a];if(typeof l!="string"&&!Array.isArray(l)){for(const s in l)if(s!=="default"&&!(s in t)){const u=Object.getOwnPropertyDescriptor(l,s);u&&Object.defineProperty(t,s,u.get?u:{enumerable:!0,get:()=>l[s]})}}}return Object.freeze(Object.defineProperty(t,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 a(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=a(s);fetch(s.href,u)}})();function ng(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Cm={exports:{}},tc={};/**
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 rx;function KE(){if(rx)return tc;rx=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(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 h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:t,type:l,key:d,ref:s!==void 0?s:null,props:u}}return tc.Fragment=i,tc.jsx=a,tc.jsxs=a,tc}var lx;function ZE(){return lx||(lx=1,Cm.exports=KE()),Cm.exports}var c=ZE(),Nm={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 ox;function JE(){if(ox)return Ye;ox=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=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"),h=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"),b=Symbol.for("react.view_transition"),x=Symbol.iterator;function S(F){return F===null||typeof F!="object"?null:(F=x&&F[x]||F["@@iterator"],typeof F=="function"?F:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,E={};function T(F,fe,ye){this.props=F,this.context=fe,this.refs=E,this.updater=ye||k}T.prototype.isReactComponent={},T.prototype.setState=function(F,fe){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,fe,"setState")},T.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function A(){}A.prototype=T.prototype;function M(F,fe,ye){this.props=F,this.context=fe,this.refs=E,this.updater=ye||k}var I=M.prototype=new A;I.constructor=M,N(I,T.prototype),I.isPureReactComponent=!0;var O=Array.isArray;function B(){}var q={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function L(F,fe,ye){var Se=ye.ref;return{$$typeof:t,type:F,key:fe,ref:Se!==void 0?Se:null,props:ye}}function Y(F,fe){return L(F.type,fe,F.props)}function X(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function ue(F){var fe={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(ye){return fe[ye]})}var Z=/\/+/g;function U(F,fe){return typeof F=="object"&&F!==null&&F.key!=null?ue(""+F.key):fe.toString(36)}function G(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(B,B):(F.status="pending",F.then(function(fe){F.status==="pending"&&(F.status="fulfilled",F.value=fe)},function(fe){F.status==="pending"&&(F.status="rejected",F.reason=fe)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function R(F,fe,ye,Se,re){var be=typeof F;(be==="undefined"||be==="boolean")&&(F=null);var le=!1;if(F===null)le=!0;else switch(be){case"bigint":case"string":case"number":le=!0;break;case"object":switch(F.$$typeof){case t:case i:le=!0;break;case y:return le=F._init,R(le(F._payload),fe,ye,Se,re)}}if(le)return re=re(F),le=Se===""?"."+U(F,0):Se,O(re)?(ye="",le!=null&&(ye=le.replace(Z,"$&/")+"/"),R(re,fe,ye,"",function(Ne){return Ne})):re!=null&&(X(re)&&(re=Y(re,ye+(re.key==null||F&&F.key===re.key?"":(""+re.key).replace(Z,"$&/")+"/")+le)),fe.push(re)),1;le=0;var se=Se===""?".":Se+":";if(O(F))for(var he=0;he<F.length;he++)Se=F[he],be=se+U(Se,he),le+=R(Se,fe,ye,be,re);else if(he=S(F),typeof he=="function")for(F=he.call(F),he=0;!(Se=F.next()).done;)Se=Se.value,be=se+U(Se,he++),le+=R(Se,fe,ye,be,re);else if(be==="object"){if(typeof F.then=="function")return R(G(F),fe,ye,Se,re);throw fe=String(F),Error("Objects are not valid as a React child (found: "+(fe==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":fe)+"). If you meant to render a collection of children, use an array instead.")}return le}function H(F,fe,ye){if(F==null)return F;var Se=[],re=0;return R(F,Se,"","",function(be){return fe.call(ye,be,re++)}),Se}function W(F){if(F._status===-1){var fe=F._result,ye=fe();ye.then(function(Se){(F._status===0||F._status===-1)&&(F._status=1,F._result=Se,ye.status===void 0&&(ye.status="fulfilled",ye.value=Se))},function(Se){(F._status===0||F._status===-1)&&(F._status=2,F._result=Se,ye.status===void 0&&(ye.status="rejected",ye.reason=Se))}),F._status===-1&&(F._status=0,F._result=ye)}if(F._status===1)return F._result.default;throw F._result}var D=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var fe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(fe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)};function ie(F){var fe=q.T,ye={};ye.types=fe!==null?fe.types:null,q.T=ye;try{var Se=F(),re=q.S;re!==null&&re(ye,Se),typeof Se=="object"&&Se!==null&&typeof Se.then=="function"&&Se.then(B,D)}catch(be){D(be)}finally{fe!==null&&ye.types!==null&&(fe.types=ye.types),q.T=fe}}function ne(F){var fe=q.T;if(fe!==null){var ye=fe.types;ye===null?fe.types=[F]:ye.indexOf(F)===-1&&ye.push(F)}else ie(ne.bind(null,F))}var P={map:H,forEach:function(F,fe,ye){H(F,function(){fe.apply(this,arguments)},ye)},count:function(F){var fe=0;return H(F,function(){fe++}),fe},toArray:function(F){return H(F,function(fe){return fe})||[]},only:function(F){if(!X(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return Ye.Activity=g,Ye.Children=P,Ye.Component=T,Ye.Fragment=a,Ye.Profiler=s,Ye.PureComponent=M,Ye.StrictMode=l,Ye.Suspense=m,Ye.ViewTransition=b,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ye.__COMPILER_RUNTIME={__proto__:null,c:function(F){return q.H.useMemoCache(F)}},Ye.addTransitionType=ne,Ye.cache=function(F){return function(){return F.apply(null,arguments)}},Ye.cacheSignal=function(){return null},Ye.cloneElement=function(F,fe,ye){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var Se=N({},F.props),re=F.key;if(fe!=null)for(be in fe.key!==void 0&&(re=""+fe.key),fe)!$.call(fe,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&fe.ref===void 0||(Se[be]=fe[be]);var be=arguments.length-2;if(be===1)Se.children=ye;else if(1<be){for(var le=Array(be),se=0;se<be;se++)le[se]=arguments[se+2];Se.children=le}return L(F.type,re,Se)},Ye.createContext=function(F){return F={$$typeof:d,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:u,_context:F},F},Ye.createElement=function(F,fe,ye){var Se,re={},be=null;if(fe!=null)for(Se in fe.key!==void 0&&(be=""+fe.key),fe)$.call(fe,Se)&&Se!=="key"&&Se!=="__self"&&Se!=="__source"&&(re[Se]=fe[Se]);var le=arguments.length-2;if(le===1)re.children=ye;else if(1<le){for(var se=Array(le),he=0;he<le;he++)se[he]=arguments[he+2];re.children=se}if(F&&F.defaultProps)for(Se in le=F.defaultProps,le)re[Se]===void 0&&(re[Se]=le[Se]);return L(F,be,re)},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(F){return{$$typeof:h,render:F}},Ye.isValidElement=X,Ye.lazy=function(F){return{$$typeof:y,_payload:{_status:-1,_result:F},_init:W}},Ye.memo=function(F,fe){return{$$typeof:v,type:F,compare:fe===void 0?null:fe}},Ye.startTransition=ie,Ye.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ye.use=function(F){return q.H.use(F)},Ye.useActionState=function(F,fe,ye){return q.H.useActionState(F,fe,ye)},Ye.useCallback=function(F,fe){return q.H.useCallback(F,fe)},Ye.useContext=function(F){return q.H.useContext(F)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(F,fe){return q.H.useDeferredValue(F,fe)},Ye.useEffect=function(F,fe){return q.H.useEffect(F,fe)},Ye.useEffectEvent=function(F){return q.H.useEffectEvent(F)},Ye.useId=function(){return q.H.useId()},Ye.useImperativeHandle=function(F,fe,ye){return q.H.useImperativeHandle(F,fe,ye)},Ye.useInsertionEffect=function(F,fe){return q.H.useInsertionEffect(F,fe)},Ye.useLayoutEffect=function(F,fe){return q.H.useLayoutEffect(F,fe)},Ye.useMemo=function(F,fe){return q.H.useMemo(F,fe)},Ye.useOptimistic=function(F,fe){return q.H.useOptimistic(F,fe)},Ye.useReducer=function(F,fe,ye){return q.H.useReducer(F,fe,ye)},Ye.useRef=function(F){return q.H.useRef(F)},Ye.useState=function(F){return q.H.useState(F)},Ye.useSyncExternalStore=function(F,fe,ye){return q.H.useSyncExternalStore(F,fe,ye)},Ye.useTransition=function(){return q.H.useTransition()},Ye.version="19.3.0",Ye}var sx;function ig(){return sx||(sx=1,Nm.exports=JE()),Nm.exports}var w=ig();const WE=ng(w),jc=QE({__proto__:null,default:WE},[w]);var Em={exports:{}},nc={},Tm={exports:{}},Am={};/**
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 cx;function eT(){return cx||(cx=1,(function(t){function i(G,R){var H=G.length;G.push(R);e:for(;0<H;){var W=H-1>>>1,D=G[W];if(0<s(D,R))G[W]=R,G[H]=D,H=W;else break e}}function a(G){return G.length===0?null:G[0]}function l(G){if(G.length===0)return null;var R=G[0],H=G.pop();if(H!==R){G[0]=H;e:for(var W=0,D=G.length,ie=D>>>1;W<ie;){var ne=2*(W+1)-1,P=G[ne],F=ne+1,fe=G[F];if(0>s(P,H))F<D&&0>s(fe,P)?(G[W]=fe,G[F]=H,W=F):(G[W]=P,G[ne]=H,W=ne);else if(F<D&&0>s(fe,H))G[W]=fe,G[F]=H,W=F;else break e}}return R}function s(G,R){var H=G.sortIndex-R.sortIndex;return H!==0?H:G.id-R.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var m=[],v=[],y=1,g=null,b=3,x=!1,S=!1,k=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function M(G){for(var R=a(v);R!==null;){if(R.callback===null)l(v);else if(R.startTime<=G)l(v),R.sortIndex=R.expirationTime,i(m,R);else break;R=a(v)}}function I(G){if(k=!1,M(G),!S)if(a(m)!==null)S=!0,O||(O=!0,X());else{var R=a(v);R!==null&&U(I,R.startTime-G)}}var O=!1,B=-1,q=5,$=-1;function L(){return N?!0:!(t.unstable_now()-$<q)}function Y(){if(N=!1,O){var G=t.unstable_now();$=G;var R=!0;try{e:{S=!1,k&&(k=!1,T(B),B=-1),x=!0;var H=b;try{t:{for(M(G),g=a(m);g!==null&&!(g.expirationTime>G&&L());){var W=g.callback;if(typeof W=="function"){g.callback=null,b=g.priorityLevel;var D=W(g.expirationTime<=G);if(G=t.unstable_now(),typeof D=="function"){g.callback=D,M(G),R=!0;break t}g===a(m)&&l(m),M(G)}else l(m);g=a(m)}if(g!==null)R=!0;else{var ie=a(v);ie!==null&&U(I,ie.startTime-G),R=!1}}break e}finally{g=null,b=H,x=!1}R=void 0}}finally{R?X():O=!1}}}var X;if(typeof A=="function")X=function(){A(Y)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,Z=ue.port2;ue.port1.onmessage=Y,X=function(){Z.postMessage(null)}}else X=function(){E(Y,0)};function U(G,R){B=E(function(){G(t.unstable_now())},R)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(G){switch(b){case 1:case 2:case 3:var R=3;break;default:R=b}var H=b;b=R;try{return G()}finally{b=H}},t.unstable_requestPaint=function(){N=!0},t.unstable_runWithPriority=function(G,R){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var H=b;b=G;try{return R()}finally{b=H}},t.unstable_scheduleCallback=function(G,R,H){var W=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?W+H:W):H=W,G){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=H+D,G={id:y++,callback:R,priorityLevel:G,startTime:H,expirationTime:D,sortIndex:-1},H>W?(G.sortIndex=H,i(v,G),a(m)===null&&G===a(v)&&(k?(T(B),B=-1):k=!0,U(I,H-W))):(G.sortIndex=D,i(m,G),S||x||(S=!0,O||(O=!0,X()))),G},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(G){var R=b;return function(){var H=b;b=R;try{return G.apply(this,arguments)}finally{b=H}}}})(Am)),Am}var ux;function tT(){return ux||(ux=1,Tm.exports=eT()),Tm.exports}var Mm={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 dx;function nT(){if(dx)return Tn;dx=1;var t=ig();function i(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}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 a(){}var l={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function h(y,g,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:x===d?d:""+x,children:y,containerInfo:g,implementation:b}}var m=t.__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 b=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 h(y,g,null,b)},Tn.flushSync=function(y){var g=m.T,b=l.p;try{if(m.T=null,l.p=2,y)return y()}finally{m.T=g,l.p=b,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 b=g.as,x=v(b,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,k=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?l.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:k}):b==="script"&&l.d.X(y,{crossOrigin:x,integrity:S,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 b=v(g.as,g.crossOrigin);l.d.M(y,{crossOrigin:b,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 b=g.as,x=v(b,g.crossOrigin);l.d.L(y,b,{crossOrigin:x,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 b=v(g.as,g.crossOrigin);l.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,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,b){return m.H.useFormState(y,g,b)},Tn.useFormStatus=function(){return m.H.useHostTransitionStatus()},Tn.version="19.3.0",Tn}var fx;function c2(){if(fx)return Mm.exports;fx=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Mm.exports=nT(),Mm.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 hx;function iT(){if(hx)return nc;hx=1;var t=tT(),i=ig(),a=c2();function l(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){for(var n=e,r=n;r&&!r.alternate;)n=r,(n.flags&4098)!==0&&(e=n.return),r=n.return;for(;n.return;)n=n.return;return n.tag===3?e:null}function d(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(l(188))}function v(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(l(188));return n!==e?null:e}for(var r=e,o=n;;){var f=r.return;if(f===null)break;var p=f.alternate;if(p===null){if(o=f.return,o!==null){r=o;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===r)return m(f),e;if(p===o)return m(f),n;p=p.sibling}throw Error(l(188))}if(r.return!==o.return)r=f,o=p;else{for(var C=!1,_=f.child;_;){if(_===r){C=!0,r=f,o=p;break}if(_===o){C=!0,o=f,r=p;break}_=_.sibling}if(!C){for(_=p.child;_;){if(_===r){C=!0,r=p,o=f;break}if(_===o){C=!0,o=p,r=f;break}_=_.sibling}if(!C)throw Error(l(189))}}if(r.alternate!==o)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}function g(e,n,r,o,f,p){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&r(e,o,f,p)||(e.tag!==22||e.memoizedState===null)&&(n||e.tag!==5&&e.tag!==27)&&g(e.child,n,r,o,f,p))return!0;e=e.sibling}return!1}function b(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function x(e){var n=!1;for(e=e.return;e!==null&&(e.tag===4&&(n=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return n}function S(e){var n=[null,null],r=b(e);return r===null||k(n,e,r.child,{foundSelf:!1}),n}function k(e,n,r,o){for(;r!==null;){if(r===n)o.foundSelf=!0;else if(r.tag===5||r.tag===27||r.tag===6){if(o.foundSelf)return e[1]=r,!0;e[0]=r}else if((r.tag!==22||r.memoizedState===null)&&k(e,n,r.child,o))return!0;r=r.sibling}return!1}function N(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(l(559))}}var E=null,T=null;function A(e,n,r){return e===r?!0:e===n?(E=e,!0):!1}function M(e,n,r){return e===r?(T=e,!1):e===n?(T!==null&&(E=e),!0):!1}function I(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function O(e,n,r){for(var o=0,f=e;f;f=r(f))o++;f=0;for(var p=n;p;p=r(p))f++;for(;0<o-f;)e=r(e),o--;for(;0<f-o;)n=r(n),f--;for(;o--;){if(e===n||n!==null&&e===n.alternate)return e;e=r(e),n=r(n)}return null}var B=Object.assign,q=Symbol.for("react.element"),$=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),U=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ne=Symbol.for("react.legacy_hidden"),P=Symbol.for("react.memo_cache_sentinel"),F=Symbol.for("react.view_transition"),fe=Symbol.for("react.recoverable"),ye=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=ye&&e[ye]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case ue:return"Profiler";case X:return"StrictMode";case R:return"Suspense";case H:return"SuspenseList";case ie:return"Activity";case F:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case U:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case G:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return n=e.displayName||null,n!==null?n:be(e.type)||"Memo";case D:n=e._payload,e=e._init;try{return be(e(n))}catch{}}return null}var le=Array.isArray,se=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ne={pending:!1,data:null,method:null,action:null},ze=[],Fe=-1;function ht(e){return{current:e}}function ot(e){0>Fe||(e.current=ze[Fe],ze[Fe]=null,Fe--)}function Je(e,n){Fe++,ze[Fe]=e.current,e.current=n}var At=ht(null),gn=ht(null),vn=ht(null),Hn=ht(null);function di(e,n){switch(Je(vn,n),Je(gn,e),Je(At,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?db(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=db(n),e=fb(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ot(At),Je(At,e)}function an(){ot(At),ot(gn),ot(vn)}function Yi(e){var n=e.memoizedState;n!==null&&(Po._currentValue=n.memoizedState,Je(Hn,e)),n=At.current;var r=fb(n,e.type);n!==r&&(Je(gn,e),Je(At,r))}function pe(e){gn.current===e&&(ot(At),ot(gn)),Hn.current===e&&(ot(Hn),Po._currentValue=Ne)}var we,Be;function Ue(e){if(we===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);we=n&&n[1]||"",Be=-1<r.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+we+e+Be}var We=!1;function Ht(e,n){if(!e||We)return"";We=!0;var r=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 J=Ce}Reflect.construct(e,[],ve)}else{try{ve.call()}catch(Ce){J=Ce}ve=!1;try{var oe=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ve=!0,new e}finally{ve&&(oe!==void 0?Object.defineProperty(e.prototype,"props",oe):delete e.prototype.props)}}}else{try{throw Error()}catch(Ce){J=Ce}(ve=e())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(Ce){if(Ce&&J&&typeof Ce.stack=="string")return[Ce.stack,J.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),C=p[0],_=p[1];if(C&&_){var V=C.split(`
44
- `),te=_.split(`
45
- `);for(f=o=0;o<V.length&&!V[o].includes("DetermineComponentFrameRoot");)o++;for(;f<te.length&&!te[f].includes("DetermineComponentFrameRoot");)f++;if(o===V.length||f===te.length)for(o=V.length-1,f=te.length-1;1<=o&&0<=f&&V[o]!==te[f];)f--;for(;1<=o&&0<=f;o--,f--)if(V[o]!==te[f]){if(o!==1||f!==1)do if(o--,f--,0>f||V[o]!==te[f]){var de=`
46
- `+V[o].replace(" at new "," at ");return e.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",e.displayName)),de}while(1<=o&&0<=f);break}}}finally{We=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?Ue(r):""}function yn(e,n){switch(e.tag){case 26:case 27:case 5:return Ue(e.type);case 16:return Ue("Lazy");case 13:return e.child!==n&&n!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return Ht(e.type,!1);case 11:return Ht(e.type.render,!1);case 1:return Ht(e.type,!0);case 31:return Ue("Activity");case 30:return Ue("ViewTransition");default:return""}}function Ut(e){try{var n="",r=null;do n+=yn(e,r),r=e,e=e.return;while(e);return n}catch(o){return`
47
- Error generating stack: `+o.message+`
48
- `+o.stack}}var On=Object.prototype.hasOwnProperty,Un=t.unstable_scheduleCallback,_t=t.unstable_cancelCallback,_n=t.unstable_shouldYield,Qe=t.unstable_requestPaint,Gt=t.unstable_now,al=t.unstable_getCurrentPriorityLevel,sa=t.unstable_ImmediatePriority,ca=t.unstable_UserBlockingPriority,bn=t.unstable_NormalPriority,fi=t.unstable_LowPriority,rl=t.unstable_IdlePriority,hi=t.log,to=t.unstable_setDisableYieldValue,Gi=null,sn=null;function zt(e){if(typeof hi=="function"&&to(e),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(Gi,e)}catch{}}var Vt=Math.clz32?Math.clz32:Xi,ua=Math.log,da=Math.LN2;function Xi(e){return e>>>=0,e===0?32:31-(ua(e)/da|0)|0}var Qi=256,Oi=262144,Kn=4194304;function Ki(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function mi(e,n,r){var o=e.pendingLanes;if(o===0)return 0;var f=0,p=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var _=o&134217727;return _!==0?(o=_&~p,o!==0?f=Ki(o):(C&=_,C!==0?f=Ki(C):r||(r=_&~e,r!==0&&(f=Ki(r))))):(_=o&~p,_!==0?f=Ki(_):C!==0?f=Ki(C):r||(r=o&~e,r!==0&&(f=Ki(r)))),f===0?0:n!==0&&n!==f&&(n&p)===0&&(p=f&-f,r=n&-n,p>=r||p===32&&(r&4194048)!==0)?n:f}function pi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function fa(e,n){(n&8)!==0&&(n|=n&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=n;0<r;){var o=31-Vt(r),f=1<<o;n|=e[o],r&=~f}return n}function ll(e,n){switch(e){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 e=Kn;return Kn<<=1,(Kn&62914560)===0&&(Kn=4194304),e}function gr(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function Zn(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ha(e,n,r,o,f,p){var C=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var _=e.entanglements,V=e.expirationTimes,te=e.hiddenUpdates;for(r=C&~r;0<r;){var de=31-Vt(r),ve=1<<de;_[de]=0,V[de]=-1;var J=te[de];if(J!==null)for(te[de]=null,de=0;de<J.length;de++){var oe=J[de];oe!==null&&(oe.lane&=-536870913)}r&=~ve}o!==0&&Jn(e,o,0),p!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=p&~(C&~n))}function Jn(e,n,r){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Vt(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|r&261930}function rn(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var o=31-Vt(r),f=1<<o;f&n|e[o]&n&&(e[o]|=n),r&=~f}}function cn(e,n){var r=n&-n;return r=(r&42)!==0?1:ma(r),(r&(e.suspendedLanes|n))!==0?0:r}function ma(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ei(){var e=he.p;return e!==0?e:(e=window.event,e===void 0?32:Qb(e.type))}function Rn(e,n){var r=he.p;try{return he.p=e,n()}finally{he.p=r}}var Lt=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Lt,$t="__reactProps$"+Lt,xn="__reactContainer$"+Lt,ol="__reactEvents$"+Lt,vr="__reactListeners$"+Lt,yr="__reactHandles$"+Lt,pa="__reactResources$"+Lt,ga="__reactMarker$"+Lt,Fa="__reactLoad$"+Lt;function Va(e){delete e[Mt],delete e[$t],delete e[vr],delete e[yr]}function ti(e){var n;if(n=e[Mt])return n;for(var r=e.parentNode;r;){if(n=r[xn]||r[Mt]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=Ab(e);e!==null;){if(r=e[Mt])return r;e=Ab(e)}return n}e=r,r=e.parentNode}return null}function va(e){if(e=e[Mt]||e[xn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function ce(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(l(33))}function z(e){var n=e[pa];return n||(n=e[pa]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Q(e){e[ga]=!0}function me(e){e[Fa]=void 0}var Ee=new Set,ke={};function Te(e,n){Le(e,n),Le(e+"Capture",n)}function Le(e,n){for(ke[e]=n,e=0;e<n.length;e++)Ee.add(n[e])}var Xe=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]*$"),Ae={},$e={};function st(e){return On.call($e,e)?!0:On.call(Ae,e)?!1:Xe.test(e)?$e[e]=!0:(Ae[e]=!0,!1)}var Pe=!1;function ln(){var e=Pe;return Pe=!1,e}function It(e,n,r){if(st(n))if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,r)}}function vi(e,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,r)}}function Xt(e,n,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(n,r,o)}}function Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function no(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function cs(e,n,r){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,p=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(C){r=""+C,p.call(this,C)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(C){r=""+C},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function $a(e){if(!e._valueTracker){var n=no(e)?"checked":"value";e._valueTracker=cs(e,n,""+e[n])}}function io(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),o="";return e&&(o=no(e)?e.checked?"true":"false":e.value),e=o,e!==r?(n.setValue(e),!0):!1}var zc=/[\n"\\]/g;function Ot(e){return e.replace(zc,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Dn(e,n,r,o,f,p,C,_){e.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.type=C:e.removeAttribute("type"),n!=null?C==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Qt(n)):e.value!==""+Qt(n)&&(e.value=""+Qt(n)):C!=="submit"&&C!=="reset"||e.removeAttribute("value"),n!=null?C==="number"&&e.value==n?ao(e,Qt(e.value)):ao(e,Qt(n)):r!=null?ao(e,Qt(r)):o!=null&&e.removeAttribute("value"),f==null&&p!=null&&(e.defaultChecked=!!p),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Qt(_):e.removeAttribute("name")}function br(e,n,r,o,f,p,C,_){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),n!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||n!=null)){$a(e);return}r=r!=null?""+Qt(r):"",n=n!=null?""+Qt(n):r,_||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=_?e.checked:!!o,e.defaultChecked=!!o,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.name=C),$a(e)}function ao(e,n){e.defaultValue!==""+n&&(e.defaultValue=""+n)}function ni(e,n,r,o){if(e=e.options,n){n={};for(var f=0;f<r.length;f++)n["$"+r[f]]=!0;for(r=0;r<e.length;r++)f=n.hasOwnProperty("$"+e[r].value),e[r].selected!==f&&(e[r].selected=f),f&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Qt(r),n=null,f=0;f<e.length;f++){if(e[f].value===r){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function ro(e,n,r){if(n!=null&&(n=""+Qt(n),n!==e.value&&(e.value=n),r==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=r!=null?""+Qt(r):""}function yi(e,n,r,o){if(n==null){if(o!=null){if(r!=null)throw Error(l(92));if(le(o)){if(1<o.length)throw Error(l(93));o=o[0]}r=o}r==null&&(r=""),n=r}r=Qt(n),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o),$a(e)}function qn(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var xr=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 us(e,n,r){var o=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,r):typeof r!="number"||r===0||xr.has(n)?n==="float"?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}function bi(e,n,r){if(n!=null&&typeof n!="object")throw Error(l(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="",Pe=!0);for(var f in n)o=n[f],n.hasOwnProperty(f)&&r[f]!==o&&(us(e,f,o),Pe=!0)}else for(var p in n)n.hasOwnProperty(p)&&us(e,p,n[p])}function sl(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ds=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"]]),fs=/^[\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(e){return fs.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Fn(){}var cl=null;function ul(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ut=null,un=null;function _i(e){var n=va(e);if(n&&(e=n.stateNode)){var r=e[$t]||null;e:switch(e=n.stateNode,n.type){case"input":if(Dn(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Ot(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var o=r[n];if(o!==e&&o.form===e.form){var f=o[$t]||null;if(!f)throw Error(l(90));Dn(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<r.length;n++)o=r[n],o.form===e.form&&io(o)}break e;case"textarea":ro(e,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&ni(e,!!r.multiple,n,!1)}}}var xi=!1;function dl(e,n,r){if(xi)return e(n,r);xi=!0;try{var o=e(n);return o}finally{if(xi=!1,(ut!==null||un!==null)&&(zu(),ut&&(n=ut,e=un,un=ut=null,_i(n),e)))for(n=0;n<e.length;n++)_i(e[n])}}function Ya(e,n){var r=e.stateNode;if(r===null)return null;var o=r[$t]||null;if(o===null)return null;r=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)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(l(231,n,typeof r));return r}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fl=!1;if(Sn)try{var hs={};Object.defineProperty(hs,"passive",{get:function(){fl=!0}}),window.addEventListener("test",hs,hs),window.removeEventListener("test",hs,hs)}catch{fl=!1}var jr=null,sf=null,Lc=null;function ov(){if(Lc)return Lc;var e,n=sf,r=n.length,o,f="value"in jr?jr.value:jr.textContent,p=f.length;for(e=0;e<r&&n[e]===f[e];e++);var C=r-e;for(o=1;o<=C&&n[r-o]===f[p-o];o++);return Lc=f.slice(e,1<o?1-o:void 0)}function Ic(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Bc(){return!0}function sv(){return!1}function Vn(e){function n(r,o,f,p,C){this._reactName=r,this._targetInst=f,this.type=o,this.nativeEvent=p,this.target=C,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(r=e[_],this[_]=r?r(p):p[_]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Bc:sv,this.isPropagationStopped=sv,this}return B(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Bc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Bc)},persist:function(){},isPersistent:Bc}),n}var Sr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pc=Vn(Sr),ms=B({},Sr,{view:0,detail:0}),yC=Vn(ms),cf,uf,ps,Hc=B({},ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ff,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ps&&(ps&&e.type==="mousemove"?(cf=e.screenX-ps.screenX,uf=e.screenY-ps.screenY):uf=cf=0,ps=e),cf)},movementY:function(e){return"movementY"in e?e.movementY:uf}}),cv=Vn(Hc),bC=B({},Hc,{dataTransfer:0}),xC=Vn(bC),jC=B({},ms,{relatedTarget:0}),df=Vn(jC),SC=B({},Sr,{animationName:0,elapsedTime:0,pseudoElement:0}),wC=Vn(SC),kC=B({},Sr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),CC=Vn(kC),NC=B({},Sr,{data:0}),uv=Vn(NC),EC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TC={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"},AC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MC(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=AC[e])?!!n[e]:!1}function ff(){return MC}var OC=B({},ms,{key:function(e){if(e.key){var n=EC[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ic(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?TC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ff,charCode:function(e){return e.type==="keypress"?Ic(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ic(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_C=Vn(OC),RC=B({},Hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dv=Vn(RC),DC=B({},Sr,{submitter:0}),zC=Vn(DC),LC=B({},ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ff}),IC=Vn(LC),BC=B({},Sr,{propertyName:0,elapsedTime:0,pseudoElement:0}),PC=Vn(BC),HC=B({},Hc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),UC=Vn(HC),qC=B({},Sr,{newState:0,oldState:0,source:0}),FC=Vn(qC),VC=[9,13,27,32],hf=Sn&&"CompositionEvent"in window,gs=null;Sn&&"documentMode"in document&&(gs=document.documentMode);var $C=Sn&&"TextEvent"in window&&!gs,fv=Sn&&(!hf||gs&&8<gs&&11>=gs),hv=" ",mv=!1;function pv(e,n){switch(e){case"keyup":return VC.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lo=!1;function YC(e,n){switch(e){case"compositionend":return gv(n);case"keypress":return n.which!==32?null:(mv=!0,hv);case"textInput":return e=n.data,e===hv&&mv?null:e;default:return null}}function GC(e,n){if(lo)return e==="compositionend"||!hf&&pv(e,n)?(e=ov(),Lc=sf=jr=null,lo=!1,e):null;switch(e){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 fv&&n.locale!=="ko"?null:n.data;default:return null}}var XC={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 vv(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!XC[e.type]:n==="textarea"}function yv(e,n,r,o){ut?un?un.push(o):un=[o]:ut=o,n=Uu(n,"onChange"),0<n.length&&(r=new Pc("onChange","change",null,r,o),e.push({event:r,listeners:n}))}var vs=null,ys=null;function QC(e){rb(e,0)}function Uc(e){var n=ce(e);if(io(n))return e}function bv(e,n){if(e==="change")return n}var xv=!1;if(Sn){var mf;if(Sn){var pf="oninput"in document;if(!pf){var jv=document.createElement("div");jv.setAttribute("oninput","return;"),pf=typeof jv.oninput=="function"}mf=pf}else mf=!1;xv=mf&&(!document.documentMode||9<document.documentMode)}function Sv(){vs&&(vs.detachEvent("onpropertychange",wv),ys=vs=null)}function wv(e){if(e.propertyName==="value"&&Uc(ys)){var n=[];yv(n,ys,e,ul(e)),dl(QC,n)}}function KC(e,n,r){e==="focusin"?(Sv(),vs=n,ys=r,vs.attachEvent("onpropertychange",wv)):e==="focusout"&&Sv()}function ZC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uc(ys)}function JC(e,n){if(e==="click")return Uc(n)}function WC(e,n){if(e==="input"||e==="change")return Uc(n)}function eN(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var ji=typeof Object.is=="function"?Object.is:eN;function bs(e,n){if(ji(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var f=r[o];if(!On.call(n,f)||!ji(e[f],n[f]))return!1}return!0}function gf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cv(e,n){var r=kv(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=n&&o>=n)return{node:r,offset:n-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kv(r)}}function Nv(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Nv(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ev(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=gf(e.document);n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=gf(e.document)}return n}function vf(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var tN=Sn&&"documentMode"in document&&11>=document.documentMode,oo=null,yf=null,xs=null,bf=!1;function Tv(e,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;bf||oo==null||oo!==gf(o)||(o=oo,"selectionStart"in o&&vf(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}),xs&&bs(xs,o)||(xs=o,o=Uu(yf,"onSelect"),0<o.length&&(n=new Pc("onSelect","select",null,n,r),e.push({event:n,listeners:o}),n.target=oo)))}function hl(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var so={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionrun:hl("Transition","TransitionRun"),transitionstart:hl("Transition","TransitionStart"),transitioncancel:hl("Transition","TransitionCancel"),transitionend:hl("Transition","TransitionEnd")},xf={},Av={};Sn&&(Av=document.createElement("div").style,"AnimationEvent"in window||(delete so.animationend.animation,delete so.animationiteration.animation,delete so.animationstart.animation),"TransitionEvent"in window||delete so.transitionend.transition);function ml(e){if(xf[e])return xf[e];if(!so[e])return e;var n=so[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in Av)return xf[e]=n[r];return e}var Mv=ml("animationend"),Ov=ml("animationiteration"),_v=ml("animationstart"),nN=ml("transitionrun"),iN=ml("transitionstart"),aN=ml("transitioncancel"),Rv=ml("transitionend"),Dv=new Map,jf="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(" ");jf.push("scrollEnd");function Zi(e,n){Dv.set(e,n),Te(n,[e])}var rN=0;function Ga(e,n){if(e.name!=null&&e.name!=="auto")return e.name;if(n.autoName!==null)return n.autoName;e=ta.identifierPrefix;var r=rN++;return e="_"+e+"t_"+r.toString(32)+"_",n.autoName=e}function zv(e){if(e==null||typeof e=="string")return e;var n=null,r=Ao;if(r!==null)for(var o=0;o<r.length;o++){var f=e[r[o]];if(f!=null){if(f==="none")return"none";n=n==null?f:n+(" "+f)}}return n??e.default}function Xa(e,n){return e=zv(e),n=zv(n),n==null?e==="auto"?null:e:n==="auto"?null:n}var qc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ri=[],co=0,Sf=0;function Fc(){for(var e=co,n=Sf=co=0;n<e;){var r=Ri[n];Ri[n++]=null;var o=Ri[n];Ri[n++]=null;var f=Ri[n];Ri[n++]=null;var p=Ri[n];if(Ri[n++]=null,o!==null&&f!==null){var C=o.pending;C===null?f.next=f:(f.next=C.next,C.next=f),o.pending=f}p!==0&&Lv(r,f,p)}}function Vc(e,n,r,o){Ri[co++]=e,Ri[co++]=n,Ri[co++]=r,Ri[co++]=o,Sf|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function wf(e,n,r,o){return Vc(e,n,r,o),$c(e)}function pl(e,n){return Vc(e,null,null,n),$c(e)}function Lv(e,n,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var f=!1,p=e.return;p!==null;)p.childLanes|=r,o=p.alternate,o!==null&&(o.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(f=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,f&&n!==null&&(f=31-Vt(r),e=p.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=r|536870912),p):null}function $c(e){if(50<qs)throw qs=0,Du=null,Error(l(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var uo={};function lN(e,n,r,o){this.tag=e,this.key=r,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(e,n,r,o){return new lN(e,n,r,o)}function kf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qa(e,n){var r=e.alternate;return r===null?(r=ii(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&1206910976,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Iv(e,n){e.flags&=1206910978;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,n=r.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Yc(e,n,r,o,f,p){var C=0;if(o=e,typeof o=="function")kf(o)&&(C=1);else if(typeof o=="string")C=DE(e,r,At.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(o){case ie:return e=ii(31,r,n,f),e.elementType=ie,e.lanes=p,e;case Y:return gl(r.children,f,p,n);case X:C=8,f|=24;break;case ue:return e=ii(12,r,n,f|2),e.elementType=ue,e.lanes=p,e;case R:return e=ii(13,r,n,f),e.elementType=R,e.lanes=p,e;case H:return e=ii(19,r,n,f),e.elementType=H,e.lanes=p,e;case ne:case F:return e=f|32,e=ii(30,r,n,e),e.elementType=F,e.lanes=p,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case U:C=10;break e;case Z:C=9;break e;case G:C=11;break e;case W:C=14;break e;case D:C=16,o=null;break e}C=29,r=Error(l(130,e===null?"null":typeof e,"")),o=null}return n=ii(C,r,n,f),n.elementType=e,n.type=o,n.lanes=p,n}function gl(e,n,r,o){return e=ii(7,e,o,n),e.lanes=r,e}function Cf(e,n,r){return e=ii(6,e,null,n),e.lanes=r,e}function Bv(e){var n=ii(18,null,null,0);return n.stateNode=e,n}function Nf(e,n,r){return n=ii(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Pv=new WeakMap;function Di(e,n){if(typeof e=="object"&&e!==null){var r=Pv.get(e);return r!==void 0?r:(n={value:e,source:n,stack:Ut(n)},Pv.set(e,n),n)}return{value:e,source:n,stack:Ut(n)}}var fo=[],ho=0,Gc=null,js=0,zi=[],Li=0,wr=null,ya=1,ba="";function Ka(e,n){fo[ho++]=js,fo[ho++]=Gc,Gc=e,js=n}function Hv(e,n,r){zi[Li++]=ya,zi[Li++]=ba,zi[Li++]=wr,wr=e;var o=ya;e=ba;var f=32-Vt(o)-1;o&=~(1<<f),r+=1;var p=32-Vt(n)+f;if(30<p){var C=f-f%5;p=(o&(1<<C)-1).toString(32),o>>=C,f-=C,ya=1<<32-Vt(n)+f|r<<f|o,ba=p+e}else ya=1<<p|r<<f|o,ba=e}function Xc(e){e.return!==null&&(Ka(e,1),Hv(e,1,0))}function Ef(e){for(;e===Gc;)Gc=fo[--ho],fo[ho]=null,js=fo[--ho],fo[ho]=null;for(;e===wr;)wr=zi[--Li],zi[Li]=null,ba=zi[--Li],zi[Li]=null,ya=zi[--Li],zi[Li]=null}function Uv(e,n){zi[Li++]=ya,zi[Li++]=ba,zi[Li++]=wr,ya=n.id,ba=n.overflow,wr=e}var dn=null,Et=null,et=!1,kr=null,Ii=!1,Tf=Error(l(519));function Cr(e){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ss(Di(n,e)),Tf}function qv(e){var n=e.stateNode,r=e.type,o=e.memoizedProps;switch(n[Mt]=e,n[$t]=o,r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(r=0;r<Vs.length;r++)nt(Vs[r],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),br(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)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||o.suppressHydrationWarning===!0||cb(n.textContent,r)?(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||Cr(e,!0)}function Qc(e){for(dn=e.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 mo(e){if(e!==dn)return!1;if(!et)return Qc(e),et=!0,!1;var n=e.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||am(e.type,e.memoizedProps)),r=!r),r&&Et&&Cr(e),Qc(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Et=Tb(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Et=Tb(e)}else n===27?(n=Et,Ur(e.type)?(e=hm,hm=null,Et=e):Et=n):Et=dn?Pi(e.stateNode.nextSibling):null;return!0}function vl(){Et=dn=null,et=!1}function Af(){var e=kr;return e!==null&&(li===null?li=e:li.push.apply(li,e),kr=null),e}function Ss(e){kr===null?kr=[e]:kr.push(e)}var Mf=ht(null),yl=null,Za=null;function Nr(e,n,r){Je(Mf,n._currentValue),n._currentValue=r}function Ja(e){e._currentValue=Mf.current,ot(Mf)}function Kc(e,n,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===r)break;e=e.return}}function Of(e,n,r,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var p=f.dependencies;if(p!==null){var C=f.child;p=p.firstContext;e:for(;p!==null;){var _=p;p=f;for(var V=0;V<n.length;V++)if(_.context===n[V]){p.lanes|=r,_=p.alternate,_!==null&&(_.lanes|=r),Kc(p.return,r,e),o||(C=null);break e}p=_.next}}else if(f.tag===18){if(C=f.return,C===null)throw Error(l(341));C.lanes|=r,p=C.alternate,p!==null&&(p.lanes|=r),Kc(C,r,e),C=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=r,C=f.alternate,C!==null&&(C.lanes|=r),Kc(f.return,r,e),C=f.child,C=C!==null?C.sibling:null):C=f.child;if(C!==null)C.return=f;else for(C=f;C!==null;){if(C===e){C=null;break}if(f=C.sibling,f!==null){f.return=C.return,C=f;break}C=C.return}f=C}}function bl(e,n,r,o){e=null;for(var f=n,p=!1;f!==null;){if(!p){if((f.flags&524288)!==0)p=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var C=f.alternate;if(C===null)throw Error(l(387));if(C=C.memoizedProps,C!==null){var _=f.type;ji(f.pendingProps.value,C.value)||(e!==null?e.push(_):e=[_])}}else if(f===Hn.current){if(C=f.alternate,C===null)throw Error(l(387));C.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Po):e=[Po])}f=f.return}return e!==null&&Of(n,e,r,o),n.flags|=262144,e!==null}function Zc(e){for(e=e.firstContext;e!==null;){if(!ji(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xl(e){yl=e,Za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wn(e){return Fv(yl,e)}function Jc(e,n){return yl===null&&xl(e),Fv(e,n)}function Fv(e,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},Za===null){if(e===null)throw Error(l(308));Za=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Za=Za.next=n;return r}var oN=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(r){return r()})}},sN=t.unstable_scheduleCallback,cN=t.unstable_NormalPriority,Kt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _f(){return{controller:new oN,data:new Map,refCount:0}}function ws(e){e.refCount--,e.refCount===0&&sN(cN,function(){e.controller.abort()})}function Vv(e,n){if((e.pendingLanes&4194048)!==0){var r=e.transitionTypes;for(r===null&&(r=e.transitionTypes=[]),e=0;e<n.length;e++){var o=n[e];r.indexOf(o)===-1&&r.push(o)}}}var ks=null;function uN(e){var n=e.transitionTypes;return e.transitionTypes=null,n}var Cs=null,Rf=0,jl=0,po=null;function dN(e,n){if(Cs===null){var r=Cs=[];Rf=0,jl=Qh(),po={status:"pending",value:void 0,then:function(o){r.push(o)}}}return Rf++,n.then($v,$v),n}function $v(){if(--Rf===0&&(ks=null,Cs!==null)){po!==null&&(po.status="fulfilled");var e=Cs;Cs=null,jl=0,po=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function fN(e,n){var r=[],o={status:"pending",value:null,reason:null,then:function(f){r.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<r.length;f++)(0,r[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<r.length;f++)(0,r[f])(void 0)}),o}var Yv=se.S;se.S=function(e,n){if(B0=Gt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&dN(e,n),ks!==null)for(var r=Ro;r!==null;)Vv(r,ks),r=r.next;if(r=e.types,r!==null){for(var o=Ro;o!==null;)Vv(o,r),o=o.next;if(jl!==0){o=ks,o===null&&(o=ks=[]);for(var f=0;f<r.length;f++){var p=r[f];o.indexOf(p)===-1&&o.push(p)}}}Yv!==null&&Yv(e,n)};var Sl=ht(null);function Df(){var e=Sl.current;return e!==null?e:kt.pooledCache}function Wc(e,n){n===null?Je(Sl,Sl.current):Je(Sl,n.pool)}function Gv(){var e=Df();return e===null?null:{parent:Kt._currentValue,pool:e}}var go=Error(l(460)),zf=Error(l(474)),eu=Error(l(542)),tu={then:function(){}};function Xv(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qv(e,n,r){switch(r=e[r],r===void 0?e.push(n):r!==n&&(n.then(Fn,Fn),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Zv(e),e===void 0&&!("reason"in n)?Error(l(600)):e;default:if(typeof n.status=="string")n.then(Fn,Fn);else{if(e=kt,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Zv(e),e}throw kl=n,go}}function wl(e){try{var n=e._init;return n(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(kl=r,go):r}}var kl=null;function Kv(){if(kl===null)throw Error(l(459));var e=kl;return kl=null,e}function Zv(e){if(e===go||e===eu)throw Error(l(483))}var vo=null,Ns=0;function nu(e){var n=Ns;return Ns+=1,vo===null&&(vo=[]),Qv(vo,e,n)}function Er(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function iu(e,n){throw n.$$typeof===q?Error(l(525)):(e=Object.prototype.toString.call(n),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Jv(e){function n(ee,K){if(e){var ae=ee.deletions;ae===null?(ee.deletions=[K],ee.flags|=16):ae.push(K)}}function r(ee,K){if(!e)return null;for(;K!==null;)n(ee,K),K=K.sibling;return null}function o(ee){for(var K=new Map;ee!==null;)ee.key===null?K.set(ee.index,ee):K.set(ee.key,ee),ee=ee.sibling;return K}function f(ee,K){return ee=Qa(ee,K),ee.index=0,ee.sibling=null,ee}function p(ee,K,ae){return ee.index=ae,e?(ae=ee.alternate,ae!==null?(ae=ae.index,ae<K?(ee.flags|=2,K):ae):(ee.flags|=134217730,K)):(ee.flags|=1048576,K)}function C(ee){return e&&ee.alternate===null&&(ee.flags|=134217730),ee}function _(ee,K,ae,ge){return K===null||K.tag!==6?(K=Cf(ae,ee.mode,ge),K.return=ee,K):(K=f(K,ae),K.return=ee,K)}function V(ee,K,ae,ge){var Me=ae.type;return Me===Y?(ee=de(ee,K,ae.props.children,ge,ae.key),Er(ee,ae),ee):K!==null&&(K.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===D&&wl(Me)===K.type)?(K=f(K,ae.props),Er(K,ae),K.return=ee,K):(K=Yc(ae.type,ae.key,ae.props,null,ee.mode,ge),Er(K,ae),K.return=ee,K)}function te(ee,K,ae,ge){return K===null||K.tag!==4||K.stateNode.containerInfo!==ae.containerInfo||K.stateNode.implementation!==ae.implementation?(K=Nf(ae,ee.mode,ge),K.return=ee,K):(K=f(K,ae.children||[]),K.return=ee,K)}function de(ee,K,ae,ge,Me){return K===null||K.tag!==7?(K=gl(ae,ee.mode,ge,Me),K.return=ee,K):(K=f(K,ae),K.return=ee,K)}function ve(ee,K,ae){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Cf(""+K,ee.mode,ae),K.return=ee,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case $:return ae=Yc(K.type,K.key,K.props,null,ee.mode,ae),Er(ae,K),ae.return=ee,ae;case L:return K=Nf(K,ee.mode,ae),K.return=ee,K;case D:return K=wl(K),ve(ee,K,ae)}if(le(K)||Se(K))return K=gl(K,ee.mode,ae,null),K.return=ee,K;if(typeof K.then=="function")return ve(ee,nu(K),ae);if(K.$$typeof===U)return ve(ee,Jc(ee,K),ae);iu(ee,K)}return null}function J(ee,K,ae,ge){var Me=K!==null?K.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Me!==null?null:_(ee,K,""+ae,ge);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case $:return ae.key===Me?V(ee,K,ae,ge):null;case L:return ae.key===Me?te(ee,K,ae,ge):null;case D:return ae=wl(ae),J(ee,K,ae,ge)}if(le(ae)||Se(ae))return Me!==null?null:de(ee,K,ae,ge,null);if(typeof ae.then=="function")return J(ee,K,nu(ae),ge);if(ae.$$typeof===U)return J(ee,K,Jc(ee,ae),ge);iu(ee,ae)}return null}function oe(ee,K,ae,ge,Me){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ee=ee.get(ae)||null,_(K,ee,""+ge,Me);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case $:return ee=ee.get(ge.key===null?ae:ge.key)||null,V(K,ee,ge,Me);case L:return ee=ee.get(ge.key===null?ae:ge.key)||null,te(K,ee,ge,Me);case D:return ge=wl(ge),oe(ee,K,ae,ge,Me)}if(le(ge)||Se(ge))return ee=ee.get(ae)||null,de(K,ee,ge,Me,null);if(typeof ge.then=="function")return oe(ee,K,ae,nu(ge),Me);if(ge.$$typeof===U)return oe(ee,K,ae,Jc(K,ge),Me);iu(K,ge)}return null}function Ce(ee,K,ae,ge){for(var Me=null,lt=null,Ie=K,qe=K=0,Wt=null;Ie!==null&&qe<ae.length;qe++){Ie.index>qe?(Wt=Ie,Ie=null):Wt=Ie.sibling;var dt=J(ee,Ie,ae[qe],ge);if(dt===null){Ie===null&&(Ie=Wt);break}e&&Ie&&dt.alternate===null&&n(ee,Ie),K=p(dt,K,qe),lt===null?Me=dt:lt.sibling=dt,lt=dt,Ie=Wt}if(qe===ae.length)return r(ee,Ie),et&&Ka(ee,qe),Me;if(Ie===null){for(;qe<ae.length;qe++)Ie=ve(ee,ae[qe],ge),Ie!==null&&(K=p(Ie,K,qe),lt===null?Me=Ie:lt.sibling=Ie,lt=Ie);return et&&Ka(ee,qe),Me}for(Ie=o(Ie);qe<ae.length;qe++)Wt=oe(Ie,ee,qe,ae[qe],ge),Wt!==null&&(e&&(dt=Wt.alternate,dt!==null&&Ie.delete(dt.key===null?qe:dt.key)),K=p(Wt,K,qe),lt===null?Me=Wt:lt.sibling=Wt,lt=Wt);return e&&Ie.forEach(function(Yr){return n(ee,Yr)}),et&&Ka(ee,qe),Me}function Re(ee,K,ae,ge){if(ae==null)throw Error(l(151));for(var Me=null,lt=null,Ie=K,qe=K=0,Wt=null,dt=ae.next();Ie!==null&&!dt.done;qe++,dt=ae.next()){Ie.index>qe?(Wt=Ie,Ie=null):Wt=Ie.sibling;var Yr=J(ee,Ie,dt.value,ge);if(Yr===null){Ie===null&&(Ie=Wt);break}e&&Ie&&Yr.alternate===null&&n(ee,Ie),K=p(Yr,K,qe),lt===null?Me=Yr:lt.sibling=Yr,lt=Yr,Ie=Wt}if(dt.done)return r(ee,Ie),et&&Ka(ee,qe),Me;if(Ie===null){for(;!dt.done;qe++,dt=ae.next())dt=ve(ee,dt.value,ge),dt!==null&&(K=p(dt,K,qe),lt===null?Me=dt:lt.sibling=dt,lt=dt);return et&&Ka(ee,qe),Me}for(Ie=o(Ie);!dt.done;qe++,dt=ae.next())dt=oe(Ie,ee,qe,dt.value,ge),dt!==null&&(e&&(Wt=dt.alternate,Wt!==null&&Ie.delete(Wt.key===null?qe:Wt.key)),K=p(dt,K,qe),lt===null?Me=dt:lt.sibling=dt,lt=dt);return e&&Ie.forEach(function(YE){return n(ee,YE)}),et&&Ka(ee,qe),Me}function Ze(ee,K,ae,ge){if(typeof ae=="object"&&ae!==null&&ae.type===Y&&ae.key===null&&ae.props.ref===void 0&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case $:e:{for(var Me=ae.key;K!==null;){if(K.key===Me){if(Me=ae.type,Me===Y){if(K.tag===7){r(ee,K.sibling),ge=f(K,ae.props.children),Er(ge,ae),ge.return=ee,ee=ge;break e}}else if(K.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===D&&wl(Me)===K.type){r(ee,K.sibling),ge=f(K,ae.props),Er(ge,ae),ge.return=ee,ee=ge;break e}r(ee,K);break}else n(ee,K);K=K.sibling}ae.type===Y?(ge=gl(ae.props.children,ee.mode,ge,ae.key),Er(ge,ae),ge.return=ee,ee=ge):(ge=Yc(ae.type,ae.key,ae.props,null,ee.mode,ge),Er(ge,ae),ge.return=ee,ee=ge)}return C(ee);case L:e:{for(Me=ae.key;K!==null;){if(K.key===Me)if(K.tag===4&&K.stateNode.containerInfo===ae.containerInfo&&K.stateNode.implementation===ae.implementation){r(ee,K.sibling),ge=f(K,ae.children||[]),ge.return=ee,ee=ge;break e}else{r(ee,K);break}else n(ee,K);K=K.sibling}ge=Nf(ae,ee.mode,ge),ge.return=ee,ee=ge}return C(ee);case D:return ae=wl(ae),Ze(ee,K,ae,ge)}if(le(ae))return Ce(ee,K,ae,ge);if(Se(ae)){if(Me=Se(ae),typeof Me!="function")throw Error(l(150));return ae=Me.call(ae),Re(ee,K,ae,ge)}if(typeof ae.then=="function")return Ze(ee,K,nu(ae),ge);if(ae.$$typeof===U)return Ze(ee,K,Jc(ee,ae),ge);iu(ee,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,K!==null&&K.tag===6?(r(ee,K.sibling),ge=f(K,ae),ge.return=ee,ee=ge):(r(ee,K),ge=Cf(ae,ee.mode,ge),ge.return=ee,ee=ge),C(ee)):r(ee,K)}return function(ee,K,ae,ge){try{Ns=0;var Me=Ze(ee,K,ae,ge);return vo=null,Me}catch(Ie){if(Ie===go||Ie===eu)throw Ie;var lt=ii(29,Ie,null,ee.mode);return lt.lanes=ge,lt.return=ee,lt}finally{}}}var Cl=Jv(!0),Wv=Jv(!1),Tr=!1;function Lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function If(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ar(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mr(e,n,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(pt&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=$c(e),Lv(e,null,r),n}return Vc(e,o,n,r),$c(e)}function Es(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,rn(e,r)}}function Bf(e,n){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var f=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var C={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?f=p=C:p=p.next=C,r=r.next}while(r!==null);p===null?f=p=n:p=p.next=n}else f=p=n;r={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}var Pf=!1;function Ts(){if(Pf){var e=po;if(e!==null)throw e}}function As(e,n,r,o){Pf=!1;var f=e.updateQueue;Tr=!1;var p=f.firstBaseUpdate,C=f.lastBaseUpdate,_=f.shared.pending;if(_!==null){f.shared.pending=null;var V=_,te=V.next;V.next=null,C===null?p=te:C.next=te,C=V;var de=e.alternate;de!==null&&(de=de.updateQueue,_=de.lastBaseUpdate,_!==C&&(_===null?de.firstBaseUpdate=te:_.next=te,de.lastBaseUpdate=V))}if(p!==null){var ve=f.baseState;C=0,de=te=V=null,_=p;do{var J=_.lane&-536870913,oe=J!==_.lane;if(oe?(rt&J)===J:(o&J)===J){J!==0&&J===jl&&(Pf=!0),de!==null&&(de=de.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Ce=e,Re=_;J=n;var Ze=r;switch(Re.tag){case 1:if(Ce=Re.payload,typeof Ce=="function"){ve=Ce.call(Ze,ve,J);break e}ve=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Re.payload,J=typeof Ce=="function"?Ce.call(Ze,ve,J):Ce,J==null)break e;ve=B({},ve,J);break e;case 2:Tr=!0}}J=_.callback,J!==null&&(e.flags|=64,oe&&(e.flags|=8192),oe=f.callbacks,oe===null?f.callbacks=[J]:oe.push(J))}else oe={lane:J,tag:_.tag,payload:_.payload,callback:_.callback,next:null},de===null?(te=de=oe,V=ve):de=de.next=oe,C|=J;if(_=_.next,_===null){if(_=f.shared.pending,_===null)break;oe=_,_=oe.next,oe.next=null,f.lastBaseUpdate=oe,f.shared.pending=null}}while(!0);de===null&&(V=ve),f.baseState=V,f.firstBaseUpdate=te,f.lastBaseUpdate=de,p===null&&(f.shared.lanes=0),Ir|=C,e.lanes=C,e.memoizedState=ve}}function ey(e,n){if(typeof e!="function")throw Error(l(191,e));e.call(n)}function ty(e,n){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)ey(r[e],n)}var Or=ht(null),au=ht(0);function ny(e,n){e=ir,Je(au,e),Je(Or,n),ir=e|n.baseLanes}function Hf(){Je(au,ir),Je(Or,Or.current)}function Uf(){ir=au.current,ot(Or),ot(au)}var kn=ht(null),zn=null;function _r(e){var n=e.alternate;Je(Cn,Cn.current&1),Je(kn,e),zn===null&&(n===null||Or.current!==null||n.memoizedState!==null)&&(zn=e)}function qf(e){Je(Cn,Cn.current),Je(kn,e),zn===null&&(zn=e)}function iy(e){e.tag===22?(Je(Cn,Cn.current),Je(kn,e),zn===null&&(zn=e)):Rr()}function Rr(){Je(Cn,Cn.current),Je(kn,kn.current)}function Si(e){ot(kn),zn===e&&(zn=null),ot(Cn)}var Cn=ht(0);function Ms(e,n){Je(kn,kn.current),Je(Cn,n)}function Ff(e){ot(Cn),ot(kn),zn===e&&(zn=null)}function ru(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||dm(r)||fm(r)))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===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Wa=0,Ke=null,jt=null,Zt=null,lu=!1,yo=!1,Nl=!1,ou=0,Os=0,bo=null,hN=0;function qt(){throw Error(l(321))}function Vf(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!ji(e[r],n[r]))return!1;return!0}function $f(e,n,r,o,f,p){return Wa=p,Ke=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,se.H=e===null||e.memoizedState===null?Hy:Uy,Nl=!1,p=r(o,f),Nl=!1,yo&&(p=ry(n,r,o,f)),ay(e),p}function ay(e){se.H=mu;var n=jt!==null&&jt.next!==null;if(Wa=0,Zt=jt=Ke=null,lu=!1,Os=0,bo=null,n)throw Error(l(300));e===null||Jt||(e=e.dependencies,e!==null&&Zc(e)&&(Jt=!0))}function ry(e,n,r,o){Ke=e;var f=0;do{if(yo&&(bo=null),Os=0,yo=!1,25<=f)throw Error(l(301));if(f+=1,Zt=jt=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}se.H=jN,p=n(r,o)}while(yo);return p}function mN(){var e=se.H,n=e.useState()[0];return n=typeof n.then=="function"?_s(n):n,e=e.useState()[0],(jt!==null?jt.memoizedState:null)!==e&&(Ke.flags|=1024),n}function Yf(){var e=ou!==0;return ou=0,e}function Gf(e,n,r){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~r}function Xf(e){if(lu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}lu=!1}Wa=0,Zt=jt=Ke=null,yo=!1,Os=ou=0,bo=null}function $n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Ke.memoizedState=Zt=e:Zt=Zt.next=e,Zt}function Yt(){if(jt===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=jt.next;var n=Zt===null?Ke.memoizedState:Zt.next;if(n!==null)Zt=n,jt=e;else{if(e===null)throw Ke.alternate===null?Error(l(467)):Error(l(310));jt=e,e={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},Zt===null?Ke.memoizedState=Zt=e:Zt=Zt.next=e}return Zt}function su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _s(e){var n=Os;return Os+=1,bo===null&&(bo=[]),e=Qv(bo,e,n),n=Ke,(Zt===null?n.memoizedState:Zt.next)===null&&(n=n.alternate,se.H=n===null||n.memoizedState===null?Hy:Uy),e}function cu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _s(e);if(e.$$typeof===fe)return;if(e.$$typeof===U)return wn(e)}throw Error(l(438,String(e)))}function Qf(e){var n=null,r=Ke.updateQueue;if(r!==null&&(n=r.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(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=su(),Ke.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(e),o=0;o<e;o++)r[o]=P;return n.index++,r}function er(e,n){return typeof n=="function"?n(e):n}function uu(e){var n=Yt();return Kf(n,jt,e)}function Kf(e,n,r){var o=e.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=r;var f=e.baseQueue,p=o.pending;if(p!==null){if(f!==null){var C=f.next;f.next=p.next,p.next=C}n.baseQueue=f=p,o.pending=null}if(p=e.baseState,f===null)e.memoizedState=p;else{n=f.next;var _=C=null,V=null,te=n,de=!1;do{var ve=te.lane&-536870913;if(ve!==te.lane?(rt&ve)===ve:(Wa&ve)===ve){var J=te.revertLane;if(J===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ve===jl&&(de=!0);else if((Wa&J)===J){te=te.next,J===jl&&(de=!0);continue}else ve={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},V===null?(_=V=ve,C=p):V=V.next=ve,Ke.lanes|=J,Ir|=J;ve=te.action,Nl&&r(p,ve),p=te.hasEagerState?te.eagerState:r(p,ve)}else J={lane:ve,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},V===null?(_=V=J,C=p):V=V.next=J,Ke.lanes|=ve,Ir|=ve;te=te.next}while(te!==null&&te!==n);if(V===null?C=p:V.next=_,!ji(p,e.memoizedState)&&(Jt=!0,de&&(r=po,r!==null)))throw r;e.memoizedState=p,e.baseState=C,e.baseQueue=V,o.lastRenderedState=p}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Zf(e){var n=Yt(),r=n.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=e;var o=r.dispatch,f=r.pending,p=n.memoizedState;if(f!==null){r.pending=null;var C=f=f.next;do p=e(p,C.action),C=C.next;while(C!==f);ji(p,n.memoizedState)||(Jt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),r.lastRenderedState=p}return[p,o]}function ly(e,n,r){var o=Ke,f=Yt(),p=et;if(p){if(r===void 0)throw Error(l(407));r=r()}else r=n();var C=!ji((jt||f).memoizedState,r);if(C&&(f.memoizedState=r,Jt=!0),f=f.queue,eh(cy.bind(null,o,f,e),[e]),e=f.getSnapshot!==n||C||Zt!==null&&(Zt.memoizedState.tag&1)!==0,xo(e?9:8,{destroy:void 0},sy.bind(null,o,f,r,n),null),e){if(o.flags|=2048,kt===null)throw Error(l(349));p||(Wa&127)!==0||oy(o,n,r)}return r}function oy(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Ke.updateQueue,n===null?(n=su(),Ke.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function sy(e,n,r,o){n.value=r,n.getSnapshot=o,uy(n)&&dy(e)}function cy(e,n,r){return r(function(){uy(n)&&dy(e)})}function uy(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!ji(e,r)}catch{return!0}}function dy(e){var n=pl(e,2);n!==null&&oi(n,e,2)}function Jf(e){var n=$n();if(typeof e=="function"){var r=e;if(e=r(),Nl){zt(!0);try{r()}finally{zt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:er,lastRenderedState:e},n}function fy(e,n,r,o){return e.baseState=r,Kf(e,jt,typeof o=="function"?o:er)}function pN(e,n,r,o,f){if(hu(e))throw Error(l(485));if(e=n.action,e!==null){var p={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){p.listeners.push(C)}};se.T!==null?r(!0):p.isTransition=!1,o(p),r=n.pending,r===null?(p.next=n.pending=p,hy(n,p)):(p.next=r.next,n.pending=r.next=p)}}function hy(e,n){var r=n.action,o=n.payload,f=e.state;if(n.isTransition){var p=se.T,C={};C.types=p!==null?p.types:null,se.T=C;try{var _=r(f,o),V=se.S;V!==null&&V(C,_),my(e,n,_)}catch(te){Wf(e,n,te)}finally{p!==null&&C.types!==null&&(p.types=C.types),se.T=p}}else try{p=r(f,o),my(e,n,p)}catch(te){Wf(e,n,te)}}function my(e,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){py(e,n,o)},function(o){return Wf(e,n,o)}):py(e,n,r)}function py(e,n,r){n.status="fulfilled",n.value=r,gy(n),e.state=r,n=e.pending,n!==null&&(r=n.next,r===n?e.pending=null:(r=r.next,n.next=r,hy(e,r)))}function Wf(e,n,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=r,gy(n),n=n.next;while(n!==o)}e.action=null}function gy(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function vy(e,n){return n}function yy(e,n){if(et){var r=kt.formState;if(r!==null){e:{var o=Ke;if(et){if(Et){t:{for(var f=Et,p=Ii;f.nodeType!==8;){if(!p){f=null;break t}if(f=Pi(f.nextSibling),f===null){f=null;break t}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){Et=Pi(f.nextSibling),o=f.data==="F!";break e}}Cr(o)}o=!1}o&&(n=r[0])}}return r=$n(),r.memoizedState=r.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vy,lastRenderedState:n},r.queue=o,r=Iy.bind(null,Ke,o),o.dispatch=r,o=Jf(!1),p=rh.bind(null,Ke,!1,o.queue),o=$n(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,r=pN.bind(null,Ke,f,p,r),f.dispatch=r,o.memoizedState=e,[n,r,!1]}function by(e){var n=Yt();return xy(n,jt,e)}function xy(e,n,r){if(n=Kf(e,n,vy)[0],e=uu(er)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=_s(n)}catch(C){throw C===go?eu:C}else o=n;n=Yt();var f=n.queue,p=f.dispatch;return r!==n.memoizedState&&(Ke.flags|=2048,xo(9,{destroy:void 0},gN.bind(null,f,r),null)),[o,p,e]}function gN(e,n){e.action=n}function jy(e){var n=Yt(),r=jt;if(r!==null)return xy(n,r,e);Yt(),n=n.memoizedState,r=Yt();var o=r.queue.dispatch;return r.memoizedState=e,[n,o,!1]}function xo(e,n,r,o){return e={tag:e,create:r,deps:o,inst:n,next:null},n=Ke.updateQueue,n===null&&(n=su(),Ke.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,n.lastEffect=e),e}function Sy(){return Yt().memoizedState}function du(e,n,r,o){var f=$n();Ke.flags|=e,f.memoizedState=xo(1|n,{destroy:void 0},r,o===void 0?null:o)}function fu(e,n,r,o){var f=Yt();o=o===void 0?null:o;var p=f.memoizedState.inst;jt!==null&&o!==null&&Vf(o,jt.memoizedState.deps)?f.memoizedState=xo(n,p,r,o):(Ke.flags|=e,f.memoizedState=xo(1|n,p,r,o))}function wy(e,n){du(8390656,8,e,n)}function eh(e,n){fu(2048,8,e,n)}function vN(e){Ke.flags|=4;var n=Ke.updateQueue;if(n===null)n=su(),Ke.updateQueue=n,n.events=[e];else{var r=n.events;r===null?n.events=[e]:r.push(e)}}function ky(e){var n=Yt().memoizedState;return vN({ref:n,nextImpl:e}),function(){if((pt&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function Cy(e,n){return fu(4,2,e,n)}function Ny(e,n){return fu(4,4,e,n)}function Ey(e,n){if(typeof n=="function"){e=e();var r=n(e);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Ty(e,n,r){r=r!=null?r.concat([e]):null,fu(4,4,Ey.bind(null,n,e),r)}function th(){}function Ay(e,n){var r=Yt();n=n===void 0?null:n;var o=r.memoizedState;return n!==null&&Vf(n,o[1])?o[0]:(r.memoizedState=[e,n],e)}function My(e,n){var r=Yt();n=n===void 0?null:n;var o=r.memoizedState;if(n!==null&&Vf(n,o[1]))return o[0];if(o=e(),Nl){zt(!0);try{e()}finally{zt(!1)}}return r.memoizedState=[o,n],o}function nh(e,n,r){return r===void 0||(Wa&1073741824)!==0&&(rt&261930)===0?e.memoizedState=n:(e.memoizedState=r,e=H0(),Ke.lanes|=e,Ir|=e,r)}function Oy(e,n,r,o){return ji(r,n)?r:Or.current!==null?(e=nh(e,r,o),ji(e,n)||(Jt=!0),e):(Wa&106)===0||(Wa&1073741824)!==0&&(rt&261930)===0?(Jt=!0,e.memoizedState=r):(e=H0(),Ke.lanes|=e,Ir|=e,n)}function _y(e,n,r,o,f){var p=he.p;he.p=p!==0&&8>p?p:8;var C=se.T,_={};_.types=C!==null?C.types:null,se.T=_,rh(e,!1,n,r);try{var V=f(),te=se.S;if(te!==null&&te(_,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var de=fN(V,o);Rs(e,n,de,Ni(e))}else Rs(e,n,o,Ni(e))}catch(ve){Rs(e,n,{then:function(){},status:"rejected",reason:ve},Ni())}finally{he.p=p,C!==null&&_.types!==null&&(C.types=_.types),se.T=C}}function yN(){}function ih(e,n,r,o){if(e.tag!==5)throw Error(l(476));var f=Ry(e).queue;_y(e,f,n,Ne,r===null?yN:function(){return Dy(e),r(o)})}function Ry(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Ne,baseState:Ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:er,lastRenderedState:Ne},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:er,lastRenderedState:r},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Dy(e){var n=Ry(e);n.next===null&&(n=e.alternate.memoizedState),Rs(e,n.next.queue,{},Ni())}function ah(){return wn(Po)}function zy(){return Yt().memoizedState}function Ly(){return Yt().memoizedState}function bN(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=Ni();e=Ar(r);var o=Mr(n,e,r);o!==null&&(oi(o,n,r),Es(o,n,r)),n={cache:_f()},e.payload=n;return}n=n.return}}function xN(e,n,r){var o=Ni();r={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},hu(e)?By(n,r):(r=wf(e,n,r,o),r!==null&&(oi(r,e,o),Py(r,n,o)))}function Iy(e,n,r){var o=Ni();Rs(e,n,r,o)}function Rs(e,n,r,o){var f={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(hu(e))By(n,f);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var C=n.lastRenderedState,_=p(C,r);if(f.hasEagerState=!0,f.eagerState=_,ji(_,C))return Vc(e,n,f,0),kt===null&&Fc(),!1}catch{}finally{}if(r=wf(e,n,f,o),r!==null)return oi(r,e,o),Py(r,n,o),!0}return!1}function rh(e,n,r,o){if(o={lane:2,revertLane:Qh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},hu(e)){if(n)throw Error(l(479))}else n=wf(e,r,o,2),n!==null&&oi(n,e,2)}function hu(e){var n=e.alternate;return e===Ke||n!==null&&n===Ke}function By(e,n){yo=lu=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function Py(e,n,r){if((r&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,rn(e,r)}}var mu={readContext:wn,use:cu,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},Hy={readContext:wn,use:cu,useCallback:function(e,n){return $n().memoizedState=[e,n===void 0?null:n],e},useContext:wn,useEffect:wy,useImperativeHandle:function(e,n,r){r=r!=null?r.concat([e]):null,du(4194308,4,Ey.bind(null,n,e),r)},useLayoutEffect:function(e,n){return du(4194308,4,e,n)},useInsertionEffect:function(e,n){du(4,2,e,n)},useMemo:function(e,n){var r=$n();n=n===void 0?null:n;var o=e();if(Nl){zt(!0);try{e()}finally{zt(!1)}}return r.memoizedState=[o,n],o},useReducer:function(e,n,r){var o=$n();if(r!==void 0){var f=r(n);if(Nl){zt(!0);try{r(n)}finally{zt(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=xN.bind(null,Ke,e),[o.memoizedState,e]},useRef:function(e){var n=$n();return e={current:e},n.memoizedState=e},useState:function(e){e=Jf(e);var n=e.queue,r=Iy.bind(null,Ke,n);return n.dispatch=r,[e.memoizedState,r]},useDebugValue:th,useDeferredValue:function(e,n){var r=$n();return nh(r,e,n)},useTransition:function(){var e=Jf(!1);return e=_y.bind(null,Ke,e.queue,!0,!1),$n().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,r){var o=Ke,f=$n();if(et){if(r===void 0)throw Error(l(407));r=r()}else{if(r=n(),kt===null)throw Error(l(349));(rt&127)!==0||oy(o,n,r)}f.memoizedState=r;var p={value:r,getSnapshot:n};return f.queue=p,wy(cy.bind(null,o,p,e),[e]),o.flags|=2048,xo(9,{destroy:void 0},sy.bind(null,o,p,r,n),null),r},useId:function(){var e=$n(),n=kt.identifierPrefix;if(et){var r=ba,o=ya;r=(o&~(1<<32-Vt(o)-1)).toString(32)+r,n="_"+n+"R_"+r,r=ou++,0<r&&(n+="H"+r.toString(32)),n+="_"}else r=hN++,n="_"+n+"r_"+r.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:ah,useFormState:yy,useActionState:yy,useOptimistic:function(e){var n=$n();n.memoizedState=n.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=rh.bind(null,Ke,!0,r),r.dispatch=n,[e,n]},useMemoCache:Qf,useCacheRefresh:function(){return $n().memoizedState=bN.bind(null,Ke)},useEffectEvent:function(e){var n=$n(),r={impl:e};return n.memoizedState=r,function(){if((pt&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},Uy={readContext:wn,use:cu,useCallback:Ay,useContext:wn,useEffect:eh,useImperativeHandle:Ty,useInsertionEffect:Cy,useLayoutEffect:Ny,useMemo:My,useReducer:uu,useRef:Sy,useState:function(){return uu(er)},useDebugValue:th,useDeferredValue:function(e,n){var r=Yt();return Oy(r,jt.memoizedState,e,n)},useTransition:function(){var e=uu(er)[0],n=Yt().memoizedState;return[typeof e=="boolean"?e:_s(e),n]},useSyncExternalStore:ly,useId:zy,useHostTransitionStatus:ah,useFormState:by,useActionState:by,useOptimistic:function(e,n){var r=Yt();return fy(r,jt,e,n)},useMemoCache:Qf,useCacheRefresh:Ly,useEffectEvent:ky},jN={readContext:wn,use:cu,useCallback:Ay,useContext:wn,useEffect:eh,useImperativeHandle:Ty,useInsertionEffect:Cy,useLayoutEffect:Ny,useMemo:My,useReducer:Zf,useRef:Sy,useState:function(){return Zf(er)},useDebugValue:th,useDeferredValue:function(e,n){var r=Yt();return jt===null?nh(r,e,n):Oy(r,jt.memoizedState,e,n)},useTransition:function(){var e=Zf(er)[0],n=Yt().memoizedState;return[typeof e=="boolean"?e:_s(e),n]},useSyncExternalStore:ly,useId:zy,useHostTransitionStatus:ah,useFormState:jy,useActionState:jy,useOptimistic:function(e,n){var r=Yt();return jt!==null?fy(r,jt,e,n):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Qf,useCacheRefresh:Ly,useEffectEvent:ky};function lh(e,n,r,o){n=e.memoizedState,r=r(o,n),r=r==null?n:B({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var oh={enqueueSetState:function(e,n,r){e=e._reactInternals;var o=Ni(),f=Ar(o);f.payload=n,r!=null&&(f.callback=r),n=Mr(e,f,o),n!==null&&(oi(n,e,o),Es(n,e,o))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var o=Ni(),f=Ar(o);f.tag=1,f.payload=n,r!=null&&(f.callback=r),n=Mr(e,f,o),n!==null&&(oi(n,e,o),Es(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=Ni(),o=Ar(r);o.tag=2,n!=null&&(o.callback=n),n=Mr(e,o,r),n!==null&&(oi(n,e,r),Es(n,e,r))}};function qy(e,n,r,o,f,p,C){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,p,C):n.prototype&&n.prototype.isPureReactComponent?!bs(r,o)||!bs(f,p):!0}function Fy(e,n,r,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,o),n.state!==e&&oh.enqueueReplaceState(n,n.state,null)}function El(e,n){var r=n;if("ref"in n){r={};for(var o in n)o!=="ref"&&(r[o]=n[o])}if(e=e.defaultProps){r===n&&(r=B({},r));for(var f in e)r[f]===void 0&&(r[f]=e[f])}return r}function Vy(e){qc(e)}function $y(e){console.error(e)}function Yy(e){qc(e)}function pu(e,n){try{var r=e.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Gy(e,n,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function sh(e,n,r){return r=Ar(r),r.tag=3,r.payload={element:null},r.callback=function(){pu(e,n)},r}function Xy(e){return e=Ar(e),e.tag=3,e}function Qy(e,n,r,o){var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var p=o.value;e.payload=function(){return f(p)},e.callback=function(){Gy(n,r,o)}}var C=r.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){Gy(n,r,o),typeof f!="function"&&(Br===null?Br=new Set([this]):Br.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})})}function SN(e,n,r,o,f){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=r.alternate,n!==null&&bl(n,r,f,!0),r=kn.current,r!==null){switch(r.tag){case 31:case 13:case 19:return zn===null?Lu():r.alternate===null&&Ft===0&&(Ft=3),r.flags&=-257,r.flags|=65536,r.lanes=f,o===tu?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([o]):n.add(o),Yh(e,o,f)),!1;case 22:return r.flags|=65536,o===tu?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([o]):r.add(o)),Yh(e,o,f)),!1}throw Error(l(435,r.tag))}return Yh(e,o,f),Lu(),!1}if(et)return n=kn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Tf&&(e=Error(l(422),{cause:o}),Ss(Di(e,r)))):(o!==Tf&&(n=Error(l(423),{cause:o}),Ss(Di(n,r))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=Di(o,r),f=sh(e.stateNode,o,f),Bf(e,f),Ft!==4&&(Ft=2)),!1;var p=Error(l(520),{cause:o});if(p=Di(p,r),Us===null?Us=[p]:Us.push(p),Ft!==4&&(Ft=2),n===null)return!0;o=Di(o,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,e=f&-f,r.lanes|=e,e=sh(r.stateNode,o,e),Bf(r,e),!1;case 1:if(n=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Br===null||!Br.has(p))))return r.flags|=65536,f&=-f,r.lanes|=f,f=Xy(f),Qy(f,e,r,o),Bf(r,f),!1;break;case 22:if(r.memoizedState!==null)return r.flags|=65536,!1}r=r.return}while(r!==null);return!1}var ch=Error(l(461)),Jt=!1;function on(e,n,r,o){n.child=e===null?Wv(n,null,r,o):Cl(n,e.child,r,o)}function Ky(e,n,r,o,f){r=r.render;var p=n.ref;if("ref"in o){var C={};for(var _ in o)_!=="ref"&&(C[_]=o[_])}else C=o;return xl(n),o=$f(e,n,r,C,p,f),_=Yf(),e!==null&&!Jt?(Gf(e,n,f),tr(e,n,f)):(et&&_&&Xc(n),n.flags|=1,on(e,n,o,f),n.child)}function Zy(e,n,r,o,f){if(e===null){var p=r.type;return typeof p=="function"&&!kf(p)&&p.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=p,Jy(e,n,p,o,f)):(e=Yc(r.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,!vh(e,f)){var C=p.memoizedProps;if(r=r.compare,r=r!==null?r:bs,r(C,o)&&e.ref===n.ref)return tr(e,n,f)}return n.flags|=1,e=Qa(p,o),e.ref=n.ref,e.return=n,n.child=e}function Jy(e,n,r,o,f){if(e!==null){var p=e.memoizedProps;if(bs(p,o)&&e.ref===n.ref)if(Jt=!1,n.pendingProps=o=p,vh(e,f))(e.flags&131072)!==0&&(Jt=!0);else return n.lanes=e.lanes,tr(e,n,f)}return uh(e,n,r,o,f)}function Wy(e,n,r,o){var f=o.children,p=e!==null?e.memoizedState:null;if(e===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|r:r,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~p}else o=0,n.child=null;return e0(e,n,p,r,o)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wc(n,p!==null?p.cachePool:null),p!==null?ny(n,p):Hf(),iy(n);else return o=n.lanes=536870912,e0(e,n,p!==null?p.baseLanes|r:r,r,o)}else p!==null?(Wc(n,p.cachePool),ny(n,p),Rr(),n.memoizedState=null):(e!==null&&Wc(n,null),Hf(),Rr());return on(e,n,f,r),n.child}function Ds(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function e0(e,n,r,o,f){var p=Df();return p=p===null?null:{parent:Kt._currentValue,pool:p},n.memoizedState={baseLanes:r,cachePool:p},e!==null&&Wc(n,null),Hf(),iy(n),e!==null&&bl(e,n,o,!0),n.childLanes=f,null}function gu(e,n){return n=vu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function t0(e,n,r){return Cl(n,e.child,null,r),e=gu(n,n.pendingProps),e.flags|=2,Si(n),n.memoizedState=null,e}function wN(e,n,r){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(et){if(o.mode==="hidden")return e=gu(n,o),n.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Ds(null,e);if(qf(n),(e=Et)?(e=Eb(e,Ii),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:wr!==null?{id:ya,overflow:ba}:null,retryLane:536870912,hydrationErrors:null},r=Bv(e),r.return=n,n.child=r,dn=n,Et=null)):e=null,e===null)throw Cr(n);return n.lanes=536870912,null}return gu(n,o)}var p=e.memoizedState;if(p!==null){var C=p.dehydrated;if(qf(n),f)if(n.flags&256)n.flags&=-257,n=t0(e,n,r);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(l(558));else if(Jt||bl(e,n,r,!1),f=(r&e.childLanes)!==0,Jt||f){if(Or.current===null){if(o=kt,o!==null&&(C=cn(o,r),C!==0&&C!==p.retryLane))throw p.retryLane=C,pl(e,C),oi(o,e,C),ch;Lu()}n=t0(e,n,r)}else e=p.treeContext,Et=Pi(C.nextSibling),dn=n,et=!0,kr=null,Ii=!1,e!==null&&Uv(n,e),n=gu(n,o),n.flags|=134221824;return n}return e=Qa(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function jo(e,n){var r=n.ref;if(r===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(e===null||e.ref!==r)&&(n.flags|=4194816)}}function uh(e,n,r,o,f){return xl(n),r=$f(e,n,r,o,void 0,f),o=Yf(),e!==null&&!Jt?(Gf(e,n,f),tr(e,n,f)):(et&&o&&Xc(n),n.flags|=1,on(e,n,r,f),n.child)}function n0(e,n,r,o,f,p){return xl(n),n.updateQueue=null,r=ry(n,o,r,f),ay(e),o=Yf(),e!==null&&!Jt?(Gf(e,n,p),tr(e,n,p)):(et&&o&&Xc(n),n.flags|=1,on(e,n,r,p),n.child)}function i0(e,n,r,o,f){if(xl(n),n.stateNode===null){var p=uo,C=r.contextType;typeof C=="object"&&C!==null&&(p=wn(C)),p=new r(o,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=oh,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=o,p.state=n.memoizedState,p.refs={},Lf(n),C=r.contextType,p.context=typeof C=="object"&&C!==null?wn(C):uo,p.state=n.memoizedState,C=r.getDerivedStateFromProps,typeof C=="function"&&(lh(n,r,C,o),p.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(C=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),C!==p.state&&oh.enqueueReplaceState(p,p.state,null),As(n,o,p,f),Ts(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){p=n.stateNode;var _=n.memoizedProps,V=El(r,_);p.props=V;var te=p.context,de=r.contextType;C=uo,typeof de=="object"&&de!==null&&(C=wn(de));var ve=r.getDerivedStateFromProps;de=typeof ve=="function"||typeof p.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,de||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(_||te!==C)&&Fy(n,p,o,C),Tr=!1;var J=n.memoizedState;p.state=J,As(n,o,p,f),Ts(),te=n.memoizedState,_||J!==te||Tr?(typeof ve=="function"&&(lh(n,r,ve,o),te=n.memoizedState),(V=Tr||qy(n,r,V,o,J,te,C))?(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=te),p.props=o,p.state=te,p.context=C,o=V):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{p=n.stateNode,If(e,n),C=n.memoizedProps,de=El(r,C),p.props=de,ve=n.pendingProps,J=p.context,te=r.contextType,V=uo,typeof te=="object"&&te!==null&&(V=wn(te)),_=r.getDerivedStateFromProps,(te=typeof _=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(C!==ve||J!==V)&&Fy(n,p,o,V),Tr=!1,J=n.memoizedState,p.state=J,As(n,o,p,f),Ts();var oe=n.memoizedState;C!==ve||J!==oe||Tr||e!==null&&e.dependencies!==null&&Zc(e.dependencies)?(typeof _=="function"&&(lh(n,r,_,o),oe=n.memoizedState),(de=Tr||qy(n,r,de,o,J,oe,V)||e!==null&&e.dependencies!==null&&Zc(e.dependencies))?(te||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,oe,V),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,oe,V)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||C===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=oe),p.props=o,p.state=oe,p.context=V,o=de):(typeof p.componentDidUpdate!="function"||C===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),o=!1)}return p=o,jo(e,n),o=(n.flags&128)!==0,p||o?(p=n.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,e!==null&&o?(n.child=Cl(n,e.child,null,f),n.child=Cl(n,null,r,f)):on(e,n,r,f),n.memoizedState=p.state,e=n.child):e=tr(e,n,f),e}function a0(e,n,r,o){return vl(),n.flags|=256,on(e,n,r,o),n.child}var dh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fh(e){return{baseLanes:e,cachePool:Gv()}}function hh(e,n,r){return e=e!==null?e.childLanes&~r:0,n&&(e|=Ci),e}function r0(e,n,r){var o=n.pendingProps,f=!1,p=(n.flags&128)!==0,C;if((C=p)||(C=e!==null&&e.memoizedState===null?!1:(Cn.current&2)!==0),C&&(f=!0,n.flags&=-129),C=(n.flags&32)!==0,n.flags&=-33,e===null){if(et){if(f?_r(n):Rr(),(e=Et)?(e=Eb(e,Ii),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:wr!==null?{id:ya,overflow:ba}:null,retryLane:536870912,hydrationErrors:null},r=Bv(e),r.return=n,n.child=r,dn=n,Et=null)):e=null,e===null)throw Cr(n);return fm(e)?n.lanes=32:n.lanes=536870912,null}return p=o.children,o=o.fallback,f?(Rr(),f=n.mode,p=vu({mode:"hidden",children:p},f),o=gl(o,f,r,null),p.return=n,o.return=n,p.sibling=o,n.child=p,o=n.child,o.memoizedState=fh(r),o.childLanes=hh(e,C,r),n.memoizedState=dh,Ds(null,o)):(_r(n),mh(n,p))}var _=e.memoizedState;if(_!==null){var V=_.dehydrated;if(V!==null)return kN(e,n,p,C,o,V,_,r)}return f?(Rr(),f=o.fallback,p=n.mode,_=e.child,V=_.sibling,o=Qa(_,{mode:"hidden",children:o.children}),o.subtreeFlags=_.subtreeFlags&1206910976,V!==null?f=Qa(V,f):(f=gl(f,p,r,null),f.flags|=2),f.return=n,o.return=n,o.sibling=f,n.child=o,Ds(null,o),o=n.child,f=e.child.memoizedState,f===null?f=fh(r):(p=f.cachePool,p!==null?(_=Kt._currentValue,p=p.parent!==_?{parent:_,pool:_}:p):p=Gv(),f={baseLanes:f.baseLanes|r,cachePool:p}),o.memoizedState=f,o.childLanes=hh(e,C,r),n.memoizedState=dh,Ds(e.child,o)):(_r(n),r=e.child,e=r.sibling,r=Qa(r,{mode:"visible",children:o.children}),r.return=n,r.sibling=null,e!==null&&(C=n.deletions,C===null?(n.deletions=[e],n.flags|=16):C.push(e)),n.child=r,n.memoizedState=null,r)}function mh(e,n){return n=vu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function vu(e,n){return e=ii(22,e,null,n),e.lanes=0,e}function yu(e,n,r){return Cl(n,e.child,null,r),e=mh(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function kN(e,n,r,o,f,p,C,_){if(r)return n.flags&256?(_r(n),n.flags&=-257,yu(e,n,_)):n.memoizedState!==null?(Rr(),n.child=e.child,n.flags|=128,null):(Rr(),p=f.fallback,C=n.mode,f=vu({mode:"visible",children:f.children},C),p=gl(p,C,_,null),p.flags|=2,f.return=n,p.return=n,f.sibling=p,n.child=f,Cl(n,e.child,null,_),f=n.child,f.memoizedState=fh(_),f.childLanes=hh(e,o,_),n.memoizedState=dh,Ds(null,f));if(_r(n),fm(p)){if(o=p.nextSibling&&p.nextSibling.dataset,o)var V=o.dgst;return o=V,o!==""&&(f=Error(l(419)),f.stack="",f.digest=o,Ss({value:f,source:null,stack:null})),yu(e,n,_)}if(Jt||bl(e,n,_,!1),o=(_&e.childLanes)!==0,Jt||o){if(Or.current!==null)return yu(e,n,_);if(o=kt,o!==null&&(f=cn(o,_),f!==0&&f!==C.retryLane))throw C.retryLane=f,pl(e,f),oi(o,e,f),ch;return dm(p)||Lu(),yu(e,n,_)}return dm(p)?(n.flags|=192,n.child=e.child,null):(e=C.treeContext,Et=Pi(p.nextSibling),dn=n,et=!0,kr=null,Ii=!1,e!==null&&Uv(n,e),n=mh(n,f.children),n.flags|=134221824,n)}function l0(e,n,r){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Kc(e.return,n,r)}function o0(e){for(var n=null;e!==null;){var r=e.alternate;r!==null&&ru(r)===null&&(n=e),e=e.sibling}return n}function bu(e,n,r,o,f,p){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:f,treeForkCount:p}:(C.isBackwards=n,C.rendering=null,C.renderingStartTime=0,C.last=o,C.tail=r,C.tailMode=f,C.treeForkCount=p)}function ph(e){var n=e.child;for(e.child=null;n!==null;){var r=n.sibling;n.sibling=e.child,e.child=n,n=r}}function gh(e,n,r){var o=n.pendingProps,f=o.revealOrder,p=o.tail;o=o.children;var C=Cn.current;if(n.flags&128)return Ms(n,C),null;var _=(C&2)!==0;if(_?(C=C&1|2,n.flags|=128):C&=1,Ms(n,C),f==="backwards"&&e!==null?(ph(e),on(e,n,o,r),ph(e)):on(e,n,o,r),o=et?js:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&l0(e,r,n);else if(e.tag===19)l0(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"backwards":r=o0(n.child),r===null?(f=n.child,n.child=null):(f=r.sibling,r.sibling=null,ph(n)),bu(n,!0,f,null,p,o);break;case"unstable_legacy-backwards":for(r=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&ru(e)===null){n.child=f;break}e=f.sibling,f.sibling=r,r=f,f=e}bu(n,!0,r,null,p,o);break;case"together":bu(n,!1,null,null,void 0,o);break;case"independent":n.memoizedState=null;break;default:r=o0(n.child),r===null?(f=n.child,n.child=null):(f=r.sibling,r.sibling=null),bu(n,!1,f,r,p,o)}return n.child}function s0(e,n,r){var o=n.pendingProps;return Nr(n,n.type,o.value),on(e,n,o.children,r),n.child}function tr(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),Ir|=n.lanes,(r&n.childLanes)===0)if(e!==null){if(bl(e,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(l(153));if(n.child!==null){for(e=n.child,r=Qa(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=Qa(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function vh(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Zc(e)))}function CN(e,n,r){switch(n.tag){case 3:di(n,n.stateNode.containerInfo),Nr(n,Kt,e.memoizedState.cache),vl();break;case 27:case 5:Yi(n);break;case 4:di(n,n.stateNode.containerInfo);break;case 10:Nr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,qf(n),null;break;case 13:var o=n.memoizedState;if(o!==null){if(o.dehydrated!==null)return _r(n),n.flags|=128,null;o=bl(e,n,r,!1);var f=n.child.childLanes;return o||(r&f)!==0?r0(e,n,r):(_r(n),e=tr(e,n,r),e!==null?e.sibling:null)}_r(n);break;case 19:if(n.flags&128)return gh(e,n,r);if(f=(e.flags&128)!==0,o=(r&n.childLanes)!==0,o||(bl(e,n,r,!1),o=(r&n.childLanes)!==0),f){if(o)return gh(e,n,r);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Ms(n,Cn.current),o)break;return null;case 22:return n.lanes=0,Wy(e,n,r,n.pendingProps);case 24:Nr(n,Kt,e.memoizedState.cache)}return tr(e,n,r)}function c0(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps)Jt=!0;else{if(!vh(e,r)&&(n.flags&128)===0)return Jt=!1,CN(e,n,r);Jt=(e.flags&131072)!==0}else Jt=!1,et&&(n.flags&1048576)!==0&&Hv(n,js,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=wl(n.elementType),n.type=e,typeof e=="function")kf(e)?(o=El(e,o),n.tag=1,n=i0(null,n,e,o,r)):(n.tag=0,n=uh(null,n,e,o,r));else{if(e!=null){var f=e.$$typeof;if(f===G){n.tag=11,n=Ky(null,n,e,o,r);break e}else if(f===W){n.tag=14,n=Zy(null,n,e,o,r);break e}else if(f===U){n.tag=10,n.type=e,n=s0(null,n,r);break e}}throw n=be(e)||e,Error(l(306,n,""))}}return n;case 0:return uh(e,n,n.type,n.pendingProps,r);case 1:return o=n.type,f=El(o,n.pendingProps),i0(e,n,o,f,r);case 3:e:{if(di(n,n.stateNode.containerInfo),e===null)throw Error(l(387));o=n.pendingProps;var p=n.memoizedState;f=p.element,If(e,n),As(n,o,null,r);var C=n.memoizedState;if(o=C.cache,Nr(n,Kt,o),o!==p.cache&&Of(n,[Kt],r,!0),Ts(),o=C.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:C.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=a0(e,n,o,r);break e}else if(o!==f){f=Di(Error(l(424)),n),Ss(f),n=a0(e,n,o,r);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Et=Pi(e.firstChild),dn=n,et=!0,kr=null,Ii=!0,r=Wv(n,null,o,r),n.child=r;r;)r.flags=r.flags&-3|134221824,r=r.sibling}else{if(vl(),o===f){n=tr(e,n,r);break e}on(e,n,o,r)}n=n.child}return n;case 26:return jo(e,n),e===null?(r=Db(n.type,null,n.pendingProps,null))?n.memoizedState=r:et||(n.stateNode=hb(n.type,n.pendingProps,vn.current,n)):n.memoizedState=Db(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Yi(n),e===null&&et&&(o=n.stateNode=Mb(n.type,n.pendingProps,vn.current),dn=n,Ii=!0,f=Et,Ur(n.type)?(hm=f,Et=Pi(o.firstChild)):Et=f),on(e,n,n.pendingProps.children,r),jo(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&et&&((f=o=Et)&&(o=bE(o,n.type,n.pendingProps,Ii),o!==null?(n.stateNode=o,dn=n,Et=Pi(o.firstChild),Ii=!1,f=!0):f=!1),f||Cr(n)),Yi(n),f=n.type,p=n.pendingProps,C=e!==null?e.memoizedProps:null,o=p.children,am(f,p)?o=null:C!==null&&am(f,C)&&(n.flags|=32),n.memoizedState!==null&&(f=$f(e,n,mN,null,null,r),Po._currentValue=f),jo(e,n),on(e,n,o,r),n.child;case 6:return e===null&&et&&((e=r=Et)&&(r=xE(r,n.pendingProps,Ii),r!==null?(n.stateNode=r,dn=n,Et=null,e=!0):e=!1),e||Cr(n)),null;case 13:return r0(e,n,r);case 4:return di(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Cl(n,null,o,r):on(e,n,o,r),n.child;case 11:return Ky(e,n,n.type,n.pendingProps,r);case 7:return o=n.pendingProps,jo(e,n),on(e,n,o,r),n.child;case 8:return on(e,n,n.pendingProps.children,r),n.child;case 12:return on(e,n,n.pendingProps.children,r),n.child;case 10:return s0(e,n,r);case 9:return f=n.type._context,o=n.pendingProps.children,xl(n),f=wn(f),o=o(f),n.flags|=1,on(e,n,o,r),n.child;case 14:return Zy(e,n,n.type,n.pendingProps,r);case 15:return Jy(e,n,n.type,n.pendingProps,r);case 19:return gh(e,n,r);case 31:return wN(e,n,r);case 22:return Wy(e,n,r,n.pendingProps);case 24:return xl(n),o=wn(Kt),e===null?(f=Df(),f===null&&(f=kt,p=_f(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=r),f=p),n.memoizedState={parent:o,cache:f},Lf(n),Nr(n,Kt,f)):((e.lanes&r)!==0&&(If(e,n),As(n,null,null,r),Ts()),f=e.memoizedState,p=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Nr(n,Kt,o)):(o=p.cache,Nr(n,Kt,o),o!==f.cache&&Of(n,[Kt],r,!0))),on(e,n,n.pendingProps.children,r),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|=e===null?18882560:18874368:et&&Xc(n),e!==null&&e.memoizedProps.name!==o.name?n.flags|=4194816:jo(e,n),on(e,n,o.children,r),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function nr(e){e.flags|=4}function yh(e,n,r,o,f){var p;if((p=(e.mode&32)!==0)&&(p=r===null?Bb(n,o):Bb(n,o)&&(o.src!==r.src||o.srcSet!==r.srcSet)),p){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(V0())e.flags|=8192;else throw kl=tu,zf}else e.flags&=-16777217}function u0(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pb(n))if(V0())e.flags|=8192;else throw kl=tu,zf}function xu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?gi():536870912,e.lanes|=n,No|=n)}function zs(e,n){if(!et)switch(e.tailMode){case"visible":break;case"collapsed":for(var r=e.tail,o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null;break;default:for(n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null}}function Tt(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(n)for(var f=e.child;f!==null;)r|=f.lanes|f.childLanes,o|=f.subtreeFlags&1206910976,o|=f.flags&1206910976,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)r|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=r,n}function NN(e,n,r){var o=n.pendingProps;switch(Ef(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 r=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Ja(Kt),an(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(mo(n)?nr(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Af())),Tt(n),null;case 26:var f=n.type,p=n.memoizedState;return e===null?(nr(n),p!==null?(Tt(n),u0(n,p)):(Tt(n),yh(n,f,null,o,r))):p?p!==e.memoizedState?(nr(n),Tt(n),u0(n,p)):(Tt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&nr(n),Tt(n),yh(n,f,e,o,r)),null;case 27:if(pe(n),r=vn.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&nr(n);else{if(!o){if(n.stateNode===null)throw Error(l(166));return Tt(n),n.subtreeFlags&=-33554433,null}e=At.current,mo(n)?qv(n):(e=Mb(f,o,r),n.stateNode=e,nr(n))}return Tt(n),n.subtreeFlags&=-33554433,null;case 5:if(pe(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&nr(n);else{if(!o){if(n.stateNode===null)throw Error(l(166));return Tt(n),n.subtreeFlags&=-33554433,null}if(p=At.current,mo(n))qv(n);else{var C=Ys(vn.current);switch(p){case 1:p=C.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:p=C.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":p=C.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":p=C.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":p=C.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?C.createElement("select",{is:o.is}):C.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?C.createElement(f,{is:o.is}):C.createElement(f)}}p[Mt]=n,p[$t]=o;e:for(C=n.child;C!==null;){if(C.tag===5||C.tag===6)p.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===n)break e;for(;C.sibling===null;){if(C.return===null||C.return===n)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}n.stateNode=p;e:switch(En(p,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&nr(n)}}return Tt(n),n.subtreeFlags&=-33554433,yh(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,r),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&nr(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(l(166));if(e=vn.current,mo(n)){if(e=n.stateNode,r=n.memoizedProps,o=null,f=dn,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[Mt]=n,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||cb(e.nodeValue,r)),e||Cr(n,!0)}else e=Ys(e).createTextNode(o),e[Mt]=n,n.stateNode=e}return Tt(n),null;case 31:if(r=n.memoizedState,e===null||e.memoizedState!==null){if(o=mo(n),r!==null){if(e===null){if(!o)throw Error(l(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Mt]=n}else vl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),e=!1}else r=Af(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return n.flags&256?(Si(n),n):(Si(n),null);if((n.flags&128)!==0)throw Error(l(558))}return Tt(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=mo(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[Mt]=n}else vl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),f=!1}else f=Af(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(Si(n),n):(Si(n),null)}return Si(n),(n.flags&128)!==0?(n.lanes=r,n):(r=o!==null,e=e!==null&&e.memoizedState!==null,r&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==f&&(o.flags|=2048)),r!==e&&r&&(n.child.flags|=8192),xu(n,n.updateQueue),Tt(n),null);case 4:return an(),e===null&&Wh(n.stateNode.containerInfo),n.flags|=67108864,Tt(n),null;case 10:return Ja(n.type),Tt(n),null;case 19:if(Ff(n),o=n.memoizedState,o===null)return Tt(n),null;if(f=(n.flags&128)!==0,p=o.rendering,p===null)if(f)zs(o,!1);else{if(Ft!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(p=ru(e),p!==null){for(n.flags|=128,zs(o,!1),e=p.updateQueue,n.updateQueue=e,xu(n,e),n.subtreeFlags=0,e=r,r=n.child;r!==null;)Iv(r,e),r=r.sibling;return Ms(n,Cn.current&1|2),et&&Ka(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&Gt()>_u&&(n.flags|=128,f=!0,zs(o,!1),n.lanes=4194304)}else{if(!f)if(e=ru(p),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,xu(n,e),zs(o,!0),o.tail===null&&o.tailMode!=="collapsed"&&o.tailMode!=="visible"&&!p.alternate&&!et)return Tt(n),null}else 2*Gt()-o.renderingStartTime>_u&&r!==536870912&&(n.flags|=128,f=!0,zs(o,!1),n.lanes=4194304);o.isBackwards?(p.sibling=n.child,n.child=p):(e=o.last,e!==null?e.sibling=p:n.child=p,o.last=p)}if(o.tail!==null){e=o.tail;e:{for(r=e;r!==null;){if(r.alternate!==null){r=!1;break e}r=r.sibling}r=!0}return o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Gt(),e.sibling=null,p=Cn.current,p=f?p&1|2:p&1,o.tailMode==="visible"||o.tailMode==="collapsed"||!r||et?Ms(n,p):(r=p,Je(kn,n),Je(Cn,r),zn===null&&(zn=n)),et&&Ka(n,o.treeForkCount),e}return Tt(n),null;case 22:case 23:return Si(n),Uf(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(r&536870912)!==0&&(n.flags&128)===0&&(Tt(n),n.subtreeFlags&6&&(n.flags|=8192)):Tt(n),r=n.updateQueue,r!==null&&xu(n,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048),e!==null&&ot(Sl),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Ja(Kt),Tt(n),null;case 25:return null;case 30:return n.flags|=33554432,Tt(n),null}throw Error(l(156,n.tag))}function EN(e,n){switch(Ef(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ja(Kt),an(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return pe(n),null;case 31:if(n.memoizedState!==null){if(Si(n),n.alternate===null)throw Error(l(340));vl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Si(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(l(340));vl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ff(n),e=n.flags,e&65536?(n.flags=e&-65537|128,e=n.memoizedState,e!==null&&(e.rendering=null,e.tail=null),n.flags|=4,n):null;case 4:return an(),null;case 10:return Ja(n.type),null;case 22:case 23:return Si(n),Uf(),e!==null&&ot(Sl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Ja(Kt),null;case 25:return null;default:return null}}function d0(e,n){switch(Ef(n),n.tag){case 3:Ja(Kt),an();break;case 26:case 27:case 5:pe(n);break;case 4:an();break;case 31:n.memoizedState!==null&&Si(n);break;case 13:Si(n);break;case 19:Ff(n);break;case 10:Ja(n.type);break;case 22:case 23:Si(n),Uf(),e!==null&&ot(Sl);break;case 24:Ja(Kt)}}function Ls(e,n){try{var r=n.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var f=o.next;r=f;do{if((r.tag&e)===e){o=void 0;var p=r.create,C=r.inst;o=p(),C.destroy=o}r=r.next}while(r!==f)}}catch(_){yt(n,n.return,_)}}function Dr(e,n,r){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var p=f.next;o=p;do{if((o.tag&e)===e){var C=o.inst,_=C.destroy;if(_!==void 0){C.destroy=void 0,f=n;var V=r,te=_;try{te()}catch(de){yt(f,V,de)}}}o=o.next}while(o!==p)}}catch(de){yt(n,n.return,de)}}function f0(e){var n=e.updateQueue;if(n!==null){var r=e.stateNode;try{ty(n,r)}catch(o){yt(e,e.return,o)}}}function h0(e,n,r){r.props=El(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){yt(e,n,o)}}function xa(e,n){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:var f=e.stateNode,p=Ga(e.memoizedProps,f);(f.ref===null||f.ref.name!==p)&&(f.ref=xb(p)),o=f.ref;break;case 7:if(e.stateNode===null){var C=new Ei(e);g(e.child,!1,vE,C,void 0,void 0),e.stateNode=C}o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(_){yt(e,n,_)}}function Nn(e,n){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(f){yt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(f){yt(e,n,f)}else r.current=null}function ju(e,n){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&n!==null)for(var r=0;r<n.length;r++)Nb(e.stateNode,n[r])}function m0(e){for(var n=e.return;n!==null&&(xh(n)&&Nb(e.stateNode,n.stateNode),!bh(n));)n=n.return}function Is(e){for(var n=e.return;n!==null&&(xh(n)&&yE(e.stateNode,n.stateNode),!bh(n));)n=n.return}function bh(e){return e.tag===5||e.tag===3||e.tag===27}function xh(e){return e&&e.tag===7&&e.stateNode!==null}function jh(e){var n=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(f){yt(e,e.return,f)}}function Sh(e,n,r){try{var o=e.stateNode;WN(o,e.type,r,n),o[$t]=n}catch(f){yt(e,e.return,f)}}function p0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ur(e.type)||e.tag===4}function wh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||p0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ur(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kh(e,n,r,o){var f=e.tag;if(f===5||f===6)f=e.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(f,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(f),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=Fn)),ju(e,o),Pe=!0;else if(f!==4&&(f===27&&(ju(e,o),o=null,Ur(e.type)&&(r=e.stateNode,n=null)),e=e.child,e!==null))for(kh(e,n,r,o),e=e.sibling;e!==null;)kh(e,n,r,o),e=e.sibling}function Su(e,n,r,o){var f=e.tag;if(f===5||f===6)f=e.stateNode,n?r.insertBefore(f,n):r.appendChild(f),ju(e,o),Pe=!0;else if(f!==4&&(f===27&&(ju(e,o),o=null,Ur(e.type)&&(r=e.stateNode)),e=e.child,e!==null))for(Su(e,n,r,o),e=e.sibling;e!==null;)Su(e,n,r,o),e=e.sibling}function g0(e){var n=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);En(n,o,r),n[Mt]=e,n[$t]=r}catch(p){yt(e,e.return,p)}}var wu=!1,wi=null;function v0(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(wu=!0)}var ja=null;function y0(){var e=ja;return ja=null,e}var ai=0;function So(e,n,r,o,f){return ai=0,b0(e.child,n,r,o,f)}function b0(e,n,r,o,f){for(var p=!1;e!==null;){if(e.tag===5){var C=e.stateNode;if(o!==null){var _=om(C);o.push(_),_.view&&(p=!0)}else p||om(C).view&&(p=!0);wu=!0,yb(C,ai===0?n:n+"_"+ai,r),ai++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&f||b0(e.child,n,r,o,f)&&(p=!0));e=e.sibling}return p}function Sa(e,n){for(;e!==null;)e.tag===5?bb(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&n||Sa(e.child,n)),e=e.sibling}function ku(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ku(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var n=e.memoizedProps;if(n.name==null||n.name==="auto")throw Error(l(544));var r=n.name;n=Xa(n.default,n.share),n!=="none"&&(So(e,r,n,null,!1)||Sa(e.child,!1))}e=e.sibling}}function Ch(e,n){if(e.tag===30){var r=e.stateNode,o=e.memoizedProps,f=Ga(o,r),p=Xa(o.default,r.paired?o.share:o.enter);p!=="none"?So(e,f,p,null,!1)?(ku(e),r.paired||n||Mo(e,o.onEnter)):Sa(e.child,!1):ku(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ch(e,n),e=e.sibling;else ku(e)}function Nh(e){if(wi!==null&&wi.size!==0){var n=wi;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var r=e.memoizedProps,o=r.name;if(o!=null&&o!=="auto"){var f=n.get(o);if(f!==void 0){var p=Xa(r.default,r.share);if(p!=="none"&&(So(e,o,p,null,!1)?(p=e.stateNode,f.paired=p,p.paired=f,Mo(e,r.onShare)):Sa(e.child,!1)),n.delete(o),n.size===0)break}}}Nh(e)}e=e.sibling}}}function Eh(e){if(e.tag===30){var n=e.memoizedProps,r=Ga(n,e.stateNode),o=wi!==null?wi.get(r):void 0,f=Xa(n.default,o!==void 0?n.share:n.exit);f!=="none"&&(So(e,r,f,null,!1)?o!==void 0?(f=e.stateNode,o.paired=f,f.paired=o,wi.delete(r),Mo(e,n.onShare)):Mo(e,n.onExit):Sa(e.child,!1)),wi!==null&&Nh(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Eh(e),e=e.sibling;else wi!==null&&Nh(e)}function x0(e){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=Ga(n,e.stateNode);n=Xa(n.default,n.update),e.flags&=-5,n!=="none"&&So(e,r,n,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&x0(e);e=e.sibling}}function Th(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.stateNode;n.paired!==null&&(n.paired=null,Sa(e.child,!1))}Th(e)}e=e.sibling}}function Cu(e){if(e.tag===30)e.stateNode.paired=null,Sa(e.child,!1),Th(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Cu(e),e=e.sibling;else Th(e)}function j0(e){for(e=e.child;e!==null;)e.tag===30?Sa(e.child,!1):(e.subtreeFlags&33554432)!==0&&j0(e),e=e.sibling}function Ah(e,n,r,o,f,p,C){for(var _=!1;n!==null;){if(n.tag===5){var V=n.stateNode;if(p!==null&&ai<p.length){var te=p[ai],de=om(V);(te.view||de.view)&&(_=!0);var ve;if(ve=(e.flags&4)===0)if(de.clip)ve=!0;else{ve=te.rect;var J=de.rect;ve=ve.y!==J.y||ve.x!==J.x||ve.height!==J.height||ve.width!==J.width}ve&&(e.flags|=4),de.abs?de=!te.abs:(te=te.rect,de=de.rect,de=te.height!==de.height||te.width!==de.width),de&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&yb(V,ai===0?r:r+"_"+ai,f),_&&(e.flags&4)!==0||(ja===null&&(ja=[]),ja.push(V,ai===0?o:o+"_"+ai,n.memoizedProps)),ai++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&C?e.flags|=n.flags&32:Ah(e,n.child,r,o,f,p,C)&&(_=!0));n=n.sibling}return _}function S0(e,n){for(e=e.child;e!==null;){if(e.tag===30){var r=e.memoizedProps,o=e.stateNode,f=Ga(r,o),p=Xa(r.default,r.update),C;C=e.memoizedState,e.memoizedState=null,o=e;var _=e.child;ai=0,f=Ah(o,_,f,f,p,C,!1),(e.flags&4)!==0&&f&&Mo(e,r.onUpdate)}else(e.subtreeFlags&33554432)!==0&&S0(e);e=e.sibling}}var fn=!1,gt=!1,wa=!1,Mh=!1,w0=typeof WeakSet=="function"?WeakSet:Set,hn=null,ka=!1,Bs=!1,Nu=!1,Oh=!1;function TN(e,n,r){if(e=e.containerInfo,nm=Ho,e=Ev(e),vf(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var f=o.getSelection&&o.getSelection();if(f&&f.rangeCount!==0){o=f.anchorNode;var p=f.anchorOffset,C=f.focusNode;f=f.focusOffset;try{o.nodeType,C.nodeType}catch{o=null;break e}var _=0,V=-1,te=-1,de=0,ve=0,J=e,oe=null;t:for(;;){for(var Ce;J!==o||p!==0&&J.nodeType!==3||(V=_+p),J!==C||f!==0&&J.nodeType!==3||(te=_+f),J.nodeType===3&&(_+=J.nodeValue.length),(Ce=J.firstChild)!==null;)oe=J,J=Ce;for(;;){if(J===e)break t;if(oe===o&&++de===p&&(V=_),oe===C&&++ve===f&&(te=_),(Ce=J.nextSibling)!==null)break;J=oe,oe=J.parentNode}J=Ce}o=V===-1||te===-1?null:{start:V,end:te}}else o=null}o=o||{start:0,end:0}}else o=null;for(im={focusedElem:e,selectionRange:o},Ho=!1,r=(r&335544064)===r,hn=n,n=r?9270:1024;hn!==null;){if(e=hn,r&&(o=e.deletions,o!==null))for(p=0;p<o.length;p++)r&&Eh(o[p]);if(e.alternate===null&&(e.flags&2)!==0)r&&v0(e),Eu(r);else{if(e.tag===22){if(o=e.alternate,e.memoizedState!==null){o!==null&&o.memoizedState===null&&r&&Eh(o),Eu(r);continue}else if(o!==null&&o.memoizedState!==null){r&&v0(e),Eu(r);continue}}o=e.child,(e.subtreeFlags&n)!==0&&o!==null?(o.return=e,hn=o):(r&&x0(e),Eu(r))}}wi=null}function Eu(e){for(;hn!==null;){var n=hn,r=e,o=n.alternate,f=n.flags;switch(n.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&o!==null){r=void 0,f=o.memoizedProps,o=o.memoizedState;var p=n.stateNode;try{var C=El(n.type,f);r=p.getSnapshotBeforeUpdate(C,o),p.__reactInternalSnapshotBeforeUpdate=r}catch(_){yt(n,n.return,_)}}break;case 3:if((f&1024)!==0){if(o=n.stateNode.containerInfo,r=o.nodeType,r===9)um(o);else if(r===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":um(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:r&&o!==null&&(r=Ga(o.memoizedProps,o.stateNode),f=n.memoizedProps,f=Xa(f.default,f.update),f!=="none"&&So(o,r,f,o.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(l(163))}if(o=n.sibling,o!==null){o.return=n.return,hn=o;break}hn=n.return}}function k0(e,n,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:Ca(e,r),o&4&&Ls(5,r);break;case 1:if(Ca(e,r),o&4)if(e=r.stateNode,n===null)try{e.componentDidMount()}catch(C){yt(r,r.return,C)}else{var f=El(r.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(C){yt(r,r.return,C)}}o&64&&f0(r),o&512&&xa(r,r.return);break;case 3:if(Ca(e,r),o&64&&(e=r.updateQueue,e!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{ty(e,n)}catch(C){yt(r,r.return,C)}}break;case 27:n===null&&o&4&&g0(r);case 26:case 5:Ca(e,r),n===null&&o&4&&jh(r),o&512&&xa(r,r.return);break;case 12:Ca(e,r);break;case 31:Ca(e,r),o&4&&T0(e,r);break;case 13:Ca(e,r),o&4&&A0(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=HN.bind(null,r),jE(e,r))));break;case 22:if(o=r.memoizedState!==null||fn,!o){var p=n!==null&&n.memoizedState!==null||gt;n=fn,f=gt,fn=o,(gt=p)&&!f?(o=2,(r.subtreeFlags&8772)!==0&&(o|=1),ea(e,r,o)):Ca(e,r),fn=n,gt=f}break;case 30:Ca(e,r),o&512&&xa(r,r.return);break;case 7:o&512&&xa(r,r.return);default:Ca(e,r)}}function _h(e,n){for(e=e.child;e!==null;)C0(e,n),e=e.sibling}function C0(e,n){switch(e.tag){case 5:case 26:try{var r=e.stateNode;if(n){var o=r.style;typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"}else{var f=e.stateNode,p=e.memoizedProps.style,C=p!=null&&p.hasOwnProperty("display")?p.display:null;f.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}}catch(V){yt(e,e.return,V)}Rh(e,n);break;case 6:try{e.stateNode.nodeValue=n?"":e.memoizedProps,Pe=!0}catch(V){yt(e,e.return,V)}break;case 18:try{var _=e.stateNode;n?vb(_,!0):vb(e.stateNode,!1)}catch(V){yt(e,e.return,V)}break;case 22:case 23:e.memoizedState===null&&_h(e,n);break;default:_h(e,n)}}function Rh(e,n){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var r=e,o=n;switch(r.tag){case 4:C0(r,o);break e;case 22:r.memoizedState===null&&Rh(r,o);break e;default:Rh(r,o)}}e=e.sibling}}function N0(e){var n=e.alternate;n!==null&&(e.alternate=null,N0(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Va(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Rt=null,ri=!1;function Ji(e,n,r){for(r=r.child;r!==null;)E0(e,n,r),r=r.sibling}function E0(e,n,r){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Gi,r)}catch{}switch(r.tag){case 26:gt||Nn(r,n),Ji(e,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&!gt&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:gt||Nn(r,n),Is(r);var o=Rt,f=ri;Ur(r.type)&&(Rt=r.stateNode,ri=!1),Ji(e,n,r),Ob(r.stateNode,r.type,r.memoizedProps),Rt=o,ri=f;break;case 5:gt||Nn(r,n),Is(r);case 6:if(r.tag===6&&Is(r),o=Rt,f=ri,Rt=null,Ji(e,n,r),Rt=o,ri=f,Rt!==null)if(ri)try{(Rt.nodeType===9?Rt.body:Rt.nodeName==="HTML"?Rt.ownerDocument.body:Rt).removeChild(r.stateNode),Pe=!0}catch(p){yt(r,n,p)}else try{Rt.removeChild(r.stateNode),Pe=!0}catch(p){yt(r,n,p)}break;case 18:Rt!==null&&(ri?(e=Rt,gb(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Uo(e)):gb(Rt,r.stateNode));break;case 4:o=Rt,f=ri,Rt=r.stateNode.containerInfo,ri=!0,Ji(e,n,r),Rt=o,ri=f;break;case 0:case 11:case 14:case 15:Dr(2,r,n),gt||Dr(4,r,n),Ji(e,n,r);break;case 1:gt||(Nn(r,n),o=r.stateNode,typeof o.componentWillUnmount=="function"&&h0(r,n,o)),Ji(e,n,r);break;case 21:Ji(e,n,r);break;case 22:gt=(o=gt)||r.memoizedState!==null,Ji(e,n,r),gt=o;break;case 30:Nn(r,n),Ji(e,n,r);break;case 7:gt||Nn(r,n),Ji(e,n,r);break;default:Ji(e,n,r)}}function T0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Uo(e)}catch(r){yt(n,n.return,r)}}}function A0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Uo(e)}catch(r){yt(n,n.return,r)}}function AN(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new w0),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new w0),n;default:throw Error(l(435,e.tag))}}function Tu(e,n){var r=AN(e);n.forEach(function(o){if(!r.has(o)){r.add(o);var f=UN.bind(null,e,o);o.then(f,f)}})}function Yn(e,n,r){var o=n.deletions;if(o!==null)for(var f=0;f<o.length;f++){var p=o[f],C=e,_=n,V=_;e:for(;V!==null;){switch(V.tag){case 27:if(Ur(V.type)){Rt=V.stateNode,ri=!1;break e}break;case 5:Rt=V.stateNode,ri=!1;break e;case 3:case 4:Rt=V.stateNode.containerInfo,ri=!0;break e}V=V.return}if(Rt===null)throw Error(l(160));E0(C,_,p),Rt=null,ri=!1,C=p.alternate,C!==null&&(C.return=null),p.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)M0(n,e,r),n=n.sibling}var Wi=null;function M0(e,n,r){var o=e.alternate,f=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(f&4&&(o=e.updateQueue,o=o!==null?o.events:null,o!==null))for(var p=0;p<o.length;p++){var C=o[p];C.ref.impl=C.nextImpl}Yn(n,e,r),Gn(e),f&4&&(Dr(3,e,e.return),Ls(3,e),Dr(5,e,e.return));break;case 1:Yn(n,e,r),Gn(e),f&512&&(gt||o===null||Nn(o,o.return)),f&64&&fn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?n:r.concat(n))));break;case 26:if(p=Wi,Yn(n,e,r),Gn(e),f&512&&(gt||o===null||Nn(o,o.return)),f&4)if(f=o!==null?o.memoizedState:null,r=e.memoizedState,o===null)if(r===null)if(e.stateNode===null)if(fn)e.stateNode=hb(e.type,e.memoizedProps,n.containerInfo,e);else{e:{n=e.type,r=e.memoizedProps,f=p.ownerDocument||p;t:switch(n){case"title":o=f.getElementsByTagName("title")[0],(!o||o[ga]||o[Mt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=f.createElement(n),f.head.insertBefore(o,f.querySelector("head > title"))),En(o,n,r),o[Mt]=e,Q(o),n=o;break e;case"link":if(p=Ib("link","href",f).get(n+(r.href||""))){for(C=0;C<p.length;C++)if(o=p[C],o.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&o.getAttribute("rel")===(r.rel==null?null:r.rel)&&o.getAttribute("title")===(r.title==null?null:r.title)&&o.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){p.splice(C,1);break t}}o=f.createElement(n),En(o,n,r),f.head.appendChild(o);break;case"meta":if(p=Ib("meta","content",f).get(n+(r.content||""))){for(C=0;C<p.length;C++)if(o=p[C],o.getAttribute("content")===(r.content==null?null:""+r.content)&&o.getAttribute("name")===(r.name==null?null:r.name)&&o.getAttribute("property")===(r.property==null?null:r.property)&&o.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&o.getAttribute("charset")===(r.charSet==null?null:r.charSet)){p.splice(C,1);break t}}o=f.createElement(n),En(o,n,r),f.head.appendChild(o);break;default:throw Error(l(468,n))}o[Mt]=e,Q(o),n=o}e.stateNode=n}else fn||vm(p,e.type,e.stateNode);else e.stateNode=Lb(p,r,e.memoizedProps);else f!==r?(f===null?(n=o.stateNode,n===null||gt||n.parentNode.removeChild(n)):f.count--,r===null?fn||vm(p,e.type,e.stateNode):Lb(p,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Sh(e,e.memoizedProps,o.memoizedProps);break;case 27:Yn(n,e,r),Gn(e),f&512&&(gt||o===null||Nn(o,o.return)),o!==null&&f&4&&Sh(e,e.memoizedProps,o.memoizedProps);break;case 5:if(p=wa,wa=!1,Yn(n,e,r),wa=p,Gn(e),f&512&&(gt||o===null||Nn(o,o.return)),e.flags&32){n=e.stateNode;try{qn(n,""),Pe=!0}catch(de){yt(e,e.return,de)}}f&4&&e.stateNode!=null&&(n=e.memoizedProps,Sh(e,n,o!==null?o.memoizedProps:n)),f&1024&&(Mh=!0);break;case 6:if(Yn(n,e,r),Gn(e),f&4){if(e.stateNode===null)throw Error(l(162));n=e.memoizedProps,r=e.stateNode;try{r.nodeValue=n,Pe=!0}catch(de){yt(e,e.return,de)}}break;case 3:if(Pe=!1,Fu=null,p=Wi,Wi=Gs(n.containerInfo),Yn(n,e,r),Wi=p,Gn(e),f&4&&o!==null&&o.memoizedState.isDehydrated)try{Uo(n.containerInfo)}catch(de){yt(e,e.return,de)}Mh&&(Mh=!1,O0(e)),Pe=!1;break;case 4:f=wa,wa=fn,o=ln(),p=Wi,Wi=Gs(e.stateNode.containerInfo),Yn(n,e,r),Gn(e),Wi=p,Pe&&Bs&&(Nu=!0),Pe=o,wa=f;break;case 12:Yn(n,e,r),Gn(e);break;case 31:Yn(n,e,r),Gn(e),f&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Tu(e,n)));break;case 13:Yn(n,e,r),Gn(e),e.child.flags&8192&&e.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ou=Gt()),f&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Tu(e,n)));break;case 22:p=e.memoizedState!==null,C=o!==null&&o.memoizedState!==null;var _=fn,V=gt,te=wa;fn=_||p,wa=te||p,gt=V||C,Yn(n,e,r),gt=V,wa=te,fn=_,Gn(e),f&8192&&(n=e.stateNode,n._visibility=p?n._visibility&-2:n._visibility|1,!p||o===null||C||fn||gt||(n=C||gt,r=fn,o=gt,fn=p||fn,gt=n,zr(e,2),fn=r,gt=o),!p&&wa||_h(e,p)),f&4&&(n=e.updateQueue,n!==null&&(r=n.retryQueue,r!==null&&(n.retryQueue=null,Tu(e,r))));break;case 19:Yn(n,e,r),Gn(e),f&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Tu(e,n)));break;case 30:f&512&&(gt||o===null||Nn(o,o.return)),f=ln(),p=Bs,C=(r&335544064)===r,_=e.memoizedProps,Bs=C&&Xa(_.default,_.update)!=="none",Yn(n,e,r),Gn(e),C&&o!==null&&Pe&&(e.flags|=4),Bs=p,Pe=f;break;case 21:break;case 7:f&512&&(gt||o===null||Nn(o,o.return)),o&&o.stateNode!==null&&(o.stateNode._fragmentFiber=e);default:Yn(n,e,r),Gn(e)}}function Gn(e){var n=e.flags;if(n&2){try{for(var r,o=e.return;o!==null;){if(p0(o)){r=o;break}o=o.return}o=null;for(var f=e.return;f!==null;){if(xh(f)){var p=f.stateNode;o===null?o=[p]:o.push(p)}if(bh(f))break;f=f.return}var C=o;if(r==null)throw Error(l(160));switch(r.tag){case 27:var _=r.stateNode,V=wh(e);Su(e,V,_,C);break;case 5:var te=r.stateNode;r.flags&32&&(qn(te,""),r.flags&=-33);var de=wh(e);Su(e,de,te,C);break;case 3:case 4:var ve=r.stateNode.containerInfo,J=wh(e);kh(e,J,ve,C);break;default:throw Error(l(161))}}catch(oe){yt(e,e.return,oe)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function O0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;O0(n),n.tag===5&&n.flags&1024&&(n=n.stateNode,Ho=!0,n.reset(),Ho=!1),e=e.sibling}}function wo(e,n){if(n.subtreeFlags&9270)for(n=n.child;n!==null;)_0(n,e),n=n.sibling;else S0(n)}function _0(e,n){var r=e.alternate;if(r===null)Ch(e,!1);else switch(e.tag){case 3:if(Oh=ka=!1,y0(),wo(n,e),!ka&&!Nu){if(e=ja,e!==null)for(var o=0;o<e.length;o+=3){r=e[o];var f=e[o+1];bb(r,e[o+2]),r=r.ownerDocument.documentElement,r!==null&&r.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}e=n.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Oh=!0}ja=null;break;case 5:wo(n,e);break;case 4:o=ka,ka=!1,wo(n,e),ka&&(Nu=!0),ka=o;break;case 22:e.memoizedState===null&&(r.memoizedState!==null?Ch(e,!1):wo(n,e));break;case 30:o=ka,f=y0(),ka=!1,wo(n,e),ka&&(e.flags|=4);var p=e.memoizedProps,C=e.stateNode;n=Ga(p,C),C=Ga(r.memoizedProps,C);var _=Xa(p.default,p.update);_==="none"?n=!1:(p=r.memoizedState,r.memoizedState=null,r=e.child,ai=0,n=Ah(e,r,n,C,_,p,!0),ai!==(p===null?0:p.length)&&(e.flags|=32)),(e.flags&4)!==0&&n?(Mo(e,e.memoizedProps.onUpdate),ja=f):f!==null&&(f.push.apply(f,ja),ja=f),ka=(e.flags&32)!==0?!0:o;break;default:wo(n,e)}}function Ca(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)k0(e,n.alternate,n),n=n.sibling}function zr(e,n){for(e=e.child;e!==null;){var r=e,o=n;switch(r.tag){case 0:case 11:case 14:case 15:Dr(4,r,r.return),zr(r,o);break;case 1:Nn(r,r.return);var f=r.stateNode;typeof f.componentWillUnmount=="function"&&h0(r,r.return,f),zr(r,o);break;case 27:(o&2)!==0&&Ob(r.stateNode,r.type,r.memoizedProps);case 5:Nn(r,r.return),r.tag!==5&&r.tag!==27||Is(r),zr(r,o);break;case 6:Is(r);break;case 26:Nn(r,r.return),f=r.stateNode,r.memoizedState!==null||f===null||gt||f.parentNode.removeChild(f),zr(r,o);break;case 22:r.memoizedState===null&&zr(r,o);break;case 30:Nn(r,r.return),zr(r,o);break;case 7:Nn(r,r.return);default:zr(r,o)}e=e.sibling}}function ea(e,n,r){for(r=(n.subtreeFlags&8772)!==0?r:r&-2,n=n.child;n!==null;){var o=n.alternate,f=e,p=n,C=p.flags,_=(r&1)!==0;switch(p.tag){case 0:case 11:case 15:ea(f,p,r),Ls(4,p);break;case 1:if(ea(f,p,r),o=p,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(de){yt(o,o.return,de)}if(o=p,f=o.updateQueue,f!==null){var V=o.stateNode;try{var te=f.shared.hiddenCallbacks;if(te!==null)for(f.shared.hiddenCallbacks=null,f=0;f<te.length;f++)ey(te[f],V)}catch(de){yt(o,o.return,de)}}_&&C&64&&f0(p),xa(p,p.return);break;case 27:(r&2)!==0&&g0(p);case 5:p.tag!==5&&p.tag!==27||m0(p),ea(f,p,r),_&&o===null&&C&4&&jh(p),xa(p,p.return);break;case 6:m0(p);break;case 26:V=p.stateNode,p.memoizedState!==null||V===null||fn||vm(Gs(V.ownerDocument),p.type,V),ea(f,p,r),_&&o===null&&C&4&&jh(p),xa(p,p.return);break;case 12:ea(f,p,r);break;case 31:ea(f,p,r),_&&C&4&&T0(f,p);break;case 13:ea(f,p,r),_&&C&4&&A0(f,p);break;case 22:p.memoizedState===null&&ea(f,p,r),xa(p,p.return);break;case 30:ea(f,p,r),xa(p,p.return);break;case 7:xa(p,p.return);default:ea(f,p,r)}n=n.sibling}}function Dh(e,n){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&ws(r))}function zh(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ws(e))}function Bi(e,n,r,o){var f=(r&335544064)===r;if(n.subtreeFlags&(f?10262:10256))for(n=n.child;n!==null;)R0(e,n,r,o),n=n.sibling;else f&&j0(n)}function R0(e,n,r,o){var f=(r&335544064)===r;f&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Cu(n);var p=n.flags;switch(n.tag){case 0:case 11:case 15:Bi(e,n,r,o),p&2048&&Ls(9,n);break;case 1:Bi(e,n,r,o);break;case 3:Bi(e,n,r,o),f&&Oh&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),p&2048&&(p=null,n.alternate!==null&&(p=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==p&&(n.refCount++,p!=null&&ws(p)));break;case 12:if(p&2048){Bi(e,n,r,o),p=n.stateNode;try{var C=n.memoizedProps,_=C.id,V=C.onPostCommit;typeof V=="function"&&V(_,n.alternate===null?"mount":"update",p.passiveEffectDuration,-0)}catch(te){yt(n,n.return,te)}}else Bi(e,n,r,o);break;case 31:Bi(e,n,r,o);break;case 13:Bi(e,n,r,o);break;case 23:break;case 22:C=n.stateNode,_=n.alternate,n.memoizedState!==null?(f&&_!==null&&_.memoizedState===null&&Cu(_),C._visibility&2?Bi(e,n,r,o):Ps(e,n)):(f&&_!==null&&_.memoizedState!==null&&Cu(n),C._visibility&2?Bi(e,n,r,o):(C._visibility|=2,ko(e,n,r,o,(n.subtreeFlags&10256)!==0||!1))),p&2048&&Dh(_,n);break;case 24:Bi(e,n,r,o),p&2048&&zh(n.alternate,n);break;case 30:f&&(p=n.alternate,p!==null&&(Sa(p.child,!0),Sa(n.child,!0))),Bi(e,n,r,o);break;default:Bi(e,n,r,o)}}function ko(e,n,r,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var p=e,C=n,_=r,V=o,te=C.flags;switch(C.tag){case 0:case 11:case 15:ko(p,C,_,V,f),Ls(8,C);break;case 23:break;case 22:var de=C.stateNode;C.memoizedState!==null?de._visibility&2?ko(p,C,_,V,f):Ps(p,C):(de._visibility|=2,ko(p,C,_,V,f)),f&&te&2048&&Dh(C.alternate,C);break;case 24:ko(p,C,_,V,f),f&&te&2048&&zh(C.alternate,C);break;default:ko(p,C,_,V,f)}n=n.sibling}}function Ps(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=e,o=n,f=o.flags;switch(o.tag){case 22:Ps(r,o),f&2048&&Dh(o.alternate,o);break;case 24:Ps(r,o),f&2048&&zh(o.alternate,o);break;default:Ps(r,o)}n=n.sibling}}var Tl=8192;function Al(e,n,r){if(e.subtreeFlags&Tl)for(e=e.child;e!==null;)D0(e,n,r),e=e.sibling}function D0(e,n,r){switch(e.tag){case 26:Al(e,n,r),e.flags&Tl&&(e.memoizedState!==null?zE(r,Wi,e.memoizedState,e.memoizedProps):(e=e.stateNode,(n&335544128)===n&&Ub(r,e)));break;case 5:Al(e,n,r),e.flags&Tl&&(e=e.stateNode,(n&335544128)===n&&Ub(r,e));break;case 3:case 4:var o=Wi;Wi=Gs(e.stateNode.containerInfo),Al(e,n,r),Wi=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Tl,Tl=16777216,Al(e,n,r),Tl=o):Al(e,n,r));break;case 30:if((e.flags&Tl)!==0&&(o=e.memoizedProps.name,o!=null&&o!=="auto")){var f=e.stateNode;f.paired=null,wi===null&&(wi=new Map),wi.set(o,f)}Al(e,n,r);break;default:Al(e,n,r)}}function z0(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Hs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];hn=o,I0(o,e)}z0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)L0(e),e=e.sibling}function L0(e){switch(e.tag){case 0:case 11:case 15:Hs(e),e.flags&2048&&Dr(9,e,e.return);break;case 3:Hs(e);break;case 12:Hs(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Au(e)):Hs(e);break;default:Hs(e)}}function Au(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];hn=o,I0(o,e)}z0(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Dr(8,n,n.return),Au(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,Au(n));break;default:Au(n)}e=e.sibling}}function I0(e,n){for(;hn!==null;){var r=hn;switch(r.tag){case 0:case 11:case 15:Dr(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ws(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,hn=o;else e:for(r=e;hn!==null;){o=hn;var f=o.sibling,p=o.return;if(N0(o),o===r){hn=null;break e}if(f!==null){f.return=p,hn=f;break e}hn=p}}}var MN={getCacheForType:function(e){var n=wn(Kt),r=n.data.get(e);return r===void 0&&(r=e(),n.data.set(e,r)),r},cacheSignal:function(){return wn(Kt).controller.signal}},ON=typeof WeakMap=="function"?WeakMap:Map,pt=0,kt=null,tt=null,rt=0,vt=0,ki=null,Lr=!1,Co=!1,Lh=!1,ir=0,Ft=0,Ir=0,Ml=0,Mu=0,Ci=0,No=0,Us=null,li=null,Ih=!1,Ou=0,B0=0,_u=1/0,Ru=null,Br=null,Bt=0,ta=null,Ol=null,Na=0,Bh=0,Ph=null,P0=null,Eo=null,To=null,Ao=null,qs=0,Du=null;function Ni(){return(pt&2)!==0&&rt!==0?rt&-rt:se.T!==null?Qh():ei()}function H0(){if(Ci===0)if((rt&536870912)===0||et){var e=Oi;Oi<<=1,(Oi&3932160)===0&&(Oi=262144),Ci=e}else Ci=536870912;return e=kn.current,e!==null&&(e.flags|=32),Ci}function Mo(e,n){if(n!=null){var r=e.stateNode,o=r.ref;o===null&&(o=r.ref=xb(Ga(e.memoizedProps,r))),To===null&&(To=[]),To.push(n.bind(null,o))}}function oi(e,n,r){(e===kt&&(vt===2||vt===9)||e.cancelPendingCommit!==null)&&(Oo(e,0),Pr(e,rt,Ci,!1)),Zn(e,r),((pt&2)===0||e!==kt)&&(e===kt&&((pt&2)===0&&(Ml|=r),Ft===4&&Pr(e,rt,Ci,!1)),Ea(e))}function U0(e,n,r){if((pt&6)!==0)throw Error(l(327));var o=!r&&(n&127)===0&&(n&e.expiredLanes)===0||pi(e,n),f=o?DN(e,n):Uh(e,n,!0),p=o;do{if(f===0){Co&&!o&&Pr(e,n,0,!1);break}else{if(r=e.current.alternate,p&&!_N(r)){f=Uh(e,n,!1),p=!1;continue}if(f===2){if(p=n,e.errorRecoveryDisabledLanes&p)var C=0;else C=e.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){n=C;e:{var _=e;f=Us;var V=_.current.memoizedState.isDehydrated;if(V&&(Oo(_,C).flags|=256),C=Uh(_,C,!1),C!==2&&C!==6){if(Lh&&!V){_.errorRecoveryDisabledLanes|=p,Ml|=p,f=4;break e}p=li,li=f,p!==null&&(li===null?li=p:li.push.apply(li,p))}f=C}if(p=!1,f!==2)continue}}if(f===1){Oo(e,0),Pr(e,n,0,!0);break}e:{switch(o=e,p=f,p){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:Pr(o,n,Ci,!Lr);break e;case 2:li=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(f=Ou+300-Gt(),10<f)){if(Pr(o,n,Ci,!Lr),mi(o,0,!0)!==0)break e;Na=n,o.timeoutHandle=lm(q0.bind(null,o,r,li,Ru,Ih,n,Ci,Ml,No,Lr,p,"Throttled",-0,0),f);break e}q0(o,r,li,Ru,Ih,n,Ci,Ml,No,Lr,p,null,-0,0)}}break}while(!0);Ea(e)}function q0(e,n,r,o,f,p,C,_,V,te,de,ve,J,oe){e.timeoutHandle=-1;var Ce=n.subtreeFlags,Re=(p&335544064)===p;if(ve=null,(Re||Ce&8192||(Ce&16785408)===16785408)&&(ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},wi=null,D0(n,p,ve),Re&&(Ce=ve,Re=e.containerInfo,Re=(Re.nodeType===9?Re:Re.ownerDocument).__reactViewTransition,Re!=null&&(Ce.count++,Ce.waitingForViewTransition=!0,Ce=Ks.bind(Ce),Re.finished.then(Ce,Ce))),Ce=(p&62914560)===p?Ou-Gt():(p&4194048)===p?B0-Gt():0,Ce=LE(ve,Ce),Ce!==null)){Na=p,e.cancelPendingCommit=Ce(K0.bind(null,e,n,p,r,o,f,C,_,V,te,de,ve,null,J,oe)),Pr(e,p,C,!te);return}K0(e,n,p,r,o,f,C,_,V,te,de,ve)}function _N(e){for(var n=e;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var f=r[o],p=f.getSnapshot;f=f.value;try{if(!ji(p(),f))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Pr(e,n,r,o){n=fa(e,n),n&=~Mu,n&=~Ml,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var p=31-Vt(f),C=1<<p;o[p]=-1,f&=~C}r!==0&&Jn(e,r,n)}function zu(){return(pt&6)===0?(Fs(0),!1):!0}function Hh(){if(tt!==null){if(vt===0)var e=tt.return;else e=tt,Za=yl=null,Xf(e),vo=null,Ns=0,e=tt;for(;e!==null;)d0(e.alternate,e),e=e.return;tt=null}}function Oo(e,n){var r=e.timeoutHandle;return r!==-1&&(e.timeoutHandle=-1,nE(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Na=0,Hh(),kt=e,tt=r=Qa(e.current,null),rt=n,vt=0,ki=null,Lr=!1,Co=pi(e,n),Lh=!1,No=Ci=Mu=Ml=Ir=Ft=0,li=Us=null,Ih=!1,ir=fa(e,n),Fc(),r}function F0(e,n){Ke=null,se.H=mu,n===go||n===eu?(n=Kv(),vt=3):n===zf?(n=Kv(),vt=4):vt=n===ch?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,ki=n,tt===null&&(Ft=1,pu(e,Di(n,e.current)))}function V0(){var e=kn.current;return e===null?!0:(rt&4194048)===rt?zn===null:(rt&62914560)===rt||(rt&536870912)!==0?e===zn:!1}function $0(){var e=se.H;return se.H=mu,e===null?mu:e}function Y0(){var e=se.A;return se.A=MN,e}function Lu(){Ft=4,Lr||(rt&4194048)!==rt&&kn.current!==null||(Co=!0),(Ir&134217727)===0&&(Ml&134217727)===0||kt===null||Pr(kt,rt,Ci,!1)}function Uh(e,n,r){var o=pt;pt|=2;var f=$0(),p=Y0();(kt!==e||rt!==n)&&(Ru=null,Oo(e,n)),n=!1;var C=Ft;e:do try{if(vt!==0&&tt!==null){var _=tt,V=ki;switch(vt){case 8:Hh(),C=6;break e;case 3:case 2:case 9:case 6:kn.current===null&&(n=!0);var te=vt;if(vt=0,ki=null,_o(e,_,V,te),r&&Co){C=0;break e}break;default:te=vt,vt=0,ki=null,_o(e,_,V,te)}}RN(),C=Ft;break}catch(de){F0(e,de)}while(!0);return n&&e.shellSuspendCounter++,Za=yl=null,pt=o,se.H=f,se.A=p,tt===null&&(kt=null,rt=0,Fc()),C}function RN(){for(;tt!==null;)G0(tt)}function DN(e,n){var r=pt;pt|=2;var o=$0(),f=Y0();kt!==e||rt!==n?(Ru=null,_u=Gt()+500,Oo(e,n)):Co=pi(e,n);e:do try{if(vt!==0&&tt!==null){n=tt;var p=ki;t:switch(vt){case 1:vt=0,ki=null,_o(e,n,p,1);break;case 2:case 9:if(Xv(p)){vt=0,ki=null,X0(n);break}n=function(){vt!==2&&vt!==9||kt!==e||(vt=7),Ea(e)},p.then(n,n);break e;case 3:vt=7;break e;case 4:vt=5;break e;case 7:Xv(p)?(vt=0,ki=null,X0(n)):(vt=0,ki=null,_o(e,n,p,7));break;case 5:var C=null;switch(tt.tag){case 26:C=tt.memoizedState;case 5:case 27:var _=tt;if(C?Pb(C):_.stateNode.complete){vt=0,ki=null;var V=_.sibling;if(V!==null)tt=V;else{var te=_.return;te!==null?(tt=te,Iu(te)):tt=null}break t}}vt=0,ki=null,_o(e,n,p,5);break;case 6:vt=0,ki=null,_o(e,n,p,6);break;case 8:Hh(),Ft=6;break e;default:throw Error(l(462))}}zN();break}catch(de){F0(e,de)}while(!0);return Za=yl=null,se.H=o,se.A=f,pt=r,tt!==null?0:(kt=null,rt=0,Fc(),Ft)}function zN(){for(;tt!==null&&!_n();)G0(tt)}function G0(e){var n=c0(e.alternate,e,ir);e.memoizedProps=e.pendingProps,n===null?Iu(e):tt=n}function X0(e){var n=e,r=n.alternate;switch(n.tag){case 15:case 0:n=n0(r,n,n.pendingProps,n.type,void 0,rt);break;case 11:n=n0(r,n,n.pendingProps,n.type.render,n.ref,rt);break;case 5:Xf(n);var o=n;o===dn&&(et?(Qc(o),o.tag===5&&o.stateNode!=null&&(Et=o.stateNode)):(Qc(o),et=!0));default:d0(r,n),n=tt=Iv(n,ir),n=c0(r,n,ir)}e.memoizedProps=e.pendingProps,n===null?Iu(e):tt=n}function _o(e,n,r,o){Za=yl=null,Xf(n),vo=null,Ns=0;var f=n.return;try{if(SN(e,f,n,r,rt)){Ft=1,pu(e,Di(r,e.current)),tt=null;return}}catch(p){if(f!==null)throw tt=f,p;Ft=1,pu(e,Di(r,e.current)),tt=null;return}n.flags&32768?(et||o===1?e=!0:Co||(rt&536870912)!==0?e=!1:(Lr=e=!0,(o===2||o===9||o===3||o===6)&&(o=kn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Q0(n,e)):Iu(n)}function Iu(e){var n=e;do{if((n.flags&32768)!==0){Q0(n,Lr);return}e=n.return;var r=NN(n.alternate,n,ir);if(r!==null){tt=r;return}if(n=n.sibling,n!==null){tt=n;return}tt=n=e}while(n!==null);Ft===0&&(Ft=5)}function Q0(e,n){do{var r=EN(e.alternate,e);if(r!==null){r.flags&=32767,tt=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(e=e.sibling,e!==null)){tt=e;return}tt=e=r}while(e!==null);Ft=6,tt=null}function K0(e,n,r,o,f,p,C,_,V,te,de,ve){e.cancelPendingCommit=null;do Bu();while(Bt!==0);if((pt&6)!==0)throw Error(l(327));if(n!==null){if(n===e.current)throw Error(l(177));e===kt&&(tt=kt=null,rt=0),Ol=n,ta=e,Na=r,Ph=f,P0=o,LN(e,n,r,C,_,V,ve)}}function LN(e,n,r,o,f,p,C){var _=n.lanes|n.childLanes;if(Bh=_,_|=Sf,ha(e,r,_,o,f,p),To=null,(r&335544064)===r?(Ao=uN(e),o=10262):(Ao=null,o=10256),(n.subtreeFlags&o)!==0||(n.flags&o)!==0?(e.callbackNode=null,e.callbackPriority=0,qN(bn,function(){return $h(),null})):(e.callbackNode=null,e.callbackPriority=0),wu=!1,o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=se.T,se.T=null,f=he.p,he.p=2,p=pt,pt|=4;try{TN(e,n,r)}finally{pt=p,he.p=f,se.T=o}}Bt=1,wu?Eo=sE(C,e.containerInfo,Ao,qh,Fh,BN,Vh,$h,IN):(qh(),Fh(),Vh())}function IN(e){if(Bt!==0){var n=ta.onRecoverableError;n(e,{componentStack:null})}}function BN(){Bt===3&&(Bt=0,_0(Ol,ta),Bt=4)}function qh(){if(Bt===1){Bt=0;var e=ta,n=Ol,r=Na,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=se.T,se.T=null;var f=he.p;he.p=2;var p=pt;pt|=4;try{Bs=Nu=!1,M0(n,e,r),r=im;var C=Ev(e.containerInfo),_=r.focusedElem,V=r.selectionRange;if(C!==_&&_&&_.ownerDocument&&Nv(_.ownerDocument.documentElement,_)){if(V!==null&&vf(_)){var te=V.start,de=V.end;if(de===void 0&&(de=te),"selectionStart"in _)_.selectionStart=te,_.selectionEnd=Math.min(de,_.value.length);else{var ve=_.ownerDocument||document,J=ve&&ve.defaultView||window;if(J.getSelection){var oe=J.getSelection(),Ce=_.textContent.length,Re=Math.min(V.start,Ce),Ze=V.end===void 0?Re:Math.min(V.end,Ce);!oe.extend&&Re>Ze&&(C=Ze,Ze=Re,Re=C);var ee=Cv(_,Re),K=Cv(_,Ze);if(ee&&K&&(oe.rangeCount!==1||oe.anchorNode!==ee.node||oe.anchorOffset!==ee.offset||oe.focusNode!==K.node||oe.focusOffset!==K.offset)){var ae=ve.createRange();ae.setStart(ee.node,ee.offset),oe.removeAllRanges(),Re>Ze?(oe.addRange(ae),oe.extend(K.node,K.offset)):(ae.setEnd(K.node,K.offset),oe.addRange(ae))}}}}for(ve=[],oe=_;oe=oe.parentNode;)oe.nodeType===1&&ve.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ve.length;_++){var ge=ve[_];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Ho=!!nm,im=nm=null}finally{pt=p,he.p=f,se.T=o}}e.current=n,Bt=2}}function Fh(){if(Bt===2){Bt=0;var e=ta,n=Ol,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=se.T,se.T=null;var o=he.p;he.p=2;var f=pt;pt|=4;try{k0(e,n.alternate,n)}finally{pt=f,he.p=o,se.T=r}}Bt=3}}function Vh(){if(Bt===4||Bt===3){Bt=0;var e=Eo;Eo=null,Qe();var n=ta,r=Ol,o=Na,f=P0,p=(o&335544064)===o?10262:10256;if((r.subtreeFlags&p)!==0||(r.flags&p)!==0?Bt=5:(Bt=0,Ol=ta=null,Z0(n,n.pendingLanes)),p=n.pendingLanes,p===0&&(Br=null),Wn(o),r=r.stateNode,sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(Gi,r,void 0,(r.current.flags&128)===128)}catch{}if(f!==null){r=se.T,p=he.p,he.p=2,se.T=null;try{for(var C=n.onRecoverableError,_=0;_<f.length;_++){var V=f[_];C(V.value,{componentStack:V.stack})}}finally{se.T=r,he.p=p}}if(f=To,C=Ao,Ao=null,f!==null&&(To=null,C===null&&(C=[]),e!==null))for(V=0;V<f.length;V++)r=(0,f[V])(C),r!==void 0&&e.finished.finally(r);(Na&3)!==0&&Bu(),Ea(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Du?qs++:(qs=0,Du=n):(qs=0,Du=null),Fs(0)}}function Z0(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,ws(n)))}function Bu(){return Eo!==null&&(Eo.skipTransition(),Eo=null),qh(),Fh(),Vh(),$h()}function $h(){if(Bt!==5)return!1;var e=ta,n=Bh;Bh=0;var r=Wn(Na),o=se.T,f=he.p;try{he.p=32>r?32:r,se.T=null,r=Ph,Ph=null;var p=ta,C=Na;if(Bt=0,Ol=ta=null,Na=0,(pt&6)!==0)throw Error(l(331));var _=pt;if(pt|=4,L0(p.current),R0(p,p.current,C,r),pt=_,Fs(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(Gi,p)}catch{}return!0}finally{he.p=f,se.T=o,Z0(e,n)}}function J0(e,n,r){n=Di(r,n),n=sh(e.stateNode,n,2),e=Mr(e,n,2),e!==null&&(Zn(e,2),Ea(e))}function yt(e,n,r){if(e.tag===3)J0(e,e,r);else for(;n!==null;){if(n.tag===3){J0(n,e,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Br===null||!Br.has(o))){e=Di(r,e),r=Xy(2),o=Mr(n,r,2),o!==null&&(Qy(r,o,n,e),Zn(o,2),Ea(o));break}}n=n.return}}function Yh(e,n,r){var o=e.pingCache;if(o===null){o=e.pingCache=new ON;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(r)||(Lh=!0,f.add(r),e=PN.bind(null,e,n,r),n.then(e,e))}function PN(e,n,r){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,kt===e&&(rt&r)===r&&((Ft===4||Ft===3&&(rt&62914560)===rt&&300>Gt()-Ou)&&(pt&2)===0?Oo(e,0):Mu|=r,No===rt&&(No=0)),Ea(e)}function W0(e,n){n===0&&(n=gi()),e=pl(e,n),e!==null&&(Zn(e,n),Ea(e))}function HN(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),W0(e,r)}function UN(e,n){var r=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(r=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(n),W0(e,r)}function qN(e,n){return Un(e,n)}var Ro=null,Do=null,Gh=!1,Pu=!1,Xh=!1,Hr=0;function Ea(e){e!==Do&&e.next===null&&(Do===null?Ro=Do=e:Do=Do.next=e),Pu=!0,Gh||(Gh=!0,VN())}function Fs(e,n){if(!Xh&&Pu){Xh=!0;do for(var r=!1,o=Ro;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var p=0;else{var C=o.suspendedLanes,_=o.pingedLanes;p=(1<<31-Vt(42|e)+1)-1,p&=f&~(C&~_),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,ib(o,p))}else p=rt,p=mi(o,o===kt?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||pi(o,p)||(r=!0,ib(o,p));o=o.next}while(r);Xh=!1}}function FN(){eb()}function eb(){Pu=Gh=!1;var e=0;Hr!==0&&tE()&&(e=Hr);for(var n=Gt(),r=null,o=Ro;o!==null;){var f=o.next,p=tb(o,n);p===0?(o.next=null,r===null?Ro=f:r.next=f,f===null&&(Do=r)):(r=o,(e!==0||(p&3)!==0)&&(Pu=!0)),o=f}Bt!==0&&Bt!==5||Fs(e),Hr!==0&&(Hr=0)}function tb(e,n){for(var r=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var C=31-Vt(p),_=1<<C,V=f[C];V===-1?((_&r)===0||(_&o)!==0)&&(f[C]=ll(_,n)):V<=n&&(e.expiredLanes|=_),p&=~_}if(n=kt,r=rt,r=mi(e,e===n?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===n&&(vt===2||vt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&_t(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||pi(e,r)){if(n=r&-r,n===e.callbackPriority)return n;switch(o!==null&&_t(o),Wn(r)){case 2:case 8:r=ca;break;case 32:r=bn;break;case 268435456:r=rl;break;default:r=bn}return o=nb.bind(null,e),r=Un(r,o),e.callbackPriority=n,e.callbackNode=r,n}return o!==null&&o!==null&&_t(o),e.callbackPriority=2,e.callbackNode=null,2}function nb(e,n){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Bu()&&e.callbackNode!==r)return null;var o=rt;return o=mi(e,e===kt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(U0(e,o,n),tb(e,Gt()),e.callbackNode!=null&&e.callbackNode===r?nb.bind(null,e):null)}function ib(e,n){if(Bu())return null;U0(e,n,!0)}function VN(){iE(function(){(pt&6)!==0?Un(sa,FN):eb()})}function Qh(){if(Hr===0){var e=jl;e===0&&(e=Qi,Qi<<=1,(Qi&261888)===0&&(Qi=256)),Hr=e}return Hr}function ab(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:jn(e)}function $N(e,n,r,o,f){if(n==="submit"&&r&&r.stateNode===f){var p=ab((f[$t]||null).action),C=o.submitter;C&&(n=(n=C[$t]||null)?ab(n.formAction):C.getAttribute("formAction"),n!==null&&(p=n,C=null));var _=new Pc("action","action",null,o,f);e.push({event:_,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Hr!==0){var V=new FormData(f,C);ih(r,{pending:!0,data:V,method:f.method,action:p},null,V)}}else typeof p=="function"&&(_.preventDefault(),V=new FormData(f,C),ih(r,{pending:!0,data:V,method:f.method,action:p},p,V))},currentTarget:f}]})}}for(var Kh=0;Kh<jf.length;Kh++){var Zh=jf[Kh],YN=Zh.toLowerCase(),GN=Zh[0].toUpperCase()+Zh.slice(1);Zi(YN,"on"+GN)}Zi(Mv,"onAnimationEnd"),Zi(Ov,"onAnimationIteration"),Zi(_v,"onAnimationStart"),Zi("dblclick","onDoubleClick"),Zi("focusin","onFocus"),Zi("focusout","onBlur"),Zi(nN,"onTransitionRun"),Zi(iN,"onTransitionStart"),Zi(aN,"onTransitionCancel"),Zi(Rv,"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 Vs="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(" "),XN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vs));function rb(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],f=o.event;o=o.listeners;e:{var p=void 0;if(n)for(var C=o.length-1;0<=C;C--){var _=o[C],V=_.instance,te=_.currentTarget;if(_=_.listener,V!==p&&f.isPropagationStopped())break e;p=_,f.currentTarget=te;try{p(f)}catch(de){qc(de)}f.currentTarget=null,p=V}else for(C=0;C<o.length;C++){if(_=o[C],V=_.instance,te=_.currentTarget,_=_.listener,V!==p&&f.isPropagationStopped())break e;p=_,f.currentTarget=te;try{p(f)}catch(de){qc(de)}f.currentTarget=null,p=V}}}}function nt(e,n){var r=n[ol];r===void 0&&(r=n[ol]=new Set);var o=e+"__bubble";r.has(o)||(lb(n,e,2,!1),r.add(o))}function Jh(e,n,r){var o=0;n&&(o|=4),lb(r,e,o,n)}var Hu="_reactListening"+Math.random().toString(36).slice(2);function Wh(e){if(!e[Hu]){e[Hu]=!0,Ee.forEach(function(r){r!=="selectionchange"&&(XN.has(r)||Jh(r,!1,e),Jh(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Hu]||(n[Hu]=!0,Jh("selectionchange",!1,n))}}function lb(e,n,r,o){switch(Qb(n)){case 2:var f=HE;break;case 8:f=UE;break;default:f=bm}r=f.bind(null,n,r,e),f=void 0,!fl||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,r,{capture:!0,passive:f}):e.addEventListener(n,r,!0):f!==void 0?e.addEventListener(n,r,{passive:f}):e.addEventListener(n,r,!1)}function em(e,n,r,o,f){var p=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var C=o.tag;if(C===3||C===4){var _=o.stateNode.containerInfo;if(_===f)break;if(C===4)for(C=o.return;C!==null;){var V=C.tag;if((V===3||V===4)&&C.stateNode.containerInfo===f)return;C=C.return}for(;_!==null;){if(C=ti(_),C===null)return;if(V=C.tag,V===5||V===6||V===26||V===27){o=p=C;continue e}_=_.parentNode}}o=o.return}dl(function(){var te=p,de=ul(r),ve=[];e:{var J=Dv.get(e);if(J!==void 0){var oe=Pc,Ce=e;switch(e){case"keypress":if(Ic(r)===0)break e;case"keydown":case"keyup":oe=_C;break;case"focusin":Ce="focus",oe=df;break;case"focusout":Ce="blur",oe=df;break;case"beforeblur":case"afterblur":oe=df;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=cv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=xC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=IC;break;case Mv:case Ov:case _v:oe=wC;break;case Rv:oe=PC;break;case"scroll":case"scrollend":oe=yC;break;case"wheel":oe=UC;break;case"copy":case"cut":case"paste":oe=CC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=dv;break;case"submit":oe=zC;break;case"toggle":case"beforetoggle":oe=FC}var Re=(n&4)!==0,Ze=!Re&&(e==="scroll"||e==="scrollend"),ee=Re?J!==null?J+"Capture":null:J;Re=[];for(var K=te,ae;K!==null;){var ge=K;if(ae=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||ae===null||ee===null||(ge=Ya(K,ee),ge!=null&&Re.push($s(K,ge,ae))),Ze)break;K=K.return}0<Re.length&&(J=new oe(J,Ce,null,r,de),ve.push({event:J,listeners:Re}))}}if((n&7)===0){e:{if(oe=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",oe&&r!==cl&&(Ce=r.relatedTarget||r.fromElement)&&(ti(Ce)||Ce[xn]))break e;(J||oe)&&(Ce=de.window===de?de:(oe=de.ownerDocument)?oe.defaultView||oe.parentWindow:window,J?(oe=r.relatedTarget||r.toElement,J=te,oe=oe?ti(oe):null,oe!==null&&(Ze=u(oe),Re=oe.tag,oe!==Ze||Re!==5&&Re!==27&&Re!==6)&&(oe=null)):(J=null,oe=te),J!==oe&&(Re=cv,ge="onMouseLeave",ee="onMouseEnter",K="mouse",(e==="pointerout"||e==="pointerover")&&(Re=dv,ge="onPointerLeave",ee="onPointerEnter",K="pointer"),Ze=J==null?Ce:ce(J),ae=oe==null?Ce:ce(oe),Ce=new Re(ge,K+"leave",J,r,de),Ce.target=Ze,Ce.relatedTarget=ae,ge=null,ti(de)===te&&(Re=new Re(ee,K+"enter",oe,r,de),Re.target=ae,Re.relatedTarget=Ze,ge=Re),Ze=ge,Re=J&&oe?O(J,oe,QN):null,J!==null&&ob(ve,Ce,J,Re,!1),oe!==null&&Ze!==null&&ob(ve,Ze,oe,Re,!0)))}e:{if(J=te?ce(te):window,oe=J.nodeName&&J.nodeName.toLowerCase(),oe==="select"||oe==="input"&&J.type==="file")var Me=bv;else if(vv(J))if(xv)Me=WC;else{Me=ZC;var lt=KC}else oe=J.nodeName,!oe||oe.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?te&&sl(te.elementType)&&(Me=bv):Me=JC;if(Me&&(Me=Me(e,te))){yv(ve,Me,r,de);break e}lt&&lt(e,J,te)}switch(lt=te?ce(te):window,e){case"focusin":(vv(lt)||lt.contentEditable==="true")&&(oo=lt,yf=te,xs=null);break;case"focusout":xs=yf=oo=null;break;case"mousedown":bf=!0;break;case"contextmenu":case"mouseup":case"dragend":bf=!1,Tv(ve,r,de);break;case"selectionchange":if(tN)break;case"keydown":case"keyup":Tv(ve,r,de)}var Ie;if(hf)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else lo?pv(e,r)&&(qe="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(qe="onCompositionStart");qe&&(fv&&r.locale!=="ko"&&(lo||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&lo&&(Ie=ov()):(jr=de,sf="value"in jr?jr.value:jr.textContent,lo=!0)),lt=Uu(te,qe),0<lt.length&&(qe=new uv(qe,e,null,r,de),ve.push({event:qe,listeners:lt}),Ie?qe.data=Ie:(Ie=gv(r),Ie!==null&&(qe.data=Ie)))),(Ie=$C?YC(e,r):GC(e,r))&&(qe=Uu(te,"onBeforeInput"),0<qe.length&&(lt=new uv("onBeforeInput","beforeinput",null,r,de),ve.push({event:lt,listeners:qe}),lt.data=Ie)),$N(ve,e,te,r,de)}rb(ve,n)})}function $s(e,n,r){return{instance:e,listener:n,currentTarget:r}}function Uu(e,n){for(var r=n+"Capture",o=[];e!==null;){var f=e,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=Ya(e,r),f!=null&&o.unshift($s(e,f,p)),f=Ya(e,n),f!=null&&o.push($s(e,f,p))),e.tag===3)return o;e=e.return}return[]}function QN(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ob(e,n,r,o,f){for(var p=n._reactName,C=[];r!==null&&r!==o;){var _=r,V=_.alternate,te=_.stateNode;if(_=_.tag,V!==null&&V===o)break;_!==5&&_!==26&&_!==27||te===null||(V=te,f?(te=Ya(r,p),te!=null&&C.unshift($s(r,te,V))):f||(te=Ya(r,p),te!=null&&C.push($s(r,te,V)))),r=r.return}C.length!==0&&e.push({event:n,listeners:C})}var KN=/\r\n?/g,ZN=/\u0000|\uFFFD/g;function sb(e){return(typeof e=="string"?e:""+e).replace(KN,`
49
- `).replace(ZN,"")}function cb(e,n){return n=sb(n),sb(e)===n}function bt(e,n,r,o,f,p){switch(r){case"children":if(typeof o=="string")n==="body"||n==="textarea"&&o===""||qn(e,o);else if(typeof o=="number"||typeof o=="bigint")n!=="body"&&qn(e,""+o);else return;break;case"className":vi(e,"class",o);break;case"tabIndex":vi(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":vi(e,r,o);break;case"style":bi(e,o,p);return;case"data":if(n!=="object"){vi(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=jn(o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"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"&&(r==="formAction"?(n!=="input"&&bt(e,n,"name",f.name,f,null),bt(e,n,"formEncType",f.formEncType,f,null),bt(e,n,"formMethod",f.formMethod,f,null),bt(e,n,"formTarget",f.formTarget,f,null)):(bt(e,n,"encType",f.encType,f,null),bt(e,n,"method",f.method,f,null),bt(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=jn(o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=Fn);return;case"onScroll":o!=null&&nt("scroll",e);return;case"onScrollEnd":o!=null&&nt("scrollend",e);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(r=o.__html,r!=null){if(f.children!=null)throw Error(l(60));(p!=null?p.__html:void 0)!==r&&(e.innerHTML=r)}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.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"){e.removeAttribute("xlink:href");break}r=jn(o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);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"?e.setAttribute(r,o):e.removeAttribute(r);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"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":nt("beforetoggle",e),nt("toggle",e),It(e,"popover",o);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":It(e,"is",o);break;case"innerText":case"textContent":return;default:if(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")r=ds.get(r)||r,It(e,r,o);else return}Pe=!0}function tm(e,n,r,o,f,p){switch(r){case"style":bi(e,o,p);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(r=o.__html,r!=null){if(f.children!=null)throw Error(l(60));(p!=null?p.__html:void 0)!==r&&(e.innerHTML=r)}}break;case"children":if(typeof o=="string")qn(e,o);else if(typeof o=="number"||typeof o=="bigint")qn(e,""+o);else return;break;case"onScroll":o!=null&&nt("scroll",e);return;case"onScrollEnd":o!=null&&nt("scrollend",e);return;case"onClick":o!=null&&(e.onclick=Fn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!ke.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(f=r.endsWith("Capture"),p=r.slice(2,f?r.length-7:void 0),n=e[$t]||null,n=n!=null?n[r]:null,typeof n=="function"&&e.removeEventListener(p,n,f),typeof o=="function")){typeof n!="function"&&n!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(p,o,f);break e}Pe=!0,r in e?e[r]=o:o===!0?e.setAttribute(r,""):It(e,r,o)}return}Pe=!0}function En(e,n,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",e),nt("load",e);var o=!1,f=!1,p;for(p in r)if(r.hasOwnProperty(p)){var C=r[p];if(C!=null)switch(p){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:bt(e,n,p,C,r,null)}}f&&bt(e,n,"srcSet",r.srcSet,r,null),o&&bt(e,n,"src",r.src,r,null);return;case"input":nt("invalid",e);var _=p=C=f=null,V=null,te=null;for(o in r)if(r.hasOwnProperty(o)){var de=r[o];if(de!=null)switch(o){case"name":f=de;break;case"type":C=de;break;case"checked":V=de;break;case"defaultChecked":te=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(e,n,o,de,r,null)}}br(e,p,_,V,te,C,f,!1);return;case"select":nt("invalid",e),o=C=p=null;for(f in r)if(r.hasOwnProperty(f)&&(_=r[f],_!=null))switch(f){case"value":p=_;break;case"defaultValue":C=_;break;case"multiple":o=_;default:bt(e,n,f,_,r,null)}n=p,r=C,e.multiple=!!o,n!=null?ni(e,!!o,n,!1):r!=null&&ni(e,!!o,r,!0);return;case"textarea":nt("invalid",e),p=f=o=null;for(C in r)if(r.hasOwnProperty(C)&&(_=r[C],_!=null))switch(C){case"value":o=_;break;case"defaultValue":f=_;break;case"children":p=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(l(91));break;default:bt(e,n,C,_,r,null)}yi(e,o,f,p);return;case"option":for(V in r)if(r.hasOwnProperty(V)&&(o=r[V],o!=null))switch(V){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:bt(e,n,V,o,r,null)}return;case"dialog":nt("beforetoggle",e),nt("toggle",e),nt("cancel",e),nt("close",e);break;case"iframe":case"object":nt("load",e);break;case"video":case"audio":for(o=0;o<Vs.length;o++)nt(Vs[o],e);break;case"image":nt("error",e),nt("load",e);break;case"details":nt("toggle",e);break;case"embed":case"source":case"link":nt("error",e),nt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in r)if(r.hasOwnProperty(te)&&(o=r[te],o!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:bt(e,n,te,o,r,null)}return;default:if(sl(n)){for(de in r)r.hasOwnProperty(de)&&(o=r[de],o!==void 0&&tm(e,n,de,o,r,void 0));return}}for(_ in r)r.hasOwnProperty(_)&&(o=r[_],o!=null&&bt(e,n,_,o,r,null))}var JN={};function WN(e,n,r,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,C=null,_=null,V=null,te=null,de=null;for(oe in r){var ve=r[oe];if(r.hasOwnProperty(oe)&&ve!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":V=ve;default:o.hasOwnProperty(oe)||bt(e,n,oe,null,o,ve)}}for(var J in o){var oe=o[J];if(ve=r[J],o.hasOwnProperty(J)&&(oe!=null||ve!=null))switch(J){case"type":oe!==ve&&(Pe=!0),p=oe;break;case"name":oe!==ve&&(Pe=!0),f=oe;break;case"checked":oe!==ve&&(Pe=!0),te=oe;break;case"defaultChecked":oe!==ve&&(Pe=!0),de=oe;break;case"value":oe!==ve&&(Pe=!0),C=oe;break;case"defaultValue":oe!==ve&&(Pe=!0),_=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(l(137,n));break;default:oe!==ve&&bt(e,n,J,oe,o,ve)}}Dn(e,C,_,V,te,de,p,f);return;case"select":oe=C=_=J=null;for(p in r)if(V=r[p],r.hasOwnProperty(p)&&V!=null)switch(p){case"value":break;case"multiple":oe=V;default:o.hasOwnProperty(p)||bt(e,n,p,null,o,V)}for(f in o)if(p=o[f],V=r[f],o.hasOwnProperty(f)&&(p!=null||V!=null))switch(f){case"value":p!==V&&(Pe=!0),J=p;break;case"defaultValue":p!==V&&(Pe=!0),_=p;break;case"multiple":p!==V&&(Pe=!0),C=p;default:p!==V&&bt(e,n,f,p,o,V)}n=_,r=C,o=oe,J!=null?ni(e,!!r,J,!1):!!o!=!!r&&(n!=null?ni(e,!!r,n,!0):ni(e,!!r,r?[]:"",!1));return;case"textarea":oe=J=null;for(_ in r)if(f=r[_],r.hasOwnProperty(_)&&f!=null&&!o.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:bt(e,n,_,null,o,f)}for(C in o)if(f=o[C],p=r[C],o.hasOwnProperty(C)&&(f!=null||p!=null))switch(C){case"value":f!==p&&(Pe=!0),J=f;break;case"defaultValue":f!==p&&(Pe=!0),oe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==p&&bt(e,n,C,f,o,p)}ro(e,J,oe);return;case"option":for(var Ce in r)if(J=r[Ce],r.hasOwnProperty(Ce)&&J!=null&&!o.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:bt(e,n,Ce,null,o,J)}for(V in o)if(J=o[V],oe=r[V],o.hasOwnProperty(V)&&J!==oe&&(J!=null||oe!=null))switch(V){case"selected":J!==oe&&(Pe=!0),e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:bt(e,n,V,J,o,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in r)J=r[Re],r.hasOwnProperty(Re)&&J!=null&&!o.hasOwnProperty(Re)&&bt(e,n,Re,null,o,J);for(te in o)if(J=o[te],oe=r[te],o.hasOwnProperty(te)&&J!==oe&&(J!=null||oe!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(l(137,n));break;default:bt(e,n,te,J,o,oe)}return;default:if(sl(n)){for(var Ze in r)J=r[Ze],r.hasOwnProperty(Ze)&&J!==void 0&&!o.hasOwnProperty(Ze)&&tm(e,n,Ze,void 0,o,J);for(de in o)J=o[de],oe=r[de],!o.hasOwnProperty(de)||J===oe||J===void 0&&oe===void 0||tm(e,n,de,J,o,oe);return}}for(var ee in r)J=r[ee],r.hasOwnProperty(ee)&&J!=null&&!o.hasOwnProperty(ee)&&bt(e,n,ee,null,o,J);for(ve in o)J=o[ve],oe=r[ve],!o.hasOwnProperty(ve)||J===oe||J==null&&oe==null||bt(e,n,ve,J,o,oe)}function ub(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eE(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,r=performance.getEntriesByType("resource"),o=0;o<r.length;o++){var f=r[o],p=f.transferSize,C=f.initiatorType,_=f.duration;if(p&&_&&ub(C)){for(C=0,_=f.responseEnd,o+=1;o<r.length;o++){var V=r[o],te=V.startTime;if(te>_)break;var de=V.transferSize,ve=V.initiatorType;de&&ub(ve)&&(V=V.responseEnd,C+=de*(V<_?1:(_-te)/(V-te)))}if(--o,n+=8*(p+C)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var nm=null,im=null;function Ys(e){return e.nodeType===9?e:e.ownerDocument}function db(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fb(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function hb(e,n,r,o){return r=Ys(r).createElement(e),r[Mt]=o,r[$t]=n,En(r,e,n),Q(r),r}function am(e,n){return e==="textarea"||e==="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 rm=null;function tE(){var e=window.event;return e&&e.type==="popstate"?e===rm?!1:(rm=e,!0):(rm=null,!1)}var lm=typeof setTimeout=="function"?setTimeout:void 0,nE=typeof clearTimeout=="function"?clearTimeout:void 0,mb=typeof Promise=="function"?Promise:void 0,pb=typeof requestAnimationFrame=="function"?requestAnimationFrame:lm,iE=typeof queueMicrotask=="function"?queueMicrotask:typeof mb<"u"?function(e){return mb.resolve(null).then(e).catch(aE)}:lm;function aE(e){setTimeout(function(){throw e})}function Ur(e){return e==="head"}function gb(e,n){var r=n,o=0;do{var f=r.nextSibling;if(e.removeChild(r),f&&f.nodeType===8)if(r=f.data,r==="/$"||r==="/&"){if(o===0){e.removeChild(f),Uo(n);return}o--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")o++;else if(r==="html")mm(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,mm(r);for(var p=r.firstChild;p;){var C=p.nextSibling,_=p.nodeName;p[ga]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=C}}else r==="body"&&mm(e.ownerDocument.body);r=f}while(r);Uo(n)}function vb(e,n){var r=e;e=0;do{var o=r.nextSibling;if(r.nodeType===1?n?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(n?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=o}while(r)}function yb(e,n,r){if(n=CSS.escape(n)!==n?"r-"+btoa(n).replace(/=/g,""):n,e.style.viewTransitionName=n,r!=null&&(e.style.viewTransitionClass=r),r=getComputedStyle(e),r.display==="inline"){if(n=e.getClientRects(),n.length===1)var o=1;else for(var f=o=0;f<n.length;f++){var p=n[f];0<p.width&&0<p.height&&o++}o===1&&(e=e.style,e.display=n.length===1?"inline-block":"block",e.marginTop="-"+r.paddingTop,e.marginBottom="-"+r.paddingBottom)}}function bb(e,n){e=e.style,n=n.style;var r=n!=null?n.hasOwnProperty("viewTransitionName")?n.viewTransitionName:n.hasOwnProperty("view-transition-name")?n["view-transition-name"]:null:null;e.viewTransitionName=r==null||typeof r=="boolean"?"":(""+r).trim(),r=n!=null?n.hasOwnProperty("viewTransitionClass")?n.viewTransitionClass:n.hasOwnProperty("view-transition-class")?n["view-transition-class"]:null:null,e.viewTransitionClass=r==null||typeof r=="boolean"?"":(""+r).trim(),e.display==="inline-block"&&(n==null?e.display=e.margin="":(r=n.display,e.display=r==null||typeof r=="boolean"?"":r,r=n.margin,r!=null?e.margin=r:(r=n.hasOwnProperty("marginTop")?n.marginTop:n["margin-top"],e.marginTop=r==null||typeof r=="boolean"?"":r,n=n.hasOwnProperty("marginBottom")?n.marginBottom:n["margin-bottom"],e.marginBottom=n==null||typeof n=="boolean"?"":n)))}function rE(e,n,r){return r=r.ownerDocument.defaultView,{rect:e,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<=e.bottom&&0<=e.right&&e.top<=r.innerHeight&&e.left<=r.innerWidth}}function om(e){var n=e.getBoundingClientRect(),r=getComputedStyle(e);return rE(n,r,e)}function lE(e){return e.documentElement.clientHeight}function oE(e){this.addEventListener("load",e),this.addEventListener("error",e)}function sE(e,n,r,o,f,p,C,_,V){var te=n.nodeType===9?n:n.ownerDocument;try{var de=te.startViewTransition({update:function(){var J=te.defaultView,oe=J.navigation&&J.navigation.transition,Ce=te.fonts.status;o();var Re=[];if(Ce==="loaded"&&(lE(te),te.fonts.status==="loading"&&Re.push(te.fonts.ready)),Ce=Re.length,e!==null)for(var Ze=e.suspenseyImages,ee=0,K=0;K<Ze.length;K++){var ae=Ze[K];if(!ae.complete){var ge=ae.getBoundingClientRect();if(0<ge.bottom&&0<ge.right&&ge.top<J.innerHeight&&ge.left<J.innerWidth){if(ee+=Hb(ae),ee>Vu){Re.length=Ce;break}ae=new Promise(oE.bind(ae)),Re.push(ae)}}}if(0<Re.length)return J=Promise.race([Promise.all(Re),new Promise(function(Me){return setTimeout(Me,500)})]).then(f,f),(oe?Promise.allSettled([oe.finished,J]):J).then(p,p);if(f(),oe)return oe.finished.then(p,p);p()},types:r});te.__reactViewTransition=de;var ve=[];return de.ready.then(function(){for(var J=te.documentElement.getAnimations({subtree:!0}),oe=0;oe<J.length;oe++){var Ce=J[oe],Re=Ce.effect,Ze=Re.pseudoElement;if(Ze!=null&&Ze.startsWith("::view-transition")){ve.push(Ce),Ce=Re.getKeyframes();for(var ee=Ze=void 0,K=!0,ae=0;ae<Ce.length;ae++){var ge=Ce[ae],Me=ge.width;if(Ze===void 0)Ze=Me;else if(Ze!==Me){K=!1;break}if(Me=ge.height,ee===void 0)ee=Me;else if(ee!==Me){K=!1;break}delete ge.width,delete ge.height,ge.transform==="none"&&delete ge.transform}K&&Ze!==void 0&&ee!==void 0&&(Re.setKeyframes(Ce),K=getComputedStyle(Re.target,Re.pseudoElement),K.width!==Ze||K.height!==ee)&&(K=Ce[0],K.width=Ze,K.height=ee,K=Ce[Ce.length-1],K.width=Ze,K.height=ee,Re.setKeyframes(Ce))}}C()},function(J){te.__reactViewTransition===de&&(te.__reactViewTransition=null);try{if(typeof J=="object"&&J!==null)switch(J.name){case"InvalidStateError":(J.message==="View transition was skipped because document visibility state is hidden."||J.message==="Skipping view transition because document visibility state has become hidden."||J.message==="Skipping view transition because viewport size changed."||J.message==="Transition was aborted because of invalid state")&&(J=null)}J!==null&&V(J)}finally{o(),f(),C()}}),de.finished.finally(function(){for(var J=0;J<ve.length;J++)ve[J].cancel();te.__reactViewTransition===de&&(te.__reactViewTransition=null),_()}),de}catch{return o(),f(),C(),null}}function _l(e,n){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+n+")"}_l.prototype.animate=function(e,n){return n=typeof n=="number"?{duration:n}:B({},n),n.pseudoElement=this._selector,this._scope.animate(e,n)},_l.prototype.getAnimations=function(){for(var e=this._scope,n=this._selector,r=e.getAnimations({subtree:!0}),o=[],f=0;f<r.length;f++){var p=r[f].effect;p!==null&&p.target===e&&p.pseudoElement===n&&o.push(r[f])}return o},_l.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function xb(e){return{name:e,group:new _l("group",e),imagePair:new _l("image-pair",e),old:new _l("old",e),new:new _l("new",e)}}function Ei(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ei.prototype.addEventListener=function(e,n,r){var o=null,f=null;if(!(r!=null&&typeof r!="boolean"&&(o=r.signal||null,o!==null&&o.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var p=this._eventListeners;if(Sb(p,e,n,r)===-1){var C=this,_=n;r!=null&&typeof r!="boolean"&&r.once===!0&&(_=function(V){C.removeEventListener(e,n,r),typeof n=="function"?n.call(this,V):n.handleEvent(V)}),o!==null&&(f=C.removeEventListener.bind(C,e,n,r),o.addEventListener("abort",f,{once:!0}),f=o.removeEventListener.bind(o,"abort",f)),o=zo(r),p.push({type:e,listener:n,optionsOrUseCapture:r,attachedListener:_,cleanup:f}),g(this._fragmentFiber.child,!1,cE,e,_,o)}this._eventListeners=p}};function cE(e,n,r,o){return N(e).addEventListener(n,r,o),!1}Ei.prototype.removeEventListener=function(e,n,r){var o=this._eventListeners;if(o!==null&&(n=Sb(o,e,n,r),n!==-1)){var f=o[n];r=f.attachedListener;var p=f.cleanup;f=zo(f.optionsOrUseCapture),g(this._fragmentFiber.child,!1,uE,e,r,f),o.splice(n,1),p!==null&&p()}};function uE(e,n,r,o){return N(e).removeEventListener(n,r,o),!1}function zo(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function jb(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Sb(e,n,r,o){if(e.length===0)return-1;o=jb(o);for(var f=0;f<e.length;f++){var p=e[f];if(p.type===n&&p.listener===r&&jb(p.optionsOrUseCapture)===o)return f}return-1}Ei.prototype.dispatchEvent=function(e){var n=b(this._fragmentFiber);if(n===null)return!0;n=N(n);var r=this._eventListeners;if(r!==null&&0<r.length||!e.bubbles){var o=n.nodeType===9?n.createComment(""):document.createTextNode("");if(r)for(var f=0;f<r.length;f++){var p=r[f];o.addEventListener(p.type,p.attachedListener,zo(p.optionsOrUseCapture))}if(n.appendChild(o),e=o.dispatchEvent(e),r)for(f=0;f<r.length;f++)p=r[f],o.removeEventListener(p.type,p.attachedListener,zo(p.optionsOrUseCapture));return n.removeChild(o),e}return n.dispatchEvent(e)},Ei.prototype.focus=function(e){g(this._fragmentFiber.child,!0,wb,e,void 0,void 0)};function wb(e,n){return e.tag===6?!1:(e=N(e),SE(e,n))}Ei.prototype.focusLast=function(e){var n=[];g(this._fragmentFiber.child,!0,sm,n,void 0,void 0);for(var r=n.length-1;0<=r&&!wb(n[r],e);r--);};function sm(e,n){return n.push(e),!1}Ei.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=N(e),e=Ys(e).activeElement,e!==null&&g(this._fragmentFiber.child,!1,dE,e,void 0,void 0))};function dE(e,n){return e.tag===6?!1:(e=N(e),e===n||e.contains(n)?(n.blur(),!0):!1)}Ei.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),g(this._fragmentFiber.child,!1,fE,e,void 0,void 0)};function fE(e,n){return e.tag===6||(e=N(e),n.observe(e)),!1}Ei.prototype.unobserveUsing=function(e){var n=this._observers;if(n!==null&&n.has(e)){n.delete(e),g(this._fragmentFiber.child,!1,hE,e,void 0,void 0);for(var r=n=0;r<na.length;r++){var o=na[r];o.fragmentInstance===this&&o.observer===e?e.unobserve(o.instance):na[n++]=o}na.length=n}};function hE(e,n){return e.tag===6||(e=N(e),n.unobserve(e)),!1}var na=[],cm=!1;function mE(e,n,r){na.push({fragmentInstance:e,observer:n,instance:r}),cm||(cm=!0,wE(function(){cm=!1;var o=na;na=[];for(var f=0;f<o.length;f++){var p=o[f];p.observer.unobserve(p.instance)}}))}Ei.prototype.getClientRects=function(){var e=[];return g(this._fragmentFiber.child,!1,pE,e,void 0,void 0),e};function pE(e,n){if(e.tag===6){e=e.stateNode;var r=e.ownerDocument.createRange();r.selectNodeContents(e),n.push.apply(n,r.getClientRects())}else e=N(e),n.push.apply(n,e.getClientRects());return!1}Ei.prototype.getRootNode=function(e){var n=b(this._fragmentFiber);return n===null?this:N(n).getRootNode(e)},Ei.prototype.compareDocumentPosition=function(e){var n=b(this._fragmentFiber);if(n===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var r=[];g(this._fragmentFiber.child,!1,sm,r,void 0,void 0);var o=N(n);if(r.length===0){if(r=o,x(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&&(r=n)}n=this._fragmentFiber;var f=o=r.compareDocumentPosition(e);return r===e?f=Node.DOCUMENT_POSITION_CONTAINS:o&Node.DOCUMENT_POSITION_CONTAINED_BY&&(r=S(n)[1],r===null?f=Node.DOCUMENT_POSITION_PRECEDING:(e=N(r).compareDocumentPosition(e),f=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}n=N(r[0]),f=N(r[r.length-1]);var p=x(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(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var C=n.compareDocumentPosition(e),_=f.compareDocumentPosition(e),V=C&Node.DOCUMENT_POSITION_CONTAINED_BY||_&Node.DOCUMENT_POSITION_CONTAINED_BY;return _=o&&p&&C&Node.DOCUMENT_POSITION_FOLLOWING&&_&Node.DOCUMENT_POSITION_PRECEDING,n=o&&n===e||p&&f===e||V||_?Node.DOCUMENT_POSITION_CONTAINED_BY:!o&&n===e||!p&&f===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:C,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||gE(n,this._fragmentFiber,r[0],r[r.length-1],e)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function gE(e,n,r,o,f){var p=ti(f);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(r=!!p)e:{for(;p!==null;){if(p.tag===7&&(p===n||p.alternate===n)){r=!0;break e}p=p.return}r=!1}return r}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(p===null)return p=f.ownerDocument,f===p||f===p.documentElement||f===p.body;e:{for(p=n,n=b(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 e&Node.DOCUMENT_POSITION_PRECEDING?((n=!!p)&&!(n=p===r)&&(n=O(r,p,I),n===null?n=!1:(g(n,!0,A,p,r),p=E,E=null,n=p!==null)),n):e&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!p)&&!(n=p===o)&&(n=O(o,p,I),n===null?n=!1:(g(n,!0,M,p,o),p=E,T=E=null,n=p!==null)),n):!1}function kb(e,n){var r=e.ownerDocument.createRange();r.selectNodeContents(e),e=r.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,n?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Ei.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(l(566));var n=[];g(this._fragmentFiber.child,!1,sm,n,void 0,void 0);var r=e!==!1;if(n.length===0){var o=S(this._fragmentFiber);if(o=r?o[1]||o[0]||b(this._fragmentFiber):o[0]||o[1],o===null)return;if(o.tag===6){e=N(o),kb(e,r);return}if(o=N(o),o.nodeType!==9){if(o.nodeType===11){r="host"in o?o.host:null,r!==null&&r.scrollIntoView(e);return}o.scrollIntoView(e)}}for(o=r?n.length-1:0;o!==(r?-1:n.length);){var f=n[o];f.tag===6?(f=N(f),kb(f,r)):N(f).scrollIntoView(e),o+=r?-1:1}};function vE(e,n){return e=N(e),Cb(e,n),!1}function Cb(e,n){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(n)}function Nb(e,n){var r=n._eventListeners;if(r!==null)for(var o=0;o<r.length;o++){var f=r[o];e.addEventListener(f.type,f.attachedListener,zo(f.optionsOrUseCapture))}e.nodeType!==3&&(r=n._observers,r!==null&&r.forEach(function(p){for(var C=0,_=0;_<na.length;_++){var V=na[_];(V.fragmentInstance!==n||V.observer!==p||V.instance!==e)&&(na[C++]=V)}na.length=C,p.observe(e)}),Cb(e,n))}function yE(e,n){var r=n._eventListeners;if(r!==null)for(var o=0;o<r.length;o++){var f=r[o];e.removeEventListener(f.type,f.attachedListener,zo(f.optionsOrUseCapture))}e.nodeType!==3&&(r=n._observers,r!==null&&r.forEach(function(p){typeof p.rootMargin=="string"?mE(n,p,e):p.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(n))}function um(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":um(r),Va(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function bE(e,n,r,o){for(;e.nodeType===1;){var f=r;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ga])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var p=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=Pi(e.nextSibling),e===null)break}return null}function xE(e,n,r){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Pi(e.nextSibling),e===null))return null;return e}function Eb(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Pi(e.nextSibling),e===null))return null;return e}function dm(e){return e.data==="$?"||e.data==="$~"}function fm(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jE(e,n){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||r.readyState!=="loading")n();else{var o=function(){n(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Pi(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var hm=null;function Tb(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(n===0)return Pi(e.nextSibling);n--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||n++}e=e.nextSibling}return null}function Ab(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(n===0)return e;n--}else r!=="/$"&&r!=="/&"||n++}e=e.previousSibling}return null}function SE(e,n){function r(){o=!0}if(e.ownerDocument.activeElement===e)return!0;var o=!1;try{e.ownerDocument.addEventListener("focus",r,!0),(e.focus||HTMLElement.prototype.focus).call(e,n)}finally{e.ownerDocument.removeEventListener("focus",r,!0)}return o}function wE(e){pb(function(){pb(function(n){return e(n)})})}function Mb(e,n,r){switch(n=Ys(r),e){case"html":if(e=n.documentElement,!e)throw Error(l(452));return e;case"head":if(e=n.head,!e)throw Error(l(453));return e;case"body":if(e=n.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Ob(e,n,r){for(var o in r){var f=r[o];r.hasOwnProperty(o)&&f!=null&&bt(e,n,o,null,JN,f)}r.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Fn&&(e.onclick=null),Va(e)}function mm(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Va(e)}var Hi=new Map,_b=new Set;function Gs(e){if(typeof e.getRootNode=="function"){var n=e.getRootNode();if(n.nodeType===9||n.nodeType===11)return n}return e.nodeType===9?e:e.ownerDocument}var ar=he.d;he.d={f:kE,r:CE,D:NE,C:EE,L:TE,m:AE,X:OE,S:ME,M:_E};function kE(){var e=ar.f(),n=zu();return e||n}function CE(e){var n=va(e);n!==null&&n.tag===5&&n.type==="form"?Dy(n):ar.r(e)}var Lo=typeof document>"u"?null:document;function Rb(e,n,r){var o=Lo;if(o&&typeof n=="string"&&n){var f=Ot(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),_b.has(f)||(_b.add(f),e={rel:e,crossOrigin:r,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),En(n,"link",e),Q(n),o.head.appendChild(n)))}}function NE(e){ar.D(e),Rb("dns-prefetch",e,null)}function EE(e,n){ar.C(e,n),Rb("preconnect",e,n)}function TE(e,n,r){ar.L(e,n,r);var o=Lo;if(o&&e&&n){var f='link[rel="preload"][as="'+Ot(n)+'"]';n==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+Ot(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+Ot(r.imageSizes)+'"]')):f+='[href="'+Ot(e)+'"]';var p=f;switch(n){case"style":p=Io(e);break;case"script":p=Bo(e)}if(!(Hi.has(p)||(e=B({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:e,as:n},r),Hi.set(p,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(Xs(p))||n==="script"&&o.querySelector(Qs(p))))){var C=o.createElement("link");En(C,"link",e),n==="style"&&(C[Fa]=!0,C.onload=C.onerror=function(){me(C)}),Q(C),o.head.appendChild(C)}}}function AE(e,n){ar.m(e,n);var r=Lo;if(r&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Ot(o)+'"][href="'+Ot(e)+'"]',p=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Bo(e)}if(!Hi.has(p)&&(e=B({rel:"modulepreload",href:e},n),Hi.set(p,e),r.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Qs(p)))return}o=r.createElement("link"),En(o,"link",e),Q(o),r.head.appendChild(o)}}}function ME(e,n,r){ar.S(e,n,r);var o=Lo;if(o&&e){var f=z(o).hoistableStyles,p=Io(e);n=n||"default";var C=f.get(p);if(!C){var _={loading:0,preload:null};if(C=o.querySelector(Xs(p)))_.loading=5;else{e=B({rel:"stylesheet",href:e,"data-precedence":n},r),(r=Hi.get(p))&&pm(e,r);var V=C=o.createElement("link");Q(V),En(V,"link",e),V._p=new Promise(function(te,de){V.onload=te,V.onerror=de}),V.addEventListener("load",function(){_.loading|=1}),V.addEventListener("error",function(){_.loading|=2}),_.loading|=4,qu(C,n,o)}C={type:"stylesheet",instance:C,count:1,state:_},f.set(p,C)}}}function OE(e,n){ar.X(e,n);var r=Lo;if(r&&e){var o=z(r).hoistableScripts,f=Bo(e),p=o.get(f);p||(p=r.querySelector(Qs(f)),p||(e=B({src:e,async:!0},n),(n=Hi.get(f))&&gm(e,n),p=r.createElement("script"),Q(p),En(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(f,p))}}function _E(e,n){ar.M(e,n);var r=Lo;if(r&&e){var o=z(r).hoistableScripts,f=Bo(e),p=o.get(f);p||(p=r.querySelector(Qs(f)),p||(e=B({src:e,async:!0,type:"module"},n),(n=Hi.get(f))&&gm(e,n),p=r.createElement("script"),Q(p),En(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(f,p))}}function Db(e,n,r,o){var f=(f=vn.current)?Gs(f):null;if(!f)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(r=Io(r.href),n=z(f).hoistableStyles,o=n.get(r),o||(o={type:"style",instance:null,count:0,state:null},n.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Io(r.href);var p=z(f).hoistableStyles,C=p.get(e);if(C||(f=f.ownerDocument||f,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,C),(p=f.querySelector(Xs(e)))?p._p||(C.instance=p,C.state.loading=5):(p=Hi.get(e),p||(p={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Hi.set(e,p)),RE(f,e,p,C.state))),n&&o===null)throw Error(l(528,""));return C}if(n&&o!==null)throw Error(l(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(r=Bo(r),n=z(f).hoistableScripts,o=n.get(r),o||(o={type:"script",instance:null,count:0,state:null},n.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Io(e){return'href="'+Ot(e)+'"'}function Xs(e){return'link[rel="stylesheet"]['+e+"]"}function zb(e){return B({},e,{"data-precedence":e.precedence,precedence:null})}function RE(e,n,r,o){if(n=e.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Fa]!==!0){o.loading=1;return}}else n=e.createElement("link"),n[Fa]=!0,n.onload=n.onerror=me.bind(null,n),En(n,"link",r),Q(n),e.head.appendChild(n);o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2})}function Bo(e){return'[src="'+Ot(e)+'"]'}function Qs(e){return"script[async]"+e}function Lb(e,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Ot(r.href)+'"]');if(o)return n.instance=o,Q(o),o;var f=B({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Q(o),En(o,"style",f),qu(o,r.precedence,e),n.instance=o;case"stylesheet":f=Io(r.href);var p=e.querySelector(Xs(f));if(p)return n.state.loading|=4,n.instance=p,Q(p),p;o=zb(r),(f=Hi.get(f))&&pm(o,f),p=(e.ownerDocument||e).createElement("link"),Q(p);var C=p;return C._p=new Promise(function(_,V){C.onload=_,C.onerror=V}),En(p,"link",o),n.state.loading|=4,qu(p,r.precedence,e),n.instance=p;case"script":return p=Bo(r.src),(f=e.querySelector(Qs(p)))?(n.instance=f,Q(f),f):(o=r,(f=Hi.get(p))&&(o=B({},r),gm(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),Q(f),En(f,"link",o),e.head.appendChild(f),n.instance=f);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,qu(o,r.precedence,e));return n.instance}function qu(e,n,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,p=f,C=0;C<o.length;C++){var _=o[C];if(_.dataset.precedence===n)p=_;else if(p!==f)break}p?p.parentNode.insertBefore(e,p.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(e,n.firstChild))}function pm(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function gm(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Fu=null;function Ib(e,n,r){if(Fu===null){var o=new Map,f=Fu=new Map;f.set(r,o)}else f=Fu,o=f.get(r),o||(o=new Map,f.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),f=0;f<r.length;f++){var p=r[f];if(!(p[ga]||p[Mt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var C=p.getAttribute(n)||"";C=e+C;var _=o.get(C);_?_.push(p):o.set(C,[p])}}return o}function vm(e,n,r){e=e.ownerDocument||e,e.head.insertBefore(r,n==="title"?e.querySelector("head > title"):null)}function DE(e,n,r){if(r===1||n.itemProp!=null)return!1;switch(e){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 e=n.disabled,typeof n.precedence=="string"&&e==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 Bb(e,n){return e==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function Pb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Hb(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Ub(e,n){typeof n.decode=="function"&&(e.imgCount++,n.complete||(e.imgBytes+=Hb(n),e.suspenseyImages.push(n)),e=IE.bind(e),n.decode().then(e,e))}function zE(e,n,r,o){if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var f=Io(o.href),p=n.querySelector(Xs(f));if(p){n=p._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Ks.bind(e),n.then(e,e)),r.state.loading|=4,r.instance=p,Q(p);return}p=n.ownerDocument||n,o=zb(o),(f=Hi.get(f))&&pm(o,f),p=p.createElement("link"),Q(p);var C=p;C._p=new Promise(function(_,V){C.onload=_,C.onerror=V}),En(p,"link",o),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=Ks.bind(e),n.addEventListener("load",r),n.addEventListener("error",r))}}var Vu=0;function LE(e,n){return e.stylesheets&&e.count===0&&Yu(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var o=setTimeout(function(){if(e.stylesheets&&Yu(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+n);0<e.imgBytes&&Vu===0&&(Vu=62500*eE());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Yu(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Vu?50:800)+n);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function qb(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Yu(e,e.stylesheets);else if(e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}}}function Ks(){this.count--,qb(this)}function IE(){this.imgCount--,qb(this)}var $u=null;function Yu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$u=new Map,n.forEach(BE,e),$u=null,Ks.call(e))}function BE(e,n){if(!(n.state.loading&4)){var r=$u.get(e);if(r)var o=r.get(null);else{r=new Map,$u.set(e,r);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var C=f[p];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(r.set(C.dataset.precedence,C),o=C)}o&&r.set(null,o)}f=n.instance,C=f.getAttribute("data-precedence"),p=r.get(C)||o,p===o&&r.set(null,f),r.set(C,f),this.count++,o=Ks.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),p?p.parentNode.insertBefore(f,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Po={$$typeof:U,Provider:null,Consumer:null,_currentValue:Ne,_currentValue2:Ne,_threadCount:0};function PE(e,n,r,o,f,p,C,_,V){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=gr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gr(0),this.hiddenUpdates=gr(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.transitionTypes=null,this.incompleteTransitions=new Map}function Fb(e,n,r,o,f,p,C,_,V,te,de,ve){return e=new PE(e,n,r,C,V,te,de,ve,_),n=1,p===!0&&(n|=24),p=ii(3,null,null,n),e.current=p,p.stateNode=e,n=_f(),n.refCount++,e.pooledCache=n,n.refCount++,p.memoizedState={element:o,isDehydrated:r,cache:n},Lf(p),e}function Vb(e){return e?(e=uo,e):uo}function $b(e,n,r,o,f,p){f=Vb(f),o.context===null?o.context=f:o.pendingContext=f,o=Ar(n),o.payload={element:r},p=p===void 0?null:p,p!==null&&(o.callback=p),r=Mr(e,o,n),r!==null&&(oi(r,e,n),Es(r,e,n))}function Yb(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function ym(e,n){Yb(e,n),(e=e.alternate)&&Yb(e,n)}function Gb(e){if(e.tag===13||e.tag===31){var n=pl(e,67108864);n!==null&&oi(n,e,67108864),ym(e,67108864)}}function Xb(e){if(e.tag===13||e.tag===31){var n=Ni();n=ma(n);var r=pl(e,n);r!==null&&oi(r,e,n),ym(e,n)}}var Ho=!0;function HE(e,n,r,o){var f=se.T;se.T=null;var p=he.p;try{he.p=2,bm(e,n,r,o)}finally{he.p=p,se.T=f}}function UE(e,n,r,o){var f=se.T;se.T=null;var p=he.p;try{he.p=8,bm(e,n,r,o)}finally{he.p=p,se.T=f}}function bm(e,n,r,o){if(Ho){var f=xm(o);if(f===null)em(e,n,o,Gu,r),Kb(e,o);else if(FE(f,e,n,r,o))o.stopPropagation();else if(Kb(e,o),n&4&&-1<qE.indexOf(e)){for(;f!==null;){var p=va(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var C=Ki(p.pendingLanes);if(C!==0){var _=p;for(_.pendingLanes|=2,_.entangledLanes|=2;C;){var V=1<<31-Vt(C);_.entanglements[1]|=V,C&=~V}Ea(p),(pt&6)===0&&(_u=Gt()+500,Fs(0))}}break;case 31:case 13:_=pl(p,2),_!==null&&oi(_,p,2),zu(),ym(p,2)}if(p=xm(o),p===null&&em(e,n,o,Gu,r),p===f)break;f=p}f!==null&&o.stopPropagation()}else em(e,n,o,null,r)}}function xm(e){return e=ul(e),jm(e)}var Gu=null;function jm(e){if(Gu=null,e=ti(e),e!==null){var n=u(e);if(n===null)e=null;else{var r=n.tag;if(r===13){if(e=d(n),e!==null)return e;e=null}else if(r===31){if(e=h(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Gu=e,null}function Qb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(al()){case sa:return 2;case ca:return 8;case bn:case fi:return 32;case rl:return 268435456;default:return 32}default:return 32}}var Sm=!1,qr=null,Fr=null,Vr=null,Zs=new Map,Js=new Map,$r=[],qE="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 Kb(e,n){switch(e){case"focusin":case"focusout":qr=null;break;case"dragenter":case"dragleave":Fr=null;break;case"mouseover":case"mouseout":Vr=null;break;case"pointerover":case"pointerout":Zs.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(n.pointerId)}}function Ws(e,n,r,o,f,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:r,eventSystemFlags:o,nativeEvent:p,targetContainers:[f]},n!==null&&(n=va(n),n!==null&&Gb(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function FE(e,n,r,o,f){switch(n){case"focusin":return qr=Ws(qr,e,n,r,o,f),!0;case"dragenter":return Fr=Ws(Fr,e,n,r,o,f),!0;case"mouseover":return Vr=Ws(Vr,e,n,r,o,f),!0;case"pointerover":var p=f.pointerId;return Zs.set(p,Ws(Zs.get(p)||null,e,n,r,o,f)),!0;case"gotpointercapture":return p=f.pointerId,Js.set(p,Ws(Js.get(p)||null,e,n,r,o,f)),!0}return!1}function Zb(e){var n=ti(e.target);if(n!==null){var r=u(n);if(r!==null){if(n=r.tag,n===13){if(n=d(r),n!==null){e.blockedOn=n,Rn(e.priority,function(){Xb(r)});return}}else if(n===31){if(n=h(r),n!==null){e.blockedOn=n,Rn(e.priority,function(){Xb(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=xm(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);cl=o,r.target.dispatchEvent(o),cl=null}else return n=va(r),n!==null&&Gb(n),e.blockedOn=r,!1;n.shift()}return!0}function Jb(e,n,r){Xu(e)&&r.delete(n)}function VE(){Sm=!1,qr!==null&&Xu(qr)&&(qr=null),Fr!==null&&Xu(Fr)&&(Fr=null),Vr!==null&&Xu(Vr)&&(Vr=null),Zs.forEach(Jb),Js.forEach(Jb)}function Qu(e,n){e.blockedOn===n&&(e.blockedOn=null,Sm||(Sm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,VE)))}var Ku=null;function Wb(e){Ku!==e&&(Ku=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ku===e&&(Ku=null);for(var n=0;n<e.length;n+=3){var r=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(jm(o||r)===null)continue;break}var p=va(r);p!==null&&(e.splice(n,3),n-=3,ih(p,{pending:!0,data:f,method:r.method,action:o},o,f))}}))}function Uo(e){function n(V){return Qu(V,e)}qr!==null&&Qu(qr,e),Fr!==null&&Qu(Fr,e),Vr!==null&&Qu(Vr,e),Zs.forEach(n),Js.forEach(n);for(var r=0;r<$r.length;r++){var o=$r[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<$r.length&&(r=$r[0],r.blockedOn===null);)Zb(r),r.blockedOn===null&&$r.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var f=r[o],p=r[o+1],C=f[$t]||null;if(typeof p=="function")C||Wb(r);else if(C){var _=null;if(p&&p.hasAttribute("formAction")){if(f=p,C=p[$t]||null)_=C.formAction;else if(jm(f)!==null)continue}else _=C.action;typeof _=="function"?r[o+1]=_:(r.splice(o,3),o-=3),Wb(r)}}}function ex(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(C){return f=C})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(r,20)}function r(){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,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(r,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function wm(e){this._internalRoot=e}Zu.prototype.render=wm.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(l(409));var r=n.current,o=Ni();$b(r,o,e,n,null,null)},Zu.prototype.unmount=wm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;$b(e.current,2,null,e,null,null),zu(),n[xn]=null}};function Zu(e){this._internalRoot=e}Zu.prototype.unstable_scheduleHydration=function(e){if(e){var n=ei();e={blockedOn:null,target:e,priority:n};for(var r=0;r<$r.length&&n!==0&&n<$r[r].priority;r++);$r.splice(r,0,e),r===0&&Zb(e)}};var tx=i.version;if(tx!=="19.3.0")throw Error(l(527,tx,"19.3.0"));he.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=v(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var $E={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:se,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ju.isDisabled&&Ju.supportsFiber)try{Gi=Ju.inject($E),sn=Ju}catch{}}return nc.createRoot=function(e,n){if(!s(e))throw Error(l(299));var r=!1,o="",f=Vy,p=$y,C=Yy;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(C=n.onRecoverableError)),n=Fb(e,1,!1,null,null,r,o,null,f,p,C,ex),e[xn]=n.current,Wh(e),new wm(n)},nc.hydrateRoot=function(e,n,r){if(!s(e))throw Error(l(299));var o=!1,f="",p=Vy,C=$y,_=Yy,V=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(C=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError),r.formState!==void 0&&(V=r.formState)),n=Fb(e,1,!0,n,r??null,o,f,V,p,C,_,ex),n.context=Vb(null),r=n.current,o=Ni(),o=ma(o),f=Ar(o),f.callback=null,Mr(r,f,o),r=o,n.current.lanes=r,Zn(n,r),Ea(n),e[xn]=n.current,Wh(e),new Zu(n)},nc.version="19.3.0",nc}var mx;function aT(){if(mx)return Em.exports;mx=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Em.exports=iT(),Em.exports}var rT=aT();const lT={"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.chatAccessChanged":"Chat access has changed.","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"},oT={"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"},sT={"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"},cT={"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"},uT={"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","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}"},dT={"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."},fT={...lT,...oT,...sT,...cT,...uT,...dT},hT={"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.chatAccessChanged":"聊天访问权限已变化。","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 信息"},mT={"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 列表读取失败"},pT={"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":"只读"},gT={"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":"运行","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}"},yT={"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":"好了:线程面板现在打开就停在最新回复,不会再跳。构建通过,截图先没动。"},bT={...hT,...mT,...pT,...gT,...vT,...yT},u2=["en","zh"],d2={en:fT,zh:bT},Sc={en:"en",zh:"zh-CN"},f2="jarvy-locale";function xT(){var a;const t=localStorage.getItem(f2);if(t==="en"||t==="zh")return t;const i=((a=navigator.languages)!=null&&a.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 Da=xT();document.documentElement.lang=Sc[Da];const pp=new Set,ag=()=>Da;function h2(t){if(t!==Da){Da=t,localStorage.setItem(f2,t),document.documentElement.lang=Sc[t];for(const i of pp)i()}}function m2(){return w.useSyncExternalStore(t=>(pp.add(t),()=>{pp.delete(t)}),ag)}const gp=(t,i)=>d2[t][i==="name"?"locale.name":"locale.short"];function p2(t,i){const a=d2[Da][t];return typeof a=="string"?a:new Intl.PluralRules(Sc[Da]).select(Number(i))==="one"?a.one:a.other}function j(t,i){const a=p2(t,i==null?void 0:i.count);return i?a.replace(/\{(\w+)\}/g,(l,s)=>s in i?String(i[s]):l):a}const Pa=(t,i)=>new Date(t).toLocaleString(Sc[Da],i),sc=t=>Pa(t,{hour:Da==="zh"?"2-digit":"numeric",minute:"2-digit"}),jT=t=>{const i=new Date(t).getFullYear()===new Date().getFullYear();return Pa(t,{year:i?void 0:"numeric",month:Da==="zh"?"numeric":"short",day:"numeric"})},Zo=(t,i)=>new Intl.NumberFormat(Sc[Da],i).format(t);function g2(t,i){return p2(t,i.count).split(/\{(\w+)\}/).map((a,l)=>c.jsx(w.Fragment,{children:l%2?i[a]??`{${a}}`:a},l))}class Jo extends Error{constructor(i,a,l,s){super(a),this.status=i,this.code=l,this.params=s}}async function Oe(t,i={}){let a;try{a=await fetch(`/api${t}`,{...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 a.json().catch(()=>({}));if(!a.ok)throw v2(a.status,l);return l}const v2=(t,i)=>{const a=typeof i=="object"&&i!==null?i:{};return new Jo(t,a.error===void 0?`HTTP ${t}`:String(a.error),typeof a.code=="string"?a.code:void 0,a.params)};function ST(t,i,a){return new Promise((l,s)=>{const u=new XMLHttpRequest;u.open("POST",`/api/chats/${t}/attachments`),u.setRequestHeader("Content-Type",i.type||"application/octet-stream"),u.setRequestHeader("X-File-Name",encodeURIComponent(i.name)),u.upload.onprogress=d=>{d.lengthComputable&&(a==null||a(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(v2(u.status,d))},u.send(i)})}async function wT(t,i=0){const a=[];let l=i;for(;;){const s=await Oe(`/chats/${t}/messages?after=${l}&limit=1000`);if(a.push(...s.messages),!s.hasMore)return{messages:a};if(s.nextSequence<=l)throw new Error(j("api.historyFailed"));l=s.nextSequence}}const St=t=>JSON.stringify(t),je={me:()=>Oe("/me"),search:(t,i)=>Oe(`/search?q=${encodeURIComponent(t)}${i?`&in=${i}`:""}&limit=60`),login:(t,i)=>Oe("/login",{method:"POST",body:St({username:t,password:i})}),logout:()=>Oe("/logout",{method:"POST"}),bots:()=>Oe("/bots"),createBot:t=>Oe("/bots",{method:"POST",body:St({name:t})}),saveBot:(t,i)=>Oe(`/bots/${t}`,{method:"PUT",body:St(i)}),modelOptions:()=>Oe("/model-options"),selectBotModel:(t,i,a,l)=>Oe(`/bots/${t}/model`,{method:"PUT",body:St({connectionId:i,modelId:a,thinkingLevel:l})}),answerQuestion:(t,i,a)=>Oe(`/chats/${t}/questions/${i}`,{method:"POST",body:St(a)}),setBotColor:(t,i)=>Oe(`/bots/${t}/color`,{method:"PUT",body:St({color:i})}),chats:()=>Oe("/chats"),createChat:t=>Oe("/chats",{method:"POST",body:St({botId:t})}),deleteChat:t=>Oe(`/chats/${t}`,{method:"DELETE"}),members:()=>Oe("/members"),sections:()=>Oe("/sections"),createSection:t=>Oe("/sections",{method:"POST",body:St(t)}),updateSection:(t,i)=>Oe(`/sections/${t}`,{method:"PATCH",body:St(i)}),deleteSection:t=>Oe(`/sections/${t}`,{method:"DELETE"}),createChannel:t=>Oe("/channels",{method:"POST",body:St(t)}),updateChannel:(t,i)=>Oe(`/chats/${t}`,{method:"PATCH",body:St(i)}),addMember:(t,i)=>Oe(`/chats/${t}/members`,{method:"POST",body:St({memberId:i})}),removeMember:(t,i)=>Oe(`/chats/${t}/members/${i}`,{method:"DELETE"}),setNote:(t,i)=>Oe(`/chats/${t}/note`,{method:"PUT",body:St({text:i})}),markRead:(t,i)=>Oe(`/chats/${t}/read`,{method:"POST",body:St({sequence:i})}),messages:wT,latestMessages:(t,i)=>Oe(`/chats/${t}/messages?tail=${i}`),olderMessages:(t,i,a)=>Oe(`/chats/${t}/messages?before=${i}&limit=${a}`),send:(t,i,a,l,s=!1,u,d=[])=>Oe(`/chats/${t}/messages`,{method:"POST",body:St({content:i,attachmentIds:a,clientMessageId:l,...s?{alsoToChannel:s}:{},...u?{replyTo:u}:{},...d.length?{quotes:d}:{}})}),react:(t,i,a)=>Oe(`/messages/${t}/reaction`,{method:"PUT",body:St({emoji:i,on:a})}),pin:(t,i)=>Oe(`/chats/${t}/pin`,{method:"PUT",body:St({pinned:i})}),mute:(t,i)=>Oe(`/chats/${t}/mute`,{method:"PUT",body:St({muted:i})}),deleteBot:(t,i)=>Oe(`/bots/${t}${i?"?files=delete":""}`,{method:"DELETE"}),chat:t=>Oe(`/chats/${t}`),message:t=>Oe(`/messages/${t}`),openThread:t=>Oe(`/messages/${t}/thread`,{method:"POST"}),channelThreads:t=>Oe(`/chats/${t}/threads`),followedThreads:()=>Oe("/threads"),updateThread:(t,i)=>Oe(`/chats/${t}`,{method:"PATCH",body:St(i)}),follow:(t,i)=>Oe(`/chats/${t}/follow`,{method:"PUT",body:St({following:i})}),botDirects:t=>Oe(`/members/${t}/dms`),botSubscriptions:t=>Oe(`/members/${t}/subscriptions`),controlBot:(t,i)=>Oe(`/bots/${t}/${i}`,{method:"POST"}),botStatus:t=>Oe(`/bots/${t}/status`),uploadAttachment:ST,removeAttachment:t=>Oe(`/attachments/${t}`,{method:"DELETE"}),authStatus:t=>Oe(`/model-connections/${t}/auth`),authStart:t=>Oe(`/model-connections/${t}/auth`,{method:"POST"}),authCancel:t=>Oe(`/model-connections/${t}/auth`,{method:"DELETE"}),authInput:(t,i,a)=>Oe(`/model-connections/${t}/auth/input`,{method:"POST",body:St({promptId:i,value:a})}),authLogout:t=>Oe(`/model-connections/${t}/auth/logout`,{method:"POST"}),modelCatalog:t=>Oe(`/model-connections/${t}/catalog`),providerModels:t=>Oe(`/model-providers/${encodeURIComponent(t)}/models`),modelProviders:()=>Oe("/model-providers"),autoconfigModel:t=>Oe("/model-autoconfig",{method:"POST",body:St(t)}),discoverModels:t=>Oe("/model-discovery",{method:"POST",body:St(t)}),modelConnections:()=>Oe("/model-connections"),createModelConnection:t=>Oe("/model-connections",{method:"POST",body:St(t)}),updateModelConnection:(t,i)=>Oe(`/model-connections/${t}`,{method:"PUT",body:St(i)}),deleteModelConnection:t=>Oe(`/model-connections/${t}`,{method:"DELETE"}),saveModelCredential:(t,i,a=!1)=>Oe(`/model-connections/${t}/credential`,{method:"PUT",body:St({apiKey:i,remove:a})}),saveConnectionModel:(t,i,a)=>Oe(`/model-connections/${t}/models`,{method:a?"PUT":"POST",body:St({model:i,originalId:a})}),deleteConnectionModel:(t,i)=>Oe(`/model-connections/${t}/models`,{method:"DELETE",body:St({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 kT=t=>t==null?void 0:t.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 CT(t,i,a=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:kT(t),size:24,node:i,...a.length>0?{aliases:a}:{}}}/**
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 NT=t=>{let i="",a=!1;for(const l of t){if(l==="-"||l==="_"||l<=" "){a=i.length>0;continue}i.length===0?i+=l.toLowerCase():i+=a?l.toUpperCase():l,a=!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 ET=t=>{const i=NT(t);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 vp=(...t)=>t.filter((i,a,l)=>!!i&&i.trim()!==""&&l.indexOf(i)===a).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 Rl={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 Om(t){return t!=null}function TT(t,i={}){var b,x;const a=i.attributeNames??{},l=S=>a[S]??S,s=t.size??t.width??Rl.width,u=t.size??t.height??Rl.height,d=((b=t.aliases)==null?void 0:b.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`))??[],h=[...t.name?[`lucide-${t.name}`]:[],...d],m=((x=i.className)==null?void 0:x.split(" ").filter(Boolean))??[],v=i.includeDefaultClasses===!1?vp(...m):vp("lucide",...h,...m),y=i.absoluteStrokeWidth?Number(i.strokeWidth??Rl["stroke-width"])*Number(t.size??t.width??Rl.width)/Number(i.size??i.width??Rl.width):i.strokeWidth??Rl["stroke-width"];return["svg",{...Object.entries(Rl).reduce((S,[k,N])=>(S[l(k)]=N,S),{}),..."color"in i&&i.color&&{[l("stroke")]:i.color},..."size"in i&&Om(i.size)&&{[l("width")]:i.size,[l("height")]:i.size},..."width"in i&&Om(i.width)&&{[l("width")]:i.width},..."height"in i&&Om(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},t.node.map(S=>{const[k,N,E]=S,T=i.nonScalingStroke?{[l("vector-effect")]:"non-scaling-stroke",...N}:N;return E?[k,T,E]:[k,T]})]}/**
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 AT(t,i={}){return TT(t,{...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 MT=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},OT=w.createContext({}),_T=()=>w.useContext(OT),RT=w.forwardRef(({color:t,size:i,width:a,height:l,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:d,className:h="",children:m,iconNode:v=[],icon:y={node:v,aliases:[],size:24},...g},b)=>{const{size:x=24,strokeWidth:S=2,absoluteStrokeWidth:k=!1,nonScalingStroke:N=!1,color:E="currentColor",className:T=""}=_T()??{},A=!!m||MT(g),[M,I,O=[]]=AT(y,{color:t??E,width:a??i??x,height:l??i??x,strokeWidth:s??S,absoluteStrokeWidth:u??k,nonScalingStroke:d??N,className:vp(T,h),hasA11yProp:A,attributes:g});return w.createElement(M,{ref:b,...I},[...O.map(([B,q])=>w.createElement(B,q)),...Array.isArray(m)?m:[m]])});/**
95
- * @license lucide-react v1.47.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */function _e(t,i=[],a=[]){const l=typeof t=="string"?CT(t,i,a):t,s=w.forwardRef(({className:u,...d},h)=>w.createElement(RT,{ref:h,icon:l,className:u,...d}));return l.name&&(s.displayName=ET(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 y2={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"}]]};y2.node;const DT=_e(y2);/**
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 b2={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"}]]};b2.node;const zT=_e(b2);/**
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 x2={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"}]]};x2.node;const LT=_e(x2);/**
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 j2={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};j2.node;const Hd=_e(j2);/**
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 S2={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};S2.node;const yp=_e(S2);/**
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 w2={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};w2.node;const IT=_e(w2);/**
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 k2={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"}]]};k2.node;const BT=_e(k2);/**
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 C2={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"}]]};C2.node;const PT=_e(C2);/**
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 N2={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"}]]};N2.node;const HT=_e(N2);/**
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 E2={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"]};E2.node;const UT=_e(E2);/**
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 T2={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};T2.node;const sr=_e(T2);/**
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 A2={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};A2.node;const Wo=_e(A2);/**
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 M2={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};M2.node;const O2=_e(M2);/**
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 _2={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};_2.node;const Xr=_e(_2);/**
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 R2={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"}]]};R2.node;const D2=_e(R2);/**
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 z2={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"}]]};z2.node;const qT=_e(z2);/**
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 L2={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"}]]};L2.node;const I2=_e(L2);/**
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 B2={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"]};B2.node;const px=_e(B2);/**
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 P2={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"}]]};P2.node;const FT=_e(P2);/**
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 H2={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"}]]};H2.node;const VT=_e(H2);/**
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 U2={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"}]]};U2.node;const $T=_e(U2);/**
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 q2={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"}]]};q2.node;const YT=_e(q2);/**
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 F2={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"]};F2.node;const GT=_e(F2);/**
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 V2={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"}]]};V2.node;const XT=_e(V2);/**
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 $2={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"}]]};$2.node;const QT=_e($2);/**
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 Y2={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"}]]};Y2.node;const KT=_e(Y2);/**
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 G2={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"}]]};G2.node;const ZT=_e(G2);/**
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 X2={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"}]]};X2.node;const JT=_e(X2);/**
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 Q2={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"}]]};Q2.node;const rg=_e(Q2);/**
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 K2={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"}]]};K2.node;const WT=_e(K2);/**
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 Z2={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Z2.node;const J2=_e(Z2);/**
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 W2={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"}]]};W2.node;const eA=_e(W2);/**
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 ej={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"}]]};ej.node;const tA=_e(ej);/**
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 tj={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"]};tj.node;const nA=_e(tj);/**
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 nj={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"}]]};nj.node;const iA=_e(nj);/**
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 ij={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"}]]};ij.node;const aA=_e(ij);/**
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 aj={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"}]]};aj.node;const rA=_e(aj);/**
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 rj={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"}]]};rj.node;const lA=_e(rj);/**
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 lj={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"}]]};lj.node;const oA=_e(lj);/**
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 oj={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};oj.node;const sA=_e(oj);/**
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 sj={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"}]]};sj.node;const cA=_e(sj);/**
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 cj={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"]};cj.node;const uA=_e(cj);/**
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 uj={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"}]]};uj.node;const lg=_e(uj);/**
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 dj={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"}]]};dj.node;const dA=_e(dj);/**
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 fj={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"}]]};fj.node;const fA=_e(fj);/**
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 hj={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"}]]};hj.node;const bp=_e(hj);/**
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 mj={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};mj.node;const Ud=_e(mj);/**
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 pj={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"}]]};pj.node;const hA=_e(pj);/**
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 gj={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"}]]};gj.node;const vj=_e(gj);/**
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 yj={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"}]]};yj.node;const mA=_e(yj);/**
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 bj={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"]};bj.node;const pA=_e(bj);/**
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 xj={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"}]]};xj.node;const gA=_e(xj);/**
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 jj={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};jj.node;const wc=_e(jj);/**
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 Sj={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"}]]};Sj.node;const vA=_e(Sj);/**
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 wj={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"}]]};wj.node;const yA=_e(wj);/**
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 kj={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"}]]};kj.node;const bA=_e(kj);/**
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 Cj={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"}]]};Cj.node;const xA=_e(Cj);/**
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 Nj={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"]};Nj.node;const Ej=_e(Nj);/**
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 Tj={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"}]]};Tj.node;const jA=_e(Tj);/**
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 Aj={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"]};Aj.node;const SA=_e(Aj);/**
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 Mj={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"}]]};Mj.node;const wA=_e(Mj);/**
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 Oj={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"]};Oj.node;const wd=_e(Oj);/**
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 _j={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"}]]};_j.node;const kA=_e(_j);/**
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 Rj={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"}]]};Rj.node;const CA=_e(Rj);/**
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 Dj={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};Dj.node;const qd=_e(Dj),zj={list:(t,i)=>Oe(`/bots/${t}/activity${i===void 0?"":`?before=${encodeURIComponent(i)}`}`),message:(t,i)=>Oe(`/bots/${t}/activity/messages/${i}`)};function Lj(t){var i,a,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(i=0;i<s;i++)t[i]&&(a=Lj(t[i]))&&(l&&(l+=" "),l+=a)}else for(a in t)t[a]&&(l&&(l+=" "),l+=a);return l}function NA(){for(var t,i,a=0,l="",s=arguments.length;a<s;a++)(t=arguments[a])&&(i=Lj(t))&&(l&&(l+=" "),l+=i);return l}const gx=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,vx=NA,og=(t,i)=>a=>{var l;if((i==null?void 0:i.variants)==null)return vx(t,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:s,defaultVariants:u}=i,d=Object.keys(s).map(v=>{const y=a==null?void 0:a[v],g=u==null?void 0:u[v];if(y===null)return null;const b=gx(y)||gx(g);return s[v][b]}),h=a&&Object.entries(a).reduce((v,y)=>{let[g,b]=y;return b===void 0||(v[g]=b),v},{}),m=i==null||(l=i.compoundVariants)===null||l===void 0?void 0:l.reduce((v,y)=>{let{class:g,className:b,...x}=y;return Object.entries(x).every(S=>{let[k,N]=S;return Array.isArray(N)?N.includes({...u,...h}[k]):{...u,...h}[k]===N})?[...v,g,b]:v},[]);return vx(t,d,m,a==null?void 0:a.class,a==null?void 0:a.className)},Ij=48,Ha=(t,i=0)=>{const a=new Int32Array(t.length);for(let l=0;l<t.length;l++)a[l]=t.charCodeAt(l)-Ij-i;return a},Fd=t=>{const i=new Int32Array(t.length+1);for(let a=0;a<t.length;a++)i[a+1]=i[a]+t[a];return i},Kr=t=>{const i=new Int32Array(t.length);let a=0;for(let l=0;l<t.length;l++){const s=t.charCodeAt(l)-Ij;a+=s>>>1^-(s&1),i[l]=a}return i},EA=384,TA=[],Bl=Fd(Ha("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),AA=Fd(Ha(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),MA="@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",OA=(()=>{const t=Bl.length-1,i=new Int32Array(t);for(let s=t-1;s>=0;s--){let u=1,d=s+1;for(let h=Bl[s];h<Bl[s+1];h++)u+=i[d],d+=i[d];i[s]=u}const a=new Int32Array(Bl[t]);let l=0;for(let s=0;s<t;s++){let u=s+1;for(let d=Bl[s];d<Bl[s+1];d++)a[l++]=u,u+=i[u]}return a})(),_A=Ha("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),RA=Fd(Ha("123333359346463635126536711576")),DA=Ha("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),zA=Ha("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),LA=Kr("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),IA=(()=>{const t=new Int32Array(319).fill(-1),i=Kr("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),a=Kr("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let l=0;l<i.length;l++)t[i[l]]=a[l];return t})(),BA="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(t=>{const i=t.split(" "),a=i.shift();for(let l=0;l<i.length;l++)i[l]=a+i[l];return i}),yx=Kr("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),PA=Kr("ɠ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"),HA=Kr("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~‚22…ˆ‡:22|22222222222G000q†OVI00000}š2›>40000ŒB00000I¨©000¬00000000000000021M®­00°“000000000000000000000–222›HGHa1º222¿2À2222ÉÌ000­°2±"),Bj=new Int32Array(995),Pj=new Int32Array(995),Hj=new Int32Array(995);let xp="";const jp=new Int32Array(1038);{const t=new Map;let i=0,a=0;for(let l=0;l<yx.length;l++)for(const s of BA[HA[l]]){let u=t.get(s);u===void 0&&(u=i++,t.set(s,u),jp[u*2]=xp.length,jp[u*2+1]=s.length,xp+=s),Bj[a]=yx[l],Pj[a]=PA[l],Hj[a]=u,a++}}const UA=Kr("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),qA=Fd(Ha("1::24444432:442:44:44>222222:44:4421322511111311111114")),FA=Kr("2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222"),VA=Ha("ij"),$A=Ha("—"),YA=Ha("1"),GA="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var XA={GROUP_COUNT:EA,customValidatorNames:TA,edgeStart:Bl,labelStart:AA,labelText:MA,edgeTarget:OA,nodeGroup:_A,nodeVlist:IA,vlistPat:RA,vlistOps:DA,vlistRef:zA,vlistGroup:LA,litAnchor:Bj,litGroup:Pj,litPool:Hj,poolOffsets:jp,poolText:xp,adjGid:UA,adjStart:qA,adjTgt:FA,patGid:VA,patTgt:$A,postfixLookupGroups:YA,orderSensitiveModifiers:GA};const QA="line"in new Error,Ta=-1,Dl=-1,_m=(t,i,a)=>{let l=2166136261;for(let s=i;s<a;s++)l=Math.imul(l^t.charCodeAt(s),16777619);return l},md=(t,i,a)=>{const l=a-i;let s=Math.imul(l,2654435761)^t.charCodeAt(i);if(l>3){const u=l>>2,d=l>>1;s=Math.imul(s^t.charCodeAt(i+1)<<8^t.charCodeAt(i+2)<<16^t.charCodeAt(i+u),2246822507),s=Math.imul(s^t.charCodeAt(i+d)<<8^t.charCodeAt(i+d+u)<<16^t.charCodeAt(a-3),3266489909),s^=t.charCodeAt(a-2)<<8^t.charCodeAt(a-1)<<16;for(let h=i+3,m=a-4;h<i+8&&h<m;h++,m--)s=Math.imul(s^t.charCodeAt(h)^t.charCodeAt(m)<<8,16777619)}return s^s>>>15|0},KA=(t,i,a={})=>{const{GROUP_COUNT:l,edgeStart:s,labelStart:u,labelText:d,edgeTarget:h,nodeGroup:m,nodeVlist:v,vlistPat:y,vlistOps:g,vlistRef:b,vlistGroup:x,litAnchor:S,litGroup:k,litPool:N,poolOffsets:E,poolText:T,adjGid:A,adjStart:M,adjTgt:I,patGid:O,patTgt:B,postfixLookupGroups:q,customValidatorNames:$,orderSensitiveModifiers:L}=t,Y=new Int32Array(l).fill(-1);for(let ce=0;ce<A.length;ce++)Y[A[ce]]=ce;let X=0;for(let ce=0;ce+1<M.length;ce++){const z=M[ce+1]-M[ce];z>X&&(X=z)}let ue=32;for(;ue<2*(1+X+O.length);)ue<<=1;const Z=new Int32Array(b.length+1);for(let ce=0;ce<b.length;ce++)Z[ce+1]=Z[ce]+y[b[ce]+1]-y[b[ce]];const U=new Uint8Array(l);for(let ce=0;ce<q.length;ce++)U[q[ce]]=1;const G=s.length-1,R=new Uint8Array(G);let H=0,W=!0;for(let ce=0;ce<S.length;ce++){R[S[ce]]=1;const z=E[N[ce]*2+1];z>H&&(H=z);const Q=T.charCodeAt(E[N[ce]*2]);(Q===91||Q===40)&&(W=!1)}let D=1;for(;D<S.length*2;)D<<=1;const ie=new Int32Array(D).fill(-1);for(let ce=0;ce<S.length;ce++){const z=E[N[ce]*2];let Q=(_m(T,z,z+E[N[ce]*2+1])^Math.imul(S[ce],2654435761)|0)&D-1;for(;ie[Q]!==-1;)Q=Q+1&D-1;ie[Q]=ce}const ne=(ce,z,Q,me)=>{let Ee=(_m(z,Q,me)^Math.imul(ce,2654435761)|0)&D-1;const ke=me-Q;for(;;){const Te=ie[Ee];if(Te===-1)return-1;if(S[Te]===ce&&E[N[Te]*2+1]===ke){const Le=E[N[Te]*2];let Xe=!0;for(let Ae=0;Ae<ke;Ae++)if(T.charCodeAt(Le+Ae)!==z.charCodeAt(Q+Ae)){Xe=!1;break}if(Xe)return k[Te]}Ee=Ee+1&D-1}},P=a.cacheSize??8192,F=a.prefix??t.prefix??"",fe=F===""?"":F+":",ye=fe.length,Se=($??[]).map(ce=>{throw new Error("cn: missing validator "+ce)}),re=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,be=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,le=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,se=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let he=0,Ne=-1,ze=-1,Fe=-1,ht=-1;const ot=ce=>ce>=97&&ce<=122||ce>=65&&ce<=90||ce>=48&&ce<=57||ce===95,Je=ce=>/\s/.test(String.fromCharCode(ce)),At=(ce,z,Q)=>{if(he=0,Ne=-1,Q-z<3)return;const me=ce.charCodeAt(z),Ee=ce.charCodeAt(Q-1);if(me===91&&Ee===93)he=1;else if(me===40&&Ee===41)he=2;else return;Fe=z+1,ht=Q-1;let ke=z+1;if(ot(ce.charCodeAt(ke))){for(ke++;ke<Q-1;){const Te=ce.charCodeAt(ke);if(!ot(Te)&&Te!==45)break;ke++}ke<Q-2&&ce.charCodeAt(ke)===58&&(Ne=z+1,ze=ke,Fe=ke+1)}},gn=(ce,z,Q,me)=>{if(Q-z!==me.length)return!1;for(let Ee=0;Ee<me.length;Ee++)if(ce.charCodeAt(z+Ee)!==me.charCodeAt(Ee))return!1;return!0},vn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Hn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,di=ce=>!!ce&&!Number.isNaN(Number(ce)),an=(ce,z,Q)=>{if(Q-z<11||!gn(ce,z,z+10,"@container"))return!1;if(ce.charCodeAt(z+10)===47)return Q-z>=12;const me=ce.charCodeAt(z+11);return me===115&&Q-z>=17&&gn(ce,z+10,z+16,"-size/")||me===110&&Q-z>=19&&gn(ce,z+10,z+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(ce=>ce.split(" ")),we=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Be=(ce,z,Q,me)=>{if(ce>=10){if(ce>=25)return Se[ce-25](z.slice(Q,me));const Ee=ce-10;if(he!==Yi[Ee])return!1;if(Ne>=0){for(const ke of pe[Ee])if(gn(z,Ne,ze,ke))return!0;return!1}switch(we[Ee]){case 0:return!1;case 1:return!0;case 2:{const ke=z.slice(Fe,ht);return re.test(ke)&&!be.test(ke)}case 3:return di(z.slice(Fe,ht));case 4:return se.test(z.slice(Fe,ht));default:return le.test(z.slice(Fe,ht))}}switch(ce){case 0:return!0;case 1:return he===0;case 2:return he===1;case 3:return he===2;case 4:return vn.test(z.slice(Q,me));case 5:return di(z.slice(Q,me));case 6:{const Ee=z.slice(Q,me);return!!Ee&&Number.isInteger(Number(Ee))}case 7:return me>Q&&z.charCodeAt(me-1)===37&&di(z.slice(Q,me-1));case 8:return Hn.test(z.slice(Q,me));default:return an(z,Q,me)}},Ue=new Set(typeof L=="string"?L.split(" "):L),We=(ce,z,Q,me,Ee,ke)=>{const Te=_m(z,Q,me)^(Ee?2654435769:0)|0;let Le=ce.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!==me-Q)){for(let Pe=0;Pe<st.k.length;Pe++)if(st.k.charCodeAt(Pe)!==z.charCodeAt(Q+Pe))continue e;return st.id}}else ce.set(Te,Le=[]);const Xe=z.slice(Q,me),Ae=ke(Xe);return Le.push({k:Xe,imp:Ee,id:Ae}),Ae};let Ht=new Map,yn=new Map,Ut=2;const On=4096,Un=(ce,z)=>{const Q=[];let me=0,Ee=0,ke=0;for(let Ae=0;Ae<ce.length;Ae++){const $e=ce.charCodeAt(Ae);me===0&&Ee===0&&$e===58?(Q.push(ce.slice(ke,Ae)),ke=Ae+1):$e===91?me++:$e===93?me--:$e===40?Ee++:$e===41&&Ee--}Q.push(ce.slice(ke));let Te=Q[0];if(Q.length>1){const Ae=[];let $e=[];for(const st of Q)st.charCodeAt(0)===91||Ue.has(st)?($e.length&&(Ae.push(...$e.sort()),$e=[]),Ae.push(st)):$e.push(st);$e.length&&Ae.push(...$e.sort()),Te=Ae.join(":")}const Le=z?Te+" !":Te;let Xe=yn.get(Le);return Xe===void 0&&yn.set(Le,Xe=Ut++),Xe};let _t=new Map,_n=l;const Qe=l+4096,Gt=()=>_n++,al=2097152,sa=8192,ca=new Int32Array(sa),bn=new Array(sa).fill(null),fi=new Int32Array(sa),rl=new Int32Array(sa),hi=new Uint8Array(sa);let to=0;const Gi=(ce,z,Q,me,Ee,ke,Te,Le)=>{let Xe=ce;if(bn[ce]!==null)if(bn[ce|1]===null)Xe=ce|1;else if((to++&3)===0)Xe=ce|to>>2&1;else return;bn[Xe]=z.slice(Q,me),ca[Xe]=Ee,fi[Xe]=ke,rl[Xe]=Te,hi[Xe]=Le},sn=()=>bn.fill(null);let zt=256,Vt=[new Int32Array(zt),new Int32Array(zt),new Int32Array(zt),new Int32Array(zt)],[ua,da,Xi,Qi]=Vt,Oi=new Uint8Array(zt),Kn=new Uint8Array(zt);const Ki=()=>{zt*=2,Vt=Vt.map(z=>{const Q=new Int32Array(zt);return Q.set(z),Q}),[ua,da,Xi,Qi]=Vt;const ce=new Uint8Array(zt);ce.set(Oi),Oi=ce,Kn=new Uint8Array(zt)};let mi=64,pi=new Int32Array(mi),fa=new Int32Array(mi);const ll=new Int32Array(l);let gi=2048,gr=21,Zn=new Float64Array(gi),ha=new Int32Array(gi),Jn=0;const rn=(ce,z)=>{if(ce===0&&z<l)return ll[z]===Jn?1:(ll[z]=Jn,0);const Q=ce*2097152+z+1;let me=Math.imul(Q,2654435761)>>>gr;for(;ha[me]===Jn;){if(Zn[me]===Q)return 1;me=me+1&gi-1}return Zn[me]=Q,ha[me]=Jn,0},cn=(ce,z,Q,me,Ee)=>{if(Q-z>=2&&ce.charCodeAt(z)===91&&ce.charCodeAt(Q-1)===93){let ke=-1;for(let Te=z+1;Te<Q-1;Te++)if(ce.charCodeAt(Te)===58){ke=Te;break}return ke===-1||ke===z+1?Ta:We(_t,ce,z+1,ke,0,Gt)}if(me>=0&&m[me]>=0)return m[me];for(let ke=Ee-1;ke>=0;ke--){const Te=fa[ke];if(Te>Q)continue;const Le=pi[ke],Xe=Q-Te;if(R[Le]===1&&Xe>0&&Xe<=H){const It=ce.charCodeAt(Te);if(W===!1||It!==91&&It!==40){const vi=ne(Le,ce,Te,Q);if(vi>=0)return vi}}const Ae=v[Le];if(Ae<0)continue;const $e=b[Ae],st=y[$e],Pe=y[$e+1];if(st===Pe)continue;At(ce,Te,Q);const ln=Z[Ae]-st;for(let It=st;It<Pe;It++)if(Be(g[It],ce,Te,Q))return x[ln+It]}return Ta},ma=ce=>{const z=ce.length;let Q=0,me=0,Ee=!1;(Ut>On||Ht.size>On)&&(Ht=new Map,yn=new Map,Ut=2,sn()),_n>Qe&&(_t=new Map,_n=l,sn());let ke=0;for(;ke<z;){let Ae=ce.charCodeAt(ke);if(Ae===32||Ae>=9&&Ae<=13||Ae>=160&&Je(Ae)){Ae!==32&&(Ee=!0),ke++;continue}const $e=ke;let st=0;for(;ke<z;){if(Ae=ce.charCodeAt(ke),Ae<=32){if(Ae===32)break;if(Ae>=9&&Ae<=13){Ee=!0;break}}else if(Ae>=160&&Je(Ae)){Ee=!0;break}st=Math.imul(st^Ae,16777619),ke++}const Pe=ke,ln=Pe-$e;Q===zt&&Ki();const It=Q++;ua[It]=$e,da[It]=Pe,me+=ln,st^=Math.imul(ln,2654435761);const vi=st^st>>>15|0,Xt=vi&8190;{let ut=-1;if(ca[Xt]===vi&&bn[Xt]!==null&&bn[Xt].length===ln?ut=Xt:ca[Xt|1]===vi&&bn[Xt|1]!==null&&bn[Xt|1].length===ln&&(ut=Xt|1),ut>=0){const un=bn[ut];let _i=!0;for(let xi=0;xi<ln;xi++)if(un.charCodeAt(xi)!==ce.charCodeAt($e+xi)){_i=!1;break}if(_i){Xi[It]=fi[ut],Qi[It]=rl[ut],Oi[It]=hi[ut];continue}}}let Qt=$e;if(ye!==0){if(Pe-$e<=ye||!ce.startsWith(fe,$e)){Xi[It]=Ta,Gi(Xt,ce,$e,Pe,vi,Ta,0,0);continue}Qt=$e+ye}let no=0,cs=0,$a=-1,io=-1;for(let ut=Qt;ut<Pe;ut++){const un=ce.charCodeAt(ut);if(no===0&&cs===0){if(un===58){$a=ut;continue}if(un===47){io=ut;continue}}un===91?no++:un===93?no--:un===40?cs++:un===41&&cs--}const zc=$a>=Qt?$a+1:Qt;let Ot=zc,Dn=Pe,br=!1,ao=0;Dn>Ot&&ce.charCodeAt(Dn-1)===33?(br=!0,Dn--):Dn>Ot&&ce.charCodeAt(Ot)===33&&(br=!0,Ot++,ao=1);let ni=-1;io>zc&&(ni=io+ao,ni>=Dn&&(ni=-1));let ro=Ot;Dn-Ot>1&&ce.charCodeAt(Ot)===45&&(ro=Ot+1);let yi=0,qn=0,xr=0,us=-1,bi=0;(v[0]>=0||R[0]===1)&&(pi[0]=0,fa[0]=ro,bi=1);let sl=Dl,ds=0;for(let ut=ro;ut<Dn;ut++)if(ut===ni&&(sl=qn<xr?Dl:yi,ds=bi),yi!==Dl){const un=ce.charCodeAt(ut);let _i=-1;if(qn<xr)d.charCodeAt(qn)===un?(qn++,qn===xr&&(_i=yi=us)):yi=Dl;else{const xi=s[yi],dl=s[yi+1];let Ya=Dl;for(let Sn=xi;Sn<dl;Sn++){const fl=u[Sn];if(d.charCodeAt(fl)===un){u[Sn+1]-fl===1?_i=Ya=h[Sn]:(qn=fl+1,xr=u[Sn+1],us=h[Sn],Ya=yi);break}}yi=Ya}if(_i>=0&&(v[_i]>=0||R[_i]===1)&&ut+1<Dn&&ce.charCodeAt(ut+1)===45){if(bi===mi){mi*=2;const xi=new Int32Array(mi);xi.set(pi),pi=xi;const dl=new Int32Array(mi);dl.set(fa),fa=dl}pi[bi]=_i,fa[bi]=ut+2,bi++}}ni===Dn&&(sl=qn<xr?Dl:yi,ds=bi);const fs=qn<xr?Dl:yi;let jn,Fn=!1;if(ni>=0)if(Fn=!0,jn=cn(ce,Ot,ni,sl,ds),jn!==Ta&&jn<l&&U[jn]){const ut=cn(ce,Ot,Dn,fs,bi);ut!==Ta&&ut!==jn&&(jn=ut,Fn=!1)}else jn===Ta&&(jn=cn(ce,Ot,Dn,fs,bi),Fn=!1);else jn=cn(ce,Ot,Dn,fs,bi);let cl=0,ul=0;jn===Ta?Xi[It]=Ta:(ul=Fn?1:0,cl=Qt>=$a?br?1:0:We(Ht,ce,Qt,$a,br?1:0,ut=>Un(ut,br)),Xi[It]=jn,Oi[It]=ul,Qi[It]=cl),Gi(Xt,ce,$e,Pe,vi,jn,cl,ul)}if(Q===0)return"";if(Q===1)return ua[0]===0&&da[0]===z?ce:ce.slice(ua[0],da[0]);if(Q*ue>gi){for(;Q*ue>gi;)gi<<=1,gr--;Zn=new Float64Array(gi),ha=new Int32Array(gi)}if(Ut>=al||_n>=al)throw new Error("cn: too many distinct classes in one merge");Jn=Jn+1|0,Jn===0&&(ll.fill(0),ha.fill(0),Jn=1);let Te=!1;for(let Ae=Q-1;Ae>=0;Ae--){const $e=Xi[Ae];if($e===Ta){Kn[Ae]=1;continue}const st=Qi[Ae];if(rn(st,$e)===1){Kn[Ae]=0,Te=!0;continue}if(Kn[Ae]=1,$e<l){const Pe=Y[$e];if(Pe>=0)for(let ln=M[Pe];ln<M[Pe+1];ln++)rn(st,I[ln]);if(Oi[Ae]&1)for(let ln=0;ln<O.length;ln++)O[ln]===$e&&rn(st,B[ln])}}if(!Te&&!Ee&&z===me+Q-1)return ce;let Le="",Xe=0;for(;Xe<Q;){if(!Kn[Xe]){Xe++;continue}const Ae=ua[Xe];let $e=da[Xe],st=Xe+1;for(;st<Q&&Kn[st]&&ua[st]===$e+1&&ce.charCodeAt($e)===32;)$e=da[st],st++;Le.length>0&&(Le+=" "),Le+=ce.slice(Ae,$e),Xe=st}return Le},Wn=16384,ei=new Int32Array(Wn*2);let Rn=0,Lt=1,Mt=Object.create(null),$t=Object.create(null),xn=new Map,ol=new Map,vr=0,yr=0;const pa=()=>{Rn^=Wn,Lt=Lt+1|0,yr=0},ga=ce=>{let z=Mt[ce];if(z!==void 0)return z;const Q=md(ce,0,ce.length),me=(Q&16383)+Rn,Ee=ei[me]===(Q^Lt)||ei[me^Wn]===(Q^Lt-1);return Ee&&(z=$t[ce],z!==void 0)?(Mt[ce]=z,z):(z=ma(ce),Ee?(Mt[ce]=z,++vr>P&&(vr=0,$t=Mt,Mt=Object.create(null),pa())):(ei[me]=Q^Lt,++yr>Wn&&pa()),z)},Fa=ce=>{let z=xn.get(ce);if(z!==void 0)return z;const Q=md(ce,0,ce.length),me=(Q&16383)+Rn,Ee=ei[me]===(Q^Lt)||ei[me^Wn]===(Q^Lt-1);return Ee&&(z=ol.get(ce),z!==void 0)?(xn.set(ce,z),z):(z=ma(ce),Ee?(xn.set(ce,z),++vr>P&&(vr=0,ol=xn,xn=new Map,pa())):(ei[me]=Q^Lt,++yr>Wn&&pa()),z)},Va=ce=>{const z=md(ce,0,ce.length),Q=(z&16383)+Rn;return ei[Q]===(z^Lt)||ei[Q^Wn]===(z^Lt-1)?!0:(ei[Q]=z^Lt,++yr>Wn&&pa(),!1)},ti=P===0?ma:QA?ce=>{const z=xn.get(ce);return z!==void 0?z:Fa(ce)}:ga;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?ti(arguments[0]):ti(JA.apply(null,arguments))},mergeString:ti,seenBefore:P===0?()=>!1:Va,mergeUncached:ma}},kd=(t,i)=>{if(!t)return"";if(typeof t=="string")return t;let a="";if(typeof t.length=="number"&&(!i||Array.isArray(t))){const l=t;for(let s=0;s<l.length;s++){const u=l[s];if(!u)continue;const d=typeof u=="string"?u:kd(u,i);d&&(a&&(a+=" "),a+=d)}return a}if(i){if(typeof t=="number")return""+t;if(typeof t=="object")for(const l in t)t[l]&&(a&&(a+=" "),a+=l)}return a},ZA=(t,i)=>{let a="";for(let l=0;l<t.length;l++){const s=t[l];if(!s)continue;const u=typeof s=="string"?s:kd(s,i);u&&(a&&(a+=" "),a+=u)}return a},JA=function(){return ZA(arguments,!1)},WA=256,bx=16,e4=1024,Rm=4096,t4=(t,i)=>{const a=i===void 0?()=>!0:i.seenBefore,l=i===void 0?t:i.mergeUncached;let s=new Map,u=new Map,d=0,h=null,m=null,v=[],y=[],g=0;const b=(E,T,A)=>{m===null&&(m=new Array(Rm).fill(""),v=new Array(Rm).fill(""),y=new Array(Rm).fill(""));const M=md(E,0,E.length)&4094;if(m[M]===E&&v[M]===T)return y[M];if(m[M|1]===E&&v[M|1]===T)return y[M|1];const I=t(A?T+" "+E:E),O=m[M]===""?M:M|(m[M|1]===""?1:g++&1);return m[O]=E,v[O]=T,y[O]=I,I},x=(E,T,A,M)=>{let I=0;if(T){if(T!==E.a0)return!1;I=1}if(A){if(A!==(I===0?E.a0:E.a1))return!1;I++}if(M){if(M!==(I===0?E.a0:I===1?E.a1:E.a2))return!1;I++}return I===E.t},S=(E,T)=>{const A=E.a;let M=0;for(let I=0;I<T.length;I++){const O=T[I];if(O){if(O!==A[M])return!1;M++}}return M===E.t},k=(E,T)=>{const A=E.length,M=h===null?null:h.n;if(!T){if(M!==null&&S(M,E))return h=M,M.r;if(h!==null&&h!==M&&S(h,E))return h.r}let I="",O=-1,B=0,q=!1;for(let Y=0;Y<A;Y++){let X=E[Y];if(X){if(typeof X!="string"){if(X=E[Y]=kd(X,!0),!X)continue;q=!0}O<0&&(I=X,O=Y),B++}}if(B===0)return"";if(B===1)return t(I);if(q){if(M!==null&&S(M,E))return h=M,M.r;if(h!==null&&h!==M&&S(h,E))return h.r}let $=s.get(I);$===void 0&&($=u.get(I),$!==void 0&&s.set(I,$));let L=null;if($!==void 0){if($.skip>0){$.skip--,h=null;let X=I;for(let ue=O+1;ue<A;ue++){const Z=E[ue];Z&&(X+=" "+Z)}return b(X,"",!1)}const Y=$.e;e:for(let X=0;X<Y.length;X++){const ue=Y[X];if(ue.t!==B)continue;const Z=ue.a;let U=1;for(let G=O+1;G<A;G++){const R=E[G];if(R&&R!==Z[U++])continue e}L=ue;break}L!==null&&($.miss=0)}if(L===null){let Y=I;const X=[I];for(let Z=O+1;Z<A;Z++){const U=E[Z];U&&(Y+=" "+U,X.push(U))}if(!a(Y))return l(Y);L={r:t(Y),t:X.length,a0:X[0],a1:X[1],a2:X[2]??"",a:X,n:null},$===void 0?s.set(I,$={e:[],miss:0,skip:0,at:0}):++$.miss>bx&&($.miss=bx,$.skip=e4,$.e.length=0,$.at=0);const ue=$.e;ue.length<WA?ue.push(L):(ue[$.at]=L,$.at=$.at+1&255),++d>1e3&&(d=0,u=s,s=new Map)}return h!==null&&h!==L&&(h.n=L),h=L,L.r},N=E=>Array.isArray(E)?k(E.slice(),!1):t(kd(E,!0));return function(E,T,A){const M=arguments.length;if((M|1)===3){const B=h;if(B!==null){const q=B.n;if(q!==null&&x(q,E,T,A))return h=q,q.r;if(B!==q&&x(B,E,T,A))return B.r}if(M===2&&typeof T=="string"&&T!==""){const q=s.get(E);if(q!==void 0&&q.skip>0)return q.skip--,h=null,b(T,E,!0)}return k([E,T,A],!0)}if(M===1)return typeof E=="string"?t(E):N(E);const I=h;if(I!==null){const B=I.n;if(B!==null){const q=B.a;let $=0,L=!0;for(let Y=0;Y<M;Y++){const X=arguments[Y];if(X){if(X!==q[$]){L=!1;break}$++}}if(L&&$===B.t)return h=B,B.r}if(I!==B){const q=I.a;let $=0,L=!0;for(let Y=0;Y<M;Y++){const X=arguments[Y];if(X){if(X!==q[$]){L=!1;break}$++}}if(L&&$===I.t)return I.r}}const O=[];for(let B=0;B<M;B++)O.push(arguments[B]);return k(O,!0)}},xx=KA(XA),nn=t4(xx.mergeString,xx);var Jl=c2(),n4=Object.defineProperty,sg=(t,i)=>n4(t,"name",{value:i,configurable:!0});function Sp(t,i){if(typeof t=="function")return t(i);t!=null&&(t.current=i)}sg(Sp,"setRef");function Uj(...t){return i=>{let a=!1;const l=t.map(s=>{const u=Sp(s,i);return!a&&typeof u=="function"&&(a=!0),u});if(a)return()=>{for(let s=0;s<l.length;s++){const u=l[s];typeof u=="function"?u():Sp(t[s],null)}}}}sg(Uj,"composeRefs");function xt(...t){return w.useCallback(Uj(...t),t)}sg(xt,"useComposedRefs");var i4=Object.defineProperty,la=(t,i)=>i4(t,"name",{value:i,configurable:!0});function za(t){const i=w.forwardRef((a,l)=>{let{children:s,...u}=a,d=null,h=!1;const m=[];wp(s)&&typeof Wu=="function"&&(s=Wu(s._payload)),w.Children.forEach(s,b=>{var x;if($j(b)){h=!0;const S=b;let k="child"in S.props?S.props.child:S.props.children;wp(k)&&typeof Wu=="function"&&(k=Wu(k._payload)),d=l4(S,k),m.push((x=d==null?void 0:d.props)==null?void 0:x.children)}else m.push(b)}),d?d=w.cloneElement(d,void 0,m):!h&&w.Children.count(s)===1&&w.isValidElement(s)&&(d=s);const v=d?Vj(d):void 0,y=xt(l,v);if(!d){if(s||s===0)throw new Error(h?c4(t):s4(t));return s}const g=Fj(u,d.props??{});return d.type!==w.Fragment&&(g.ref=l?y:v),w.cloneElement(d,g)});return i.displayName=`${t}.Slot`,i}la(za,"createSlot");var a4=za("Slot"),qj=Symbol.for("radix.slottable");function r4(t){const i=la(a=>"child"in a?a.children(a.child):a.children,"Slottable");return i.displayName=`${t}.Slottable`,i.__radixId=qj,i}la(r4,"createSlottable");var l4=la((t,i)=>{if("child"in t.props){const a=t.props.child;return w.isValidElement(a)?w.cloneElement(a,void 0,t.props.children(a.props.children)):null}return w.isValidElement(i)?i:null},"getSlottableElementFromSlottable");function Fj(t,i){const a={...i};for(const l in i){const s=t[l],u=i[l];/^on[A-Z]/.test(l)?s&&u?a[l]=(...h)=>{const m=u(...h);return s(...h),m}:s&&(a[l]=s):l==="style"?a[l]={...s,...u}:l==="className"&&(a[l]=[s,u].filter(Boolean).join(" "))}return{...t,...a}}la(Fj,"mergeProps");function Vj(t){var l,s;let i=(l=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:l.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}la(Vj,"getElementRef");function $j(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===qj}la($j,"isSlottable");var o4=Symbol.for("react.lazy");function wp(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===o4&&"_payload"in t&&Yj(t._payload)}la(wp,"isLazyComponent");function Yj(t){return typeof t=="object"&&t!==null&&"then"in t}la(Yj,"isPromiseLike");var s4=la(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),c4=la(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Wu=jc[" use ".trim().toString()],u4=Object.defineProperty,d4=(t,i)=>u4(t,"name",{value:i,configurable:!0}),f4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dt=f4.reduce((t,i)=>{const a=za(`Primitive.${i}`),l=w.forwardRef((s,u)=>{const{asChild:d,...h}=s,m=d?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(m,{...h,ref:u})});return l.displayName=`Primitive.${i}`,{...t,[i]:l}},{});function Gj(t,i){t&&Jl.flushSync(()=>t.dispatchEvent(i))}d4(Gj,"dispatchDiscreteCustomEvent");var h4=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"}),m4=Object.defineProperty,qi=(t,i)=>m4(t,"name",{value:i,configurable:!0});function p4(t,i){const a=w.createContext(i);a.displayName=t+"Context";const l=qi(u=>{const{children:d,...h}=u,m=w.useMemo(()=>h,Object.values(h));return c.jsx(a.Provider,{value:m,children:d})},"Provider");l.displayName=t+"Provider";function s(u,d={}){const{optional:h=!1}=d,m=w.useContext(a);if(m)return m;if(i!==void 0)return i;if(!h)throw new Error(`\`${u}\` must be used within \`${t}\``)}return qi(s,"useContext"),[l,s]}qi(p4,"createContext");function Wr(t,i=[]){let a=[];function l(u,d){const h=w.createContext(d);h.displayName=u+"Context";const m=a.length;a=[...a,d];const v=qi(g=>{var E;const{scope:b,children:x,...S}=g,k=((E=b==null?void 0:b[t])==null?void 0:E[m])||h,N=w.useMemo(()=>S,Object.values(S));return c.jsx(k.Provider,{value:N,children:x})},"Provider");v.displayName=u+"Provider";function y(g,b,x={}){var E;const{optional:S=!1}=x,k=((E=b==null?void 0:b[t])==null?void 0:E[m])||h,N=w.useContext(k);if(N)return N;if(d!==void 0)return d;if(!S)throw new Error(`\`${g}\` must be used within \`${u}\``)}return qi(y,"useContext"),[v,y]}qi(l,"createContext");const s=qi(()=>{const u=a.map(d=>w.createContext(d));return qi(function(h){const m=(h==null?void 0:h[t])||u;return w.useMemo(()=>({[`__scope${t}`]:{...h,[t]:m}}),[h,m])},"useScope")},"createScope");return s.scopeName=t,[l,Xj(s,...i)]}qi(Wr,"createContextScope");function Xj(...t){const i=t[0];if(t.length===1)return i;const a=qi(()=>{const l=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return qi(function(u){const d=l.reduce((h,{useScope:m,scopeName:v})=>{const g=m(u)[`__scope${v}`];return{...h,...g}},{});return w.useMemo(()=>({[`__scope${i.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return a.scopeName=i.scopeName,a}qi(Xj,"composeContextScopes");var g4=Object.defineProperty,pn=(t,i)=>g4(t,"name",{value:i,configurable:!0});function Qj(t){const i=t+"CollectionProvider",[a,l]=Wr(i),[s,u]=a(i,{collectionRef:{current:null},itemMap:new Map}),d=pn(k=>{const{scope:N,children:E}=k,T=w.useRef(null),A=w.useRef(new Map).current;return c.jsx(s,{scope:N,itemMap:A,collectionRef:T,children:E})},"CollectionProvider");d.displayName=i;const h=t+"CollectionSlot",m=za(h),v=w.forwardRef((k,N)=>{const{scope:E,children:T}=k,A=u(h,E),M=xt(N,A.collectionRef);return c.jsx(m,{ref:M,children:T})});v.displayName=h;const y=t+"CollectionItemSlot",g="data-radix-collection-item",b=za(y),x=w.forwardRef((k,N)=>{const{scope:E,children:T,...A}=k,M=w.useRef(null),I=xt(N,M),O=u(y,E);return w.useEffect(()=>(O.itemMap.set(M,{ref:M,...A}),()=>void O.itemMap.delete(M))),c.jsx(b,{[g]:"",ref:I,children:T})});x.displayName=y;function S(k){const N=u(t+"CollectionConsumer",k);return w.useCallback(()=>{const T=N.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(N.itemMap.values()).sort((O,B)=>A.indexOf(O.ref.current)-A.indexOf(B.ref.current))},[N.collectionRef,N.itemMap])}return pn(S,"useCollection"),[{Provider:d,Slot:v,ItemSlot:x},S,l]}pn(Qj,"createCollection");var jx=new WeakMap,en,Ai,Dm=(Ai=class extends Map{constructor(a){super(a);ax(this,en);km(this,en,[...super.keys()]),jx.set(this,!0)}set(a,l){return jx.get(this)&&(this.has(a)?Ln(this,en)[Ln(this,en).indexOf(a)]=a:Ln(this,en).push(a)),super.set(a,l),this}insert(a,l,s){const u=this.has(l),d=Ln(this,en).length,h=cg(a);let m=h>=0?h:d+h;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);h<0&&m++;const g=[...Ln(this,en)];let b,x=!1;for(let S=m;S<y;S++)if(m===S){let k=g[S];g[S]===l&&(k=g[S+1]),u&&this.delete(l),b=this.get(k),this.set(l,s)}else{!x&&g[S-1]===l&&(x=!0);const k=g[x?S:S-1],N=b;b=this.get(k),this.delete(k),this.set(k,N)}return this}with(a,l,s){const u=new Ai(this);return u.insert(a,l,s),u}before(a){const l=Ln(this,en).indexOf(a)-1;if(!(l<0))return this.entryAt(l)}setBefore(a,l,s){const u=Ln(this,en).indexOf(a);return u===-1?this:this.insert(u,l,s)}after(a){let l=Ln(this,en).indexOf(a);if(l=l===-1||l===this.size-1?-1:l+1,l!==-1)return this.entryAt(l)}setAfter(a,l,s){const u=Ln(this,en).indexOf(a);return u===-1?this:this.insert(u+1,l,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return km(this,en,[]),super.clear()}delete(a){const l=super.delete(a);return l&&Ln(this,en).splice(Ln(this,en).indexOf(a),1),l}deleteAt(a){const l=this.keyAt(a);return l!==void 0?this.delete(l):!1}at(a){const l=pd(Ln(this,en),a);if(l!==void 0)return this.get(l)}entryAt(a){const l=pd(Ln(this,en),a);if(l!==void 0)return[l,this.get(l)]}indexOf(a){return Ln(this,en).indexOf(a)}keyAt(a){return pd(Ln(this,en),a)}from(a,l){const s=this.indexOf(a);if(s===-1)return;let u=s+l;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.at(u)}keyFrom(a,l){const s=this.indexOf(a);if(s===-1)return;let u=s+l;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.keyAt(u)}find(a,l){let s=0;for(const u of this){if(Reflect.apply(a,l,[u,s,this]))return u;s++}}findIndex(a,l){let s=0;for(const u of this){if(Reflect.apply(a,l,[u,s,this]))return s;s++}return-1}filter(a,l){const s=[];let u=0;for(const d of this)Reflect.apply(a,l,[d,u,this])&&s.push(d),u++;return new Ai(s)}map(a,l){const s=[];let u=0;for(const d of this)s.push([d[0],Reflect.apply(a,l,[d,u,this])]),u++;return new Ai(s)}reduce(...a){const[l,s]=a;let u=0,d=s??this.at(0);for(const h of this)u===0&&a.length===1?d=h:d=Reflect.apply(l,this,[d,h,u,this]),u++;return d}reduceRight(...a){const[l,s]=a;let u=s??this.at(-1);for(let d=this.size-1;d>=0;d--){const h=this.at(d);d===this.size-1&&a.length===1?u=h:u=Reflect.apply(l,this,[u,h,d,this])}return u}toSorted(a){const l=[...this.entries()].sort(a);return new Ai(l)}toReversed(){const a=new Ai;for(let l=this.size-1;l>=0;l--){const s=this.keyAt(l),u=this.get(s);a.set(s,u)}return a}toSpliced(...a){const l=[...this.entries()];return l.splice(...a),new Ai(l)}slice(a,l){const s=new Ai;let u=this.size-1;if(a===void 0)return s;a<0&&(a=a+this.size),l!==void 0&&l>0&&(u=l-1);for(let d=a;d<=u;d++){const h=this.keyAt(d),m=this.get(h);s.set(h,m)}return s}every(a,l){let s=0;for(const u of this){if(!Reflect.apply(a,l,[u,s,this]))return!1;s++}return!0}some(a,l){let s=0;for(const u of this){if(Reflect.apply(a,l,[u,s,this]))return!0;s++}return!1}},en=new WeakMap,pn(Ai,"OrderedDict"),Ai);function pd(t,i){if("at"in Array.prototype)return Array.prototype.at.call(t,i);const a=Kj(t,i);return a===-1?void 0:t[a]}pn(pd,"at");function Kj(t,i){const a=t.length,l=cg(i),s=l>=0?l:a+l;return s<0||s>=a?-1:s}pn(Kj,"toSafeIndex");function cg(t){return t!==t||t===0?0:Math.trunc(t)}pn(cg,"toSafeInteger");function v4(t){const i=t+"CollectionProvider",[a,l]=Wr(i),[s,u]=a(i,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Dm,setItemMap:pn(()=>{},"setItemMap")}),d=pn(({state:A,...M})=>A?c.jsx(m,{...M,state:A}):c.jsx(h,{...M}),"CollectionProvider");d.displayName=i;const h=pn(A=>{const M=N();return c.jsx(m,{...A,state:M})},"CollectionInit");h.displayName=i+"Init";const m=pn(A=>{const{scope:M,children:I,state:O}=A,B=w.useRef(null),[q,$]=w.useState(null),L=xt(B,$),[Y,X]=O;return w.useEffect(()=>{if(!q)return;const ue=Wj(()=>{});return ue.observe(q,{childList:!0,subtree:!0}),()=>{ue.disconnect()}},[q]),c.jsx(s,{scope:M,itemMap:Y,setItemMap:X,collectionRef:L,collectionRefObject:B,collectionElement:q,children:I})},"CollectionProviderImpl");m.displayName=i+"Impl";const v=t+"CollectionSlot",y=za(v),g=w.forwardRef((A,M)=>{const{scope:I,children:O}=A,B=u(v,I),q=xt(M,B.collectionRef);return c.jsx(y,{ref:q,children:O})});g.displayName=v;const b=t+"CollectionItemSlot",x="data-radix-collection-item",S=za(b),k=w.forwardRef((A,M)=>{const{scope:I,children:O,...B}=A,q=w.useRef(null),[$,L]=w.useState(null),Y=xt(M,q,L),X=u(b,I),{setItemMap:ue}=X,Z=w.useRef(B);Zj(Z.current,B)||(Z.current=B);const U=Z.current;return w.useEffect(()=>{const G=U;return ue(R=>$?R.has($)?R.set($,{...G,element:$}).toSorted(kp):(R.set($,{...G,element:$}),R.toSorted(kp)):R),()=>{ue(R=>!$||!R.has($)?R:(R.delete($),new Dm(R)))}},[$,U,ue]),c.jsx(S,{[x]:"",ref:Y,children:O})});k.displayName=b;function N(){return w.useState(new Dm)}pn(N,"useInitCollection");function E(A){const{itemMap:M}=u(t+"CollectionConsumer",A);return M}return pn(E,"useCollection"),[{Provider:d,Slot:g,ItemSlot:k},{createCollectionScope:l,useCollection:E,useInitCollection:N}]}pn(v4,"createCollection");function Zj(t,i){if(t===i)return!0;if(typeof t!="object"||typeof i!="object"||t==null||i==null)return!1;const a=Object.keys(t),l=Object.keys(i);if(a.length!==l.length)return!1;for(const s of a)if(!Object.prototype.hasOwnProperty.call(i,s)||t[s]!==i[s])return!1;return!0}pn(Zj,"shallowEqual");function Jj(t,i){return!!(i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}pn(Jj,"isElementPreceding");function kp(t,i){return!t[1].element||!i[1].element?0:Jj(t[1].element,i[1].element)?-1:1}pn(kp,"sortByDocumentPosition");function Wj(t){return new MutationObserver(a=>{for(const l of a)if(l.type==="childList"){t();return}})}pn(Wj,"getChildListObserver");var y4=Object.defineProperty,is=(t,i)=>y4(t,"name",{value:i,configurable:!0}),eS=!!(typeof window<"u"&&window.document&&window.document.createElement);function mt(t,i,{checkForDefaultPrevented:a=!0}={}){return is(function(s){if(t==null||t(s),a===!1||!s||!s.defaultPrevented)return i==null?void 0:i(s)},"handleEvent")}is(mt,"composeEventHandlers");function b4(t){var i;if(!eS)throw new Error("Cannot access window outside of the DOM");return((i=t==null?void 0:t.ownerDocument)==null?void 0:i.defaultView)??window}is(b4,"getOwnerWindow");function Cp(t){if(!eS)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}is(Cp,"getOwnerDocument");function tS(t,i=!1){const{activeElement:a}=Cp(t);if(!(a!=null&&a.nodeName))return null;if(nS(a)&&a.contentDocument)return tS(a.contentDocument.body,i);if(i){const l=a.getAttribute("aria-activedescendant");if(l){const s=Cp(a).getElementById(l);if(s)return s}}return a}is(tS,"getActiveElement");function nS(t){return t.tagName==="IFRAME"}is(nS,"isFrame");var Mn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},x4=Object.defineProperty,j4=(t,i)=>x4(t,"name",{value:i,configurable:!0}),Sx=jc[" useEffectEvent ".trim().toString()],wx=jc[" useInsertionEffect ".trim().toString()];function iS(t){if(typeof Sx=="function")return Sx(t);const i=w.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof wx=="function"?wx(()=>{i.current=t}):Mn(()=>{i.current=t}),w.useMemo(()=>((...a)=>{var l;return(l=i.current)==null?void 0:l.call(i,...a)}),[])}j4(iS,"useEffectEvent");var S4=Object.defineProperty,kc=(t,i)=>S4(t,"name",{value:i,configurable:!0}),w4=jc[" useInsertionEffect ".trim().toString()]||Mn;function fc({prop:t,defaultProp:i,onChange:a=kc(()=>{},"onChange"),caller:l}){const[s,u,d]=aS({defaultProp:i,onChange:a}),h=t!==void 0,m=h?t:s,v=w.useCallback(y=>{var g;if(h){const b=rS(y)?y(t):y;b!==t&&((g=d.current)==null||g.call(d,b))}else u(y)},[h,t,u,d]);return[m,v]}kc(fc,"useControllableState");function aS({defaultProp:t,onChange:i}){const[a,l]=w.useState(t),s=w.useRef(a),u=w.useRef(i);return w4(()=>{u.current=i},[i]),w.useEffect(()=>{var d;s.current!==a&&((d=u.current)==null||d.call(u,a),s.current=a)},[a,s]),[a,l,u]}kc(aS,"useUncontrolledState");function rS(t){return typeof t=="function"}kc(rS,"isFunction");var kx=Symbol("RADIX:SYNC_STATE");function k4(t,i,a,l){const{prop:s,defaultProp:u,onChange:d,caller:h}=i,m=s!==void 0,v=iS(d),y=[{...a,state:u}];l&&y.push(l);const[g,b]=w.useReducer((N,E)=>{if(E.type===kx)return{...N,state:E.state};const T=t(N,E);return m&&!Object.is(T.state,N.state)&&v(T.state),T},...y),x=g.state,S=w.useRef(x);w.useEffect(()=>{S.current!==x&&(S.current=x,m||v(x))},[x,S,m]);const k=w.useMemo(()=>s!==void 0?{...g,state:s}:g,[g,s]);return w.useEffect(()=>{m&&!Object.is(s,g.state)&&b({type:kx,state:s})},[s,g.state,m]),[k,b]}kc(k4,"useControllableStateReducer");var C4=Object.defineProperty,cr=(t,i)=>C4(t,"name",{value:i,configurable:!0});function lS(t,i){return w.useReducer((a,l)=>i[a][l]??a,t)}cr(lS,"useStateMachine");var Ua=cr(t=>{const{present:i,children:a}=t,l=oS(i),s=typeof a=="function"?a({present:l.isPresent}):w.Children.only(a),u=sS(l.ref,cS(s));return typeof a=="function"||l.isPresent?w.cloneElement(s,{ref:u}):null},"Presence");function oS(t){const[i,a]=w.useState(),l=w.useRef(null),s=w.useRef(t),u=w.useRef("none"),d=w.useRef(void 0),h=t?"mounted":"unmounted",[m,v]=lS(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{m==="mounted"?(u.current=d.current??Go(l.current),d.current=void 0):u.current="none"},[m]),Mn(()=>{const y=l.current,g=s.current;if(g!==t){const x=u.current,S=Go(y);t?(d.current=S,v("MOUNT")):S==="none"||(y==null?void 0:y.display)==="none"?v("UNMOUNT"):v(g&&x!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,v]),Mn(()=>{if(i){let y;const g=i.ownerDocument.defaultView??window,b=cr(S=>{const N=Go(l.current).includes(CSS.escape(S.animationName));if(S.target===i&&N&&(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"),x=cr(S=>{S.target===i&&(u.current=Go(l.current))},"handleAnimationStart");return i.addEventListener("animationstart",x),i.addEventListener("animationcancel",b),i.addEventListener("animationend",b),()=>{g.clearTimeout(y),i.removeEventListener("animationstart",x),i.removeEventListener("animationcancel",b),i.removeEventListener("animationend",b)}}else v("ANIMATION_END")},[i,v]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(y=>{if(y){const g=getComputedStyle(y);l.current=g,d.current=Go(g)}else l.current=null;a(y)},[])}}cr(oS,"usePresence");function Np(t,i){if(typeof t=="function")return t(i);t!=null&&(t.current=i)}cr(Np,"setRef");function sS(...t){const i=w.useRef(t);return i.current=t,w.useCallback(a=>{const l=i.current;let s=!1;const u=l.map(d=>{const h=Np(d,a);return!s&&typeof h=="function"&&(s=!0),h});if(s)return()=>{for(let d=0;d<u.length;d++){const h=u[d];typeof h=="function"?h():Np(l[d],null)}}},[])}cr(sS,"useStableComposedRefs");function Go(t){return(t==null?void 0:t.animationName)||"none"}cr(Go,"getAnimationName");function cS(t){var l,s;let i=(l=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:l.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}cr(cS,"getElementRef");var N4=Object.defineProperty,E4=(t,i)=>N4(t,"name",{value:i,configurable:!0}),T4=jc[" useId ".trim().toString()]||(()=>{}),A4=0;function Ul(t){const[i,a]=w.useState(T4());return Mn(()=>{t||a(l=>l??String(A4++))},[t]),t||(i?`radix-${i}`:"")}E4(Ul,"useId");var M4=Object.defineProperty,O4=(t,i)=>M4(t,"name",{value:i,configurable:!0}),_4=w.createContext(void 0);function ug(t){const i=w.useContext(_4);return t||i||"ltr"}O4(ug,"useDirection");var R4=Object.defineProperty,D4=(t,i)=>R4(t,"name",{value:i,configurable:!0});function An(t){const i=w.useRef(t);return w.useEffect(()=>{i.current=t}),w.useMemo(()=>((...a)=>{var l;return(l=i.current)==null?void 0:l.call(i,...a)}),[])}D4(An,"useCallbackRef");var z4=Object.defineProperty,mn=(t,i)=>z4(t,"name",{value:i,configurable:!0}),Ep="dismissableLayer.update",L4="dismissableLayer.pointerDownOutside",I4="dismissableLayer.focusOutside",Cx,uS=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),dg=w.forwardRef(mn(function(i,a){const{disableOutsidePointerEvents:l=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:m,onDismiss:v,...y}=i,g=w.useContext(uS),[b,x]=w.useState(null),S=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=w.useState({}),N=xt(a,x),E=Array.from(g.layers),[T]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),A=T?E.indexOf(T):-1,M=b?E.indexOf(b):-1,I=g.layersWithOutsidePointerEventsDisabled.size>0,O=M>=A,B=w.useRef(!1),q=fS(X=>{d==null||d(X),m==null||m(X),X.defaultPrevented||v==null||v()},{ownerDocument:S,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:B,dismissableSurfaces:g.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(X=>{if(!(X instanceof Node))return!1;const ue=[...g.branches].some(Z=>Z.contains(X));return O&&!ue},[g.branches,O])}),$=hS(X=>{if(s&&B.current)return;const ue=X.target;[...g.branches].some(U=>U.contains(ue))||(h==null||h(X),m==null||m(X),X.defaultPrevented||v==null||v())},S),L=b?M===E.length-1:!1,Y=An(X=>{X.key==="Escape"&&(u==null||u(X),!X.defaultPrevented&&v&&(X.preventDefault(),v()))});return w.useEffect(()=>{if(L)return S.addEventListener("keydown",Y,{capture:!0}),()=>S.removeEventListener("keydown",Y,{capture:!0})},[S,L,Y]),w.useEffect(()=>{if(b)return l&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Cx=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(b)),g.layers.add(b),Tp(),()=>{l&&(g.layersWithOutsidePointerEventsDisabled.delete(b),g.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Cx))}},[b,S,l,g]),w.useEffect(()=>()=>{b&&(g.layers.delete(b),g.layersWithOutsidePointerEventsDisabled.delete(b),Tp())},[b,g]),w.useEffect(()=>{const X=mn(()=>k({}),"handleUpdate");return document.addEventListener(Ep,X),()=>document.removeEventListener(Ep,X)},[]),c.jsx(Dt.div,{...y,ref:N,style:{pointerEvents:I?O?"auto":"none":void 0,...i.style},onFocusCapture:mt(i.onFocusCapture,$.onFocusCapture),onBlurCapture:mt(i.onBlurCapture,$.onBlurCapture),onPointerDownCapture:mt(i.onPointerDownCapture,q.onPointerDownCapture)})},"DismissableLayer"));function dS(){const t=w.useContext(uS),[i,a]=w.useState(null);return w.useEffect(()=>{if(i)return t.dismissableSurfaces.add(i),()=>{t.dismissableSurfaces.delete(i)}},[i,t.dismissableSurfaces]),a}mn(dS,"useDismissableLayerSurface");var B4=mn(()=>!0,"IS_TRUE");function fS(t,i){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:l=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:u,shouldHandlePointerDownOutside:d=B4}=i,h=An(t),m=w.useRef(!1),v=w.useRef(!1),y=w.useRef(new Map),g=w.useRef(()=>{});return w.useEffect(()=>{function b(){v.current=!1,s.current=!1,y.current.clear()}mn(b,"resetOutsideInteraction");function x(){return Array.from(y.current.values()).some(Boolean)}mn(x,"isOutsideInteractionIntercepted");function S(A){if(!v.current)return;const M=A.target;M instanceof Node&&[...u].some(O=>O.contains(M))||y.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{v.current&&g.current()},0)}mn(S,"handleInteractionCapture");function k(A){v.current&&y.current.set(A.type,!1)}mn(k,"handleInteractionBubble");const N=mn(A=>{if(A.target&&!m.current){let M=function(){a.removeEventListener("click",g.current);const O=x();b(),O||fg(L4,h,I,{discrete:!0})};if(mn(M,"handleAndDispatchPointerDownOutsideEvent"),!d(A.target)){a.removeEventListener("click",g.current),b(),m.current=!1;return}const I={originalEvent:A};v.current=!0,s.current=l&&A.button===0,y.current.clear(),!l||A.button!==0?M():(a.removeEventListener("click",g.current),g.current=M,a.addEventListener("click",g.current,{once:!0}))}else a.removeEventListener("click",g.current),b();m.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of E)a.addEventListener(A,S,!0),a.addEventListener(A,k);const T=window.setTimeout(()=>{a.addEventListener("pointerdown",N)},0);return()=>{window.clearTimeout(T),a.removeEventListener("pointerdown",N),a.removeEventListener("click",g.current);for(const A of E)a.removeEventListener(A,S,!0),a.removeEventListener(A,k)}},[a,h,l,s,u,d]),{onPointerDownCapture:mn(()=>m.current=!0,"onPointerDownCapture")}}mn(fS,"usePointerDownOutside");function hS(t,i=globalThis==null?void 0:globalThis.document){const a=An(t),l=w.useRef(!1);return w.useEffect(()=>{const s=mn(u=>{u.target&&!l.current&&fg(I4,a,{originalEvent:u},{discrete:!1})},"handleFocus");return i.addEventListener("focusin",s),()=>i.removeEventListener("focusin",s)},[i,a]),{onFocusCapture:mn(()=>l.current=!0,"onFocusCapture"),onBlurCapture:mn(()=>l.current=!1,"onBlurCapture")}}mn(hS,"useFocusOutside");function Tp(){const t=new CustomEvent(Ep);document.dispatchEvent(t)}mn(Tp,"dispatchUpdate");function fg(t,i,a,{discrete:l}){const s=a.originalEvent.target,u=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});i&&s.addEventListener(t,i,{once:!0}),l?Gj(s,u):s.dispatchEvent(u)}mn(fg,"handleAndDispatchCustomEvent");var P4=Object.defineProperty,Qn=(t,i)=>P4(t,"name",{value:i,configurable:!0}),zm="focusScope.autoFocusOnMount",Lm="focusScope.autoFocusOnUnmount",Nx={bubbles:!1,cancelable:!0},hg=w.forwardRef(Qn(function(i,a){const{loop:l=!1,trapped:s=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...h}=i,[m,v]=w.useState(null),y=An(u),g=An(d),b=w.useRef(null),x=xt(a,v),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let N=function(M){if(S.paused||!m)return;const I=M.target;m.contains(I)?b.current=I:rr(b.current,{select:!0})},E=function(M){if(S.paused||!m)return;const I=M.relatedTarget;I!==null&&(m.contains(I)||rr(b.current,{select:!0}))},T=function(M){if(document.activeElement===document.body)for(const O of M)O.removedNodes.length>0&&rr(m)};Qn(N,"handleFocusIn"),Qn(E,"handleFocusOut"),Qn(T,"handleMutations"),document.addEventListener("focusin",N),document.addEventListener("focusout",E);const A=new MutationObserver(T);return m&&A.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",E),A.disconnect()}}},[s,m,S.paused]),w.useEffect(()=>{if(m){Ex.add(S);const N=document.activeElement;if(!m.contains(N)){const T=new CustomEvent(zm,Nx);m.addEventListener(zm,y),m.dispatchEvent(T),T.defaultPrevented||(mS(bS(mg(m)),{select:!0}),document.activeElement===N&&rr(m))}return()=>{m.removeEventListener(zm,y),setTimeout(()=>{const T=new CustomEvent(Lm,Nx);m.addEventListener(Lm,g),m.dispatchEvent(T),T.defaultPrevented||rr(N??document.body,{select:!0}),m.removeEventListener(Lm,g),Ex.remove(S)},0)}}},[m,y,g,S]);const k=w.useCallback(N=>{if(!l&&!s||S.paused)return;const E=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,T=document.activeElement;if(E&&T){const A=N.currentTarget,[M,I]=pS(A);M&&I?!N.shiftKey&&T===I?(N.preventDefault(),l&&rr(M,{select:!0})):N.shiftKey&&T===M&&(N.preventDefault(),l&&rr(I,{select:!0})):T===A&&N.preventDefault()}},[l,s,S.paused]);return c.jsx(Dt.div,{tabIndex:-1,...h,ref:x,onKeyDown:k})},"FocusScope"));function mS(t,{select:i=!1}={}){const a=document.activeElement;for(const l of t)if(rr(l,{select:i}),document.activeElement!==a)return}Qn(mS,"focusFirst");function pS(t){const i=mg(t),a=Ap(i,t),l=Ap(i.reverse(),t);return[a,l]}Qn(pS,"getTabbableEdges");function mg(t){const i=[],a=document.createTreeWalker(t,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(;a.nextNode();)i.push(a.currentNode);return i}Qn(mg,"getTabbableCandidates");function Ap(t,i){const a=typeof i.checkVisibility=="function"&&i.checkVisibility({checkVisibilityCSS:!0});for(const l of t)if(!(a?!l.checkVisibility({checkVisibilityCSS:!0}):gS(l,{upTo:i})))return l}Qn(Ap,"findVisible");function gS(t,{upTo:i}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(i!==void 0&&t===i)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Qn(gS,"isHidden");function vS(t){return t instanceof HTMLInputElement&&"select"in t}Qn(vS,"isSelectableInput");function rr(t,{select:i=!1}={}){if(t&&t.focus){const a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&vS(t)&&i&&t.select()}}Qn(rr,"focus");var Ex=yS();function yS(){let t=[];return{add(i){const a=t[0];i!==a&&(a==null||a.pause()),t=Mp(t,i),t.unshift(i)},remove(i){var a;t=Mp(t,i),(a=t[0])==null||a.resume()}}}Qn(yS,"createFocusScopesStack");function Mp(t,i){const a=[...t],l=a.indexOf(i);return l!==-1&&a.splice(l,1),a}Qn(Mp,"arrayRemove");function bS(t){return t.filter(i=>i.tagName!=="A")}Qn(bS,"removeLinks");var H4=Object.defineProperty,U4=(t,i)=>H4(t,"name",{value:i,configurable:!0}),pg=w.forwardRef(U4(function(i,a){var m;const{container:l,...s}=i,[u,d]=w.useState(!1);Mn(()=>d(!0),[]);const h=l||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return h?Jl.createPortal(c.jsx(Dt.div,{...s,ref:a}),h):null},"Portal")),q4=Object.defineProperty,gg=(t,i)=>q4(t,"name",{value:i,configurable:!0}),ed=0,Aa=null;function F4(t){return Cc(),t.children}gg(F4,"FocusGuards");function Cc(){w.useEffect(()=>{Aa||(Aa={start:Op(),end:Op()});const{start:t,end:i}=Aa;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==i&&document.body.insertAdjacentElement("beforeend",i),ed++,()=>{ed===1&&(Aa==null||Aa.start.remove(),Aa==null||Aa.end.remove(),Aa=null),ed=Math.max(0,ed-1)}},[])}gg(Cc,"useFocusGuards");function Op(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}gg(Op,"createFocusGuard");var Oa=function(){return Oa=Object.assign||function(i){for(var a,l=1,s=arguments.length;l<s;l++){a=arguments[l];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])}return i},Oa.apply(this,arguments)};function xS(t,i){var a={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&i.indexOf(l)<0&&(a[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,l=Object.getOwnPropertySymbols(t);s<l.length;s++)i.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(t,l[s])&&(a[l[s]]=t[l[s]]);return a}function V4(t,i,a){if(a||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 t.concat(u||Array.prototype.slice.call(i))}var gd="right-scroll-bar-position",vd="width-before-scroll-bar",$4="with-scroll-bars-hidden",Y4="--removed-body-scroll-bar-size";function Im(t,i){return typeof t=="function"?t(i):t&&(t.current=i),t}function G4(t,i){var a=w.useState(function(){return{value:t,callback:i,facade:{get current(){return a.value},set current(l){var s=a.value;s!==l&&(a.value=l,a.callback(l,s))}}}})[0];return a.callback=i,a.facade}var X4=typeof window<"u"?w.useLayoutEffect:w.useEffect,Tx=new WeakMap;function Q4(t,i){var a=G4(null,function(l){return t.forEach(function(s){return Im(s,l)})});return X4(function(){var l=Tx.get(a);if(l){var s=new Set(l),u=new Set(t),d=a.current;s.forEach(function(h){u.has(h)||Im(h,null)}),u.forEach(function(h){s.has(h)||Im(h,d)})}Tx.set(a,t)},[t]),a}function K4(t){return t}function Z4(t,i){i===void 0&&(i=K4);var a=[],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 a.length?a[a.length-1]:t},useMedium:function(u){var d=i(u,l);return a.push(d),function(){a=a.filter(function(h){return h!==d})}},assignSyncMedium:function(u){for(l=!0;a.length;){var d=a;a=[],d.forEach(u)}a={push:function(h){return u(h)},filter:function(){return a}}},assignMedium:function(u){l=!0;var d=[];if(a.length){var h=a;a=[],h.forEach(u),d=a}var m=function(){var y=d;d=[],y.forEach(u)},v=function(){return Promise.resolve().then(m)};v(),a={push:function(y){d.push(y),v()},filter:function(y){return d=d.filter(y),a}}}};return s}function J4(t){t===void 0&&(t={});var i=Z4(null);return i.options=Oa({async:!0,ssr:!1},t),i}var jS=function(t){var i=t.sideCar,a=xS(t,["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 w.createElement(l,Oa({},a))};jS.isSideCarExport=!0;function W4(t,i){return t.useMedium(i),jS}var SS=J4(),Bm=function(){},Vd=w.forwardRef(function(t,i){var a=w.useRef(null),l=w.useState({onScrollCapture:Bm,onWheelCapture:Bm,onTouchMoveCapture:Bm}),s=l[0],u=l[1],d=t.forwardProps,h=t.children,m=t.className,v=t.removeScrollBar,y=t.enabled,g=t.shards,b=t.sideCar,x=t.noRelative,S=t.noIsolation,k=t.inert,N=t.allowPinchZoom,E=t.as,T=E===void 0?"div":E,A=t.gapMode,M=xS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=b,O=Q4([a,i]),B=Oa(Oa({},M),s);return w.createElement(w.Fragment,null,y&&w.createElement(I,{sideCar:SS,removeScrollBar:v,shards:g,noRelative:x,noIsolation:S,inert:k,setCallbacks:u,allowPinchZoom:!!N,lockRef:a,gapMode:A}),d?w.cloneElement(w.Children.only(h),Oa(Oa({},B),{ref:O})):w.createElement(T,Oa({},B,{className:m,ref:O}),h))});Vd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vd.classNames={fullWidth:vd,zeroRight:gd};var eM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tM(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var i=eM();return i&&t.setAttribute("nonce",i),t}function nM(t,i){t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i))}function iM(t){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(t)}var aM=function(){var t=0,i=null;return{add:function(a){t==0&&(i=tM())&&(nM(i,a),iM(i)),t++},remove:function(){t--,!t&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},rM=function(){var t=aM();return function(i,a){w.useEffect(function(){return t.add(i),function(){t.remove()}},[i&&a])}},wS=function(){var t=rM(),i=function(a){var l=a.styles,s=a.dynamic;return t(l,s),null};return i},lM={left:0,top:0,right:0,gap:0},Pm=function(t){return parseInt(t||"",10)||0},oM=function(t){var i=window.getComputedStyle(document.body),a=i[t==="padding"?"paddingLeft":"marginLeft"],l=i[t==="padding"?"paddingTop":"marginTop"],s=i[t==="padding"?"paddingRight":"marginRight"];return[Pm(a),Pm(l),Pm(s)]},sM=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return lM;var i=oM(t),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,l-a+i[2]-i[0])}},cM=wS(),Qo="data-scroll-locked",uM=function(t,i,a,l){var s=t.left,u=t.top,d=t.right,h=t.gap;return a===void 0&&(a="margin"),`
425
- .`.concat($4,` {
426
- overflow: hidden `).concat(l,`;
427
- padding-right: `).concat(h,"px ").concat(l,`;
428
- }
429
- body[`).concat(Qo,`] {
430
- overflow: hidden `).concat(l,`;
431
- overscroll-behavior: contain;
432
- `).concat([i&&"position: relative ".concat(l,";"),a==="margin"&&`
433
- padding-left: `.concat(s,`px;
434
- padding-top: `).concat(u,`px;
435
- padding-right: `).concat(d,`px;
436
- margin-left:0;
437
- margin-top:0;
438
- margin-right: `).concat(h,"px ").concat(l,`;
439
- `),a==="padding"&&"padding-right: ".concat(h,"px ").concat(l,";")].filter(Boolean).join(""),`
440
- }
441
-
442
- .`).concat(gd,` {
443
- right: `).concat(h,"px ").concat(l,`;
444
- }
445
-
446
- .`).concat(vd,` {
447
- margin-right: `).concat(h,"px ").concat(l,`;
448
- }
449
-
450
- .`).concat(gd," .").concat(gd,` {
451
- right: 0 `).concat(l,`;
452
- }
453
-
454
- .`).concat(vd," .").concat(vd,` {
455
- margin-right: 0 `).concat(l,`;
456
- }
457
-
458
- body[`).concat(Qo,`] {
459
- `).concat(Y4,": ").concat(h,`px;
460
- }
461
- `)},Ax=function(){var t=parseInt(document.body.getAttribute(Qo)||"0",10);return isFinite(t)?t:0},dM=function(){w.useEffect(function(){return document.body.setAttribute(Qo,(Ax()+1).toString()),function(){var t=Ax()-1;t<=0?document.body.removeAttribute(Qo):document.body.setAttribute(Qo,t.toString())}},[])},fM=function(t){var i=t.noRelative,a=t.noImportant,l=t.gapMode,s=l===void 0?"margin":l;dM();var u=w.useMemo(function(){return sM(s)},[s]);return w.createElement(cM,{styles:uM(u,!i,s,a?"":"!important")})},_p=!1;if(typeof window<"u")try{var td=Object.defineProperty({},"passive",{get:function(){return _p=!0,!0}});window.addEventListener("test",td,td),window.removeEventListener("test",td,td)}catch{_p=!1}var qo=_p?{passive:!1}:!1,hM=function(t){return t.tagName==="TEXTAREA"},kS=function(t,i){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[i]!=="hidden"&&!(a.overflowY===a.overflowX&&!hM(t)&&a[i]==="visible")},mM=function(t){return kS(t,"overflowY")},pM=function(t){return kS(t,"overflowX")},Mx=function(t,i){var a=i.ownerDocument,l=i;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var s=CS(t,l);if(s){var u=NS(t,l),d=u[1],h=u[2];if(d>h)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},gM=function(t){var i=t.scrollTop,a=t.scrollHeight,l=t.clientHeight;return[i,a,l]},vM=function(t){var i=t.scrollLeft,a=t.scrollWidth,l=t.clientWidth;return[i,a,l]},CS=function(t,i){return t==="v"?mM(i):pM(i)},NS=function(t,i){return t==="v"?gM(i):vM(i)},yM=function(t,i){return t==="h"&&i==="rtl"?-1:1},bM=function(t,i,a,l,s){var u=yM(t,window.getComputedStyle(i).direction),d=u*l,h=a.target,m=i.contains(h),v=!1,y=d>0,g=0,b=0;do{if(!h)break;var x=NS(t,h),S=x[0],k=x[1],N=x[2],E=k-N-u*S;(S||E)&&CS(t,h)&&(g+=E,b+=S);var T=h.parentNode;h=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!m&&h!==document.body||m&&(i.contains(h)||i===h));return(y&&Math.abs(g)<1||!y&&Math.abs(b)<1)&&(v=!0),v},nd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Ox=function(t){return[t.deltaX,t.deltaY]},_x=function(t){return t&&"current"in t?t.current:t},xM=function(t,i){return t[0]===i[0]&&t[1]===i[1]},jM=function(t){return`
462
- .block-interactivity-`.concat(t,` {pointer-events: none;}
463
- .allow-interactivity-`).concat(t,` {pointer-events: all;}
464
- `)},SM=0,Fo=[];function wM(t){var i=w.useRef([]),a=w.useRef([0,0]),l=w.useRef(),s=w.useState(SM++)[0],u=w.useState(wS)[0],d=w.useRef(t);w.useEffect(function(){d.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var k=V4([t.lockRef.current],(t.shards||[]).map(_x),!0).filter(Boolean);return k.forEach(function(N){return N.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),k.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var h=w.useCallback(function(k,N){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var E=nd(k),T=a.current,A="deltaX"in k?k.deltaX:T[0]-E[0],M="deltaY"in k?k.deltaY:T[1]-E[1],I,O=k.target,B=Math.abs(A)>Math.abs(M)?"h":"v";if("touches"in k&&B==="h"&&O.type==="range")return!1;var q=window.getSelection(),$=q&&q.anchorNode,L=$?$===O||$.contains(O):!1;if(L)return!1;var Y=Mx(B,O);if(!Y)return!0;if(Y?I=B:(I=B==="v"?"h":"v",Y=Mx(B,O)),!Y)return!1;if(!l.current&&"changedTouches"in k&&(A||M)&&(l.current=I),!I)return!0;var X=l.current||I;return bM(X,N,k,X==="h"?A:M)},[]),m=w.useCallback(function(k){var N=k;if(!(!Fo.length||Fo[Fo.length-1]!==u)){var E="deltaY"in N?Ox(N):nd(N),T=i.current.filter(function(I){return I.name===N.type&&(I.target===N.target||N.target===I.shadowParent)&&xM(I.delta,E)})[0];if(T&&T.should){N.cancelable&&N.preventDefault();return}if(!T){var A=(d.current.shards||[]).map(_x).filter(Boolean).filter(function(I){return I.contains(N.target)}),M=A.length>0?h(N,A[0]):!d.current.noIsolation;M&&N.cancelable&&N.preventDefault()}}},[]),v=w.useCallback(function(k,N,E,T){var A={name:k,delta:N,target:E,should:T,shadowParent:kM(E)};i.current.push(A),setTimeout(function(){i.current=i.current.filter(function(M){return M!==A})},1)},[]),y=w.useCallback(function(k){a.current=nd(k),l.current=void 0},[]),g=w.useCallback(function(k){v(k.type,Ox(k),k.target,h(k,t.lockRef.current))},[]),b=w.useCallback(function(k){v(k.type,nd(k),k.target,h(k,t.lockRef.current))},[]);w.useEffect(function(){return Fo.push(u),t.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",m,qo),document.addEventListener("touchmove",m,qo),document.addEventListener("touchstart",y,qo),function(){Fo=Fo.filter(function(k){return k!==u}),document.removeEventListener("wheel",m,qo),document.removeEventListener("touchmove",m,qo),document.removeEventListener("touchstart",y,qo)}},[]);var x=t.removeScrollBar,S=t.inert;return w.createElement(w.Fragment,null,S?w.createElement(u,{styles:jM(s)}):null,x?w.createElement(fM,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function kM(t){for(var i=null;t!==null;)t instanceof ShadowRoot&&(i=t.host,t=t.host),t=t.parentNode;return i}const CM=W4(SS,wM);var $d=w.forwardRef(function(t,i){return w.createElement(Vd,Oa({},t,{ref:i,sideCar:CM}))});$d.classNames=Vd.classNames;var NM=function(t){if(typeof document>"u")return null;var i=Array.isArray(t)?t[0]:t;return i.ownerDocument.body},Vo=new WeakMap,id=new WeakMap,ad={},Hm=0,ES=function(t){return t&&(t.host||ES(t.parentNode))},EM=function(t,i){return i.map(function(a){if(t.contains(a))return a;var l=ES(a);return l&&t.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},TM=function(t,i,a,l){var s=EM(i,Array.isArray(t)?t:[t]);ad[a]||(ad[a]=new WeakMap);var u=ad[a],d=[],h=new Set,m=new Set(s),v=function(g){!g||h.has(g)||(h.add(g),v(g.parentNode))};s.forEach(v);var y=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(b){if(h.has(b))y(b);else try{var x=b.getAttribute(l),S=x!==null&&x!=="false",k=(Vo.get(b)||0)+1,N=(u.get(b)||0)+1;Vo.set(b,k),u.set(b,N),d.push(b),k===1&&S&&id.set(b,!0),N===1&&b.setAttribute(a,"true"),S||b.setAttribute(l,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return y(i),h.clear(),Hm++,function(){d.forEach(function(g){var b=Vo.get(g)-1,x=u.get(g)-1;Vo.set(g,b),u.set(g,x),b||(id.has(g)||g.removeAttribute(l),id.delete(g)),x||g.removeAttribute(a)}),Hm--,Hm||(Vo=new WeakMap,Vo=new WeakMap,id=new WeakMap,ad={})}},vg=function(t,i,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(t)?t:[t]),s=NM(t);return s?(l.push.apply(l,Array.from(s.querySelectorAll("[aria-live], script"))),TM(l,s,a,"aria-hidden")):function(){return null}},AM=Object.defineProperty,oa=(t,i)=>AM(t,"name",{value:i,configurable:!0}),yg="Dialog",[TS,A9]=Wr(yg),[MM,dr]=TS(yg),OM=oa(t=>{const{__scopeDialog:i,children:a,open:l,defaultOpen:s,onOpenChange:u,modal:d=!0}=t,h=w.useRef(null),m=w.useRef(null),[v,y]=fc({prop:l,defaultProp:s??!1,onChange:u,caller:yg}),[g,b]=w.useState(0),[x,S]=w.useState(0);return c.jsx(MM,{scope:i,triggerRef:h,contentRef:m,contentId:Ul(),titleId:Ul(),descriptionId:Ul(),titlePresent:g>0,descriptionPresent:x>0,setTitleCount:b,setDescriptionCount:S,open:v,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(k=>!k),[y]),modal:d,children:a})},"Dialog"),AS="DialogPortal",[_M,MS]=TS(AS,{forceMount:void 0}),RM=oa(t=>{const{__scopeDialog:i,forceMount:a,children:l,container:s}=t,u=dr(AS,i);return c.jsx(_M,{scope:i,forceMount:a,children:w.Children.map(l,d=>c.jsx(Ua,{present:a||u.open,children:c.jsx(pg,{asChild:!0,container:s,children:d})}))})},"DialogPortal"),Rp="DialogOverlay",DM=w.forwardRef(oa(function(i,a){const l=MS(Rp,i.__scopeDialog),{forceMount:s=l.forceMount,...u}=i,d=dr(Rp,i.__scopeDialog);return d.modal?c.jsx(Ua,{present:s||d.open,children:c.jsx(LM,{...u,ref:a})}):null},"DialogOverlay")),zM=za("DialogOverlay.RemoveScroll"),LM=w.forwardRef(oa(function(i,a){const{__scopeDialog:l,...s}=i,u=dr(Rp,l),d=dS(),h=xt(a,d);return c.jsx($d,{as:zM,allowPinchZoom:!0,shards:[u.contentRef],children:c.jsx(Dt.div,{"data-state":bg(u.open),...s,ref:h,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),hc="DialogContent",IM=w.forwardRef(oa(function(i,a){const l=MS(hc,i.__scopeDialog),{forceMount:s=l.forceMount,...u}=i,d=dr(hc,i.__scopeDialog);return c.jsx(Ua,{present:s||d.open,children:d.modal?c.jsx(BM,{...u,ref:a}):c.jsx(PM,{...u,ref:a})})},"DialogContent")),BM=w.forwardRef(oa(function(i,a){const l=dr(hc,i.__scopeDialog),s=w.useRef(null),u=xt(a,l.contentRef,s);return w.useEffect(()=>{const d=s.current;if(d)return vg(d)},[]),c.jsx(OS,{...i,ref:u,trapFocus:l.open,disableOutsidePointerEvents:l.open,onCloseAutoFocus:mt(i.onCloseAutoFocus,d=>{var h;d.preventDefault(),(h=l.triggerRef.current)==null||h.focus()}),onPointerDownOutside:mt(i.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&d.preventDefault()}),onFocusOutside:mt(i.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),PM=w.forwardRef(oa(function(i,a){const l=dr(hc,i.__scopeDialog),s=w.useRef(!1),u=w.useRef(!1);return c.jsx(OS,{...i,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var h,m;(h=i.onCloseAutoFocus)==null||h.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 h=d.target;((y=l.triggerRef.current)==null?void 0:y.contains(h))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"DialogContentNonModal")),OS=w.forwardRef(oa(function(i,a){const{__scopeDialog:l,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,...h}=i,m=dr(hc,l);return Cc(),c.jsx(c.Fragment,{children:c.jsx(hg,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:d,children:c.jsx(dg,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionPresent?m.descriptionId:void 0,"aria-labelledby":m.titlePresent?m.titleId:void 0,"data-state":bg(m.open),...h,ref:a,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})},"DialogContentImpl")),HM="DialogTitle",UM=w.forwardRef(oa(function(i,a){const{__scopeDialog:l,...s}=i,u=dr(HM,l),{setTitleCount:d}=u;return Mn(()=>(d(h=>h+1),()=>d(h=>h-1)),[d]),c.jsx(Dt.h2,{id:u.titleId,...s,ref:a})},"DialogTitle")),qM="DialogClose",FM=w.forwardRef(oa(function(i,a){const{__scopeDialog:l,...s}=i,u=dr(qM,l);return c.jsx(Dt.button,{type:"button",...s,ref:a,onClick:mt(i.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function bg(t){return t?"open":"closed"}oa(bg,"getState");var VM=Object.defineProperty,$M=(t,i)=>VM(t,"name",{value:i,configurable:!0});function _S(t){const[i,a]=w.useState(void 0);return Mn(()=>{if(t){a({width:t.offsetWidth,height:t.offsetHeight});const l=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let d,h;if("borderBoxSize"in u){const m=u.borderBoxSize,v=Array.isArray(m)?m[0]:m;d=v.inlineSize,h=v.blockSize}else d=t.offsetWidth,h=t.offsetHeight;a({width:d,height:h})});return l.observe(t,{box:"border-box"}),()=>l.unobserve(t)}else a(void 0)},[t]),i}$M(_S,"useSize");const YM=["top","right","bottom","left"],Zr=Math.min,lr=Math.max,Cd=Math.round,rd=Math.floor,or=t=>({x:t,y:t}),GM={left:"right",right:"left",bottom:"top",top:"bottom"};function RS(t,i,a){return lr(t,Zr(i,a))}function ur(t,i){return typeof t=="function"?t(i):t}function Jr(t){return t.split("-")[0]}function as(t){return t.split("-")[1]}function xg(t){return t==="x"?"y":"x"}function jg(t){return t==="y"?"height":"width"}function Ra(t){const i=t[0];return i==="t"||i==="b"?"y":"x"}function Sg(t){return xg(Ra(t))}function XM(t,i,a){a===void 0&&(a=!1);const l=as(t),s=Sg(t),u=jg(s);let d=s==="x"?l===(a?"end":"start")?"right":"left":l==="start"?"bottom":"top";return i.reference[u]>i.floating[u]&&(d=Nd(d)),[d,Nd(d)]}function QM(t){const i=Nd(t);return[Dp(t),i,Dp(i)]}function Dp(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Rx=["left","right"],Dx=["right","left"],KM=["top","bottom"],ZM=["bottom","top"];function JM(t,i,a){switch(t){case"top":case"bottom":return a?i?Dx:Rx:i?Rx:Dx;case"left":case"right":return i?KM:ZM;default:return[]}}function WM(t,i,a,l){const s=as(t);let u=JM(Jr(t),a==="start",l);return s&&(u=u.map(d=>d+"-"+s),i&&(u=u.concat(u.map(Dp)))),u}function Nd(t){const i=Jr(t);return GM[i]+t.slice(i.length)}function eO(t){var i,a,l,s;return{top:(i=t.top)!=null?i:0,right:(a=t.right)!=null?a:0,bottom:(l=t.bottom)!=null?l:0,left:(s=t.left)!=null?s:0}}function DS(t){return typeof t!="number"?eO(t):{top:t,right:t,bottom:t,left:t}}function Ed(t){const{x:i,y:a,width:l,height:s}=t;return{width:l,height:s,top:a,left:i,right:i+l,bottom:a+s,x:i,y:a}}function zx(t,i,a){let{reference:l,floating:s}=t;const u=Ra(i),d=Sg(i),h=jg(d),m=Jr(i),v=u==="y",y=l.x+l.width/2-s.width/2,g=l.y+l.height/2-s.height/2,b=l[h]/2-s[h]/2;let x;switch(m){case"top":x={x:y,y:l.y-s.height};break;case"bottom":x={x:y,y:l.y+l.height};break;case"right":x={x:l.x+l.width,y:g};break;case"left":x={x:l.x-s.width,y:g};break;default:x={x:l.x,y:l.y}}const S=as(i);return S&&(x[d]+=b*(S==="end"?1:-1)*(a&&v?-1:1)),x}async function tO(t,i){var a;i===void 0&&(i={});const{x:l,y:s,platform:u,rects:d,elements:h,strategy:m}=t,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:b=!1,padding:x=0}=ur(i,t),S=DS(x),N=h[b?g==="floating"?"reference":"floating":g],E=Ed(await u.getClippingRect({element:(a=await(u.isElement==null?void 0:u.isElement(N)))==null||a?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:v,rootBoundary:y,strategy:m})),T=g==="floating"?{x:l,y:s,width:d.floating.width,height:d.floating.height}:d.reference,A=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),M=await(u.isElement==null?void 0:u.isElement(A))&&await(u.getScale==null?void 0:u.getScale(A))||{x:1,y:1},I=Ed(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:T,offsetParent:A,strategy:m}):T);return{top:(E.top-I.top+S.top)/M.y,bottom:(I.bottom-E.bottom+S.bottom)/M.y,left:(E.left-I.left+S.left)/M.x,right:(I.right-E.right+S.right)/M.x}}const nO=50,iO=async(t,i,a)=>{const{placement:l="bottom",strategy:s="absolute",middleware:u=[],platform:d}=a,h=d.detectOverflow?d:{...d,detectOverflow:tO},m=await(d.isRTL==null?void 0:d.isRTL(i));let v=await d.getElementRects({reference:t,floating:i,strategy:s}),{x:y,y:g}=zx(v,l,m),b=l,x=0;const S={};for(let k=0;k<u.length;k++){const N=u[k];if(!N)continue;const{name:E,fn:T}=N,{x:A,y:M,data:I,reset:O}=await T({x:y,y:g,initialPlacement:l,placement:b,strategy:s,middlewareData:S,rects:v,platform:h,elements:{reference:t,floating:i}});y=A??y,g=M??g,S[E]={...S[E],...I},O&&x<nO&&(x++,typeof O=="object"&&(O.placement&&(b=O.placement),O.rects&&(v=O.rects===!0?await d.getElementRects({reference:t,floating:i,strategy:s}):O.rects),{x:y,y:g}=zx(v,b,m)),k=-1)}return{x:y,y:g,placement:b,strategy:s,middlewareData:S}},aO=t=>({name:"arrow",options:t,async fn(i){const{x:a,y:l,placement:s,rects:u,platform:d,elements:h,middlewareData:m}=i,{element:v,padding:y=0}=ur(t,i)||{};if(v==null)return{};const g=DS(y),b={x:a,y:l},x=Sg(s),S=jg(x),k=await d.getDimensions(v),N=x==="y",E=N?"top":"left",T=N?"bottom":"right",A=N?"clientHeight":"clientWidth",M=u.reference[S]+u.reference[x]-b[x]-u.floating[S],I=b[x]-u.reference[x],O=await(d.getOffsetParent==null?void 0:d.getOffsetParent(v));let B=O?O[A]:0;(!B||!await(d.isElement==null?void 0:d.isElement(O)))&&(B=h.floating[A]||u.floating[S]);const q=M/2-I/2,$=B/2-k[S]/2-1,L=Zr(g[E],$),Y=Zr(g[T],$),X=B-k[S]-Y,ue=B/2-k[S]/2+q,Z=RS(L,ue,X),U=!m.arrow&&as(s)!=null&&ue!==Z&&u.reference[S]/2-(ue<L?L:Y)-k[S]/2<0,G=U?ue<L?ue-L:ue-X:0;return{[x]:b[x]+G,data:{[x]:Z,centerOffset:ue-Z-G,...U&&{alignmentOffset:G}},reset:U}}}),rO=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(i){var a,l;const{placement:s,middlewareData:u,rects:d,initialPlacement:h,platform:m,elements:v}=i,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...N}=ur(t,i);if((a=u.arrow)!=null&&a.alignmentOffset)return{};const E=Jr(s),T=Ra(h),A=Jr(h)===h,M=await(m.isRTL==null?void 0:m.isRTL(v.floating)),I=b||(A||!k?[Nd(h)]:QM(h)),O=S!=="none";!b&&O&&I.push(...WM(h,k,S,M));const B=[h,...I],q=await m.detectOverflow(i,N),$=[];let L=((l=u.flip)==null?void 0:l.overflows)||[];if(y&&$.push(q[E]),g){const Z=XM(s,d,M);$.push(q[Z[0]],q[Z[1]])}if(L=[...L,{placement:s,overflows:$}],!$.every(Z=>Z<=0)){var Y,X;const Z=(((Y=u.flip)==null?void 0:Y.index)||0)+1,U=B[Z];if(U&&(!(g==="alignment"?T!==Ra(U):!1)||L.every(H=>Ra(H.placement)===T?H.overflows[0]>0:!0)))return{data:{index:Z,overflows:L},reset:{placement:U}};let G=(X=L.filter(R=>R.overflows[0]<=0).sort((R,H)=>R.overflows[1]-H.overflows[1])[0])==null?void 0:X.placement;if(!G)switch(x){case"bestFit":{var ue;const R=(ue=L.filter(H=>{if(O){const W=Ra(H.placement);return W===T||W==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(W=>W>0).reduce((W,D)=>W+D,0)]).sort((H,W)=>H[1]-W[1])[0])==null?void 0:ue[0];R&&(G=R);break}case"initialPlacement":G=h;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function Lx(t,i){return{top:t.top-i.height,right:t.right-i.width,bottom:t.bottom-i.height,left:t.left-i.width}}function Ix(t){return YM.some(i=>t[i]>=0)}const lO=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(i){const{rects:a,platform:l}=i,{strategy:s="referenceHidden",...u}=ur(t,i);switch(s){case"referenceHidden":{const d=await l.detectOverflow(i,{...u,elementContext:"reference"}),h=Lx(d,a.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Ix(h)}}}case"escaped":{const d=await l.detectOverflow(i,{...u,altBoundary:!0}),h=Lx(d,a.floating);return{data:{escapedOffsets:h,escaped:Ix(h)}}}default:return{}}}}},zS=new Set(["left","top"]);async function oO(t,i){const{placement:a,platform:l,elements:s}=t,u=await(l.isRTL==null?void 0:l.isRTL(s.floating)),d=Jr(a),h=as(a),m=Ra(a)==="y",v=zS.has(d)?-1:1,y=u&&m?-1:1,g=ur(i,t);let{mainAxis:b,crossAxis:x,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return h&&typeof S=="number"&&(x=h==="end"?S*-1:S),m?{x:x*y,y:b*v}:{x:b*v,y:x*y}}const sO=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(i){var a,l;const{x:s,y:u,placement:d,middlewareData:h}=i,m=await oO(i,t);return d===((a=h.offset)==null?void 0:a.placement)&&(l=h.arrow)!=null&&l.alignmentOffset?{}:{x:s+m.x,y:u+m.y,data:{...m,placement:d}}}}},cO=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(i){const{x:a,y:l,placement:s,platform:u}=i,{mainAxis:d=!0,crossAxis:h=!1,limiter:m={fn:T=>{let{x:A,y:M}=T;return{x:A,y:M}}},...v}=ur(t,i),y={x:a,y:l},g=await u.detectOverflow(i,v),b=Ra(s),x=xg(b);let S=y[x],k=y[b];const N=(T,A)=>RS(A+g[T==="y"?"top":"left"],A,A-g[T==="y"?"bottom":"right"]);d&&(S=N(x,S)),h&&(k=N(b,k));const E=m.fn({...i,[x]:S,[b]:k});return{...E,data:{x:E.x-a,y:E.y-l,enabled:{[x]:d,[b]:h}}}}}},uO=function(t){return t===void 0&&(t={}),{options:t,fn(i){var a,l;const{x:s,y:u,placement:d,rects:h,middlewareData:m}=i,{offset:v=0,mainAxis:y=!0,crossAxis:g=!0}=ur(t,i),b={x:s,y:u},x=Ra(d),S=xg(x);let k=b[S],N=b[x];const E=ur(v,i),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(a=E.mainAxis)!=null?a:0,crossAxis:(l=E.crossAxis)!=null?l:0};if(y){const I=S==="y"?"height":"width",O=h.reference[S]-h.floating[I]+T.mainAxis,B=h.reference[S]+h.reference[I]-T.mainAxis;k<O?k=O:k>B&&(k=B)}if(g){var A,M;const I=S==="y"?"width":"height",O=zS.has(Jr(d)),B=h.reference[x]-h.floating[I]+(O&&((A=m.offset)==null?void 0:A[x])||0)+(O?0:T.crossAxis),q=h.reference[x]+h.reference[I]+(O?0:((M=m.offset)==null?void 0:M[x])||0)-(O?T.crossAxis:0);N<B?N=B:N>q&&(N=q)}return{[S]:k,[x]:N}}}},dO=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(i){const{placement:a,rects:l,platform:s,elements:u}=i,{apply:d=()=>{},...h}=ur(t,i),m=await s.detectOverflow(i,h),v=Jr(a),y=as(a),g=Ra(a)==="y",{width:b,height:x}=l.floating;let S,k;v==="top"||v==="bottom"?(S=v,k=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(k=v,S=y==="end"?"top":"bottom");const N=x-m.top-m.bottom,E=b-m.left-m.right,T=Zr(x-m[S],N),A=Zr(b-m[k],E),M=i.middlewareData.shift,I=!M;let O=T,B=A;M!=null&&M.enabled.x&&(B=E),M!=null&&M.enabled.y&&(O=N),I&&!y&&(g?B=b-2*lr(m.left,m.right):O=x-2*lr(m.top,m.bottom)),await d({...i,availableWidth:B,availableHeight:O});const q=await s.getDimensions(u.floating);return b!==q.width||x!==q.height?{reset:{rects:!0}}:{}}}};function Yd(){return typeof window<"u"}function rs(t){return LS(t)?(t.nodeName||"").toLowerCase():"#document"}function ci(t){var i;return(t==null||(i=t.ownerDocument)==null?void 0:i.defaultView)||window}function fr(t){var i;return(i=(LS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:i.documentElement}function LS(t){return Yd()?t instanceof Node||t instanceof ci(t).Node:!1}function La(t){return Yd()?t instanceof Element||t instanceof ci(t).Element:!1}function el(t){return Yd()?t instanceof HTMLElement||t instanceof ci(t).HTMLElement:!1}function Bx(t){return!Yd()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ci(t).ShadowRoot}function Gd(t){const{overflow:i,overflowX:a,overflowY:l,display:s}=Ia(t);return/auto|scroll|overlay|hidden|clip/.test(i+l+a)&&s!=="inline"&&s!=="contents"}function fO(t){return/^(table|td|th)$/.test(rs(t))}function Xd(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const hO=/transform|translate|scale|rotate|perspective|filter/,mO=/paint|layout|strict|content/,zl=t=>!!t&&t!=="none";let Um;function wg(t){const i=La(t)?Ia(t):t;return zl(i.transform)||zl(i.translate)||zl(i.scale)||zl(i.rotate)||zl(i.perspective)||!kg()&&(zl(i.backdropFilter)||zl(i.filter))||hO.test(i.willChange||"")||mO.test(i.contain||"")}function pO(t){let i=Fl(t);for(;el(i)&&!mc(i);){if(wg(i))return i;if(Xd(i))return null;i=Fl(i)}return null}function kg(){return Um==null&&(Um=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Um}function mc(t){return/^(html|body|#document)$/.test(rs(t))}function Ia(t){return ci(t).getComputedStyle(t)}function Qd(t){return La(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fl(t){if(rs(t)==="html")return t;const i=t.assignedSlot||t.parentNode||Bx(t)&&t.host||fr(t);return Bx(i)?i.host:i}function IS(t){const i=Fl(t);return mc(i)?(t.ownerDocument||t).body:el(i)&&Gd(i)?i:IS(i)}function pc(t,i,a){var l;i===void 0&&(i=[]),a===void 0&&(a=!0);const s=IS(t),u=s===((l=t.ownerDocument)==null?void 0:l.body),d=ci(s);if(u){const h=zp(d);return i.concat(d,d.visualViewport||[],Gd(s)?s:[],h&&a?pc(h):[])}else return i.concat(s,pc(s,[],a))}function zp(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function BS(t){const i=Ia(t);let a=parseFloat(i.width)||0,l=parseFloat(i.height)||0;const s=el(t),u=s?t.offsetWidth:a,d=s?t.offsetHeight:l,h=Cd(a)!==u||Cd(l)!==d;return h&&(a=u,l=d),{width:a,height:l,$:h}}function Cg(t){return La(t)?t:t.contextElement}function Ko(t){const i=Cg(t);if(!el(i))return or(1);const a=i.getBoundingClientRect(),{width:l,height:s,$:u}=BS(i);let d=(u?Cd(a.width):a.width)/l,h=(u?Cd(a.height):a.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const gO=or(0);function PS(t){const i=ci(t);return!kg()||!i.visualViewport?gO:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function vO(t,i,a){return i===void 0&&(i=!1),!!a&&i&&a===ci(t)}function Vl(t,i,a,l){i===void 0&&(i=!1),a===void 0&&(a=!1);const s=t.getBoundingClientRect(),u=Cg(t);let d=or(1);i&&(l?La(l)&&(d=Ko(l)):d=Ko(t));const h=vO(u,a,l)?PS(u):or(0);let m=(s.left+h.x)/d.x,v=(s.top+h.y)/d.y,y=s.width/d.x,g=s.height/d.y;if(u&&l){const b=ci(u),x=La(l)?ci(l):l;let S=b,k=zp(S);for(;k&&x!==S;){const N=Ko(k),E=k.getBoundingClientRect(),T=Ia(k),A=E.left+(k.clientLeft+parseFloat(T.paddingLeft))*N.x,M=E.top+(k.clientTop+parseFloat(T.paddingTop))*N.y;m*=N.x,v*=N.y,y*=N.x,g*=N.y,m+=A,v+=M,S=ci(k),k=zp(S)}}return Ed({width:y,height:g,x:m,y:v})}function Kd(t,i){const a=Qd(t).scrollLeft;return i?i.left+a:Vl(fr(t)).left+a}function HS(t,i){const a=t.getBoundingClientRect(),l=a.left+i.scrollLeft-Kd(t,a),s=a.top+i.scrollTop;return{x:l,y:s}}function yO(t){let{elements:i,rect:a,offsetParent:l,strategy:s}=t;const u=s==="fixed",d=fr(l),h=i?Xd(i.floating):!1;if(l===d||h&&u)return a;let m={scrollLeft:0,scrollTop:0},v=or(1);const y=or(0),g=el(l);if((g||!u)&&((rs(l)!=="body"||Gd(d))&&(m=Qd(l)),g)){const x=Vl(l);v=Ko(l),y.x=x.x+l.clientLeft,y.y=x.y+l.clientTop}const b=d&&!g&&!u?HS(d,m):or(0);return{width:a.width*v.x,height:a.height*v.y,x:a.x*v.x-m.scrollLeft*v.x+y.x+b.x,y:a.y*v.y-m.scrollTop*v.y+y.y+b.y}}function bO(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function xO(t){const i=Qd(t),a=t.ownerDocument.body,l=lr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=lr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-i.scrollLeft+Kd(t);const d=-i.scrollTop;return Ia(a).direction==="rtl"&&(u+=lr(t.clientWidth,a.clientWidth)-l),{width:l,height:s,x:u,y:d}}const jO=25;function SO(t,i,a){a===void 0&&(a="viewport");const l=a==="layoutViewport",s=ci(t),u=fr(t),d=s.visualViewport;let h=u.clientWidth,m=u.clientHeight,v=0,y=0;if(d){const b=!kg()||i==="fixed";l?b||(v=-d.offsetLeft,y=-d.offsetTop):(h=d.width,m=d.height,b&&(v=d.offsetLeft,y=d.offsetTop))}if(Kd(u)<=0){const b=u.ownerDocument,x=b.body,S=getComputedStyle(x),k=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,N=Math.abs(u.clientWidth-x.clientWidth-k),E=getComputedStyle(u).scrollbarGutter==="stable both-edges"?N/2:N;E<=jO&&(h-=E)}return{width:h,height:m,x:v,y}}function wO(t,i){const a=Vl(t,!0,i==="fixed"),l=a.top+t.clientTop,s=a.left+t.clientLeft,u=Ko(t),d=t.clientWidth*u.x,h=t.clientHeight*u.y,m=s*u.x,v=l*u.y;return{width:d,height:h,x:m,y:v}}function Px(t,i,a){let l;if(i==="viewport"||i==="layoutViewport")l=SO(t,a,i);else if(i==="document")l=xO(fr(t));else if(La(i))l=wO(i,a);else{const s=PS(t);l={x:i.x-s.x,y:i.y-s.y,width:i.width,height:i.height}}return Ed(l)}function kO(t,i){const a=i.get(t);if(a)return a;let l=pc(t,[],!1).filter(h=>La(h)&&rs(h)!=="body"),s=null;const u=Ia(t).position==="fixed";let d=u?Fl(t):t;for(;La(d)&&!mc(d);){const h=Ia(d),m=wg(d),v=s?s.position:u?"fixed":"";!m&&(v==="fixed"||v==="absolute"&&h.position==="static")?l=l.filter(g=>g!==d):s=h,d=Fl(d)}return i.set(t,l),l}function CO(t){let{element:i,boundary:a,rootBoundary:l,strategy:s}=t;const d=[...a==="clippingAncestors"?Xd(i)?[]:kO(i,this._c):[].concat(a),l],h=Px(i,d[0],s);let m=h.top,v=h.right,y=h.bottom,g=h.left;for(let b=1;b<d.length;b++){const x=Px(i,d[b],s);m=lr(x.top,m),v=Zr(x.right,v),y=Zr(x.bottom,y),g=lr(x.left,g)}return{width:v-g,height:y-m,x:g,y:m}}function NO(t){const{width:i,height:a}=BS(t);return{width:i,height:a}}function EO(t,i,a){const l=el(i),s=fr(i),u=a==="fixed",d=Vl(t,!0,u,i);let h={scrollLeft:0,scrollTop:0};const m=or(0);if((l||!u)&&((rs(i)!=="body"||Gd(s))&&(h=Qd(i)),l)){const b=Vl(i,!0,u,i);m.x=b.x+i.clientLeft,m.y=b.y+i.clientTop}!l&&s&&(m.x=Kd(s));const v=s&&!l&&!u?HS(s,h):or(0),y=d.left+h.scrollLeft-m.x-v.x,g=d.top+h.scrollTop-m.y-v.y;return{x:y,y:g,width:d.width,height:d.height}}function qm(t){return Ia(t).position==="static"}function Hx(t,i){if(!el(t)||Ia(t).position==="fixed")return null;if(i)return i(t);let a=t.offsetParent;return fr(t)===a&&(a=a.ownerDocument.body),a}function US(t,i){const a=ci(t);if(Xd(t))return a;if(!el(t)){let s=Fl(t);for(;s&&!mc(s);){if(La(s)&&!qm(s))return s;s=Fl(s)}return a}let l=Hx(t,i);for(;l&&fO(l)&&qm(l);)l=Hx(l,i);return l&&mc(l)&&qm(l)&&!wg(l)?a:l||pO(t)||a}const TO=async function(t){const i=this.getOffsetParent||US,a=this.getDimensions,l=await a(t.floating);return{reference:EO(t.reference,await i(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function AO(t){return Ia(t).direction==="rtl"}const MO={convertOffsetParentRelativeRectToViewportRelativeRect:yO,getDocumentElement:fr,getClippingRect:CO,getOffsetParent:US,getElementRects:TO,getClientRects:bO,getDimensions:NO,getScale:Ko,isElement:La,isRTL:AO};function qS(t,i){return t.x===i.x&&t.y===i.y&&t.width===i.width&&t.height===i.height}function OO(t,i,a){let l=null,s;const u=fr(t);function d(){var y;clearTimeout(s),(y=l)==null||y.disconnect(),l=null}function h(y,g){y===void 0&&(y=!1),g===void 0&&(g=1),d();const b=t.getBoundingClientRect(),{left:x,top:S,width:k,height:N}=b;if(y||i(),!k||!N)return;const E=rd(S),T=rd(u.clientWidth-(x+k)),A=rd(u.clientHeight-(S+N)),M=rd(x),O={rootMargin:-E+"px "+-T+"px "+-A+"px "+-M+"px",threshold:lr(0,Zr(1,g))||1};let B=!0;function q($){const L=$[0].intersectionRatio;if(!qS(b,t.getBoundingClientRect()))return h();if(L!==g){if(!B)return h();L?h(!1,L):s=setTimeout(()=>{h(!1,1e-7)},1e3)}B=!1}try{l=new IntersectionObserver(q,{...O,root:u.ownerDocument})}catch{l=new IntersectionObserver(q,O)}l.observe(t)}const m=ci(t),v=()=>h(a);return m.addEventListener("resize",v),h(!0),()=>{m.removeEventListener("resize",v),d()}}function _O(t,i,a,l){l===void 0&&(l={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=l,v=Cg(t),y=s||u?[...v?pc(v):[],...i?pc(i):[]]:[];y.forEach(E=>{s&&E.addEventListener("scroll",a),u&&E.addEventListener("resize",a)});const g=v&&h?OO(v,a,u):null;let b=-1,x=null;d&&(x=new ResizeObserver(E=>{let[T]=E;T&&T.target===v&&x&&i&&(x.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var A;(A=x)==null||A.observe(i)})),a()}),v&&!m&&x.observe(v),i&&x.observe(i));let S,k=m?Vl(t):null;m&&N();function N(){const E=Vl(t);k&&!qS(k,E)&&a(),k=E,S=requestAnimationFrame(N)}return a(),()=>{var E;y.forEach(T=>{s&&T.removeEventListener("scroll",a),u&&T.removeEventListener("resize",a)}),g==null||g(),(E=x)==null||E.disconnect(),x=null,m&&cancelAnimationFrame(S)}}const RO=sO,DO=cO,zO=rO,LO=dO,IO=lO,Ux=aO,BO=uO,PO=(t,i,a)=>{const l=new Map,s=a??{},u={...MO,...s.platform,_c:l};return iO(t,i,{...s,platform:u})};var HO=typeof document<"u",UO=function(){},yd=HO?w.useLayoutEffect:UO;function Td(t,i){if(t===i)return!0;if(typeof t!=typeof i)return!1;if(typeof t=="function"&&t.toString()===i.toString())return!0;let a,l,s;if(t&&i&&typeof t=="object"){if(Array.isArray(t)){if(a=t.length,a!==i.length)return!1;for(l=a;l--!==0;)if(!Td(t[l],i[l]))return!1;return!0}if(s=Object.keys(t),a=s.length,a!==Object.keys(i).length)return!1;for(l=a;l--!==0;)if(!{}.hasOwnProperty.call(i,s[l]))return!1;for(l=a;l--!==0;){const u=s[l];if(!(u==="_owner"&&t.$$typeof)&&!Td(t[u],i[u]))return!1}return!0}return t!==t&&i!==i}function FS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qx(t,i){const a=FS(t);return Math.round(i*a)/a}function Fm(t){const i=w.useRef(t);return yd(()=>{i.current=t}),i}function qO(t){t===void 0&&(t={});const{placement:i="bottom",strategy:a="absolute",middleware:l=[],platform:s,elements:{reference:u,floating:d}={},transform:h=!0,whileElementsMounted:m,open:v}=t,[y,g]=w.useState({x:0,y:0,strategy:a,placement:i,middlewareData:{},isPositioned:!1}),[b,x]=w.useState(l);Td(b,l)||x(l);const[S,k]=w.useState(null),[N,E]=w.useState(null),T=w.useCallback(H=>{H!==O.current&&(O.current=H,k(H))},[]),A=w.useCallback(H=>{H!==B.current&&(B.current=H,E(H))},[]),M=u||S,I=d||N,O=w.useRef(null),B=w.useRef(null),q=w.useRef(y),$=m!=null,L=Fm(m),Y=Fm(s),X=Fm(v),ue=w.useCallback(()=>{if(!O.current||!B.current)return;const H={placement:i,strategy:a,middleware:b};Y.current&&(H.platform=Y.current),PO(O.current,B.current,H).then(W=>{const D={...W,isPositioned:X.current!==!1};Z.current&&!Td(q.current,D)&&(q.current=D,Jl.flushSync(()=>{g(D)}))})},[b,i,a,Y,X]);yd(()=>{v===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,g(H=>({...H,isPositioned:!1})))},[v]);const Z=w.useRef(!1);yd(()=>(Z.current=!0,()=>{Z.current=!1}),[]),yd(()=>{if(M&&(O.current=M),I&&(B.current=I),M&&I){if(L.current)return L.current(M,I,ue);ue()}},[M,I,ue,L,$]);const U=w.useMemo(()=>({reference:O,floating:B,setReference:T,setFloating:A}),[T,A]),G=w.useMemo(()=>({reference:M,floating:I}),[M,I]),R=w.useMemo(()=>{const H={position:a,left:0,top:0};if(!G.floating)return H;const W=qx(G.floating,y.x),D=qx(G.floating,y.y);return h?{...H,transform:"translate("+W+"px, "+D+"px)",...FS(G.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:W,top:D}},[a,h,G.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:ue,refs:U,elements:G,floatingStyles:R}),[y,ue,U,G,R])}const FO=t=>{function i(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:t,fn(a){const{element:l,padding:s}=typeof t=="function"?t(a):t;return l&&i(l)?l.current!=null?Ux({element:l.current,padding:s}).fn(a):{}:l?Ux({element:l,padding:s}).fn(a):{}}}},VO=(t,i)=>{const a=RO(t);return{name:a.name,fn:a.fn,options:[t,i]}},$O=(t,i)=>{const a=DO(t);return{name:a.name,fn:a.fn,options:[t,i]}},YO=(t,i)=>({fn:BO(t).fn,options:[t,i]}),GO=(t,i)=>{const a=zO(t);return{name:a.name,fn:a.fn,options:[t,i]}},XO=(t,i)=>{const a=LO(t);return{name:a.name,fn:a.fn,options:[t,i]}},QO=(t,i)=>{const a=IO(t);return{name:a.name,fn:a.fn,options:[t,i]}},KO=(t,i)=>{const a=FO(t);return{name:a.name,fn:a.fn,options:[t,i]}};var ZO=Object.defineProperty,Qr=(t,i)=>ZO(t,"name",{value:i,configurable:!0}),VS="Popper",[$S,Zd]=Wr(VS),[JO,YS]=$S(VS),WO=Qr(t=>{const{__scopePopper:i,children:a}=t,[l,s]=w.useState(null),[u,d]=w.useState(void 0);return c.jsx(JO,{scope:i,anchor:l,onAnchorChange:s,placementState:u,setPlacementState:d,children:a})},"Popper"),e_="PopperAnchor",t_=w.forwardRef(Qr(function(i,a){const{__scopePopper:l,virtualRef:s,...u}=i,d=YS(e_,l),h=w.useRef(null),m=d.onAnchorChange,v=w.useCallback(k=>{h.current=k,k&&m(k)},[m]),y=xt(a,v),g=w.useRef(null);w.useEffect(()=>{if(!s)return;const k=g.current;g.current=s.current,k!==g.current&&m(g.current)});const b=d.placementState&&Jd(d.placementState),x=b==null?void 0:b[0],S=b==null?void 0:b[1];return s?null:c.jsx(Dt.div,{"data-radix-popper-side":x,"data-radix-popper-align":S,...u,ref:y})},"PopperAnchor")),GS="PopperContent",[n_,M9]=$S(GS),i_=w.forwardRef(Qr(function(i,a){var be,le,se,he,Ne,ze,Fe;const{__scopePopper:l,side:s="bottom",sideOffset:u=0,align:d="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:x=!1,updatePositionStrategy:S="optimized",onPlaced:k,...N}=i,E=YS(GS,l),[T,A]=w.useState(null),M=xt(a,A),[I,O]=w.useState(null),B=_S(I),q=(B==null?void 0:B.width)??0,$=(B==null?void 0:B.height)??0,L=s+(d!=="center"?"-"+d:""),Y=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},X=Array.isArray(y)?y:[y],ue=X.length>0,Z={padding:Y,boundary:X.filter(XS),altBoundary:ue},{refs:U,floatingStyles:G,placement:R,isPositioned:H,middlewareData:W}=qO({strategy:"fixed",placement:L,whileElementsMounted:Qr((...ht)=>_O(...ht,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[VO({mainAxis:u+$,alignmentAxis:h}),v&&$O({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?YO():void 0,...Z}),v&&GO({...Z}),XO({...Z,apply:Qr(({elements:ht,rects:ot,availableWidth:Je,availableHeight:At})=>{const{width:gn,height:vn}=ot.reference,Hn=ht.floating.style;Hn.setProperty("--radix-popper-available-width",`${Je}px`),Hn.setProperty("--radix-popper-available-height",`${At}px`),Hn.setProperty("--radix-popper-anchor-width",`${gn}px`),Hn.setProperty("--radix-popper-anchor-height",`${vn}px`)},"apply")}),I&&KO({element:I,padding:m}),a_({arrowWidth:q,arrowHeight:$}),x&&QO({strategy:"referenceHidden",...Z,boundary:ue?Z.boundary:void 0})]}),D=E.setPlacementState;Mn(()=>(D(R),()=>{D(void 0)}),[R,D]);const[ie,ne]=Jd(R),P=An(k);Mn(()=>{H&&(P==null||P())},[H,P]);const F=(be=W.arrow)==null?void 0:be.x,fe=(le=W.arrow)==null?void 0:le.y,ye=((se=W.arrow)==null?void 0:se.centerOffset)!==0,[Se,re]=w.useState();return Mn(()=>{T&&re(window.getComputedStyle(T).zIndex)},[T]),c.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:H?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(he=W.transformOrigin)==null?void 0:he.x,(Ne=W.transformOrigin)==null?void 0:Ne.y].join(" "),...((ze=W.hide)==null?void 0:ze.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:i.dir,children:c.jsx(n_,{scope:l,placedSide:ie,placedAlign:ne,onArrowChange:O,arrowX:F,arrowY:fe,shouldHideArrow:ye,children:c.jsx(Dt.div,{"data-side":ie,"data-align":ne,...N,ref:M,style:{...N.style,animation:H?(Fe=N.style)==null?void 0:Fe.animation:"none"}})})})},"PopperContent"));function XS(t){return t!==null}Qr(XS,"isNotNull");var a_=Qr(t=>({name:"transformOrigin",options:t,fn(i){var N,E,T;const{placement:a,rects:l,middlewareData:s}=i,d=((N=s.arrow)==null?void 0:N.centerOffset)!==0,h=d?0:t.arrowWidth,m=d?0:t.arrowHeight,[v,y]=Jd(a),g={start:"0%",center:"50%",end:"100%"}[y],b=(((E=s.arrow)==null?void 0:E.x)??0)+h/2,x=(((T=s.arrow)==null?void 0:T.y)??0)+m/2;let S="",k="";return v==="bottom"?(S=d?g:`${b}px`,k=`${-m}px`):v==="top"?(S=d?g:`${b}px`,k=`${l.floating.height+m}px`):v==="right"?(S=`${-m}px`,k=d?g:`${x}px`):v==="left"&&(S=`${l.floating.width+m}px`,k=d?g:`${x}px`),{data:{x:S,y:k}}}}),"transformOrigin");function Jd(t){const[i,a="center"]=t.split("-");return[i,a]}Qr(Jd,"getSideAndAlignFromPlacement");var QS=WO,KS=t_,ZS=i_,r_=Object.defineProperty,l_=(t,i)=>r_(t,"name",{value:i,configurable:!0}),o_=w.forwardRef(l_(function(i,a){return c.jsx(Dt.label,{...i,ref:a,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")),s_=o_,c_=Object.defineProperty,u_=(t,i)=>c_(t,"name",{value:i,configurable:!0});function JS(t){const i=w.useRef({value:t,previous:t});return w.useMemo(()=>(i.current.value!==t&&(i.current.previous=i.current.value,i.current.value=t),i.current.previous),[t])}u_(JS,"usePrevious");var d_=Object.defineProperty,f_=(t,i)=>d_(t,"name",{value:i,configurable:!0});function Ad(t,[i,a]){return Math.min(a,Math.max(i,t))}f_(Ad,"clamp");var h_=Object.defineProperty,tl=(t,i)=>h_(t,"name",{value:i,configurable:!0}),Ng="Popover",[WS,O9]=Wr(Ng,[Zd]),Eg=Zd(),[m_,ls]=WS(Ng),p_=tl(t=>{const{__scopePopover:i,children:a,open:l,defaultOpen:s,onOpenChange:u,modal:d=!1}=t,h=Eg(i),m=w.useRef(null),[v,y]=w.useState(!1),[g,b]=fc({prop:l,defaultProp:s??!1,onChange:u,caller:Ng});return c.jsx(QS,{...h,children:c.jsx(m_,{scope:i,contentId:Ul(),triggerRef:m,open:g,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(x=>!x),[b]),hasCustomAnchor:v,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:d,children:a})})},"Popover"),g_="PopoverTrigger",v_=w.forwardRef(tl(function(i,a){const{__scopePopover:l,...s}=i,u=ls(g_,l),d=Eg(l),h=xt(a,u.triggerRef),m=c.jsx(Dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":Tg(u.open),...s,ref:h,onClick:mt(i.onClick,u.onOpenToggle)});return u.hasCustomAnchor?m:c.jsx(KS,{asChild:!0,...d,children:m})},"PopoverTrigger")),ew="PopoverPortal",[y_,b_]=WS(ew,{forceMount:void 0}),x_=tl(t=>{const{__scopePopover:i,forceMount:a,children:l,container:s}=t,u=ls(ew,i);return c.jsx(y_,{scope:i,forceMount:a,children:c.jsx(Ua,{present:a||u.open,children:c.jsx(pg,{asChild:!0,container:s,children:l})})})},"PopoverPortal"),gc="PopoverContent",j_=w.forwardRef(tl(function(i,a){const l=b_(gc,i.__scopePopover),{forceMount:s=l.forceMount,...u}=i,d=ls(gc,i.__scopePopover);return c.jsx(Ua,{present:s||d.open,children:d.modal?c.jsx(w_,{...u,ref:a}):c.jsx(k_,{...u,ref:a})})},"PopoverContent")),S_=za("PopoverContent.RemoveScroll"),w_=w.forwardRef(tl(function(i,a){const l=ls(gc,i.__scopePopover),s=w.useRef(null),u=xt(a,s),d=w.useRef(!1);return w.useEffect(()=>{const h=s.current;if(h)return vg(h)},[]),c.jsx($d,{as:S_,allowPinchZoom:!0,children:c.jsx(tw,{...i,ref:u,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(i.onCloseAutoFocus,h=>{var m;h.preventDefault(),d.current||(m=l.triggerRef.current)==null||m.focus()}),onPointerDownOutside:mt(i.onPointerDownOutside,h=>{const m=h.detail.originalEvent,v=m.button===0&&m.ctrlKey===!0,y=m.button===2||v;d.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:mt(i.onFocusOutside,h=>h.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),k_=w.forwardRef(tl(function(i,a){const l=ls(gc,i.__scopePopover),s=w.useRef(!1),u=w.useRef(!1);return c.jsx(tw,{...i,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var h,m;(h=i.onCloseAutoFocus)==null||h.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 h=d.target;((y=l.triggerRef.current)==null?void 0:y.contains(h))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"PopoverContentNonModal")),tw=w.forwardRef(tl(function(i,a){const{__scopePopover:l,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:g,...b}=i,x=ls(gc,l),S=Eg(l);return Cc(),c.jsx(hg,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:d,children:c.jsx(dg,{asChild:!0,disableOutsidePointerEvents:h,onInteractOutside:g,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onDismiss:()=>x.onOpenChange(!1),deferPointerDownOutside:!0,children:c.jsx(ZS,{"data-state":Tg(x.open),role:"dialog",id:x.contentId,...S,...b,ref:a,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function Tg(t){return t?"open":"closed"}tl(Tg,"getState");var C_=p_,N_=v_,E_=x_,T_=j_,A_=Object.defineProperty,at=(t,i)=>A_(t,"name",{value:i,configurable:!0});function nw(t,i){return w.useReducer((a,l)=>i[a][l]??a,t)}at(nw,"useStateMachine");var iw="ScrollArea",[aw,_9]=Wr(iw),[M_,$i]=aw(iw),O_=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,type:s="hover",dir:u,scrollHideDelay:d=600,...h}=i,[m,v]=w.useState(null),[y,g]=w.useState(null),[b,x]=w.useState(null),[S,k]=w.useState(null),[N,E]=w.useState(null),[T,A]=w.useState(0),[M,I]=w.useState(0),[O,B]=w.useState(!1),[q,$]=w.useState(!1),L=xt(a,v),Y=ug(u);return c.jsx(M_,{scope:l,type:s,dir:Y,scrollHideDelay:d,scrollArea:m,viewport:y,onViewportChange:g,content:b,onContentChange:x,scrollbarX:S,onScrollbarXChange:k,scrollbarXEnabled:O,onScrollbarXEnabledChange:B,scrollbarY:N,onScrollbarYChange:E,scrollbarYEnabled:q,onScrollbarYEnabledChange:$,onCornerWidthChange:A,onCornerHeightChange:I,children:c.jsx(Dt.div,{dir:Y,...h,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":M+"px",...i.style}})})},"ScrollArea")),__="ScrollAreaViewport",R_=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,children:s,nonce:u,...d}=i,h=$i(__,l),m=w.useRef(null),v=xt(a,m,h.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx(D_,{nonce:u}),c.jsx(Dt.div,{"data-radix-scroll-area-viewport":"",...d,ref:v,style:{overflowX:h.scrollbarXEnabled?"scroll":"hidden",overflowY:h.scrollbarYEnabled?"scroll":"hidden",...i.style},children:c.jsx("div",{ref:h.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})},"ScrollAreaViewport")),D_=w.memo(at(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"),(t,i)=>t.nonce===i.nonce),hr="ScrollAreaScrollbar",z_=w.forwardRef(at(function(i,a){const{forceMount:l,...s}=i,u=$i(hr,i.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:h}=u,m=i.orientation==="horizontal";return w.useEffect(()=>(m?d(!0):h(!0),()=>{m?d(!1):h(!1)}),[m,d,h]),u.type==="hover"?c.jsx(L_,{...s,ref:a,forceMount:l}):u.type==="scroll"?c.jsx(I_,{...s,ref:a,forceMount:l}):u.type==="auto"?c.jsx(rw,{...s,ref:a,forceMount:l}):u.type==="always"?c.jsx(Ag,{...s,ref:a,"data-state":"visible"}):null},"ScrollAreaScrollbar")),L_=w.forwardRef(at(function(i,a){const{forceMount:l,...s}=i,u=$i(hr,i.__scopeScrollArea),[d,h]=w.useState(!1);return w.useEffect(()=>{const m=u.scrollArea;let v=0;if(m){const y=at(()=>{window.clearTimeout(v),h(!0)},"handlePointerEnter"),g=at(()=>{v=window.setTimeout(()=>h(!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(Ua,{present:l||d,children:c.jsx(rw,{"data-state":d?"visible":"hidden",...s,ref:a})})},"ScrollAreaScrollbarHover")),I_=w.forwardRef(at(function(i,a){const{forceMount:l,...s}=i,u=$i(hr,i.__scopeScrollArea),d=i.orientation==="horizontal",h=Ec(()=>v("SCROLL_END"),100),[m,v]=nw("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>v("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,v]),w.useEffect(()=>{const y=u.viewport,g=d?"scrollLeft":"scrollTop";if(y){let b=y[g];const x=at(()=>{const S=y[g];b!==S&&(v("SCROLL"),h()),b=S},"handleScroll");return y.addEventListener("scroll",x),()=>y.removeEventListener("scroll",x)}},[u.viewport,d,v,h]),c.jsx(Ua,{present:l||m!=="hidden",children:c.jsx(Ag,{"data-state":m==="hidden"?"hidden":"visible",...s,ref:a,onPointerEnter:mt(i.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:mt(i.onPointerLeave,()=>v("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),rw=w.forwardRef(at(function(i,a){const l=$i(hr,i.__scopeScrollArea),{forceMount:s,...u}=i,[d,h]=w.useState(!1),m=i.orientation==="horizontal",v=Ec(()=>{if(l.viewport){const y=l.viewport.offsetWidth<l.viewport.scrollWidth,g=l.viewport.offsetHeight<l.viewport.scrollHeight;h(m?y:g)}},10);return $l(l.viewport,v),$l(l.content,v),c.jsx(Ua,{present:s||d,children:c.jsx(Ag,{"data-state":d?"visible":"hidden",...u,ref:a})})},"ScrollAreaScrollbarAuto")),Ag=w.forwardRef(at(function(i,a){const{orientation:l="vertical",...s}=i,u=$i(hr,i.__scopeScrollArea),d=w.useRef(null),h=w.useRef(0),[m,v]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=Mg(m.viewport,m.content),g={...s,sizes:m,onSizesChange:v,hasThumb:y>0&&y<1,onThumbChange:at(x=>d.current=x,"onThumbChange"),onThumbPointerUp:at(()=>h.current=0,"onThumbPointerUp"),onThumbPointerDown:at(x=>h.current=x,"onThumbPointerDown")};function b(x,S){return cw(x,h.current,m,S)}return at(b,"getScrollPosition"),l==="horizontal"?c.jsx(B_,{...g,ref:a,onThumbPositionChange:()=>{if(u.viewport&&d.current){const x=u.viewport.scrollLeft,S=Ip(x,m,u.dir);d.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:x=>{u.viewport&&(u.viewport.scrollLeft=x)},onDragScroll:x=>{u.viewport&&(u.viewport.scrollLeft=b(x,u.dir))}}):l==="vertical"?c.jsx(P_,{...g,ref:a,onThumbPositionChange:()=>{if(u.viewport&&d.current){const x=u.viewport.scrollTop,S=Ip(x,m);d.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:x=>{u.viewport&&(u.viewport.scrollTop=x)},onDragScroll:x=>{u.viewport&&(u.viewport.scrollTop=b(x))}}):null},"ScrollAreaScrollbarVisible")),B_=w.forwardRef(at(function(i,a){const{sizes:l,onSizesChange:s,...u}=i,d=$i(hr,i.__scopeScrollArea),[h,m]=w.useState(),v=w.useRef(null),y=xt(a,v,d.onScrollbarXChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),c.jsx(ow,{"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":Nc(l)+"px",...i.style},onThumbPointerDown:g=>i.onThumbPointerDown(g.x),onDragScroll:g=>i.onDragScroll(g.x),onWheelScroll:(g,b)=>{if(d.viewport){const x=d.viewport.scrollLeft+g.deltaX;i.onWheelScroll(x),_g(x,b)&&g.preventDefault()}},onResize:()=>{v.current&&d.viewport&&h&&s({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:vc(h.paddingLeft),paddingEnd:vc(h.paddingRight)}})}})},"ScrollAreaScrollbarX")),P_=w.forwardRef(at(function(i,a){const{sizes:l,onSizesChange:s,...u}=i,d=$i(hr,i.__scopeScrollArea),[h,m]=w.useState(),v=w.useRef(null),y=xt(a,v,d.onScrollbarYChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),c.jsx(ow,{"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":Nc(l)+"px",...i.style},onThumbPointerDown:g=>i.onThumbPointerDown(g.y),onDragScroll:g=>i.onDragScroll(g.y),onWheelScroll:(g,b)=>{if(d.viewport){const x=d.viewport.scrollTop+g.deltaY;i.onWheelScroll(x),_g(x,b)&&g.preventDefault()}},onResize:()=>{v.current&&d.viewport&&h&&s({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:vc(h.paddingTop),paddingEnd:vc(h.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[H_,lw]=aw(hr),ow=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,sizes:s,hasThumb:u,onThumbChange:d,onThumbPointerUp:h,onThumbPointerDown:m,onThumbPositionChange:v,onDragScroll:y,onWheelScroll:g,onResize:b,...x}=i,S=$i(hr,l),[k,N]=w.useState(null),E=xt(a,N),T=w.useRef(null),A=w.useRef(""),M=S.viewport,I=s.content-s.viewport,O=An(g),B=An(v),q=Ec(b,10);function $(L){if(T.current){const Y=L.clientX-T.current.left,X=L.clientY-T.current.top;y({x:Y,y:X})}}return at($,"handleDragScroll"),w.useEffect(()=>{const L=at(Y=>{const X=Y.target;(k==null?void 0:k.contains(X))&&O(Y,I)},"handleWheel");return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[M,k,I,O]),w.useEffect(B,[s,B]),$l(k,q),$l(S.content,q),c.jsx(H_,{scope:l,scrollbar:k,hasThumb:u,onThumbChange:An(d),onThumbPointerUp:An(h),onThumbPositionChange:B,onThumbPointerDown:An(m),children:c.jsx(Dt.div,{...x,ref:E,style:{position:"absolute",...x.style},onPointerDown:mt(i.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),T.current=k.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),$(L))}),onPointerMove:mt(i.onPointerMove,$),onPointerUp:mt(i.onPointerUp,L=>{const Y=L.target;Y.hasPointerCapture(L.pointerId)&&Y.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=A.current,S.viewport&&(S.viewport.style.scrollBehavior=""),T.current=null})})})},"ScrollAreaScrollbarImpl")),Lp="ScrollAreaThumb",U_=w.forwardRef(at(function(i,a){const{forceMount:l,...s}=i,u=lw(Lp,i.__scopeScrollArea);return c.jsx(Ua,{present:l||u.hasThumb,children:c.jsx(q_,{ref:a,...s})})},"ScrollAreaThumb")),q_=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,style:s,...u}=i,d=$i(Lp,l),h=lw(Lp,l),{onThumbPositionChange:m}=h,v=xt(a,h.onThumbChange),y=w.useRef(void 0),g=Ec(()=>{y.current&&(y.current(),y.current=void 0)},100);return w.useEffect(()=>{const b=d.viewport;if(b){const x=at(()=>{if(g(),!y.current){const S=$_(b,m);y.current=S,m()}},"handleScroll");return m(),b.addEventListener("scroll",x),()=>b.removeEventListener("scroll",x)}},[d.viewport,g,m]),c.jsx(Dt.div,{"data-state":h.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,b=>{const S=b.target.getBoundingClientRect(),k=b.clientX-S.left,N=b.clientY-S.top;h.onThumbPointerDown({x:k,y:N})}),onPointerUp:mt(i.onPointerUp,h.onThumbPointerUp)})},"ScrollAreaThumbImpl")),sw="ScrollAreaCorner",F_=w.forwardRef(at(function(i,a){const l=$i(sw,i.__scopeScrollArea),s=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&s?c.jsx(V_,{...i,ref:a}):null},"ScrollAreaCorner")),V_=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,...s}=i,u=$i(sw,l),[d,h]=w.useState(0),[m,v]=w.useState(0),y=!!(d&&m),{onCornerWidthChange:g,onCornerHeightChange:b}=u;return $l(u.scrollbarX,()=>{var S;const x=((S=u.scrollbarX)==null?void 0:S.offsetHeight)||0;u.onCornerHeightChange(x),v(x)}),$l(u.scrollbarY,()=>{var S;const x=((S=u.scrollbarY)==null?void 0:S.offsetWidth)||0;u.onCornerWidthChange(x),h(x)}),w.useEffect(()=>()=>{g(0),b(0)},[g,b]),y?c.jsx(Dt.div,{...s,ref:a,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 vc(t){return t?parseInt(t,10):0}at(vc,"toInt");function Mg(t,i){const a=t/i;return isNaN(a)?0:a}at(Mg,"getThumbRatio");function Nc(t){const i=Mg(t.viewport,t.content),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=(t.scrollbar.size-a)*i;return Math.max(l,18)}at(Nc,"getThumbSize");function cw(t,i,a,l="ltr"){const s=Nc(a),u=s/2,d=i||u,h=s-d,m=a.scrollbar.paddingStart+d,v=a.scrollbar.size-a.scrollbar.paddingEnd-h,y=a.content-a.viewport,g=l==="ltr"?[0,y]:[y*-1,0];return Og([m,v],g)(t)}at(cw,"getScrollPositionFromPointer");function Ip(t,i,a="ltr"){const l=Nc(i),s=i.scrollbar.paddingStart+i.scrollbar.paddingEnd,u=i.scrollbar.size-s,d=i.content-i.viewport,h=u-l,m=a==="ltr"?[0,d]:[d*-1,0],v=Ad(t,m);return Og([0,d],[0,h])(v)}at(Ip,"getThumbOffsetFromScroll");function Og(t,i){return a=>{if(t[0]===t[1]||i[0]===i[1])return i[0];const l=(i[1]-i[0])/(t[1]-t[0]);return i[0]+l*(a-t[0])}}at(Og,"linearScale");function _g(t,i){return t>0&&t<i}at(_g,"isScrollingWithinScrollbarBounds");var $_=at((t,i=()=>{})=>{let a={left:t.scrollLeft,top:t.scrollTop},l=0;return at((function s(){const u={left:t.scrollLeft,top:t.scrollTop},d=a.left!==u.left,h=a.top!==u.top;(d||h)&&i(),a=u,l=window.requestAnimationFrame(s)}),"loop")(),()=>window.cancelAnimationFrame(l)},"addUnlinkedScrollListener");function Ec(t,i){const a=An(t),l=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(l.current),[]),w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(a,i)},[a,i])}at(Ec,"useDebounceCallback");function $l(t,i){const a=An(i);Mn(()=>{let l=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(a)});return s.observe(t),()=>{window.cancelAnimationFrame(l),s.unobserve(t)}}},[t,a])}at($l,"useResizeObserver");var Y_=O_,G_=R_,X_=F_,Q_=Object.defineProperty,wt=(t,i)=>Q_(t,"name",{value:i,configurable:!0}),K_=[" ","Enter","ArrowUp","ArrowDown"],Z_=[" ","Enter"],es="Select",[Wd,Rg,J_]=Qj(es),[Wl,R9]=Wr(es,[J_,Zd]),Dg=Zd(),[W_,nl]=Wl(es),[eR,tR]=Wl(es);function uw(t){const{__scopeSelect:i,children:a,open:l,defaultOpen:s,onOpenChange:u,value:d,defaultValue:h,onValueChange:m,dir:v,name:y,autoComplete:g,disabled:b,required:x,form:S,internal_do_not_use_render:k}=t,N=Dg(i),[E,T]=w.useState(null),[A,M]=w.useState(null),[I,O]=w.useState(!1),B=ug(v),[q,$]=fc({prop:l,defaultProp:s??!1,onChange:u,caller:es}),[L,Y]=fc({prop:d,defaultProp:h,onChange:m,caller:es}),X=w.useRef(null),ue=w.useRef(L);w.useEffect(()=>{const ne=S?E==null?void 0:E.ownerDocument.getElementById(S):E==null?void 0:E.form;if(ne instanceof HTMLFormElement){const P=wt(()=>Y(ue.current),"reset");return ne.addEventListener("reset",P),()=>ne.removeEventListener("reset",P)}},[S,E,Y]);const Z=E?!!S||!!E.closest("form"):!0,[U,G]=w.useState(new Set),R=Ul(),H=Array.from(U).map(ne=>ne.props.value).join(";"),W=w.useCallback(ne=>{G(P=>new Set(P).add(ne))},[]),D=w.useCallback(ne=>{G(P=>{const F=new Set(P);return F.delete(ne),F})},[]),ie={required:x,trigger:E,onTriggerChange:T,valueNode:A,onValueNodeChange:M,valueNodeHasChildren:I,onValueNodeHasChildrenChange:O,contentId:R,value:L,onValueChange:Y,open:q,onOpenChange:$,dir:B,triggerPointerDownPosRef:X,disabled:b,name:y,autoComplete:g,form:S,nativeOptions:U,nativeSelectKey:H,isFormControl:Z};return c.jsx(QS,{...N,children:c.jsx(W_,{scope:i,...ie,children:c.jsx(Wd.Provider,{scope:i,children:c.jsx(eR,{scope:i,onNativeOptionAdd:W,onNativeOptionRemove:D,children:hw(k)?k(ie):a})})})})}wt(uw,"SelectProvider");var nR=wt(t=>{const{__scopeSelect:i,children:a,...l}=t;return c.jsx(uw,{__scopeSelect:i,...l,internal_do_not_use_render:({isFormControl:s})=>c.jsxs(c.Fragment,{children:[a,s?c.jsx(ER,{__scopeSelect:i}):null]})})},"Select"),iR="SelectTrigger",aR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,disabled:s=!1,...u}=i,d=Dg(l),h=nl(iR,l),m=h.disabled||s,v=xt(a,h.onTriggerChange),y=Rg(l),g=w.useRef("touch"),[b,x,S]=zg(N=>{const E=y().filter(M=>!M.disabled),T=E.find(M=>M.value===h.value),A=Lg(E,N,T);A!==void 0&&h.onValueChange(A.value)}),k=wt(N=>{m||(h.onOpenChange(!0),S()),N&&(h.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})},"handleOpen");return c.jsx(KS,{asChild:!0,...d,children:c.jsx(Dt.button,{type:"button",role:"combobox","aria-controls":h.open?h.contentId:void 0,"aria-expanded":h.open,"aria-required":h.required,"aria-autocomplete":"none",dir:h.dir,"data-state":h.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Tc(h.value)?"":void 0,...u,ref:v,onClick:mt(u.onClick,N=>{N.currentTarget.focus(),g.current!=="mouse"&&k(N)}),onPointerDown:mt(u.onPointerDown,N=>{g.current=N.pointerType;const E=N.target;E.hasPointerCapture(N.pointerId)&&E.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(k(N),N.preventDefault())}),onKeyDown:mt(u.onKeyDown,N=>{const E=b.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&x(N.key),!(E&&N.key===" ")&&K_.includes(N.key)&&(k(),N.preventDefault())})})})},"SelectTrigger")),rR="SelectValue",lR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,className:s,style:u,children:d,placeholder:h="",...m}=i,v=nl(rR,l),{onValueNodeHasChildrenChange:y}=v,g=d!==void 0,b=xt(a,v.onValueNodeChange);Mn(()=>{y(g)},[y,g]);const x=Tc(v.value);return c.jsx(Dt.span,{...m,asChild:x?!1:m.asChild,ref:b,style:{pointerEvents:"none"},children:c.jsx(w.Fragment,{children:x?h:d},x?"placeholder":"value")})},"SelectValue")),oR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,children:s,...u}=i;return c.jsx(Dt.span,{"aria-hidden":!0,...u,ref:a,children:s||"▼"})},"SelectIcon")),sR="SelectPortal",[cR,uR]=Wl(sR,{forceMount:void 0}),dR=wt(t=>{const{__scopeSelect:i,forceMount:a,...l}=t;return c.jsx(cR,{scope:t.__scopeSelect,forceMount:a,children:c.jsx(pg,{asChild:!0,...l})})},"SelectPortal"),Yl="SelectContent",fR=w.forwardRef(wt(function(i,a){const l=uR(Yl,i.__scopeSelect),{forceMount:s=l.forceMount,...u}=i,d=nl(Yl,i.__scopeSelect),[h,m]=w.useState();return Mn(()=>{m(new DocumentFragment)},[]),c.jsx(Ua,{present:s||d.open,children:({present:v})=>v?c.jsx(pR,{...u,ref:a}):c.jsx(hR,{...u,fragment:h})})},"SelectContent")),hR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,children:s,fragment:u}=i;return u?Jl.createPortal(c.jsx(dw,{scope:l,children:c.jsx(Wd.Slot,{scope:l,children:c.jsx("div",{ref:a,children:s})})}),u):null},"SelectContentFragment")),ia=10,[dw,ef]=Wl(Yl),mR=za("SelectContent.RemoveScroll"),pR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l}=i,{position:s="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:h,side:m,sideOffset:v,align:y,alignOffset:g,arrowPadding:b,collisionBoundary:x,collisionPadding:S,sticky:k,hideWhenDetached:N,avoidCollisions:E,...T}=i,A=nl(Yl,l),[M,I]=w.useState(null),[O,B]=w.useState(null),q=xt(a,I),[$,L]=w.useState(null),[Y,X]=w.useState(null),ue=Rg(l),[Z,U]=w.useState(!1),G=w.useRef(!1);w.useEffect(()=>{if(M)return vg(M)},[M]),Cc();const R=w.useCallback(re=>{const[be,...le]=ue().map(Ne=>Ne.ref.current),[se]=le.slice(-1),he=document.activeElement;for(const Ne of re)if(Ne===he||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===be&&O&&(O.scrollTop=0),Ne===se&&O&&(O.scrollTop=O.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==he))return},[ue,O]),H=w.useCallback(()=>R([$,M]),[R,$,M]);w.useEffect(()=>{Z&&H()},[Z,H]);const{onOpenChange:W,triggerPointerDownPosRef:D}=A;w.useEffect(()=>{if(M){let re={x:0,y:0};const be=wt(se=>{var he,Ne;re={x:Math.abs(Math.round(se.pageX)-(((he=D.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(se.pageY)-(((Ne=D.current)==null?void 0:Ne.y)??0))}},"handlePointerMove"),le=wt(se=>{re.x<=10&&re.y<=10?se.preventDefault():se.composedPath().includes(M)||W(!1),document.removeEventListener("pointermove",be),D.current=null},"handlePointerUp");return D.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",le,{capture:!0})}}},[M,W,D]),w.useEffect(()=>{const re=wt(()=>W(!1),"close");return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[W]);const[ie,ne]=zg(re=>{const be=ue().filter(he=>!he.disabled),le=be.find(he=>he.ref.current===document.activeElement),se=Lg(be,re,le);se&&setTimeout(()=>{var he;return(he=se.ref.current)==null?void 0:he.focus()})}),P=w.useCallback((re,be,le)=>{const se=!G.current&&!le;(A.value!==void 0&&A.value===be||se)&&(L(re),se&&(G.current=!0))},[A.value]),F=w.useCallback(()=>M==null?void 0:M.focus(),[M]),fe=w.useCallback((re,be,le)=>{const se=!G.current&&!le;(A.value!==void 0&&A.value===be||se)&&X(re)},[A.value]),ye=s==="popper"?Fx:gR,Se=ye===Fx?{side:m,sideOffset:v,align:y,alignOffset:g,arrowPadding:b,collisionBoundary:x,collisionPadding:S,sticky:k,hideWhenDetached:N,avoidCollisions:E}:{};return c.jsx(dw,{scope:l,content:M,viewport:O,onViewportChange:B,itemRefCallback:P,selectedItem:$,onItemLeave:F,itemTextRefCallback:fe,focusSelectedItem:H,selectedItemText:Y,position:s,isPositioned:Z,searchRef:ie,children:c.jsx($d,{as:mR,allowPinchZoom:!0,children:c.jsx(hg,{asChild:!0,trapped:A.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:mt(u,re=>{var be;(be=A.trigger)==null||be.focus({preventScroll:!0}),re.preventDefault()}),children:c.jsx(dg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:c.jsx(ye,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:re=>re.preventDefault(),...T,...Se,onPlaced:()=>U(!0),ref:q,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:mt(T.onKeyDown,re=>{const be=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!be&&re.key.length===1&&ne(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let se=ue().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(re.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const he=re.target,Ne=se.indexOf(he);se=se.slice(Ne+1)}setTimeout(()=>R(se)),re.preventDefault()}})})})})})})},"SelectContentImpl")),gR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,onPlaced:s,...u}=i,d=nl(Yl,l),h=ef(Yl,l),[m,v]=w.useState(null),[y,g]=w.useState(null),b=xt(a,g),x=Rg(l),S=w.useRef(!1),k=w.useRef(!0),{viewport:N,selectedItem:E,selectedItemText:T,focusSelectedItem:A}=h,M=w.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&N&&E&&T){const q=d.trigger.getBoundingClientRect(),$=y.getBoundingClientRect(),L=d.valueNode.getBoundingClientRect(),Y=T.getBoundingClientRect();if(d.dir!=="rtl"){const he=Y.left-$.left,Ne=L.left-he,ze=q.left-Ne,Fe=q.width+ze,ht=Math.max(Fe,$.width),ot=window.innerWidth-ia,Je=Ad(Ne,[ia,Math.max(ia,ot-ht)]);m.style.minWidth=Fe+"px",m.style.left=Je+"px"}else{const he=$.right-Y.right,Ne=window.innerWidth-L.right-he,ze=window.innerWidth-q.right-Ne,Fe=q.width+ze,ht=Math.max(Fe,$.width),ot=window.innerWidth-ia,Je=Ad(Ne,[ia,Math.max(ia,ot-ht)]);m.style.minWidth=Fe+"px",m.style.right=Je+"px"}const X=x(),ue=window.innerHeight-ia*2,Z=N.scrollHeight,U=window.getComputedStyle(y),G=parseInt(U.borderTopWidth,10),R=parseInt(U.paddingTop,10),H=parseInt(U.borderBottomWidth,10),W=parseInt(U.paddingBottom,10),D=G+R+Z+W+H,ie=Math.min(E.offsetHeight*5,D),ne=window.getComputedStyle(N),P=parseInt(ne.paddingTop,10),F=parseInt(ne.paddingBottom,10),fe=q.top+q.height/2-ia,ye=ue-fe,Se=E.offsetHeight/2,re=E.offsetTop+Se,be=G+R+re,le=D-be;if(be<=fe){const he=X.length>0&&E===X[X.length-1].ref.current;m.style.bottom="0px";const Ne=y.clientHeight-N.offsetTop-N.offsetHeight,ze=Math.max(ye,Se+(he?F:0)+Ne+H),Fe=be+ze;m.style.height=Fe+"px"}else{const he=X.length>0&&E===X[0].ref.current;m.style.top="0px";const ze=Math.max(fe,G+N.offsetTop+(he?P:0)+Se)+le;m.style.height=ze+"px",N.scrollTop=be-fe+N.offsetTop}m.style.margin=`${ia}px 0`,m.style.minHeight=ie+"px",m.style.maxHeight=ue+"px",s==null||s(),requestAnimationFrame(()=>S.current=!0)}},[x,d.trigger,d.valueNode,m,y,N,E,T,d.dir,s]);Mn(()=>M(),[M]);const[I,O]=w.useState();Mn(()=>{y&&O(window.getComputedStyle(y).zIndex)},[y]);const B=w.useCallback(q=>{q&&k.current===!0&&(M(),A==null||A(),k.current=!1)},[M,A]);return c.jsx(vR,{scope:l,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:B,children:c.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I},children:c.jsx(Dt.div,{...u,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),Fx=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,align:s="start",collisionPadding:u=ia,...d}=i,h=Dg(l);return c.jsx(ZS,{...h,...d,ref:a,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")),[vR,yR]=Wl(Yl,{}),Vx="SelectViewport",bR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,nonce:s,...u}=i,d=ef(Vx,l),h=yR(Vx,l),m=xt(a,d.onViewportChange),v=w.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(Wd.Slot,{scope:l,children:c.jsx(Dt.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:b,shouldExpandOnScrollRef:x}=h;if(x!=null&&x.current&&b){const S=Math.abs(v.current-g.scrollTop);if(S>0){const k=window.innerHeight-ia*2,N=parseFloat(b.style.minHeight),E=parseFloat(b.style.height),T=Math.max(N,E);if(T<k){const A=T+S,M=Math.min(k,A),I=A-M;b.style.height=M+"px",b.style.bottom==="0px"&&(g.scrollTop=I>0?I:0,b.style.justifyContent="flex-end")}}}v.current=g.scrollTop})})})]})},"SelectViewport")),xR="SelectGroup",[D9,z9]=Wl(xR),Bp="SelectItem",[jR,fw]=Wl(Bp),SR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,value:s,disabled:u=!1,textValue:d,...h}=i,m=nl(Bp,l),v=ef(Bp,l),y=m.value===s,[g,b]=w.useState(d??""),[x,S]=w.useState(!1),k=An(M=>{var I;return(I=v.itemRefCallback)==null?void 0:I.call(v,M,s,u)}),N=xt(a,k),E=Ul(),T=w.useRef("touch"),A=wt(()=>{u||(m.onValueChange(s),m.onOpenChange(!1))},"handleSelect");return c.jsx(jR,{scope:l,value:s,disabled:u,textId:E,isSelected:y,onItemTextChange:w.useCallback(M=>{b(I=>I||((M==null?void 0:M.textContent)??"").trim())},[]),children:c.jsx(Wd.ItemSlot,{scope:l,value:s,disabled:u,textValue:g,children:c.jsx(Dt.div,{role:"option","aria-labelledby":E,"data-highlighted":x?"":void 0,"aria-selected":y&&x,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...h,ref:N,onFocus:mt(h.onFocus,()=>S(!0)),onBlur:mt(h.onBlur,()=>S(!1)),onClick:mt(h.onClick,()=>{T.current!=="mouse"&&A()}),onPointerUp:mt(h.onPointerUp,()=>{T.current==="mouse"&&A()}),onPointerDown:mt(h.onPointerDown,M=>{T.current=M.pointerType}),onPointerMove:mt(h.onPointerMove,M=>{var I;T.current=M.pointerType,u?(I=v.onItemLeave)==null||I.call(v):T.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:mt(h.onPointerLeave,M=>{var I;M.currentTarget===document.activeElement&&((I=v.onItemLeave)==null||I.call(v))}),onKeyDown:mt(h.onKeyDown,M=>{var O;u||M.target!==M.currentTarget||((O=v.searchRef)==null?void 0:O.current)!==""&&M.key===" "||(Z_.includes(M.key)&&A(),M.key===" "&&M.preventDefault())})})})})},"SelectItem")),ld="SelectItemText",wR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,className:s,style:u,...d}=i,h=nl(ld,l),m=ef(ld,l),v=fw(ld,l),y=tR(ld,l),[g,b]=w.useState(null),x=An(A=>{var M;return(M=m.itemTextRefCallback)==null?void 0:M.call(m,A,v.value,v.disabled)}),S=xt(a,b,v.onItemTextChange,x),k=g==null?void 0:g.textContent,N=w.useMemo(()=>c.jsx("option",{value:v.value,disabled:v.disabled,children:k},v.value),[v.disabled,v.value,k]),{onNativeOptionAdd:E,onNativeOptionRemove:T}=y;return Mn(()=>(E(N),()=>T(N)),[E,T,N]),c.jsxs(c.Fragment,{children:[c.jsx(Dt.span,{id:v.textId,...d,ref:S}),v.isSelected&&h.valueNode&&!h.valueNodeHasChildren&&!Tc(h.value)?Jl.createPortal(d.children,h.valueNode):null]})},"SelectItemText")),kR="SelectItemIndicator",CR=w.forwardRef(wt(function(i,a){const{__scopeSelect:l,...s}=i;return fw(kR,l).isSelected?c.jsx(Dt.span,{"aria-hidden":!0,...s,ref:a}):null},"SelectItemIndicator")),NR="SelectBubbleInput",ER=w.forwardRef(wt(function({__scopeSelect:i,...a},l){const s=nl(NR,i),{value:u,onValueChange:d,required:h,disabled:m,name:v,autoComplete:y,form:g}=s,{nativeOptions:b,nativeSelectKey:x}=s,S=w.useRef(null),k=xt(l,S),N=u??"",E=JS(N),T=Array.from(b).some(A=>(A.props.value??"")==="");return w.useEffect(()=>{const A=S.current;if(!A)return;const M=window.HTMLSelectElement.prototype,O=Object.getOwnPropertyDescriptor(M,"value").set;if(E!==N&&O){const B=new Event("change",{bubbles:!0});O.call(A,N),A.dispatchEvent(B)}},[E,N]),c.jsxs(Dt.select,{"aria-hidden":!0,required:h,tabIndex:-1,name:v,autoComplete:y,disabled:m,form:g,onChange:A=>d(A.target.value),...a,style:{...h4,...a.style},ref:k,defaultValue:N,children:[Tc(u)&&!T?c.jsx("option",{value:""}):null,Array.from(b)]},x)},"SelectBubbleInput"));function hw(t){return typeof t=="function"}wt(hw,"isFunction");function Tc(t){return t===""||t===void 0}wt(Tc,"shouldShowPlaceholder");function zg(t){const i=An(t),a=w.useRef(""),l=w.useRef(0),s=w.useCallback(d=>{const h=a.current+d;i(h),wt((function m(v){a.current=v,window.clearTimeout(l.current),v!==""&&(l.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(h)},[i]),u=w.useCallback(()=>{a.current="",window.clearTimeout(l.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(l.current),[]),[a,s,u]}wt(zg,"useTypeaheadSearch");function Lg(t,i,a){const s=i.length>1&&Array.from(i).every(v=>v===i[0])?i[0]:i,u=a?t.indexOf(a):-1;let d=mw(t,Math.max(u,0));s.length===1&&(d=d.filter(v=>v!==a));const m=d.find(v=>v.textValue.toLowerCase().startsWith(s.toLowerCase()));return m!==a?m:void 0}wt(Lg,"findNextItem");function mw(t,i){return t.map((a,l)=>t[(i+l)%t.length])}wt(mw,"wrapArray");const TR=og("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 Ve({className:t,variant:i="default",size:a="default",asChild:l=!1,...s}){const u=l?a4:"button";return c.jsx(u,{"data-slot":"button","data-variant":i,"data-size":a,className:nn(TR({variant:i,size:a,className:t})),...s})}const Ig=t=>Pa(t,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function Hl({value:t}){return c.jsx("pre",{className:"jv-history-json",children:JSON.stringify(t,null,2)})}function pw({blocks:t,links:i,onSelect:a}){return c.jsx(c.Fragment,{children:t.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:()=>a(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(Hl,{value:l.arguments}):c.jsxs(c.Fragment,{children:[c.jsx(pw,{blocks:l.result.content,links:[],onSelect:a}),l.result.details!==void 0&&c.jsxs("details",{children:[c.jsx("summary",{children:j("history.details")}),c.jsx(Hl,{value:l.result.details})]})]})]},s)}})})}function AR({detail:t,onSelect:i}){const[a,l]=w.useState("content"),{record:s,links:u}=t;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:Ig(s.timestamp)})]}),c.jsxs("div",{role:"tablist","aria-label":j("history.view"),children:[c.jsx(Ve,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":a==="content",onClick:()=>l("content"),children:j("history.content")}),c.jsx(Ve,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":a==="json",onClick:()=>l("json"),children:j("history.json")})]})]}),c.jsx("div",{className:"jv-history-detail-scroll",role:"tabpanel","aria-label":j(a==="content"?"history.contentLabel":"history.json"),children:a==="json"?c.jsx(Hl,{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(pw,{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(Hl,{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(Hl,{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(Hl,{value:s.usage})]}),c.jsxs("details",{className:"jv-history-fold",children:[c.jsx("summary",{children:"Extra"}),c.jsx(Hl,{value:s.extra})]})]})})]})}const $x={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},Yx=t=>Pa(t,{year:"numeric",month:"long",day:"numeric"}),MR=t=>[t.preview,...t.tools.map(i=>j(i.kind==="call"?"activity.toolCall":i.error?"activity.toolFailed":"activity.toolResult",{name:i.name})),t.images?j("activity.images",{count:t.images}):""].filter(Boolean).join(" "),OR=t=>Pa(t,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function _R({items:t,onSelect:i}){return c.jsx("ol",{className:"jv-activity-timeline","aria-label":j("activity.timeline"),children:t.map((a,l)=>{const{record:s}=a,u=Yx(s.timestamp);return c.jsxs(w.Fragment,{children:[(l===0||Yx(t[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-${a.kind}`,"data-kind":a.kind,children:[c.jsxs("div",{className:"jv-activity-time",children:[c.jsx("time",{dateTime:new Date(s.timestamp).toISOString(),title:`${Ig(s.timestamp)}.${String(s.timestamp%1e3).padStart(3,"0")}`,children:OR(s.timestamp)}),c.jsx("span",{className:"jv-activity-dot"})]}),a.kind==="chat"?c.jsxs("article",{className:"jv-activity-card jv-activity-chat","aria-label":j("activity.chatMessage",{id:a.record.id}),children:[c.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>i({kind:"chat",id:a.record.id}),"aria-label":j("activity.viewMessage",{sequence:a.record.sequence,chat:a.record.chatTitle}),children:[c.jsxs("span",{className:"jv-activity-card-head",children:[c.jsx(rA,{}),c.jsx("strong",{title:a.record.chatTitle,children:a.record.chatTitle}),c.jsxs("span",{children:["#",a.record.sequence]})]}),c.jsx("span",{className:"jv-activity-preview",children:a.record.preview||j("activity.attachmentOnly")}),a.record.attachmentCount>0&&c.jsxs("span",{className:"jv-activity-attachment",children:[c.jsx(lg,{}),j("activity.attachments",{count:a.record.attachmentCount})]})]}),a.record.source&&c.jsxs("button",{type:"button",className:"jv-activity-source",onClick:()=>i({kind:"history",id:a.record.source.historyId}),"aria-label":j("activity.viewSentBy",{id:a.record.source.historyId}),children:[j("activity.sentBy",{id:a.record.source.historyId}),c.jsx(yp,{})]})]}):c.jsx("article",{className:"jv-activity-card jv-activity-history","aria-label":j("activity.historyRecord",{id:a.record.id}),children:c.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>i({kind:"history",id:a.record.id}),"aria-label":j("activity.viewHistory",{id:a.record.id,role:a.record.role}),children:[c.jsxs("span",{className:"jv-activity-card-head",children:[c.jsx("strong",{children:$x[a.record.role]?j($x[a.record.role]):a.record.role}),c.jsxs("span",{children:["#",a.record.id]})]}),c.jsx("span",{className:"jv-activity-preview",children:MR(a.record)||j("activity.emptyMessage")})]})})]})]},`${a.kind}:${s.id}`)})})}const RR={read:(t,i)=>Oe(`/bots/${t}/history/${i}`)};function DR(t,i){const a={};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const zR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IR={};function Gx(t,i){return(IR.jsx?LR:zR).test(t)}const BR=/[ \t\n\f\r]/g;function PR(t){return typeof t=="object"?t.type==="text"?Xx(t.value):!1:Xx(t)}function Xx(t){return t.replace(BR,"")===""}class Ac{constructor(i,a,l){this.normal=a,this.property=i,l&&(this.space=l)}}Ac.prototype.normal={};Ac.prototype.property={};Ac.prototype.space=void 0;function gw(t,i){const a={},l={};for(const s of t)Object.assign(a,s.property),Object.assign(l,s.normal);return new Ac(a,l,i)}function Pp(t){return t.toLowerCase()}class ui{constructor(i,a){this.attribute=a,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 HR=0;const Ge=eo(),tn=eo(),Hp=eo(),xe=eo(),Ct=eo(),ql=eo(),Ti=eo();function eo(){return 2**++HR}const Up=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:tn,commaOrSpaceSeparated:Ti,commaSeparated:ql,number:xe,overloadedBoolean:Hp,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),Vm=Object.keys(Up);class Bg extends ui{constructor(i,a,l,s){let u=-1;if(super(i,a),Qx(this,"space",s),typeof l=="number")for(;++u<Vm.length;){const d=Vm[u];Qx(this,Vm[u],(l&Up[d])===Up[d])}}}Bg.prototype.defined=!0;function Qx(t,i,a){a&&(t[i]=a)}function os(t){const i={},a={};for(const[l,s]of Object.entries(t.properties)){const u=new Bg(l,t.transform(t.attributes||{},l),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),i[l]=u,a[Pp(l)]=l,a[Pp(u.attribute)]=l}return new Ac(i,a,t.space)}const vw=os({properties:{ariaActiveDescendant:null,ariaAtomic:tn,ariaAutoComplete:null,ariaBusy:tn,ariaChecked:tn,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,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:xe,ariaLive:null,ariaModal:tn,ariaMultiLine:tn,ariaMultiSelectable:tn,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:tn,ariaReadOnly:tn,ariaRelevant:null,ariaRequired:tn,ariaRoleDescription:Ct,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:tn,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function yw(t,i){return i in t?t[i]:i}function bw(t,i){return yw(t,i.toLowerCase())}const UR=os({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ql,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:xe,colSpan:xe,command:null,commandFor:null,content:null,contentEditable:tn,controls:Ge,controlsList:Ct,coords:xe|ql,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Hp,draggable:tn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Ct,height:xe,hidden:Hp,high:xe,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:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,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:xe,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:xe,rowSpan:xe,sandbox:Ct,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:tn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:tn,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,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:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:tn,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:ql,part:Ct,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:bw}),qR=os({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:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,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:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,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:ql,g2:ql,glyphName:ql,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:Ti,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,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:xe,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:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,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:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:Ti,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ti,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,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:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yw}),xw=os({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),jw=os({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bw}),Sw=os({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),FR={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"},VR=/[A-Z]/g,Kx=/-[a-z]/g,$R=/^data[-\w.:]+$/i;function YR(t,i){const a=Pp(i);let l=i,s=ui;if(a in t.normal)return t.property[t.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&$R.test(i)){if(i.charAt(4)==="-"){const u=i.slice(5).replace(Kx,XR);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=i.slice(4);if(!Kx.test(u)){let d=u.replace(VR,GR);d.charAt(0)!=="-"&&(d="-"+d),i="data"+d}}s=Bg}return new s(l,i)}function GR(t){return"-"+t.toLowerCase()}function XR(t){return t.charAt(1).toUpperCase()}const QR=gw([vw,UR,xw,jw,Sw],"html"),Pg=gw([vw,qR,xw,jw,Sw],"svg");function KR(t){return t.join(" ").trim()}var $o={},$m,Zx;function ZR(){if(Zx)return $m;Zx=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,h=/^\s+|\s+$/g,m=`
465
- `,v="/",y="*",g="",b="comment",x="declaration";function S(N,E){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];E=E||{};var T=1,A=1;function M(Z){var U=Z.match(i);U&&(T+=U.length);var G=Z.lastIndexOf(m);A=~G?Z.length-G:A+Z.length}function I(){var Z={line:T,column:A};return function(U){return U.position=new O(Z),$(),U}}function O(Z){this.start=Z,this.end={line:T,column:A},this.source=E.source}O.prototype.content=N;function B(Z){var U=new Error(E.source+":"+T+":"+A+": "+Z);if(U.reason=Z,U.filename=E.source,U.line=T,U.column=A,U.source=N,!E.silent)throw U}function q(Z){var U=Z.exec(N);if(U){var G=U[0];return M(G),N=N.slice(G.length),U}}function $(){q(a)}function L(Z){var U;for(Z=Z||[];U=Y();)U!==!1&&Z.push(U);return Z}function Y(){var Z=I();if(!(v!=N.charAt(0)||y!=N.charAt(1))){for(var U=2;g!=N.charAt(U)&&(y!=N.charAt(U)||v!=N.charAt(U+1));)++U;if(U+=2,g===N.charAt(U-1))return B("End of comment missing");var G=N.slice(2,U-2);return A+=2,M(G),N=N.slice(U),A+=2,Z({type:b,comment:G})}}function X(){var Z=I(),U=q(l);if(U){if(Y(),!q(s))return B("property missing ':'");var G=q(u),R=Z({type:x,property:k(U[0].replace(t,g)),value:G?k(G[0].replace(t,g)):g});return q(d),R}}function ue(){var Z=[];L(Z);for(var U;U=X();)U!==!1&&(Z.push(U),L(Z));return Z}return $(),ue()}function k(N){return N?N.replace(h,g):g}return $m=S,$m}var Jx;function JR(){if(Jx)return $o;Jx=1;var t=$o&&$o.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty($o,"__esModule",{value:!0}),$o.default=a;const i=t(ZR());function a(l,s){let u=null;if(!l||typeof l!="string")return u;const d=(0,i.default)(l),h=typeof s=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:v,value:y}=m;h?s(v,y,m):y&&(u=u||{},u[v]=y)}),u}return $o}var ic={},Wx;function WR(){if(Wx)return ic;Wx=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,a=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(v){return!v||a.test(v)||t.test(v)},d=function(v,y){return y.toUpperCase()},h=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,h):v=v.replace(l,h),v.replace(i,d))};return ic.camelCase=m,ic}var ac,e1;function e3(){if(e1)return ac;e1=1;var t=ac&&ac.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=t(JR()),a=WR();function l(s,u){var d={};return!s||typeof s!="string"||(0,i.default)(s,function(h,m){h&&m&&(d[(0,a.camelCase)(h,u)]=m)}),d}return l.default=l,ac=l,ac}var t3=e3();const n3=ng(t3),ww=kw("end"),Hg=kw("start");function kw(t){return i;function i(a){const l=a&&a.position&&a.position[t]||{};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 i3(t){const i=Hg(t),a=ww(t);if(i&&a)return{start:i,end:a}}function cc(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?t1(t.position):"start"in t||"end"in t?t1(t):"line"in t||"column"in t?qp(t):""}function qp(t){return n1(t&&t.line)+":"+n1(t&&t.column)}function t1(t){return qp(t&&t.start)+"-"+qp(t&&t.end)}function n1(t){return t&&typeof t=="number"?t:1}class Pn extends Error{constructor(i,a,l){super(),typeof a=="string"&&(l=a,a=void 0);let s="",u={},d=!1;if(a&&("line"in a&&"column"in a?u={place:a}:"start"in a&&"end"in a?u={place:a}:"type"in a?u={ancestors:[a],place:a.position}:u={...a}),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 h=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=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=h?h.line:void 0,this.name=cc(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}}Pn.prototype.file="";Pn.prototype.name="";Pn.prototype.reason="";Pn.prototype.message="";Pn.prototype.stack="";Pn.prototype.column=void 0;Pn.prototype.line=void 0;Pn.prototype.ancestors=void 0;Pn.prototype.cause=void 0;Pn.prototype.fatal=void 0;Pn.prototype.place=void 0;Pn.prototype.ruleId=void 0;Pn.prototype.source=void 0;const Ug={}.hasOwnProperty,a3=new Map,r3=/[A-Z]/g,l3=new Set(["table","tbody","thead","tfoot","tr"]),o3=new Set(["td","th"]),Cw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function s3(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=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(a,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=p3(a,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:a,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Pg:QR,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},u=Nw(s,t,void 0);return u&&typeof u!="string"?u:s.create(t,s.Fragment,{children:u||void 0},void 0)}function Nw(t,i,a){if(i.type==="element")return c3(t,i,a);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return u3(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return f3(t,i,a);if(i.type==="mdxjsEsm")return d3(t,i);if(i.type==="root")return h3(t,i,a);if(i.type==="text")return m3(t,i)}function c3(t,i,a){const l=t.schema;let s=l;i.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=Pg,t.schema=s),t.ancestors.push(i);const u=Tw(t,i.tagName,!1),d=v3(t,i);let h=Fg(t,i);return l3.has(i.tagName)&&(h=h.filter(function(m){return typeof m=="string"?!PR(m):!0})),Ew(t,d,u,i),qg(d,h),t.ancestors.pop(),t.schema=l,t.create(i,u,d,a)}function u3(t,i){if(i.data&&i.data.estree&&t.evaluater){const l=i.data.estree.body[0];return l.type,t.evaluater.evaluateExpression(l.expression)}yc(t,i.position)}function d3(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);yc(t,i.position)}function f3(t,i,a){const l=t.schema;let s=l;i.name==="svg"&&l.space==="html"&&(s=Pg,t.schema=s),t.ancestors.push(i);const u=i.name===null?t.Fragment:Tw(t,i.name,!0),d=y3(t,i),h=Fg(t,i);return Ew(t,d,u,i),qg(d,h),t.ancestors.pop(),t.schema=l,t.create(i,u,d,a)}function h3(t,i,a){const l={};return qg(l,Fg(t,i)),t.create(i,t.Fragment,l,a)}function m3(t,i){return i.value}function Ew(t,i,a,l){typeof a!="string"&&a!==t.Fragment&&t.passNode&&(i.node=l)}function qg(t,i){if(i.length>0){const a=i.length>1?i:i[0];a&&(t.children=a)}}function p3(t,i,a){return l;function l(s,u,d,h){const v=Array.isArray(d.children)?a:i;return h?v(u,d,h):v(u,d)}}function g3(t,i){return a;function a(l,s,u,d){const h=Array.isArray(u.children),m=Hg(l);return i(s,u,d,h,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function v3(t,i){const a={};let l,s;for(s in i.properties)if(s!=="children"&&Ug.call(i.properties,s)){const u=b3(t,s,i.properties[s]);if(u){const[d,h]=u;t.tableCellAlignToStyle&&d==="align"&&typeof h=="string"&&o3.has(i.tagName)?l=h:a[d]=h}}if(l){const u=a.style||(a.style={});u[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return a}function y3(t,i){const a={};for(const l of i.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&t.evaluater){const u=l.data.estree.body[0];u.type;const d=u.expression;d.type;const h=d.properties[0];h.type,Object.assign(a,t.evaluater.evaluateExpression(h.argument))}else yc(t,i.position);else{const s=l.name;let u;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&t.evaluater){const h=l.value.data.estree.body[0];h.type,u=t.evaluater.evaluateExpression(h.expression)}else yc(t,i.position);else u=l.value===null?!0:l.value;a[s]=u}return a}function Fg(t,i){const a=[];let l=-1;const s=t.passKeys?new Map:a3;for(;++l<i.children.length;){const u=i.children[l];let d;if(t.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 h=Nw(t,u,d);h!==void 0&&a.push(h)}return a}function b3(t,i,a){const l=YR(t.schema,i);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=l.commaSeparated?DR(a):KR(a)),l.property==="style"){let s=typeof a=="object"?a:x3(t,String(a));return t.stylePropertyNameCase==="css"&&(s=j3(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&l.space?FR[l.property]||l.property:l.attribute,a]}}function x3(t,i){try{return n3(i,{reactCompat:!0})}catch(a){if(t.ignoreInvalidStyle)return{};const l=a,s=new Pn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=Cw+"#cannot-parse-style-attribute",s}}function Tw(t,i,a){let l;if(!a)l={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let u=-1,d;for(;++u<s.length;){const h=Gx(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};d=d?{type:"MemberExpression",object:d,property:h,computed:!!(u&&h.type==="Literal"),optional:!1}:h}l=d}else l=Gx(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(l.type==="Literal"){const s=l.value;return Ug.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(l);yc(t)}function yc(t,i){const a=new Pn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=t.filePath||void 0,a.url=Cw+"#cannot-handle-mdx-estrees-without-createevaluater",a}function j3(t){const i={};let a;for(a in t)Ug.call(t,a)&&(i[S3(a)]=t[a]);return i}function S3(t){let i=t.replace(r3,w3);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function w3(t){return"-"+t.toLowerCase()}const Ym={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"]},k3={};function Vg(t,i){const a=k3,l=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,s=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Aw(t,l,s)}function Aw(t,i,a){if(C3(t)){if("value"in t)return t.type==="html"&&!a?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return i1(t.children,i,a)}return Array.isArray(t)?i1(t,i,a):""}function i1(t,i,a){const l=[];let s=-1;for(;++s<t.length;)l[s]=Aw(t[s],i,a);return l.join("")}function C3(t){return!!(t&&typeof t=="object")}const a1=document.createElement("i");function $g(t){const i="&"+t+";";a1.innerHTML=i;const a=a1.textContent;return a.charCodeAt(a.length-1)===59&&t!=="semi"||a===i?!1:a}function Mi(t,i,a,l){const s=t.length;let u=0,d;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,a=a>0?a:0,l.length<1e4)d=Array.from(l),d.unshift(i,a),t.splice(...d);else for(a&&t.splice(i,a);u<l.length;)d=l.slice(u,u+1e4),d.unshift(i,0),t.splice(...d),u+=1e4,i+=1e4}function Ui(t,i){return t.length>0?(Mi(t,t.length,0,i),t):i}const r1={}.hasOwnProperty;function Mw(t){const i={};let a=-1;for(;++a<t.length;)N3(i,t[a]);return i}function N3(t,i){let a;for(a in i){const s=(r1.call(t,a)?t[a]:void 0)||(t[a]={}),u=i[a];let d;if(u)for(d in u){r1.call(s,d)||(s[d]=[]);const h=u[d];E3(s[d],Array.isArray(h)?h:h?[h]:[])}}}function E3(t,i){let a=-1;const l=[];for(;++a<i.length;)(i[a].add==="after"?t:l).push(i[a]);Mi(t,0,0,l)}function Ow(t,i){const a=Number.parseInt(t,i);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function aa(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=il(/[A-Za-z]/),Bn=il(/[\dA-Za-z]/),T3=il(/[#-'*+\--9=?A-Z^-~]/);function Md(t){return t!==null&&(t<32||t===127)}const Fp=il(/\d/),A3=il(/[\dA-Fa-f]/),M3=il(/[!-/:-@[-`{-~]/);function He(t){return t!==null&&t<-2}function Nt(t){return t!==null&&(t<0||t===32)}function it(t){return t===-2||t===-1||t===32}const tf=il(new RegExp("\\p{P}|\\p{S}","u")),Gl=il(/\s/);function il(t){return i;function i(a){return a!==null&&a>-1&&t.test(String.fromCharCode(a))}}function ss(t){const i=[];let a=-1,l=0,s=0;for(;++a<t.length;){const u=t.charCodeAt(a);let d="";if(u===37&&Bn(t.charCodeAt(a+1))&&Bn(t.charCodeAt(a+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 h=t.charCodeAt(a+1);u<56320&&h>56319&&h<57344?(d=String.fromCharCode(u,h),s=1):d="�"}else d=String.fromCharCode(u);d&&(i.push(t.slice(l,a),encodeURIComponent(d)),l=a+s+1,d=""),s&&(a+=s,s=0)}return i.join("")+t.slice(l)}function ft(t,i,a,l){const s=l?l-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return it(m)?(t.enter(a),h(m)):i(m)}function h(m){return it(m)&&u++<s?(t.consume(m),h):(t.exit(a),i(m))}}const O3={tokenize:_3};function _3(t){const i=t.attempt(this.parser.constructs.contentInitial,l,s);let a;return i;function l(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),ft(t,i,"linePrefix")}function s(h){return t.enter("paragraph"),u(h)}function u(h){const m=t.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=m),a=m,d(h)}function d(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return He(h)?(t.consume(h),t.exit("chunkText"),u):(t.consume(h),d)}}const R3={tokenize:D3},l1={tokenize:z3};function D3(t){const i=this,a=[];let l=0,s,u,d;return h;function h(A){if(l<a.length){const M=a[l];return i.containerState=M[1],t.attempt(M[0].continuation,m,v)(A)}return v(A)}function m(A){if(l++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&T();const M=i.events.length;let I=M,O;for(;I--;)if(i.events[I][0]==="exit"&&i.events[I][1].type==="chunkFlow"){O=i.events[I][1].end;break}E(l);let B=M;for(;B<i.events.length;)i.events[B][1].end={...O},B++;return Mi(i.events,I+1,0,i.events.slice(M)),i.events.length=B,v(A)}return h(A)}function v(A){if(l===a.length){if(!s)return b(A);if(s.currentConstruct&&s.currentConstruct.concrete)return S(A);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(l1,y,g)(A)}function y(A){return s&&T(),E(l),b(A)}function g(A){return i.parser.lazy[i.now().line]=l!==a.length,d=i.now().offset,S(A)}function b(A){return i.containerState={},t.attempt(l1,x,S)(A)}function x(A){return l++,a.push([i.currentConstruct,i.containerState]),b(A)}function S(A){if(A===null){s&&T(),E(0),t.consume(A);return}return s=s||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),k(A)}function k(A){if(A===null){N(t.exit("chunkFlow"),!0),E(0),t.consume(A);return}return He(A)?(t.consume(A),N(t.exit("chunkFlow")),l=0,i.interrupt=void 0,h):(t.consume(A),k)}function N(A,M){const I=i.sliceStream(A);if(M&&I.push(null),A.previous=u,u&&(u.next=A),u=A,s.defineSkip(A.start),s.write(I),i.parser.lazy[A.start.line]){let O=s.events.length;for(;O--;)if(s.events[O][1].start.offset<d&&(!s.events[O][1].end||s.events[O][1].end.offset>d))return;const B=i.events.length;let q=B,$,L;for(;q--;)if(i.events[q][0]==="exit"&&i.events[q][1].type==="chunkFlow"){if($){L=i.events[q][1].end;break}$=!0}for(E(l),O=B;O<i.events.length;)i.events[O][1].end={...L},O++;Mi(i.events,q+1,0,i.events.slice(B)),i.events.length=O}}function E(A){let M=a.length;for(;M-- >A;){const I=a[M];i.containerState=I[1],I[0].exit.call(i,t)}a.length=A}function T(){s.write([null]),u=void 0,s=void 0,i.containerState._closeFlow=void 0}}function z3(t,i,a){return ft(t,t.attempt(this.parser.constructs.document,i,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ts(t){if(t===null||Nt(t)||Gl(t))return 1;if(tf(t))return 2}function nf(t,i,a){const l=[];let s=-1;for(;++s<t.length;){const u=t[s].resolveAll;u&&!l.includes(u)&&(i=u(i,a),l.push(u))}return i}const Vp={name:"attention",resolveAll:L3,tokenize:I3};function L3(t,i){let a=-1,l,s,u,d,h,m,v,y;for(;++a<t.length;)if(t[a][0]==="enter"&&t[a][1].type==="attentionSequence"&&t[a][1]._close){for(l=a;l--;)if(t[l][0]==="exit"&&t[l][1].type==="attentionSequence"&&t[l][1]._open&&i.sliceSerialize(t[l][1]).charCodeAt(0)===i.sliceSerialize(t[a][1]).charCodeAt(0)){if((t[l][1]._close||t[a][1]._open)&&(t[a][1].end.offset-t[a][1].start.offset)%3&&!((t[l][1].end.offset-t[l][1].start.offset+t[a][1].end.offset-t[a][1].start.offset)%3))continue;m=t[l][1].end.offset-t[l][1].start.offset>1&&t[a][1].end.offset-t[a][1].start.offset>1?2:1;const g={...t[l][1].end},b={...t[a][1].start};o1(g,-m),o1(b,m),d={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...t[l][1].end}},h={type:m>1?"strongSequence":"emphasisSequence",start:{...t[a][1].start},end:b},u={type:m>1?"strongText":"emphasisText",start:{...t[l][1].end},end:{...t[a][1].start}},s={type:m>1?"strong":"emphasis",start:{...d.start},end:{...h.end}},t[l][1].end={...d.start},t[a][1].start={...h.end},v=[],t[l][1].end.offset-t[l][1].start.offset&&(v=Ui(v,[["enter",t[l][1],i],["exit",t[l][1],i]])),v=Ui(v,[["enter",s,i],["enter",d,i],["exit",d,i],["enter",u,i]]),v=Ui(v,nf(i.parser.constructs.insideSpan.null,t.slice(l+1,a),i)),v=Ui(v,[["exit",u,i],["enter",h,i],["exit",h,i],["exit",s,i]]),t[a][1].end.offset-t[a][1].start.offset?(y=2,v=Ui(v,[["enter",t[a][1],i],["exit",t[a][1],i]])):y=0,Mi(t,l-1,a-l+3,v),a=l+v.length-y-2;break}}for(a=-1;++a<t.length;)t[a][1].type==="attentionSequence"&&(t[a][1].type="data");return t}function I3(t,i){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,s=ts(l);let u;return d;function d(m){return u=m,t.enter("attentionSequence"),h(m)}function h(m){if(m===u)return t.consume(m),h;const v=t.exit("attentionSequence"),y=ts(m),g=!y||y===2&&s||a.includes(m),b=!s||s===2&&y||a.includes(l);return v._open=!!(u===42?g:g&&(s||!b)),v._close=!!(u===42?b:b&&(y||!g)),i(m)}}function o1(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const B3={name:"autolink",tokenize:P3};function P3(t,i,a){let l=0;return s;function s(x){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),u}function u(x){return Xn(x)?(t.consume(x),d):x===64?a(x):v(x)}function d(x){return x===43||x===45||x===46||Bn(x)?(l=1,h(x)):v(x)}function h(x){return x===58?(t.consume(x),l=0,m):(x===43||x===45||x===46||Bn(x))&&l++<32?(t.consume(x),h):(l=0,v(x))}function m(x){return x===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):x===null||x===32||x===60||Md(x)?a(x):(t.consume(x),m)}function v(x){return x===64?(t.consume(x),y):T3(x)?(t.consume(x),v):a(x)}function y(x){return Bn(x)?g(x):a(x)}function g(x){return x===46?(t.consume(x),l=0,y):x===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):b(x)}function b(x){if((x===45||Bn(x))&&l++<63){const S=x===45?b:g;return t.consume(x),S}return a(x)}}const Mc={partial:!0,tokenize:H3};function H3(t,i,a){return l;function l(u){return it(u)?ft(t,s,"linePrefix")(u):s(u)}function s(u){return u===null||He(u)?i(u):a(u)}}const _w={continuation:{tokenize:q3},exit:F3,name:"blockQuote",tokenize:U3};function U3(t,i,a){const l=this;return s;function s(d){if(d===62){const h=l.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(d),t.exit("blockQuoteMarker"),u}return a(d)}function u(d){return it(d)?(t.enter("blockQuotePrefixWhitespace"),t.consume(d),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(d))}}function q3(t,i,a){const l=this;return s;function s(d){return it(d)?ft(t,u,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return t.attempt(_w,i,a)(d)}}function F3(t){t.exit("blockQuote")}const Rw={name:"characterEscape",tokenize:V3};function V3(t,i,a){return l;function l(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),s}function s(u){return M3(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):a(u)}}const Dw={name:"characterReference",tokenize:$3};function $3(t,i,a){const l=this;let s=0,u,d;return h;function h(g){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),m}function m(g){return g===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(g),t.exit("characterReferenceMarkerNumeric"),v):(t.enter("characterReferenceValue"),u=31,d=Bn,y(g))}function v(g){return g===88||g===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(g),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,d=A3,y):(t.enter("characterReferenceValue"),u=7,d=Fp,y(g))}function y(g){if(g===59&&s){const b=t.exit("characterReferenceValue");return d===Bn&&!$g(l.sliceSerialize(b))?a(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return d(g)&&s++<u?(t.consume(g),y):a(g)}}const s1={partial:!0,tokenize:G3},c1={concrete:!0,name:"codeFenced",tokenize:Y3};function Y3(t,i,a){const l=this,s={partial:!0,tokenize:I};let u=0,d=0,h;return m;function m(O){return v(O)}function v(O){const B=l.events[l.events.length-1];return u=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,h=O,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(O)}function y(O){return O===h?(d++,t.consume(O),y):d<3?a(O):(t.exit("codeFencedFenceSequence"),it(O)?ft(t,g,"whitespace")(O):g(O))}function g(O){return O===null||He(O)?(t.exit("codeFencedFence"),l.interrupt?i(O):t.check(s1,k,M)(O)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===null||He(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(O)):it(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ft(t,x,"whitespace")(O)):O===96&&O===h?a(O):(t.consume(O),b)}function x(O){return O===null||He(O)?g(O):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),S(O))}function S(O){return O===null||He(O)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(O)):O===96&&O===h?a(O):(t.consume(O),S)}function k(O){return t.attempt(s,M,N)(O)}function N(O){return t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),E}function E(O){return u>0&&it(O)?ft(t,T,"linePrefix",u+1)(O):T(O)}function T(O){return O===null||He(O)?t.check(s1,k,M)(O):(t.enter("codeFlowValue"),A(O))}function A(O){return O===null||He(O)?(t.exit("codeFlowValue"),T(O)):(t.consume(O),A)}function M(O){return t.exit("codeFenced"),i(O)}function I(O,B,q){let $=0;return L;function L(U){return O.enter("lineEnding"),O.consume(U),O.exit("lineEnding"),Y}function Y(U){return O.enter("codeFencedFence"),it(U)?ft(O,X,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):X(U)}function X(U){return U===h?(O.enter("codeFencedFenceSequence"),ue(U)):q(U)}function ue(U){return U===h?($++,O.consume(U),ue):$>=d?(O.exit("codeFencedFenceSequence"),it(U)?ft(O,Z,"whitespace")(U):Z(U)):q(U)}function Z(U){return U===null||He(U)?(O.exit("codeFencedFence"),B(U)):q(U)}}}function G3(t,i,a){const l=this;return s;function s(d){return d===null?a(d):(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),u)}function u(d){return l.parser.lazy[l.now().line]?a(d):i(d)}}const Gm={name:"codeIndented",tokenize:Q3},X3={partial:!0,tokenize:K3};function Q3(t,i,a){const l=this;return s;function s(v){return t.enter("codeIndented"),ft(t,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):a(v)}function d(v){return v===null?m(v):He(v)?t.attempt(X3,d,m)(v):(t.enter("codeFlowValue"),h(v))}function h(v){return v===null||He(v)?(t.exit("codeFlowValue"),d(v)):(t.consume(v),h)}function m(v){return t.exit("codeIndented"),i(v)}}function K3(t,i,a){const l=this;return s;function s(d){return l.parser.lazy[l.now().line]?a(d):He(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),s):ft(t,u,"linePrefix",5)(d)}function u(d){const h=l.events[l.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(d):He(d)?s(d):a(d)}}const Z3={name:"codeText",previous:W3,resolve:J3,tokenize:eD};function J3(t){let i=t.length-4,a=3,l,s;if((t[a][1].type==="lineEnding"||t[a][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(l=a;++l<i;)if(t[l][1].type==="codeTextData"){t[a][1].type="codeTextPadding",t[i][1].type="codeTextPadding",a+=2,i-=2;break}}for(l=a-1,i++;++l<=i;)s===void 0?l!==i&&t[l][1].type!=="lineEnding"&&(s=l):(l===i||t[l][1].type==="lineEnding")&&(t[s][1].type="codeTextData",l!==s+2&&(t[s][1].end=t[l-1][1].end,t.splice(s+2,l-s-2),i-=l-s-2,l=s+2),s=void 0);return t}function W3(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function eD(t,i,a){let l=0,s,u;return d;function d(g){return t.enter("codeText"),t.enter("codeTextSequence"),h(g)}function h(g){return g===96?(t.consume(g),l++,h):(t.exit("codeTextSequence"),m(g))}function m(g){return g===null?a(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),m):g===96?(u=t.enter("codeTextSequence"),s=0,y(g)):He(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),m):(t.enter("codeTextData"),v(g))}function v(g){return g===null||g===32||g===96||He(g)?(t.exit("codeTextData"),m(g)):(t.consume(g),v)}function y(g){return g===96?(t.consume(g),s++,y):s===l?(t.exit("codeTextSequence"),t.exit("codeText"),i(g)):(u.type="codeTextData",v(g))}}class tD{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,a){const l=a??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,a,l){const s=a||0;this.setCursor(Math.trunc(i));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return l&&rc(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),rc(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),rc(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 a=this.left.splice(i,Number.POSITIVE_INFINITY);rc(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);rc(this.left,a.reverse())}}}function rc(t,i){let a=0;if(i.length<1e4)t.push(...i);else for(;a<i.length;)t.push(...i.slice(a,a+1e4)),a+=1e4}function zw(t){const i={};let a=-1,l,s,u,d,h,m,v;const y=new tD(t);for(;++a<y.length;){for(;a in i;)a=i[a];if(l=y.get(a),a&&l[1].type==="chunkFlow"&&y.get(a-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,nD(y,a)),a=i[a],v=!0);else if(l[1]._container){for(u=a,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},h=y.slice(s,a),h.unshift(l),y.splice(s,a-s+1,h))}}return Mi(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!v}function nD(t,i){const a=t.get(i)[1],l=t.get(i)[2];let s=i-1;const u=[];let d=a._tokenizer;d||(d=l.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const h=d.events,m=[],v={};let y,g,b=-1,x=a,S=0,k=0;const N=[k];for(;x;){for(;t.get(++s)[1]!==x;);u.push(s),x._tokenizer||(y=l.sliceStream(x),x.next||y.push(null),g&&d.defineSkip(x.start),x._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),x._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=a;++b<h.length;)h[b][0]==="exit"&&h[b-1][0]==="enter"&&h[b][1].type===h[b-1][1].type&&h[b][1].start.line!==h[b][1].end.line&&(k=b+1,N.push(k),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(d.events=[],x?(x._tokenizer=void 0,x.previous=void 0):N.pop(),b=N.length;b--;){const E=h.slice(N[b],N[b+1]),T=u.pop();m.push([T,T+E.length-1]),t.splice(T,2,E)}for(m.reverse(),b=-1;++b<m.length;)v[S+m[b][0]]=S+m[b][1],S+=m[b][1]-m[b][0]-1;return v}const iD={resolve:rD,tokenize:lD},aD={partial:!0,tokenize:oD};function rD(t){return zw(t),t}function lD(t,i){let a;return l;function l(h){return t.enter("content"),a=t.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?u(h):He(h)?t.check(aD,d,u)(h):(t.consume(h),s)}function u(h){return t.exit("chunkContent"),t.exit("content"),i(h)}function d(h){return t.consume(h),t.exit("chunkContent"),a.next=t.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function oD(t,i,a){const l=this;return s;function s(d){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),ft(t,u,"linePrefix")}function u(d){if(d===null||He(d))return a(d);const h=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(d):t.interrupt(l.parser.constructs.flow,a,i)(d)}}function Lw(t,i,a,l,s,u,d,h,m){const v=m||Number.POSITIVE_INFINITY;let y=0;return g;function g(E){return E===60?(t.enter(l),t.enter(s),t.enter(u),t.consume(E),t.exit(u),b):E===null||E===32||E===41||Md(E)?a(E):(t.enter(l),t.enter(d),t.enter(h),t.enter("chunkString",{contentType:"string"}),k(E))}function b(E){return E===62?(t.enter(u),t.consume(E),t.exit(u),t.exit(s),t.exit(l),i):(t.enter(h),t.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===62?(t.exit("chunkString"),t.exit(h),b(E)):E===null||E===60||He(E)?a(E):(t.consume(E),E===92?S:x)}function S(E){return E===60||E===62||E===92?(t.consume(E),x):x(E)}function k(E){return!y&&(E===null||E===41||Nt(E))?(t.exit("chunkString"),t.exit(h),t.exit(d),t.exit(l),i(E)):y<v&&E===40?(t.consume(E),y++,k):E===41?(t.consume(E),y--,k):E===null||E===32||E===40||Md(E)?a(E):(t.consume(E),E===92?N:k)}function N(E){return E===40||E===41||E===92?(t.consume(E),k):k(E)}}function Iw(t,i,a,l,s,u){const d=this;let h=0,m;return v;function v(x){return t.enter(l),t.enter(s),t.consume(x),t.exit(s),t.enter(u),y}function y(x){return h>999||x===null||x===91||x===93&&!m||x===94&&!h&&"_hiddenFootnoteSupport"in d.parser.constructs?a(x):x===93?(t.exit(u),t.enter(s),t.consume(x),t.exit(s),t.exit(l),i):He(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||He(x)||h++>999?(t.exit("chunkString"),y(x)):(t.consume(x),m||(m=!it(x)),x===92?b:g)}function b(x){return x===91||x===92||x===93?(t.consume(x),h++,g):g(x)}}function Bw(t,i,a,l,s,u){let d;return h;function h(b){return b===34||b===39||b===40?(t.enter(l),t.enter(s),t.consume(b),t.exit(s),d=b===40?41:b,m):a(b)}function m(b){return b===d?(t.enter(s),t.consume(b),t.exit(s),t.exit(l),i):(t.enter(u),v(b))}function v(b){return b===d?(t.exit(u),m(d)):b===null?a(b):He(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),ft(t,v,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===d||b===null||He(b)?(t.exit("chunkString"),v(b)):(t.consume(b),b===92?g:y)}function g(b){return b===d||b===92?(t.consume(b),y):y(b)}}function uc(t,i){let a;return l;function l(s){return He(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a=!0,l):it(s)?ft(t,l,a?"linePrefix":"lineSuffix")(s):i(s)}}const sD={name:"definition",tokenize:uD},cD={partial:!0,tokenize:dD};function uD(t,i,a){const l=this;let s;return u;function u(x){return t.enter("definition"),d(x)}function d(x){return Iw.call(l,t,h,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function h(x){return s=aa(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),m):a(x)}function m(x){return Nt(x)?uc(t,v)(x):v(x)}function v(x){return Lw(t,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return t.attempt(cD,g,g)(x)}function g(x){return it(x)?ft(t,b,"whitespace")(x):b(x)}function b(x){return x===null||He(x)?(t.exit("definition"),l.parser.defined.push(s),i(x)):a(x)}}function dD(t,i,a){return l;function l(h){return Nt(h)?uc(t,s)(h):a(h)}function s(h){return Bw(t,u,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function u(h){return it(h)?ft(t,d,"whitespace")(h):d(h)}function d(h){return h===null||He(h)?i(h):a(h)}}const fD={name:"hardBreakEscape",tokenize:hD};function hD(t,i,a){return l;function l(u){return t.enter("hardBreakEscape"),t.consume(u),s}function s(u){return He(u)?(t.exit("hardBreakEscape"),i(u)):a(u)}}const mD={name:"headingAtx",resolve:pD,tokenize:gD};function pD(t,i){let a=t.length-2,l=3,s,u;return t[l][1].type==="whitespace"&&(l+=2),a-2>l&&t[a][1].type==="whitespace"&&(a-=2),t[a][1].type==="atxHeadingSequence"&&(l===a-1||a-4>l&&t[a-2][1].type==="whitespace")&&(a-=l+1===a?2:4),a>l&&(s={type:"atxHeadingText",start:t[l][1].start,end:t[a][1].end},u={type:"chunkText",start:t[l][1].start,end:t[a][1].end,contentType:"text"},Mi(t,l,a-l+1,[["enter",s,i],["enter",u,i],["exit",u,i],["exit",s,i]])),t}function gD(t,i,a){let l=0;return s;function s(y){return t.enter("atxHeading"),u(y)}function u(y){return t.enter("atxHeadingSequence"),d(y)}function d(y){return y===35&&l++<6?(t.consume(y),d):y===null||Nt(y)?(t.exit("atxHeadingSequence"),h(y)):a(y)}function h(y){return y===35?(t.enter("atxHeadingSequence"),m(y)):y===null||He(y)?(t.exit("atxHeading"),i(y)):it(y)?ft(t,h,"whitespace")(y):(t.enter("atxHeadingText"),v(y))}function m(y){return y===35?(t.consume(y),m):(t.exit("atxHeadingSequence"),h(y))}function v(y){return y===null||y===35||Nt(y)?(t.exit("atxHeadingText"),h(y)):(t.consume(y),v)}}const vD=["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"],u1=["pre","script","style","textarea"],yD={concrete:!0,name:"htmlFlow",resolveTo:jD,tokenize:SD},bD={partial:!0,tokenize:kD},xD={partial:!0,tokenize:wD};function jD(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function SD(t,i,a){const l=this;let s,u,d,h,m;return v;function v(P){return y(P)}function y(P){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(P),g}function g(P){return P===33?(t.consume(P),b):P===47?(t.consume(P),u=!0,k):P===63?(t.consume(P),s=3,l.interrupt?i:D):Xn(P)?(t.consume(P),d=String.fromCharCode(P),N):a(P)}function b(P){return P===45?(t.consume(P),s=2,x):P===91?(t.consume(P),s=5,h=0,S):Xn(P)?(t.consume(P),s=4,l.interrupt?i:D):a(P)}function x(P){return P===45?(t.consume(P),l.interrupt?i:D):a(P)}function S(P){const F="CDATA[";return P===F.charCodeAt(h++)?(t.consume(P),h===F.length?l.interrupt?i:X:S):a(P)}function k(P){return Xn(P)?(t.consume(P),d=String.fromCharCode(P),N):a(P)}function N(P){if(P===null||P===47||P===62||Nt(P)){const F=P===47,fe=d.toLowerCase();return!F&&!u&&u1.includes(fe)?(s=1,l.interrupt?i(P):X(P)):vD.includes(d.toLowerCase())?(s=6,F?(t.consume(P),E):l.interrupt?i(P):X(P)):(s=7,l.interrupt&&!l.parser.lazy[l.now().line]?a(P):u?T(P):A(P))}return P===45||Bn(P)?(t.consume(P),d+=String.fromCharCode(P),N):a(P)}function E(P){return P===62?(t.consume(P),l.interrupt?i:X):a(P)}function T(P){return it(P)?(t.consume(P),T):L(P)}function A(P){return P===47?(t.consume(P),L):P===58||P===95||Xn(P)?(t.consume(P),M):it(P)?(t.consume(P),A):L(P)}function M(P){return P===45||P===46||P===58||P===95||Bn(P)?(t.consume(P),M):I(P)}function I(P){return P===61?(t.consume(P),O):it(P)?(t.consume(P),I):A(P)}function O(P){return P===null||P===60||P===61||P===62||P===96?a(P):P===34||P===39?(t.consume(P),m=P,B):it(P)?(t.consume(P),O):q(P)}function B(P){return P===m?(t.consume(P),m=null,$):P===null||He(P)?a(P):(t.consume(P),B)}function q(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Nt(P)?I(P):(t.consume(P),q)}function $(P){return P===47||P===62||it(P)?A(P):a(P)}function L(P){return P===62?(t.consume(P),Y):a(P)}function Y(P){return P===null||He(P)?X(P):it(P)?(t.consume(P),Y):a(P)}function X(P){return P===45&&s===2?(t.consume(P),G):P===60&&s===1?(t.consume(P),R):P===62&&s===4?(t.consume(P),ie):P===63&&s===3?(t.consume(P),D):P===93&&s===5?(t.consume(P),W):He(P)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(bD,ne,ue)(P)):P===null||He(P)?(t.exit("htmlFlowData"),ue(P)):(t.consume(P),X)}function ue(P){return t.check(xD,Z,ne)(P)}function Z(P){return t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),U}function U(P){return P===null||He(P)?ue(P):(t.enter("htmlFlowData"),X(P))}function G(P){return P===45?(t.consume(P),D):X(P)}function R(P){return P===47?(t.consume(P),d="",H):X(P)}function H(P){if(P===62){const F=d.toLowerCase();return u1.includes(F)?(t.consume(P),ie):X(P)}return Xn(P)&&d.length<8?(t.consume(P),d+=String.fromCharCode(P),H):X(P)}function W(P){return P===93?(t.consume(P),D):X(P)}function D(P){return P===62?(t.consume(P),ie):P===45&&s===2?(t.consume(P),D):X(P)}function ie(P){return P===null||He(P)?(t.exit("htmlFlowData"),ne(P)):(t.consume(P),ie)}function ne(P){return t.exit("htmlFlow"),i(P)}}function wD(t,i,a){const l=this;return s;function s(d){return He(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),u):a(d)}function u(d){return l.parser.lazy[l.now().line]?a(d):i(d)}}function kD(t,i,a){return l;function l(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Mc,i,a)}}const CD={name:"htmlText",tokenize:ND};function ND(t,i,a){const l=this;let s,u,d;return h;function h(D){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(D),m}function m(D){return D===33?(t.consume(D),v):D===47?(t.consume(D),I):D===63?(t.consume(D),A):Xn(D)?(t.consume(D),q):a(D)}function v(D){return D===45?(t.consume(D),y):D===91?(t.consume(D),u=0,S):Xn(D)?(t.consume(D),T):a(D)}function y(D){return D===45?(t.consume(D),x):a(D)}function g(D){return D===null?a(D):D===45?(t.consume(D),b):He(D)?(d=g,R(D)):(t.consume(D),g)}function b(D){return D===45?(t.consume(D),x):g(D)}function x(D){return D===62?G(D):D===45?b(D):g(D)}function S(D){const ie="CDATA[";return D===ie.charCodeAt(u++)?(t.consume(D),u===ie.length?k:S):a(D)}function k(D){return D===null?a(D):D===93?(t.consume(D),N):He(D)?(d=k,R(D)):(t.consume(D),k)}function N(D){return D===93?(t.consume(D),E):k(D)}function E(D){return D===62?G(D):D===93?(t.consume(D),E):k(D)}function T(D){return D===null||D===62?G(D):He(D)?(d=T,R(D)):(t.consume(D),T)}function A(D){return D===null?a(D):D===63?(t.consume(D),M):He(D)?(d=A,R(D)):(t.consume(D),A)}function M(D){return D===62?G(D):A(D)}function I(D){return Xn(D)?(t.consume(D),O):a(D)}function O(D){return D===45||Bn(D)?(t.consume(D),O):B(D)}function B(D){return He(D)?(d=B,R(D)):it(D)?(t.consume(D),B):G(D)}function q(D){return D===45||Bn(D)?(t.consume(D),q):D===47||D===62||Nt(D)?$(D):a(D)}function $(D){return D===47?(t.consume(D),G):D===58||D===95||Xn(D)?(t.consume(D),L):He(D)?(d=$,R(D)):it(D)?(t.consume(D),$):G(D)}function L(D){return D===45||D===46||D===58||D===95||Bn(D)?(t.consume(D),L):Y(D)}function Y(D){return D===61?(t.consume(D),X):He(D)?(d=Y,R(D)):it(D)?(t.consume(D),Y):$(D)}function X(D){return D===null||D===60||D===61||D===62||D===96?a(D):D===34||D===39?(t.consume(D),s=D,ue):He(D)?(d=X,R(D)):it(D)?(t.consume(D),X):(t.consume(D),Z)}function ue(D){return D===s?(t.consume(D),s=void 0,U):D===null?a(D):He(D)?(d=ue,R(D)):(t.consume(D),ue)}function Z(D){return D===null||D===34||D===39||D===60||D===61||D===96?a(D):D===47||D===62||Nt(D)?$(D):(t.consume(D),Z)}function U(D){return D===47||D===62||Nt(D)?$(D):a(D)}function G(D){return D===62?(t.consume(D),t.exit("htmlTextData"),t.exit("htmlText"),i):a(D)}function R(D){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),H}function H(D){return it(D)?ft(t,W,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):W(D)}function W(D){return t.enter("htmlTextData"),d(D)}}const Yg={name:"labelEnd",resolveAll:MD,resolveTo:OD,tokenize:_D},ED={tokenize:RD},TD={tokenize:DD},AD={tokenize:zD};function MD(t){let i=-1;const a=[];for(;++i<t.length;){const l=t[i][1];if(a.push(t[i]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const s=l.type==="labelImage"?4:2;l.type="data",i+=s}}return t.length!==a.length&&Mi(t,0,t.length,a),t}function OD(t,i){let a=t.length,l=0,s,u,d,h;for(;a--;)if(s=t[a][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(d){if(t[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=a,s.type!=="labelLink")){l=2;break}}else s.type==="labelEnd"&&(d=a);const m={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},v={type:"label",start:{...t[u][1].start},end:{...t[d][1].end}},y={type:"labelText",start:{...t[u+l+2][1].end},end:{...t[d-2][1].start}};return h=[["enter",m,i],["enter",v,i]],h=Ui(h,t.slice(u+1,u+l+3)),h=Ui(h,[["enter",y,i]]),h=Ui(h,nf(i.parser.constructs.insideSpan.null,t.slice(u+l+4,d-3),i)),h=Ui(h,[["exit",y,i],t[d-2],t[d-1],["exit",v,i]]),h=Ui(h,t.slice(d+1)),h=Ui(h,[["exit",m,i]]),Mi(t,u,t.length,h),t}function _D(t,i,a){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 h;function h(b){return u?u._inactive?g(b):(d=l.parser.defined.includes(aa(l.sliceSerialize({start:u.end,end:l.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),m):a(b)}function m(b){return b===40?t.attempt(ED,y,d?y:g)(b):b===91?t.attempt(TD,y,d?v:g)(b):d?y(b):g(b)}function v(b){return t.attempt(AD,y,g)(b)}function y(b){return i(b)}function g(b){return u._balanced=!0,a(b)}}function RD(t,i,a){return l;function l(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),s}function s(g){return Nt(g)?uc(t,u)(g):u(g)}function u(g){return g===41?y(g):Lw(t,d,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function d(g){return Nt(g)?uc(t,m)(g):y(g)}function h(g){return a(g)}function m(g){return g===34||g===39||g===40?Bw(t,v,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function v(g){return Nt(g)?uc(t,y)(g):y(g)}function y(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),i):a(g)}}function DD(t,i,a){const l=this;return s;function s(h){return Iw.call(l,t,u,d,"reference","referenceMarker","referenceString")(h)}function u(h){return l.parser.defined.includes(aa(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?i(h):a(h)}function d(h){return a(h)}}function zD(t,i,a){return l;function l(u){return t.enter("reference"),t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),s}function s(u){return u===93?(t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),t.exit("reference"),i):a(u)}}const LD={name:"labelStartImage",resolveAll:Yg.resolveAll,tokenize:ID};function ID(t,i,a){const l=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),u}function u(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),d):a(h)}function d(h){return h===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(h):i(h)}}const BD={name:"labelStartLink",resolveAll:Yg.resolveAll,tokenize:PD};function PD(t,i,a){const l=this;return s;function s(d){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelLink"),u}function u(d){return d===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(d):i(d)}}const Xm={name:"lineEnding",tokenize:HD};function HD(t,i){return a;function a(l){return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),ft(t,i,"linePrefix")}}const bd={name:"thematicBreak",tokenize:UD};function UD(t,i,a){let l=0,s;return u;function u(v){return t.enter("thematicBreak"),d(v)}function d(v){return s=v,h(v)}function h(v){return v===s?(t.enter("thematicBreakSequence"),m(v)):l>=3&&(v===null||He(v))?(t.exit("thematicBreak"),i(v)):a(v)}function m(v){return v===s?(t.consume(v),l++,m):(t.exit("thematicBreakSequence"),it(v)?ft(t,h,"whitespace")(v):h(v))}}const si={continuation:{tokenize:$D},exit:GD,name:"list",tokenize:VD},qD={partial:!0,tokenize:XD},FD={partial:!0,tokenize:YD};function VD(t,i,a){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 h;function h(x){const S=l.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!l.containerState.marker||x===l.containerState.marker:Fp(x)){if(l.containerState.type||(l.containerState.type=S,t.enter(S,{_container:!0})),S==="listUnordered")return t.enter("listItemPrefix"),x===42||x===45?t.check(bd,a,v)(x):v(x);if(!l.interrupt||x===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(x)}return a(x)}function m(x){return Fp(x)&&++d<10?(t.consume(x),m):(!l.interrupt||d<2)&&(l.containerState.marker?x===l.containerState.marker:x===41||x===46)?(t.exit("listItemValue"),v(x)):a(x)}function v(x){return t.enter("listItemMarker"),t.consume(x),t.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||x,t.check(Mc,l.interrupt?a:y,t.attempt(qD,b,g))}function y(x){return l.containerState.initialBlankLine=!0,u++,b(x)}function g(x){return it(x)?(t.enter("listItemPrefixWhitespace"),t.consume(x),t.exit("listItemPrefixWhitespace"),b):a(x)}function b(x){return l.containerState.size=u+l.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(x)}}function $D(t,i,a){const l=this;return l.containerState._closeFlow=void 0,t.check(Mc,s,u);function s(h){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,ft(t,i,"listItemIndent",l.containerState.size+1)(h)}function u(h){return l.containerState.furtherBlankLines||!it(h)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,d(h)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,t.attempt(FD,i,d)(h))}function d(h){return l.containerState._closeFlow=!0,l.interrupt=void 0,ft(t,t.attempt(si,i,a),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function YD(t,i,a){const l=this;return ft(t,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):a(u)}}function GD(t){t.exit(this.containerState.type)}function XD(t,i,a){const l=this;return ft(t,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):a(u)}}const d1={name:"setextUnderline",resolveTo:QD,tokenize:KD};function QD(t,i){let a=t.length,l,s,u;for(;a--;)if(t[a][0]==="enter"){if(t[a][1].type==="content"){l=a;break}t[a][1].type==="paragraph"&&(s=a)}else t[a][1].type==="content"&&t.splice(a,1),!u&&t[a][1].type==="definition"&&(u=a);const d={type:"setextHeading",start:{...t[l][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",u?(t.splice(s,0,["enter",d,i]),t.splice(u+1,0,["exit",t[l][1],i]),t[l][1].end={...t[u][1].end}):t[l][1]=d,t.push(["exit",d,i]),t}function KD(t,i,a){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)?(t.enter("setextHeadingLine"),s=v,d(v)):a(v)}function d(v){return t.enter("setextHeadingLineSequence"),h(v)}function h(v){return v===s?(t.consume(v),h):(t.exit("setextHeadingLineSequence"),it(v)?ft(t,m,"lineSuffix")(v):m(v))}function m(v){return v===null||He(v)?(t.exit("setextHeadingLine"),i(v)):a(v)}}const ZD={tokenize:JD};function JD(t){const i=this,a=t.attempt(Mc,l,t.attempt(this.parser.constructs.flowInitial,s,ft(t,t.attempt(this.parser.constructs.flow,s,t.attempt(iD,s)),"linePrefix")));return a;function l(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),i.currentConstruct=void 0,a}function s(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),i.currentConstruct=void 0,a}}const WD={resolveAll:Hw()},ez=Pw("string"),tz=Pw("text");function Pw(t){return{resolveAll:Hw(t==="text"?nz:void 0),tokenize:i};function i(a){const l=this,s=this.parser.constructs[t],u=a.attempt(s,d,h);return d;function d(y){return v(y)?u(y):h(y)}function h(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),m}function m(y){return v(y)?(a.exit("data"),u(y)):(a.consume(y),m)}function v(y){if(y===null)return!0;const g=s[y];let b=-1;if(g)for(;++b<g.length;){const x=g[b];if(!x.previous||x.previous.call(l,l.previous))return!0}return!1}}}function Hw(t){return i;function i(a,l){let s=-1,u;for(;++s<=a.length;)u===void 0?a[s]&&a[s][1].type==="data"&&(u=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==u+2&&(a[u][1].end=a[s-1][1].end,a.splice(u+2,s-u-2),s=u+2),u=void 0);return t?t(a,l):a}}function nz(t,i){let a=0;for(;++a<=t.length;)if((a===t.length||t[a][1].type==="lineEnding")&&t[a-1][1].type==="data"){const l=t[a-1][1],s=i.sliceStream(l);let u=s.length,d=-1,h=0,m;for(;u--;){const v=s[u];if(typeof v=="string"){for(d=v.length;v.charCodeAt(d-1)===32;)h++,d--;if(d)break;d=-1}else if(v===-2)m=!0,h++;else if(v!==-1){u++;break}}if(i._contentTypeTextTrailing&&a===t.length&&(h=0),h){const v={type:a===t.length||m||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?d:l.start._bufferIndex+d,_index:l.start._index+u,line:l.end.line,column:l.end.column-h,offset:l.end.offset-h},end:{...l.end}};l.end={...v.start},l.start.offset===l.end.offset?Object.assign(l,v):(t.splice(a,0,["enter",v,i],["exit",v,i]),a+=2)}a++}return t}const iz={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:_w},az={91:sD},rz={[-2]:Gm,[-1]:Gm,32:Gm},lz={35:mD,42:bd,45:[d1,bd],60:yD,61:d1,95:bd,96:c1,126:c1},oz={38:Dw,92:Rw},sz={[-5]:Xm,[-4]:Xm,[-3]:Xm,33:LD,38:Dw,42:Vp,60:[B3,CD],91:BD,92:[fD,Rw],93:Yg,95:Vp,96:Z3},cz={null:[Vp,WD]},uz={null:[42,95]},dz={null:[]},fz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:uz,contentInitial:az,disable:dz,document:iz,flow:lz,flowInitial:rz,insideSpan:cz,string:oz,text:sz},Symbol.toStringTag,{value:"Module"}));function hz(t,i,a){let l={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const s={},u=[];let d=[],h=[];const m={attempt:B(I),check:B(O),consume:T,enter:A,exit:M,interrupt:B(O,{interrupt:!0})},v={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:t,previous:null,sliceSerialize:b,sliceStream:x,write:g};let y=i.tokenize.call(v,m);return i.resolveAll&&u.push(i),v;function g(Y){return d=Ui(d,Y),N(),d[d.length-1]!==null?[]:(q(i,0),v.events=nf(u,v.events,v),v.events)}function b(Y,X){return pz(x(Y),X)}function x(Y){return mz(d,Y)}function S(){const{_bufferIndex:Y,_index:X,line:ue,column:Z,offset:U}=l;return{_bufferIndex:Y,_index:X,line:ue,column:Z,offset:U}}function k(Y){s[Y.line]=Y.column,L()}function N(){let Y;for(;l._index<d.length;){const X=d[l._index];if(typeof X=="string")for(Y=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===Y&&l._bufferIndex<X.length;)E(X.charCodeAt(l._bufferIndex));else E(X)}}function E(Y){y=y(Y)}function T(Y){He(Y)?(l.line++,l.column=1,l.offset+=Y===-3?2:1,L()):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 A(Y,X){const ue=X||{};return ue.type=Y,ue.start=S(),v.events.push(["enter",ue,v]),h.push(ue),ue}function M(Y){const X=h.pop();return X.end=S(),v.events.push(["exit",X,v]),X}function I(Y,X){q(Y,X.from)}function O(Y,X){X.restore()}function B(Y,X){return ue;function ue(Z,U,G){let R,H,W,D;return Array.isArray(Z)?ne(Z):"tokenize"in Z?ne([Z]):ie(Z);function ie(ye){return Se;function Se(re){const be=re!==null&&ye[re],le=re!==null&&ye.null,se=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(le)?le:le?[le]:[]];return ne(se)(re)}}function ne(ye){return R=ye,H=0,ye.length===0?G:P(ye[H])}function P(ye){return Se;function Se(re){return D=$(),W=ye,ye.partial||(v.currentConstruct=ye),ye.name&&v.parser.constructs.disable.null.includes(ye.name)?fe():ye.tokenize.call(X?Object.assign(Object.create(v),X):v,m,F,fe)(re)}}function F(ye){return Y(W,D),U}function fe(ye){return D.restore(),++H<R.length?P(R[H]):G}}}function q(Y,X){Y.resolveAll&&!u.includes(Y)&&u.push(Y),Y.resolve&&Mi(v.events,X,v.events.length-X,Y.resolve(v.events.slice(X),v)),Y.resolveTo&&(v.events=Y.resolveTo(v.events,v))}function $(){const Y=S(),X=v.previous,ue=v.currentConstruct,Z=v.events.length,U=Array.from(h);return{from:Z,restore:G};function G(){l=Y,v.previous=X,v.currentConstruct=ue,v.events.length=Z,h=U,L()}}function L(){l.line in s&&l.column<2&&(l.column=s[l.line],l.offset+=s[l.line]-1)}}function mz(t,i){const a=i.start._index,l=i.start._bufferIndex,s=i.end._index,u=i.end._bufferIndex;let d;if(a===s)d=[t[a].slice(l,u)];else{if(d=t.slice(a,s),l>-1){const h=d[0];typeof h=="string"?d[0]=h.slice(l):d.shift()}u>0&&d.push(t[s].slice(0,u))}return d}function pz(t,i){let a=-1;const l=[];let s;for(;++a<t.length;){const u=t[a];let d;if(typeof u=="string")d=u;else switch(u){case-5:{d="\r";break}case-4:{d=`
466
- `;break}case-3:{d=`\r
467
- `;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(t){const l={constructs:Mw([fz,...(t||{}).extensions||[]]),content:s(O3),defined:[],document:s(R3),flow:s(ZD),lazy:{},string:s(ez),text:s(tz)};return l;function s(u){return d;function d(h){return hz(l,u,h)}}}function vz(t){for(;!zw(t););return t}const f1=/[\0\t\n\r]/g;function yz(){let t=1,i="",a=!0,l;return s;function s(u,d,h){const m=[];let v,y,g,b,x;for(u=i+(typeof u=="string"?u.toString():new TextDecoder(d||void 0).decode(u)),g=0,i="",a&&(u.charCodeAt(0)===65279&&g++,a=void 0);g<u.length;){if(f1.lastIndex=g,v=f1.exec(u),b=v&&v.index!==void 0?v.index:u.length,x=u.charCodeAt(b),!v){i=u.slice(g);break}if(x===10&&g===b&&l)m.push(-3),l=void 0;else switch(l&&(m.push(-5),l=void 0),g<b&&(m.push(u.slice(g,b)),t+=b-g),x){case 0:{m.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,m.push(-2);t++<y;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:l=!0,t=1}g=b+1}return h&&(l&&m.push(-5),i&&m.push(i),m.push(null)),m}}const bz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xz(t){return t.replace(bz,jz)}function jz(t,i,a){if(i)return i;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),u=s===120||s===88;return Ow(a.slice(u?2:1),u?16:10)}return $g(a)||t}const Uw={}.hasOwnProperty;function Sz(t,i,a){return i&&typeof i=="object"&&(a=i,i=void 0),wz(a)(vz(gz(a).document().write(yz()(t,i,!0))))}function wz(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(At),autolinkProtocol:$,autolinkEmail:$,atxHeading:u(Fe),blockQuote:u(le),characterEscape:$,characterReference:$,codeFenced:u(se),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(se,d),codeText:u(he,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:b,listOrdered:u(gn,g),listUnordered:u(gn),paragraph:u(Hn),reference:P,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Fe),strong:u(di),thematicBreak:u(Yi)},exit:{atxHeading:m(),atxHeadingSequence:I,autolink:m(),autolinkEmail:be,autolinkProtocol:re,blockQuote:m(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ye,characterReference:Se,codeFenced:m(N),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:m(E),codeText:m(U),codeTextData:L,data:L,definition:m(),definitionDestinationString:M,definitionLabelString:T,definitionTitleString:A,emphasis:m(),hardBreakEscape:m(X),hardBreakTrailing:m(X),htmlFlow:m(ue),htmlFlowData:L,htmlText:m(Z),htmlTextData:L,image:m(R),label:W,labelText:H,lineEnding:Y,link:m(G),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:F,resourceDestinationString:D,resourceTitleString:ie,resource:ne,setextHeading:m(q),setextHeadingLineSequence:B,setextHeadingText:O,strong:m(),thematicBreak:m()}};qw(i,(t||{}).mdastExtensions||[]);const a={};return l;function l(pe){let we={type:"root",children:[]};const Be={stack:[we],tokenStack:[],config:i,enter:h,exit:v,buffer:d,resume:y,data:a},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 Ht=Ue.pop();We=s(pe,Ht,We)}for(We=-1;++We<pe.length;){const Ht=i[pe[We][0]];Uw.call(Ht,pe[We][1].type)&&Ht[pe[We][1].type].call(Object.assign({sliceSerialize:pe[We][2].sliceSerialize},Be),pe[We][1])}if(Be.tokenStack.length>0){const Ht=Be.tokenStack[Be.tokenStack.length-1];(Ht[1]||h1).call(Be,void 0,Ht[0])}for(we.position={start:Gr(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:Gr(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<i.transforms.length;)we=i.transforms[We](we)||we;return we}function s(pe,we,Be){let Ue=we-1,We=-1,Ht=!1,yn,Ut,On,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&&!On&&(On=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 _n=Ue;for(Ut=void 0;_n--;){const Qe=pe[_n];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ut&&(pe[Ut][1].type="lineEndingBlank",Ht=!0),Qe[1].type="lineEnding",Ut=_n}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}On&&(!Ut||On<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 _n={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};yn=_n,pe.splice(Ue,0,["enter",_n,_t[2]]),Ue++,Be++,On=void 0,Un=!0}}}return pe[we][1]._spread=Ht,Be}function u(pe,we){return Be;function Be(Ue){h.call(this,pe(Ue),Ue),we&&we.call(this,Ue)}}function d(){this.stack.push({type:"fragment",children:[]})}function h(pe,we,Be){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([we,Be||void 0]),pe.position={start:Gr(we.start),end:void 0}}function m(pe){return we;function we(Be){pe&&pe.call(this,Be),v.call(this,Be)}}function v(pe,we){const Be=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==pe.type&&(we?we.call(this,pe,Ue[0]):(Ue[1]||h1).call(this,pe,Ue[0]));else throw new Error("Cannot close `"+pe.type+"` ("+cc({start:pe.start,end:pe.end})+"): it’s not open");Be.position.end=Gr(pe.end)}function y(){return Vg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(pe){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function x(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.lang=pe}function S(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.meta=pe}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.value=pe.replace(/(\r?\n|\r)$/g,"")}function T(pe){const we=this.resume(),Be=this.stack[this.stack.length-1];Be.label=we,Be.identifier=aa(this.sliceSerialize(pe)).toLowerCase()}function A(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.title=pe}function M(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.url=pe}function I(pe){const we=this.stack[this.stack.length-1];if(!we.depth){const Be=this.sliceSerialize(pe).length;we.depth=Be}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function B(pe){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function q(){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=an(),Ue.position={start:Gr(pe.start),end:void 0},Be.push(Ue)),this.stack.push(Ue)}function L(pe){const we=this.stack.pop();we.value+=this.sliceSerialize(pe),we.position.end=Gr(pe.end)}function Y(pe){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=we.children[we.children.length-1];Be.position.end=Gr(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(we.type)&&($.call(this,pe),L.call(this,pe))}function X(){this.data.atHardBreak=!0}function ue(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.value=pe}function Z(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.value=pe}function U(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.value=pe}function G(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=we,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function R(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=we,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function H(pe){const we=this.sliceSerialize(pe),Be=this.stack[this.stack.length-2];Be.label=xz(we),Be.identifier=aa(we).toLowerCase()}function W(){const pe=this.stack[this.stack.length-1],we=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=we}function D(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.url=pe}function ie(){const pe=this.resume(),we=this.stack[this.stack.length-1];we.title=pe}function ne(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function F(pe){const we=this.resume(),Be=this.stack[this.stack.length-1];Be.label=we,Be.identifier=aa(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function fe(pe){this.data.characterReferenceType=pe.type}function ye(pe){const we=this.sliceSerialize(pe),Be=this.data.characterReferenceType;let Ue;Be?(Ue=Ow(we,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=$g(we);const We=this.stack[this.stack.length-1];We.value+=Ue}function Se(pe){const we=this.stack.pop();we.position.end=Gr(pe.end)}function re(pe){L.call(this,pe);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(pe)}function be(pe){L.call(this,pe);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(pe)}function le(){return{type:"blockquote",children:[]}}function se(){return{type:"code",lang:null,meta:null,value:""}}function he(){return{type:"inlineCode",value:""}}function Ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function Fe(){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 Hn(){return{type:"paragraph",children:[]}}function di(){return{type:"strong",children:[]}}function an(){return{type:"text",value:""}}function Yi(){return{type:"thematicBreak"}}}function Gr(t){return{line:t.line,column:t.column,offset:t.offset}}function qw(t,i){let a=-1;for(;++a<i.length;){const l=i[a];Array.isArray(l)?qw(t,l):kz(t,l)}}function kz(t,i){let a;for(a in i)if(Uw.call(i,a))switch(a){case"canContainEols":{const l=i[a];l&&t[a].push(...l);break}case"transforms":{const l=i[a];l&&t[a].push(...l);break}case"enter":case"exit":{const l=i[a];l&&Object.assign(t[a],l);break}}}function h1(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+cc({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+cc({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+cc({start:i.start,end:i.end})+") is still open")}function Cz(t){const i=this;i.parser=a;function a(l){return Sz(l,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function Nz(t,i){const a={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,a),t.applyData(i,a)}function Ez(t,i){const a={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,a),[t.applyData(i,a),{type:"text",value:`
468
- `}]}function Tz(t,i){const a=i.value?i.value+`
469
- `:"",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:a}]};return i.meta&&(u.data={meta:i.meta}),t.patch(i,u),u=t.applyData(i,u),u={type:"element",tagName:"pre",properties:{},children:[u]},t.patch(i,u),u}function Az(t,i){const a={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function Mz(t,i){const a={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function Oz(t,i){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=String(i.identifier).toUpperCase(),s=ss(l.toLowerCase()),u=t.footnoteOrder.indexOf(l);let d,h=t.footnoteCounts.get(l);h===void 0?(h=0,t.footnoteOrder.push(l),d=t.footnoteOrder.length):d=u+1,h+=1,t.footnoteCounts.set(l,h);const m={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+s,id:a+"fnref-"+s+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};t.patch(i,m);const v={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(i,v),t.applyData(i,v)}function _z(t,i){const a={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function Rz(t,i){if(t.options.allowDangerousHtml){const a={type:"raw",value:i.value};return t.patch(i,a),t.applyData(i,a)}}function Fw(t,i){const a=i.referenceType;let l="]";if(a==="collapsed"?l+="[]":a==="full"&&(l+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+l}];const s=t.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 Dz(t,i){const a=String(i.identifier).toUpperCase(),l=t.definitionById.get(a);if(!l)return Fw(t,i);const s={src:ss(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 t.patch(i,u),t.applyData(i,u)}function zz(t,i){const a={src:ss(i.url)};i.alt!==null&&i.alt!==void 0&&(a.alt=i.alt),i.title!==null&&i.title!==void 0&&(a.title=i.title);const l={type:"element",tagName:"img",properties:a,children:[]};return t.patch(i,l),t.applyData(i,l)}function Lz(t,i){const a={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,a);const l={type:"element",tagName:"code",properties:{},children:[a]};return t.patch(i,l),t.applyData(i,l)}function Iz(t,i){const a=String(i.identifier).toUpperCase(),l=t.definitionById.get(a);if(!l)return Fw(t,i);const s={href:ss(l.url||"")};l.title!==null&&l.title!==void 0&&(s.title=l.title);const u={type:"element",tagName:"a",properties:s,children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function Bz(t,i){const a={href:ss(i.url)};i.title!==null&&i.title!==void 0&&(a.title=i.title);const l={type:"element",tagName:"a",properties:a,children:t.all(i)};return t.patch(i,l),t.applyData(i,l)}function Pz(t,i,a){const l=t.all(i),s=a?Hz(a):Vw(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 h=-1;for(;++h<l.length;){const y=l[h];(s||h!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
470
- `}),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:`
471
- `});const v={type:"element",tagName:"li",properties:u,children:d};return t.patch(i,v),t.applyData(i,v)}function Hz(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const a=t.children;let l=-1;for(;!i&&++l<a.length;)i=Vw(a[l])}return i}function Vw(t){const i=t.spread;return i??t.children.length>1}function Uz(t,i){const a={},l=t.all(i);let s=-1;for(typeof i.start=="number"&&i.start!==1&&(a.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")){a.className=["contains-task-list"];break}}const u={type:"element",tagName:i.ordered?"ol":"ul",properties:a,children:t.wrap(l,!0)};return t.patch(i,u),t.applyData(i,u)}function qz(t,i){const a={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function Fz(t,i){const a={type:"root",children:t.wrap(t.all(i))};return t.patch(i,a),t.applyData(i,a)}function Vz(t,i){const a={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function $z(t,i){const a=t.all(i),l=a.shift(),s=[];if(l){const d={type:"element",tagName:"thead",properties:{},children:t.wrap([l],!0)};t.patch(i.children[0],d),s.push(d)}if(a.length>0){const d={type:"element",tagName:"tbody",properties:{},children:t.wrap(a,!0)},h=Hg(i.children[1]),m=ww(i.children[i.children.length-1]);h&&m&&(d.position={start:h,end:m}),s.push(d)}const u={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(i,u),t.applyData(i,u)}function Yz(t,i,a){const l=a?a.children:void 0,u=(l?l.indexOf(i):1)===0?"th":"td",d=a&&a.type==="table"?a.align:void 0,h=d?d.length:i.children.length;let m=-1;const v=[];for(;++m<h;){const g=i.children[m],b={},x=d?d[m]:void 0;x&&(b.align=x);let S={type:"element",tagName:u,properties:b,children:[]};g&&(S.children=t.all(g),t.patch(g,S),S=t.applyData(g,S)),v.push(S)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(v,!0)};return t.patch(i,y),t.applyData(i,y)}function Gz(t,i){const a={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}const m1=9,p1=32;function Xz(t){const i=String(t),a=/\r?\n|\r/g;let l=a.exec(i),s=0;const u=[];for(;l;)u.push(g1(i.slice(s,l.index),s>0,!0),l[0]),s=l.index+l[0].length,l=a.exec(i);return u.push(g1(i.slice(s),s>0,!1)),u.join("")}function g1(t,i,a){let l=0,s=t.length;if(i){let u=t.codePointAt(l);for(;u===m1||u===p1;)l++,u=t.codePointAt(l)}if(a){let u=t.codePointAt(s-1);for(;u===m1||u===p1;)s--,u=t.codePointAt(s-1)}return s>l?t.slice(l,s):""}function Qz(t,i){const a={type:"text",value:Xz(String(i.value))};return t.patch(i,a),t.applyData(i,a)}function Kz(t,i){const a={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,a),t.applyData(i,a)}const Zz={blockquote:Nz,break:Ez,code:Tz,delete:Az,emphasis:Mz,footnoteReference:Oz,heading:_z,html:Rz,imageReference:Dz,image:zz,inlineCode:Lz,linkReference:Iz,link:Bz,listItem:Pz,list:Uz,paragraph:qz,root:Fz,strong:Vz,table:$z,tableCell:Gz,tableRow:Yz,text:Qz,thematicBreak:Kz,toml:od,yaml:od,definition:od,footnoteDefinition:od};function od(){}const $w=-1,af=0,dc=1,Od=2,Gg=3,Xg=4,Qg=5,Kg=6,Yw=7,Gw=8,{defineProperty:Jz}=Object,Xw=typeof self=="object"?self:globalThis,v1=(t,i)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new Xw[t](i)},Wz=(t,i)=>{const a=(s,u)=>(t.set(u,s),s),l=s=>{if(t.has(s))return t.get(s);const[u,d]=i[s];switch(u){case af:case $w:return a(d,s);case dc:{const h=a([],s);for(const m of d)h.push(l(m));return h}case Od:{const h=a({},s);for(const[m,v]of d){const y=l(m),g=l(v);y==="__proto__"?Jz(h,y,{value:g,configurable:!0,enumerable:!0,writable:!0}):h[y]=g}return h}case Gg:return a(new Date(d),s);case Xg:{const{source:h,flags:m}=d;return a(new RegExp(h,m),s)}case Qg:{const h=a(new Map,s);for(const[m,v]of d)h.set(l(m),l(v));return h}case Kg:{const h=a(new Set,s);for(const m of d)h.add(l(m));return h}case Yw:{const{name:h,message:m}=d;return a(typeof Xw[h]=="function"?v1(h,m):new Error(m),s)}case Gw:return a(BigInt(d),s);case"BigInt":return a(Object(BigInt(d)),s);case"ArrayBuffer":return a(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:h}=new Uint8Array(d);return a(new DataView(h),d)}case"-0":return-0}return a(v1(u,d),s)};return l},y1=t=>Wz(new Map,t)(0),Pl="",{toString:e6}={},{keys:t6,is:n6}=Object,lc=t=>{const i=typeof t;if(i!=="object"||!t)return[af,i];const a=e6.call(t).slice(8,-1);switch(a){case"Array":return[dc,Pl];case"Object":return[Od,Pl];case"Date":return[Gg,Pl];case"RegExp":return[Xg,Pl];case"Map":return[Qg,Pl];case"Set":return[Kg,Pl];case"DataView":return[dc,a]}return a.includes("Array")?[dc,a]:t instanceof Error?[Yw,t.name||"Error"]:[Od,a]},sd=([t,i])=>t===af&&(i==="function"||i==="symbol"),i6=(t,i,a,l)=>{const s=(d,h)=>{const m=l.push(d)-1;return a.set(h,m),m},u=d=>{if(a.has(d))return a.get(d);let[h,m]=lc(d);switch(h){case af:{let y=d;switch(m){case"bigint":h=Gw,y=d.toString();break;case"number":if(!d&&n6(d,-0))return l.push(["-0"])-1;break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return s([$w],d)}return s([h,y],d)}case dc:{if(m){let b=d;return m==="DataView"?b=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(b=new Uint8Array(d)),s([m,[...b]],d)}const y=[],g=s([h,y],d);for(const b of d)y.push(u(b));return g}case Od:{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([h,y],d);for(const b of t6(d))(t||!sd(lc(d[b])))&&y.push([u(b),u(d[b])]);return g}case Gg:return s([h,isNaN(d.getTime())?Pl:d.toISOString()],d);case Xg:{const{source:y,flags:g}=d;return s([h,{source:y,flags:g}],d)}case Qg:{const y=[],g=s([h,y],d);for(const[b,x]of d)(t||!(sd(lc(b))||sd(lc(x))))&&y.push([u(b),u(x)]);return g}case Kg:{const y=[],g=s([h,y],d);for(const b of d)(t||!sd(lc(b)))&&y.push(u(b));return g}}const{message:v}=d;return s([h,{name:m,message:v}],d)};return u},b1=(t,{json:i,lossy:a}={})=>{const l=[];return i6(!(i||a),!!i,new Map,l)(t),l},_d=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?y1(b1(t,i)):structuredClone(t):(t,i)=>y1(b1(t,i));function a6(t,i){const a=[{type:"text",value:"↩"}];return i>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),a}function r6(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function l6(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=t.options.footnoteBackContent||a6,l=t.options.footnoteBackLabel||r6,s=t.options.footnoteLabel||"Footnotes",u=t.options.footnoteLabelTagName||"h2",d=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let m=-1;for(;++m<t.footnoteOrder.length;){const v=t.footnoteById.get(t.footnoteOrder[m]);if(!v)continue;const y=t.all(v),g=String(v.identifier).toUpperCase(),b=ss(g.toLowerCase());let x=0;const S=[],k=t.footnoteCounts.get(g);for(;k!==void 0&&++x<=k;){S.length>0&&S.push({type:"text",value:" "});let T=typeof a=="string"?a:a(m,x);typeof T=="string"&&(T={type:"text",value:T}),S.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(m,x),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const N=y[y.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const T=N.children[N.children.length-1];T&&T.type==="text"?T.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else y.push(...S);const E={type:"element",tagName:"li",properties:{id:i+"fn-"+b},children:t.wrap(y,!0)};t.patch(v,E),h.push(E)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{..._d(d),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
472
- `},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
473
- `}]}}const rf=(function(t){if(t==null)return u6;if(typeof t=="function")return lf(t);if(typeof t=="object")return Array.isArray(t)?o6(t):s6(t);if(typeof t=="string")return c6(t);throw new Error("Expected function, string, or object as test")});function o6(t){const i=[];let a=-1;for(;++a<t.length;)i[a]=rf(t[a]);return lf(l);function l(...s){let u=-1;for(;++u<i.length;)if(i[u].apply(this,s))return!0;return!1}}function s6(t){const i=t;return lf(a);function a(l){const s=l;let u;for(u in t)if(s[u]!==i[u])return!1;return!0}}function c6(t){return lf(i);function i(a){return a&&a.type===t}}function lf(t){return i;function i(a,l,s){return!!(d6(a)&&t.call(this,a,typeof l=="number"?l:void 0,s||void 0))}}function u6(){return!0}function d6(t){return t!==null&&typeof t=="object"&&"type"in t}const Qw=[],f6=!0,$p=!1,h6="skip";function Kw(t,i,a,l){let s;typeof i=="function"&&typeof a!="function"?(l=a,a=i):s=i;const u=rf(s),d=l?-1:1;h(t,void 0,[])();function h(m,v,y){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(m.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=Qw,S,k,N;if((!i||u(m,v,y[y.length-1]||void 0))&&(x=m6(a(m,y)),x[0]===$p))return x;if("children"in m&&m.children){const E=m;if(E.children&&x[0]!==h6)for(k=(l?E.children.length:-1)+d,N=y.concat(E);k>-1&&k<E.children.length;){const T=E.children[k];if(S=h(T,k,N)(),S[0]===$p)return S;k=typeof S[1]=="number"?S[1]:k+d}}return x}}}function m6(t){return Array.isArray(t)?t:typeof t=="number"?[f6,t]:t==null?Qw:[t]}function Zg(t,i,a,l){let s,u,d;typeof i=="function"&&typeof a!="function"?(u=void 0,d=i,s=a):(u=i,d=a,s=l),Kw(t,u,h,s);function h(m,v){const y=v[v.length-1],g=y?y.children.indexOf(m):void 0;return d(m,g,y)}}const Yp={}.hasOwnProperty,p6={};function g6(t,i){const a=i||p6,l=new Map,s=new Map,u=new Map,d={...Zz,...a.handlers},h={all:v,applyData:y6,definitionById:l,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:a,patch:v6,wrap:x6};return Zg(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?l:s,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),h;function m(y,g){const b=y.type,x=h.handlers[b];if(Yp.call(h.handlers,b)&&x)return x(h,y,g);if(h.options.passThrough&&h.options.passThrough.includes(b)){if("children"in y){const{children:k,...N}=y,E=_d(N);return E.children=h.all(y),E}return _d(y)}return(h.options.unknownHandler||b6)(h,y,g)}function v(y){const g=[];if("children"in y){const b=y.children;let x=-1;for(;++x<b.length;){const S=h.one(b[x],y);if(S){if(x&&b[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=x1(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=x1(k.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function v6(t,i){t.position&&(i.position=i3(t))}function y6(t,i){let a=i;if(t&&t.data){const l=t.data.hName,s=t.data.hChildren,u=t.data.hProperties;if(typeof l=="string")if(a.type==="element")a.tagName=l;else{const d="children"in a?a.children:[a];a={type:"element",tagName:l,properties:{},children:d}}a.type==="element"&&u&&Object.assign(a.properties,_d(u)),"children"in a&&a.children&&s!==null&&s!==void 0&&(a.children=s)}return a}function b6(t,i){const a=i.data||{},l="value"in i&&!(Yp.call(a,"hProperties")||Yp.call(a,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,l),t.applyData(i,l)}function x6(t,i){const a=[];let l=-1;for(i&&a.push({type:"text",value:`
474
- `});++l<t.length;)l&&a.push({type:"text",value:`
475
- `}),a.push(t[l]);return i&&t.length>0&&a.push({type:"text",value:`
476
- `}),a}function x1(t){let i=0,a=t.charCodeAt(i);for(;a===9||a===32;)i++,a=t.charCodeAt(i);return t.slice(i)}function j1(t,i){const a=g6(t,i),l=a.one(t,void 0),s=l6(a),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
477
- `},s),u}function j6(t,i){return t&&"run"in t?async function(a,l){const s=j1(a,{file:l,...i});await t.run(s,l)}:function(a,l){return j1(a,{file:l,...t||i})}}function S1(t){if(t)throw t}var Qm,w1;function S6(){if(w1)return Qm;w1=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=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=t.call(v,"constructor"),g=v.constructor&&v.constructor.prototype&&t.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!g)return!1;var b;for(b in v);return typeof b>"u"||t.call(v,b)},d=function(v,y){a&&y.name==="__proto__"?a(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},h=function(v,y){if(y==="__proto__")if(t.call(v,y)){if(l)return l(v,y).value}else return;return v[y]};return Qm=function m(){var v,y,g,b,x,S,k=arguments[0],N=1,E=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<E;++N)if(v=arguments[N],v!=null)for(y in v)g=h(k,y),b=h(v,y),k!==b&&(T&&b&&(u(b)||(x=s(b)))?(x?(x=!1,S=g&&s(g)?g:[]):S=g&&u(g)?g:{},d(k,{name:y,newValue:m(T,S,b)})):typeof b<"u"&&d(k,{name:y,newValue:b}));return k},Qm}var w6=S6();const Km=ng(w6);function Gp(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function k6(){const t=[],i={run:a,use:l};return i;function a(...s){let u=-1;const d=s.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);h(null,...s);function h(m,...v){const y=t[++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?C6(y,h)(...v):d(null,...v)}}function l(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),i}}function C6(t,i){let a;return l;function l(...d){const h=t.length>d.length;let m;h&&d.push(s);try{m=t.apply(this,d)}catch(v){const y=v;if(h&&a)throw y;return s(y)}h||(m&&m.then&&typeof m.then=="function"?m.then(u,s):m instanceof Error?s(m):u(m))}function s(d,...h){a||(a=!0,i(d,...h))}function u(d){s(null,d)}}const Ma={basename:N6,dirname:E6,extname:T6,join:A6,sep:"/"};function N6(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Oc(t);let a=0,l=-1,s=t.length,u;if(i===void 0||i.length===0||i.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(u){a=s+1;break}}else l<0&&(u=!0,l=s+1);return l<0?"":t.slice(a,l)}if(i===t)return"";let d=-1,h=i.length-1;for(;s--;)if(t.codePointAt(s)===47){if(u){a=s+1;break}}else d<0&&(u=!0,d=s+1),h>-1&&(t.codePointAt(s)===i.codePointAt(h--)?h<0&&(l=s):(h=-1,l=d));return a===l?l=d:l<0&&(l=t.length),t.slice(a,l)}function E6(t){if(Oc(t),t.length===0)return".";let i=-1,a=t.length,l;for(;--a;)if(t.codePointAt(a)===47){if(l){i=a;break}}else l||(l=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function T6(t){Oc(t);let i=t.length,a=-1,l=0,s=-1,u=0,d;for(;i--;){const h=t.codePointAt(i);if(h===47){if(d){l=i+1;break}continue}a<0&&(d=!0,a=i+1),h===46?s<0?s=i:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||a<0||u===0||u===1&&s===a-1&&s===l+1?"":t.slice(s,a)}function A6(...t){let i=-1,a;for(;++i<t.length;)Oc(t[i]),t[i]&&(a=a===void 0?t[i]:a+"/"+t[i]);return a===void 0?".":M6(a)}function M6(t){Oc(t);const i=t.codePointAt(0)===47;let a=O6(t,!i);return a.length===0&&!i&&(a="."),a.length>0&&t.codePointAt(t.length-1)===47&&(a+="/"),i?"/"+a:a}function O6(t,i){let a="",l=0,s=-1,u=0,d=-1,h,m;for(;++d<=t.length;){if(d<t.length)h=t.codePointAt(d);else{if(h===47)break;h=47}if(h===47){if(!(s===d-1||u===1))if(s!==d-1&&u===2){if(a.length<2||l!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(m=a.lastIndexOf("/"),m!==a.length-1){m<0?(a="",l=0):(a=a.slice(0,m),l=a.length-1-a.lastIndexOf("/")),s=d,u=0;continue}}else if(a.length>0){a="",l=0,s=d,u=0;continue}}i&&(a=a.length>0?a+"/..":"..",l=2)}else a.length>0?a+="/"+t.slice(s+1,d):a=t.slice(s+1,d),l=d-s-1;s=d,u=0}else h===46&&u>-1?u++:u=-1}return a}function Oc(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const _6={cwd:R6};function R6(){return"/"}function Xp(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function D6(t){if(typeof t=="string")t=new URL(t);else if(!Xp(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return z6(t)}function z6(t){if(t.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=t.pathname;let a=-1;for(;++a<i.length;)if(i.codePointAt(a)===37&&i.codePointAt(a+1)===50){const l=i.codePointAt(a+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 Zm=["history","path","basename","stem","extname","dirname"];class Zw{constructor(i){let a;i?Xp(i)?a={path:i}:typeof i=="string"||L6(i)?a={value:i}:a=i:a={},this.cwd="cwd"in a?"":_6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Zm.length;){const u=Zm[l];u in a&&a[u]!==void 0&&a[u]!==null&&(this[u]=u==="history"?[...a[u]]:a[u])}let s;for(s in a)Zm.includes(s)||(this[s]=a[s])}get basename(){return typeof this.path=="string"?Ma.basename(this.path):void 0}set basename(i){Wm(i,"basename"),Jm(i,"basename"),this.path=Ma.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Ma.dirname(this.path):void 0}set dirname(i){k1(this.basename,"dirname"),this.path=Ma.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Ma.extname(this.path):void 0}set extname(i){if(Jm(i,"extname"),k1(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=Ma.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Xp(i)&&(i=D6(i)),Wm(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Ma.basename(this.path,this.extname):void 0}set stem(i){Wm(i,"stem"),Jm(i,"stem"),this.path=Ma.join(this.dirname||"",i+(this.extname||""))}fail(i,a,l){const s=this.message(i,a,l);throw s.fatal=!0,s}info(i,a,l){const s=this.message(i,a,l);return s.fatal=void 0,s}message(i,a,l){const s=new Pn(i,a,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 Jm(t,i){if(t&&t.includes(Ma.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Ma.sep+"`")}function Wm(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function k1(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function L6(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const I6=(function(t){const l=this.constructor.prototype,s=l[t],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,l),u}),B6={}.hasOwnProperty;class Jg extends I6{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=k6()}copy(){const i=new Jg;let a=-1;for(;++a<this.attachers.length;){const l=this.attachers[a];i.use(...l)}return i.data(Km(!0,{},this.namespace)),i}data(i,a){return typeof i=="string"?arguments.length===2?(np("data",this.frozen),this.namespace[i]=a,this):B6.call(this.namespace,i)&&this.namespace[i]||void 0:i?(np("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[a,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const s=a.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 a=cd(i),l=this.parser||this.Parser;return ep("parse",l),l(String(a),a)}process(i,a){const l=this;return this.freeze(),ep("process",this.parser||this.Parser),tp("process",this.compiler||this.Compiler),a?s(void 0,a):new Promise(s);function s(u,d){const h=cd(i),m=l.parse(h);l.run(m,h,function(y,g,b){if(y||!g||!b)return v(y);const x=g,S=l.stringify(x,b);U6(S)?b.value=S:b.result=S,v(y,b)});function v(y,g){y||!g?d(y):u?u(g):a(void 0,g)}}}processSync(i){let a=!1,l;return this.freeze(),ep("processSync",this.parser||this.Parser),tp("processSync",this.compiler||this.Compiler),this.process(i,s),N1("processSync","process",a),l;function s(u,d){a=!0,S1(u),l=d}}run(i,a,l){C1(i),this.freeze();const s=this.transformers;return!l&&typeof a=="function"&&(l=a,a=void 0),l?u(void 0,l):new Promise(u);function u(d,h){const m=cd(a);s.run(i,m,v);function v(y,g,b){const x=g||i;y?h(y):d?d(x):l(void 0,x,b)}}}runSync(i,a){let l=!1,s;return this.run(i,a,u),N1("runSync","run",l),s;function u(d,h){S1(d),s=h,l=!0}}stringify(i,a){this.freeze();const l=cd(a),s=this.compiler||this.Compiler;return tp("stringify",s),C1(i),s(i,l)}use(i,...a){const l=this.attachers,s=this.namespace;if(np("use",this.frozen),i!=null)if(typeof i=="function")m(i,a);else if(typeof i=="object")Array.isArray(i)?h(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");h(v.plugins),v.settings&&(s.settings=Km(!0,s.settings,v.settings))}function h(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,b=-1;for(;++g<l.length;)if(l[g][0]===v){b=g;break}if(b===-1)l.push([v,...y]);else if(y.length>0){let[x,...S]=y;const k=l[b][1];Gp(k)&&Gp(x)&&(x=Km(!0,k,x)),l[b]=[v,x,...S]}}}}const P6=new Jg().freeze();function ep(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function tp(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function np(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function C1(t){if(!Gp(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function N1(t,i,a){if(!a)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function cd(t){return H6(t)?t:new Zw(t)}function H6(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function U6(t){return typeof t=="string"||q6(t)}function q6(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const F6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",E1=[],T1={allowDangerousHtml:!0},V6=/^(https?|ircs?|mailto|xmpp)$/i,$6=[{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 Y6(t){const i=G6(t),a=X6(t);return Q6(i.runSync(i.parse(a),a),t)}function G6(t){const i=t.rehypePlugins||E1,a=t.remarkPlugins||E1,l=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...T1}:T1;return P6().use(Cz).use(a).use(j6,l).use(i)}function X6(t){const i=t.children||"",a=new Zw;return typeof i=="string"&&(a.value=i),a}function Q6(t,i){const a=i.allowedElements,l=i.allowElement,s=i.components,u=i.disallowedElements,d=i.skipHtml,h=i.unwrapDisallowed,m=i.urlTransform||K6;for(const y of $6)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+F6+y.id,void 0);return Zg(t,v),s3(t,{Fragment:c.Fragment,components:s,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function v(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return d?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let x;for(x in Ym)if(Object.hasOwn(Ym,x)&&Object.hasOwn(y.properties,x)){const S=y.properties[x],k=Ym[x];(k===null||k.includes(y.tagName))&&(y.properties[x]=m(String(S||""),x,y))}}if(y.type==="element"){let x=a?!a.includes(y.tagName):u?u.includes(y.tagName):!1;if(!x&&l&&typeof g=="number"&&(x=!l(y,g,b)),x&&b&&typeof g=="number")return h&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function K6(t){const i=t.indexOf(":"),a=t.indexOf("?"),l=t.indexOf("#"),s=t.indexOf("/");return i===-1||s!==-1&&i>s||a!==-1&&i>a||l!==-1&&i>l||V6.test(t.slice(0,i))?t:""}function Z6(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Jw(t,i,a){const s=rf((a||{}).ignore||[]),u=J6(i);let d=-1;for(;++d<u.length;)Kw(t,"text",h);function h(v,y){let g=-1,b;for(;++g<y.length;){const x=y[g],S=b?b.children:void 0;if(s(x,S?S.indexOf(x):void 0,b))return;b=x}if(b)return m(v,y)}function m(v,y){const g=y[y.length-1],b=u[d][0],x=u[d][1];let S=0;const N=g.children.indexOf(v);let E=!1,T=[];b.lastIndex=0;let A=b.exec(v.value);for(;A;){const M=A.index,I={index:A.index,input:A.input,stack:[...y,v]};let O=x(...A,I);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?b.lastIndex=M+1:(S!==M&&T.push({type:"text",value:v.value.slice(S,M)}),Array.isArray(O)?T.push(...O):O&&T.push(O),S=M+A[0].length,E=!0),!b.global)break;A=b.exec(v.value)}return E?(S<v.value.length&&T.push({type:"text",value:v.value.slice(S)}),g.children.splice(N,1,...T)):T=[v],N+T.length}}function J6(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!t[0]||Array.isArray(t[0])?t:[t];let l=-1;for(;++l<a.length;){const s=a[l];i.push([W6(s[0]),e5(s[1])])}return i}function W6(t){return typeof t=="string"?new RegExp(Z6(t),"g"):t}function e5(t){return typeof t=="function"?t:function(){return t}}function t5(t){Jw(t,[/\r?\n|\r/g,n5])}function n5(){return{type:"break"}}function i5(){return function(t){t5(t)}}function A1(t,i){const a=String(t);if(typeof i!="string")throw new TypeError("Expected character");let l=0,s=a.indexOf(i);for(;s!==-1;)l++,s=a.indexOf(i,s+i.length);return l}const ip="phrasing",ap=["autolink","link","image","label"];function a5(){return{transforms:[d5],enter:{literalAutolink:l5,literalAutolinkEmail:rp,literalAutolinkHttp:rp,literalAutolinkWww:rp},exit:{literalAutolink:u5,literalAutolinkEmail:c5,literalAutolinkHttp:o5,literalAutolinkWww:s5}}}function r5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ip,notInConstruct:ap},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ip,notInConstruct:ap},{character:":",before:"[ps]",after:"\\/",inConstruct:ip,notInConstruct:ap}]}}function l5(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function rp(t){this.config.enter.autolinkProtocol.call(this,t)}function o5(t){this.config.exit.autolinkProtocol.call(this,t)}function s5(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function c5(t){this.config.exit.autolinkEmail.call(this,t)}function u5(t){this.exit(t)}function d5(t){Jw(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,f5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),h5]],{ignore:["link","linkReference"]})}function f5(t,i,a,l,s){let u="";if(!Ww(s)||(/^w/i.test(i)&&(a=i+a,i="",u="http://"),!m5(a)))return!1;const d=p5(a+l);if(!d[0])return!1;const h={type:"link",title:null,url:u+i+d[0],children:[{type:"text",value:i+d[0]}]};return d[1]?[h,{type:"text",value:d[1]}]:h}function h5(t,i,a,l){return!Ww(l,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+a,children:[{type:"text",value:i+"@"+a}]}}function m5(t){const i=t.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 p5(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let a=i[0],l=a.indexOf(")");const s=A1(t,"(");let u=A1(t,")");for(;l!==-1&&s>u;)t+=a.slice(0,l+1),a=a.slice(l+1),l=a.indexOf(")"),u++;return[t,a]}function Ww(t,i){const a=t.input.charCodeAt(t.index-1);return(t.index===0||Gl(a)||tf(a))&&(!i||a!==47)}ek.peek=k5;function g5(){this.buffer()}function v5(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function y5(){this.buffer()}function b5(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function x5(t){const i=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=aa(this.sliceSerialize(t)).toLowerCase(),a.label=i}function j5(t){this.exit(t)}function S5(t){const i=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=aa(this.sliceSerialize(t)).toLowerCase(),a.label=i}function w5(t){this.exit(t)}function k5(){return"["}function ek(t,i,a,l){const s=a.createTracker(l);let u=s.move("[^");const d=a.enter("footnoteReference"),h=a.enter("reference");return u+=s.move(a.safe(a.associationId(t),{after:"]",before:u})),h(),d(),u+=s.move("]"),u}function C5(){return{enter:{gfmFootnoteCallString:g5,gfmFootnoteCall:v5,gfmFootnoteDefinitionLabelString:y5,gfmFootnoteDefinition:b5},exit:{gfmFootnoteCallString:x5,gfmFootnoteCall:j5,gfmFootnoteDefinitionLabelString:S5,gfmFootnoteDefinition:w5}}}function N5(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:a,footnoteReference:ek},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(l,s,u,d){const h=u.createTracker(d);let m=h.move("[^");const v=u.enter("footnoteDefinition"),y=u.enter("label");return m+=h.move(u.safe(u.associationId(l),{before:m,after:"]"})),y(),m+=h.move("]:"),l.children&&l.children.length>0&&(h.shift(4),m+=h.move((i?`
478
- `:" ")+u.indentLines(u.containerFlow(l,h.current()),i?tk:E5))),v(),m}}function E5(t,i,a){return i===0?t:tk(t,i,a)}function tk(t,i,a){return(a?"":" ")+t}const T5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nk.peek=R5;function A5(){return{canContainEols:["delete"],enter:{strikethrough:O5},exit:{strikethrough:_5}}}function M5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:T5}],handlers:{delete:nk}}}function O5(t){this.enter({type:"delete",children:[]},t)}function _5(t){this.exit(t)}function nk(t,i,a,l){const s=a.createTracker(l),u=a.enter("strikethrough");let d=s.move("~~");return d+=a.containerPhrasing(t,{...s.current(),before:d,after:"~"}),d+=s.move("~~"),u(),d}function R5(){return"~"}function D5(t){return t.length}function z5(t,i){const a=i||{},l=(a.align||[]).concat(),s=a.stringLength||D5,u=[],d=[],h=[],m=[];let v=0,y=-1;for(;++y<t.length;){const k=[],N=[];let E=-1;for(t[y].length>v&&(v=t[y].length);++E<t[y].length;){const T=L5(t[y][E]);if(a.alignDelimiters!==!1){const A=s(T);N[E]=A,(m[E]===void 0||A>m[E])&&(m[E]=A)}k.push(T)}d[y]=k,h[y]=N}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<v;)u[g]=M1(l[g]);else{const k=M1(l);for(;++g<v;)u[g]=k}g=-1;const b=[],x=[];for(;++g<v;){const k=u[g];let N="",E="";k===99?(N=":",E=":"):k===108?N=":":k===114&&(E=":");let T=a.alignDelimiters===!1?1:Math.max(1,m[g]-N.length-E.length);const A=N+"-".repeat(T)+E;a.alignDelimiters!==!1&&(T=N.length+T+E.length,T>m[g]&&(m[g]=T),x[g]=T),b[g]=A}d.splice(1,0,b),h.splice(1,0,x),y=-1;const S=[];for(;++y<d.length;){const k=d[y],N=h[y];g=-1;const E=[];for(;++g<v;){const T=k[g]||"";let A="",M="";if(a.alignDelimiters!==!1){const I=m[g]-(N[g]||0),O=u[g];O===114?A=" ".repeat(I):O===99?I%2?(A=" ".repeat(I/2+.5),M=" ".repeat(I/2-.5)):(A=" ".repeat(I/2),M=A):M=" ".repeat(I)}a.delimiterStart!==!1&&!g&&E.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&T==="")&&(a.delimiterStart!==!1||g)&&E.push(" "),a.alignDelimiters!==!1&&E.push(A),E.push(T),a.alignDelimiters!==!1&&E.push(M),a.padding!==!1&&E.push(" "),(a.delimiterEnd!==!1||g!==v-1)&&E.push("|")}S.push(a.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
479
- `)}function L5(t){return t==null?"":String(t)}function M1(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function I5(t,i,a,l){const s=a.enter("blockquote"),u=a.createTracker(l);u.move("> "),u.shift(2);const d=a.indentLines(a.containerFlow(t,u.current()),B5);return s(),d}function B5(t,i,a){return">"+(a?"":" ")+t}function P5(t,i){return O1(t,i.inConstruct,!0)&&!O1(t,i.notInConstruct,!1)}function O1(t,i,a){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return a;let l=-1;for(;++l<i.length;)if(t.includes(i[l]))return!0;return!1}function _1(t,i,a,l){let s=-1;for(;++s<a.unsafe.length;)if(a.unsafe[s].character===`
480
- `&&P5(a.stack,a.unsafe[s]))return/[ \t]/.test(l.before)?"":" ";return`\\
481
- `}function H5(t,i){const a=String(t);let l=a.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=a.indexOf(i,s);return d}function U5(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function q5(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function F5(t,i,a,l){const s=q5(a),u=t.value||"",d=s==="`"?"GraveAccent":"Tilde";if(U5(t,a)){const g=a.enter("codeIndented"),b=a.indentLines(u,V5);return g(),b}const h=a.createTracker(l),m=s.repeat(Math.max(H5(u,s)+1,3)),v=a.enter("codeFenced");let y=h.move(m);if(t.lang){const g=a.enter(`codeFencedLang${d}`);y+=h.move(a.safe(t.lang,{before:y,after:" ",encode:["`"],...h.current()})),g()}if(t.lang&&t.meta){const g=a.enter(`codeFencedMeta${d}`);y+=h.move(" "),y+=h.move(a.safe(t.meta,{before:y,after:`
482
- `,encode:["`"],...h.current()})),g()}return y+=h.move(`
483
- `),u&&(y+=h.move(u+`
484
- `)),y+=h.move(m),v(),y}function V5(t,i,a){return(a?"":" ")+t}function Wg(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function $5(t,i,a,l){const s=Wg(a),u=s==='"'?"Quote":"Apostrophe",d=a.enter("definition");let h=a.enter("label");const m=a.createTracker(l);let v=m.move("[");return v+=m.move(a.safe(a.associationId(t),{before:v,after:"]",...m.current()})),v+=m.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=a.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(a.safe(t.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(h=a.enter("destinationRaw"),v+=m.move(a.safe(t.url,{before:v,after:t.title?" ":`
485
- `,...m.current()}))),h(),t.title&&(h=a.enter(`title${u}`),v+=m.move(" "+s),v+=m.move(a.safe(t.title,{before:v,after:s,...m.current()})),v+=m.move(s),h()),d(),v}function Y5(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function bc(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Rd(t,i,a){const l=ts(t),s=ts(i);return l===void 0?s===void 0?a==="_"?{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}}ik.peek=G5;function ik(t,i,a,l){const s=Y5(a),u=a.enter("emphasis"),d=a.createTracker(l),h=d.move(s);let m=d.move(a.containerPhrasing(t,{after:s,before:h,...d.current()}));const v=m.charCodeAt(0),y=Rd(l.before.charCodeAt(l.before.length-1),v,s);y.inside&&(m=bc(v)+m.slice(1));const g=m.charCodeAt(m.length-1),b=Rd(l.after.charCodeAt(0),g,s);b.inside&&(m=m.slice(0,-1)+bc(g));const x=d.move(s);return u(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},h+m+x}function G5(t,i,a){return a.options.emphasis||"*"}function X5(t,i){let a=!1;return Zg(t,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return a=!0,$p}),!!((!t.depth||t.depth<3)&&Vg(t)&&(i.options.setext||a))}function Q5(t,i,a,l){const s=Math.max(Math.min(6,t.depth||1),1),u=a.createTracker(l);if(X5(t,a)){const y=a.enter("headingSetext"),g=a.enter("phrasing"),b=a.containerPhrasing(t,{...u.current(),before:`
486
- `,after:`
487
- `});return g(),y(),b+`
488
- `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
489
- `))+1))}const d="#".repeat(s),h=a.enter("headingAtx"),m=a.enter("phrasing");u.move(d+" ");let v=a.containerPhrasing(t,{before:"# ",after:`
490
- `,...u.current()});return/^[\t ]/.test(v)&&(v=bc(v.charCodeAt(0))+v.slice(1)),v=v?d+" "+v:d,a.options.closeAtx&&(v+=" "+d),m(),h(),v}ak.peek=K5;function ak(t){return t.value||""}function K5(){return"<"}rk.peek=Z5;function rk(t,i,a,l){const s=Wg(a),u=s==='"'?"Quote":"Apostrophe",d=a.enter("image");let h=a.enter("label");const m=a.createTracker(l);let v=m.move("![");return v+=m.move(a.safe(t.alt,{before:v,after:"]",...m.current()})),v+=m.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=a.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(a.safe(t.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(h=a.enter("destinationRaw"),v+=m.move(a.safe(t.url,{before:v,after:t.title?" ":")",...m.current()}))),h(),t.title&&(h=a.enter(`title${u}`),v+=m.move(" "+s),v+=m.move(a.safe(t.title,{before:v,after:s,...m.current()})),v+=m.move(s),h()),v+=m.move(")"),d(),v}function Z5(){return"!"}lk.peek=J5;function lk(t,i,a,l){const s=t.referenceType,u=a.enter("imageReference");let d=a.enter("label");const h=a.createTracker(l);let m=h.move("![");const v=a.safe(t.alt,{before:m,after:"]",...h.current()});m+=h.move(v+"]["),d();const y=a.stack;a.stack=[],d=a.enter("reference");const g=a.safe(a.associationId(t),{before:m,after:"]",...h.current()});return d(),a.stack=y,u(),s==="full"||!v||v!==g?m+=h.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function J5(){return"!"}ok.peek=W5;function ok(t,i,a){let l=t.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<a.unsafe.length;){const d=a.unsafe[u],h=a.compilePattern(d);let m;if(d.atBreak)for(;m=h.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 W5(){return"`"}function sk(t,i){const a=Vg(t);return!!(!i.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(a===t.url||"mailto:"+a===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}ck.peek=eL;function ck(t,i,a,l){const s=Wg(a),u=s==='"'?"Quote":"Apostrophe",d=a.createTracker(l);let h,m;if(sk(t,a)){const y=a.stack;a.stack=[],h=a.enter("autolink");let g=d.move("<");return g+=d.move(a.containerPhrasing(t,{before:g,after:">",...d.current()})),g+=d.move(">"),h(),a.stack=y,g}h=a.enter("link"),m=a.enter("label");let v=d.move("[");return v+=d.move(a.containerPhrasing(t,{before:v,after:"](",...d.current()})),v+=d.move("]("),m(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(m=a.enter("destinationLiteral"),v+=d.move("<"),v+=d.move(a.safe(t.url,{before:v,after:">",...d.current()})),v+=d.move(">")):(m=a.enter("destinationRaw"),v+=d.move(a.safe(t.url,{before:v,after:t.title?" ":")",...d.current()}))),m(),t.title&&(m=a.enter(`title${u}`),v+=d.move(" "+s),v+=d.move(a.safe(t.title,{before:v,after:s,...d.current()})),v+=d.move(s),m()),v+=d.move(")"),h(),v}function eL(t,i,a){return sk(t,a)?"<":"["}uk.peek=tL;function uk(t,i,a,l){const s=t.referenceType,u=a.enter("linkReference");let d=a.enter("label");const h=a.createTracker(l);let m=h.move("[");const v=a.containerPhrasing(t,{before:m,after:"]",...h.current()});m+=h.move(v+"]["),d();const y=a.stack;a.stack=[],d=a.enter("reference");const g=a.safe(a.associationId(t),{before:m,after:"]",...h.current()});return d(),a.stack=y,u(),s==="full"||!v||v!==g?m+=h.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function tL(){return"["}function ev(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function nL(t){const i=ev(t),a=t.options.bulletOther;if(!a)return i==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+a+"`) to be different");return a}function iL(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function dk(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function aL(t,i,a,l){const s=a.enter("list"),u=a.bulletCurrent;let d=t.ordered?iL(a):ev(a);const h=t.ordered?d==="."?")":".":nL(a);let m=i&&a.bulletLastUsed?d===a.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((d==="*"||d==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(m=!0),dk(a)===d&&y){let g=-1;for(;++g<t.children.length;){const b=t.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(d=h),a.bulletCurrent=d;const v=a.containerFlow(t,l);return a.bulletLastUsed=d,a.bulletCurrent=u,s(),v}function rL(t){const i=t.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 lL(t,i,a,l){const s=rL(a);let u=a.bulletCurrent||ev(a);i&&i.type==="list"&&i.ordered&&(u=(typeof i.start=="number"&&i.start>-1?i.start:1)+(a.options.incrementListMarker===!1?0:i.children.indexOf(t))+u);let d=u.length+1;(s==="tab"||s==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(d=Math.ceil(d/4)*4);const h=a.createTracker(l);h.move(u+" ".repeat(d-u.length)),h.shift(d);const m=a.enter("listItem"),v=a.indentLines(a.containerFlow(t,h.current()),y);return m(),v;function y(g,b,x){return b?(x?"":" ".repeat(d))+g:(x?u:u+" ".repeat(d-u.length))+g}}function oL(t,i,a,l){const s=a.enter("paragraph"),u=a.enter("phrasing"),d=a.containerPhrasing(t,l);return u(),s(),d}const sL=rf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function cL(t,i,a,l){return(t.children.some(function(d){return sL(d)})?a.containerPhrasing:a.containerFlow).call(a,t,l)}function uL(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}fk.peek=dL;function fk(t,i,a,l){const s=uL(a),u=a.enter("strong"),d=a.createTracker(l),h=d.move(s+s);let m=d.move(a.containerPhrasing(t,{after:s,before:h,...d.current()}));const v=m.charCodeAt(0),y=Rd(l.before.charCodeAt(l.before.length-1),v,s);y.inside&&(m=bc(v)+m.slice(1));const g=m.charCodeAt(m.length-1),b=Rd(l.after.charCodeAt(0),g,s);b.inside&&(m=m.slice(0,-1)+bc(g));const x=d.move(s+s);return u(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},h+m+x}function dL(t,i,a){return a.options.strong||"*"}function fL(t,i,a,l){return a.safe(t.value,l)}function hL(t){const i=t.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 mL(t,i,a){const l=(dk(a)+(a.options.ruleSpaces?" ":"")).repeat(hL(a));return a.options.ruleSpaces?l.slice(0,-1):l}const hk={blockquote:I5,break:_1,code:F5,definition:$5,emphasis:ik,hardBreak:_1,heading:Q5,html:ak,image:rk,imageReference:lk,inlineCode:ok,link:ck,linkReference:uk,list:aL,listItem:lL,paragraph:oL,root:cL,strong:fk,text:fL,thematicBreak:mL};function pL(){return{enter:{table:gL,tableData:R1,tableHeader:R1,tableRow:yL},exit:{codeText:bL,table:vL,tableData:lp,tableHeader:lp,tableRow:lp}}}function gL(t){const i=t._align;this.enter({type:"table",align:i.map(function(a){return a==="none"?null:a}),children:[]},t),this.data.inTable=!0}function vL(t){this.exit(t),this.data.inTable=void 0}function yL(t){this.enter({type:"tableRow",children:[]},t)}function lp(t){this.exit(t)}function R1(t){this.enter({type:"tableCell",children:[]},t)}function bL(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,xL));const a=this.stack[this.stack.length-1];a.type,a.value=i,this.exit(t)}function xL(t,i){return i==="|"?i:t}function jL(t){const i=t||{},a=i.tableCellPadding,l=i.tablePipeAlign,s=i.stringLength,u=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
491
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:d,tableCell:m,tableRow:h}};function d(x,S,k,N){return v(y(x,k,N),x.align)}function h(x,S,k,N){const E=g(x,k,N),T=v([E]);return T.slice(0,T.indexOf(`
492
- `))}function m(x,S,k,N){const E=k.enter("tableCell"),T=k.enter("phrasing"),A=k.containerPhrasing(x,{...N,before:u,after:u});return T(),E(),A}function v(x,S){return z5(x,{align:S,alignDelimiters:l,padding:a,stringLength:s})}function y(x,S,k){const N=x.children;let E=-1;const T=[],A=S.enter("table");for(;++E<N.length;)T[E]=g(N[E],S,k);return A(),T}function g(x,S,k){const N=x.children;let E=-1;const T=[],A=S.enter("tableRow");for(;++E<N.length;)T[E]=m(N[E],x,S,k);return A(),T}function b(x,S,k){let N=hk.inlineCode(x,S,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function SL(){return{exit:{taskListCheckValueChecked:D1,taskListCheckValueUnchecked:D1,paragraph:kL}}}function wL(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CL}}}function D1(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function kL(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const l=a.children[0];if(l&&l.type==="text"){const s=i.children;let u=-1,d;for(;++u<s.length;){const h=s[u];if(h.type==="paragraph"){d=h;break}}d===a&&(l.value=l.value.slice(1),l.value.length===0?a.children.shift():a.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,a.position.start=Object.assign({},l.position.start)))}}this.exit(t)}function CL(t,i,a,l){const s=t.children[0],u=typeof t.checked=="boolean"&&s&&s.type==="paragraph",d="["+(t.checked?"x":" ")+"] ",h=a.createTracker(l);u&&h.move(d);let m=hk.listItem(t,i,a,{...l,...h.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,v)),m;function v(y){return y+d}}function NL(){return[a5(),C5(),A5(),pL(),SL()]}function EL(t){return{extensions:[r5(),N5(t),M5(),jL(t),wL()]}}const TL={tokenize:DL,partial:!0},mk={tokenize:zL,partial:!0},pk={tokenize:LL,partial:!0},gk={tokenize:IL,partial:!0},AL={tokenize:BL,partial:!0},vk={name:"wwwAutolink",tokenize:_L,previous:bk},yk={name:"protocolAutolink",tokenize:RL,previous:xk},mr={name:"emailAutolink",tokenize:OL,previous:jk},qa={};function ML(){return{text:qa}}let Ll=48;for(;Ll<123;)qa[Ll]=mr,Ll++,Ll===58?Ll=65:Ll===91&&(Ll=97);qa[43]=mr;qa[45]=mr;qa[46]=mr;qa[95]=mr;qa[72]=[mr,yk];qa[104]=[mr,yk];qa[87]=[mr,vk];qa[119]=[mr,vk];function OL(t,i,a){const l=this;let s,u;return d;function d(g){return!Qp(g)||!jk.call(l,l.previous)||tv(l.events)?a(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(g))}function h(g){return Qp(g)?(t.consume(g),h):g===64?(t.consume(g),m):a(g)}function m(g){return g===46?t.check(AL,y,v)(g):g===45||g===95||Bn(g)?(u=!0,t.consume(g),m):y(g)}function v(g){return t.consume(g),s=!0,m}function y(g){return u&&s&&Xn(l.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(g)):a(g)}}function _L(t,i,a){const l=this;return s;function s(d){return d!==87&&d!==119||!bk.call(l,l.previous)||tv(l.events)?a(d):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(TL,t.attempt(mk,t.attempt(pk,u),a),a)(d))}function u(d){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(d)}}function RL(t,i,a){const l=this;let s="",u=!1;return d;function d(g){return(g===72||g===104)&&xk.call(l,l.previous)&&!tv(l.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),t.consume(g),h):a(g)}function h(g){if(Xn(g)&&s.length<5)return s+=String.fromCodePoint(g),t.consume(g),h;if(g===58){const b=s.toLowerCase();if(b==="http"||b==="https")return t.consume(g),m}return a(g)}function m(g){return g===47?(t.consume(g),u?v:(u=!0,m)):a(g)}function v(g){return g===null||Md(g)||Nt(g)||Gl(g)||tf(g)?a(g):t.attempt(mk,t.attempt(pk,y),a)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(g)}}function DL(t,i,a){let l=0;return s;function s(d){return(d===87||d===119)&&l<3?(l++,t.consume(d),s):d===46&&l===3?(t.consume(d),u):a(d)}function u(d){return d===null?a(d):i(d)}}function zL(t,i,a){let l,s,u;return d;function d(v){return v===46||v===95?t.check(gk,m,h)(v):v===null||Nt(v)||Gl(v)||v!==45&&tf(v)?m(v):(u=!0,t.consume(v),d)}function h(v){return v===95?l=!0:(s=l,l=void 0),t.consume(v),d}function m(v){return s||l||!u?a(v):i(v)}}function LL(t,i){let a=0,l=0;return s;function s(d){return d===40?(a++,t.consume(d),s):d===41&&l<a?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?t.check(gk,i,u)(d):d===null||Nt(d)||Gl(d)?i(d):(t.consume(d),s)}function u(d){return d===41&&l++,t.consume(d),s}}function IL(t,i,a){return l;function l(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),l):h===38?(t.consume(h),u):h===93?(t.consume(h),s):h===60||h===null||Nt(h)||Gl(h)?i(h):a(h)}function s(h){return h===null||h===40||h===91||Nt(h)||Gl(h)?i(h):l(h)}function u(h){return Xn(h)?d(h):a(h)}function d(h){return h===59?(t.consume(h),l):Xn(h)?(t.consume(h),d):a(h)}}function BL(t,i,a){return l;function l(u){return t.consume(u),s}function s(u){return Bn(u)?a(u):i(u)}}function bk(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Nt(t)}function xk(t){return!Xn(t)}function jk(t){return!(t===47||Qp(t))}function Qp(t){return t===43||t===45||t===46||t===95||Bn(t)}function tv(t){let i=t.length,a=!1;for(;i--;){const l=t[i][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){a=!0;break}if(l._gfmAutolinkLiteralWalkedInto){a=!1;break}}return t.length>0&&!a&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const PL={tokenize:GL,partial:!0};function HL(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VL,continuation:{tokenize:$L},exit:YL}},text:{91:{name:"gfmFootnoteCall",tokenize:FL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:UL,resolveTo:qL}}}}function UL(t,i,a){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 h;function h(m){if(!d||!d._balanced)return a(m);const v=aa(l.sliceSerialize({start:d.end,end:l.now()}));return v.codePointAt(0)!==94||!u.includes(v.slice(1))?a(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),i(m))}}function qL(t,i){let a=t.length;for(;a--;)if(t[a][1].type==="labelImage"&&t[a][0]==="enter"){t[a][1];break}t[a+1][1].type="data",t[a+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},t[a+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[a+3][1].end),end:Object.assign({},t[a+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},h=[t[a+1],t[a+2],["enter",l,i],t[a+3],t[a+4],["enter",s,i],["exit",s,i],["enter",u,i],["enter",d,i],["exit",d,i],["exit",u,i],t[t.length-2],t[t.length-1],["exit",l,i]];return t.splice(a,t.length-a+1,...h),t}function FL(t,i,a){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u=0,d;return h;function h(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?a(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",v)}function v(g){if(u>999||g===93&&!d||g===null||g===91||Nt(g))return a(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return s.includes(aa(l.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):a(g)}return Nt(g)||(d=!0),u++,t.consume(g),g===92?y:v}function y(g){return g===91||g===92||g===93?(t.consume(g),u++,v):v(g)}}function VL(t,i,a){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u,d=0,h;return m;function m(S){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(S),t.exit("gfmFootnoteDefinitionLabelMarker"),v}function v(S){return S===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(S),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):a(S)}function y(S){if(d>999||S===93&&!h||S===null||S===91||Nt(S))return a(S);if(S===93){t.exit("chunkString");const k=t.exit("gfmFootnoteDefinitionLabelString");return u=aa(l.sliceSerialize(k)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(S),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return Nt(S)||(h=!0),d++,t.consume(S),S===92?g:y}function g(S){return S===91||S===92||S===93?(t.consume(S),d++,y):y(S)}function b(S){return S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),s.includes(u)||s.push(u),ft(t,x,"gfmFootnoteDefinitionWhitespace")):a(S)}function x(S){return i(S)}}function $L(t,i,a){return t.check(Mc,i,t.attempt(PL,i,a))}function YL(t){t.exit("gfmFootnoteDefinition")}function GL(t,i,a){const l=this;return ft(t,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):a(u)}}function XL(t){let a=(t||{}).singleTilde;const l={name:"strikethrough",tokenize:u,resolveAll:s};return a==null&&(a=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function s(d,h){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)},b=[["enter",y,h],["enter",d[v][1],h],["exit",d[v][1],h],["enter",g,h]],x=h.parser.constructs.insideSpan.null;x&&Mi(b,b.length,0,nf(x,d.slice(v+1,m),h)),Mi(b,b.length,0,[["exit",g,h],["enter",d[m][1],h],["exit",d[m][1],h],["exit",y,h]]),Mi(d,v-1,m-v+3,b),m=v+b.length-2;break}}for(m=-1;++m<d.length;)d[m][1].type==="strikethroughSequenceTemporary"&&(d[m][1].type="data");return d}function u(d,h,m){const v=this.previous,y=this.events;let g=0;return b;function b(S){return v===126&&y[y.length-1][1].type!=="characterEscape"?m(S):(d.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const k=ts(v);if(S===126)return g>1?m(S):(d.consume(S),g++,x);if(g<2&&!a)return m(S);const N=d.exit("strikethroughSequenceTemporary"),E=ts(S);return N._open=!E||E===2&&!!k,N._close=!k||k===2&&!!E,h(S)}}}class QL{constructor(){this.map=[],this.index=new Map}add(i,a,l){KL(this,i,a,l)}consume(i){if(this.map.sort(function(u,d){return u[0]-d[0]}),this.map.length===0)return;let a=this.map.length;const l=[];for(;a>0;)a-=1,l.push(i.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),i.length=this.map[a][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 KL(t,i,a,l){if(a===0&&l.length===0)return;const s=t.index.get(i);if(s){s[1]+=a,s[2].push(...l);return}const u=[i,a,l];t.map.push(u),t.index.set(i,u)}function ZL(t,i){let a=!1;const l=[];for(;i<t.length;){const s=t[i];if(a){if(s[0]==="enter")s[1].type==="tableContent"&&l.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[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"&&(a=!0);i+=1}return l}function JL(){return{flow:{null:{name:"table",tokenize:WL,resolveAll:eI}}}}function WL(t,i,a){const l=this;let s=0,u=0,d;return h;function h(L){let Y=l.events.length-1;for(;Y>-1;){const{type:Z}=l.events[Y][1];if(Z==="lineEnding"||Z==="linePrefix")Y--;else break}const X=Y>-1?l.events[Y][1].type:null,ue=X==="tableHead"||X==="tableRow"?O:m;return ue===O&&l.parser.lazy[l.now().line]?a(L):ue(L)}function m(L){return t.enter("tableHead"),t.enter("tableRow"),v(L)}function v(L){return L===124||(d=!0,u+=1),y(L)}function y(L){return L===null?a(L):He(L)?u>1?(u=0,l.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),x):a(L):it(L)?ft(t,y,"whitespace")(L):(u+=1,d&&(d=!1,s+=1),L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),d=!0,y):(t.enter("data"),g(L)))}function g(L){return L===null||L===124||Nt(L)?(t.exit("data"),y(L)):(t.consume(L),L===92?b:g)}function b(L){return L===92||L===124?(t.consume(L),g):g(L)}function x(L){return l.interrupt=!1,l.parser.lazy[l.now().line]?a(L):(t.enter("tableDelimiterRow"),d=!1,it(L)?ft(t,S,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):S(L))}function S(L){return L===45||L===58?N(L):L===124?(d=!0,t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),k):I(L)}function k(L){return it(L)?ft(t,N,"whitespace")(L):N(L)}function N(L){return L===58?(u+=1,d=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),E):L===45?(u+=1,E(L)):L===null||He(L)?M(L):I(L)}function E(L){return L===45?(t.enter("tableDelimiterFiller"),T(L)):I(L)}function T(L){return L===45?(t.consume(L),T):L===58?(d=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),A):(t.exit("tableDelimiterFiller"),A(L))}function A(L){return it(L)?ft(t,M,"whitespace")(L):M(L)}function M(L){return L===124?S(L):L===null||He(L)?!d||s!==u?I(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(L)):I(L)}function I(L){return a(L)}function O(L){return t.enter("tableRow"),B(L)}function B(L){return L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),B):L===null||He(L)?(t.exit("tableRow"),i(L)):it(L)?ft(t,B,"whitespace")(L):(t.enter("data"),q(L))}function q(L){return L===null||L===124||Nt(L)?(t.exit("data"),B(L)):(t.consume(L),L===92?$:q)}function $(L){return L===92||L===124?(t.consume(L),q):q(L)}}function eI(t,i){let a=-1,l=!0,s=0,u=[0,0,0,0],d=[0,0,0,0],h=!1,m=0,v,y,g;const b=new QL;for(;++a<t.length;){const x=t[a],S=x[1];x[0]==="enter"?S.type==="tableHead"?(h=!1,m!==0&&(z1(b,i,m,v,y),y=void 0,m=0),v={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",v,i]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(l=!0,g=void 0,u=[0,0,0,0],d=[0,a+1,0,0],h&&(h=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",y,i]])),s=S.type==="tableDelimiterRow"?2:y?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(l=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],g=ud(b,i,u,s,void 0,g),u=[0,0,0,0]),d[2]=a)):S.type==="tableCellDivider"&&(l?l=!1:(u[1]!==0&&(d[0]=d[1],g=ud(b,i,u,s,void 0,g)),u=d,d=[u[1],a,0,0])):S.type==="tableHead"?(h=!0,m=a):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=a,u[1]!==0?(d[0]=d[1],g=ud(b,i,u,s,a,g)):d[1]!==0&&(g=ud(b,i,d,s,a,g)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(d[3]=a)}for(m!==0&&z1(b,i,m,v,y),b.consume(i.events),a=-1;++a<i.events.length;){const x=i.events[a];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=ZL(i.events,a))}return t}function ud(t,i,a,l,s,u){const d=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",h="tableContent";a[0]!==0&&(u.end=Object.assign({},Xo(i.events,a[0])),t.add(a[0],0,[["exit",u,i]]));const m=Xo(i.events,a[1]);if(u={type:d,start:Object.assign({},m),end:Object.assign({},m)},t.add(a[1],0,[["enter",u,i]]),a[2]!==0){const v=Xo(i.events,a[2]),y=Xo(i.events,a[3]),g={type:h,start:Object.assign({},v),end:Object.assign({},y)};if(t.add(a[2],0,[["enter",g,i]]),l!==2){const b=i.events[a[2]],x=i.events[a[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const S=a[2]+1,k=a[3]-a[2]-1;t.add(S,k,[])}}t.add(a[3]+1,0,[["exit",g,i]])}return s!==void 0&&(u.end=Object.assign({},Xo(i.events,s)),t.add(s,0,[["exit",u,i]]),u=void 0),u}function z1(t,i,a,l,s){const u=[],d=Xo(i.events,a);s&&(s.end=Object.assign({},d),u.push(["exit",s,i])),l.end=Object.assign({},d),u.push(["exit",l,i]),t.add(a+1,0,u)}function Xo(t,i){const a=t[i],l=a[0]==="enter"?"start":"end";return a[1][l]}const tI={name:"tasklistCheck",tokenize:iI};function nI(){return{text:{91:tI}}}function iI(t,i,a){const l=this;return s;function s(m){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?a(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),u)}function u(m){return Nt(m)?(t.enter("taskListCheckValueUnchecked"),t.consume(m),t.exit("taskListCheckValueUnchecked"),d):m===88||m===120?(t.enter("taskListCheckValueChecked"),t.consume(m),t.exit("taskListCheckValueChecked"),d):a(m)}function d(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):a(m)}function h(m){return He(m)?i(m):it(m)?t.check({tokenize:aI},i,a)(m):a(m)}}function aI(t,i,a){return ft(t,l,"whitespace");function l(s){return s===null?a(s):i(s)}}function rI(t){return Mw([ML(),HL(),XL(t),JL(),nI()])}const lI={};function oI(t){const i=this,a=t||lI,l=i.data(),s=l.micromarkExtensions||(l.micromarkExtensions=[]),u=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),d=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);s.push(rI(a)),u.push(NL()),d.push(EL(a))}function Dd(t){document.documentElement.dataset.theme=t,document.documentElement.classList.toggle("dark",t==="dark"),document.documentElement.style.colorScheme=t,localStorage.setItem("jarvy-theme",t)}const sI={add:Ud,"chat-bubble":iA,window:DT,close:qd,"chevron-left":O2,"chevron-right":Xr,"chevron-down":Wo,gear:vA,"person-add":kA,"arrow-bracket-to-left":eA,"arrow-up":IT,copy:D2,check:sr,"cloud-download":I2,bell:PT,"bell-slash":BT,image:JT,paperclip:lg,"smiley-plus":GT,info:rg,people:CA,pencil:fA,file:QT,folder:KT,"layout-sidebar-left":uA,sun:wA,moon:cA,"arrows-expand":FT,"arrows-contract":bA,"arrow-u-up-right":mA,"list-bullets":WT,eye:YT,"eye-slash":$T,pin:bp,megaphone:tA,trash:wd,search:wc,quote:hA};function De({name:t}){const i=sI[t]??rg;return c.jsx(i,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function ct({icon:t,label:i,className:a="",...l}){return c.jsx("button",{type:"button",className:`ui-iconbtn ${a}`,"aria-label":i,title:i,...l,children:c.jsx(De,{name:t})})}function ns({title:t,onClose:i,children:a,className:l=""}){const s=w.useRef(null),u=w.useId();return w.useEffect(()=>{const d=s.current,h=document.activeElement;return d.showModal(),()=>{d.close(),h==null||h.focus({preventScroll:!0})}},[]),Jl.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:t}),className:"ui-dialog-close",onClick:i}),c.jsxs("div",{className:"ui-dialog-body",children:[c.jsx("h1",{id:u,children:t}),a]})]}),document.body)}async function nv(t){if(window.isSecureContext&&navigator.clipboard)try{return await navigator.clipboard.writeText(t),!0}catch{}const i=document.createElement("textarea");i.value=t,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 cI({children:t}){const i=w.useRef(null),[a,l]=w.useState("idle");w.useEffect(()=>{if(a==="idle")return;const u=setTimeout(()=>l("idle"),1500);return()=>clearTimeout(u)},[a]);const s=async()=>{var u;return l(await nv((((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:t}),c.jsx(ct,{icon:a==="copied"?"check":"copy",label:j(a==="copied"?"ui.copied":a==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void s()})]})}const uI=[oI,i5],_c=w.memo(function({text:i,renderQuote:a}){return m2(),c.jsx(Y6,{remarkPlugins:uI,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}):a&&(l!=null&&l.startsWith("#quote-"))?a(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(cI,{children:l})},children:i})}),dI={autoconfig_model:"error.autoconfigModel",autoconfig_source:"error.autoconfigSource",bot_missing:"error.botMissing",chat_access_changed:"error.chatAccessChanged",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"},Sk=(t,i)=>{const a=t?dI[t]:void 0;return a?j(a,i):null};function Pt(t,i="common.failed"){return t instanceof Jo?Sk(t.code,t.params)??(t.status<500?t.message:j(i)):t instanceof Error&&t.message?t.message:j(i)}const fI=t=>Sk(t.errorCode,t.errorParams)??t.error??"";function hI({botId:t,selected:i,onSelect:a,onOpenChat:l}){const[s,u]=w.useState(null),[d,h]=w.useState(!0),[m,v]=w.useState(""),[y,g]=w.useState(0);if(w.useEffect(()=>{let S=!0;return h(!0),v(""),u(null),(i.kind==="history"?RR.read(t,i.id).then(N=>({kind:"history",data:N})):zj.message(t,i.id).then(N=>({kind:"chat",data:N}))).then(N=>{S&&u(N)}).catch(N=>{S&&v(Pt(N,"activity.detailFailed"))}).finally(()=>{S&&h(!1)}),()=>{S=!1}},[t,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(Ve,{variant:"outline",size:"sm",onClick:()=>g(S=>S+1),children:j("common.retry")})]});if(!s)return null;if(s.kind==="history")return c.jsx(AR,{detail:s.data,onSelect:S=>a({kind:"history",id:S})},s.data.record.id);const{chat:b,message:x}=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:b.title}),c.jsx("p",{children:Ig(x.createdAt)})]}),c.jsxs(Ve,{variant:"ghost",size:"sm",onClick:()=>l(b.id),children:[j("activity.openChat"),c.jsx(yp,{})]})]}),c.jsxs("div",{className:"jv-activity-message-body",children:[x.content&&c.jsx(_c,{text:x.content}),x.attachments.length>0&&c.jsx("div",{className:"jv-activity-message-files",children:x.attachments.map(S=>c.jsxs("a",{href:`/api/attachments/${S.id}`,download:S.name,children:[c.jsx(lg,{}),S.name]},S.id))}),x.source&&c.jsxs(Ve,{className:"jv-activity-message-source",variant:"outline",size:"sm",onClick:()=>a({kind:"history",id:x.source.historyId}),children:[j("activity.sentBy",{id:x.source.historyId}),c.jsx(yp,{})]})]})]})}const wk=OM;function kk({className:t,children:i,showCloseButton:a=!0,...l}){return c.jsxs(RM,{children:[c.jsx(DM,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),c.jsxs(IM,{"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",t),...l,children:[i,a&&c.jsx(FM,{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(qd,{className:"size-4"})})]})]})}function iv({className:t,...i}){return c.jsx("div",{"data-slot":"dialog-header",className:nn("flex flex-col gap-2",t),...i})}function of({className:t,...i}){return c.jsx(UM,{"data-slot":"dialog-title",className:nn("text-lg font-semibold",t),...i})}function mI({botId:t,botName:i,onBack:a,onOpenChat:l}){const[s,u]=w.useState([void 0]),d=s.at(-1),[h,m]=w.useState({items:[],nextBefore:null}),[v,y]=w.useState(!0),[g,b]=w.useState(""),[x,S]=w.useState(0),[k,N]=w.useState(null),E=w.useRef(null),T=w.useRef(0),A=w.useRef(null);w.useEffect(()=>{let O=!0;return y(!0),b(""),m({items:[],nextBefore:null}),E.current&&(E.current.scrollTop=0),zj.list(t,d).then(B=>{O&&m(B)}).catch(B=>{O&&b(Pt(B,"activity.loadFailed"))}).finally(()=>{O&&y(!1)}),()=>{O=!1}},[t,d,x]);const M=O=>{var B;k||(T.current=((B=E.current)==null?void 0:B.scrollTop)??0,A.current=document.activeElement),N(O)},I=()=>{if(!k){a();return}N(null),requestAnimationFrame(()=>{var O;E.current&&(E.current.scrollTop=T.current),(O=A.current)==null||O.focus({preventScroll:!0})})};return c.jsxs(c.Fragment,{children:[c.jsxs(iv,{className:"jv-bot-info-navigation",children:[c.jsx(Ve,{type:"button",variant:"ghost",size:"icon-sm","aria-label":j(k?"activity.backToTimeline":"usage.back"),onClick:I,children:c.jsx(Hd,{})}),c.jsx(of,{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(Ve,{type:"button",variant:"ghost",size:"sm",disabled:v,onClick:()=>{u([void 0]),S(O=>O+1)},"aria-label":j("activity.refresh"),children:[c.jsx(vj,{}),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(Ve,{variant:"outline",size:"sm",onClick:()=>S(O=>O+1),children:j("common.retry")})]}):h.items.length?c.jsx(_R,{items:h.items,onSelect:M}):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(Ve,{type:"button",variant:"ghost",size:"sm",disabled:v||s.length===1,onClick:()=>u(O=>O.slice(0,-1)),children:[c.jsx(O2,{}),j("activity.newer")]}),c.jsx("span",{children:j("activity.page",{page:s.length})}),c.jsxs(Ve,{type:"button",variant:"ghost",size:"sm",disabled:v||h.nextBefore===null,onClick:()=>u(O=>[...O,h.nextBefore]),children:[j("activity.older"),c.jsx(Xr,{})]})]})]}),k&&c.jsx("section",{className:"jv-activity-detail","aria-label":j(k.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:c.jsx(hI,{botId:t,selected:k,onSelect:M,onOpenChat:l})})]})]})}const pI={list:(t,i)=>Oe(`/bots/${t}/usage?since=${i}`)},gI=["today","7d","30d"],vI=t=>t==="today"?j("usage.today"):j("usage.days",{count:t==="7d"?7:30}),dd=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function yI(t){const i=new Date;return i.setHours(0,0,0,0),i.setDate(i.getDate()-(t==="7d"?6:t==="30d"?29:0)),i.getTime()}const L1=t=>Zo(t,t<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),I1=t=>t>0&&t<.01?"< $0.01":`$${t.toFixed(2)}`;function bI({botId:t,botName:i,onBack:a}){const[l,s]=w.useState("today"),[u,d]=w.useState(null),[h,m]=w.useState(""),[v,y]=w.useState(0);w.useEffect(()=>{let S=!0;return d(null),m(""),pI.list(t,yI(l)).then(k=>{S&&d(k.models)}).catch(k=>{S&&m(Pt(k,"usage.loadFailed"))}),()=>{S=!1}},[t,l,v]);const g=(u==null?void 0:u.filter(S=>S.cost!==null))??[],b=u&&Object.fromEntries(dd.map(([S])=>[S,u.reduce((k,N)=>k+N[S],0)])),x=g.length?I1(g.reduce((S,k)=>S+k.cost,0)):j("usage.unpriced");return c.jsxs(c.Fragment,{children:[c.jsxs(iv,{className:"jv-bot-info-navigation",children:[c.jsx(Ve,{type:"button",variant:"ghost",size:"icon-sm","aria-label":j("usage.back"),onClick:a,children:c.jsx(Hd,{})}),c.jsx(of,{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:gI.map(S=>c.jsx("button",{type:"button",role:"tab","aria-selected":l===S,onClick:()=>s(S),children:vI(S)},S))}),c.jsxs(Ve,{type:"button",variant:"ghost",size:"sm",disabled:!u&&!h,onClick:()=>y(S=>S+1),"aria-label":j("usage.refreshLabel"),children:[c.jsx(vj,{}),j("usage.refresh")]})]}),c.jsx("div",{className:"jv-usage-scroll",children:h?c.jsxs("div",{className:"jv-usage-state",children:[c.jsx("p",{role:"alert",children:h}),c.jsx(Ve,{variant:"outline",size:"sm",onClick:()=>y(S=>S+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")}),dd.map(([S,k])=>c.jsx("th",{scope:"col",children:j(k)},S)),c.jsx("th",{scope:"col",children:j("usage.cost")})]})}),c.jsx("tbody",{children:u.map(S=>c.jsxs("tr",{children:[c.jsx("th",{scope:"row",children:c.jsxs("span",{className:"jv-usage-model",children:[c.jsx("strong",{children:S.model}),c.jsx("span",{children:S.provider})]})}),dd.map(([k,N])=>c.jsx("td",{"data-label":j(N),title:Zo(S[k]),children:L1(S[k])},k)),c.jsx("td",{"data-label":j("usage.cost"),className:S.cost===null?"jv-usage-unpriced":void 0,title:S.cost===null?void 0:`$${S.cost.toFixed(4)}`,children:S.cost===null?j("usage.unpriced"):I1(S.cost)})]},`${S.provider}/${S.model}`))}),u.length>1&&b&&c.jsx("tfoot",{children:c.jsxs("tr",{children:[c.jsx("th",{scope:"row",children:c.jsx("strong",{children:j("usage.total")})}),dd.map(([S,k])=>c.jsx("td",{"data-label":j(k),title:Zo(b[S]),children:L1(b[S])},S)),c.jsx("td",{"data-label":j("usage.cost"),className:g.length?void 0:"jv-usage-unpriced",children:x})]})})]}),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"}},xI=["normal","happy","sad","angry","dizzy"],Ck=t=>{var i;return`#${(((i=Vi[t])==null?void 0:i.hex)??Vi.gray.hex).toString(16).padStart(6,"0")}`},jI="modulepreload",SI=function(t){return"/"+t},B1={},zd=function(i,a,l){let s=Promise.resolve();if(a&&a.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 h=document.querySelector("meta[property=csp-nonce]"),m=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));s=d(a.map(v=>{if(v=SI(v),v in B1)return;B1[v]=!0;const y=v.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":jI,y||(b.as="script"),b.crossOrigin="",b.href=v,m&&b.setAttribute("nonce",m),document.head.appendChild(b),y)return new Promise((x,S)=>{b.addEventListener("load",x),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${v}`)))})}))}function u(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return s.then(d=>{for(const h of d||[])h.status==="rejected"&&u(h.reason);return i().catch(u)})};let P1;const op=new Map;let H1=Promise.resolve();function wI(){return P1??(P1=Promise.all([zd(()=>import("./three.module-BdMZo7zQ.js"),[]),zd(()=>import("./figure-DBBkOPNl.js"),[])]).then(([t,i])=>{const a=new t.WebGLRenderer({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});i.configureRenderer(t,a);const{scene:l,camera:s,ground:u}=i.createStage(t),d=new i.CatFigure(t,Vi.gray.hex);return l.add(d.root),i.frameCamera(s,1,3.3),{render(h,m,v,y){var g;return a.setSize(v,v,!1),d.setColor(((g=Vi[h])==null?void 0:g.hex)??Vi.gray.hex),d.pose(m),u.visible=y,a.render(l,s),a.domElement.toDataURL("image/png")}}})),P1}function kI(t,i,a){const l=Math.round(a*Math.min(3,Math.max(1,window.devicePixelRatio||1))),s=`${t}:${i}:${l}`;let u=op.get(s);return u||(u=H1.then(()=>wI()).then(d=>d.render(t,i,l,a>=40)),H1=u.catch(()=>{}),op.set(s,u),u.catch(()=>op.delete(s))),u}function Rc({color:t,mood:i="normal",size:a=36,badge:l}){const[s,u]=w.useState();return w.useEffect(()=>{let d=!0;return u(void 0),kI(t,i,a).then(h=>{d&&u(h)}).catch(()=>{}),()=>{d=!1}},[t,i,a]),c.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${a}px`,"--jv-avatar-color":Ck(t)},"aria-hidden":"true",children:[s?c.jsx("img",{src:s,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 Xl=nR,Ql=lR;function Kl({className:t,children:i,...a}){return c.jsxs(aR,{"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",t),...a,children:[i,c.jsx(oR,{asChild:!0,children:c.jsx(Wo,{className:"size-4 opacity-50"})})]})}function Zl({className:t,children:i,container:a,...l}){return c.jsx(dR,{container:a??void 0,children:c.jsx(fR,{"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",t),...l,children:c.jsx(bR,{children:i})})})}function Fi({className:t,children:i,...a}){return c.jsxs(SR,{"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",t),...a,children:[c.jsx(wR,{children:i}),c.jsx(CR,{"data-slot":"select-indicator",className:"absolute right-2",children:c.jsx(sr,{className:"size-4"})})]})}const U1={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},CI=(t,i)=>JSON.stringify([t,i]);function Nk({bot:t,connections:i,onSaved:a,onManage:l}){const[s,u]=w.useState([]),[d,h]=w.useState(!0),[m,v]=w.useState(""),[y,g]=w.useState(0),[b,x]=w.useState(!1),[S,k]=w.useState(""),[N,E]=w.useState(!1),[T,A]=w.useState(""),[M,I]=w.useState(-1),O=w.useRef(null),B=w.useRef(null),q=w.useId();w.useEffect(()=>{let ie=!0;return h(!0),v(""),je.modelOptions().then(ne=>{ie&&u(ne.connections)}).catch(ne=>{ie&&v(Pt(ne,"botModel.loadFailed"))}).finally(()=>{ie&&h(!1)}),()=>{ie=!1}},[i,y]);const $=s.flatMap(ie=>ie.models.map(ne=>({...ne,connectionId:ie.id,connectionName:ie.name,key:CI(ie.id,ne.id)}))).sort((ie,ne)=>ie.name.localeCompare(ne.name,void 0,{numeric:!0})),L=$.find(ie=>ie.connectionId===t.connectionId&&ie.id===t.modelId),Y=i.find(ie=>ie.id===t.connectionId),X=Y==null?void 0:Y.models.find(ie=>ie.id===t.modelId),ue=$.filter(ie=>`${ie.name} ${ie.id} ${ie.connectionName}`.toLocaleLowerCase().includes(T.trim().toLocaleLowerCase())),Z=s.map(ie=>({...ie,models:ue.filter(ne=>ne.connectionId===ie.id)})).filter(ie=>ie.models.length),U=Z.flatMap(ie=>ie.models),G=$.length>8,R=t.thinkingLevel==="auto"?`auto${t.effectiveThinkingLevel?` · ${t.effectiveThinkingLevel}`:""}`:t.effectiveThinkingLevel??t.thinkingLevel;function H(ie){E(ie),A(""),I(-1)}async function W(ie,ne,P){H(!1),x(!0),k("");try{a(await je.selectBotModel(t.id,ie,ne,P))}catch(F){k(Pt(F,"botModel.switchFailed"))}finally{x(!1)}}function D(ie){var ne;if(ie.key==="ArrowDown"||ie.key==="ArrowUp"){ie.preventDefault();const P=ie.key==="ArrowDown"?Math.min(M+1,U.length-1):Math.max(M-1,0);I(P),(ne=document.getElementById(`${q}-${P}`))==null||ne.scrollIntoView({block:"nearest"})}else if(ie.key==="Enter"&&U[M]){ie.preventDefault();const P=U[M];W(P.connectionId,P.id,t.thinkingLevel)}}return c.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":b||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(C_,{open:N,onOpenChange:H,children:[c.jsxs(N_,{className:"jv-model-trigger","aria-label":j("botModel.pick"),"aria-haspopup":"listbox",disabled:b||d||!!m,children:[c.jsx("span",{children:(L==null?void 0:L.name)??(X==null?void 0:X.name)??j(t.connectionId?"botModel.broken":"botModel.choose")}),b?c.jsx(J2,{className:"animate-spin"}):c.jsx(Wo,{})]}),c.jsx(E_,{children:c.jsxs(T_,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,onOpenAutoFocus:ie=>{var ne;ie.preventDefault(),(ne=G?O.current:B.current)==null||ne.focus()},onKeyDown:D,children:[G&&c.jsxs("div",{className:"jv-model-search",children:[c.jsx(wc,{}),c.jsx("input",{ref:O,role:"combobox","aria-label":j("botModel.filter"),"aria-expanded":"true","aria-controls":q,"aria-activedescendant":M>=0?`${q}-${M}`:void 0,placeholder:j("botModel.filterPlaceholder"),value:T,onChange:ie=>{A(ie.target.value),I(-1)},autoComplete:"off",spellCheck:!1})]}),c.jsxs("div",{ref:B,id:q,role:"listbox","aria-label":j("botModel.list"),tabIndex:-1,"aria-activedescendant":M>=0?`${q}-${M}`:void 0,className:"jv-model-options",children:[Z.map(ie=>c.jsxs("div",{role:"group","aria-label":ie.name,children:[c.jsx("div",{className:"jv-model-group-label",children:ie.name}),ie.models.map(ne=>{const P=U.indexOf(ne),F=ne.connectionId===t.connectionId&&ne.id===t.modelId;return c.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${q}-${P}`,"aria-selected":F,"data-active":P===M||void 0,title:ne.id,onClick:()=>void W(ne.connectionId,ne.id,t.thinkingLevel),children:[c.jsx("span",{className:"jv-option-check",children:F&&c.jsx(sr,{})}),c.jsx("span",{children:ne.name})]},ne.key)})]},ie.id)),!U.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:()=>{H(!1),l()},children:j("botModel.manage")})]})})]}),(L||Y)&&c.jsx("span",{className:"jv-field-note",children:(L==null?void 0:L.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(Xl,{value:t.thinkingLevel==="auto"?"auto":t.effectiveThinkingLevel??t.thinkingLevel,disabled:b||d||!L||!!m,onValueChange:ie=>{t.connectionId&&W(t.connectionId,t.modelId,ie)},children:[c.jsx(Kl,{className:"jv-thinking-trigger","aria-label":j("botModel.pickThinking"),children:c.jsx(Ql,{children:R})}),c.jsx(Zl,{className:"jv-select-menu jv-thinking-menu",align:"end",children:["auto",...(L==null?void 0:L.thinking.levels)??[]].map(ie=>{const ne=L==null?void 0:L.thinkingLevelMap[ie],P=ne&&ne!==ie?ne:ie;return c.jsx(Fi,{value:ie,children:c.jsxs("span",{className:"jv-thinking-option",children:[c.jsxs("span",{children:[P,ne&&ne!==ie&&c.jsxs("small",{children:[" (",ie,")"]})]}),c.jsx("small",{children:U1[ie]&&j(U1[ie])})]})},ie)})})]})]})]}),d&&c.jsx("p",{className:"jv-field-note",role:"status",children:j("botModel.loading")}),b&&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(ie=>ie+1),children:j("common.retry")})]}),S&&c.jsx("p",{className:"jv-model-error",role:"alert",children:S})]})}function In({className:t,type:i,...a}){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",t),...a})}function Kp({className:t,...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",t),...i})}const NI={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function EI({bot:t,status:i,connections:a,chats:l,onSaved:s,onManageModels:u,onClose:d,onOpenChat:h,onOpenSubscription:m}){const[v,y]=w.useState("info"),[g,b]=w.useState(t.name),[x,S]=w.useState(t.description),[k,N]=w.useState(t.systemPrompt),[E,T]=w.useState(!1),[A,M]=w.useState(null),[I,O]=w.useState(null),[B,q]=w.useState(null),[$,L]=w.useState(""),[Y,X]=w.useState(!1),[ue,Z]=w.useState(null);w.useEffect(()=>{let ne=!0;return je.botSubscriptions(t.id).then(P=>{ne&&Z(P.chats)}).catch(()=>{}),()=>{ne=!1}},[t.id]),w.useEffect(()=>{if(!Y)return;const ne=setTimeout(()=>X(!1),1500);return()=>clearTimeout(ne)},[Y]);const U=g!==t.name||x!==t.description||k!==t.systemPrompt,G=(i==null?void 0:i.status)??"stop",R=i==null?void 0:i.context;async function H(ne){q(ne),L("");try{await je.controlBot(t.id,ne)}catch(P){L(Pt(P,"common.failed"))}finally{q(null)}}async function W(ne){ne.preventDefault(),T(!0),M(null);try{s(await je.saveBot(t.id,{name:g,description:x,systemPrompt:k})),M({kind:"ok",text:j("bot.saved")})}catch(P){M({kind:"error",text:Pt(P,"common.saveFailed")})}finally{T(!1)}}async function D(ne){if(ne!==t.color){T(!0),O(null);try{s(await je.setBotColor(t.id,ne))}catch(P){O({kind:"error",text:Pt(P,"bot.changeFailed")})}finally{T(!1)}}}const ie=ne=>ne&&c.jsx("p",{className:ne.kind==="error"?"jv-note-error":"jv-note-ok",role:ne.kind==="error"?"alert":"status",children:ne.text});return c.jsx(wk,{open:!0,onOpenChange:ne=>{ne||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(mI,{botId:t.id,botName:t.name,onBack:()=>y("info"),onOpenChat:h}):v==="usage"?c.jsx(bI,{botId:t.id,botName:t.name,onBack:()=>y("info")}):c.jsxs(c.Fragment,{children:[c.jsx(iv,{className:"jv-dialog-header",children:c.jsx(of,{children:j("entry.botInfo")})}),c.jsxs("div",{className:"jv-bot-scroll",children:[c.jsxs("section",{className:"jv-bot-hero",children:[c.jsx(Rc,{color:t.color,mood:t.mood,size:72}),c.jsxs("div",{className:"jv-bot-identity",children:[c.jsx("strong",{children:t.name}),c.jsx("span",{children:t.description||j("bot.noDescription")}),c.jsx("div",{className:"jv-bot-colors",role:"radiogroup","aria-label":j("bot.color"),children:Object.keys(Vi).map(ne=>c.jsx("button",{type:"button",role:"radio","aria-checked":t.color===ne,"aria-label":j(Vi[ne].label),title:j(Vi[ne].label),disabled:E,style:{background:Ck(ne)},onClick:()=>void D(ne)},ne))}),ie(I)]})]}),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(Nk,{bot:t,connections:a,onSaved:s,onManage:u}),R&&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:R.tokens===null?j("bot.unknown"):j("bot.tokens",{used:Zo(R.tokens),window:Zo(R.contextWindow)})})]}),R.tokens!==null&&c.jsx("div",{className:"jv-context-bar",children:c.jsx("span",{style:{width:`${Math.min(100,Math.max(1,R.tokens/R.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:ne=>void W(ne),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:ne=>b(ne.target.value)})]}),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("bot.description")}),c.jsx(Kp,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:x,onChange:ne=>S(ne.target.value),placeholder:j("bot.descriptionPlaceholder")})]}),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:"Persona"}),c.jsx(Kp,{id:"jarvy-bot-persona",maxLength:16e3,rows:7,value:k,onChange:ne=>N(ne.target.value),placeholder:j("bot.personaPlaceholder")}),c.jsx("small",{className:"jv-hint",children:j("bot.personaHint")})]}),c.jsxs("div",{className:"jv-form-footer",children:[ie((A==null?void 0:A.kind)==="error"||!U?A:null)??(U?c.jsx("p",{className:"jv-hint",children:j("bot.unsaved")}):c.jsx("span",{})),c.jsx(Ve,{type:"submit",className:"jv-primary",disabled:E||!U,children:j(E?"bot.saving":"common.save")})]})]})]}),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":G!=="stop"||void 0,"data-busy":G==="running"||void 0,children:j(NI[G])}),G==="running"&&c.jsx(Ve,{type:"button",variant:"ghost",size:"sm",disabled:!!B,onClick:()=>void H("abort"),children:j(B==="abort"?"bot.aborting":"bot.abort")}),c.jsx(Ve,{type:"button",variant:"outline",size:"sm",disabled:!!B||!t.connectionId,onClick:()=>void H(G==="stop"?"start":"stop"),children:j(B==="start"?"bot.starting":B==="stop"?"bot.stopping":G==="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:t.workspacePath,children:t.workspacePath})]}),c.jsx(Ve,{type:"button",variant:"ghost",size:"icon-sm","aria-label":j(Y?"ui.copied":"bot.copyWorkspace"),onClick:()=>void nv(t.workspacePath).then(ne=>X(ne)),children:Y?c.jsx(sr,{}):c.jsx(D2,{})})]}),c.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("activity"),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("bot.activity")}),c.jsx("span",{children:j("bot.activityHint")})]}),c.jsx(Xr,{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(UT,{})}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:j("usage.title")}),c.jsx("span",{children:j("bot.usageHint")})]}),c.jsx(Xr,{className:"jv-row-chevron"})]})]}),$&&c.jsx("p",{className:"jv-note-error",role:"alert",children:$})]}),ue&&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:ue.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")})})}):ue.map(ne=>{var P;return c.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>m(ne),children:[c.jsx("span",{className:"jv-row-icon",children:ne.type==="thread"?c.jsx(lA,{}):c.jsx(ZT,{})}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:ne.title}),c.jsx("span",{children:ne.type==="thread"?j("bot.threadIn",{channel:((P=l.find(F=>F.id===ne.parentId))==null?void 0:P.title)??""}):j("info.menu")})]}),c.jsx(Xr,{className:"jv-row-chevron"})]},ne.id)})})]})]})]})})})}function Ek({id:t,value:i,sections:a,onChange:l}){const[s,u]=w.useState(null);return c.jsxs(Xl,{value:i??"none",onValueChange:d=>l(d==="none"?null:d),children:[c.jsx(Kl,{id:t,ref:d=>u((d==null?void 0:d.closest("dialog"))??null),className:"jv-select jv-section-select",children:c.jsx(Ql,{})}),c.jsxs(Zl,{className:"jv-select-menu",position:"popper",sideOffset:4,container:s,children:[c.jsx(Fi,{value:"none",children:j("info.noSection")}),a.map(d=>c.jsx(Fi,{value:d.id,children:d.name},d.id))]})]})}const TI=1024*1024,AI=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],xc=t=>`/api/attachments/${t.id}`,Tk=t=>t.name.includes(".")?t.name.split(".").pop().toLowerCase():"";function Ld(t){const i=Tk(t),a=t.mimeType.toLowerCase();return i==="svg"||a==="image/svg+xml"?"svg":a.startsWith("image/")||["png","jpg","jpeg","gif","webp","avif","bmp"].includes(i)?"image":["html","htm"].includes(i)||a==="text/html"?"html":["md","markdown"].includes(i)?"markdown":a.startsWith("text/")||AI.includes(i)?"text":"download"}const Id=t=>t==="image"||t==="svg";function Ak(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}async function Mk(t,i){const a=await fetch(xc(t),{signal:i,credentials:"same-origin"});if(!a.ok)throw new Error(a.status===404?j("files.gone"):j("files.readFailed",{status:a.status}));return a.text()}async function Ok(t,i){return Ld(t)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await Mk(t,i))}`:xc(t)}const q1=t=>`/api/attachments/${t.id}/run`;function MI(t){const i=new DOMParser().parseFromString(t,"text/html");let a=i.querySelectorAll("script").length;const l=new Set;return i.querySelectorAll("*").forEach(s=>{for(const u of[...s.attributes])if(u.name.startsWith("on"))a++;else if(/^\s*javascript:/i.test(u.value)&&["href","src","action","formaction","xlink:href"].includes(u.name))a++;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{}}),a?{count:a,hosts:[...l]}:null}function OI(t){const i=new DOMParser().parseFromString(t,"text/html");return i.querySelectorAll("script,iframe,frame,object,embed,link,meta,base,audio,video,source,track").forEach(a=>a.remove()),i.querySelectorAll("*").forEach(a=>{for(const l of[...a.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/"))&&a.removeAttribute(l.name);["BUTTON","INPUT","SELECT","TEXTAREA"].includes(a.tagName)&&a.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 _I({file:t}){const[i,a]=w.useState(),[l,s]=w.useState(!1);return w.useEffect(()=>{const u=new AbortController;return s(!1),Ok(t,u.signal).then(a).catch(()=>{u.signal.aborted||s(!0)}),()=>u.abort()},[t.id]),l?c.jsx("span",{className:"ui-broken-image",children:c.jsx(De,{name:"image"})}):i?c.jsx("img",{src:i,alt:t.name,loading:"lazy",onError:()=>s(!0)}):c.jsx(De,{name:"image"})}function _k({files:t,onOpen:i}){const a=t.some(l=>Id(Ld(l)));return c.jsx("div",{className:`ui-message-files ${a?"ui-has-images":""}`,children:t.map((l,s)=>{const u=Id(Ld(l)),d=Tk(l).toUpperCase();return c.jsxs("div",{className:`ui-message-file ${u?"ui-message-image":""}`,children:[c.jsxs("button",{type:"button",className:"ui-message-open",onClick:()=>i(s),"aria-label":j("files.preview",{name:l.name}),children:[u?c.jsx("span",{className:"ui-image-frame",children:c.jsx(_I,{file:l})}):c.jsx("span",{className:"ui-file-icon",children:c.jsx(De,{name:"file"})}),c.jsxs("span",{className:"ui-file-copy",children:[c.jsx("strong",{title:l.name,children:l.name}),c.jsxs("small",{children:[d?`${d} · `:"",Ak(l.size)]})]})]}),c.jsx("a",{className:"ui-iconbtn",href:xc(l),download:l.name,"aria-label":j("files.download",{name:l.name}),title:j("files.download",{name:l.name}),children:c.jsx(De,{name:"cloud-download"})})]},l.id)})})}const F1=t=>String.fromCharCode(65+t),V1=t=>t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLElement&&t.isContentEditable;function Rk({message:t,keyboard:i,onSettled:a}){var T,A;const l=t.question,s=l.state==="pending",u=w.useId(),[d,h]=w.useState([]),[m,v]=w.useState(""),[y,g]=w.useState(!1),[b,x]=w.useState("");async function S(M){if(!(y||!s)){g(!0),x("");try{a(await je.answerQuestion(t.chatId,t.id,M))}catch(I){x(Pt(I,"question.failed"))}finally{g(!1)}}}const k=M=>{if(!l.multiple){S({action:"answer",selected:[M]});return}h(I=>I.includes(M)?I.filter(O=>O!==M):[...I,M])},N=()=>void S({action:"answer",selected:d,...m.trim()?{custom:m.trim()}:{}}),E=()=>{m.trim()&&(l.multiple?N():S({action:"answer",selected:[],custom:m.trim()}))};if(w.useEffect(()=>{if(!i||!s)return;const M=I=>{if(I.defaultPrevented||I.metaKey||I.ctrlKey||I.altKey||I.key.length!==1||V1(I.target)||V1(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const O=I.key.toUpperCase().charCodeAt(0)-65;O<0||O>=l.options.length||(I.preventDefault(),k(O))};return document.addEventListener("keydown",M,!0),()=>document.removeEventListener("keydown",M,!0)}),!s){const M=l.state==="answered"?[...(((T=l.answer)==null?void 0:T.selected)??[]).map(I=>{var O;return((O=l.options[I])==null?void 0:O.label)??""}),...(A=l.answer)!=null&&A.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}
493
- ${M===null?j("question.dismissed"):j("question.chose",{answer:M})}`,children:[M===null?c.jsx(sA,{"aria-hidden":"true"}):c.jsx(sr,{"aria-hidden":"true"}),c.jsx("span",{className:"jv-question-answer",children:M===null?j("question.dismissed"):g2("question.chose",{answer:c.jsx("strong",{children:M})})}),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 S({action:"dismiss"}),children:c.jsx(qd,{"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((M,I)=>{const O=d.includes(I);return c.jsxs("button",{type:"button",className:"jv-question-option","data-style":M.style,"data-on":O||void 0,"aria-pressed":l.multiple?O:void 0,"aria-keyshortcuts":i?F1(I).toLowerCase():void 0,disabled:y,onClick:()=>k(I),children:[c.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:O?c.jsx(sr,{}):F1(I)}),c.jsxs("span",{className:"jv-question-copy",children:[c.jsx("strong",{children:M.label}),M.description&&c.jsx("small",{children:M.description})]})]},M.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:M=>v(M.target.value),onKeyDown:M=>{M.key==="Enter"&&!M.nativeEvent.isComposing&&(M.preventDefault(),E())}}),l.multiple?c.jsx("button",{type:"button",className:"ui-button jv-question-submit",disabled:y||!d.length&&!m.trim(),onClick:N,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")})]}),b&&c.jsx("p",{className:"jv-question-error",role:"alert",children:b})]})}function Ba(t){return t?t.deleted?j("member.deleted",{name:t.name}):t.name:j("member.unknown")}const RI={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},Dk=t=>j(RI[t??""]??"activity.running"),ra=t=>t.filter(i=>!i.deleted);function DI(t){const i=new Set(t.map(l=>l.toLowerCase()));let a=j("bot.newName");for(let l=2;i.has(a.toLowerCase());l++)a=j("bot.newNameN",{n:l});return a}const sp=/[\p{Script=Latin}\p{Nd}_]/u;function av(t,i){const a=t.replace(/```[\s\S]*?```|`[^`\n]*`/g,d=>" ".repeat(d.length)),l=a.toLowerCase(),s=[...i].sort((d,h)=>h.name.length-d.name.length),u=[];for(let d=l.indexOf("@");d>=0;d=l.indexOf("@",d+1)){if(d>0&&sp.test(a[d-1]))continue;const h=s.find(m=>{const v=m.name.toLowerCase();if(!v||!l.startsWith(v,d+1))return!1;const y=a[d+1+v.length];return!(y&&sp.test(y)&&sp.test(v.at(-1)))});h&&(u.push({member:h,at:d,length:h.name.length+1}),d+=h.name.length)}return u}function zI(t,i,a){let l="",s=0;for(const u of av(t,i))l+=t.slice(s,u.at)+`[${t.slice(u.at,u.at+u.length)}](${u.member.id===a?"#mention-me":"#mention"})`,s=u.at+u.length;return l+t.slice(s)}const zk=/\[\[q(\d+)\]\]/g,Zp=(t,i=40)=>{const a=t.replace(/\s+/g," ").trim();return a.length>i?`${a.slice(0,i)}…`:a};function rv(t){return t.content.replace(zk,(i,a)=>{const l=t.quotes[Number(a)-1];return l?j("quote.inline",{text:l.text}):i})}function Dc(t){return rv(t).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||j("common.attachment")}function Lk({message:t,members:i,me:a,onJump:l}){const s=zI(t.content,i.filter(d=>t.mentions.includes(d.id)),a).replace(zk,(d,h)=>t.quotes[Number(h)-1]?`[q${h}](#quote-${h})`:d),u=d=>{const h=t.quotes[d-1];if(!h)return null;const m=Ba(i.find(v=>v.id===h.senderId));return c.jsxs("button",{type:"button",className:"jv-quote-tag",title:j("sidebar.said",{name:m,text:h.text}),"data-gone":h.messageId?void 0:"",onClick:()=>l==null?void 0:l(h.messageId,h.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:Zp(h.text,80)})]})};return c.jsx(_c,{text:s,renderQuote:u})}function Ik(t,i){var g;const a=i.replace(/\s+/g,"");if(!a||typeof CSS>"u"||!("highlights"in CSS))return!1;const l=t.querySelector(".ui-bubble")??t,s=document.createTreeWalker(l,NodeFilter.SHOW_TEXT),u=[];for(let b=s.nextNode();b;b=s.nextNode())if(!((g=b.parentElement)!=null&&g.closest(".jv-quote-tag, button")))for(let x=0;x<b.data.length;x++)/\s/.test(b.data[x])||u.push({node:b,offset:x});const d=u.map(b=>b.node.data[b.offset]).join(""),h=d.indexOf(a);if(h<0)return!1;const m=u[h],v=u[h+a.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 Bk(t,i){t.scrollIntoView({block:"center",behavior:"smooth"}),!(i&&Ik(t,i))&&(t.classList.add("jv-jump"),setTimeout(()=>t.classList.remove("jv-jump"),1200))}function LI({quotes:t,onRemove:i}){return t.length?c.jsx("div",{className:"jv-compose-quotes",children:t.map((a,l)=>c.jsxs("span",{className:"jv-quote-tag",title:j("sidebar.said",{name:a.name,text:a.text}),children:[c.jsx(De,{name:"quote"}),c.jsx("span",{className:"jv-quote-name",children:j("quote.by",{name:a.name})}),c.jsx("span",{className:"jv-quote-text",children:Zp(a.text)}),c.jsx("button",{type:"button","aria-label":j("quote.remove",{text:Zp(a.text,20)}),onClick:()=>i(l),children:"×"})]},l))}):null}function Pk({container:t,drafts:i,chatId:a,source:l,members:s,onNotice:u}){const d=(y,g)=>{const b=l(y);b&&!II(i,a,b,s,g)&&u(j("quote.tooMany",{count:10}))},[h,m]=w.useState(null);if(w.useEffect(()=>{const y=t.current;if(!y||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const g=E=>{var T;return(T=E instanceof Element?E:E==null?void 0:E.parentElement)==null?void 0:T.closest(".ui-bubble")},b=()=>{var O,B;const E=getSelection(),T=(E==null?void 0:E.toString())??"";if(!E||E.isCollapsed||!T.trim()){m(null);return}const A=g(E.anchorNode),M=A==null?void 0:A.closest("[data-message]");if(!A||!M||!y.contains(A)||g(E.focusNode)!==A||(B=(O=E.anchorNode)==null?void 0:O.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:M.getAttribute("data-message"),text:T.trim()})},x=()=>requestAnimationFrame(b),S=()=>m(null),k=E=>{E.key==="Escape"&&S()},N=()=>{var E;(E=getSelection())!=null&&E.isCollapsed&&S()};return y.addEventListener("mouseup",x),y.addEventListener("scroll",S,!0),document.addEventListener("keydown",k),document.addEventListener("selectionchange",N),()=>{y.removeEventListener("mouseup",x),y.removeEventListener("scroll",S,!0),document.removeEventListener("keydown",k),document.removeEventListener("selectionchange",N)}},[t]),!h)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:h.x,top:h.y},onMouseDown:y=>y.preventDefault(),children:[c.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{nv(h.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(h.messageId,h.text),v()},children:[c.jsx(De,{name:"quote"}),c.jsx("span",{className:"ui-menu-copy",children:j("quote.quote")})]})]})}function II(t,i,a,l,s){if(t.get(i).passages.length>=10)return!1;const u={messageId:a.id,name:Ba(l.find(d=>d.id===a.senderId)),text:s};return t.update(i,d=>({passages:[...d.passages,u]})),!0}const BI=["👍","👎","✅","❌","😄","😂","😵‍💫","🤔"],$1=["👍","👎","✅","❌","🙏","👏","🎉","🔥","💯","❤️","💔","⭐","😄","😂","🤣","😊","🙂","😉","😅","😴","🤔","🤨","😮","😱","😢","😭","😤","😡","🤯","🥳","😵‍💫","🫠","👀","🙈","🤝","💪","🚀","🐛","✅","⚠️","❓","❗","📌","🧠","☕","🍰","🌙","☀️"];function Hk({message:t,members:i,onJump:a}){if(!t.replyTo)return null;const l=i.find(s=>s.id===t.replyTo.senderId);return c.jsxs("button",{type:"button",className:"jv-reply-quote",onClick:()=>a(t.replyTo.id),children:[c.jsx("span",{className:"jv-reply-author",children:Ba(l)}),c.jsx("span",{className:"jv-reply-text",children:Dc(t.replyTo)})]})}function Uk({message:t,me:i,members:a,onReact:l,onError:s}){return t.reactions.length?c.jsx("div",{className:"jv-reactions",children:t.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(h=>Ba(a.find(m=>m.id===h))).join(j("common.listSeparator")),onClick:()=>{try{l(t,u.emoji,!d)}catch(h){s(h)}},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 qk({message:t,me:i,onReply:a,onReact:l,onError:s}){const[u,d]=w.useState(!1),[h,m]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{if(!u)return;const b=x=>{var S;(S=v.current)!=null&&S.contains(x.target)||d(!1)};return document.addEventListener("pointerdown",b),()=>document.removeEventListener("pointerdown",b)},[u]);const y=b=>{var S;const x=!((S=t.reactions.find(k=>k.emoji===b))!=null&&S.memberIds.includes(i));try{l(t,b,x)}catch(k){s(k)}d(!1)},g=()=>{var S,k,N;const b=(S=v.current)==null?void 0:S.getBoundingClientRect(),x=(N=(k=v.current)==null?void 0:k.closest(".ui-transcript, .ui-pane-body"))==null?void 0:N.getBoundingClientRect();m(!!b&&((x==null?void 0:x.bottom)??window.innerHeight)-b.bottom<240),d(!u)};return c.jsxs("div",{className:"jv-message-actions",ref:v,children:[a&&c.jsx(ct,{icon:"arrow-u-up-right",label:j("actions.reply"),onClick:()=>a(t)}),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":h||void 0,children:[c.jsx("div",{className:"jv-emoji-quick",children:BI.map(b=>c.jsx("button",{type:"button",role:"menuitem",onClick:()=>y(b),children:b},b))}),c.jsxs("details",{className:"jv-emoji-more",children:[c.jsx("summary",{children:j("actions.more")}),c.jsx("div",{className:"jv-emoji-grid",children:$1.filter((b,x)=>$1.indexOf(b)===x).map(b=>c.jsx("button",{type:"button",onClick:()=>y(b),children:b},b))})]})]})]})}const Fk="jarvy-notice-closed",PI=()=>{try{return JSON.parse(localStorage.getItem(Fk)??"[]")}catch{return[]}};function pr({member:t,bots:i,size:a,working:l=!1}){const s=(t==null?void 0:t.kind)==="bot"?i.find(u=>u.id===t.id):void 0;return s?c.jsx(Rc,{color:s.color,mood:s.mood,size:a,badge:l?"working":void 0}):c.jsx("span",{className:"ui-user-avatar jv-user-avatar",style:{width:a,height:a,fontSize:Math.round(a*.38)},children:((t==null?void 0:t.name)??"?").slice(0,2).toUpperCase()})}function HI({chat:t,members:i,bots:a,infoOpen:l,membersOpen:s,threadsOpen:u,searchOpen:d,onNav:h,onInfo:m,onMembers:v,onThreads:y,onSearch:g}){const b=i.filter(x=>t.memberIds.includes(x.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:h}),c.jsxs("button",{type:"button",className:"jv-channel-title","aria-label":j("channel.infoFor",{name:t.title}),"aria-pressed":l,onClick:m,children:[c.jsx("span",{className:"jv-hash",children:"#"}),t.title,c.jsx(De,{name:"chevron-down"})]}),t.topic&&c.jsx("span",{className:"jv-channel-topic",children:t.topic})]}),c.jsxs("div",{className:"ui-header-actions",children:[c.jsxs("button",{type:"button",className:"jv-members-button","aria-label":j("channel.membersCount",{count:b.length}),"aria-pressed":s,title:j("channel.members"),onClick:v,children:[c.jsx("span",{className:"jv-stack",children:b.slice(0,3).map(x=>c.jsx("span",{className:"jv-stack-item",children:c.jsx(pr,{member:x,bots:a,size:22})},x.id))}),c.jsx("span",{className:"jv-members-count",children:b.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 UI({chat:t,onSave:i}){var x;const[a,l]=w.useState(PI),[s,u]=w.useState(null),[d,h]=w.useState(!1);w.useEffect(()=>u(null),[t.id]);const m=!a.includes(t.id),v=t.note,y=()=>l(S=>{const k=m?[...S,t.id]:S.filter(N=>N!==t.id);return localStorage.setItem(Fk,JSON.stringify(k)),k}),g=async()=>{if(s!=null&&s.trim()){h(!0);try{await i(s.trim()),u(null)}finally{h(!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:S=>u(S.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 b=((x=v.text.split(`
494
- `).find(S=>S.trim()&&!S.startsWith("#")))==null?void 0:x.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:b}),c.jsx(De,{name:m?"chevron-down":"chevron-right"})]}),c.jsxs("span",{className:"jv-muted jv-notice-meta",children:[v.updatedBy.name," · ",Pa(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(_c,{text:v.text})})]})}function Bd({messages:t,members:i,bots:a,me:l,divider:s,activeQuestion:u,onSettled:d,onPreview:h,onReply:m,onOpenThread:v,onQuote:y,onReact:g,onJump:b,onError:x}){var k;const S=(k=t.find(N=>N.sequence>s&&N.senderId!==l))==null?void 0:k.id;return c.jsx(c.Fragment,{children:t.map((N,E)=>{const T=t[E-1],A=i.find(I=>I.id===N.senderId),M=!!T&&T.senderId===N.senderId&&N.createdAt-T.createdAt<5*6e4&&N.id!==S;return c.jsxs("div",{children:[N.id===S&&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":N.id,"data-folded":M||void 0,"data-mention":N.mentions.includes(l)||void 0,children:[c.jsx("div",{className:"jv-row-gutter",children:M?c.jsx("time",{className:"jv-row-time",children:sc(N.createdAt)}):c.jsx(pr,{member:A,bots:a,size:32})}),c.jsxs("div",{className:"jv-row-body",children:[!M&&c.jsxs("div",{className:"jv-row-head",children:[c.jsx("strong",{children:Ba(A)}),(A==null?void 0:A.kind)==="bot"&&c.jsx("span",{className:"jv-role",children:"Bot"}),c.jsx("time",{children:sc(N.createdAt)})]}),N.echoOf&&c.jsx("button",{type:"button",className:"jv-echo",onClick:()=>v==null?void 0:v(N.echoOf.id),children:j("channel.echo",{title:N.echoOf.title})}),N.replyTo&&c.jsx(Hk,{message:N,members:i,onJump:I=>b==null?void 0:b(I)}),N.question?c.jsx(Rk,{message:{...N,question:N.question},keyboard:N.id===u,onSettled:d}):c.jsxs("div",{className:"ui-bubble jv-flat",children:[N.content&&c.jsx(Lk,{message:N,members:i,me:l,onJump:b}),N.attachments.length>0&&c.jsx(_k,{files:N.attachments,onOpen:I=>h(N.attachments,I)})]}),g&&c.jsx(Uk,{message:N,me:l,members:i,onReact:g,onError:x??(()=>{})}),N.thread&&N.thread.replies>0&&c.jsxs("button",{type:"button",className:"jv-thread-link","data-done":N.thread.status==="done"||void 0,onClick:()=>v==null?void 0:v(N.thread.id),children:[j("channel.replies",{count:N.thread.replies}),N.thread.status==="done"&&` · ${j("channel.threadDone")}`,N.thread.lastReplyAt&&c.jsx("span",{className:"jv-muted",children:j("channel.lastReply",{time:sc(N.thread.lastReplyAt)})})]})]}),c.jsxs("div",{className:"jv-row-actions",children:[m&&!N.echoOf&&c.jsx(ct,{icon:"chat-bubble",label:j("channel.replyInThread"),onClick:()=>m(N)}),g&&c.jsx(qk,{message:N,me:l,onReply:y,onReact:g,onError:x??(()=>{})})]})]})]},N.id)})})}function Vk({candidates:t,bots:i,busy:a,onCancel:l,onConfirm:s}){const[u,d]=w.useState(""),[h,m]=w.useState([]),v=t.filter(g=>g.name.toLowerCase().includes(u.trim().toLowerCase())),y=g=>m(b=>b.includes(g)?b.filter(x=>x!==g):[...b,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":h.includes(g.id),className:"jv-member-option",onClick:()=>y(g.id),children:[c.jsx(pr,{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:h.includes(g.id)&&c.jsx(De,{name:"check"})})]},g.id)),v.length===0&&c.jsx("p",{className:"jv-picker-empty",children:j(t.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:a||h.length===0,onClick:()=>s(h),children:h.length?j("dialogs.addCount",{count:h.length}):j("common.add")})]})]})}function qI({chat:t,members:i,bots:a,onClose:l,onChanged:s}){const[u,d]=w.useState(!1),[h,m]=w.useState("");async function v(y){d(!0),m("");try{let g=t;for(const b of y)g=await je.addMember(t.id,b);s(g),l()}catch(g){m(Pt(g,"dialogs.addFailed"))}finally{d(!1)}}return c.jsxs(ns,{title:j("info.addMembers"),onClose:l,className:"jv-channel-dialog",children:[c.jsx(Vk,{candidates:i.filter(y=>!t.memberIds.includes(y.id)),bots:a,busy:u,onCancel:l,onConfirm:y=>void v(y)}),h&&c.jsx("p",{className:"jv-form-error",role:"alert",children:h})]})}function FI({sections:t,members:i,bots:a,me:l,onClose:s,onSaved:u}){const d=w.useId(),[h,m]=w.useState(""),[v,y]=w.useState(""),[g,b]=w.useState(null),[x,S]=w.useState([l]),[k,N]=w.useState(!1),[E,T]=w.useState(!1),[A,M]=w.useState("");async function I(B){if(B.preventDefault(),!(!h.trim()||E)){T(!0),M("");try{u(await je.createChannel({name:h.trim(),topic:v.trim(),sectionId:g,memberIds:x.filter(q=>q!==l)}))}catch(q){M(Pt(q,"common.saveFailed"))}finally{T(!1)}}}const O=i.filter(B=>x.includes(B.id));return k?c.jsx(ns,{title:j("info.addMembers"),onClose:s,className:"jv-channel-dialog",children:c.jsx(Vk,{candidates:i.filter(B=>!x.includes(B.id)),bots:a,busy:!1,onCancel:()=>N(!1),onConfirm:B=>{S(q=>[...q,...B]),N(!1)}})}):c.jsx(ns,{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:h,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(Ek,{id:`${d}-section`,value:g,sections:t,onChange:b})]}),c.jsxs("div",{className:"jv-members",children:[c.jsxs("div",{className:"jv-members-head",children:[c.jsxs("span",{children:[j("channel.members")," · ",O.length]}),c.jsxs("button",{type:"button",className:"ui-button",onClick:()=>N(!0),children:[c.jsx(De,{name:"person-add"}),j("info.addMembers")]})]}),O.map(B=>c.jsxs("div",{className:"jv-member-option",children:[c.jsx(pr,{member:B,bots:a,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:()=>S(q=>q.filter($=>$!==B.id))})]},B.id))]}),A&&c.jsx("p",{className:"jv-form-error",role:"alert",children:A}),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||!h.trim(),children:j("common.create")})]})]})})}function VI({section:t,onClose:i,onSaved:a,onDeleted:l}){const s=w.useId(),[u,d]=w.useState((t==null?void 0:t.name)??""),[h,m]=w.useState(!1),[v,y]=w.useState("");async function g(x){if(x.preventDefault(),!(!u.trim()||h)){m(!0),y("");try{a(t?await je.updateSection(t.id,{name:u.trim()}):await je.createSection({name:u.trim()}))}catch(S){y(Pt(S,"common.saveFailed")),m(!1)}}}async function b(){if(!(!t||!confirm(j("dialogs.deleteSection",{name:t.name})))){m(!0);try{await je.deleteSection(t.id),l==null||l(t.id)}catch(x){y(Pt(x,"dialogs.deleteFailed")),m(!1)}}}return c.jsx(ns,{title:j(t?"dialogs.editSection":"sidebar.newSection"),onClose:i,children:c.jsxs("form",{onSubmit:x=>void g(x),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:x=>d(x.target.value)})]}),v&&c.jsx("p",{className:"jv-form-error",role:"alert",children:v}),c.jsxs("div",{className:"ui-dialog-actions",children:[t&&c.jsx("button",{type:"button",className:"ui-button jv-danger",disabled:h,onClick:()=>void b(),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:h||!u.trim(),children:j(t?"common.save":"common.create")})]})]})})}function $I({bot:t,chats:i,onClose:a,onConfirm:l}){const[s,u]=w.useState(!1),[d,h]=w.useState(!1);return c.jsx(ns,{title:j("deleteBot.title",{name:t.name}),onClose:a,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:t.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(Ve,{type:"button",variant:"ghost",onClick:a,children:j("common.cancel")}),c.jsx(Ve,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{h(!0),l(s).finally(()=>h(!1))},children:j(d?"deleteBot.deleting":"common.delete")})]})]})})}function $k({title:t,body:i,confirm:a,onClose:l,onConfirm:s}){const[u,d]=w.useState(!1);return c.jsx(ns,{title:t,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(Ve,{type:"button",variant:"ghost",onClick:l,children:j("common.cancel")}),c.jsx(Ve,{type:"button",className:"jv-primary",disabled:u,onClick:()=>{d(!0),s().finally(()=>d(!1))},children:u?j("deleteBot.working"):a})]})]})})}function YI({target:t,x:i,y:a,onClose:l,onOpenBot:s,onSettings:u,onPin:d,onMute:h,onDeleteChat:m,onDeleteBot:v}){const y=w.useRef(null);w.useEffect(()=>{const x=k=>{var N;(N=y.current)!=null&&N.contains(k.target)||l()},S=k=>{k.key==="Escape"&&l()};return document.addEventListener("pointerdown",x),document.addEventListener("keydown",S),()=>{document.removeEventListener("pointerdown",x),document.removeEventListener("keydown",S)}},[l]);const g=t.chat,b={left:Math.max(8,Math.min(i,window.innerWidth-200)),top:Math.max(8,Math.min(a,window.innerHeight-210))};return c.jsxs("div",{ref:y,className:"ui-popover jv-entry-menu",role:"menu","aria-label":j("entry.menu"),style:b,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:()=>{h(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")})]}),t.kind==="dm"?c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{s(t.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(t.chat),l()},children:[c.jsx(De,{name:"info"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.channelInfo")})]}),c.jsx("hr",{className:"ui-menu-divider"}),t.kind==="dm"?c.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{v(t.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(t.chat),l()},children:[c.jsx(De,{name:"close"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.deleteChannel")})]})]})}const GI={image:"files.kindImage",svg:"files.kindSvg",html:"files.kindHtml",markdown:"files.kindMarkdown",text:"files.kindText",download:"files.kindFile"};function XI({files:t,initialIndex:i=0,onClose:a}){const[l,s]=w.useState(i),[u,d]=w.useState("preview"),[h,m]=w.useState(!1),[v,y]=w.useState(""),[g,b]=w.useState(""),[x,S]=w.useState(""),[k,N]=w.useState(!0),[E,T]=w.useState(0),[A,M]=w.useState(!1),I=w.useRef(null),O=w.useRef(null),B=w.useRef(new Map),q=t[l],$=Ld(q),L=q.size>TI,Y=!L&&$!=="download";w.useEffect(()=>{const H=I.current,W=document.activeElement;return H.showModal(),()=>{H.close(),W!=null&&W.isConnected&&W.focus({preventScroll:!0})}},[]),w.useEffect(()=>{const H=new AbortController;return y(""),b(""),S(""),d("preview"),M(!1),N(Y),Y&&(Id($)?Ok(q,H.signal).then(b):Mk(q,H.signal).then(y)).then(()=>N(!1)).catch(W=>{H.signal.aborted||(S(Pt(W,"files.readError")),N(!1))}),()=>H.abort()},[q.id,E]),w.useEffect(()=>{O.current&&(O.current.scrollTop=B.current.get(`${l}:${u}`)??0)},[l,u,k]);const X=()=>{var H;return B.current.set(`${l}:${u}`,((H=O.current)==null?void 0:H.scrollTop)??0)},ue=H=>{X(),s(Math.max(0,Math.min(t.length-1,H)))},Z=w.useMemo(()=>$==="html"&&v?MI(v):null,[$,v]),U=Y&&["markdown","html"].includes($)&&!k&&!x,G=$==="image"||$==="svg"?"ui-image-view":$==="html"&&u==="preview"?"ui-html-view":$==="markdown"&&u==="preview"?"ui-document":"",R=c.jsxs("a",{className:"ui-button",href:xc(q),download:q.name,children:[c.jsx(De,{name:"cloud-download"}),j("files.downloadFile")]});return Jl.createPortal(c.jsxs("dialog",{ref:I,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":h||void 0,onCancel:H=>{H.preventDefault(),a()},onKeyDown:H=>{!["ArrowLeft","ArrowRight"].includes(H.key)||["SELECT","INPUT","TEXTAREA"].includes(H.target.tagName)||(H.preventDefault(),ue(l+(H.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:q.name}),c.jsxs("small",{children:[j(GI[$])," · ",Ak(q.size)]})]}),c.jsxs("div",{className:"ui-preview-actions",children:[U&&c.jsx("button",{type:"button",className:"ui-button",onClick:()=>{X(),d(u==="source"?"preview":"source")},children:j(u==="source"?"files.showPreview":$==="html"?"files.showSource":"files.showText")}),A&&c.jsx(ct,{icon:"window",label:j("files.openTab"),onClick:()=>window.open(q1(q),"_blank","noopener,noreferrer")}),c.jsx("a",{className:"ui-iconbtn",href:xc(q),download:q.name,"aria-label":j("files.download",{name:q.name}),title:j("files.download",{name:q.name}),children:c.jsx(De,{name:"cloud-download"})}),c.jsx(ct,{icon:h?"arrows-contract":"arrows-expand",label:j(h?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>m(!h)}),c.jsx(ct,{icon:"close",label:j("files.closePreview"),"data-action":"ui-close",onClick:a})]})]}),Z&&u==="preview"&&!k&&!x&&c.jsxs("div",{className:"jv-run-tip",role:"status",children:[c.jsx("p",{children:A?j("files.running"):j("files.scripts",{count:Z.count,hosts:Z.hosts.length?j("files.scriptHosts",{hosts:Z.hosts.slice(0,3).join(j("common.listSeparator"))+(Z.hosts.length>3?j("files.andMore"):"")}):""})}),c.jsx("button",{type:"button",className:"ui-button",onClick:()=>M(!A),children:j(A?"files.stop":"files.run")})]}),c.jsx("div",{className:`ui-preview-body ${G}`,ref:O,tabIndex:-1,children:Y?k?c.jsx("p",{className:"ui-unloaded",children:j("files.reading")}):x?c.jsxs("div",{className:"ui-error",role:"alert",children:[c.jsx("p",{children:x}),c.jsx("button",{type:"button",className:"ui-button",onClick:()=>T(H=>H+1),children:j("common.retry")})]}):Id($)?c.jsx("img",{className:"ui-preview-image",src:g,alt:q.name}):u==="source"||$==="text"?c.jsx("pre",{className:"ui-source",tabIndex:0,children:v}):$==="html"?A?c.jsx("iframe",{title:j("files.runningTitle",{name:q.name}),sandbox:"allow-scripts",src:q1(q),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):c.jsx("iframe",{title:q.name,sandbox:"",srcDoc:OI(v),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):c.jsx("article",{className:"ui-prose",children:c.jsx(_c,{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(L?"files.tooLarge":"files.unsupported")}),R]})}),t.length>1&&c.jsxs("footer",{className:"ui-preview-nav",children:[c.jsx(ct,{icon:"chevron-left",label:j("files.previous"),disabled:l===0,onClick:()=>ue(l-1)}),c.jsx("select",{id:"ui-preview-select","aria-label":j("files.choose"),value:l,onChange:H=>ue(Number(H.target.value)),children:t.map((H,W)=>c.jsx("option",{value:W,children:H.name},H.id))}),c.jsxs("span",{children:[l+1," / ",t.length]}),c.jsx(ct,{icon:"chevron-right",label:j("files.next"),disabled:l===t.length-1,onClick:()=>ue(l+1)})]})]}),document.body)}function QI({dialog:t,entryMenu:i,confirm:a,preview:l,infoBot:s,bots:u,statuses:d,chats:h,sections:m,members:v,connections:y,meId:g,onDialog:b,onEntryMenu:x,onConfirm:S,onPreview:k,onInfoBot:N,onSettings:E,onChannelInfo:T,onOpenChatId:A,chatSaved:M,openChat:I,onSectionSaved:O,onSectionDeleted:B,updateBot:q,openAnywhere:$,removeChannel:L,deleteBot:Y,pinChat:X,muteChat:ue}){return c.jsxs(c.Fragment,{children:[(t==null?void 0:t.kind)==="channel"&&c.jsx(FI,{sections:m,members:ra(v),bots:u,me:g,onClose:()=>b(null),onSaved:Z=>{M(Z),b(null),I(Z)}}),(t==null?void 0:t.kind)==="members"&&c.jsx(qI,{chat:h.find(Z=>Z.id===t.chat.id)??t.chat,members:ra(v),bots:u,onClose:()=>b(null),onChanged:M}),(t==null?void 0:t.kind)==="section"&&c.jsx(VI,{section:t.section,onClose:()=>b(null),onSaved:O,onDeleted:B}),i&&c.jsx(YI,{target:i.target,x:i.at.x,y:i.at.y,onClose:()=>x(null),onOpenBot:Z=>N(Z.id),onSettings:Z=>{Z.type==="channel"&&T(Z)},onPin:(Z,U)=>void X(Z,U),onMute:(Z,U)=>void ue(Z,U),onDeleteChat:Z=>S({kind:"chat",chat:Z}),onDeleteBot:Z=>S({kind:"bot",bot:Z})}),(a==null?void 0:a.kind)==="chat"&&c.jsx($k,{title:j("app.deleteChannelTitle",{name:a.chat.title}),confirm:j("common.delete"),onClose:()=>S(null),body:j("app.deleteChannelBody"),onConfirm:async()=>{await L(a.chat),S(null)}}),(a==null?void 0:a.kind)==="bot"&&c.jsx($I,{bot:a.bot,chats:h.filter(Z=>Z.type==="dm"&&Z.botId===a.bot.id).length,onClose:()=>S(null),onConfirm:async Z=>{await Y(a.bot,Z),S(null)}}),s&&c.jsx(EI,{bot:s,status:d[s.id],connections:y,chats:h,onSaved:q,onOpenChat:Z=>{N(null),A(Z)},onOpenSubscription:$,onManageModels:()=>{N(null),E()},onClose:()=>N(null)},s.id),l&&c.jsx(XI,{files:l.files,initialIndex:l.index,onClose:()=>k(null)})]})}function Yk(t,i,a){const[l,s]=w.useState(null),[u,d]=w.useState(!1);return w.useEffect(()=>{const h=t.trim();if(!h){s(null),d(!1);return}let m=!0;d(!0);const v=setTimeout(()=>void je.search(h,i).then(y=>{m&&s(y)}).catch(y=>{m&&a(y)}).finally(()=>{m&&d(!1)}),250);return()=>{m=!1,clearTimeout(v)}},[t,i]),{result:l,loading:u}}function Gk(t,i,a){var l;return t.type==="thread"?`#${((l=i.find(s=>s.id===t.parentId))==null?void 0:l.title)??j("search.channel")} › ${t.title}`:t.type==="channel"?`#${t.title}`:Ba(a.find(s=>s.id===t.botId))}function Xk({text:t,query:i,room:a=24}){const l=t.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-a),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 KI=t=>new Date(t).toDateString()===new Date().toDateString()?sc(t):jT(t);function Qk({message:t,chat:i,chats:a,members:l,query:s,showPlace:u=!0,onOpen:d}){return c.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>d(i,t.id),children:[c.jsxs("span",{className:"jv-hit-head",children:[c.jsx("strong",{children:Ba(l.find(h=>h.id===t.senderId))}),u&&c.jsx("span",{className:"jv-hit-place",children:Gk(i,a,l)}),c.jsx("time",{dateTime:new Date(t.createdAt).toISOString(),children:KI(t.createdAt)})]}),c.jsx("span",{className:"jv-hit-text",children:c.jsx(Xk,{text:rv(t),query:s})})]})}const Y1=5;function xd({label:t,items:i,empty:a}){const[l,s]=w.useState(!1);return!i.length&&!a?null:c.jsxs("section",{className:"jv-result-group","aria-label":t,children:[c.jsxs("h3",{className:"jv-result-head",children:[t,c.jsx("span",{children:i.length})]}),i.length?l?i:i.slice(0,Y1):c.jsx("p",{className:"jv-result-empty",children:a}),!l&&i.length>Y1&&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 ZI({query:t,shown:i,chats:a,members:l,onOpenChat:s,onOpenMessage:u,onError:d}){const{result:h,loading:m}=Yk(t,void 0,d),v=((h==null?void 0:h.chats)??[]).filter(g=>!i.has(g.id)),y=g=>{var b,x;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:Gk(g,a,l).split(" › ")[0]})]}),(((b=g.note)==null?void 0:b.text)||g.topic)&&c.jsx("span",{className:"jv-hit-text",children:c.jsx(Xk,{text:((x=g.note)==null?void 0:x.text)||g.topic,query:t})})]},g.id)};return c.jsxs("div",{className:"jv-results","aria-live":"polite",children:[c.jsx(xd,{label:j("search.threads"),items:v.filter(g=>g.type==="thread").map(y)}),c.jsx(xd,{label:j("search.channels"),items:v.filter(g=>g.type==="channel").map(y)}),h?c.jsx(xd,{label:j("search.messages"),empty:j("search.noMessages"),items:h.messages.map(({message:g,chat:b})=>c.jsx(Qk,{message:g,chat:b,chats:a,members:l,query:t,onOpen:u},g.id))}):m&&c.jsx("p",{className:"jv-result-empty",children:j("search.searching")})]})}function JI({className:t,...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",t),...i})}const WI=og("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 e8({className:t,align:i="inline-start",...a}){return c.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":i,className:nn(WI({align:i}),t),onClick:l=>{var s,u;l.target.closest("button")||(u=(s=l.currentTarget.parentElement)==null?void 0:s.querySelector("input"))==null||u.focus()},...a})}function t8({className:t,...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",t),...i})}function n8({className:t,children:i,...a}){return c.jsxs(Y_,{"data-slot":"scroll-area",className:nn("relative",t),...a,children:[c.jsx(G_,{"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(i8,{}),c.jsx(X_,{})]})}function i8({className:t,orientation:i="vertical",...a}){return c.jsx(z_,{"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",t),...a,children:c.jsx(U_,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const Kk="jarvy-collapsed-sections",a8=()=>{try{return JSON.parse(localStorage.getItem(Kk)??"[]")}catch{return[]}};function G1({chat:t}){return t.alerts>0?c.jsx("span",{className:"jv-badge","aria-label":j("sidebar.alerts",{count:t.alerts}),children:t.alerts}):t.unread>0?c.jsx("span",{className:"jv-count","aria-label":j("sidebar.unread",{count:t.unread}),children:t.unread}):null}function Zk(t){const i=t.hint;if(!i||i.createdAt<t.updatedAt-1e3)return null;const a=i.chatType==="thread"&&i.chatId!==t.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(a?"hint.reactionInThread":"hint.reaction",l):j(a?"hint.threadSummary":i.chatType==="thread"?"hint.summary":"hint.notice",l)}function r8(t){var i;return t.type==="channel"&&Zk(t)&&((i=t.hint)==null?void 0:i.chatType)==="thread"&&t.hint.chatId!==t.id?t.hint.chatId:null}function X1({chat:t,channel:i}){const a=Zk(t),l=t.lastMessage&&Dc(t.lastMessage),s=a??(l?i&&t.lastSender?j("sidebar.said",{name:t.lastSender,text:l}):l:i?t.topic:"");return c.jsxs("span",{className:"jv-digest",children:[t.atMe&&c.jsx("span",{className:"jv-at-me",children:j("sidebar.atMe")}),c.jsx("span",{className:a?"jv-hint-line":void 0,children:s})]})}const Q1=t=>{const i=t.getBoundingClientRect();return{x:i.right-168,y:i.bottom+4}};function l8({chats:t,sections:i,bots:a,members:l,onOpenMessage:s,onOpenFound:u,onError:d,working:h,asking:m,selected:v,filter:y,followed:g,followedOpen:b,onFilterChange:x,onSelect:S,onOpenBot:k,onOpenFollowed:N,onMenu:E,onEditSection:T}){const[A,M]=w.useState(a8),I=R=>M(H=>{const W=H.includes(R)?H.filter(D=>D!==R):[...H,R];return localStorage.setItem(Kk,JSON.stringify(W)),W}),O=y.toLocaleLowerCase(),B=t.filter(R=>{var H;return R.type!=="thread"&&`${R.title} ${R.topic} ${((H=a.find(W=>W.id===R.botId))==null?void 0:H.name)??""}`.toLocaleLowerCase().includes(O)}),q=g.reduce((R,H)=>R+H.unread,0),$=g.reduce((R,H)=>R+H.mentions,0),L=B.filter(R=>R.type==="channel").sort((R,H)=>Number(H.pinned)-Number(R.pinned)||R.title.localeCompare(H.title,"zh-CN")),Y=a.map(R=>({bot:R,chat:t.find(H=>H.type==="dm"&&H.botId===R.id)})).filter(({bot:R})=>R.name.toLocaleLowerCase().includes(O)).sort((R,H)=>{var W,D,ie,ne;return+!!((W=H.chat)!=null&&W.pinned)-+!!((D=R.chat)!=null&&D.pinned)||(((ie=H.chat)==null?void 0:ie.updatedAt)??0)-(((ne=R.chat)==null?void 0:ne.updatedAt)??0)}),X=R=>c.jsxs("div",{className:"jv-side-wrap",onContextMenu:H=>{H.preventDefault(),E({kind:"channel",chat:R},{x:H.clientX,y:H.clientY})},children:[c.jsxs("button",{type:"button",className:"jv-side-row","data-active":v===R.id||void 0,"data-unread":R.unread>0||void 0,"aria-current":v===R.id?"page":void 0,onClick:()=>S(R),children:[R.pinned?c.jsx(bp,{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:R.title,children:R.title}),R.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(X1,{chat:R,channel:!0}),c.jsx(G1,{chat:R})]})]})]}),c.jsx("button",{type:"button",className:"jv-side-more","aria-label":j("sidebar.more",{name:R.title}),onClick:H=>E({kind:"channel",chat:R},Q1(H.currentTarget)),children:c.jsx(px,{"aria-hidden":"true"})})]},R.id),ue=({bot:R,chat:H})=>{const W=m.has(R.id)?"asking":h.has(R.id)?"working":void 0,D=!!H&&v===H.id;return c.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:ie=>{ie.preventDefault(),E({kind:"dm",bot:R,chat:H},{x:ie.clientX,y:ie.clientY})},children:[c.jsxs(Ve,{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:()=>H?S(H):k(R),children:[c.jsx(Rc,{color:R.color,mood:R.mood,size:36,badge:W}),W&&c.jsx("span",{className:"sr-only",children:j(W==="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 ${H!=null&&H.unread?"font-semibold":"font-medium"}`,title:R.name,children:R.name}),(H==null?void 0:H.muted)&&c.jsx("span",{className:"jv-side-muted","aria-label":j("sidebar.muted"),children:c.jsx(De,{name:"bell-slash"})}),(H==null?void 0:H.pinned)&&c.jsx(bp,{className:"jv-dm-pin shrink-0","aria-label":j("sidebar.pinned")}),H&&c.jsx("time",{className:"shadcn-chat-time shrink-0 text-[11px] font-normal text-muted-foreground",dateTime:new Date(H.updatedAt).toISOString(),children:sc(H.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:H?c.jsx(X1,{chat:H,channel:!1}):""}),H&&c.jsx(G1,{chat:H})]})]})]}),c.jsx(Ve,{type:"button",variant:"ghost",size:"icon-xs","aria-label":j("sidebar.more",{name:R.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:ie=>E({kind:"dm",bot:R,chat:H},Q1(ie.currentTarget)),children:c.jsx(px,{"aria-hidden":"true"})})]},R.id)},Z=(R,H,W,D,ie)=>c.jsxs("div",{className:"jv-side-section-head",children:[c.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!W,onClick:()=>I(R),children:[c.jsx("span",{className:"jv-side-chevron",children:c.jsx(De,{name:W?"chevron-right":"chevron-down"})}),c.jsxs("span",{className:"jv-side-section-name",children:[H,W&&D&&c.jsx("span",{className:"jv-dot","aria-label":j("sidebar.hasUnread")})]})]}),ie&&c.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":j("sidebar.editSection",{name:H}),onClick:()=>T(ie),children:c.jsx(De,{name:"pencil"})})]}),U=R=>!O&&A.includes(R),G=(R,H,W,D)=>c.jsxs("div",{className:"jv-side-section",children:[Z(R,H,U(R),W.some(ie=>ie.unread>0),D),!U(R)&&W.map(X)]},R);return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:c.jsxs(JI,{className:"h-9 bg-background",children:[c.jsx(t8,{id:"jarvy-search",type:"search",value:y,onChange:R=>x(R.target.value),placeholder:j("sidebar.search"),"aria-label":j("sidebar.search"),onKeyDown:R=>{R.key==="Escape"&&y&&(R.preventDefault(),x(""))},className:"text-sm"}),c.jsx(e8,{align:"inline-start",children:c.jsx(wc,{"aria-hidden":"true"})})]})}),c.jsx(n8,{className:"min-h-0 flex-1",type:"auto",children:O?c.jsxs("nav",{className:"jv-side-nav jv-side-search px-3 pb-6","aria-label":j("sidebar.results"),children:[c.jsx(xd,{label:j("sidebar.chats"),items:[...L.map(X),...Y.map(ue)]}),c.jsx(ZI,{query:y,shown:new Set(L.map(R=>R.id)),chats:t,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":b||void 0,"data-unread":q>0||void 0,"aria-current":b?"page":void 0,onClick:N,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:$}):q>0&&c.jsx("span",{className:"jv-count",children:q})]}),i.map(R=>G(`s:${R.id}`,R.name,L.filter(H=>H.sectionId===R.id),R)),L.some(R=>!R.sectionId||!i.some(H=>H.id===R.sectionId))&&G("channels",j("sidebar.channels"),L.filter(R=>!R.sectionId||!i.some(H=>H.id===R.sectionId))),c.jsxs("div",{className:"jv-side-section",children:[Z("dms",j("sidebar.dms"),U("dms"),Y.some(({chat:R})=>!!(R!=null&&R.unread))),!U("dms")&&c.jsx("div",{className:"space-y-1",children:Y.map(ue)}),!U("dms")&&Y.length===0&&c.jsx("p",{className:"jv-side-empty",children:j("sidebar.noDms")})]})]})})]})}function o8({username:t,chats:i,sections:a,bots:l,members:s,followed:u,followedOpen:d,working:h,asking:m,selected:v,filter:y,creating:g,createMenu:b,accountMenu:x,onFilterChange:S,onOpenFollowed:k,onOpenChat:N,onOpenBot:E,onOpenMenu:T,onEditSection:A,onCreate:M,onFind:I,onOpenFound:O,onError:B,onToggleCreate:q,onToggleAccount:$,onSettings:L,onToggleTheme:Y,onLogOut:X}){const ue=w.useRef(null),Z=w.useRef(null);return w.useEffect(()=>{if(!x&&!b)return;const U=G=>{var R,H;x&&!((R=Z.current)!=null&&R.contains(G.target))&&$(!1),b&&!((H=ue.current)!=null&&H.contains(G.target))&&q(!1)};return document.addEventListener("pointerdown",U),()=>document.removeEventListener("pointerdown",U)},[x,b]),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:ue,children:[c.jsx(ct,{icon:"add",label:j("sidebar.create"),"aria-expanded":b,"aria-haspopup":"menu",disabled:g,onClick:()=>q(!b)}),b&&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:()=>M("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:()=>M("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:()=>M("bot"),children:[c.jsx(De,{name:"person-add"}),c.jsx("span",{className:"ui-menu-copy",children:j("sidebar.newBot")})]})]})]})}),c.jsx(l8,{chats:i,sections:a,bots:l,members:s,onOpenMessage:I,onOpenFound:O,onError:B,working:h,asking:m,selected:v,filter:y,onFilterChange:S,followed:u,followedOpen:d,onOpenFollowed:k,onSelect:N,onOpenBot:E,onMenu:T,onEditSection:A}),c.jsx("footer",{className:"ui-sidebar-footer",children:c.jsxs("button",{type:"button",className:"ui-footer-entry","aria-label":j("account.menuFor",{name:t}),"aria-expanded":x,onClick:()=>$(!x),children:[c.jsx("span",{className:"ui-user-avatar",children:t.slice(0,2).toUpperCase()}),c.jsx("span",{children:t}),c.jsx(De,{name:"chevron-down"})]})})]}),x&&c.jsxs("div",{ref:Z,className:"ui-popover jarvy-account-menu",role:"menu","aria-label":j("account.menu"),children:[c.jsx("div",{className:"ui-menu-note ui-small",children:t}),c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:L,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:X,children:[c.jsx(De,{name:"arrow-bracket-to-left"}),c.jsx("span",{className:"ui-menu-copy",children:j("account.signOut")})]})]})]})}function s8({textarea:t,value:i,setValue:a,inside:l,outside:s,bots:u,onInvite:d}){const[h,m]=w.useState(null),[v,y]=w.useState(0),[g,b]=w.useState(null),x=w.useRef(null),S=w.useRef(null),k=w.useRef(null);w.useLayoutEffect(()=>{k.current===null||!t.current||(t.current.focus(),t.current.setSelectionRange(k.current,k.current),k.current=null)},[i,t]);const N=(U,G)=>U.name.toLowerCase().includes(G.toLowerCase()),E=h===null?[]:l.filter(U=>N(U,h)),T=h===null?[]:s.filter(U=>N(U,h)),A=g?s.filter(U=>N(U,g.search)):[],M=E.length+(T.length?1:0),I=()=>{m(null),b(null)};function O(U=i){const G=t.current,R=G?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(U.slice(0,G.selectionStart)):null;m(R?R[1]:null),y(0),b(null)}function B(U){const G=t.current;if(!G)return;l.some(W=>W.id===U.id)||d(U);const R=i.slice(0,G.selectionStart).replace(/@([^\s@]*)$/u,`@${U.name} `),H=R+i.slice(G.selectionStart);k.current=R.length,a(H),I()}function q(U){g||b({search:h??"",active:0}),U&&requestAnimationFrame(()=>{var G;return(G=S.current)==null?void 0:G.focus()})}function $(){var U;b(null),(U=t.current)==null||U.focus()}function L(U){if(!M||U.nativeEvent.isComposing)return!1;const G=v===E.length;return U.key==="ArrowDown"||U.key==="ArrowUp"?(U.preventDefault(),y((v+(U.key==="ArrowDown"?1:-1)+M)%M),b(null),!0):(U.key==="Enter"||U.key==="Tab")&&!G?(U.preventDefault(),B(E[v]),!0):(U.key==="Enter"||U.key==="Tab"||U.key==="ArrowRight")&&G?(U.preventDefault(),q(!0),!0):U.key==="Escape"?(U.preventDefault(),I(),!0):!1}function Y(U){!g||U.nativeEvent.isComposing||((U.key==="ArrowDown"||U.key==="ArrowUp")&&A.length?(U.preventDefault(),b({...g,active:(g.active+(U.key==="ArrowDown"?1:-1)+A.length)%A.length})):U.key==="Enter"?(U.preventDefault(),A[g.active]&&B(A[g.active])):(U.key==="Escape"||U.key==="ArrowLeft"&&!g.search)&&(U.preventDefault(),$()))}const X=U=>{var R;const G=U.relatedTarget;(!G||!((R=x.current)!=null&&R.contains(G))&&G!==t.current)&&I()},ue=(U,G)=>c.jsxs("button",{type:"button",role:"option","aria-selected":G,className:"ui-menu-item","data-active":G||void 0,onMouseDown:R=>{R.preventDefault(),B(U)},children:[c.jsx(pr,{member:U,bots:u,size:20}),c.jsx("span",{className:"ui-menu-copy",children:U.name}),c.jsx("span",{className:"jv-muted",children:U.kind==="bot"?"Bot":j("common.member")})]},U.id);return{menu:M>0?c.jsxs("div",{ref:x,className:"jv-mention-box","data-side":g?"":void 0,onBlur:X,children:[c.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":j("mention.menu"),children:[E.map((U,G)=>ue(U,G===v)),T.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),q(!1)},onMouseDown:U=>{U.preventDefault(),y(E.length),q(!0)},children:[c.jsx("span",{className:"ui-menu-copy",children:j("mention.outside")}),c.jsx("span",{className:"jv-muted",children:T.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:U=>{U.preventDefault(),$()},children:c.jsx(De,{name:"chevron-left"})}),c.jsx("input",{ref:S,type:"search",value:g.search,placeholder:j("common.searchMembers"),"aria-label":j("mention.searchOutside"),onChange:U=>b({search:U.target.value,active:0}),onKeyDown:Y})]}),c.jsx("div",{className:"jv-mention-side-list",children:A.length?A.map((U,G)=>ue(U,G===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:O,onKeyDown:L,close:I,leaves:X}}const K1={text:null,files:[],quote:null,passages:[],key:null,signature:null,sending:!1};class c8{constructor(i){ec(this,"drafts",new Map);ec(this,"listeners",new Set);ec(this,"timer",null);ec(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));this.storageKey=i;try{const a=JSON.parse(localStorage.getItem(i)??"{}");for(const[l,s]of Object.entries(a))this.drafts.set(l,{...K1,...s,sending:!1})}catch{localStorage.removeItem(i)}}get(i){return this.drafts.get(i)??K1}update(i,a){const l=this.get(i),s=typeof a=="function"?a(l):a;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 a;this.timer&&(clearTimeout(this.timer),this.timer=null);const i={};for(const[l,{sending:s,...u}]of this.drafts)((a=u.text)!=null&&a.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 a=[...this.drafts.values()].flatMap(l=>l.files);await Promise.all(a.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 u8=t=>`jarvy-drafts:${t}`;function Jk(t,i,a){t.update(i.chatId,{quote:{id:i.id,name:Ba(a.find(l=>l.id===i.senderId)),text:rv(i).replace(/\s+/g," ").slice(0,160)}})}function d8(t,i){return w.useSyncExternalStore(t.subscribe,()=>t.get(i))}const Z1=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");function Wk({chatId:t,id:i,drafts:a,placeholder:l,disabled:s=!1,mention:u,initialText:d,formRef:h,scrollRef:m,onSend:v,onError:y,onNotice:g}){const b=d8(a,t),x=b.sending,[S,k]=w.useState([]),[N,E]=w.useState(!1),T=S.filter(R=>R.chatId===t),A=T.length>0,M=w.useRef(null),I=b.text??d??"",O=b.files,B=b.quote,q=R=>a.update(t,{text:R}),$=s8({textarea:M,value:I,setValue:q,inside:(u==null?void 0:u.inside)??[],outside:(u==null?void 0:u.outside)??[],bots:(u==null?void 0:u.bots)??[],onInvite:R=>u==null?void 0:u.onInvite(R)});async function L(R){const H=t;if(!R.length)return;if(A){g(j("composer.busy"));return}if(O.length+R.length>5){g(j("composer.tooMany",{count:5}));return}if(R.some(ne=>ne.size===0||ne.size>10*1024*1024)){g(j("composer.size"));return}const W=R.map(ne=>({key:Z1(),chatId:H,name:ne.name,done:0})),D=W.map(ne=>ne.key),ie=(ne,P)=>k(F=>F.map(fe=>fe.key===ne?{...fe,done:P}:fe));k(ne=>[...ne,...W]);try{for(const[ne,P]of R.entries()){const F=D[ne],fe=await je.uploadAttachment(H,P,ye=>ie(F,ye));a.update(H,ye=>({files:[...ye.files,fe]})),k(ye=>ye.filter(Se=>Se.key!==F))}}catch(ne){y(ne)}finally{k(ne=>ne.filter(P=>!D.includes(P.key)))}}async function Y(R){const H=t;try{await je.removeAttachment(R),a.update(H,W=>({files:W.files.filter(D=>D.id!==R)}))}catch(W){y(W)}}function X(R){const H=[...R.clipboardData.files];if(!H.length)return;R.preventDefault();const W=new Date().toISOString().replace(/\D/g,"").slice(0,14);L(H.map((D,ie)=>D.type.startsWith("image/")&&/^image\.\w+$/.test(D.name)?new File([D],`${j("composer.pasted")}-${W}${H.length>1?`-${ie+1}`:""}.${D.name.split(".").pop()}`,{type:D.type}):D))}const ue=R=>R.dataTransfer.types.includes("Files");function Z(R){!ue(R)||s||(R.preventDefault(),R.dataTransfer.dropEffect="copy",E(!0))}function U(R){ue(R)&&(R.preventDefault(),E(!1),s||L([...R.dataTransfer.files]))}async function G(R){R==null||R.preventDefault();const H=t,W=a.get(H),D=(W.text??d??"").trim(),ie=W.files,ne=W.quote,P=W.passages,fe=[P.map((re,be)=>`[[q${be+1}]]`).join(`
495
- `),D].filter(Boolean).join(`
496
-
497
- `);if(!fe&&!ie.length||W.sending||A||s)return;const ye=JSON.stringify([fe,ie.map(re=>re.id),(ne==null?void 0:ne.id)??null,P]),Se=W.signature===ye&&W.key?W.key:Z1();a.update(H,{key:Se,signature:ye,sending:!0});try{await v(fe,ie.map(re=>re.id),Se,ne==null?void 0:ne.id,P.map(({messageId:re,text:be})=>({messageId:re,text:be}))),a.update(H,re=>{var be;return{text:(re.text??d??"").trim()===D?"":re.text,passages:re.passages.filter(le=>!P.includes(le)),files:re.files.filter(le=>!ie.some(se=>se.id===le.id)),quote:((be=re.quote)==null?void 0:be.id)===(ne==null?void 0:ne.id)?null:re.quote,key:null,signature:null}})}catch(re){y(re)}finally{a.update(H,{sending:!1})}}return w.useLayoutEffect(()=>{const R=()=>{const H=M.current,W=m==null?void 0:m.current;if(!H)return;const D=W==null?void 0:W.scrollTop;H.style.height="auto",H.style.height=`${H.scrollHeight}px`,W&&D!==void 0&&W.scrollTop!==D&&W.scrollTo({top:D,behavior:"instant"})};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[I,t,m]),c.jsxs("form",{ref:h,className:`ui-compose-wrap${N?" jarvy-dropping":""}`,onSubmit:R=>void G(R),onDragEnter:Z,onDragOver:Z,onDragLeave:R=>{R.currentTarget.contains(R.relatedTarget)||E(!1)},onDrop:U,children:[O.length+T.length>0&&c.jsxs("div",{className:"jarvy-pending-files",children:[O.map(R=>c.jsxs("span",{className:"jarvy-file-chip",children:[c.jsx(De,{name:"paperclip"}),c.jsx("span",{title:R.name,children:R.name}),c.jsx("button",{type:"button","aria-label":j("composer.removeFile",{name:R.name}),onClick:()=>void Y(R.id),children:"×"})]},R.id)),T.map(R=>c.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[c.jsx(De,{name:"paperclip"}),c.jsx("span",{title:R.name,children:R.name}),c.jsx("span",{className:"jarvy-file-progress",role:"progressbar","aria-label":j("composer.uploading",{name:R.name}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(R.done*100),children:c.jsx("span",{style:{width:`${R.done*100}%`}})})]},R.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:()=>a.update(t,{quote:null}),children:"×"})]}),c.jsx(LI,{quotes:b.passages,onRemove:R=>a.update(t,H=>({passages:H.passages.filter((W,D)=>D!==R)}))}),c.jsxs("div",{className:"ui-composer jv-composer",children:[u&&$.menu,N&&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:x||A||s||O.length>=5,onChange:R=>{const H=[...R.target.files??[]];R.target.value="",L(H)}})]}),c.jsx("textarea",{ref:M,id:i,rows:1,maxLength:32e3,value:I,onPaste:X,placeholder:l,disabled:s,"aria-label":j("composer.input"),onChange:R=>{q(R.target.value),u&&$.track(R.target.value)},onKeyDown:R=>{u&&$.onKeyDown(R)||R.key==="Enter"&&!R.shiftKey&&!R.nativeEvent.isComposing&&(R.preventDefault(),G())},onClick:()=>{u&&$.track()},onBlur:u?$.leaves:void 0}),c.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":j("composer.send"),disabled:x||A||s||!I.trim()&&!O.length&&!b.passages.length,children:c.jsx(De,{name:"arrow-up"})})]})]})}function f8({messages:t,members:i,me:a,activeQuestion:l,onSettled:s,onPreview:u,onQuote:d,onReact:h,onJump:m,onError:v,bot:y}){return c.jsx(c.Fragment,{children:t.map((g,b)=>{const x=t[b+1],S=g.role==="assistant"&&!!(x!=null&&x.question)&&x.senderId===g.senderId;return c.jsxs("div",{className:`ui-message-row ${g.role==="user"?"ui-user":""}`,"data-message":g.id,"data-asks":S||void 0,tabIndex:-1,children:[g.role==="assistant"&&c.jsx("span",{className:"jarvy-bubble-avatar",children:c.jsx(Rc,{color:(y==null?void 0:y.color)??"gray",mood:y==null?void 0:y.mood,size:22})}),c.jsxs("div",{className:"jv-dm-stack",children:[g.replyTo&&c.jsx(Hk,{message:g,members:i,onJump:m}),g.question?c.jsx(Rk,{message:{...g,question:g.question},keyboard:g.id===l,onSettled:s}):c.jsxs("div",{className:"ui-bubble",children:[g.content&&c.jsx(Lk,{message:g,members:i,me:a,onJump:m}),g.attachments.length>0&&c.jsx(_k,{files:g.attachments,onOpen:k=>u(g.attachments,k)})]}),c.jsx(Uk,{message:g,me:a,members:i,onReact:h,onError:v})]}),c.jsx("div",{className:"jv-row-actions",children:c.jsx(qk,{message:g,me:a,onReply:d,onReact:h,onError:v})})]},g.id)})})}const jd="src/web/thread/ThreadPane.tsx",Pd="npm run build",h8=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
498
- `),m8=["> 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(`
499
- `),eC={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},p8=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:jd,ms:2600,output:h8},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:jd,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
500
- `)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:Pd,ms:3200,failed:!0,output:m8},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:jd,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:Pd,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
501
- `)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...eC},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],Jp=[{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",...eC}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:jd}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:Pd}},{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:Pd,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function g8({demo:t,onReplay:i,toolbar:a}){const[l,s]=w.useState(!1);return c.jsxs("div",{ref:a,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(gA,{})}),c.jsxs(Xl,{value:t.baseMood,onValueChange:u=>t.setBaseMood(u),children:[c.jsx(Kl,{className:"jv-npc-mood","aria-label":j("npc.mood"),title:j("npc.mood"),children:c.jsx(Ql,{})}),c.jsx(Zl,{className:"jv-select-menu",position:"popper",sideOffset:4,children:xI.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(yA,{}),j("npc.poses")]})]}),l&&c.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":j("npc.poses"),children:Jp.map(u=>{var d;return c.jsx("button",{type:"button","aria-pressed":((d=t.pose)==null?void 0:d.key)===u.key,onClick:()=>t.hold(u.key),children:j(u.label)},u.key)})})]})}function v8(t,i,a,l,s){const h=i.offsetWidth,m=i.offsetLeft,v=i.offsetTop;t.style.maxHeight="";const y=t.offsetWidth,g=m-10-8,b=a-(m+h)-10-8,x=y<=g?"left":y<=b?"right":v+h/2<l/2?"below":"above",S=x==="left"?m-10-y:x==="right"?m+h+10:Math.min(Math.max(8,m+h-y),Math.max(8,a-y-8)),k=s&&S<s.right&&S+y>s.left?s.bottom+6:8;let N;x==="below"?(N=v+h+10,t.style.maxHeight=`${Math.max(120,l-N-8)}px`):x==="above"?(t.style.maxHeight=`${Math.max(120,v-10-k)}px`,N=Math.max(k,v-10-t.offsetHeight)):(t.style.maxHeight=`${Math.max(120,l-k-8)}px`,N=Math.min(Math.max(k,v+6),Math.max(k,l-t.offsetHeight-8))),t.style.left=`${S}px`,t.style.top=`${N}px`,t.dataset.side=x;const E=x==="below"||x==="above";t.style.setProperty("--npc-tail",E?`${Math.min(y-18,Math.max(18,m+h/2-S))}px`:`${Math.min(t.offsetHeight-18,Math.max(18,v+h/2-N))}px`)}const tC={think:HT,mutter:jA,read:XT,write:dA,run:SA,compact:zT,ask:nA,say:aA},Wp=t=>j("npc.duration",{value:Zo(t/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),nC=t=>t.to?`#${j(t.to)}`:"";function iC(t){var l;if(t.kind==="think"||t.kind==="mutter")return j(`npc.step.${t.kind}`);if(t.kind==="ask"&&t.answer)return j("npc.step.ask.ok",{answer:j(t.answer.label)});const i=t.state==="failed"&&t.kind==="run"?"failed":t.state==="running"?"running":"ok",a=t.kind==="say"&&t.to?"post":t.kind;return j(`npc.step.${a}.${i}`,{target:((l=t.target)==null?void 0:l.split("/").pop())??"",chat:nC(t)})}const Sd=t=>t.text?[...j(t.text)].slice(0,t.typed).join(""):"";function y8(t){const i=t.split(new RegExp("(?<=[。!?.!?…])\\s*")).filter(Boolean);return{index:Math.max(0,i.length-1),sentence:i.at(-1)??""}}const b8={think:"thought",mutter:"mutter",say:"speech",ask:"speech",read:"action",write:"action",run:"action",compact:"action"};function x8({demo:t,name:i,cat:a,area:l,avoid:s,layout:u}){var N;const d=w.useRef(null),h=w.useRef(null),[m,v]=w.useState(!1),[,y]=w.useState(0);w.useLayoutEffect(()=>{u.current=()=>{var I;if(!d.current||!a.current||!l.current)return;const T=l.current.getBoundingClientRect(),A=s.current?s.current.getBoundingClientRect().top-T.top:T.height,M=(I=h.current)==null?void 0:I.getBoundingClientRect();v8(d.current,a.current,T.width,A,M?{left:M.left-T.left,right:M.right-T.left,bottom:M.bottom-T.top}:null)},u.current();const E=new ResizeObserver(()=>{var T;return(T=u.current)==null?void 0:T.call(u)});for(const T of[d.current,h.current])T&&E.observe(T);return()=>{E.disconnect(),u.current=null}},[m]);const g=t.steps.some(E=>E.state==="running");w.useEffect(()=>{if(!m||!g)return;const E=setInterval(()=>y(T=>T+1),200);return()=>clearInterval(E)},[m,g]),w.useEffect(()=>{if(!m)return;const E=T=>{T.key==="Escape"&&v(!1)};return addEventListener("keydown",E),()=>removeEventListener("keydown",E)},[m]);const b=t.shown,x=b?b8[b.kind]:t.done?"action":null;let S=null;if((b==null?void 0:b.kind)==="think"){const{index:E,sentence:T}=y8(Sd(b));S=c.jsxs("span",{className:"jv-npc-thought",children:[T,b.state==="running"&&c.jsx("i",{className:"jv-npc-caret"})]},E)}else if((b==null?void 0:b.kind)==="mutter")S=c.jsx("span",{className:"jv-npc-murmur",children:j("npc.mutter",{text:Sd(b)})});else if((b==null?void 0:b.kind)==="say")S=c.jsxs("span",{className:"jv-npc-speech",children:[Sd(b),b.state==="running"&&c.jsx("i",{className:"jv-npc-caret"})]});else if((b==null?void 0:b.kind)==="ask")S=c.jsx("span",{className:"jv-npc-speech",children:j(b.question)});else if(b){const E=tC[b.kind];S=c.jsxs("span",{className:"jv-npc-action","data-state":b.state,children:[c.jsx(E,{}),iC(b),b.state==="running"&&c.jsx("i",{className:"jv-npc-dots"})]})}else t.done&&(S=c.jsxs("span",{className:"jv-npc-action","data-state":"ok",children:[c.jsx(sr,{}),j("npc.done",{duration:Wp(t.done.ms)})]}));const k=!t.pose&&t.steps.length>0;return c.jsxs(c.Fragment,{children:[c.jsx(g8,{demo:t,toolbar:h,onReplay:()=>{v(!1),t.replay()}}),c.jsx("div",{ref:d,className:"jv-npc","data-open":m||void 0,"data-look":m?void 0:x??void 0,"data-phase":t.phase,"data-kind":b==null?void 0:b.kind,"data-fading":!m&&!b&&((N=t.done)==null?void 0:N.fading)||void 0,hidden:!m&&!S,children:m?c.jsxs("section",{className:"jv-npc-panel","aria-label":j("npc.panel"),children:[c.jsxs("header",{children:[c.jsx("strong",{children:j("npc.panel")}),t.startedAt>0&&c.jsx("span",{children:Wp((t.endedAt??Date.now())-t.startedAt)}),c.jsx("button",{type:"button",onClick:()=>v(!1),"aria-label":j("npc.collapse"),title:j("npc.collapse"),children:c.jsx(oA,{})})]}),c.jsx("ol",{children:t.steps.map(E=>c.jsx(j8,{step:E},E.id))})]}):c.jsxs(c.Fragment,{children:[x==="speech"&&c.jsxs("span",{className:"jv-npc-name",children:[i,(b==null?void 0:b.to)&&c.jsx("em",{children:j("npc.to",{chat:nC(b)})})]}),k?c.jsx("button",{type:"button",className:"jv-npc-line",onClick:()=>v(!0),title:j("npc.expand"),children:S}):c.jsx("div",{className:"jv-npc-line",children:S}),(b==null?void 0:b.kind)==="ask"&&b.state==="running"&&c.jsx("div",{className:"jv-npc-options",children:b.options.map(E=>c.jsx("button",{type:"button",onClick:()=>t.answer(E.value),children:j(E.label)},E.value))})]})})]})}function j8({step:t}){const[i,a]=w.useState(!1),l=tC[t.kind],s=t.kind==="ask"?j(t.question):t.text?Sd(t):t.output;return c.jsxs("li",{"data-state":t.state,children:[c.jsxs("button",{type:"button","aria-expanded":s?i:void 0,disabled:!s,onClick:()=>a(u=>!u),children:[c.jsx(l,{className:"jv-npc-kind"}),c.jsx("span",{className:"jv-npc-title",children:iC(t)}),c.jsxs("span",{className:"jv-npc-state",children:[t.state==="running"?c.jsx(J2,{}):t.state==="ok"?c.jsx(sr,{}):c.jsx(qd,{}),j(`npc.state.${t.state}`)]}),c.jsx("span",{className:"jv-npc-time",children:Wp((t.endedAt??Date.now())-t.startedAt)}),s&&c.jsx(Xr,{className:"jv-npc-chevron"})]}),i&&s&&c.jsx("pre",{"data-kind":t.kind,children:s})]})}const cp={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},S8=40,J1=6e3,W1=500,w8={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class up extends Error{}const k8=t=>({...t,id:-1,state:t.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:t.text?[...j(t.text)].length:0});function C8(t,i){const[a,l]=w.useState(cp),[s,u]=w.useState(i),[d,h]=w.useState(0),[m,v]=w.useState(null),[,y]=w.useState(0),g=w.useRef(null);w.useEffect(()=>{if(!t||m)return;let T=!0;const A=new Set,M=q=>new Promise(($,L)=>{const Y=setTimeout(()=>{A.delete(Y),T?$():L(new up)},q);A.add(Y)}),I=(q,$)=>l(L=>({...L,steps:L.steps.map(Y=>Y.id===q?{...Y,...$}:Y)})),O=(q,$)=>l(L=>({...L,flash:{mood:q,until:Date.now()+$}})),B=async(q,$,L)=>{const Y=[...j($)].length,X=L?Math.max(16,L/Y):S8;for(let ue=1;ue<=Y;ue++)I(q,{typed:ue}),await M(X)};return(async()=>{l({...cp}),await M(700);const q=Date.now();let $="";l(Y=>({...Y,phase:"turn",startedAt:q}));for(const[Y,X]of p8.entries()){const{ms:ue,failed:Z,replies:U,...G}=X,R=U?U[$]:X.text;if(l(H=>({...H,steps:[...H.steps,{...G,text:R,id:Y,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),X.kind==="ask"){if($=await new Promise(H=>{g.current=H}),g.current=null,!T)throw new up;I(Y,{state:"ok",endedAt:Date.now(),answer:X.options.find(H=>H.value===$)});continue}R?await B(Y,R,X.kind==="think"?ue??null:null):await M(ue??1e3),(X.kind==="mutter"||X.kind==="say")&&await M(1100),I(Y,{state:Z?"failed":"ok",endedAt:Date.now()}),Z&&(l(H=>({...H,shake:H.shake+1})),O("dizzy",2600),await M(900))}const L=Date.now();for(l(Y=>({...Y,phase:"stretch",endedAt:L,recapUntil:L+J1})),L-q>2e4&&O("happy",3200),await M(2200);;)l(Y=>({...Y,phase:"idle"})),await M(9e3),l(Y=>({...Y,phase:"groom"})),await M(2800)})().catch(q=>{if(!(q instanceof up))throw q}),()=>{var q;T=!1;for(const $ of A)clearTimeout($);(q=g.current)==null||q.call(g,"")}},[t,d,m]),w.useEffect(()=>{var I;const T=Date.now(),A=[((I=a.flash)==null?void 0:I.until)??0,a.recapUntil-W1,a.recapUntil].filter(O=>O>T);if(!A.length)return;const M=setTimeout(()=>y(O=>O+1),Math.min(...A)-T+20);return()=>clearTimeout(M)});const b=Jp.find(T=>T.key===m)??null,x=Date.now(),S=b?null:a.phase==="turn"?[...a.steps].reverse().find(T=>T.state==="running")??null:null,k=b?b.motion:S?w8[S.kind]:a.phase==="stretch"?"stretch":a.phase==="groom"?"groom":a.phase==="turn"?"think":"idle",N=a.flash&&a.flash.until>x?a.flash.mood:null,E=a.endedAt!==null&&x<a.recapUntil;return{...a,pose:b,motion:k,fast:b?!!b.fast:(S==null?void 0:S.kind)==="write"||(S==null?void 0:S.kind)==="run",mood:(b==null?void 0:b.mood)??N??s,baseMood:s,setBaseMood:u,shown:b?b.step?k8(b.step):null:S??(a.phase==="turn"?a.steps.at(-1)??null:null),done:b!=null&&b.done?{ms:31400,fading:!1}:!b&&E?{ms:a.endedAt-a.startedAt,fading:x>=a.recapUntil-W1}:null,canRecap:!b&&a.endedAt!==null&&!E,showRecap:()=>l(T=>({...T,recapUntil:Date.now()+J1})),answer:T=>{var A;return(A=g.current)==null?void 0:A.call(g,T)},replay:()=>{v(null),h(T=>T+1)},hold:T=>{v(T),l(A=>{var M;return{...cp,shake:A.shake+((M=Jp.find(I=>I.key===T))!=null&&M.shake?1:0)}})}}}const aC="jarvy-floating-bot",Yo=10,N8=4,oc=new URLSearchParams(location.search).get("npc")==="demo";function E8(t){return!t||t.status==="stop"?{motion:"sleep",fast:!1}:t.status!=="running"||t.activity==="asking"?{motion:"idle",fast:!1}:["compacting","retrying","aborting"].includes(t.phase)?{motion:"busy",fast:!1}:t.activity==="tool_calling"||t.phase==="tool"?{motion:"work",fast:!0}:t.activity==="texting"||t.phase==="texting"?{motion:"work",fast:!1}:{motion:"think",fast:!1}}function T8(){try{const t=JSON.parse(localStorage.getItem(aC)??"");if(t.x>=0&&t.x<=1&&t.y>=0&&t.y<=1)return t}catch{}return{x:1,y:0}}function A8({bot:t,status:i,area:a,avoid:l,onOpen:s}){const u=w.useRef(null),d=w.useRef(null),h=w.useRef(T8()),m=w.useRef(null),v=w.useRef(!1),y=w.useRef(null),g=w.useRef({motion:"sleep",mood:"normal",lookX:0,lookY:0}),b=w.useRef(null),[x,S]=w.useState(!1),k=C8(oc,t.mood),N=w.useRef(null),{motion:E,fast:T}=oc?k:E8(i);g.current.motion=E,g.current.fast=T,g.current.mood=oc?k.mood:t.mood;function A(){const O=a.current.getBoundingClientRect(),B=u.current.offsetWidth,q=l.current?l.current.getBoundingClientRect().top-O.top:O.height,$=Math.max(Yo,O.width-B-Yo),L=Math.max(Yo,q-B-Yo);return{minX:Yo,minY:Yo,maxX:$,maxY:L}}function M(){var q;if(!u.current||!a.current)return;const O=A(),B=u.current;B.style.left=`${O.minX+h.current.x*(O.maxX-O.minX)}px`,B.style.top=`${O.minY+h.current.y*(O.maxY-O.minY)}px`,(q=N.current)==null||q.call(N)}w.useLayoutEffect(()=>{M();const O=new ResizeObserver(M);for(const B of[a.current,l.current,u.current])B&&O.observe(B);return()=>O.disconnect()},[]),w.useEffect(()=>{var O;(O=b.current)==null||O.setColor((Vi[t.color]??Vi.gray).hex)},[t.color]);const I=i!=null&&i.error?`${i.runId??""}:${i.error}`:null;return w.useEffect(()=>{var O;I&&((O=b.current)==null||O.shake(performance.now()))},[I]),w.useEffect(()=>{var O;k.shake&&((O=b.current)==null||O.shake(performance.now()))},[k.shake]),w.useEffect(()=>{const O=$=>{($.pointerType==="mouse"||$.type==="pointerdown")&&(y.current={x:$.clientX,y:$.clientY})},B=$=>{$.relatedTarget||(y.current=null)},q=$=>{const L=$.target;if(L.id!=="jarvy-composer")return;const Y=L.getBoundingClientRect();y.current={x:Y.left+Y.width/2,y:Y.top+Y.height/2}};return window.addEventListener("pointermove",O),window.addEventListener("pointerdown",O),document.addEventListener("pointerout",B),document.addEventListener("input",q),document.addEventListener("focusin",q),()=>{window.removeEventListener("pointermove",O),window.removeEventListener("pointerdown",O),document.removeEventListener("pointerout",B),document.removeEventListener("input",q),document.removeEventListener("focusin",q)}},[]),w.useEffect(()=>{let O=!0,B=0,q=()=>{};const $=matchMedia("(prefers-reduced-motion: reduce)");return Promise.all([zd(()=>import("./three.module-BdMZo7zQ.js"),[]),zd(()=>import("./figure-DBBkOPNl.js"),[])]).then(([L,Y])=>{if(!O||!d.current)return;const X=new L.WebGLRenderer({canvas:d.current,antialias:!0,alpha:!0});Y.configureRenderer(L,X);const{scene:ue,camera:Z}=Y.createStage(L),U=new Y.CatFigure(L,(Vi[t.color]??Vi.gray).hex);U.pose(g.current.mood),ue.add(U.root),Y.frameCamera(Z,1,3.3),b.current=U;let G=0;const R=W=>{const D=u.current;if(D){const ie=Math.round(D.offsetWidth*Math.min(2,devicePixelRatio||1));ie!==G&&(G=ie,X.setSize(ie,ie,!1));const ne=D.getBoundingClientRect(),P=y.current;g.current.lookX=P?Math.max(-1,Math.min(1,(P.x-ne.left-ne.width/2)/320)):0,g.current.lookY=P?Math.max(-1,Math.min(1,(P.y-ne.top-ne.height/2)/320)):0,g.current.reduced=$.matches,U.frame(W,g.current),X.render(ue,Z)}B=requestAnimationFrame(R)},H=()=>{cancelAnimationFrame(B),document.hidden||(B=requestAnimationFrame(R))};document.addEventListener("visibilitychange",H),H(),S(!0),q=()=>{document.removeEventListener("visibilitychange",H),cancelAnimationFrame(B),U.dispose(),X.dispose(),X.forceContextLoss(),b.current=null}}).catch(()=>{}),()=>{O=!1,q()}},[]),c.jsxs(c.Fragment,{children:[c.jsxs("button",{ref:u,type:"button",className:"jv-floating-bot","data-live":x||void 0,title:t.name,"aria-label":j("avatar.openInfo",{name:t.name}),onPointerDown:O=>{if(O.button!==0)return;const B=O.currentTarget;B.setPointerCapture(O.pointerId),m.current={id:O.pointerId,x:O.clientX,y:O.clientY,left:B.offsetLeft,top:B.offsetTop,moved:!1}},onPointerMove:O=>{const B=m.current;if(!B||B.id!==O.pointerId)return;const q=O.clientX-B.x,$=O.clientY-B.y;if(!B.moved&&Math.hypot(q,$)<N8)return;B.moved=!0;const L=A(),Y=Math.min(L.maxX,Math.max(L.minX,B.left+q)),X=Math.min(L.maxY,Math.max(L.minY,B.top+$));h.current={x:L.maxX>L.minX?(Y-L.minX)/(L.maxX-L.minX):0,y:L.maxY>L.minY?(X-L.minY)/(L.maxY-L.minY):0},M()},onPointerUp:O=>{const B=m.current;!B||B.id!==O.pointerId||(m.current=null,v.current=B.moved,B.moved&&localStorage.setItem(aC,JSON.stringify(h.current)))},onPointerCancel:()=>{m.current=null},onClick:()=>{if(v.current){v.current=!1;return}oc&&k.canRecap?k.showRecap():s()},style:{"--jv-avatar-size":"100%"},children:[c.jsx("canvas",{ref:d,"aria-hidden":"true"}),!x&&c.jsx(Rc,{color:t.color,mood:t.mood,size:88})]}),oc&&c.jsx(x8,{demo:k,name:t.name,cat:u,area:a,avoid:l,layout:N})]})}function M8({className:t,...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",t),...i})}function O8({className:t,...i}){return c.jsx("div",{"data-slot":"card-header",className:nn("grid gap-1 px-5",t),...i})}function _8({className:t,...i}){return c.jsx("div",{"data-slot":"card-title",className:nn("font-semibold leading-none",t),...i})}function R8({className:t,...i}){return c.jsx("div",{"data-slot":"card-content",className:nn("px-5",t),...i})}function D8({bot:t,connections:i,onSaved:a,onManage:l}){return c.jsxs(M8,{className:"jarvy-model-picker jv-ui",children:[c.jsx(O8,{children:c.jsx(_8,{children:j("botModel.pickFor",{name:t.name})})}),c.jsx(R8,{children:c.jsx(Nk,{bot:t,connections:i,onSaved:a,onManage:l})})]})}function z8({chat:t,inChannel:i,bots:a,members:l,meId:s,drafts:u,composeReady:d,botName:h,activeBot:m,status:v,connections:y,activity:g,history:b,divider:x,activeQuestion:S,pane:k,onPane:N,onToggleInfo:E,find:T,onNav:A,onBot:M,hasBotDirects:I,onInvite:O,onQuote:B,onReply:q,onReact:$,onJump:L,onSettled:Y,onSend:X,onPreview:ue,onSaveNote:Z,notice:U,createBot:G,creating:R,updateBot:H,onManageModels:W,error:D,chatArea:ie,transcript:ne,composeWrap:P,hidden:F,onOpenThread:fe}){const{messages:ye,loading:Se,hasOlder:re,loadingOlder:be,top:le,away:se,unseen:he,toLatest:Ne}=b;return c.jsxs("main",{className:"ui-chat","aria-label":j("chat.area"),ref:ie,hidden:F,children:[!i&&c.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:j("common.openNav"),onClick:A}),!i&&I&&c.jsx(ct,{icon:"people",className:"jv-floating-dms",label:j("chat.botDms",{name:h}),"aria-pressed":(k==null?void 0:k.kind)==="botdms",onClick:()=>N((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}),t?c.jsxs(c.Fragment,{children:[i?c.jsx(HI,{chat:t,members:ra(l),bots:a,onNav:A,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:()=>N((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"?N(null):T.search(t)}):m&&c.jsx(A8,{bot:m,status:v,area:ie,avoid:P,onOpen:()=>M(m.id)}),i&&c.jsx(UI,{chat:t,onSave:Z}),c.jsxs("div",{className:`ui-transcript jarvy-transcript${i?" jv-channel-transcript":""}`,ref:ne,"aria-label":j("chat.transcript"),role:"log",children:[!i&&!(m!=null&&m.connectionId)&&m&&c.jsx("div",{className:"jarvy-model-onboarding",children:c.jsx(D8,{bot:m,connections:y,onSaved:H,onManage:W})}),Se?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:h})})}):null:c.jsxs(c.Fragment,{children:[re&&c.jsx("div",{ref:le,className:"jv-history-more","aria-live":"polite",children:be?j("chat.loadingOlder"):""}),c.jsx("p",{className:"jarvy-date-stamp",children:Pa(ye[0].createdAt,{year:"numeric",month:"long",day:"numeric"})}),i?c.jsx(Bd,{messages:ye,members:l,bots:a,me:s,divider:x,activeQuestion:S,onSettled:Y,onPreview:ue,onReply:q,onOpenThread:fe,onQuote:B,onReact:$,onJump:L,onError:D}):c.jsx(f8,{messages:ye,members:l,me:s,activeQuestion:S,bot:m,onSettled:Y,onPreview:ue,onQuote:B,onReact:$,onJump:L,onError:D})]}),se&&ye.length>0&&c.jsx("div",{className:"jv-to-latest",children:c.jsxs("button",{type:"button",onClick:Ne,"aria-label":j("chat.toLatest"),children:[he>0&&c.jsx("span",{children:j("chat.unseen",{count:he})}),c.jsx(De,{name:"chevron-down"})]})})]}),c.jsx(Wk,{chatId:t.id,id:"jarvy-composer",drafts:u,formRef:P,scrollRef:ne,disabled:!d,placeholder:i?j("chat.toChannel",{name:t.title}):m!=null&&m.connectionId?j("chat.toBot",{name:h}):j("chat.pickModel"),mention:i?{bots:a,inside:ra(l).filter(ze=>ze.id!==s&&t.memberIds.includes(ze.id)),outside:ra(l).filter(ze=>!t.memberIds.includes(ze.id)),onInvite:ze=>O(t.id,ze)}:void 0,onSend:X,onError:D,onNotice:U})]}):c.jsx("div",{className:"jarvy-empty-chat jarvy-first-chat",children:a.length?c.jsx("p",{children:j("chat.pick")}):c.jsxs("button",{className:"ui-button ui-primary",onClick:G,disabled:R,children:[c.jsx(De,{name:"person-add"}),j("sidebar.newBot")]})}),t&&c.jsx(Pk,{container:ne,drafts:u,chatId:t.id,source:ze=>ye.find(Fe=>Fe.id===ze),members:l,onNotice:U})]})}const L8=t=>Pa(t,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function I8(t,i){const[a,l]=w.useState([]);return w.useEffect(()=>{if(l([]),!t)return;let s=!0;return je.botDirects(t).then(u=>{s&&l(u.chats)}).catch(()=>{}),()=>{s=!1}},[t,i]),a}function B8({bot:t,chats:i,members:a,bots:l,me:s,tick:u,onClose:d,onPreview:h,onError:m}){const[v,y]=w.useState(null),[g,b]=w.useState(null);w.useEffect(()=>{if(b(null),!v)return;let k=!0;return je.messages(v).then(N=>{k&&b(N.messages)}).catch(N=>{k&&m(N)}),()=>{k=!1}},[v,u]);const x=k=>a.find(N=>N.id!==t.id&&k.memberIds.includes(N.id)),S=i.find(k=>k.id===v);return c.jsxs("aside",{className:"ui-pane jv-pane","aria-label":j("chat.botDms",{name:t.name}),children:[c.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[S&&c.jsx(ct,{icon:"chevron-left",label:j("directs.back"),onClick:()=>y(null)}),c.jsx("strong",{children:S?j("directs.between",{name:t.name,other:Ba(x(S))}):j("chat.botDms",{name:t.name})}),c.jsx("span",{className:"jv-spacer"}),c.jsx(ct,{icon:"close",label:j("common.close"),onClick:d})]}),S?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(Bd,{messages:g,members:a,bots:l,me:s,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:h})}),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 N=x(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(pr,{member:N,bots:l,size:20}),c.jsx("strong",{children:Ba(N)}),c.jsx("span",{className:"jv-muted",children:L8(k.updatedAt)})]}),k.lastMessage&&c.jsx("span",{className:"jv-muted jv-thread-item-meta",children:Dc(k.lastMessage)})]},k.id)})})]})}function P8(t,i){return t!=null&&t.connectionId?i!=null&&i.error?{label:j("activity.error"),tone:"error"}:(i==null?void 0:i.status)==="running"?{label:Dk(i.activity),tone:"busy"}:{label:j((i==null?void 0:i.status)==="idle"?"activity.idle":"activity.stopped")}:{label:j("activity.noModel")}}function H8({channel:t,members:i,bots:a,statuses:l,me:s,onAdd:u,onBot:d,onChanged:h,onError:m}){const[v,y]=w.useState(null),g=i.filter(k=>t.memberIds.includes(k.id)),b=g.filter(k=>k.kind!=="bot").sort((k,N)=>+(N.id===s)-+(k.id===s)),x=g.filter(k=>k.kind==="bot"),S=k=>{const N=k.kind==="bot"?a.find(M=>M.id===k.id):void 0,E=l[k.id],T=k.kind==="bot"?P8(N,E):void 0,A=c.jsxs(c.Fragment,{children:[c.jsx(pr,{member:k,bots:a,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")})]}),T&&c.jsx("span",{className:"jv-member-state","data-tone":T.tone,children:T.label})]});return c.jsxs("div",{className:"jv-member-row",children:[N?c.jsx("button",{type:"button",className:"jv-member-main","aria-label":j("members.view",{name:k.name}),onClick:()=>d(k.id),children:A}):c.jsx("div",{className:"jv-member-main",children:A}),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"),b],["bots","Bot",x]].map(([k,N,E])=>E.length>0&&c.jsxs("section",{className:"jv-member-group","aria-label":N,children:[c.jsxs("h3",{children:[N," · ",E.length]}),E.map(S)]},k))}),v&&c.jsx($k,{title:j("members.removeTitle",{name:v.name,channel:t.title}),body:j("members.removeBody"),confirm:j("members.removeConfirm"),onClose:()=>y(null),onConfirm:async()=>{try{h(await je.removeMember(t.id,v.id)),y(null)}catch(k){m(k)}}})]})}function e2({label:t,value:i,empty:a,maxLength:l,required:s=!1,onSave:u}){const d=w.useId(),[h,m]=w.useState(null),[v,y]=w.useState(!1);w.useEffect(()=>m(null),[i]);const g=async()=>{if(!(h===null||v||s&&!h.trim())){if(h.trim()===i){m(null);return}y(!0);try{await u(h.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:t}),h===null&&c.jsx(ct,{icon:"pencil",label:j("info.edit",{name:t}),className:"jv-info-edit",onClick:()=>m(i)})]}),h===null?c.jsx("p",{className:"jv-info-value","data-empty":!i||void 0,children:i||a}):c.jsxs("div",{className:"jv-inline-edit",children:[c.jsx("input",{id:d,value:h,maxLength:l,autoFocus:!0,placeholder:a,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),g()),b.key==="Escape"&&(b.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&&!h.trim(),onClick:()=>void g(),children:j("common.save")})]})]})}function U8({channel:t,page:i,sections:a,members:l,bots:s,statuses:u,me:d,onPage:h,onPin:m,onMute:v,onAdd:y,onBot:g,onDelete:b,onChanged:x,onClose:S,onError:k}){const N=w.useId(),E=async A=>{try{x(await je.updateChannel(t.id,A))}catch(M){throw k(M),M}},T=l.filter(A=>t.memberIds.includes(A.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:()=>h("main")}),c.jsx("strong",{children:j(i==="members"?"channel.members":"entry.channelInfo")}),c.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",t.title]}),c.jsx("span",{className:"jv-spacer"}),c.jsx(ct,{icon:"close",label:j("common.close"),onClick:S})]}),i==="members"?c.jsx(H8,{channel:t,members:l,bots:s,statuses:u,me:d,onAdd:y,onBot:g,onChanged:x,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":t.pinned,onClick:m,children:[c.jsx(De,{name:"pin"}),j("entry.pin")]}),c.jsxs("button",{type:"button","aria-pressed":t.muted,onClick:v,children:[c.jsx(De,{name:t.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(e2,{label:j("info.name"),value:t.title,empty:j("info.newChannel"),maxLength:80,required:!0,onSave:A=>E({name:A})}),c.jsx(e2,{label:j("info.topic"),value:t.topic,empty:j("info.noTopic"),maxLength:200,onSave:A=>E({topic:A})}),c.jsxs("div",{className:"jv-info-field",children:[c.jsx("div",{className:"jv-info-label",children:c.jsx("label",{htmlFor:N,children:j("info.section")})}),c.jsx(Ek,{id:N,value:t.sectionId,sections:a,onChange:A=>void E({sectionId:A}).catch(()=>{})})]}),c.jsxs("nav",{className:"jv-info-menu","aria-label":j("info.menu"),children:[c.jsxs("button",{type:"button",className:"ui-menu-item",onClick:()=>h("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:T}),c.jsx(De,{name:"chevron-right"})]}),c.jsxs("button",{type:"button",className:"ui-menu-item jv-menu-danger",onClick:b,children:[c.jsx(De,{name:"trash"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.deleteChannel")})]})]})]})]})}function q8({chat:t,chats:i,members:a,focusKey:l,onOpenMessage:s,onClose:u,onError:d}){const[h,m]=w.useState(""),v=w.useRef(null);w.useEffect(()=>{var x,S;(x=v.current)==null||x.focus(),(S=v.current)==null||S.select()},[l,t.id]);const{result:y,loading:g}=Yk(h,t.id,d),b=t.type==="channel"?`#${t.title}`:j(t.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:b}),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:h,placeholder:j(t.type==="channel"?"search.channelPlaceholder":"search.placeholder"),"aria-label":j("search.placeholder"),onChange:x=>m(x.target.value),onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),h?m(""):u())}})}),c.jsx("div",{className:"ui-pane-body jv-pane-body jv-results","aria-live":"polite",children:h.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:x,chat:S})=>c.jsx(Qk,{message:x,chat:S,chats:i,members:a,query:h,showPlace:S.id!==t.id,onOpen:s},x.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 F8=t=>Pa(t,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function V8({chat:t,channelName:i,expanded:a=!1,onTitle:l,onStatus:s,onSummary:u,onConclude:d}){var A;const[h,m]=w.useState(null),[v,y]=w.useState(null),[g,b]=w.useState(!1),[x,S]=w.useState(a);w.useEffect(()=>{m(null),y(null),S(a)},[t.id,a]);const k=async(M,I)=>{b(!0);try{await M(),I()}catch{}finally{b(!1)}},N=t.status==="done",E=t.note,T=((A=E==null?void 0:E.text.split(`
502
- `).find(M=>M.trim()&&!M.startsWith("#")))==null?void 0:A.replace(/[*`|>-]/g,"").trim())??"";return c.jsxs("div",{className:"jv-thread-meta","data-open":x||void 0,children:[c.jsxs("div",{className:"jv-thread-title-row",children:[h===null?c.jsxs(c.Fragment,{children:[c.jsx("h2",{className:"jv-thread-title",title:t.title,children:t.title}),c.jsx(ct,{icon:"pencil",label:j("thread.rename"),onClick:()=>m(t.title)})]}):c.jsxs("form",{className:"jv-inline-edit",onSubmit:M=>{M.preventDefault(),h.trim()&&k(()=>l(h.trim()),()=>m(null))},children:[c.jsx("input",{value:h,autoFocus:!0,maxLength:80,"aria-label":j("thread.title"),onChange:M=>m(M.target.value),onKeyDown:M=>{M.key==="Escape"&&m(null)}}),c.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:g||!h.trim(),children:j("common.save")})]}),c.jsx("button",{type:"button",className:"jv-status","data-done":N||void 0,disabled:g,title:j("thread.toggleStatus"),onClick:()=>void k(()=>s(N?"open":"done"),()=>{}),children:N?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:M=>y(M.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":x,onClick:()=>S(!x),children:[c.jsx("strong",{children:j("thread.summary")}),!x&&c.jsx("span",{className:"jv-summary-first",children:T}),c.jsx(De,{name:x?"chevron-down":"chevron-right"})]}),x&&c.jsxs("span",{className:"jv-muted jv-summary-meta",children:[E.updatedBy.name," · ",F8(E.updatedAt)," · ",j("notice.version",{version:E.version})]}),c.jsx(ct,{icon:"pencil",label:j("thread.editSummary"),onClick:()=>y(E.text)})]}),x&&c.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:c.jsx(_c,{text:E.text})}),x&&!N&&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 t2({threadId:t,mode:i,showSummary:a=!1,focus:l,onSearch:s,channel:u,drafts:d,members:h,bots:m,me:v,tick:y,onClose:g,onToggleMode:b,onNav:x,onChanged:S,onInvite:k,onPreview:N,onError:E,onNotice:T}){const[A,M]=w.useState(null),[I,O]=w.useState(null),[B,q]=w.useState([]),[$,L]=w.useState(null),Y=w.useRef(B);Y.current=B;const X=w.useRef(null),ue=w.useRef(null),Z=w.useRef(null),U=w.useRef(!1),G=w.useRef(!0),[R,H]=w.useState(!1),W=w.useRef(0),D=w.useRef(0);w.useEffect(()=>{M(null),O(null),q([]),L(null),U.current=!1,G.current=!0,H(!1),W.current=0,D.current=0},[t]),w.useEffect(()=>{let le=!0;return Promise.all([je.chat(t),je.messages(t)]).then(async([se,he])=>{if(le&&(M(se),q(he.messages),Z.current!==t&&(Z.current=t,L(se.readSequence)),se.rootMessageId)){const Ne=await je.message(se.rootMessageId);le&&O(Ne)}}).catch(se=>{le&&E(se)}),()=>{le=!1}},[t,y]),w.useLayoutEffect(()=>{const le=X.current;if(!le||!A)return;const se=()=>le.scrollTo({top:le.scrollHeight,behavior:"instant"}),he=B.at(-1),Ne=(he==null?void 0:he.senderId)===v&&he.sequence>D.current;if(D.current=Math.max(D.current,(he==null?void 0:he.sequence)??0),U.current)(G.current||Ne)&&le.scrollTo({top:le.scrollHeight,behavior:"smooth"});else{if(!B.length&&!I)return;U.current=!0;const ze=l?le.querySelector(`[data-message="${l.id}"]`):null;if(ze){if(G.current=!1,ze.scrollIntoView({block:"center"}),l!=null&&l.passage&&Ik(ze,l.passage))return;ze.classList.add("jv-jump"),setTimeout(()=>ze.classList.remove("jv-jump"),1600);return}se(),requestAnimationFrame(se)}(G.current||Ne)&&(W.current=(he==null?void 0:he.sequence)??0)},[B,I,A]),w.useEffect(()=>{U.current&&l&&P(l.id,l.passage)},[l]),w.useEffect(()=>{const le=X.current,se=ue.current;if(!le||!se)return;const he=new ResizeObserver(()=>{!U.current||!G.current||le.scrollHeight-le.scrollTop-le.clientHeight<8||le.scrollTo({top:le.scrollHeight,behavior:"instant"})});he.observe(se);const Ne=()=>{var ze;G.current=le.scrollHeight-le.scrollTop-le.clientHeight<120,G.current&&(W.current=Math.max(W.current,((ze=Y.current.at(-1))==null?void 0:ze.sequence)??0)),H(!G.current)};return Ne(),le.addEventListener("scroll",Ne,{passive:!0}),()=>{he.disconnect(),le.removeEventListener("scroll",Ne)}},[X.current,t,A]),w.useEffect(()=>{const le=B.at(-1);if(!A||!le||le.chatId!==A.id)return;const se=()=>{if(document.visibilityState!=="visible"||A.readSequence>=le.sequence)return;const he={...A,readSequence:le.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};M(he),je.markRead(A.id,le.sequence).then(()=>S(he)).catch(E)};return se(),document.addEventListener("visibilitychange",se),()=>document.removeEventListener("visibilitychange",se)},[B,A]);const ie=async le=>{try{const se=await le();M(se),S(se)}catch(se){throw E(se),se}},ne=async(le,se,he)=>{try{const Ne=await je.react(le.id,se,he),ze=Fe=>Fe.id===Ne.id?{...Fe,reactions:Ne.reactions}:Fe;q(Fe=>Fe.map(ze)),O(Fe=>Fe&&ze(Fe))}catch(Ne){E(Ne)}},P=(le,se)=>{var Ne;const he=le&&((Ne=X.current)==null?void 0:Ne.querySelector(`[data-message="${le}"]`));if(!he){T(j(le?"thread.sourceElsewhere":"app.sourceGone"));return}Bk(he,se)},F={onQuote:le=>Jk(d,le,h),onReact:ne,onJump:P,onError:E},fe=async(le,se,he,Ne,ze=[],Fe=!1)=>{await je.send(t,le,se,he,Fe,Ne,ze);const ht=u?[...new Set(av(le,ra(h)).filter(At=>!u.memberIds.includes(At.member.id)).map(At=>At.member.name))]:[];ht.length&&T(j("app.notInChannel",{names:ht.join(j("common.listSeparator")),count:ht.length}));const[ot,Je]=await Promise.all([je.chat(t),je.messages(t)]);M(ot),q(Je.messages),S(ot)},ye=(u==null?void 0:u.title)??j("search.channel"),Se=h.find(le=>le.id===(I==null?void 0:I.senderId)),re=R?B.filter(le=>le.sequence>W.current&&le.senderId!==v).length:0,be=i==="pane"?"aside":i==="embed"?"section":"main";return c.jsxs(be,{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:le=>{A&&s&&(le.ctrlKey||le.metaKey)&&le.key.toLowerCase()==="f"&&(le.preventDefault(),s(A))},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:x}),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:b,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"}),A&&s&&c.jsx(ct,{icon:"search",label:j("thread.search"),onClick:()=>s(A)}),A&&c.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":A.following||void 0,title:j(A.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void ie(()=>je.follow(t,!A.following)).catch(()=>{}),children:[c.jsx(De,{name:"bell"}),j(A.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:b}),i==="pane"&&c.jsx(ct,{icon:"close",label:j("thread.close"),onClick:g})]}),A&&c.jsx("div",{className:i==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:c.jsx(V8,{chat:A,channelName:ye,expanded:a,onTitle:le=>ie(()=>je.updateThread(t,{title:le})),onStatus:le=>ie(()=>je.updateThread(t,{status:le})),onSummary:le=>ie(()=>je.setNote(t,le)),onConclude:async()=>{var le;try{await fe(`${j("thread.conclusion")}
503
-
504
- ${((le=A.note)==null?void 0:le.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),se=>se.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await ie(()=>je.updateThread(t,{status:"done"})),T(j("thread.concluded",{channel:ye}))}catch(se){throw E(se),se}}})}),c.jsxs("div",{ref:X,className:i==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:[c.jsxs("div",{ref:ue,children:[I&&c.jsx(Bd,{messages:[{...I,thread:null}],members:h,bots:m,me:v,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:N,onReact:ne,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(Bd,{messages:B,members:h,bots:m,me:v,divider:$??Number.MAX_SAFE_INTEGER,onSettled:le=>q(se=>se.map(he=>he.id===le.id?le:he)),onPreview:N,...F})]}),R&&B.length>0&&c.jsx("div",{className:"jv-to-latest",children:c.jsxs("button",{type:"button","aria-label":j("thread.toLatest"),onClick:()=>{var le;return(le=X.current)==null?void 0:le.scrollTo({top:X.current.scrollHeight,behavior:"smooth"})},children:[re>0&&c.jsx("span",{children:j("chat.unseen",{count:re})}),c.jsx(De,{name:"chevron-down"})]})})]}),c.jsx(Wk,{chatId:t,id:"jarvy-thread-composer",drafts:d,placeholder:j("thread.reply"),scrollRef:X,disabled:!A,initialText:B.length===0&&I&&I.senderId!==v&&Se&&!Se.deleted?`@${Se.name} `:void 0,mention:{bots:m,inside:ra(h).filter(le=>le.id!==v&&!!(u!=null&&u.memberIds.includes(le.id))),outside:ra(h).filter(le=>!(u!=null&&u.memberIds.includes(le.id))),onInvite:k},onSend:fe,onError:E,onNotice:T}),c.jsx(Pk,{container:X,drafts:d,chatId:t,members:h,onNotice:T,source:le=>le===(I==null?void 0:I.id)?I:B.find(se=>se.id===le)})]})}const dp={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},fd=t=>t.lastReplyAt??t.createdAt;function rC(t,i){const a=i==="created"?(l,s)=>s.createdAt-l.createdAt:i==="status"?(l,s)=>+(l.status==="done")-+(s.status==="done")||fd(s)-fd(l):(l,s)=>fd(s)-fd(l);return[...t].sort(a)}function lC(t){const i=`jarvy-thread-sort-${t}`,[a,l]=w.useState(()=>{const s=localStorage.getItem(i);return s==="created"||s==="status"?s:"updated"});return[a,s=>{l(s),localStorage.setItem(i,s)}]}function oC({value:t,onChange:i}){return c.jsxs(Xl,{value:t,onValueChange:a=>i(a),children:[c.jsxs(Kl,{className:"jv-thread-sort","aria-label":j("threadSort.current",{order:j(dp[t])}),title:j("threadSort.title"),children:[c.jsx(LT,{}),c.jsx(Ql,{})]}),c.jsx(Zl,{className:"jv-select-menu",position:"popper",sideOffset:4,align:"end",children:Object.keys(dp).map(a=>c.jsx(Fi,{value:a,children:j(dp[a])},a))})]})}const sC=t=>Pa(t,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function $8({channel:t,members:i,bots:a,tick:l,onOpen:s,onClose:u,onError:d}){const[h,m]=w.useState(null),[v,y]=w.useState("open"),[g,b]=lC("channel");w.useEffect(()=>{let k=!0;return je.channelThreads(t.id).then(N=>{k&&m(N.threads)}).catch(N=>{k&&d(N)}),()=>{k=!1}},[t.id,l]);const x=rC((h??[]).filter(k=>v==="all"||k.status===v),g),S=k=>(h??[]).filter(N=>N.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:["#",t.title]}),c.jsx("span",{className:"jv-spacer"}),c.jsx(oC,{value:g,onChange:b}),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:S("open")})],["done",j("threads.doneCount",{count:S("done")})],["all",j("threads.all")]].map(([k,N])=>c.jsx("button",{type:"button",role:"tab","aria-selected":v===k,onClick:()=>y(k),children:N},k))}),c.jsx("div",{className:"ui-pane-body jv-pane-body",children:h===null?c.jsx("p",{className:"jv-picker-empty",children:j("threads.loading")}):x.length===0?c.jsx("p",{className:"jv-picker-empty",children:j("threads.none")}):x.map(k=>{const N=i.find(E=>{var T;return E.id===((T=k.root)==null?void 0:T.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-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(pr,{member:N,bots:a,size:16}),c.jsx("span",{children:Dc(k.root)})]}),c.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[j("channel.replies",{count:k.replies}),k.lastReplyAt?` · ${sC(k.lastReplyAt)}`:"",k.following?` · ${j("threads.following")}`:""]})]},k.id)})})]})}function Y8({threads:t,chats:i,members:a,bots:l,onNav:s,renderThread:u}){const[d,h]=w.useState(t),[m,v]=w.useState(null),[y,g]=w.useState("all"),[b,x]=lC("followed");w.useEffect(()=>h(T=>[...t,...T.filter(A=>!t.some(M=>M.id===A.id)).map(A=>({...A,following:!1,unread:0,alerts:0}))]),[t]);const S=rC(d,b).filter(T=>y==="all"||(y==="unread"?T.unread>0:T.status===y)),k=d.filter(T=>T.unread>0).length,N=d.find(T=>T.id===m),E=T=>d.filter(A=>A.status===T).length;return c.jsxs("main",{className:"ui-chat jv-followed-page","aria-label":j("sidebar.followed"),"data-open":N?"":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(oC,{value:b,onChange:x})]}),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(([T,A])=>c.jsx("button",{type:"button",role:"tab","aria-selected":y===T,onClick:()=>g(T),children:A},T))}),c.jsx("div",{className:"jv-followed-items",children:S.length===0?c.jsx("p",{className:"jv-picker-empty",children:j({all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"}[y])}):S.map(T=>{const A=a.find(I=>{var O;return I.id===((O=T.root)==null?void 0:O.senderId)}),M=i.find(I=>I.id===T.parentId);return c.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":T.unread>0||void 0,"aria-current":T.id===m||void 0,onClick:()=>v(T.id),children:[c.jsxs("span",{className:"jv-thread-item-head",children:[c.jsx("strong",{children:T.title}),T.alerts>0?c.jsx("span",{className:"jv-badge",children:T.alerts}):T.unread>0&&c.jsx("span",{className:"jv-count",children:T.unread}),c.jsx("span",{className:"jv-status","data-done":T.status==="done"||void 0,children:j(T.status==="done"?"channel.threadDone":"threads.open")})]}),T.root&&c.jsxs("span",{className:"jv-thread-item-root",children:[c.jsx(pr,{member:A,bots:l,size:16}),c.jsx("span",{children:Dc(T.root)})]}),c.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(M==null?void 0:M.title)??""," · ",j("channel.replies",{count:T.replies}),T.lastReplyAt?` · ${sC(T.lastReplyAt)}`:"",T.following?"":` · ${j("threads.notFollowing")}`]})]},T.id)})})]}),N?u(N,()=>v(null)):c.jsx("div",{className:"jv-followed-empty",children:c.jsx("p",{children:j("threads.pick")})})]})}function G8({pane:t,followedView:i,followed:a,chats:l,sections:s,members:u,bots:d,statuses:h,meId:m,drafts:v,tick:y,paneChannel:g,activeBot:b,botDirects:x,find:S,onPane:k,onNav:N,onBackToChannel:E,onAddMembers:T,onOpenBot:A,onPin:M,onMute:I,onDeleteChannel:O,onChannelSaved:B,onThreadChanged:q,onInvite:$,onPreview:L,onNotice:Y,onError:X,paneWidth:ue,onResize:Z}){var H,W;const U=(t==null?void 0:t.kind)==="thread"?t:null,G=(U==null?void 0:U.mode)==="full",R=()=>k(null);return c.jsxs(c.Fragment,{children:[i&&!G&&c.jsx(Y8,{threads:a,chats:l,members:u,bots:d,onNav:N,renderThread:(D,ie)=>c.jsx(t2,{threadId:D.id,mode:"embed",channel:l.find(ne=>ne.id===D.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:N,onChanged:q,onClose:ie,onToggleMode:()=>E({id:D.id,parentId:D.parentId},!0),onInvite:ne=>$(D.parentId,ne),onPreview:L,onError:X,onNotice:Y},D.id)}),U&&c.jsx(t2,{threadId:U.id,mode:U.mode,showSummary:U.summary,focus:U.focus,onSearch:S.search,channel:l.find(D=>D.id===U.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:N,onChanged:q,onClose:()=>G?E(U,!1):R(),onToggleMode:()=>G?E(U,!0):k({...U,mode:"full"}),onInvite:D=>$(U.parentId,D),onPreview:L,onError:X,onNotice:Y},`${U.id}:${((H=U.focus)==null?void 0:H.id)??""}:${((W=U.focus)==null?void 0:W.passage)??""}`),(t==null?void 0:t.kind)==="search"&&c.jsx(q8,{chat:t.chat,chats:l,members:u,focusKey:S.focusKey,onOpenMessage:S.openMessage,onClose:R,onError:X}),(t==null?void 0:t.kind)==="threads"&&g&&c.jsx($8,{channel:g,members:u,bots:d,tick:y,onOpen:D=>k({kind:"thread",id:D,parentId:g.id,mode:"pane"}),onClose:R,onError:X}),(t==null?void 0:t.kind)==="info"&&g&&c.jsx(U8,{channel:g,page:t.page,sections:s,members:ra(u),bots:d,statuses:h,me:m,onPage:D=>k({kind:"info",page:D}),onPin:()=>M(g),onMute:()=>I(g),onAdd:()=>T(g),onBot:A,onDelete:()=>O(g),onChanged:B,onClose:R,onError:X}),(t==null?void 0:t.kind)==="botdms"&&b&&!g&&c.jsx(B8,{bot:b,chats:x,members:u,bots:d,me:m,tick:y,onClose:R,onPreview:L,onError:X}),t&&!G&&c.jsx("div",{className:"jv-resize",style:{right:ue-4},onPointerDown:Z,role:"separator","aria-orientation":"vertical","aria-label":j("app.resizePane")})]})}const n2="@goodfish/jarvy",cC="0.3.0",X8={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},Q8="Apache-2.0",eg=X8.url.replace(/^git\+/,"").replace(/\.git$/,""),i2=`${eg}/blob/v${cC}`,K8=[{label:"about.source",detail:eg.replace(/^https:\/\//,""),href:eg},{label:"about.package",detail:n2,href:`https://www.npmjs.com/package/${n2}`},{label:"about.license",detail:Q8,href:`${i2}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${i2}/THIRD_PARTY_NOTICE.md`}];function Z8(){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:cC})})]}),K8.map(t=>c.jsxs("a",{className:"jv-list-row jv-link-row",href:t.href,target:"_blank",rel:"noreferrer",children:[c.jsxs("div",{className:"jv-row-text",children:[c.jsx("strong",{children:j(t.label)}),c.jsx("span",{children:t.detail})]}),c.jsx(VT,{"aria-hidden":"true"})]},t.label))]})]})}function J8(){const[t,i]=w.useState(document.documentElement.classList.contains("dark")),a=s=>{Dd(s?"dark":"light"),i(s)},l=(s,u,d,h,m)=>c.jsxs("button",{type:"button",role:"radio","aria-checked":d,lang:m,className:"jv-list-row jv-choice-row",onClick:h,children:[c.jsx("span",{className:"jv-row-text",children:c.jsx("strong",{children:u})}),d&&c.jsx(sr,{"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:u2.map(s=>l(s,gp(s,"name"),ag()===s,()=>h2(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"),!t,()=>a(!1)),l("dark",j("general.dark"),t,()=>a(!0))]})]})]})}function lv({name:t}){var i;return c.jsx("span",{className:"jv-provider-mark","aria-hidden":"true",children:((i=[...t.trim()][0])==null?void 0:i.toUpperCase())??"?"})}function uC(t){const i=t.authType==="oauth";return t.configured?{ok:!0,label:j(i?"status.signedIn":"status.configured")}:{ok:!1,label:j(i?"status.signedOut":"status.notConfigured")}}const dC=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],fC=t=>t.custom?"custom":t.authType==="oauth"?"subscription":"api_key",W8={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function e9({onBack:t,onSelect:i}){const[a,l]=w.useState([]),[s,u]=w.useState(""),[d,h]=w.useState(""),[m,v]=w.useState(!0),[y,g]=w.useState(0);w.useEffect(()=>{let S=!0;return v(!0),h(""),je.modelProviders().then(k=>{S&&l(k.providers)}).catch(k=>{S&&h(Pt(k,"picker.loadFailed"))}).finally(()=>{S&&v(!1)}),()=>{S=!1}},[y]);const b=[W8,...a].filter(S=>`${S.name} ${S.id}`.toLowerCase().includes(s.toLowerCase())),x=S=>fC({authType:S.authType,custom:S.id==="custom"});return c.jsxs("div",{className:"jv-page",children:[c.jsxs("header",{className:"jv-page-header",children:[c.jsx(Ve,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:t,"aria-label":j("picker.back"),children:c.jsx(Hd,{})}),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(wc,{}),c.jsx("input",{autoFocus:!0,"aria-label":j("picker.search"),placeholder:j("picker.searchPlaceholder"),value:s,onChange:S=>u(S.target.value)})]}),dC.filter(S=>b.some(k=>x(k)===S.id)).map(({id:S,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:b.filter(N=>x(N)===S).map(N=>c.jsxs("button",{className:"jv-list-row",type:"button",onClick:()=>i(N),children:[c.jsx(lv,{name:N.id==="custom"?"+":N.name}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:N.name}),c.jsx("span",{children:N.id==="custom"?j("picker.customHint"):N.authType==="oauth"?j("picker.oauthHint"):j("picker.keyHint",{count:N.modelCount})})]}),c.jsx(Xr,{className:"jv-row-chevron"})]},`${N.id}:${N.authType}`))})]},S)),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(Ve,{variant:"outline",onClick:()=>g(S=>S+1),children:j("picker.retry")})]}),!m&&!d&&!b.length&&c.jsxs("div",{className:"jv-empty",children:[c.jsx("strong",{children:j("picker.noMatch")}),c.jsx("span",{children:j("picker.noMatchHint")})]})]})}const t9=og("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 n9({className:t,variant:i,...a}){return c.jsx("span",{"data-slot":"badge",className:nn(t9({variant:i}),t),...a})}function hC({className:t,...i}){return c.jsx(s_,{"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",t),...i})}function i9({connection:t,providerName:i,authType:a,ensureConnection:l,onChanged:s}){var X,ue;const[u,d]=w.useState({phase:"idle"}),[h,m]=w.useState(""),[v,y]=w.useState(!1),[g,b]=w.useState(""),[x,S]=w.useState(0),k=w.useRef(void 0),N=t==null?void 0:t.id,E=w.useRef(s);E.current=s;const T=w.useRef(u.phase);T.current=u.phase,w.useEffect(()=>{if(!N)return;const Z=N;let U=!0,G;async function R(){var H;try{let W=await je.authStatus(Z);if(!U)return;if(k.current&&((H=W.prompt)==null?void 0:H.type)==="select"){const ie=k.current;if(k.current=void 0,W=await je.authInput(Z,W.prompt.id,ie),!U)return}const D=T.current==="running"&&W.phase!=="running";T.current=W.phase,d(W),D&&await E.current(),W.phase==="running"&&U&&(G=setTimeout(()=>void R(),750))}catch(W){U&&b(Pt(W,"auth.statusFailed"))}}return R(),()=>{U=!1,clearTimeout(G)}},[N,u.phase,x]),w.useEffect(()=>m(""),[(X=u.prompt)==null?void 0:X.id]);async function A(Z){y(!0),b("");try{const U=await Z();d(U),U.phase!=="running"&&await s()}catch(U){b(Pt(U,"common.failed"))}finally{y(!1)}}function M(Z){k.current=Z,A(async()=>{const U=N??await l();return je.authStart(U)})}const I=i==="openai-codex"&&a==="oauth",O=i==="openai"&&a==="oauth",B=u.phase==="running",q=u.prompt,$=u.event,L=($==null?void 0:$.type)==="auth_url"?$.url:($==null?void 0:$.type)==="device_code"?$.verificationUri:null,Y=Z=>{q&&N&&A(()=>je.authInput(N,q.id,Z))};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(n9,{variant:"outline","data-state":B?"running":t!=null&&t.configured?"connected":"disconnected",children:j(B?"auth.running":t!=null&&t.configured?a==="oauth"?"status.signedIn":"status.configured":a==="oauth"?"status.signedOut":"status.notConfigured")})]}),B?c.jsxs("div",{className:"jv-auth-flow",children:[L&&c.jsx(Ve,{asChild:!0,variant:"outline",children:c.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:L,target:"_blank",rel:"noopener noreferrer",children:j("auth.openPage")})}),($==null?void 0:$.type)==="device_code"&&c.jsx("p",{children:j("auth.code",{code:$.userCode})}),(q==null?void 0:q.type)==="select"&&c.jsx("div",{className:"flex flex-wrap gap-2",children:(ue=q.options)==null?void 0:ue.map(Z=>c.jsx(Ve,{type:"button",variant:"outline",disabled:v,onClick:()=>Y(Z.id),children:I&&Z.id==="browser"?j("auth.browser"):I&&Z.id==="device_code"?j("auth.deviceCode"):Z.label},Z.id))}),q&&q.type!=="select"&&c.jsxs("div",{className:"jv-auth-input",children:[c.jsx(hC,{htmlFor:`oauth-input-${N??i}`,children:q.type==="manual_code"?j(O?"auth.redirectFull":"auth.redirectOrCode"):q.message}),q.type==="manual_code"&&c.jsx("p",{className:"jv-auth-note",children:j("auth.manualNote")}),c.jsx(In,{id:`oauth-input-${N??i}`,type:q.type==="text"?"text":"password",autoComplete:"off",value:h,disabled:v,onChange:Z=>m(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&(Z.preventDefault(),Y(h))}}),c.jsx(Ve,{type:"button",variant:"outline",disabled:v||!h.trim(),onClick:()=>Y(h),children:j("common.continue")})]}),!q&&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(Ve,{type:"button",variant:"ghost",disabled:v,onClick:()=>void A(()=>je.authCancel(N)),children:j("auth.cancel")})]}):c.jsxs("div",{className:"flex flex-wrap gap-2",children:[I?c.jsxs(c.Fragment,{children:[c.jsx(Ve,{type:"button",variant:"outline",disabled:v,onClick:()=>M("browser"),children:j("auth.browser")}),c.jsx(Ve,{type:"button",variant:"outline",disabled:v,onClick:()=>M("device_code"),children:j("auth.deviceCode")})]}):c.jsx(Ve,{type:"button",variant:"outline",disabled:v,onClick:()=>M(),children:j(a==="api_key"?"auth.configureCredential":t!=null&&t.configured?"auth.signInAgain":"auth.signIn")}),(t==null?void 0:t.configured)&&c.jsx(Ve,{type:"button",variant:"outline",disabled:v,onClick:()=>void A(async()=>(await je.authLogout(N),{phase:"idle"})),children:j(a==="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(Ve,{type:"button",variant:"link",disabled:v,onClick:()=>{b(""),S(Z=>Z+1)},children:j("auth.refresh")})]})}async function a9(t,i,a){try{return await je.autoconfigModel({modelId:t.id,api:t.api||i,...a?{choice:a}:{}})}catch(l){return{status:"error",message:Pt(l,"auto.failed")}}}function r9(t,i){if(i.status!=="matched")return{...t,auto:i};const{fields:a,...l}=i,s=t.model.name&&t.model.name!==t.model.id;return{...t,model:{...t.model,...a,name:s?t.model.name:i.source.name||t.model.id},auto:l}}const mC=t=>`${t.provider} / ${t.modelId}`;function a2({items:t,onPick:i}){return c.jsx("div",{className:"jv-auto-sources",children:t.map(a=>c.jsxs("button",{type:"button",onClick:()=>i(a),children:[c.jsx("span",{className:"jv-mono",children:mC(a)}),a.official&&c.jsx("em",{children:j("auto.official")}),c.jsx("small",{children:a.api})]},`${a.provider}/${a.modelId}`))})}function l9({state:t,modelId:i,onRun:a}){const l=u=>a({provider:u.provider,modelId:u.modelId}),s=(t==null?void 0:t.status)==="pending";return c.jsxs("div",{className:"jv-autoconfig","aria-live":"polite",children:[c.jsxs(Ve,{type:"button",variant:"outline",size:"sm",disabled:!i.trim()||s,onClick:()=>a(),children:[c.jsx(Ej,{}),j(s?"auto.pending":"auto.run")]}),t&&!s&&c.jsxs("div",{className:"jv-auto-result",children:[t.status==="matched"&&c.jsxs(c.Fragment,{children:[c.jsx("p",{children:g2("auto.matched",{source:c.jsx("strong",{className:"jv-mono",children:mC(t.source)}),note:t.reseller?j("auto.reseller"):"",suffix:j("auto.applied")})}),t.apiMismatch&&c.jsx("p",{className:"jv-auto-warn",children:j("auto.apiMismatch",{api:t.source.api})}),t.alternatives.length>0&&c.jsxs("details",{children:[c.jsx("summary",{children:j("auto.changeSource")}),c.jsx(a2,{items:t.alternatives,onPick:l})]})]}),t.status==="choose"&&c.jsxs(c.Fragment,{children:[c.jsx("p",{children:t.reason==="multiple"?j("auto.multiple"):j("auto.similar",{modelId:i})}),c.jsx(a2,{items:t.options,onPick:l})]}),t.status==="none"&&c.jsx("p",{children:j("auto.notFound")}),t.status==="error"&&c.jsx("p",{role:"alert",children:t.message})]})]})}const fp=["openai","openrouter","deepseek","zai","qwen","together","baseten","chat-template","qwen-chat-template","string-thinking","ant-ling"],pC=[["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"]],gC=t=>t==="xhigh"||t==="max";function vC(t,i){const a=t[i];return a===null||a===void 0&&gC(i)?"unsupported":a===void 0?"default":"custom"}function o9(t){return t.reasoning?pC.filter(([i])=>vC(t.thinkingLevelMap,i)!=="unsupported").map(([,i])=>j(i)):[j("thinking.level.off")]}function s9({model:t,api:i,onChange:a}){const l=t.thinkingLevelMap,s=(h,m,v)=>{const y={...l};m==="default"?delete y[h]:m==="unsupported"?y[h]=null:y[h]=v??(typeof l[h]=="string"?l[h]:h),a({thinkingLevelMap:y})},u=i==="openai-completions",d=t.thinkingFormat&&!fp.includes(t.thinkingFormat)?[...fp,t.thinkingFormat]:fp;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(Xl,{value:t.thinkingFormat||"default",disabled:!u&&!t.thinkingFormat,onValueChange:h=>a({thinkingFormat:h==="default"?"":h}),children:[c.jsx(Kl,{"aria-label":j("thinking.format"),children:c.jsx(Ql,{})}),c.jsxs(Zl,{className:"jv-select-menu",children:[c.jsx(Fi,{value:"default",children:j("thinking.protocolDefault")}),d.map(h=>c.jsx(Fi,{value:h,children:h},h))]})]}),!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:pC.map(([h,m])=>{const v=vC(l,h);return c.jsxs("div",{className:"jv-thinking-level",children:[c.jsxs("span",{children:[j(m),c.jsx("code",{children:h})]}),c.jsxs(Xl,{value:v,onValueChange:y=>s(h,y),children:[c.jsx(Kl,{"aria-label":j("thinking.levelName",{level:j(m)}),children:c.jsx(Ql,{})}),c.jsxs(Zl,{className:"jv-select-menu",children:[!gC(h)&&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[h]??"",onChange:y=>s(h,"custom",y.target.value)}):c.jsx("span",{})]},h)})}),c.jsx("p",{className:"jv-field-hint",children:j("thinking.supported",{levels:o9(t).join(" · ")})})]})}const hp=[{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"}],c9=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function tg({value:t,onChange:i,allowDefault:a=!1}){const l=hp.some(s=>s.id===t)||!t?hp:[...hp,{id:t,label:t}];return c.jsxs(Xl,{value:t||"default",onValueChange:s=>i(s==="default"?"":s),children:[c.jsx(Kl,{"aria-label":j("editor.protocol"),children:c.jsx(Ql,{})}),c.jsxs(Zl,{className:"jv-select-menu",children:[a&&c.jsx(Fi,{value:"default",children:j("card.defaultProtocol")}),l.map(s=>c.jsx(Fi,{value:s.id,children:s.label},s.id))]})]})}const u9=t=>t>=1e6?`${+(t/1e6).toFixed(2)}M`:t>=1e3?`${Math.round(t/1e3)}K`:String(t),r2={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function d9({value:t,onChange:i}){const a=m=>Object.keys(m).length?JSON.stringify(m,null,2):"",[l,s]=w.useState(()=>a(t)),[u,d]=w.useState(""),h=w.useRef(null);return w.useEffect(()=>{var m;try{if(JSON.stringify(JSON.parse(l||"{}"))===JSON.stringify(t))return}catch{}s(a(t)),d(""),(m=h.current)==null||m.setCustomValidity("")},[t]),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("card.compat")}),c.jsx(Kp,{ref:h,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,l.split(`
505
- `).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 f9({draft:t,protocol:i,onChange:a,onRemove:l,onAutoconfig:s}){const{model:u}=t,[d,h]=w.useState(!u.id),[m,v]=w.useState(!1),[y,g]=w.useState(()=>(u.headerNames??[]).map(k=>({name:k,value:"",saved:!0}))),b=k=>a({...t,model:{...u,...k}}),x=(k,N)=>c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:k}),N]}),S=(k,N,E)=>{const T=y.map((M,I)=>I===k?{...M,[N]:E}:M);g(T);const A={...u.headerUpdates};!y[k].saved&&y[k].name&&y[k].name!==T[k].name&&(A[y[k].name]=null);for(const M of T)M.name&&(M.value||!M.saved)&&(A[M.name]=M.value);b({headerUpdates:A})};return c.jsxs("article",{className:`jv-model-card ${t.selected?"is-selected":""}`,children:[c.jsxs("div",{className:"jv-model-summary",children:[c.jsx("input",{type:"checkbox",checked:t.selected,"aria-label":j("card.use",{name:u.id||j("card.newModel")}),onChange:k=>a({...t,selected:k.target.checked})}),c.jsxs("button",{type:"button","aria-expanded":d,className:"jv-model-expand",onClick:()=>h(!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:u9(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")}),t.auto&&r2[t.auto.status]&&c.jsx("span",{className:"jv-chip jv-chip-warn",children:j(r2[t.auto.status])})]}),c.jsx(Wo,{className:"jv-expand-icon"})]}),c.jsx(Ve,{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(wd,{})})]}),d&&c.jsxs("div",{className:"jv-model-fields",children:[c.jsxs("div",{className:"jv-field-grid",children:[x(j("card.modelId"),c.jsx(In,{className:"jv-mono",required:!0,value:u.id,onChange:k=>b({id:k.target.value}),placeholder:"model-id"})),x(j("card.modelName"),c.jsx(In,{value:u.name,onChange:k=>b({name:k.target.value}),placeholder:j("card.optional")}))]}),c.jsx(l9,{state:t.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=>b({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=>b({input:k.target.checked?["text","image"]:["text"]})}),j("card.imageInput")]})]})]}),u.reasoning&&c.jsx(s9,{model:u,api:u.api||i,onChange:b}),c.jsxs("section",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h4",{children:j("card.specs")}),c.jsx(Ve,{type:"button",variant:"link",size:"sm",onClick:()=>v(!m),children:j(m?"card.hidePrices":"card.editPrices")})]}),c.jsxs("div",{className:"jv-field-grid",children:[x(j("card.context"),c.jsx(In,{type:"number",min:1,value:u.contextWindow??"",placeholder:j("card.notProvided"),onChange:k=>b({contextWindow:k.target.value?Number(k.target.value):null})})),x(j("card.maxOutput"),c.jsx(In,{type:"number",min:1,value:u.maxTokens??"",placeholder:j("card.notProvided"),onChange:k=>b({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,N])=>{var E,T;return c.jsxs("div",{children:[c.jsx(hC,{children:j(N)}),m?c.jsx(In,{type:"number",step:"any",min:0,value:((E=u.cost)==null?void 0:E[k])??"",onChange:A=>b({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...u.cost,[k]:Number(A.target.value)}})}):c.jsx("span",{children:((T=u.cost)==null?void 0:T[k])??j("card.notProvided")})]},k)})})]}),c.jsxs("details",{className:"jv-advanced",children:[c.jsxs("summary",{children:[j("card.advanced"),c.jsx(Wo,{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(tg,{allowDefault:!0,value:u.api??"",onChange:k=>b({api:k})})]}),c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:j("card.headers")}),y.map((k,N)=>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=>S(N,"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=>S(N,"value",E.target.value)}),c.jsx(Ve,{type:"button",size:"icon-sm",variant:"ghost","aria-label":j("card.removeHeader"),onClick:()=>{g(y.filter((E,T)=>T!==N)),k.name&&b({headerUpdates:{...u.headerUpdates,[k.name]:null}})},children:c.jsx(wd,{})})]},N)),c.jsxs(Ve,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:()=>g([...y,{name:"",value:"",saved:!1}]),children:[c.jsx(Ud,{}),j("card.addHeader")]})]}),c.jsx(d9,{value:u.compat,onChange:k=>b({compat:k})})]})]})]})]})}let h9=0;const mp=(t,i,a=!1)=>({key:`draft-${++h9}`,model:t,selected:i,...a?{originalId:t.id}:{}});function m9({connection:t,preset:i,defaultName:a,saved:l=!1,onBack:s,onSaved:u,onConnected:d,onChanged:h}){const m=t?t.kind==="custom":(i==null?void 0:i.id)==="custom",v=(t==null?void 0:t.authType)??i.authType,[y,g]=w.useState(t?m?t.providerName:t.displayName:m?"":a),[b,x]=w.useState((t==null?void 0:t.baseUrl)??""),[S,k]=w.useState((t==null?void 0:t.api)??i.api),[N,E]=w.useState(""),[T,A]=w.useState(()=>((t==null?void 0:t.models)??[]).map(re=>mp(re,!0,!0))),[M,I]=w.useState([]),[O,B]=w.useState(""),[q,$]=w.useState(!1),[L,Y]=w.useState(!1),[X,ue]=w.useState(""),[Z,U]=w.useState(l?j("editor.saved"):""),G=w.useRef(t==null?void 0:t.id);function R(re){A(be=>{const le=new Set(be.map(se=>se.model.id));return[...be,...re.filter(se=>!le.has(se.id)).map(se=>mp(se,!1))]})}w.useEffect(()=>{if(m)return;let re=!0;return Y(!0),(t?je.modelCatalog(t.id):je.providerModels(i.id)).then(le=>{re&&R(le.models)}).catch(le=>{re&&ue(Pt(le,"editor.fetchFailed"))}).finally(()=>{re&&Y(!1)}),()=>{re=!1}},[t==null?void 0:t.id,i==null?void 0:i.id,m]);async function H(){Y(!0),ue(""),U("");try{const re=await je.discoverModels({connectionId:G.current,baseUrl:b,api:S,...N.trim()?{apiKey:N}:{}});R(re.models),U(re.models.length?j("editor.fetched",{count:re.models.length}):j("editor.noneReturned"))}catch(re){ue(Pt(re,"editor.fetchFailed"))}finally{Y(!1)}}async function W(re,be){const le=T.filter(he=>re.includes(he.key)&&he.model.id.trim());if(!le.length)return;ue(""),U(""),A(he=>he.map(Ne=>le.some(ze=>ze.key===Ne.key)?{...Ne,auto:{status:"pending"}}:Ne));const se={matched:0,choose:0,none:0,error:0};for(const he of le){const Ne=await a9(he.model,S,be);se[Ne.status]++,A(ze=>ze.map(Fe=>Fe.key===he.key?r9(Fe,Ne):Fe))}le.length>1&&U(j("editor.autoSummary",{parts:[j("editor.autoMatched",{count:se.matched}),se.choose&&j("editor.autoChoose",{count:se.choose}),se.none&&j("editor.autoNone",{count:se.none}),se.error&&j("editor.autoFailed",{count:se.error})].filter(Boolean).join(j("common.listSeparator"))}))}async function D(){if(!G.current){const re=await je.createModelConnection({providerName:i.id,displayName:y,kind:"builtin",authType:v,baseUrl:b,api:S});G.current=re.id}return await d(G.current),G.current}async function ie(re){re.preventDefault(),$(!0),ue(""),U("");try{let be;G.current?(be=await je.updateModelConnection(G.current,{displayName:y,...m?{providerName:y}:{},baseUrl:b,api:S}),m&&N.trim()&&await je.saveModelCredential(be.id,N)):(be=await je.createModelConnection({providerName:m?y:i.id,displayName:y,kind:m?"custom":"builtin",authType:v,baseUrl:b,api:S,...m&&N.trim()?{apiKey:N}:{}}),G.current=be.id);for(const le of T)le.selected&&await je.saveConnectionModel(be.id,le.model,le.originalId);for(const le of new Set([...M,...T.filter(se=>se.originalId&&!se.selected).map(se=>se.originalId)]))await je.deleteConnectionModel(be.id,le);E(""),await u(be.id),U(j("editor.saved"))}catch(be){ue(Pt(be,"editor.saveFailed"))}finally{$(!1)}}async function ne(){if(!(!t||!confirm(j("editor.confirmDelete",{name:t.displayName})))){$(!0),ue("");try{await je.deleteModelConnection(t.id),await h(),s()}catch(re){ue(Pt(re,"editor.deleteFailed"))}finally{$(!1)}}}const P=T.filter(re=>`${re.model.id} ${re.model.name}`.toLowerCase().includes(O.toLowerCase())),F=T.filter(re=>re.selected).length,fe=m?(t==null?void 0:t.displayName)??j("group.custom"):(t==null?void 0:t.displayName)??i.name,ye=t?uC(t):null,Se=T.some(re=>{var be;return((be=re.auto)==null?void 0:be.status)==="pending"});return c.jsxs("form",{className:"jv-editor",onChange:()=>U(""),onSubmit:re=>void ie(re),children:[c.jsxs("header",{className:"jv-editor-header",children:[c.jsx(Ve,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:q,onClick:s,"aria-label":j("editor.back"),children:c.jsx(Hd,{})}),c.jsx(lv,{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}),t&&c.jsx(Ve,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:q,onClick:()=>void ne(),"aria-label":j("editor.delete"),children:c.jsx(wd,{})})]}),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:re=>g(re.target.value)})]}),c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:j("editor.protocol")}),c.jsx(tg,{value:S,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:b,placeholder:"https://api.example.com/v1",onChange:re=>x(re.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(t!=null&&t.configured?"editor.keySaved":"editor.keyPlaceholder"),value:N,onChange:re=>E(re.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:re=>g(re.target.value)})]}),c.jsx(i9,{connection:t,providerName:(t==null?void 0:t.providerName)??i.id,authType:v,ensureConnection:D,onChanged:h}),c.jsxs("details",{className:"jv-advanced",children:[c.jsxs("summary",{children:[c.jsx(Wo,{}),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:b,placeholder:j("editor.defaultUrl"),onChange:re=>x(re.target.value)})]}),c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:"API Protocol"}),c.jsx(tg,{value:S,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:F,total:T.length})})]}),c.jsxs("div",{className:"jv-section-actions",children:[m&&c.jsxs(Ve,{type:"button",variant:"ghost",size:"sm",disabled:q||L||!b.trim()||!(N.trim()||t!=null&&t.configured),onClick:()=>void H(),children:[c.jsx(I2,{}),j(L?"editor.fetching":"editor.fetch")]}),F>0&&c.jsxs(Ve,{type:"button",variant:"ghost",size:"sm",disabled:q||Se,onClick:()=>void W(T.filter(re=>re.selected).map(re=>re.key)),children:[c.jsx(Ej,{}),j("editor.autoSelected")]}),c.jsxs(Ve,{type:"button",variant:"ghost",size:"sm",onClick:()=>A([...T,mp(c9(),!0)]),children:[c.jsx(Ud,{}),j("editor.addManually")]})]})]}),T.length>6&&c.jsxs("div",{className:"jv-models-filter",children:[c.jsxs("label",{className:"jv-search",children:[c.jsx(wc,{}),c.jsx("input",{"aria-label":j("editor.filter"),placeholder:j("editor.filterPlaceholder"),value:O,onChange:re=>B(re.target.value)})]}),c.jsx(Ve,{type:"button",variant:"ghost",size:"sm",onClick:()=>A(re=>re.map(be=>P.includes(be)?{...be,selected:!0}:be)),children:j("editor.selectVisible")})]}),L&&!m&&c.jsx("p",{role:"status",className:"jv-hint",children:j("editor.loadingCatalog")}),c.jsx("div",{className:"jv-model-cards",children:P.map(re=>c.jsx(f9,{draft:re,protocol:S,onAutoconfig:be=>void W([re.key],be),onChange:be=>A(le=>le.map(se=>se.key===re.key?be:se)),onRemove:()=>{re.originalId&&I(be=>[...be,re.originalId]),A(be=>be.filter(le=>le.key!==re.key))}},re.key))}),!L&&!T.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:X?c.jsx("p",{role:"alert",children:X}):Z?c.jsx("p",{role:"status",children:Z}):c.jsx("p",{children:j("editor.footer")})}),c.jsx(Ve,{type:"submit",className:"jv-primary",disabled:q||L||Se,children:j(q?"editor.saving":"editor.save")})]})]})}function p9({connections:t,onChanged:i}){const[a,l]=w.useState("list"),[s,u]=w.useState(),[d,h]=w.useState(),[m,v]=w.useState(0),y=()=>{l("list"),h(void 0),u(void 0),v(0)},g=x=>fC({authType:x.authType,custom:x.kind==="custom"});let b=(s==null?void 0:s.name)??"";if(s){let x=2;for(;t.some(S=>S.displayName===b);)b=`${s.name} ${x++}`}return a==="choose"?c.jsx(e9,{onBack:y,onSelect:x=>{u(x),h(void 0),l("editor")}}):a==="editor"?c.jsx(m9,{connection:t.find(x=>x.id===d),preset:s,defaultName:b,saved:m>0,onBack:y,onChanged:i,onConnected:async x=>{await i(),h(x),u(void 0)},onSaved:async x=>{await i(),h(x),u(void 0),v(S=>S+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(Ve,{className:"jv-primary",onClick:()=>l("choose"),children:[c.jsx(Ud,{}),j("models.add")]})]}),!t.length&&c.jsxs("div",{className:"jv-empty",children:[c.jsx("strong",{children:j("models.empty")}),c.jsx("span",{children:j("models.emptyHint")})]}),dC.filter(x=>t.some(S=>g(S)===x.id)).map(({id:x,label:S})=>c.jsxs("section",{className:"jv-section","aria-label":j(S),children:[c.jsx("h3",{className:"jv-section-title",children:j(S)}),c.jsx("div",{className:"jv-list",children:t.filter(k=>g(k)===x).map(k=>{const N=uC(k);return c.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>{h(k.id),u(void 0),l("editor")},children:[c.jsx(lv,{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":N.ok||void 0,children:N.label}),c.jsx(Xr,{className:"jv-row-chevron"})]},k.id)})})]},x))]})}const g9=[{id:"general",label:"settings.general",icon:xA},{id:"models",label:"settings.models",icon:qT},{id:"about",label:"settings.about",icon:rg}];function v9({connections:t,onChanged:i,onClose:a,initialTab:l="general"}){const[s,u]=w.useState(l);return c.jsx(wk,{open:!0,onOpenChange:d=>{d||a()},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(of,{className:"jv-settings-title",children:j("settings.title")}),g9.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(J8,{}):s==="models"?c.jsx(p9,{connections:t,onChanged:i}):c.jsx(Z8,{})})]})})}const l2="Jarvy";let o2=null,_a=null,Il=null;function y9(){return document.querySelector('link[rel="icon"][type="image/png"]')}function b9(t){if(!(_a!=null&&_a.complete)||!_a.naturalWidth)return null;const i=64,a=document.createElement("canvas");a.width=a.height=i;const l=a.getContext("2d");if(!l)return null;l.drawImage(_a,0,0,i,i);const s=t>9?"9+":String(t),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),a.toDataURL("image/png")}function s2(t){document.title=t>0?`(${t>99?"99+":t}) ${l2}`:l2;const i=y9();if(!i)return;if(o2??(o2=i.href),Il??(Il=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),t<=0){i.href=o2,Il&&!Il.isConnected&&document.head.prepend(Il);return}const a=b9(t);a&&(i.href=a,Il==null||Il.remove())}function x9(t){w.useEffect(()=>{_a||(_a=new Image,_a.src="/favicon.svg"),_a.complete?s2(t):_a.onload=()=>s2(t)},[t])}const hd=50;function j9({chatId:t,ready:i,scroller:a,me:l,onError:s}){const[u,d]=w.useState([]),[h,m]=w.useState(!1),[v,y]=w.useState(!1),[g,b]=w.useState(!1),x=w.useRef(u),S=w.useRef(t),k=w.useRef(0),N=w.useRef(!1),E=w.useRef(!1);x.current=u,S.current=t,E.current=v;const T=w.useRef(null),A=w.useRef(!1),M=w.useRef(void 0),I=w.useRef(!0),O=w.useRef(!1),B=w.useRef(null),[q,$]=w.useState(!1),L=w.useRef(0);w.useEffect(()=>{if(d([]),y(!1),O.current=!1,I.current=!0,!i||!t)return;let R=!0;const H=++k.current;return m(!0),$(!1),L.current=0,je.latestMessages(t,hd).then(W=>{!R||H!==k.current||(A.current=!0,d(W.messages),y(W.hasOlder),m(!1))}).catch(W=>{R&&(m(!1),s(W))}),()=>{R=!1}},[t,i]);async function Y(R){const H=x.current[0],W=++k.current;if(!H||H.chatId!==R){const ne=await je.latestMessages(R,hd);S.current===R&&W===k.current&&(d(ne.messages),y(ne.hasOlder),m(!1));return}const D=H.sequence-1,ie=await je.messages(R,D);S.current!==R||W!==k.current||(d(ne=>[...ne.filter(P=>P.chatId===R&&P.sequence<=D),...ie.messages]),m(!1))}async function X(){const R=x.current[0],H=a.current;if(!(!R||!E.current||N.current)){N.current=!0,b(!0);try{const W=await je.olderMessages(R.chatId,R.sequence,hd);if(S.current!==R.chatId)return;T.current=H?H.scrollHeight-H.scrollTop:null,d(D=>{var ie;return((ie=D[0])==null?void 0:ie.id)===R.id?[...W.messages,...D]:D}),y(W.hasOlder)}catch(W){s(W)}finally{N.current=!1,b(!1)}}}w.useEffect(()=>{const R=a.current;if(!R)return;const H=new ResizeObserver(()=>{!O.current||!I.current||R.scrollHeight-R.scrollTop-R.clientHeight<8||R.scrollTo({top:R.scrollHeight,behavior:"instant"})}),W=R.firstElementChild;W&&H.observe(W);const D=()=>{var ie;if(!O.current){I.current=!0,$(!1);return}I.current=R.scrollHeight-R.scrollTop-R.clientHeight<160,$(!I.current),I.current&&(L.current=((ie=x.current.at(-1))==null?void 0:ie.sequence)??0)};return D(),R.addEventListener("scroll",D,{passive:!0}),()=>{H.disconnect(),R.removeEventListener("scroll",D)}},[a.current,t]),w.useLayoutEffect(()=>{const R=a.current,H=u.at(-1);if(R){if(T.current!==null)R.scrollTo({top:R.scrollHeight-T.current,behavior:"instant"}),T.current=null;else if(A.current&&u.length){const W=()=>R.scrollTo({top:R.scrollHeight,behavior:"instant"});W(),requestAnimationFrame(W),A.current=!1,O.current=!0,I.current=!0}else H&&H.id!==M.current&&(I.current||H.senderId===l)&&R.scrollTo({top:R.scrollHeight,behavior:"smooth"});M.current=H==null?void 0:H.id,I.current&&(L.current=(H==null?void 0:H.sequence)??0)}},[u]),w.useEffect(()=>{const R=a.current,H=B.current;if(!R||!H||!v||!O.current)return;const W=new IntersectionObserver(D=>{var ie;(ie=D[0])!=null&&ie.isIntersecting&&O.current&&X()},{root:R,rootMargin:"400px 0px 0px 0px"});return W.observe(H),()=>W.disconnect()},[v,u,t,h]);async function ue(R,H){if(x.current.some(P=>P.id===R)){Z(R,H);return}const D=S.current,ie=await je.message(R);if(ie.chatId!==D)return ie.chatId;const ne=await je.olderMessages(ie.chatId,ie.sequence+1,hd);S.current===ie.chatId&&(A.current=!0,d([...ne.messages,ie]),y(ne.hasOlder),requestAnimationFrame(()=>Z(R,H)))}function Z(R,H){var D;const W=(D=a.current)==null?void 0:D.querySelector(`[data-message="${R}"]`);W&&Bk(W,H)}const U=q?u.filter(R=>R.sequence>L.current&&R.senderId!==l).length:0;return{messages:u,setMessages:d,loading:h,hasOlder:v,loadingOlder:g,refresh:Y,top:B,away:q,unseen:U,toLatest:()=>{const R=a.current;R==null||R.scrollTo({top:R.scrollHeight,behavior:"smooth"})},toMessage:ue,cancel:()=>{k.current++}}}function S9({ready:t,selected:i,messages:a,chats:l,chatList:s,setChats:u,onError:d}){const h=l.find(m=>m.id===i);w.useEffect(()=>{const m=i,v=a.at(-1);if(!t||!m||!v||v.chatId!==m)return;const y=()=>{const g=s.current.find(b=>b.id===m);document.visibilityState!=="visible"||((g==null?void 0:g.readSequence)??0)>=v.sequence&&!(g!=null&&g.hint)&&!(g!=null&&g.alerts)||(u(b=>b.map(x=>x.id===m?{...x,readSequence:Math.max(x.readSequence,v.sequence),unread:0,mentions:0,alerts:0,atMe:!1,hint:null}:x)),je.markRead(m,v.sequence).catch(d))};return y(),document.addEventListener("visibilitychange",y),()=>document.removeEventListener("visibilitychange",y)},[a,i,t,h==null?void 0:h.readSequence,h==null?void 0:h.alerts,h==null?void 0:h.hint])}function w9({onLogin:t}){const[i,a]=w.useState(""),[l,s]=w.useState(""),[u,d]=w.useState(!1),[h,m]=w.useState(!1),[v,y]=w.useState(null),[g,b]=w.useState(document.documentElement.classList.contains("dark"));async function x(S){if(S.preventDefault(),!h){m(!0),y(null);try{const k=await je.login(i.trim(),l);s(""),t(k.username)}catch(k){y(k instanceof Jo&&k.status===401?"login.wrong":k instanceof Jo&&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:u2.map(S=>c.jsx("button",{type:"button",lang:S,"aria-pressed":ag()===S,title:gp(S,"name"),onClick:()=>h2(S),children:gp(S,"short")},S))}),c.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{Dd(g?"light":"dark"),b(!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:S=>void x(S),"aria-label":j("login.form"),"aria-busy":h,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:h,value:i,onChange:S=>a(S.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:h,value:l,onChange:S=>s(S.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:h,children:j(h?"login.submitting":"login.submit")})]})]})})]})}function k9({selected:t,chats:i,transcript:a,openChat:l,setPane:s,paneRef:u,blocked:d}){const[h,m]=w.useState(null),[v,y]=w.useState(0);w.useEffect(()=>{var x;!h||t!==h.chatId||a.loading||((x=a.messages[0])==null?void 0:x.chatId)!==h.chatId||(a.toMessage(h.id,h.passage),m(null))},[h,t,a.loading,a.messages]);function g(x,S,k){var E;if(x.type==="thread"){const T=i.find(A=>A.id===x.parentId);T&&l(T),s({kind:"thread",id:x.id,parentId:x.parentId,mode:"pane",focus:{id:S,passage:k}});return}((E=u.current)==null?void 0:E.kind)==="search"&&window.matchMedia("(max-width: 760px)").matches&&s(null);const N=x.id===t;l(x),N?a.toMessage(S,k):m({chatId:x.id,id:S,passage:k})}function b(x){s({kind:"search",chat:x}),y(S=>S+1)}return w.useEffect(()=>{const x=S=>{var N,E;if(d||S.defaultPrevented||!(S.ctrlKey||S.metaKey)||S.key.toLowerCase()!=="f")return;const k=i.find(T=>T.id===t);k&&(((N=u.current)==null?void 0:N.kind)==="search"&&((E=document.activeElement)!=null&&E.closest(".jv-search-pane"))||(S.preventDefault(),b(k)))};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[d,i,t]),{openMessage:g,search:b,focusKey:v}}const C9=null;function N9(){var ga,Fa,Va,ti,va,ce;const[t,i]=w.useState("loading"),[a,l]=w.useState(""),[s,u]=w.useState([]),[d,h]=w.useState({}),m=w.useRef(new Map),[v,y]=w.useState([]),[g,b]=w.useState([]),[x,S]=w.useState([]),[k,N]=w.useState(null),[E,T]=w.useState({}),[A,M]=w.useState(null),[I,O]=w.useState(null),[B,q]=w.useState(null),[$,L]=w.useState([]),[Y,X]=w.useState(null),[ue,Z]=w.useState(!1),[U,G]=w.useState(!1),[R,H]=w.useState(!1),[W,D]=w.useState(""),[ie,ne]=w.useState(!1),[P,F]=w.useState(null),[fe,ye]=w.useState(!1),[Se,re]=w.useState(420),[be,le]=w.useState(0),[se,he]=w.useState([]),[Ne,ze]=w.useState(""),Fe=w.useRef(null),ht=w.useRef(null),ot=w.useRef(null),[Je,At]=w.useState(null),[gn,vn]=w.useState(null),[Hn,di]=w.useState(null),an=w.useRef(A);an.current=A;const Yi=w.useRef(0),pe=w.useRef(v);pe.current=v;const we=w.useRef(P);we.current=P;const Be=w.useMemo(()=>new c8(u8(a)),[a]);w.useEffect(()=>{const z=()=>Be.save();return window.addEventListener("pagehide",z),()=>window.removeEventListener("pagehide",z)},[Be]);const Ue=((ga=x.find(z=>z.kind==="user"&&z.name===a))==null?void 0:ga.id)??"",We=j9({chatId:A,ready:t==="ready",scroller:Fe,me:Ue,onError:Qe}),{messages:Ht,setMessages:yn}=We,Ut=k9({selected:A,chats:v,transcript:We,openChat:fi,setPane:F,paneRef:we,blocked:!!B||!!Y}),On=((Fa=v.find(z=>z.id===A))==null?void 0:Fa.botId)??I??((Va=s[0])==null?void 0:Va.id);async function Un(z){const Q=(m.current.get(z)??0)+1;m.current.set(z,Q);const me=await je.botStatus(z);m.current.get(z)===Q&&h(Ee=>({...Ee,[z]:me}))}w.useEffect(()=>{t==="ready"&&On&&Un(On).catch(Qe)},[t,On]);const _t=((ti=v.find(z=>z.id===A&&z.type==="channel"))==null?void 0:ti.memberIds.filter(z=>s.some(Q=>Q.id===z)).join(","))??"";w.useEffect(()=>{if(t==="ready"&&_t)for(const z of _t.split(","))Un(z).catch(Qe)},[t,_t]);async function _n(z){var Ae,$e;const[Q,me,Ee,ke,Te,Le]=await Promise.all([je.bots(),je.chats(),je.modelConnections(),je.sections(),je.members(),je.followedThreads()]);l(z),u(Q.bots),y(me.chats),L(Ee.connections),b(ke.sections),S(Te.members),he(Le.threads);const Xe=me.chats.find(st=>st.type!=="thread");M((Xe==null?void 0:Xe.id)??null),Xe&&T({[Xe.id]:Xe.readSequence}),O(((Ae=me.chats[0])==null?void 0:Ae.botId)??(($e=Q.bots[0])==null?void 0:$e.id)??null),i("ready")}w.useEffect(()=>{Dd(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),je.me().then(z=>_n(z.username)).catch(()=>i("login"))},[]),w.useEffect(()=>{if(t!=="ready")return;let z=!0;const Q=new EventSource("/api/events"),me=async ke=>{je.followedThreads().then(Le=>{z&&he(Le.threads)}).catch(()=>{}),le(Le=>Le+1),await Gt();const Te=an.current;z&&Te&&(!ke||ke===Te)&&await al(Te)},Ee=()=>void je.sections().then(ke=>{z&&b(ke.sections)}).catch(ke=>{z&&Qe(ke)});return Q.addEventListener("ready",()=>{var Te;me().catch(Le=>{z&&Qe(Le)}),Ee();const ke=(Te=pe.current.find(Le=>Le.id===an.current))==null?void 0:Te.botId;ke&&Un(ke).catch(Le=>{z&&Qe(Le)}),je.bots().then(Le=>{z&&u(Le.bots)}).catch(Le=>{z&&Qe(Le)})}),Q.addEventListener("sections",Ee),Q.addEventListener("inbox",()=>void me().catch(ke=>{z&&Qe(ke)})),Q.addEventListener("chat",ke=>{const Te=JSON.parse(ke.data);typeof Te.chatId=="string"&&me(Te.chatId).catch(Le=>{z&&Qe(Le)})}),Q.addEventListener("bot",ke=>{var Xe;const Te=JSON.parse(ke.data),Le=Te.status;m.current.set(Te.botId,(m.current.get(Te.botId)??0)+1),h(Ae=>({...Ae,[Te.botId]:Le})),Le.error&&((Xe=pe.current.find(Ae=>Ae.id===an.current))==null?void 0:Xe.botId)===Le.botId&&ze(fI(Le)),(Le.status==="idle"||Le.status==="stop")&&je.bots().then(Ae=>{z&&u(Ae.bots)}).catch(Ae=>{z&&Qe(Ae)})}),Q.onerror=()=>{je.me().catch(ke=>{z&&ke instanceof Jo&&ke.status===401&&i("login")})},()=>{z=!1,Q.close(),We.cancel(),Yi.current++}},[t]),S9({ready:t==="ready",selected:A,messages:Ht,chats:v,chatList:pe,setChats:y,onError:Qe}),x9(t==="ready"?v.reduce((z,Q)=>z+Q.alerts,0):0),w.useEffect(()=>{if(!Ne)return;const z=setTimeout(()=>ze(""),4800);return()=>clearTimeout(z)},[Ne]),w.useEffect(()=>{const z=Q=>{Q.defaultPrevented||B||Y||(Q.key==="Escape"&&(Z(!1),G(!1),H(!1)),(Q.ctrlKey||Q.metaKey)&&Q.key.toLowerCase()==="k"&&(Q.preventDefault(),H(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var me;return(me=document.querySelector("#jarvy-search"))==null?void 0:me.focus()})))};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[B,Y]),w.useEffect(()=>{const z=window.matchMedia("(max-width: 620px)"),Q=()=>{z.matches||H(!1)};return z.addEventListener("change",Q),()=>z.removeEventListener("change",Q)},[]);function Qe(z){if(z instanceof Jo&&z.status===401){i("login");return}ze(Pt(z,"common.failed"))}async function Gt(){const z=++Yi.current,Q=await je.chats();return z===Yi.current&&y(Q.chats),Q.chats}async function al(z){await We.refresh(z)}async function sa(){const[z,Q]=await Promise.all([je.modelConnections(),je.bots()]);L(z.connections),u(Q.bots)}const ca=()=>void je.members().then(z=>S(z.members)).catch(Qe);function bn(z){u(Q=>Q.map(me=>me.id===z.id?z:me)),ca()}function fi(z){var me;const Q=r8(z);Q?F({kind:"thread",id:Q,parentId:z.id,mode:"pane",summary:((me=z.hint)==null?void 0:me.kind)==="note"}):z.id!==an.current&&F(null),ye(!1),T(Ee=>({...Ee,[z.id]:z.readSequence})),M(z.id),z.botId&&O(z.botId),H(!1),Z(!1),G(!1)}const rl=z=>F((P==null?void 0:P.kind)==="info"&&P.page===z?null:{kind:"info",page:z});function hi(z){y(Q=>Q.some(me=>me.id===z.id)?Q.map(me=>me.id===z.id?z:me):[z,...Q])}async function to(z){if(!ie){ne(!0);try{const Q=await je.createChat(z);hi(Q),fi(Q),requestAnimationFrame(()=>{var me;return(me=document.querySelector("#jarvy-composer"))==null?void 0:me.focus()})}catch(Q){Qe(Q)}finally{ne(!1)}}}async function Gi(){if(!ie){ne(!0);try{const z=await je.createBot(DI(ra(x).map(me=>me.name))),Q=await je.createChat(z.id);u(me=>[...me,z]),hi(Q),ca(),fi(Q)}catch(z){Qe(z)}finally{ne(!1)}}}async function sn(z){try{await je.deleteChat(z.id),await Gt(),an.current===z.id&&M(null),ze(j("app.channelDeleted"))}catch(Q){Qe(Q)}}async function zt(z,Q){try{hi(await je.pin(z.id,Q))}catch(me){Qe(me)}}async function Vt(z,Q){try{hi(await je.mute(z.id,Q))}catch(me){Qe(me)}}async function ua(z,Q){try{await je.deleteBot(z.id,Q);const me=new Set(v.filter(Ee=>Ee.type==="dm"&&Ee.botId===z.id).map(Ee=>Ee.id));y(Ee=>Ee.filter(ke=>!me.has(ke.id)).map(ke=>ke.memberIds.includes(z.id)?{...ke,memberIds:ke.memberIds.filter(Te=>Te!==z.id)}:ke)),u(Ee=>Ee.filter(ke=>ke.id!==z.id)),ca(),an.current&&me.has(an.current)&&M(null),B===z.id&&q(null),ze(j("app.botDeleted",{name:z.name}))}catch(me){Qe(me)}}async function da(z,Q,me,Ee,ke){const Te=A;await je.send(Te,z,Q,me,!1,Ee,ke);const Le=pe.current.find(Ae=>Ae.id===Te),Xe=(Le==null?void 0:Le.type)==="channel"?[...new Set(av(z,ra(x)).filter(Ae=>!Le.memberIds.includes(Ae.member.id)).map(Ae=>Ae.member.name))]:[];Xe.length&&ze(j("app.notInChannel",{names:Xe.join(j("common.listSeparator")),count:Xe.length})),await Promise.all([al(Te),Gt()])}function Xi(z,Q){je.addMember(z,Q.id).then(me=>{hi(me),ze(j("app.memberAdded",{name:Q.name,channel:me.title}))}).catch(Qe)}async function Qi(z){try{const Q=await je.openThread(z.id);F({kind:"thread",id:Q.id,parentId:z.chatId,mode:"pane"})}catch(Q){Qe(Q)}}function Oi(z,Q){const me=v.find(Ee=>Ee.id===z.parentId);me&&fi(me),F(Q?{kind:"thread",id:z.id,parentId:z.parentId,mode:"pane"}:null)}function Kn(z){q(null);const Q=v.find(me=>me.id===(z.type==="thread"?z.parentId:z.id));Q&&fi(Q),z.type==="thread"&&F({kind:"thread",id:z.id,parentId:z.parentId,mode:"pane"})}async function Ki(z,Q,me){try{const Ee=await je.react(z.id,Q,me);yn(ke=>ke.map(Te=>Te.id===Ee.id?{...Te,reactions:Ee.reactions}:Te))}catch(Ee){Qe(Ee)}}function mi(z){Jk(Be,z,x)}const pi=(z,Q)=>z?void We.toMessage(z,Q).then(async me=>{me&&Ut.openMessage(await je.chat(me),z,Q)}).catch(()=>ze(j("app.sourceGone"))):ze(j("app.sourceGone"));function fa(z){he(Q=>Q.map(me=>me.id===z.id?{...me,...z}:me)),je.followedThreads().then(Q=>he(Q.threads)).catch(()=>{})}function ll(z){z.preventDefault();const Q=Ee=>re(Math.min(Math.max(340,window.innerWidth-Ee.clientX),Math.round(window.innerWidth*.6))),me=()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",me),document.body.style.cursor=""};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",me),document.body.style.cursor="col-resize"}async function gi(){try{await Be.clear(z=>je.removeAttachment(z)),await je.logout(),i("login"),Z(!1),X(null),m.current.clear(),h({}),F(null),he([]),l(""),M(null),y([]),u([]),L([]),yn([])}catch(z){Qe(z)}}const gr=t==="ready"&&v.some(z=>z.id===A);w.useEffect(()=>{const z=Fe.current;if(!z)return;let Q=0,me=z.clientHeight;const Ee=()=>{Q=z.scrollHeight-z.scrollTop-z.clientHeight},ke=new ResizeObserver(()=>{z.clientHeight!==me&&(me=z.clientHeight,z.scrollTo({top:z.scrollHeight-z.clientHeight-Q,behavior:"instant"}))}),Te=new MutationObserver(Ee);return Ee(),z.addEventListener("scroll",Ee,{passive:!0}),ke.observe(z),Te.observe(z,{childList:!0,subtree:!0,characterData:!0}),()=>{ke.disconnect(),Te.disconnect(),z.removeEventListener("scroll",Ee)}},[gr]);const Zn=v.find(z=>z.id===A),ha=(Zn==null?void 0:Zn.type)==="channel",Jn=I8(t==="ready"?(va=v.find(z=>z.id===A&&z.type==="dm"))==null?void 0:va.botId:void 0,be);if(t==="loading")return c.jsx("div",{className:"jarvy-loading",children:j("app.connecting")});if(t==="login")return c.jsx(w9,{onLogin:z=>void _n(z).catch(Qe)});const rn=v.find(z=>z.id===A),cn=s.find(z=>z.id===((rn==null?void 0:rn.botId)??I))??s[0],ma=!!(cn!=null&&cn.connectionId),Wn=ha||ma,ei=(cn==null?void 0:cn.name)??"Jarvy",Rn=cn?d[cn.id]:void 0,Lt=Rn!=null&&Rn.error?j("activity.error"):(Rn==null?void 0:Rn.status)==="running"?Dk(Rn.activity):"",Mt=(ce=[...Ht].reverse().find(z=>{var Q;return((Q=z.question)==null?void 0:Q.state)==="pending"}))==null?void 0:ce.id,$t=(P==null?void 0:P.kind)==="thread"?P:null,xn=($t==null?void 0:$t.mode)==="full",ol=ha?Zn:void 0,vr=s.find(z=>z.id===B),yr=new Set(Object.values(d).filter(z=>z.status==="running"&&z.activity!=="asking").map(z=>z.botId)),pa=new Set(Object.values(d).filter(z=>z.activity==="asking").map(z=>z.botId));return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ui-app","data-nav":R?"":void 0,"data-pane":P&&!xn?"":void 0,style:{"--ui-pane":`${Se}px`},children:[c.jsx(o8,{username:a,chats:v,sections:g,bots:s,members:x,followed:se,followedOpen:fe&&!xn,working:yr,asking:pa,selected:fe?null:A,filter:W,creating:ie,createMenu:U,accountMenu:ue,onFilterChange:D,onOpenFollowed:()=>{ye(!0),F(null),H(!1)},onOpenChat:fi,onOpenBot:z=>void to(z.id),onOpenMenu:(z,Q)=>vn({target:z,at:Q}),onEditSection:z=>N({kind:"section",section:z}),onCreate:z=>{if(z==="bot")return void Gi();N({kind:z}),G(!1)},onFind:Ut.openMessage,onOpenFound:Kn,onError:Qe,onToggleCreate:z=>{G(z),Z(!1)},onToggleAccount:z=>{Z(z),G(!1)},onSettings:()=>{Z(!1),X("general")},onToggleTheme:()=>{Dd(document.documentElement.classList.contains("dark")?"light":"dark"),Z(!1)},onLogOut:()=>void gi()}),c.jsx(z8,{chat:rn,inChannel:ha,bots:s,members:x,meId:Ue,drafts:Be,composeReady:Wn,botName:ei,activeBot:cn,status:Rn,connections:$,activity:Lt,history:We,divider:E[(rn==null?void 0:rn.id)??""]??(rn==null?void 0:rn.readSequence)??0,activeQuestion:Mt,pane:P,onPane:F,onToggleInfo:rl,find:Ut,onNav:()=>H(!0),onBot:z=>q(z),hasBotDirects:Jn.length>0,onInvite:Xi,onQuote:mi,onReply:z=>void Qi(z),onReact:(z,Q,me)=>void Ki(z,Q,me),onJump:pi,onSettled:z=>yn(Q=>Q.map(me=>me.id===z.id?z:me)),onPreview:(z,Q)=>At({files:z,index:Q}),onSend:da,notice:ze,onSaveNote:async z=>{try{hi(await je.setNote(rn.id,z))}catch(Q){throw Qe(Q),Q}},createBot:()=>void Gi(),creating:ie,updateBot:bn,onManageModels:()=>X("models"),error:Qe,chatArea:ht,transcript:Fe,composeWrap:ot,hidden:xn||fe,onOpenThread:z=>F({kind:"thread",id:z,parentId:rn.id,mode:"pane"})}),c.jsx(G8,{pane:P,followedView:fe,followed:se,chats:v,sections:g,members:x,bots:s,statuses:d,meId:Ue,drafts:Be,tick:be,paneChannel:ol,activeBot:cn,botDirects:Jn,find:Ut,onPane:F,onNav:()=>H(!0),onBackToChannel:Oi,onAddMembers:z=>N({kind:"members",chat:z}),onOpenBot:q,onPin:z=>void zt(z,!z.pinned),onMute:z=>void Vt(z,!z.muted),onDeleteChannel:z=>di({kind:"chat",chat:z}),onChannelSaved:hi,onThreadChanged:fa,onInvite:Xi,onPreview:(z,Q)=>At({files:z,index:Q}),onNotice:ze,onError:Qe,paneWidth:Se,onResize:ll})]}),R&&c.jsx("div",{className:"ui-nav-scrim",onClick:()=>H(!1),role:"presentation"}),Y&&c.jsx(v9,{connections:$,initialTab:Y,onChanged:sa,onClose:()=>X(null)}),c.jsx(QI,{dialog:k,entryMenu:gn,confirm:Hn,preview:Je,infoBot:vr,bots:s,statuses:d,chats:v,sections:g,members:x,connections:$,meId:Ue,onDialog:N,onEntryMenu:vn,onConfirm:di,onPreview:At,onInfoBot:q,onSettings:()=>X("models"),onChannelInfo:z=>{fi(z),F({kind:"info",page:"main"})},onOpenChatId:z=>{M(z),H(!1)},chatSaved:hi,openChat:fi,onSectionSaved:z=>{b(Q=>Q.some(me=>me.id===z.id)?Q.map(me=>me.id===z.id?z:me):[...Q,z]),N(null)},onSectionDeleted:z=>{N(null),b(Q=>Q.filter(me=>me.id!==z)),Gt().catch(Qe)},updateBot:bn,openAnywhere:Kn,removeChannel:sn,deleteBot:ua,pinChat:zt,muteChat:Vt}),Ne&&c.jsx("div",{className:"ui-toast",role:"status",children:Ne}),C9]})}function E9(){return m2(),c.jsx(N9,{})}rT.createRoot(document.getElementById("root")).render(c.jsx(w.StrictMode,{children:c.jsx(E9,{})}));