acp-devtools 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.
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/dist/ui/assets/index-Bvo_2zbZ.css +1 -0
- package/dist/ui/assets/index-CjS5-QNm.js +1768 -0
- package/dist/ui/index.html +2 -2
- package/package.json +2 -2
- package/dist/ui/assets/index-B3QArtIO.js +0 -1768
- package/dist/ui/assets/index-DC00GYnH.css +0 -1
|
@@ -0,0 +1,1768 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function Yd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fy={exports:{}},fl={},my={exports:{}},ge={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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 $s=Symbol.for("react.element"),Ux=Symbol.for("react.portal"),Lx=Symbol.for("react.fragment"),Dx=Symbol.for("react.strict_mode"),zx=Symbol.for("react.profiler"),Fx=Symbol.for("react.provider"),Bx=Symbol.for("react.context"),Hx=Symbol.for("react.forward_ref"),Vx=Symbol.for("react.suspense"),Wx=Symbol.for("react.memo"),Kx=Symbol.for("react.lazy"),kf=Symbol.iterator;function Gx(e){return e===null||typeof e!="object"?null:(e=kf&&e[kf]||e["@@iterator"],typeof e=="function"?e:null)}var hy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yy=Object.assign,gy={};function Gr(e,t,n){this.props=e,this.context=t,this.refs=gy,this.updater=n||hy}Gr.prototype.isReactComponent={};Gr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Gr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function vy(){}vy.prototype=Gr.prototype;function Xd(e,t,n){this.props=e,this.context=t,this.refs=gy,this.updater=n||hy}var Zd=Xd.prototype=new vy;Zd.constructor=Xd;yy(Zd,Gr.prototype);Zd.isPureReactComponent=!0;var Tf=Array.isArray,by=Object.prototype.hasOwnProperty,eu={current:null},xy={key:!0,ref:!0,__self:!0,__source:!0};function wy(e,t,n){var o,r={},i=null,s=null;if(t!=null)for(o in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)by.call(t,o)&&!xy.hasOwnProperty(o)&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return{$$typeof:$s,type:e,key:i,ref:s,props:r,_owner:eu.current}}function Jx(e,t){return{$$typeof:$s,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tu(e){return typeof e=="object"&&e!==null&&e.$$typeof===$s}function Qx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _f=/\/+/g;function Vl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Qx(""+e.key):t.toString(36)}function sa(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case $s:case Ux:s=!0}}if(s)return s=e,r=r(s),e=o===""?"."+Vl(s,0):o,Tf(r)?(n="",e!=null&&(n=e.replace(_f,"$&/")+"/"),sa(r,t,n,"",function(c){return c})):r!=null&&(tu(r)&&(r=Jx(r,n+(!r.key||s&&s.key===r.key?"":(""+r.key).replace(_f,"$&/")+"/")+e)),t.push(r)),1;if(s=0,o=o===""?".":o+":",Tf(e))for(var a=0;a<e.length;a++){i=e[a];var l=o+Vl(i,a);s+=sa(i,t,n,l,r)}else if(l=Gx(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=o+Vl(i,a++),s+=sa(i,t,n,l,r);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Rs(e,t,n){if(e==null)return e;var o=[],r=0;return sa(e,o,"","",function(i){return t.call(n,i,r++)}),o}function Yx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var St={current:null},aa={transition:null},Xx={ReactCurrentDispatcher:St,ReactCurrentBatchConfig:aa,ReactCurrentOwner:eu};function Sy(){throw Error("act(...) is not supported in production builds of React.")}ge.Children={map:Rs,forEach:function(e,t,n){Rs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Rs(e,function(){t++}),t},toArray:function(e){return Rs(e,function(t){return t})||[]},only:function(e){if(!tu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ge.Component=Gr;ge.Fragment=Lx;ge.Profiler=zx;ge.PureComponent=Xd;ge.StrictMode=Dx;ge.Suspense=Vx;ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xx;ge.act=Sy;ge.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=yy({},e.props),r=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=eu.current),t.key!==void 0&&(r=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)by.call(t,l)&&!xy.hasOwnProperty(l)&&(o[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];o.children=a}return{$$typeof:$s,type:e.type,key:r,ref:i,props:o,_owner:s}};ge.createContext=function(e){return e={$$typeof:Bx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Fx,_context:e},e.Consumer=e};ge.createElement=wy;ge.createFactory=function(e){var t=wy.bind(null,e);return t.type=e,t};ge.createRef=function(){return{current:null}};ge.forwardRef=function(e){return{$$typeof:Hx,render:e}};ge.isValidElement=tu;ge.lazy=function(e){return{$$typeof:Kx,_payload:{_status:-1,_result:e},_init:Yx}};ge.memo=function(e,t){return{$$typeof:Wx,type:e,compare:t===void 0?null:t}};ge.startTransition=function(e){var t=aa.transition;aa.transition={};try{e()}finally{aa.transition=t}};ge.unstable_act=Sy;ge.useCallback=function(e,t){return St.current.useCallback(e,t)};ge.useContext=function(e){return St.current.useContext(e)};ge.useDebugValue=function(){};ge.useDeferredValue=function(e){return St.current.useDeferredValue(e)};ge.useEffect=function(e,t){return St.current.useEffect(e,t)};ge.useId=function(){return St.current.useId()};ge.useImperativeHandle=function(e,t,n){return St.current.useImperativeHandle(e,t,n)};ge.useInsertionEffect=function(e,t){return St.current.useInsertionEffect(e,t)};ge.useLayoutEffect=function(e,t){return St.current.useLayoutEffect(e,t)};ge.useMemo=function(e,t){return St.current.useMemo(e,t)};ge.useReducer=function(e,t,n){return St.current.useReducer(e,t,n)};ge.useRef=function(e){return St.current.useRef(e)};ge.useState=function(e){return St.current.useState(e)};ge.useSyncExternalStore=function(e,t,n){return St.current.useSyncExternalStore(e,t,n)};ge.useTransition=function(){return St.current.useTransition()};ge.version="18.3.1";my.exports=ge;var I=my.exports;const te=Yd(I);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its 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 Zx=I,e0=Symbol.for("react.element"),t0=Symbol.for("react.fragment"),n0=Object.prototype.hasOwnProperty,o0=Zx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r0={key:!0,ref:!0,__self:!0,__source:!0};function $y(e,t,n){var o,r={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(o in t)n0.call(t,o)&&!r0.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)r[o]===void 0&&(r[o]=t[o]);return{$$typeof:e0,type:e,key:i,ref:s,props:r,_owner:o0.current}}fl.Fragment=t0;fl.jsx=$y;fl.jsxs=$y;fy.exports=fl;var d=fy.exports,Rc={},ky={exports:{}},Ut={},Ty={exports:{}},_y={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its 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
|
+
*/(function(e){function t(D,J){var O=D.length;D.push(J);e:for(;0<O;){var _=O-1>>>1,M=D[_];if(0<r(M,J))D[_]=J,D[O]=M,O=_;else break e}}function n(D){return D.length===0?null:D[0]}function o(D){if(D.length===0)return null;var J=D[0],O=D.pop();if(O!==J){D[0]=O;e:for(var _=0,M=D.length,P=M>>>1;_<P;){var w=2*(_+1)-1,k=D[w],N=w+1,H=D[N];if(0>r(k,O))N<M&&0>r(H,k)?(D[_]=H,D[N]=O,_=N):(D[_]=k,D[w]=O,_=w);else if(N<M&&0>r(H,O))D[_]=H,D[N]=O,_=N;else break e}}return J}function r(D,J){var O=D.sortIndex-J.sortIndex;return O!==0?O:D.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],f=1,m=null,v=3,h=!1,y=!1,b=!1,g=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(D){for(var J=n(c);J!==null;){if(J.callback===null)o(c);else if(J.startTime<=D)o(c),J.sortIndex=J.expirationTime,t(l,J);else break;J=n(c)}}function S(D){if(b=!1,x(D),!y)if(n(l)!==null)y=!0,G(T);else{var J=n(c);J!==null&&Y(S,J.startTime-D)}}function T(D,J){y=!1,b&&(b=!1,p(j),j=-1),h=!0;var O=v;try{for(x(J),m=n(l);m!==null&&(!(m.expirationTime>J)||D&&!q());){var _=m.callback;if(typeof _=="function"){m.callback=null,v=m.priorityLevel;var M=_(m.expirationTime<=J);J=e.unstable_now(),typeof M=="function"?m.callback=M:m===n(l)&&o(l),x(J)}else o(l);m=n(l)}if(m!==null)var P=!0;else{var w=n(c);w!==null&&Y(S,w.startTime-J),P=!1}return P}finally{m=null,v=O,h=!1}}var C=!1,$=null,j=-1,A=5,E=-1;function q(){return!(e.unstable_now()-E<A)}function z(){if($!==null){var D=e.unstable_now();E=D;var J=!0;try{J=$(!0,D)}finally{J?U():(C=!1,$=null)}}else C=!1}var U;if(typeof u=="function")U=function(){u(z)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,F=L.port2;L.port1.onmessage=z,U=function(){F.postMessage(null)}}else U=function(){g(z,0)};function G(D){$=D,C||(C=!0,U())}function Y(D,J){j=g(function(){D(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,G(T))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(v){case 1:case 2:case 3:var J=3;break;default:J=v}var O=v;v=J;try{return D()}finally{v=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,J){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var O=v;v=D;try{return J()}finally{v=O}},e.unstable_scheduleCallback=function(D,J,O){var _=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?_+O:_):O=_,D){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=O+M,D={id:f++,callback:J,priorityLevel:D,startTime:O,expirationTime:M,sortIndex:-1},O>_?(D.sortIndex=O,t(c,D),n(l)===null&&D===n(c)&&(b?(p(j),j=-1):b=!0,Y(S,O-_))):(D.sortIndex=M,t(l,D),y||h||(y=!0,G(T))),D},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(D){var J=v;return function(){var O=v;v=J;try{return D.apply(this,arguments)}finally{v=O}}}})(_y);Ty.exports=_y;var i0=Ty.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its 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 s0=I,qt=i0;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var jy=new Set,Vi={};function Yo(e,t){Ur(e,t),Ur(e+"Capture",t)}function Ur(e,t){for(Vi[e]=t,e=0;e<t.length;e++)jy.add(t[e])}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ac=Object.prototype.hasOwnProperty,a0=/^[: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]*$/,jf={},Nf={};function l0(e){return Ac.call(Nf,e)?!0:Ac.call(jf,e)?!1:a0.test(e)?Nf[e]=!0:(jf[e]=!0,!1)}function c0(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function d0(e,t,n,o){if(t===null||typeof t>"u"||c0(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function $t(e,t,n,o,r,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dt[e]=new $t(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dt[t]=new $t(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dt[e]=new $t(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dt[e]=new $t(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){dt[e]=new $t(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dt[e]=new $t(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dt[e]=new $t(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dt[e]=new $t(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dt[e]=new $t(e,5,!1,e.toLowerCase(),null,!1,!1)});var nu=/[\-:]([a-z])/g;function ou(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(nu,ou);dt[t]=new $t(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(nu,ou);dt[t]=new $t(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(nu,ou);dt[t]=new $t(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dt[e]=new $t(e,1,!1,e.toLowerCase(),null,!1,!1)});dt.xlinkHref=new $t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dt[e]=new $t(e,1,!1,e.toLowerCase(),null,!0,!0)});function ru(e,t,n,o){var r=dt.hasOwnProperty(t)?dt[t]:null;(r!==null?r.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(d0(t,n,r,o)&&(n=null),o||r===null?l0(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=n===null?r.type===3?!1:"":n:(t=r.attributeName,o=r.attributeNamespace,n===null?e.removeAttribute(t):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,o?e.setAttributeNS(o,t,n):e.setAttribute(t,n))))}var Fn=s0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,As=Symbol.for("react.element"),pr=Symbol.for("react.portal"),fr=Symbol.for("react.fragment"),iu=Symbol.for("react.strict_mode"),Mc=Symbol.for("react.profiler"),Ny=Symbol.for("react.provider"),Cy=Symbol.for("react.context"),su=Symbol.for("react.forward_ref"),qc=Symbol.for("react.suspense"),Uc=Symbol.for("react.suspense_list"),au=Symbol.for("react.memo"),Zn=Symbol.for("react.lazy"),Ey=Symbol.for("react.offscreen"),Cf=Symbol.iterator;function ai(e){return e===null||typeof e!="object"?null:(e=Cf&&e[Cf]||e["@@iterator"],typeof e=="function"?e:null)}var He=Object.assign,Wl;function Si(e){if(Wl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Wl=t&&t[1]||""}return`
|
|
34
|
+
`+Wl+e}var Kl=!1;function Gl(e,t){if(!e||Kl)return"";Kl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var o=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){o=c}e.call(t.prototype)}else{try{throw Error()}catch(c){o=c}e()}}catch(c){if(c&&o&&typeof c.stack=="string"){for(var r=c.stack.split(`
|
|
35
|
+
`),i=o.stack.split(`
|
|
36
|
+
`),s=r.length-1,a=i.length-1;1<=s&&0<=a&&r[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(r[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||r[s]!==i[a]){var l=`
|
|
37
|
+
`+r[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Kl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Si(e):""}function u0(e){switch(e.tag){case 5:return Si(e.type);case 16:return Si("Lazy");case 13:return Si("Suspense");case 19:return Si("SuspenseList");case 0:case 2:case 15:return e=Gl(e.type,!1),e;case 11:return e=Gl(e.type.render,!1),e;case 1:return e=Gl(e.type,!0),e;default:return""}}function Lc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fr:return"Fragment";case pr:return"Portal";case Mc:return"Profiler";case iu:return"StrictMode";case qc:return"Suspense";case Uc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cy:return(e.displayName||"Context")+".Consumer";case Ny:return(e._context.displayName||"Context")+".Provider";case su:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case au:return t=e.displayName||null,t!==null?t:Lc(e.type)||"Memo";case Zn:t=e._payload,e=e._init;try{return Lc(e(t))}catch{}}return null}function p0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lc(t);case 8:return t===iu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function go(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Py(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f0(e){var t=Py(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(s){o=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(s){o=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ms(e){e._valueTracker||(e._valueTracker=f0(e))}function Iy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=Py(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Ea(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 Dc(e,t){var n=t.checked;return He({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ef(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=go(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Oy(e,t){t=t.checked,t!=null&&ru(e,"checked",t,!1)}function zc(e,t){Oy(e,t);var n=go(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fc(e,t.type,go(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Pf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fc(e,t,n){(t!=="number"||Ea(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $i=Array.isArray;function Tr(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&o&&(e[n].defaultSelected=!0)}else{for(n=""+go(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,o&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Bc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return He({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function If(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(V(92));if($i(n)){if(1<n.length)throw Error(V(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:go(n)}}function Ry(e,t){var n=go(t.value),o=go(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),o!=null&&(e.defaultValue=""+o)}function Of(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ay(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Hc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ay(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qs,My=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,o,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,o,r)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qs=qs||document.createElement("div"),qs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ni={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},m0=["Webkit","ms","Moz","O"];Object.keys(Ni).forEach(function(e){m0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ni[t]=Ni[e]})});function qy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ni.hasOwnProperty(e)&&Ni[e]?(""+t).trim():t+"px"}function Uy(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,r=qy(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}var h0=He({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vc(e,t){if(t){if(h0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function Wc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Kc=null;function lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gc=null,_r=null,jr=null;function Rf(e){if(e=_s(e)){if(typeof Gc!="function")throw Error(V(280));var t=e.stateNode;t&&(t=vl(t),Gc(e.stateNode,e.type,t))}}function Ly(e){_r?jr?jr.push(e):jr=[e]:_r=e}function Dy(){if(_r){var e=_r,t=jr;if(jr=_r=null,Rf(e),t)for(e=0;e<t.length;e++)Rf(t[e])}}function zy(e,t){return e(t)}function Fy(){}var Jl=!1;function By(e,t,n){if(Jl)return e(t,n);Jl=!0;try{return zy(e,t,n)}finally{Jl=!1,(_r!==null||jr!==null)&&(Fy(),Dy())}}function Ki(e,t){var n=e.stateNode;if(n===null)return null;var o=vl(n);if(o===null)return null;n=o[t];e:switch(t){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(n&&typeof n!="function")throw Error(V(231,t,typeof n));return n}var Jc=!1;if(qn)try{var li={};Object.defineProperty(li,"passive",{get:function(){Jc=!0}}),window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{Jc=!1}function y0(e,t,n,o,r,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var Ci=!1,Pa=null,Ia=!1,Qc=null,g0={onError:function(e){Ci=!0,Pa=e}};function v0(e,t,n,o,r,i,s,a,l){Ci=!1,Pa=null,y0.apply(g0,arguments)}function b0(e,t,n,o,r,i,s,a,l){if(v0.apply(this,arguments),Ci){if(Ci){var c=Pa;Ci=!1,Pa=null}else throw Error(V(198));Ia||(Ia=!0,Qc=c)}}function Xo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Hy(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Af(e){if(Xo(e)!==e)throw Error(V(188))}function x0(e){var t=e.alternate;if(!t){if(t=Xo(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,o=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(o=r.return,o!==null){n=o;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return Af(r),e;if(i===o)return Af(r),t;i=i.sibling}throw Error(V(188))}if(n.return!==o.return)n=r,o=i;else{for(var s=!1,a=r.child;a;){if(a===n){s=!0,n=r,o=i;break}if(a===o){s=!0,o=r,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,o=r;break}if(a===o){s=!0,o=i,n=r;break}a=a.sibling}if(!s)throw Error(V(189))}}if(n.alternate!==o)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function Vy(e){return e=x0(e),e!==null?Wy(e):null}function Wy(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Wy(e);if(t!==null)return t;e=e.sibling}return null}var Ky=qt.unstable_scheduleCallback,Mf=qt.unstable_cancelCallback,w0=qt.unstable_shouldYield,S0=qt.unstable_requestPaint,Ge=qt.unstable_now,$0=qt.unstable_getCurrentPriorityLevel,cu=qt.unstable_ImmediatePriority,Gy=qt.unstable_UserBlockingPriority,Oa=qt.unstable_NormalPriority,k0=qt.unstable_LowPriority,Jy=qt.unstable_IdlePriority,ml=null,$n=null;function T0(e){if($n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(ml,e,void 0,(e.current.flags&128)===128)}catch{}}var sn=Math.clz32?Math.clz32:N0,_0=Math.log,j0=Math.LN2;function N0(e){return e>>>=0,e===0?32:31-(_0(e)/j0|0)|0}var Us=64,Ls=4194304;function ki(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ra(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,r=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~r;a!==0?o=ki(a):(i&=s,i!==0&&(o=ki(i)))}else s=n&~r,s!==0?o=ki(s):i!==0&&(o=ki(i));if(o===0)return 0;if(t!==0&&t!==o&&!(t&r)&&(r=o&-o,i=t&-t,r>=i||r===16&&(i&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)n=31-sn(t),r=1<<n,o|=e[n],t&=~r;return o}function C0(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function E0(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-sn(i),a=1<<s,l=r[s];l===-1?(!(a&n)||a&o)&&(r[s]=C0(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Yc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Qy(){var e=Us;return Us<<=1,!(Us&4194240)&&(Us=64),e}function Ql(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ks(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-sn(t),e[t]=n}function P0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-sn(n),i=1<<r;t[r]=0,o[r]=-1,e[r]=-1,n&=~i}}function du(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-sn(n),r=1<<o;r&t|e[o]&t&&(e[o]|=t),n&=~r}}var ke=0;function Yy(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xy,uu,Zy,eg,tg,Xc=!1,Ds=[],ao=null,lo=null,co=null,Gi=new Map,Ji=new Map,to=[],I0="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 submit".split(" ");function qf(e,t){switch(e){case"focusin":case"focusout":ao=null;break;case"dragenter":case"dragleave":lo=null;break;case"mouseover":case"mouseout":co=null;break;case"pointerover":case"pointerout":Gi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function ci(e,t,n,o,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:i,targetContainers:[r]},t!==null&&(t=_s(t),t!==null&&uu(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function O0(e,t,n,o,r){switch(t){case"focusin":return ao=ci(ao,e,t,n,o,r),!0;case"dragenter":return lo=ci(lo,e,t,n,o,r),!0;case"mouseover":return co=ci(co,e,t,n,o,r),!0;case"pointerover":var i=r.pointerId;return Gi.set(i,ci(Gi.get(i)||null,e,t,n,o,r)),!0;case"gotpointercapture":return i=r.pointerId,Ji.set(i,ci(Ji.get(i)||null,e,t,n,o,r)),!0}return!1}function ng(e){var t=Mo(e.target);if(t!==null){var n=Xo(t);if(n!==null){if(t=n.tag,t===13){if(t=Hy(n),t!==null){e.blockedOn=t,tg(e.priority,function(){Zy(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function la(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);Kc=o,n.target.dispatchEvent(o),Kc=null}else return t=_s(n),t!==null&&uu(t),e.blockedOn=n,!1;t.shift()}return!0}function Uf(e,t,n){la(e)&&n.delete(t)}function R0(){Xc=!1,ao!==null&&la(ao)&&(ao=null),lo!==null&&la(lo)&&(lo=null),co!==null&&la(co)&&(co=null),Gi.forEach(Uf),Ji.forEach(Uf)}function di(e,t){e.blockedOn===t&&(e.blockedOn=null,Xc||(Xc=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,R0)))}function Qi(e){function t(r){return di(r,e)}if(0<Ds.length){di(Ds[0],e);for(var n=1;n<Ds.length;n++){var o=Ds[n];o.blockedOn===e&&(o.blockedOn=null)}}for(ao!==null&&di(ao,e),lo!==null&&di(lo,e),co!==null&&di(co,e),Gi.forEach(t),Ji.forEach(t),n=0;n<to.length;n++)o=to[n],o.blockedOn===e&&(o.blockedOn=null);for(;0<to.length&&(n=to[0],n.blockedOn===null);)ng(n),n.blockedOn===null&&to.shift()}var Nr=Fn.ReactCurrentBatchConfig,Aa=!0;function A0(e,t,n,o){var r=ke,i=Nr.transition;Nr.transition=null;try{ke=1,pu(e,t,n,o)}finally{ke=r,Nr.transition=i}}function M0(e,t,n,o){var r=ke,i=Nr.transition;Nr.transition=null;try{ke=4,pu(e,t,n,o)}finally{ke=r,Nr.transition=i}}function pu(e,t,n,o){if(Aa){var r=Zc(e,t,n,o);if(r===null)sc(e,t,o,Ma,n),qf(e,o);else if(O0(r,e,t,n,o))o.stopPropagation();else if(qf(e,o),t&4&&-1<I0.indexOf(e)){for(;r!==null;){var i=_s(r);if(i!==null&&Xy(i),i=Zc(e,t,n,o),i===null&&sc(e,t,o,Ma,n),i===r)break;r=i}r!==null&&o.stopPropagation()}else sc(e,t,o,null,n)}}var Ma=null;function Zc(e,t,n,o){if(Ma=null,e=lu(o),e=Mo(e),e!==null)if(t=Xo(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Hy(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ma=e,null}function og(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($0()){case cu:return 1;case Gy:return 4;case Oa:case k0:return 16;case Jy:return 536870912;default:return 16}default:return 16}}var ro=null,fu=null,ca=null;function rg(){if(ca)return ca;var e,t=fu,n=t.length,o,r="value"in ro?ro.value:ro.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var s=n-e;for(o=1;o<=s&&t[n-o]===r[i-o];o++);return ca=r.slice(e,1<o?1-o:void 0)}function da(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zs(){return!0}function Lf(){return!1}function Lt(e){function t(n,o,r,i,s){this._reactName=n,this._targetInst=r,this.type=o,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?zs:Lf,this.isPropagationStopped=Lf,this}return He(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zs)},persist:function(){},isPersistent:zs}),t}var Jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=Lt(Jr),Ts=He({},Jr,{view:0,detail:0}),q0=Lt(Ts),Yl,Xl,ui,hl=He({},Ts,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==ui&&(ui&&e.type==="mousemove"?(Yl=e.screenX-ui.screenX,Xl=e.screenY-ui.screenY):Xl=Yl=0,ui=e),Yl)},movementY:function(e){return"movementY"in e?e.movementY:Xl}}),Df=Lt(hl),U0=He({},hl,{dataTransfer:0}),L0=Lt(U0),D0=He({},Ts,{relatedTarget:0}),Zl=Lt(D0),z0=He({},Jr,{animationName:0,elapsedTime:0,pseudoElement:0}),F0=Lt(z0),B0=He({},Jr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),H0=Lt(B0),V0=He({},Jr,{data:0}),zf=Lt(V0),W0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K0={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"},G0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=G0[e])?!!t[e]:!1}function hu(){return J0}var Q0=He({},Ts,{key:function(e){if(e.key){var t=W0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=da(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?K0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?da(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?da(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Y0=Lt(Q0),X0=He({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ff=Lt(X0),Z0=He({},Ts,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),ew=Lt(Z0),tw=He({},Jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),nw=Lt(tw),ow=He({},hl,{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}),rw=Lt(ow),iw=[9,13,27,32],yu=qn&&"CompositionEvent"in window,Ei=null;qn&&"documentMode"in document&&(Ei=document.documentMode);var sw=qn&&"TextEvent"in window&&!Ei,ig=qn&&(!yu||Ei&&8<Ei&&11>=Ei),Bf=" ",Hf=!1;function sg(e,t){switch(e){case"keyup":return iw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ag(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mr=!1;function aw(e,t){switch(e){case"compositionend":return ag(t);case"keypress":return t.which!==32?null:(Hf=!0,Bf);case"textInput":return e=t.data,e===Bf&&Hf?null:e;default:return null}}function lw(e,t){if(mr)return e==="compositionend"||!yu&&sg(e,t)?(e=rg(),ca=fu=ro=null,mr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ig&&t.locale!=="ko"?null:t.data;default:return null}}var cw={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 Vf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cw[e.type]:t==="textarea"}function lg(e,t,n,o){Ly(o),t=qa(t,"onChange"),0<t.length&&(n=new mu("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Pi=null,Yi=null;function dw(e){bg(e,0)}function yl(e){var t=gr(e);if(Iy(t))return e}function uw(e,t){if(e==="change")return t}var cg=!1;if(qn){var ec;if(qn){var tc="oninput"in document;if(!tc){var Wf=document.createElement("div");Wf.setAttribute("oninput","return;"),tc=typeof Wf.oninput=="function"}ec=tc}else ec=!1;cg=ec&&(!document.documentMode||9<document.documentMode)}function Kf(){Pi&&(Pi.detachEvent("onpropertychange",dg),Yi=Pi=null)}function dg(e){if(e.propertyName==="value"&&yl(Yi)){var t=[];lg(t,Yi,e,lu(e)),By(dw,t)}}function pw(e,t,n){e==="focusin"?(Kf(),Pi=t,Yi=n,Pi.attachEvent("onpropertychange",dg)):e==="focusout"&&Kf()}function fw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yl(Yi)}function mw(e,t){if(e==="click")return yl(t)}function hw(e,t){if(e==="input"||e==="change")return yl(t)}function yw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dn=typeof Object.is=="function"?Object.is:yw;function Xi(e,t){if(dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var r=n[o];if(!Ac.call(t,r)||!dn(e[r],t[r]))return!1}return!0}function Gf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jf(e,t){var n=Gf(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gf(n)}}function ug(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ug(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pg(){for(var e=window,t=Ea();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ea(e.document)}return t}function gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gw(e){var t=pg(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ug(n.ownerDocument.documentElement,n)){if(o!==null&&gu(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,i=Math.min(o.start,r);o=o.end===void 0?i:Math.min(o.end,r),!e.extend&&i>o&&(r=o,o=i,i=r),r=Jf(n,i);var s=Jf(n,o);r&&s&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),i>o?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vw=qn&&"documentMode"in document&&11>=document.documentMode,hr=null,ed=null,Ii=null,td=!1;function Qf(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;td||hr==null||hr!==Ea(o)||(o=hr,"selectionStart"in o&&gu(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}),Ii&&Xi(Ii,o)||(Ii=o,o=qa(ed,"onSelect"),0<o.length&&(t=new mu("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=hr)))}function Fs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var yr={animationend:Fs("Animation","AnimationEnd"),animationiteration:Fs("Animation","AnimationIteration"),animationstart:Fs("Animation","AnimationStart"),transitionend:Fs("Transition","TransitionEnd")},nc={},fg={};qn&&(fg=document.createElement("div").style,"AnimationEvent"in window||(delete yr.animationend.animation,delete yr.animationiteration.animation,delete yr.animationstart.animation),"TransitionEvent"in window||delete yr.transitionend.transition);function gl(e){if(nc[e])return nc[e];if(!yr[e])return e;var t=yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fg)return nc[e]=t[n];return e}var mg=gl("animationend"),hg=gl("animationiteration"),yg=gl("animationstart"),gg=gl("transitionend"),vg=new Map,Yf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function xo(e,t){vg.set(e,t),Yo(t,[e])}for(var oc=0;oc<Yf.length;oc++){var rc=Yf[oc],bw=rc.toLowerCase(),xw=rc[0].toUpperCase()+rc.slice(1);xo(bw,"on"+xw)}xo(mg,"onAnimationEnd");xo(hg,"onAnimationIteration");xo(yg,"onAnimationStart");xo("dblclick","onDoubleClick");xo("focusin","onFocus");xo("focusout","onBlur");xo(gg,"onTransitionEnd");Ur("onMouseEnter",["mouseout","mouseover"]);Ur("onMouseLeave",["mouseout","mouseover"]);Ur("onPointerEnter",["pointerout","pointerover"]);Ur("onPointerLeave",["pointerout","pointerover"]);Yo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Yo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Yo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Yo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Yo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Yo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ti="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(" "),ww=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ti));function Xf(e,t,n){var o=e.type||"unknown-event";e.currentTarget=n,b0(o,t,void 0,e),e.currentTarget=null}function bg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],r=o.event;o=o.listeners;e:{var i=void 0;if(t)for(var s=o.length-1;0<=s;s--){var a=o[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&r.isPropagationStopped())break e;Xf(r,a,c),i=l}else for(s=0;s<o.length;s++){if(a=o[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&r.isPropagationStopped())break e;Xf(r,a,c),i=l}}}if(Ia)throw e=Qc,Ia=!1,Qc=null,e}function Oe(e,t){var n=t[sd];n===void 0&&(n=t[sd]=new Set);var o=e+"__bubble";n.has(o)||(xg(t,e,2,!1),n.add(o))}function ic(e,t,n){var o=0;t&&(o|=4),xg(n,e,o,t)}var Bs="_reactListening"+Math.random().toString(36).slice(2);function Zi(e){if(!e[Bs]){e[Bs]=!0,jy.forEach(function(n){n!=="selectionchange"&&(ww.has(n)||ic(n,!1,e),ic(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bs]||(t[Bs]=!0,ic("selectionchange",!1,t))}}function xg(e,t,n,o){switch(og(t)){case 1:var r=A0;break;case 4:r=M0;break;default:r=pu}n=r.bind(null,t,n,e),r=void 0,!Jc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),o?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function sc(e,t,n,o,r){var i=o;if(!(t&1)&&!(t&2)&&o!==null)e:for(;;){if(o===null)return;var s=o.tag;if(s===3||s===4){var a=o.stateNode.containerInfo;if(a===r||a.nodeType===8&&a.parentNode===r)break;if(s===4)for(s=o.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===r||l.nodeType===8&&l.parentNode===r))return;s=s.return}for(;a!==null;){if(s=Mo(a),s===null)return;if(l=s.tag,l===5||l===6){o=i=s;continue e}a=a.parentNode}}o=o.return}By(function(){var c=i,f=lu(n),m=[];e:{var v=vg.get(e);if(v!==void 0){var h=mu,y=e;switch(e){case"keypress":if(da(n)===0)break e;case"keydown":case"keyup":h=Y0;break;case"focusin":y="focus",h=Zl;break;case"focusout":y="blur",h=Zl;break;case"beforeblur":case"afterblur":h=Zl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Df;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=L0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=ew;break;case mg:case hg:case yg:h=F0;break;case gg:h=nw;break;case"scroll":h=q0;break;case"wheel":h=rw;break;case"copy":case"cut":case"paste":h=H0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ff}var b=(t&4)!==0,g=!b&&e==="scroll",p=b?v!==null?v+"Capture":null:v;b=[];for(var u=c,x;u!==null;){x=u;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,p!==null&&(S=Ki(u,p),S!=null&&b.push(es(u,S,x)))),g)break;u=u.return}0<b.length&&(v=new h(v,y,null,n,f),m.push({event:v,listeners:b}))}}if(!(t&7)){e:{if(v=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",v&&n!==Kc&&(y=n.relatedTarget||n.fromElement)&&(Mo(y)||y[Un]))break e;if((h||v)&&(v=f.window===f?f:(v=f.ownerDocument)?v.defaultView||v.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=c,y=y?Mo(y):null,y!==null&&(g=Xo(y),y!==g||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=c),h!==y)){if(b=Df,S="onMouseLeave",p="onMouseEnter",u="mouse",(e==="pointerout"||e==="pointerover")&&(b=Ff,S="onPointerLeave",p="onPointerEnter",u="pointer"),g=h==null?v:gr(h),x=y==null?v:gr(y),v=new b(S,u+"leave",h,n,f),v.target=g,v.relatedTarget=x,S=null,Mo(f)===c&&(b=new b(p,u+"enter",y,n,f),b.target=x,b.relatedTarget=g,S=b),g=S,h&&y)t:{for(b=h,p=y,u=0,x=b;x;x=or(x))u++;for(x=0,S=p;S;S=or(S))x++;for(;0<u-x;)b=or(b),u--;for(;0<x-u;)p=or(p),x--;for(;u--;){if(b===p||p!==null&&b===p.alternate)break t;b=or(b),p=or(p)}b=null}else b=null;h!==null&&Zf(m,v,h,b,!1),y!==null&&g!==null&&Zf(m,g,y,b,!0)}}e:{if(v=c?gr(c):window,h=v.nodeName&&v.nodeName.toLowerCase(),h==="select"||h==="input"&&v.type==="file")var T=uw;else if(Vf(v))if(cg)T=hw;else{T=fw;var C=pw}else(h=v.nodeName)&&h.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(T=mw);if(T&&(T=T(e,c))){lg(m,T,n,f);break e}C&&C(e,v,c),e==="focusout"&&(C=v._wrapperState)&&C.controlled&&v.type==="number"&&Fc(v,"number",v.value)}switch(C=c?gr(c):window,e){case"focusin":(Vf(C)||C.contentEditable==="true")&&(hr=C,ed=c,Ii=null);break;case"focusout":Ii=ed=hr=null;break;case"mousedown":td=!0;break;case"contextmenu":case"mouseup":case"dragend":td=!1,Qf(m,n,f);break;case"selectionchange":if(vw)break;case"keydown":case"keyup":Qf(m,n,f)}var $;if(yu)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else mr?sg(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(ig&&n.locale!=="ko"&&(mr||j!=="onCompositionStart"?j==="onCompositionEnd"&&mr&&($=rg()):(ro=f,fu="value"in ro?ro.value:ro.textContent,mr=!0)),C=qa(c,j),0<C.length&&(j=new zf(j,e,null,n,f),m.push({event:j,listeners:C}),$?j.data=$:($=ag(n),$!==null&&(j.data=$)))),($=sw?aw(e,n):lw(e,n))&&(c=qa(c,"onBeforeInput"),0<c.length&&(f=new zf("onBeforeInput","beforeinput",null,n,f),m.push({event:f,listeners:c}),f.data=$))}bg(m,t)})}function es(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qa(e,t){for(var n=t+"Capture",o=[];e!==null;){var r=e,i=r.stateNode;r.tag===5&&i!==null&&(r=i,i=Ki(e,n),i!=null&&o.unshift(es(e,i,r)),i=Ki(e,t),i!=null&&o.push(es(e,i,r))),e=e.return}return o}function or(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Zf(e,t,n,o,r){for(var i=t._reactName,s=[];n!==null&&n!==o;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===o)break;a.tag===5&&c!==null&&(a=c,r?(l=Ki(n,i),l!=null&&s.unshift(es(n,l,a))):r||(l=Ki(n,i),l!=null&&s.push(es(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Sw=/\r\n?/g,$w=/\u0000|\uFFFD/g;function em(e){return(typeof e=="string"?e:""+e).replace(Sw,`
|
|
38
|
+
`).replace($w,"")}function Hs(e,t,n){if(t=em(t),em(e)!==t&&n)throw Error(V(425))}function Ua(){}var nd=null,od=null;function rd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var id=typeof setTimeout=="function"?setTimeout:void 0,kw=typeof clearTimeout=="function"?clearTimeout:void 0,tm=typeof Promise=="function"?Promise:void 0,Tw=typeof queueMicrotask=="function"?queueMicrotask:typeof tm<"u"?function(e){return tm.resolve(null).then(e).catch(_w)}:id;function _w(e){setTimeout(function(){throw e})}function ac(e,t){var n=t,o=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(o===0){e.removeChild(r),Qi(t);return}o--}else n!=="$"&&n!=="$?"&&n!=="$!"||o++;n=r}while(n);Qi(t)}function uo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function nm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Qr=Math.random().toString(36).slice(2),gn="__reactFiber$"+Qr,ts="__reactProps$"+Qr,Un="__reactContainer$"+Qr,sd="__reactEvents$"+Qr,jw="__reactListeners$"+Qr,Nw="__reactHandles$"+Qr;function Mo(e){var t=e[gn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Un]||n[gn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nm(e);e!==null;){if(n=e[gn])return n;e=nm(e)}return t}e=n,n=e.parentNode}return null}function _s(e){return e=e[gn]||e[Un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function vl(e){return e[ts]||null}var ad=[],vr=-1;function wo(e){return{current:e}}function qe(e){0>vr||(e.current=ad[vr],ad[vr]=null,vr--)}function Ce(e,t){vr++,ad[vr]=e.current,e.current=t}var vo={},gt=wo(vo),Nt=wo(!1),Bo=vo;function Lr(e,t){var n=e.type.contextTypes;if(!n)return vo;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r={},i;for(i in n)r[i]=t[i];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Ct(e){return e=e.childContextTypes,e!=null}function La(){qe(Nt),qe(gt)}function om(e,t,n){if(gt.current!==vo)throw Error(V(168));Ce(gt,t),Ce(Nt,n)}function wg(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var r in o)if(!(r in t))throw Error(V(108,p0(e)||"Unknown",r));return He({},n,o)}function Da(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vo,Bo=gt.current,Ce(gt,e),Ce(Nt,Nt.current),!0}function rm(e,t,n){var o=e.stateNode;if(!o)throw Error(V(169));n?(e=wg(e,t,Bo),o.__reactInternalMemoizedMergedChildContext=e,qe(Nt),qe(gt),Ce(gt,e)):qe(Nt),Ce(Nt,n)}var Cn=null,bl=!1,lc=!1;function Sg(e){Cn===null?Cn=[e]:Cn.push(e)}function Cw(e){bl=!0,Sg(e)}function So(){if(!lc&&Cn!==null){lc=!0;var e=0,t=ke;try{var n=Cn;for(ke=1;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}Cn=null,bl=!1}catch(r){throw Cn!==null&&(Cn=Cn.slice(e+1)),Ky(cu,So),r}finally{ke=t,lc=!1}}return null}var br=[],xr=0,za=null,Fa=0,Ft=[],Bt=0,Ho=null,Pn=1,In="";function Co(e,t){br[xr++]=Fa,br[xr++]=za,za=e,Fa=t}function $g(e,t,n){Ft[Bt++]=Pn,Ft[Bt++]=In,Ft[Bt++]=Ho,Ho=e;var o=Pn;e=In;var r=32-sn(o)-1;o&=~(1<<r),n+=1;var i=32-sn(t)+r;if(30<i){var s=r-r%5;i=(o&(1<<s)-1).toString(32),o>>=s,r-=s,Pn=1<<32-sn(t)+r|n<<r|o,In=i+e}else Pn=1<<i|n<<r|o,In=e}function vu(e){e.return!==null&&(Co(e,1),$g(e,1,0))}function bu(e){for(;e===za;)za=br[--xr],br[xr]=null,Fa=br[--xr],br[xr]=null;for(;e===Ho;)Ho=Ft[--Bt],Ft[Bt]=null,In=Ft[--Bt],Ft[Bt]=null,Pn=Ft[--Bt],Ft[Bt]=null}var At=null,Ot=null,De=!1,on=null;function kg(e,t){var n=Ht(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function im(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,At=e,Ot=uo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,At=e,Ot=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ho!==null?{id:Pn,overflow:In}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ht(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,At=e,Ot=null,!0):!1;default:return!1}}function ld(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cd(e){if(De){var t=Ot;if(t){var n=t;if(!im(e,t)){if(ld(e))throw Error(V(418));t=uo(n.nextSibling);var o=At;t&&im(e,t)?kg(o,n):(e.flags=e.flags&-4097|2,De=!1,At=e)}}else{if(ld(e))throw Error(V(418));e.flags=e.flags&-4097|2,De=!1,At=e}}}function sm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function Vs(e){if(e!==At)return!1;if(!De)return sm(e),De=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!rd(e.type,e.memoizedProps)),t&&(t=Ot)){if(ld(e))throw Tg(),Error(V(418));for(;t;)kg(e,t),t=uo(t.nextSibling)}if(sm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ot=uo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ot=null}}else Ot=At?uo(e.stateNode.nextSibling):null;return!0}function Tg(){for(var e=Ot;e;)e=uo(e.nextSibling)}function Dr(){Ot=At=null,De=!1}function xu(e){on===null?on=[e]:on.push(e)}var Ew=Fn.ReactCurrentBatchConfig;function pi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(V(309));var o=n.stateNode}if(!o)throw Error(V(147,e));var r=o,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=r.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(V(284));if(!n._owner)throw Error(V(290,e))}return e}function Ws(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function am(e){var t=e._init;return t(e._payload)}function _g(e){function t(p,u){if(e){var x=p.deletions;x===null?(p.deletions=[u],p.flags|=16):x.push(u)}}function n(p,u){if(!e)return null;for(;u!==null;)t(p,u),u=u.sibling;return null}function o(p,u){for(p=new Map;u!==null;)u.key!==null?p.set(u.key,u):p.set(u.index,u),u=u.sibling;return p}function r(p,u){return p=ho(p,u),p.index=0,p.sibling=null,p}function i(p,u,x){return p.index=x,e?(x=p.alternate,x!==null?(x=x.index,x<u?(p.flags|=2,u):x):(p.flags|=2,u)):(p.flags|=1048576,u)}function s(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,u,x,S){return u===null||u.tag!==6?(u=hc(x,p.mode,S),u.return=p,u):(u=r(u,x),u.return=p,u)}function l(p,u,x,S){var T=x.type;return T===fr?f(p,u,x.props.children,S,x.key):u!==null&&(u.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Zn&&am(T)===u.type)?(S=r(u,x.props),S.ref=pi(p,u,x),S.return=p,S):(S=ga(x.type,x.key,x.props,null,p.mode,S),S.ref=pi(p,u,x),S.return=p,S)}function c(p,u,x,S){return u===null||u.tag!==4||u.stateNode.containerInfo!==x.containerInfo||u.stateNode.implementation!==x.implementation?(u=yc(x,p.mode,S),u.return=p,u):(u=r(u,x.children||[]),u.return=p,u)}function f(p,u,x,S,T){return u===null||u.tag!==7?(u=Fo(x,p.mode,S,T),u.return=p,u):(u=r(u,x),u.return=p,u)}function m(p,u,x){if(typeof u=="string"&&u!==""||typeof u=="number")return u=hc(""+u,p.mode,x),u.return=p,u;if(typeof u=="object"&&u!==null){switch(u.$$typeof){case As:return x=ga(u.type,u.key,u.props,null,p.mode,x),x.ref=pi(p,null,u),x.return=p,x;case pr:return u=yc(u,p.mode,x),u.return=p,u;case Zn:var S=u._init;return m(p,S(u._payload),x)}if($i(u)||ai(u))return u=Fo(u,p.mode,x,null),u.return=p,u;Ws(p,u)}return null}function v(p,u,x,S){var T=u!==null?u.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return T!==null?null:a(p,u,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case As:return x.key===T?l(p,u,x,S):null;case pr:return x.key===T?c(p,u,x,S):null;case Zn:return T=x._init,v(p,u,T(x._payload),S)}if($i(x)||ai(x))return T!==null?null:f(p,u,x,S,null);Ws(p,x)}return null}function h(p,u,x,S,T){if(typeof S=="string"&&S!==""||typeof S=="number")return p=p.get(x)||null,a(u,p,""+S,T);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case As:return p=p.get(S.key===null?x:S.key)||null,l(u,p,S,T);case pr:return p=p.get(S.key===null?x:S.key)||null,c(u,p,S,T);case Zn:var C=S._init;return h(p,u,x,C(S._payload),T)}if($i(S)||ai(S))return p=p.get(x)||null,f(u,p,S,T,null);Ws(u,S)}return null}function y(p,u,x,S){for(var T=null,C=null,$=u,j=u=0,A=null;$!==null&&j<x.length;j++){$.index>j?(A=$,$=null):A=$.sibling;var E=v(p,$,x[j],S);if(E===null){$===null&&($=A);break}e&&$&&E.alternate===null&&t(p,$),u=i(E,u,j),C===null?T=E:C.sibling=E,C=E,$=A}if(j===x.length)return n(p,$),De&&Co(p,j),T;if($===null){for(;j<x.length;j++)$=m(p,x[j],S),$!==null&&(u=i($,u,j),C===null?T=$:C.sibling=$,C=$);return De&&Co(p,j),T}for($=o(p,$);j<x.length;j++)A=h($,p,j,x[j],S),A!==null&&(e&&A.alternate!==null&&$.delete(A.key===null?j:A.key),u=i(A,u,j),C===null?T=A:C.sibling=A,C=A);return e&&$.forEach(function(q){return t(p,q)}),De&&Co(p,j),T}function b(p,u,x,S){var T=ai(x);if(typeof T!="function")throw Error(V(150));if(x=T.call(x),x==null)throw Error(V(151));for(var C=T=null,$=u,j=u=0,A=null,E=x.next();$!==null&&!E.done;j++,E=x.next()){$.index>j?(A=$,$=null):A=$.sibling;var q=v(p,$,E.value,S);if(q===null){$===null&&($=A);break}e&&$&&q.alternate===null&&t(p,$),u=i(q,u,j),C===null?T=q:C.sibling=q,C=q,$=A}if(E.done)return n(p,$),De&&Co(p,j),T;if($===null){for(;!E.done;j++,E=x.next())E=m(p,E.value,S),E!==null&&(u=i(E,u,j),C===null?T=E:C.sibling=E,C=E);return De&&Co(p,j),T}for($=o(p,$);!E.done;j++,E=x.next())E=h($,p,j,E.value,S),E!==null&&(e&&E.alternate!==null&&$.delete(E.key===null?j:E.key),u=i(E,u,j),C===null?T=E:C.sibling=E,C=E);return e&&$.forEach(function(z){return t(p,z)}),De&&Co(p,j),T}function g(p,u,x,S){if(typeof x=="object"&&x!==null&&x.type===fr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case As:e:{for(var T=x.key,C=u;C!==null;){if(C.key===T){if(T=x.type,T===fr){if(C.tag===7){n(p,C.sibling),u=r(C,x.props.children),u.return=p,p=u;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Zn&&am(T)===C.type){n(p,C.sibling),u=r(C,x.props),u.ref=pi(p,C,x),u.return=p,p=u;break e}n(p,C);break}else t(p,C);C=C.sibling}x.type===fr?(u=Fo(x.props.children,p.mode,S,x.key),u.return=p,p=u):(S=ga(x.type,x.key,x.props,null,p.mode,S),S.ref=pi(p,u,x),S.return=p,p=S)}return s(p);case pr:e:{for(C=x.key;u!==null;){if(u.key===C)if(u.tag===4&&u.stateNode.containerInfo===x.containerInfo&&u.stateNode.implementation===x.implementation){n(p,u.sibling),u=r(u,x.children||[]),u.return=p,p=u;break e}else{n(p,u);break}else t(p,u);u=u.sibling}u=yc(x,p.mode,S),u.return=p,p=u}return s(p);case Zn:return C=x._init,g(p,u,C(x._payload),S)}if($i(x))return y(p,u,x,S);if(ai(x))return b(p,u,x,S);Ws(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,u!==null&&u.tag===6?(n(p,u.sibling),u=r(u,x),u.return=p,p=u):(n(p,u),u=hc(x,p.mode,S),u.return=p,p=u),s(p)):n(p,u)}return g}var zr=_g(!0),jg=_g(!1),Ba=wo(null),Ha=null,wr=null,wu=null;function Su(){wu=wr=Ha=null}function $u(e){var t=Ba.current;qe(Ba),e._currentValue=t}function dd(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function Cr(e,t){Ha=e,wu=wr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(wu!==e)if(e={context:e,memoizedValue:t,next:null},wr===null){if(Ha===null)throw Error(V(308));wr=e,Ha.dependencies={lanes:0,firstContext:e}}else wr=wr.next=e;return t}var qo=null;function ku(e){qo===null?qo=[e]:qo.push(e)}function Ng(e,t,n,o){var r=t.interleaved;return r===null?(n.next=n,ku(t)):(n.next=r.next,r.next=n),t.interleaved=n,Ln(e,o)}function Ln(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var eo=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function po(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,be&2){var r=o.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),o.pending=t,Ln(e,n)}return r=o.interleaved,r===null?(t.next=t,ku(o)):(t.next=r.next,r.next=t),o.interleaved=t,Ln(e,n)}function ua(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,du(e,n)}}function lm(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?r=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:o.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Va(e,t,n,o){var r=e.updateQueue;eo=!1;var i=r.firstBaseUpdate,s=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==s&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(i!==null){var m=r.baseState;s=0,f=c=l=null,a=i;do{var v=a.lane,h=a.eventTime;if((o&v)===v){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,b=a;switch(v=t,h=n,b.tag){case 1:if(y=b.payload,typeof y=="function"){m=y.call(h,m,v);break e}m=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=b.payload,v=typeof y=="function"?y.call(h,m,v):y,v==null)break e;m=He({},m,v);break e;case 2:eo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,v=r.effects,v===null?r.effects=[a]:v.push(a))}else h={eventTime:h,lane:v,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=h,l=m):f=f.next=h,s|=v;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;v=a,a=v.next,v.next=null,r.lastBaseUpdate=v,r.shared.pending=null}}while(!0);if(f===null&&(l=m),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=f,t=r.shared.interleaved,t!==null){r=t;do s|=r.lane,r=r.next;while(r!==t)}else i===null&&(r.shared.lanes=0);Wo|=s,e.lanes=s,e.memoizedState=m}}function cm(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],r=o.callback;if(r!==null){if(o.callback=null,o=n,typeof r!="function")throw Error(V(191,r));r.call(o)}}}var js={},kn=wo(js),ns=wo(js),os=wo(js);function Uo(e){if(e===js)throw Error(V(174));return e}function _u(e,t){switch(Ce(os,t),Ce(ns,e),Ce(kn,js),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hc(t,e)}qe(kn),Ce(kn,t)}function Fr(){qe(kn),qe(ns),qe(os)}function Eg(e){Uo(os.current);var t=Uo(kn.current),n=Hc(t,e.type);t!==n&&(Ce(ns,e),Ce(kn,n))}function ju(e){ns.current===e&&(qe(kn),qe(ns))}var Fe=wo(0);function Wa(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cc=[];function Nu(){for(var e=0;e<cc.length;e++)cc[e]._workInProgressVersionPrimary=null;cc.length=0}var pa=Fn.ReactCurrentDispatcher,dc=Fn.ReactCurrentBatchConfig,Vo=0,Be=null,Xe=null,ot=null,Ka=!1,Oi=!1,rs=0,Pw=0;function ut(){throw Error(V(321))}function Cu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dn(e[n],t[n]))return!1;return!0}function Eu(e,t,n,o,r,i){if(Vo=i,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pa.current=e===null||e.memoizedState===null?Aw:Mw,e=n(o,r),Oi){i=0;do{if(Oi=!1,rs=0,25<=i)throw Error(V(301));i+=1,ot=Xe=null,t.updateQueue=null,pa.current=qw,e=n(o,r)}while(Oi)}if(pa.current=Ga,t=Xe!==null&&Xe.next!==null,Vo=0,ot=Xe=Be=null,Ka=!1,t)throw Error(V(300));return e}function Pu(){var e=rs!==0;return rs=0,e}function hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Be.memoizedState=ot=e:ot=ot.next=e,ot}function Qt(){if(Xe===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?Be.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Error(V(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?Be.memoizedState=ot=e:ot=ot.next=e}return ot}function is(e,t){return typeof t=="function"?t(e):t}function uc(e){var t=Qt(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var o=Xe,r=o.baseQueue,i=n.pending;if(i!==null){if(r!==null){var s=r.next;r.next=i.next,i.next=s}o.baseQueue=r=i,n.pending=null}if(r!==null){i=r.next,o=o.baseState;var a=s=null,l=null,c=i;do{var f=c.lane;if((Vo&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),o=c.hasEagerState?c.eagerState:e(o,c.action);else{var m={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=m,s=o):l=l.next=m,Be.lanes|=f,Wo|=f}c=c.next}while(c!==null&&c!==i);l===null?s=o:l.next=a,dn(o,t.memoizedState)||(jt=!0),t.memoizedState=o,t.baseState=s,t.baseQueue=l,n.lastRenderedState=o}if(e=n.interleaved,e!==null){r=e;do i=r.lane,Be.lanes|=i,Wo|=i,r=r.next;while(r!==e)}else r===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pc(e){var t=Qt(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var o=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var s=r=r.next;do i=e(i,s.action),s=s.next;while(s!==r);dn(i,t.memoizedState)||(jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,o]}function Pg(){}function Ig(e,t){var n=Be,o=Qt(),r=t(),i=!dn(o.memoizedState,r);if(i&&(o.memoizedState=r,jt=!0),o=o.queue,Iu(Ag.bind(null,n,o,e),[e]),o.getSnapshot!==t||i||ot!==null&&ot.memoizedState.tag&1){if(n.flags|=2048,ss(9,Rg.bind(null,n,o,r,t),void 0,null),rt===null)throw Error(V(349));Vo&30||Og(n,t,r)}return r}function Og(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Rg(e,t,n,o){t.value=n,t.getSnapshot=o,Mg(t)&&qg(e)}function Ag(e,t,n){return n(function(){Mg(t)&&qg(e)})}function Mg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dn(e,n)}catch{return!0}}function qg(e){var t=Ln(e,1);t!==null&&an(t,e,1,-1)}function dm(e){var t=hn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:e},t.queue=e,e=e.dispatch=Rw.bind(null,Be,e),[t.memoizedState,e]}function ss(e,t,n,o){return e={tag:e,create:t,destroy:n,deps:o,next:null},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e)),e}function Ug(){return Qt().memoizedState}function fa(e,t,n,o){var r=hn();Be.flags|=e,r.memoizedState=ss(1|t,n,void 0,o===void 0?null:o)}function xl(e,t,n,o){var r=Qt();o=o===void 0?null:o;var i=void 0;if(Xe!==null){var s=Xe.memoizedState;if(i=s.destroy,o!==null&&Cu(o,s.deps)){r.memoizedState=ss(t,n,i,o);return}}Be.flags|=e,r.memoizedState=ss(1|t,n,i,o)}function um(e,t){return fa(8390656,8,e,t)}function Iu(e,t){return xl(2048,8,e,t)}function Lg(e,t){return xl(4,2,e,t)}function Dg(e,t){return xl(4,4,e,t)}function zg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Fg(e,t,n){return n=n!=null?n.concat([e]):null,xl(4,4,zg.bind(null,t,e),n)}function Ou(){}function Bg(e,t){var n=Qt();t=t===void 0?null:t;var o=n.memoizedState;return o!==null&&t!==null&&Cu(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Hg(e,t){var n=Qt();t=t===void 0?null:t;var o=n.memoizedState;return o!==null&&t!==null&&Cu(t,o[1])?o[0]:(e=e(),n.memoizedState=[e,t],e)}function Vg(e,t,n){return Vo&21?(dn(n,t)||(n=Qy(),Be.lanes|=n,Wo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jt=!0),e.memoizedState=n)}function Iw(e,t){var n=ke;ke=n!==0&&4>n?n:4,e(!0);var o=dc.transition;dc.transition={};try{e(!1),t()}finally{ke=n,dc.transition=o}}function Wg(){return Qt().memoizedState}function Ow(e,t,n){var o=mo(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},Kg(e))Gg(t,n);else if(n=Ng(e,t,n,o),n!==null){var r=wt();an(n,e,o,r),Jg(n,t,o)}}function Rw(e,t,n){var o=mo(e),r={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kg(e))Gg(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(r.hasEagerState=!0,r.eagerState=a,dn(a,s)){var l=t.interleaved;l===null?(r.next=r,ku(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=Ng(e,t,r,o),n!==null&&(r=wt(),an(n,e,o,r),Jg(n,t,o))}}function Kg(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function Gg(e,t){Oi=Ka=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jg(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,du(e,n)}}var Ga={readContext:Jt,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},Aw={readContext:Jt,useCallback:function(e,t){return hn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:um,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fa(4194308,4,zg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fa(4194308,4,e,t)},useInsertionEffect:function(e,t){return fa(4,2,e,t)},useMemo:function(e,t){var n=hn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=hn();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Ow.bind(null,Be,e),[o.memoizedState,e]},useRef:function(e){var t=hn();return e={current:e},t.memoizedState=e},useState:dm,useDebugValue:Ou,useDeferredValue:function(e){return hn().memoizedState=e},useTransition:function(){var e=dm(!1),t=e[0];return e=Iw.bind(null,e[1]),hn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=Be,r=hn();if(De){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),rt===null)throw Error(V(349));Vo&30||Og(o,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,um(Ag.bind(null,o,i,e),[e]),o.flags|=2048,ss(9,Rg.bind(null,o,i,n,t),void 0,null),n},useId:function(){var e=hn(),t=rt.identifierPrefix;if(De){var n=In,o=Pn;n=(o&~(1<<32-sn(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=rs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Pw++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Mw={readContext:Jt,useCallback:Bg,useContext:Jt,useEffect:Iu,useImperativeHandle:Fg,useInsertionEffect:Lg,useLayoutEffect:Dg,useMemo:Hg,useReducer:uc,useRef:Ug,useState:function(){return uc(is)},useDebugValue:Ou,useDeferredValue:function(e){var t=Qt();return Vg(t,Xe.memoizedState,e)},useTransition:function(){var e=uc(is)[0],t=Qt().memoizedState;return[e,t]},useMutableSource:Pg,useSyncExternalStore:Ig,useId:Wg,unstable_isNewReconciler:!1},qw={readContext:Jt,useCallback:Bg,useContext:Jt,useEffect:Iu,useImperativeHandle:Fg,useInsertionEffect:Lg,useLayoutEffect:Dg,useMemo:Hg,useReducer:pc,useRef:Ug,useState:function(){return pc(is)},useDebugValue:Ou,useDeferredValue:function(e){var t=Qt();return Xe===null?t.memoizedState=e:Vg(t,Xe.memoizedState,e)},useTransition:function(){var e=pc(is)[0],t=Qt().memoizedState;return[e,t]},useMutableSource:Pg,useSyncExternalStore:Ig,useId:Wg,unstable_isNewReconciler:!1};function tn(e,t){if(e&&e.defaultProps){t=He({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ud(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:He({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wl={isMounted:function(e){return(e=e._reactInternals)?Xo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var o=wt(),r=mo(e),i=Rn(o,r);i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(an(t,e,r,o),ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=wt(),r=mo(e),i=Rn(o,r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(an(t,e,r,o),ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),o=mo(e),r=Rn(n,o);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,o),t!==null&&(an(t,e,o,n),ua(t,e,o))}};function pm(e,t,n,o,r,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,i,s):t.prototype&&t.prototype.isPureReactComponent?!Xi(n,o)||!Xi(r,i):!0}function Qg(e,t,n){var o=!1,r=vo,i=t.contextType;return typeof i=="object"&&i!==null?i=Jt(i):(r=Ct(t)?Bo:gt.current,o=t.contextTypes,i=(o=o!=null)?Lr(e,r):vo),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wl,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),t}function fm(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&wl.enqueueReplaceState(t,t.state,null)}function pd(e,t,n,o){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},Tu(e);var i=t.contextType;typeof i=="object"&&i!==null?r.context=Jt(i):(i=Ct(t)?Bo:gt.current,r.context=Lr(e,i)),r.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ud(e,t,i,n),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&wl.enqueueReplaceState(r,r.state,null),Va(e,n,r,o),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308)}function Br(e,t){try{var n="",o=t;do n+=u0(o),o=o.return;while(o);var r=n}catch(i){r=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:r,digest:null}}function fc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fd(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Uw=typeof WeakMap=="function"?WeakMap:Map;function Yg(e,t,n){n=Rn(-1,n),n.tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){Qa||(Qa=!0,$d=o),fd(e,t)},n}function Xg(e,t,n){n=Rn(-1,n),n.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var r=t.value;n.payload=function(){return o(r)},n.callback=function(){fd(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){fd(e,t),typeof o!="function"&&(fo===null?fo=new Set([this]):fo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function mm(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new Uw;var r=new Set;o.set(t,r)}else r=o.get(t),r===void 0&&(r=new Set,o.set(t,r));r.has(n)||(r.add(n),e=Xw.bind(null,e,t,n),t.then(e,e))}function hm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ym(e,t,n,o,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rn(-1,1),t.tag=2,po(n,t,1))),n.lanes|=1),e)}var Lw=Fn.ReactCurrentOwner,jt=!1;function vt(e,t,n,o){t.child=e===null?jg(t,null,n,o):zr(t,e.child,n,o)}function gm(e,t,n,o,r){n=n.render;var i=t.ref;return Cr(t,r),o=Eu(e,t,n,o,i,r),n=Pu(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Dn(e,t,r)):(De&&n&&vu(t),t.flags|=1,vt(e,t,o,r),t.child)}function vm(e,t,n,o,r){if(e===null){var i=n.type;return typeof i=="function"&&!zu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Zg(e,t,i,o,r)):(e=ga(n.type,null,o,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&r)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Xi,n(s,o)&&e.ref===t.ref)return Dn(e,t,r)}return t.flags|=1,e=ho(i,o),e.ref=t.ref,e.return=t,t.child=e}function Zg(e,t,n,o,r){if(e!==null){var i=e.memoizedProps;if(Xi(i,o)&&e.ref===t.ref)if(jt=!1,t.pendingProps=o=i,(e.lanes&r)!==0)e.flags&131072&&(jt=!0);else return t.lanes=e.lanes,Dn(e,t,r)}return md(e,t,n,o,r)}function ev(e,t,n){var o=t.pendingProps,r=o.children,i=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce($r,Pt),Pt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce($r,Pt),Pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=i!==null?i.baseLanes:n,Ce($r,Pt),Pt|=o}else i!==null?(o=i.baseLanes|n,t.memoizedState=null):o=n,Ce($r,Pt),Pt|=o;return vt(e,t,r,n),t.child}function tv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function md(e,t,n,o,r){var i=Ct(n)?Bo:gt.current;return i=Lr(t,i),Cr(t,r),n=Eu(e,t,n,o,i,r),o=Pu(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Dn(e,t,r)):(De&&o&&vu(t),t.flags|=1,vt(e,t,n,r),t.child)}function bm(e,t,n,o,r){if(Ct(n)){var i=!0;Da(t)}else i=!1;if(Cr(t,r),t.stateNode===null)ma(e,t),Qg(t,n,o),pd(t,n,o,r),o=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Jt(c):(c=Ct(n)?Bo:gt.current,c=Lr(t,c));var f=n.getDerivedStateFromProps,m=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==o||l!==c)&&fm(t,s,o,c),eo=!1;var v=t.memoizedState;s.state=v,Va(t,o,s,r),l=t.memoizedState,a!==o||v!==l||Nt.current||eo?(typeof f=="function"&&(ud(t,n,f,o),l=t.memoizedState),(a=eo||pm(t,n,a,o,v,l,c))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=l),s.props=o,s.state=l,s.context=c,o=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{s=t.stateNode,Cg(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:tn(t.type,a),s.props=c,m=t.pendingProps,v=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jt(l):(l=Ct(n)?Bo:gt.current,l=Lr(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==m||v!==l)&&fm(t,s,o,l),eo=!1,v=t.memoizedState,s.state=v,Va(t,o,s,r);var y=t.memoizedState;a!==m||v!==y||Nt.current||eo?(typeof h=="function"&&(ud(t,n,h,o),y=t.memoizedState),(c=eo||pm(t,n,c,o,v,y,l)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(o,y,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(o,y,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=y),s.props=o,s.state=y,s.context=l,o=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),o=!1)}return hd(e,t,n,o,i,r)}function hd(e,t,n,o,r,i){tv(e,t);var s=(t.flags&128)!==0;if(!o&&!s)return r&&rm(t,n,!1),Dn(e,t,i);o=t.stateNode,Lw.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&s?(t.child=zr(t,e.child,null,i),t.child=zr(t,null,a,i)):vt(e,t,a,i),t.memoizedState=o.state,r&&rm(t,n,!0),t.child}function nv(e){var t=e.stateNode;t.pendingContext?om(e,t.pendingContext,t.pendingContext!==t.context):t.context&&om(e,t.context,!1),_u(e,t.containerInfo)}function xm(e,t,n,o,r){return Dr(),xu(r),t.flags|=256,vt(e,t,n,o),t.child}var yd={dehydrated:null,treeContext:null,retryLane:0};function gd(e){return{baseLanes:e,cachePool:null,transitions:null}}function ov(e,t,n){var o=t.pendingProps,r=Fe.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(r&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),Ce(Fe,r&1),e===null)return cd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,i?(o=t.mode,i=t.child,s={mode:"hidden",children:s},!(o&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=kl(s,o,0,null),e=Fo(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=gd(n),t.memoizedState=yd,e):Ru(t,s));if(r=e.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return Dw(e,t,s,o,a,r,n);if(i){i=o.fallback,s=t.mode,r=e.child,a=r.sibling;var l={mode:"hidden",children:o.children};return!(s&1)&&t.child!==r?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=ho(r,l),o.subtreeFlags=r.subtreeFlags&14680064),a!==null?i=ho(a,i):(i=Fo(i,s,n,null),i.flags|=2),i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,s=e.child.memoizedState,s=s===null?gd(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=yd,o}return i=e.child,e=i.sibling,o=ho(i,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=n),o.return=t,o.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Ru(e,t){return t=kl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ks(e,t,n,o){return o!==null&&xu(o),zr(t,e.child,null,n),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dw(e,t,n,o,r,i,s){if(n)return t.flags&256?(t.flags&=-257,o=fc(Error(V(422))),Ks(e,t,s,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=o.fallback,r=t.mode,o=kl({mode:"visible",children:o.children},r,0,null),i=Fo(i,r,s,null),i.flags|=2,o.return=t,i.return=t,o.sibling=i,t.child=o,t.mode&1&&zr(t,e.child,null,s),t.child.memoizedState=gd(s),t.memoizedState=yd,i);if(!(t.mode&1))return Ks(e,t,s,null);if(r.data==="$!"){if(o=r.nextSibling&&r.nextSibling.dataset,o)var a=o.dgst;return o=a,i=Error(V(419)),o=fc(i,o,void 0),Ks(e,t,s,o)}if(a=(s&e.childLanes)!==0,jt||a){if(o=rt,o!==null){switch(s&-s){case 4:r=2;break;case 16:r=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(o.suspendedLanes|s)?0:r,r!==0&&r!==i.retryLane&&(i.retryLane=r,Ln(e,r),an(o,e,r,-1))}return Du(),o=fc(Error(V(421))),Ks(e,t,s,o)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=Zw.bind(null,e),r._reactRetry=t,null):(e=i.treeContext,Ot=uo(r.nextSibling),At=t,De=!0,on=null,e!==null&&(Ft[Bt++]=Pn,Ft[Bt++]=In,Ft[Bt++]=Ho,Pn=e.id,In=e.overflow,Ho=t),t=Ru(t,o.children),t.flags|=4096,t)}function wm(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),dd(e.return,t,n)}function mc(e,t,n,o,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=o,i.tail=n,i.tailMode=r)}function rv(e,t,n){var o=t.pendingProps,r=o.revealOrder,i=o.tail;if(vt(e,t,o.children,n),o=Fe.current,o&2)o=o&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wm(e,n,t);else if(e.tag===19)wm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Ce(Fe,o),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&Wa(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),mc(t,!1,r,n,i);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Wa(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}mc(t,!0,n,null,i);break;case"together":mc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ma(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=ho(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ho(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function zw(e,t,n){switch(t.tag){case 3:nv(t),Dr();break;case 5:Eg(t);break;case 1:Ct(t.type)&&Da(t);break;case 4:_u(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,r=t.memoizedProps.value;Ce(Ba,o._currentValue),o._currentValue=r;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Ce(Fe,Fe.current&1),t.flags|=128,null):n&t.child.childLanes?ov(e,t,n):(Ce(Fe,Fe.current&1),e=Dn(e,t,n),e!==null?e.sibling:null);Ce(Fe,Fe.current&1);break;case 19:if(o=(n&t.childLanes)!==0,e.flags&128){if(o)return rv(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Ce(Fe,Fe.current),o)break;return null;case 22:case 23:return t.lanes=0,ev(e,t,n)}return Dn(e,t,n)}var iv,vd,sv,av;iv=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};vd=function(){};sv=function(e,t,n,o){var r=e.memoizedProps;if(r!==o){e=t.stateNode,Uo(kn.current);var i=null;switch(n){case"input":r=Dc(e,r),o=Dc(e,o),i=[];break;case"select":r=He({},r,{value:void 0}),o=He({},o,{value:void 0}),i=[];break;case"textarea":r=Bc(e,r),o=Bc(e,o),i=[];break;default:typeof r.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Ua)}Vc(n,o);var s;n=null;for(c in r)if(!o.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var a=r[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Vi.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in o){var l=o[c];if(a=r!=null?r[c]:void 0,o.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Vi.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Oe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};av=function(e,t,n,o){n!==o&&(t.flags|=4)};function fi(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags&14680064,o|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags,o|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function Fw(e,t,n){var o=t.pendingProps;switch(bu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return Ct(t.type)&&La(),pt(t),null;case 3:return o=t.stateNode,Fr(),qe(Nt),qe(gt),Nu(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Vs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,on!==null&&(_d(on),on=null))),vd(e,t),pt(t),null;case 5:ju(t);var r=Uo(os.current);if(n=t.type,e!==null&&t.stateNode!=null)sv(e,t,n,o,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(V(166));return pt(t),null}if(e=Uo(kn.current),Vs(t)){o=t.stateNode,n=t.type;var i=t.memoizedProps;switch(o[gn]=t,o[ts]=i,e=(t.mode&1)!==0,n){case"dialog":Oe("cancel",o),Oe("close",o);break;case"iframe":case"object":case"embed":Oe("load",o);break;case"video":case"audio":for(r=0;r<Ti.length;r++)Oe(Ti[r],o);break;case"source":Oe("error",o);break;case"img":case"image":case"link":Oe("error",o),Oe("load",o);break;case"details":Oe("toggle",o);break;case"input":Ef(o,i),Oe("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!i.multiple},Oe("invalid",o);break;case"textarea":If(o,i),Oe("invalid",o)}Vc(n,i),r=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?o.textContent!==a&&(i.suppressHydrationWarning!==!0&&Hs(o.textContent,a,e),r=["children",a]):typeof a=="number"&&o.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Hs(o.textContent,a,e),r=["children",""+a]):Vi.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Oe("scroll",o)}switch(n){case"input":Ms(o),Pf(o,i,!0);break;case"textarea":Ms(o),Of(o);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(o.onclick=Ua)}o=r,t.updateQueue=o,o!==null&&(t.flags|=4)}else{s=r.nodeType===9?r:r.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ay(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=s.createElement(n,{is:o.is}):(e=s.createElement(n),n==="select"&&(s=e,o.multiple?s.multiple=!0:o.size&&(s.size=o.size))):e=s.createElementNS(e,n),e[gn]=t,e[ts]=o,iv(e,t,!1,!1),t.stateNode=e;e:{switch(s=Wc(n,o),n){case"dialog":Oe("cancel",e),Oe("close",e),r=o;break;case"iframe":case"object":case"embed":Oe("load",e),r=o;break;case"video":case"audio":for(r=0;r<Ti.length;r++)Oe(Ti[r],e);r=o;break;case"source":Oe("error",e),r=o;break;case"img":case"image":case"link":Oe("error",e),Oe("load",e),r=o;break;case"details":Oe("toggle",e),r=o;break;case"input":Ef(e,o),r=Dc(e,o),Oe("invalid",e);break;case"option":r=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},r=He({},o,{value:void 0}),Oe("invalid",e);break;case"textarea":If(e,o),r=Bc(e,o),Oe("invalid",e);break;default:r=o}Vc(n,r),a=r;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Uy(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&My(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Wi(e,l):typeof l=="number"&&Wi(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Vi.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Oe("scroll",e):l!=null&&ru(e,i,l,s))}switch(n){case"input":Ms(e),Pf(e,o,!1);break;case"textarea":Ms(e),Of(e);break;case"option":o.value!=null&&e.setAttribute("value",""+go(o.value));break;case"select":e.multiple=!!o.multiple,i=o.value,i!=null?Tr(e,!!o.multiple,i,!1):o.defaultValue!=null&&Tr(e,!!o.multiple,o.defaultValue,!0);break;default:typeof r.onClick=="function"&&(e.onclick=Ua)}switch(n){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pt(t),null;case 6:if(e&&t.stateNode!=null)av(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(V(166));if(n=Uo(os.current),Uo(kn.current),Vs(t)){if(o=t.stateNode,n=t.memoizedProps,o[gn]=t,(i=o.nodeValue!==n)&&(e=At,e!==null))switch(e.tag){case 3:Hs(o.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hs(o.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else o=(n.nodeType===9?n:n.ownerDocument).createTextNode(o),o[gn]=t,t.stateNode=o}return pt(t),null;case 13:if(qe(Fe),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&Ot!==null&&t.mode&1&&!(t.flags&128))Tg(),Dr(),t.flags|=98560,i=!1;else if(i=Vs(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(V(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(V(317));i[gn]=t}else Dr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pt(t),i=!1}else on!==null&&(_d(on),on=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,t.mode&1&&(e===null||Fe.current&1?tt===0&&(tt=3):Du())),t.updateQueue!==null&&(t.flags|=4),pt(t),null);case 4:return Fr(),vd(e,t),e===null&&Zi(t.stateNode.containerInfo),pt(t),null;case 10:return $u(t.type._context),pt(t),null;case 17:return Ct(t.type)&&La(),pt(t),null;case 19:if(qe(Fe),i=t.memoizedState,i===null)return pt(t),null;if(o=(t.flags&128)!==0,s=i.rendering,s===null)if(o)fi(i,!1);else{if(tt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Wa(e),s!==null){for(t.flags|=128,fi(i,!1),o=s.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=n,n=t.child;n!==null;)i=n,e=o,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ce(Fe,Fe.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ge()>Hr&&(t.flags|=128,o=!0,fi(i,!1),t.lanes=4194304)}else{if(!o)if(e=Wa(s),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!De)return pt(t),null}else 2*Ge()-i.renderingStartTime>Hr&&n!==1073741824&&(t.flags|=128,o=!0,fi(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ge(),t.sibling=null,n=Fe.current,Ce(Fe,o?n&1|2:n&1),t):(pt(t),null);case 22:case 23:return Lu(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?Pt&1073741824&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function Bw(e,t){switch(bu(t),t.tag){case 1:return Ct(t.type)&&La(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fr(),qe(Nt),qe(gt),Nu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ju(t),null;case 13:if(qe(Fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Dr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qe(Fe),null;case 4:return Fr(),null;case 10:return $u(t.type._context),null;case 22:case 23:return Lu(),null;case 24:return null;default:return null}}var Gs=!1,mt=!1,Hw=typeof WeakSet=="function"?WeakSet:Set,ee=null;function Sr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){Ve(e,t,o)}else n.current=null}function bd(e,t,n){try{n()}catch(o){Ve(e,t,o)}}var Sm=!1;function Vw(e,t){if(nd=Aa,e=pg(),gu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,i=o.focusNode;o=o.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,f=0,m=e,v=null;t:for(;;){for(var h;m!==n||r!==0&&m.nodeType!==3||(a=s+r),m!==i||o!==0&&m.nodeType!==3||(l=s+o),m.nodeType===3&&(s+=m.nodeValue.length),(h=m.firstChild)!==null;)v=m,m=h;for(;;){if(m===e)break t;if(v===n&&++c===r&&(a=s),v===i&&++f===o&&(l=s),(h=m.nextSibling)!==null)break;m=v,v=m.parentNode}m=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(od={focusedElem:e,selectionRange:n},Aa=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var b=y.memoizedProps,g=y.memoizedState,p=t.stateNode,u=p.getSnapshotBeforeUpdate(t.elementType===t.type?b:tn(t.type,b),g);p.__reactInternalSnapshotBeforeUpdate=u}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(S){Ve(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return y=Sm,Sm=!1,y}function Ri(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var r=o=o.next;do{if((r.tag&e)===e){var i=r.destroy;r.destroy=void 0,i!==void 0&&bd(t,n,i)}r=r.next}while(r!==o)}}function Sl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function xd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lv(e){var t=e.alternate;t!==null&&(e.alternate=null,lv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gn],delete t[ts],delete t[sd],delete t[jw],delete t[Nw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cv(e){return e.tag===5||e.tag===3||e.tag===4}function $m(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cv(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.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 wd(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ua));else if(o!==4&&(e=e.child,e!==null))for(wd(e,t,n),e=e.sibling;e!==null;)wd(e,t,n),e=e.sibling}function Sd(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Sd(e,t,n),e=e.sibling;e!==null;)Sd(e,t,n),e=e.sibling}var st=null,nn=!1;function Wn(e,t,n){for(n=n.child;n!==null;)dv(e,t,n),n=n.sibling}function dv(e,t,n){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(ml,n)}catch{}switch(n.tag){case 5:mt||Sr(n,t);case 6:var o=st,r=nn;st=null,Wn(e,t,n),st=o,nn=r,st!==null&&(nn?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(nn?(e=st,n=n.stateNode,e.nodeType===8?ac(e.parentNode,n):e.nodeType===1&&ac(e,n),Qi(e)):ac(st,n.stateNode));break;case 4:o=st,r=nn,st=n.stateNode.containerInfo,nn=!0,Wn(e,t,n),st=o,nn=r;break;case 0:case 11:case 14:case 15:if(!mt&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){r=o=o.next;do{var i=r,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&bd(n,t,s),r=r.next}while(r!==o)}Wn(e,t,n);break;case 1:if(!mt&&(Sr(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(a){Ve(n,t,a)}Wn(e,t,n);break;case 21:Wn(e,t,n);break;case 22:n.mode&1?(mt=(o=mt)||n.memoizedState!==null,Wn(e,t,n),mt=o):Wn(e,t,n);break;default:Wn(e,t,n)}}function km(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hw),t.forEach(function(o){var r=eS.bind(null,e,o);n.has(o)||(n.add(o),o.then(r,r))})}}function Xt(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var r=n[o];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:st=a.stateNode,nn=!1;break e;case 3:st=a.stateNode.containerInfo,nn=!0;break e;case 4:st=a.stateNode.containerInfo,nn=!0;break e}a=a.return}if(st===null)throw Error(V(160));dv(i,s,r),st=null,nn=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(c){Ve(r,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)uv(t,e),t=t.sibling}function uv(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Xt(t,e),fn(e),o&4){try{Ri(3,e,e.return),Sl(3,e)}catch(b){Ve(e,e.return,b)}try{Ri(5,e,e.return)}catch(b){Ve(e,e.return,b)}}break;case 1:Xt(t,e),fn(e),o&512&&n!==null&&Sr(n,n.return);break;case 5:if(Xt(t,e),fn(e),o&512&&n!==null&&Sr(n,n.return),e.flags&32){var r=e.stateNode;try{Wi(r,"")}catch(b){Ve(e,e.return,b)}}if(o&4&&(r=e.stateNode,r!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Oy(r,i),Wc(a,s);var c=Wc(a,i);for(s=0;s<l.length;s+=2){var f=l[s],m=l[s+1];f==="style"?Uy(r,m):f==="dangerouslySetInnerHTML"?My(r,m):f==="children"?Wi(r,m):ru(r,f,m,c)}switch(a){case"input":zc(r,i);break;case"textarea":Ry(r,i);break;case"select":var v=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Tr(r,!!i.multiple,h,!1):v!==!!i.multiple&&(i.defaultValue!=null?Tr(r,!!i.multiple,i.defaultValue,!0):Tr(r,!!i.multiple,i.multiple?[]:"",!1))}r[ts]=i}catch(b){Ve(e,e.return,b)}}break;case 6:if(Xt(t,e),fn(e),o&4){if(e.stateNode===null)throw Error(V(162));r=e.stateNode,i=e.memoizedProps;try{r.nodeValue=i}catch(b){Ve(e,e.return,b)}}break;case 3:if(Xt(t,e),fn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{Qi(t.containerInfo)}catch(b){Ve(e,e.return,b)}break;case 4:Xt(t,e),fn(e);break;case 13:Xt(t,e),fn(e),r=e.child,r.flags&8192&&(i=r.memoizedState!==null,r.stateNode.isHidden=i,!i||r.alternate!==null&&r.alternate.memoizedState!==null||(qu=Ge())),o&4&&km(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(mt=(c=mt)||f,Xt(t,e),mt=c):Xt(t,e),fn(e),o&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(ee=e,f=e.child;f!==null;){for(m=ee=f;ee!==null;){switch(v=ee,h=v.child,v.tag){case 0:case 11:case 14:case 15:Ri(4,v,v.return);break;case 1:Sr(v,v.return);var y=v.stateNode;if(typeof y.componentWillUnmount=="function"){o=v,n=v.return;try{t=o,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(b){Ve(o,n,b)}}break;case 5:Sr(v,v.return);break;case 22:if(v.memoizedState!==null){_m(m);continue}}h!==null?(h.return=v,ee=h):_m(m)}f=f.sibling}e:for(f=null,m=e;;){if(m.tag===5){if(f===null){f=m;try{r=m.stateNode,c?(i=r.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=m.stateNode,l=m.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=qy("display",s))}catch(b){Ve(e,e.return,b)}}}else if(m.tag===6){if(f===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(b){Ve(e,e.return,b)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;f===m&&(f=null),m=m.return}f===m&&(f=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Xt(t,e),fn(e),o&4&&km(e);break;case 21:break;default:Xt(t,e),fn(e)}}function fn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(cv(n)){var o=n;break e}n=n.return}throw Error(V(160))}switch(o.tag){case 5:var r=o.stateNode;o.flags&32&&(Wi(r,""),o.flags&=-33);var i=$m(e);Sd(e,i,r);break;case 3:case 4:var s=o.stateNode.containerInfo,a=$m(e);wd(e,a,s);break;default:throw Error(V(161))}}catch(l){Ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ww(e,t,n){ee=e,pv(e)}function pv(e,t,n){for(var o=(e.mode&1)!==0;ee!==null;){var r=ee,i=r.child;if(r.tag===22&&o){var s=r.memoizedState!==null||Gs;if(!s){var a=r.alternate,l=a!==null&&a.memoizedState!==null||mt;a=Gs;var c=mt;if(Gs=s,(mt=l)&&!c)for(ee=r;ee!==null;)s=ee,l=s.child,s.tag===22&&s.memoizedState!==null?jm(r):l!==null?(l.return=s,ee=l):jm(r);for(;i!==null;)ee=i,pv(i),i=i.sibling;ee=r,Gs=a,mt=c}Tm(e)}else r.subtreeFlags&8772&&i!==null?(i.return=r,ee=i):Tm(e)}}function Tm(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mt||Sl(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!mt)if(n===null)o.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:tn(t.type,n.memoizedProps);o.componentDidUpdate(r,n.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&cm(t,i,o);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cm(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var m=f.dehydrated;m!==null&&Qi(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}mt||t.flags&512&&xd(t)}catch(v){Ve(t,t.return,v)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function _m(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function jm(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Sl(4,t)}catch(l){Ve(t,n,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var r=t.return;try{o.componentDidMount()}catch(l){Ve(t,r,l)}}var i=t.return;try{xd(t)}catch(l){Ve(t,i,l)}break;case 5:var s=t.return;try{xd(t)}catch(l){Ve(t,s,l)}}}catch(l){Ve(t,t.return,l)}if(t===e){ee=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ee=a;break}ee=t.return}}var Kw=Math.ceil,Ja=Fn.ReactCurrentDispatcher,Au=Fn.ReactCurrentOwner,Gt=Fn.ReactCurrentBatchConfig,be=0,rt=null,Je=null,ct=0,Pt=0,$r=wo(0),tt=0,as=null,Wo=0,$l=0,Mu=0,Ai=null,_t=null,qu=0,Hr=1/0,Nn=null,Qa=!1,$d=null,fo=null,Js=!1,io=null,Ya=0,Mi=0,kd=null,ha=-1,ya=0;function wt(){return be&6?Ge():ha!==-1?ha:ha=Ge()}function mo(e){return e.mode&1?be&2&&ct!==0?ct&-ct:Ew.transition!==null?(ya===0&&(ya=Qy()),ya):(e=ke,e!==0||(e=window.event,e=e===void 0?16:og(e.type)),e):1}function an(e,t,n,o){if(50<Mi)throw Mi=0,kd=null,Error(V(185));ks(e,n,o),(!(be&2)||e!==rt)&&(e===rt&&(!(be&2)&&($l|=n),tt===4&&no(e,ct)),Et(e,o),n===1&&be===0&&!(t.mode&1)&&(Hr=Ge()+500,bl&&So()))}function Et(e,t){var n=e.callbackNode;E0(e,t);var o=Ra(e,e===rt?ct:0);if(o===0)n!==null&&Mf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(n!=null&&Mf(n),t===1)e.tag===0?Cw(Nm.bind(null,e)):Sg(Nm.bind(null,e)),Tw(function(){!(be&6)&&So()}),n=null;else{switch(Yy(o)){case 1:n=cu;break;case 4:n=Gy;break;case 16:n=Oa;break;case 536870912:n=Jy;break;default:n=Oa}n=xv(n,fv.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function fv(e,t){if(ha=-1,ya=0,be&6)throw Error(V(327));var n=e.callbackNode;if(Er()&&e.callbackNode!==n)return null;var o=Ra(e,e===rt?ct:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=Xa(e,o);else{t=o;var r=be;be|=2;var i=hv();(rt!==e||ct!==t)&&(Nn=null,Hr=Ge()+500,zo(e,t));do try{Qw();break}catch(a){mv(e,a)}while(!0);Su(),Ja.current=i,be=r,Je!==null?t=0:(rt=null,ct=0,t=tt)}if(t!==0){if(t===2&&(r=Yc(e),r!==0&&(o=r,t=Td(e,r))),t===1)throw n=as,zo(e,0),no(e,o),Et(e,Ge()),n;if(t===6)no(e,o);else{if(r=e.current.alternate,!(o&30)&&!Gw(r)&&(t=Xa(e,o),t===2&&(i=Yc(e),i!==0&&(o=i,t=Td(e,i))),t===1))throw n=as,zo(e,0),no(e,o),Et(e,Ge()),n;switch(e.finishedWork=r,e.finishedLanes=o,t){case 0:case 1:throw Error(V(345));case 2:Eo(e,_t,Nn);break;case 3:if(no(e,o),(o&130023424)===o&&(t=qu+500-Ge(),10<t)){if(Ra(e,0)!==0)break;if(r=e.suspendedLanes,(r&o)!==o){wt(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=id(Eo.bind(null,e,_t,Nn),t);break}Eo(e,_t,Nn);break;case 4:if(no(e,o),(o&4194240)===o)break;for(t=e.eventTimes,r=-1;0<o;){var s=31-sn(o);i=1<<s,s=t[s],s>r&&(r=s),o&=~i}if(o=r,o=Ge()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Kw(o/1960))-o,10<o){e.timeoutHandle=id(Eo.bind(null,e,_t,Nn),o);break}Eo(e,_t,Nn);break;case 5:Eo(e,_t,Nn);break;default:throw Error(V(329))}}}return Et(e,Ge()),e.callbackNode===n?fv.bind(null,e):null}function Td(e,t){var n=Ai;return e.current.memoizedState.isDehydrated&&(zo(e,t).flags|=256),e=Xa(e,t),e!==2&&(t=_t,_t=n,t!==null&&_d(t)),e}function _d(e){_t===null?_t=e:_t.push.apply(_t,e)}function Gw(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var o=0;o<n.length;o++){var r=n[o],i=r.getSnapshot;r=r.value;try{if(!dn(i(),r))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function no(e,t){for(t&=~Mu,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sn(t),o=1<<n;e[n]=-1,t&=~o}}function Nm(e){if(be&6)throw Error(V(327));Er();var t=Ra(e,0);if(!(t&1))return Et(e,Ge()),null;var n=Xa(e,t);if(e.tag!==0&&n===2){var o=Yc(e);o!==0&&(t=o,n=Td(e,o))}if(n===1)throw n=as,zo(e,0),no(e,t),Et(e,Ge()),n;if(n===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Eo(e,_t,Nn),Et(e,Ge()),null}function Uu(e,t){var n=be;be|=1;try{return e(t)}finally{be=n,be===0&&(Hr=Ge()+500,bl&&So())}}function Ko(e){io!==null&&io.tag===0&&!(be&6)&&Er();var t=be;be|=1;var n=Gt.transition,o=ke;try{if(Gt.transition=null,ke=1,e)return e()}finally{ke=o,Gt.transition=n,be=t,!(be&6)&&So()}}function Lu(){Pt=$r.current,qe($r)}function zo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kw(n)),Je!==null)for(n=Je.return;n!==null;){var o=n;switch(bu(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&La();break;case 3:Fr(),qe(Nt),qe(gt),Nu();break;case 5:ju(o);break;case 4:Fr();break;case 13:qe(Fe);break;case 19:qe(Fe);break;case 10:$u(o.type._context);break;case 22:case 23:Lu()}n=n.return}if(rt=e,Je=e=ho(e.current,null),ct=Pt=t,tt=0,as=null,Mu=$l=Wo=0,_t=Ai=null,qo!==null){for(t=0;t<qo.length;t++)if(n=qo[t],o=n.interleaved,o!==null){n.interleaved=null;var r=o.next,i=n.pending;if(i!==null){var s=i.next;i.next=r,o.next=s}n.pending=o}qo=null}return e}function mv(e,t){do{var n=Je;try{if(Su(),pa.current=Ga,Ka){for(var o=Be.memoizedState;o!==null;){var r=o.queue;r!==null&&(r.pending=null),o=o.next}Ka=!1}if(Vo=0,ot=Xe=Be=null,Oi=!1,rs=0,Au.current=null,n===null||n.return===null){tt=1,as=t,Je=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=ct,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,f=a,m=f.tag;if(!(f.mode&1)&&(m===0||m===11||m===15)){var v=f.alternate;v?(f.updateQueue=v.updateQueue,f.memoizedState=v.memoizedState,f.lanes=v.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=hm(s);if(h!==null){h.flags&=-257,ym(h,s,a,i,t),h.mode&1&&mm(i,c,t),t=h,l=c;var y=t.updateQueue;if(y===null){var b=new Set;b.add(l),t.updateQueue=b}else y.add(l);break e}else{if(!(t&1)){mm(i,c,t),Du();break e}l=Error(V(426))}}else if(De&&a.mode&1){var g=hm(s);if(g!==null){!(g.flags&65536)&&(g.flags|=256),ym(g,s,a,i,t),xu(Br(l,a));break e}}i=l=Br(l,a),tt!==4&&(tt=2),Ai===null?Ai=[i]:Ai.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=Yg(i,l,t);lm(i,p);break e;case 1:a=l;var u=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof u.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(fo===null||!fo.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=Xg(i,a,t);lm(i,S);break e}}i=i.return}while(i!==null)}gv(n)}catch(T){t=T,Je===n&&n!==null&&(Je=n=n.return);continue}break}while(!0)}function hv(){var e=Ja.current;return Ja.current=Ga,e===null?Ga:e}function Du(){(tt===0||tt===3||tt===2)&&(tt=4),rt===null||!(Wo&268435455)&&!($l&268435455)||no(rt,ct)}function Xa(e,t){var n=be;be|=2;var o=hv();(rt!==e||ct!==t)&&(Nn=null,zo(e,t));do try{Jw();break}catch(r){mv(e,r)}while(!0);if(Su(),be=n,Ja.current=o,Je!==null)throw Error(V(261));return rt=null,ct=0,tt}function Jw(){for(;Je!==null;)yv(Je)}function Qw(){for(;Je!==null&&!w0();)yv(Je)}function yv(e){var t=bv(e.alternate,e,Pt);e.memoizedProps=e.pendingProps,t===null?gv(e):Je=t,Au.current=null}function gv(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Bw(n,t),n!==null){n.flags&=32767,Je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{tt=6,Je=null;return}}else if(n=Fw(n,t,Pt),n!==null){Je=n;return}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);tt===0&&(tt=5)}function Eo(e,t,n){var o=ke,r=Gt.transition;try{Gt.transition=null,ke=1,Yw(e,t,n,o)}finally{Gt.transition=r,ke=o}return null}function Yw(e,t,n,o){do Er();while(io!==null);if(be&6)throw Error(V(327));n=e.finishedWork;var r=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(P0(e,i),e===rt&&(Je=rt=null,ct=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Js||(Js=!0,xv(Oa,function(){return Er(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Gt.transition,Gt.transition=null;var s=ke;ke=1;var a=be;be|=4,Au.current=null,Vw(e,n),uv(n,e),gw(od),Aa=!!nd,od=nd=null,e.current=n,Ww(n),S0(),be=a,ke=s,Gt.transition=i}else e.current=n;if(Js&&(Js=!1,io=e,Ya=r),i=e.pendingLanes,i===0&&(fo=null),T0(n.stateNode),Et(e,Ge()),t!==null)for(o=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],o(r.value,{componentStack:r.stack,digest:r.digest});if(Qa)throw Qa=!1,e=$d,$d=null,e;return Ya&1&&e.tag!==0&&Er(),i=e.pendingLanes,i&1?e===kd?Mi++:(Mi=0,kd=e):Mi=0,So(),null}function Er(){if(io!==null){var e=Yy(Ya),t=Gt.transition,n=ke;try{if(Gt.transition=null,ke=16>e?16:e,io===null)var o=!1;else{if(e=io,io=null,Ya=0,be&6)throw Error(V(331));var r=be;for(be|=4,ee=e.current;ee!==null;){var i=ee,s=i.child;if(ee.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ee=c;ee!==null;){var f=ee;switch(f.tag){case 0:case 11:case 15:Ri(8,f,i)}var m=f.child;if(m!==null)m.return=f,ee=m;else for(;ee!==null;){f=ee;var v=f.sibling,h=f.return;if(lv(f),f===c){ee=null;break}if(v!==null){v.return=h,ee=v;break}ee=h}}}var y=i.alternate;if(y!==null){var b=y.child;if(b!==null){y.child=null;do{var g=b.sibling;b.sibling=null,b=g}while(b!==null)}}ee=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,ee=s;else e:for(;ee!==null;){if(i=ee,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ri(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,ee=p;break e}ee=i.return}}var u=e.current;for(ee=u;ee!==null;){s=ee;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,ee=x;else e:for(s=u;ee!==null;){if(a=ee,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Sl(9,a)}}catch(T){Ve(a,a.return,T)}if(a===s){ee=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,ee=S;break e}ee=a.return}}if(be=r,So(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(ml,e)}catch{}o=!0}return o}finally{ke=n,Gt.transition=t}}return!1}function Cm(e,t,n){t=Br(n,t),t=Yg(e,t,1),e=po(e,t,1),t=wt(),e!==null&&(ks(e,1,t),Et(e,t))}function Ve(e,t,n){if(e.tag===3)Cm(e,e,n);else for(;t!==null;){if(t.tag===3){Cm(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(fo===null||!fo.has(o))){e=Br(n,e),e=Xg(t,e,1),t=po(t,e,1),e=wt(),t!==null&&(ks(t,1,e),Et(t,e));break}}t=t.return}}function Xw(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,rt===e&&(ct&n)===n&&(tt===4||tt===3&&(ct&130023424)===ct&&500>Ge()-qu?zo(e,0):Mu|=n),Et(e,t)}function vv(e,t){t===0&&(e.mode&1?(t=Ls,Ls<<=1,!(Ls&130023424)&&(Ls=4194304)):t=1);var n=wt();e=Ln(e,t),e!==null&&(ks(e,t,n),Et(e,n))}function Zw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vv(e,n)}function eS(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(V(314))}o!==null&&o.delete(t),vv(e,n)}var bv;bv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,zw(e,t,n);jt=!!(e.flags&131072)}else jt=!1,De&&t.flags&1048576&&$g(t,Fa,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;ma(e,t),e=t.pendingProps;var r=Lr(t,gt.current);Cr(t,n),r=Eu(null,t,o,e,r,n);var i=Pu();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ct(o)?(i=!0,Da(t)):i=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Tu(t),r.updater=wl,t.stateNode=r,r._reactInternals=t,pd(t,o,e,n),t=hd(null,t,o,!0,i,n)):(t.tag=0,De&&i&&vu(t),vt(null,t,r,n),t=t.child),t;case 16:o=t.elementType;e:{switch(ma(e,t),e=t.pendingProps,r=o._init,o=r(o._payload),t.type=o,r=t.tag=nS(o),e=tn(o,e),r){case 0:t=md(null,t,o,e,n);break e;case 1:t=bm(null,t,o,e,n);break e;case 11:t=gm(null,t,o,e,n);break e;case 14:t=vm(null,t,o,tn(o.type,e),n);break e}throw Error(V(306,o,""))}return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:tn(o,r),md(e,t,o,r,n);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:tn(o,r),bm(e,t,o,r,n);case 3:e:{if(nv(t),e===null)throw Error(V(387));o=t.pendingProps,i=t.memoizedState,r=i.element,Cg(e,t),Va(t,o,null,n);var s=t.memoizedState;if(o=s.element,i.isDehydrated)if(i={element:o,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){r=Br(Error(V(423)),t),t=xm(e,t,o,n,r);break e}else if(o!==r){r=Br(Error(V(424)),t),t=xm(e,t,o,n,r);break e}else for(Ot=uo(t.stateNode.containerInfo.firstChild),At=t,De=!0,on=null,n=jg(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Dr(),o===r){t=Dn(e,t,n);break e}vt(e,t,o,n)}t=t.child}return t;case 5:return Eg(t),e===null&&cd(t),o=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,s=r.children,rd(o,r)?s=null:i!==null&&rd(o,i)&&(t.flags|=32),tv(e,t),vt(e,t,s,n),t.child;case 6:return e===null&&cd(t),null;case 13:return ov(e,t,n);case 4:return _u(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=zr(t,null,o,n):vt(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:tn(o,r),gm(e,t,o,r,n);case 7:return vt(e,t,t.pendingProps,n),t.child;case 8:return vt(e,t,t.pendingProps.children,n),t.child;case 12:return vt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,r=t.pendingProps,i=t.memoizedProps,s=r.value,Ce(Ba,o._currentValue),o._currentValue=s,i!==null)if(dn(i.value,s)){if(i.children===r.children&&!Nt.current){t=Dn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===o){if(i.tag===1){l=Rn(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),dd(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(V(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),dd(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}vt(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=t.pendingProps.children,Cr(t,n),r=Jt(r),o=o(r),t.flags|=1,vt(e,t,o,n),t.child;case 14:return o=t.type,r=tn(o,t.pendingProps),r=tn(o.type,r),vm(e,t,o,r,n);case 15:return Zg(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:tn(o,r),ma(e,t),t.tag=1,Ct(o)?(e=!0,Da(t)):e=!1,Cr(t,n),Qg(t,o,r),pd(t,o,r,n),hd(null,t,o,!0,e,n);case 19:return rv(e,t,n);case 22:return ev(e,t,n)}throw Error(V(156,t.tag))};function xv(e,t){return Ky(e,t)}function tS(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Ht(e,t,n,o){return new tS(e,t,n,o)}function zu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nS(e){if(typeof e=="function")return zu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===su)return 11;if(e===au)return 14}return 2}function ho(e,t){var n=e.alternate;return n===null?(n=Ht(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ga(e,t,n,o,r,i){var s=2;if(o=e,typeof e=="function")zu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case fr:return Fo(n.children,r,i,t);case iu:s=8,r|=8;break;case Mc:return e=Ht(12,n,t,r|2),e.elementType=Mc,e.lanes=i,e;case qc:return e=Ht(13,n,t,r),e.elementType=qc,e.lanes=i,e;case Uc:return e=Ht(19,n,t,r),e.elementType=Uc,e.lanes=i,e;case Ey:return kl(n,r,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ny:s=10;break e;case Cy:s=9;break e;case su:s=11;break e;case au:s=14;break e;case Zn:s=16,o=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Ht(s,n,t,r),t.elementType=e,t.type=o,t.lanes=i,t}function Fo(e,t,n,o){return e=Ht(7,e,o,t),e.lanes=n,e}function kl(e,t,n,o){return e=Ht(22,e,o,t),e.elementType=Ey,e.lanes=n,e.stateNode={isHidden:!1},e}function hc(e,t,n){return e=Ht(6,e,null,t),e.lanes=n,e}function yc(e,t,n){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function oS(e,t,n,o,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=o,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,o,r,i,s,a,l){return e=new oS(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ht(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tu(i),e}function rS(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pr,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}function wv(e){if(!e)return vo;e=e._reactInternals;e:{if(Xo(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var n=e.type;if(Ct(n))return wg(e,n,t)}return t}function Sv(e,t,n,o,r,i,s,a,l){return e=Fu(n,o,!0,e,r,i,s,a,l),e.context=wv(null),n=e.current,o=wt(),r=mo(n),i=Rn(o,r),i.callback=t??null,po(n,i,r),e.current.lanes=r,ks(e,r,o),Et(e,o),e}function Tl(e,t,n,o){var r=t.current,i=wt(),s=mo(r);return n=wv(n),t.context===null?t.context=n:t.pendingContext=n,t=Rn(i,s),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=po(r,t,s),e!==null&&(an(e,r,s,i),ua(e,r,s)),s}function Za(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Em(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Bu(e,t){Em(e,t),(e=e.alternate)&&Em(e,t)}function iS(){return null}var $v=typeof reportError=="function"?reportError:function(e){console.error(e)};function Hu(e){this._internalRoot=e}_l.prototype.render=Hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));Tl(e,t,null,null)};_l.prototype.unmount=Hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ko(function(){Tl(null,e,null,null)}),t[Un]=null}};function _l(e){this._internalRoot=e}_l.prototype.unstable_scheduleHydration=function(e){if(e){var t=eg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<to.length&&t!==0&&t<to[n].priority;n++);to.splice(n,0,e),n===0&&ng(e)}};function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Pm(){}function sS(e,t,n,o,r){if(r){if(typeof o=="function"){var i=o;o=function(){var c=Za(s);i.call(c)}}var s=Sv(t,o,e,0,null,!1,!1,"",Pm);return e._reactRootContainer=s,e[Un]=s.current,Zi(e.nodeType===8?e.parentNode:e),Ko(),s}for(;r=e.lastChild;)e.removeChild(r);if(typeof o=="function"){var a=o;o=function(){var c=Za(l);a.call(c)}}var l=Fu(e,0,!1,null,null,!1,!1,"",Pm);return e._reactRootContainer=l,e[Un]=l.current,Zi(e.nodeType===8?e.parentNode:e),Ko(function(){Tl(t,l,n,o)}),l}function Nl(e,t,n,o,r){var i=n._reactRootContainer;if(i){var s=i;if(typeof r=="function"){var a=r;r=function(){var l=Za(s);a.call(l)}}Tl(t,s,e,r)}else s=sS(n,t,e,r,o);return Za(s)}Xy=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ki(t.pendingLanes);n!==0&&(du(t,n|1),Et(t,Ge()),!(be&6)&&(Hr=Ge()+500,So()))}break;case 13:Ko(function(){var o=Ln(e,1);if(o!==null){var r=wt();an(o,e,1,r)}}),Bu(e,1)}};uu=function(e){if(e.tag===13){var t=Ln(e,134217728);if(t!==null){var n=wt();an(t,e,134217728,n)}Bu(e,134217728)}};Zy=function(e){if(e.tag===13){var t=mo(e),n=Ln(e,t);if(n!==null){var o=wt();an(n,e,t,o)}Bu(e,t)}};eg=function(){return ke};tg=function(e,t){var n=ke;try{return ke=e,t()}finally{ke=n}};Gc=function(e,t,n){switch(t){case"input":if(zc(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var r=vl(o);if(!r)throw Error(V(90));Iy(o),zc(o,r)}}}break;case"textarea":Ry(e,n);break;case"select":t=n.value,t!=null&&Tr(e,!!n.multiple,t,!1)}};zy=Uu;Fy=Ko;var aS={usingClientEntryPoint:!1,Events:[_s,gr,vl,Ly,Dy,Uu]},mi={findFiberByHostInstance:Mo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lS={bundleType:mi.bundleType,version:mi.version,rendererPackageName:mi.rendererPackageName,rendererConfig:mi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Fn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vy(e),e===null?null:e.stateNode},findFiberByHostInstance:mi.findFiberByHostInstance||iS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qs.isDisabled&&Qs.supportsFiber)try{ml=Qs.inject(lS),$n=Qs}catch{}}Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aS;Ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vu(t))throw Error(V(200));return rS(e,t,null,n)};Ut.createRoot=function(e,t){if(!Vu(e))throw Error(V(299));var n=!1,o="",r=$v;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Fu(e,1,!1,null,null,n,!1,o,r),e[Un]=t.current,Zi(e.nodeType===8?e.parentNode:e),new Hu(t)};Ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=Vy(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e){return Ko(e)};Ut.hydrate=function(e,t,n){if(!jl(t))throw Error(V(200));return Nl(null,e,t,!0,n)};Ut.hydrateRoot=function(e,t,n){if(!Vu(e))throw Error(V(405));var o=n!=null&&n.hydratedSources||null,r=!1,i="",s=$v;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Sv(t,null,e,1,n??null,r,!1,i,s),e[Un]=t.current,Zi(e),o)for(e=0;e<o.length;e++)n=o[e],r=n._getVersion,r=r(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new _l(t)};Ut.render=function(e,t,n){if(!jl(t))throw Error(V(200));return Nl(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!jl(e))throw Error(V(40));return e._reactRootContainer?(Ko(function(){Nl(null,null,e,!1,function(){e._reactRootContainer=null,e[Un]=null})}),!0):!1};Ut.unstable_batchedUpdates=Uu;Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,o){if(!jl(n))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return Nl(e,t,n,!1,o)};Ut.version="18.3.1-next-f1338f8080-20240426";function kv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kv)}catch(e){console.error(e)}}kv(),ky.exports=Ut;var Wu=ky.exports;const cS=Yd(Wu);var Im=Wu;Rc.createRoot=Im.createRoot,Rc.hydrateRoot=Im.hydrateRoot;const Om=e=>{let t;const n=new Set,o=(c,f)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const v=t;t=f??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(h=>h(t,v))}},r=()=>t,a={setState:o,getState:r,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(o,r,a);return a},dS=e=>e?Om(e):Om,uS=e=>e;function pS(e,t=uS){const n=te.useSyncExternalStore(e.subscribe,te.useCallback(()=>t(e.getState()),[e,t]),te.useCallback(()=>t(e.getInitialState()),[e,t]));return te.useDebugValue(n),n}const Rm=e=>{const t=dS(e),n=o=>pS(t,o);return Object.assign(n,t),n},Ku=e=>e?Rm(e):Rm;function fS(e,t){let n;try{n=e()}catch{return}return{getItem:r=>{var i;const s=l=>l===null?null:JSON.parse(l,void 0),a=(i=n.getItem(r))!=null?i:null;return a instanceof Promise?a.then(s):s(a)},setItem:(r,i)=>n.setItem(r,JSON.stringify(i,void 0)),removeItem:r=>n.removeItem(r)}}const jd=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(o){return jd(o)(n)},catch(o){return this}}}catch(n){return{then(o){return this},catch(o){return jd(o)(n)}}}},mS=(e,t)=>(n,o,r)=>{let i={storage:fS(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,p)=>({...p,...g}),...t},s=!1,a=0;const l=new Set,c=new Set;let f=i.storage;if(!f)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...g)},o,r);const m=()=>{const g=i.partialize({...o()});return f.setItem(i.name,{state:g,version:i.version})},v=r.setState;r.setState=(g,p)=>(v(g,p),m());const h=e((...g)=>(n(...g),m()),o,r);r.getInitialState=()=>h;let y;const b=()=>{var g,p;if(!f)return;const u=++a;s=!1,l.forEach(S=>{var T;return S((T=o())!=null?T:h)});const x=((p=i.onRehydrateStorage)==null?void 0:p.call(i,(g=o())!=null?g:h))||void 0;return jd(f.getItem.bind(f))(i.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==i.version){if(i.migrate){const T=i.migrate(S.state,S.version);return T instanceof Promise?T.then(C=>[!0,C]):[!0,T]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var T;if(u!==a)return;const[C,$]=S;if(y=i.merge($,(T=o())!=null?T:h),n(y,!0),C)return m()}).then(()=>{u===a&&(x==null||x(o(),void 0),y=o(),s=!0,c.forEach(S=>S(y)))}).catch(S=>{u===a&&(x==null||x(void 0,S))})};return r.persist={setOptions:g=>{i={...i,...g},g.storage&&(f=g.storage)},clearStorage:()=>{f==null||f.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:g=>(l.add(g),()=>{l.delete(g)}),onFinishHydration:g=>(c.add(g),()=>{c.delete(g)})},i.skipHydration||b(),y||h},hS=mS,ls=["editor-to-agent","agent-to-editor"],cs=["request","response","notification","error","unknown"],yS={directions:new Set(ls),kinds:new Set(cs),search:"",showStreams:!0};function gS(e){var n,o;if(e.kind!=="notification"||e.method!=="session/update")return!1;const t=(n=e.payload)==null?void 0:n.params;return((o=t==null?void 0:t.update)==null?void 0:o.sessionUpdate)==="agent_message_chunk"}const ne=Ku()(hS(e=>({session:null,messages:[],connection:"idle",lastError:null,selectedSeq:null,replayDone:!1,filters:yS,playback:{playhead:null,playing:!1,speed:1},detailTab:"tree",clearedUpToSeq:null,handleEvent:t=>{switch(t.type){case"session.start":e(n=>{const o=n.session!==null&&n.session.id===t.session.id,r=n.session===null,i=o||r;return{session:t.session,messages:[],selectedSeq:i?n.selectedSeq:null,replayDone:!1,clearedUpToSeq:i?n.clearedUpToSeq:null,playback:i?n.playback:{...n.playback,playhead:null,playing:!1}}});return;case"message":e(n=>n.clearedUpToSeq!==null&&t.message.seq<=n.clearedUpToSeq?{}:{messages:[...n.messages,t.message]});return;case"replay.done":e({replayDone:!0});return;case"session.end":e({session:t.session});return}},setConnection:(t,n=null)=>e({connection:t,lastError:n}),select:t=>e({selectedSeq:t}),setSearch:t=>e(n=>({filters:{...n.filters,search:t}})),toggleDirection:t=>e(n=>{const o=new Set(n.filters.directions);return o.has(t)?o.delete(t):o.add(t),{filters:{...n.filters,directions:o}}}),toggleKind:t=>e(n=>{const o=new Set(n.filters.kinds);return o.has(t)?o.delete(t):o.add(t),{filters:{...n.filters,kinds:o}}}),toggleStreams:()=>e(t=>({filters:{...t.filters,showStreams:!t.filters.showStreams}})),setPlayhead:t=>e(n=>({playback:{...n.playback,playhead:t}})),setPlaying:t=>e(n=>({playback:{...n.playback,playing:t}})),setPlaybackSpeed:t=>e(n=>({playback:{...n.playback,speed:t}})),setDetailTab:t=>e({detailTab:t}),appendMessages:t=>{t.length!==0&&e(n=>{const o=n.clearedUpToSeq!==null?t.filter(r=>r.seq>n.clearedUpToSeq):t;return o.length===0?n:{messages:[...n.messages,...o]}})},loadFromExport:t=>{e(n=>{const o=n.session===null;return{session:{id:t.session.id,name:t.session.name,agentCommand:t.session.agentCommand,startedAt:t.session.startedAt,endedAt:t.session.endedAt,clientName:t.session.clientName,importedAt:t.exportedAt,clientVersion:null,clientPlatform:null,agentName:null,agentVersion:null,protocolVersion:null,currentMode:null,currentModel:null,agentCapabilitiesJson:null},messages:t.messages,selectedSeq:o?n.selectedSeq:null,replayDone:!0,clearedUpToSeq:o?n.clearedUpToSeq:null,playback:o?{...n.playback,playing:!1}:{playhead:null,playing:!1,speed:1},connection:"idle",lastError:null}})},clear:()=>e(t=>{const n=t.messages.length>0?t.messages[t.messages.length-1].seq:t.clearedUpToSeq;return{messages:[],selectedSeq:null,clearedUpToSeq:n}})}),{name:"acp.messages.v1",partialize:e=>({filters:{directions:[...e.filters.directions],kinds:[...e.filters.kinds],showStreams:e.filters.showStreams}}),merge:(e,t)=>{const n=e;return n!=null&&n.filters?{...t,filters:{...t.filters,directions:new Set(n.filters.directions),kinds:new Set(n.filters.kinds),showStreams:n.filters.showStreams}}:t}}));function vS(e,t){const n=t.search.trim().toLowerCase();return e.filter(o=>{if(!t.directions.has(o.direction))return!1;if(gS(o)){if(!t.showStreams)return!1}else if(!t.kinds.has(o.kind))return!1;return!(n&&!o.raw.toLowerCase().includes(n))})}function bS(e,t){return t===null?null:e.find(n=>n.seq===t)??null}function Cl(e){const t=new Map,n=new Map;for(const o of e){if(o.rpcId===void 0||o.rpcId===null)continue;const r=String(o.rpcId);if(o.kind==="request")t.set(r,o.seq);else if(o.kind==="response"||o.kind==="error"){const i=t.get(r);i!==void 0&&n.set(o.seq,i)}}return n}const Tv="ws://127.0.0.1:3737",xS=1500,wS=12e3;let En=null,qi=null,el=0,ds=!1,Gu=Tv,Am=!1,Pr=[],Nd=!1;function Cd(){if(Nd=!1,Pr.length===0)return;const e=Pr;Pr=[],ne.getState().appendMessages(e)}function SS(){Nd||(Nd=!0,typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(Cd):Promise.resolve().then(Cd))}function Mm(){if(ds)return;const e=Math.min(wS,xS*Math.pow(1.6,el));el+=1,qi=setTimeout(()=>{qi=null,Ju(Gu)},e)}function Ju(e=Tv){if(En){try{En.close()}catch{}En=null}Pr=[],ds=!1,Gu=e;const t=ne.getState();t.connection!=="connecting"&&t.setConnection("connecting");let n;try{n=new WebSocket(e)}catch(o){const r=o instanceof Error?o.message:String(o);t.setConnection("connecting",r),Mm();return}En=n,n.addEventListener("open",()=>{el=0,Am=!0,ne.getState().setConnection("open")}),n.addEventListener("message",o=>{try{const r=JSON.parse(o.data);if(r.type==="message"){Pr.push(r.message),SS();return}Pr.length>0&&Cd(),ne.getState().handleEvent(r)}catch(r){console.warn("acp-devtools: invalid WS frame",r)}}),n.addEventListener("error",()=>{}),n.addEventListener("close",()=>{if(En===n&&(En=null),ds){ne.getState().setConnection("closed");return}const o=ne.getState();if(Am&&o.replayDone){o.setConnection("idle");return}o.setConnection("connecting"),Mm()})}function Ed(){if(ds=!0,qi&&(clearTimeout(qi),qi=null),En){try{En.close()}catch{}En=null}ne.getState().setConnection("idle")}function $S(){Ed(),ds=!1,el=0,Ju(Gu)}async function kS(e){const t=await fetch(`/api/sessions/${e}/messages`,{headers:{accept:"application/json"}});if(!t.ok){const n=await Yu(t);throw new Error(n)}return await t.json()}async function _v(){const e=await fetch("/api/sessions",{headers:{accept:"application/json"}});if(!e.ok)throw new Error(`sessions: HTTP ${e.status}`);return(await e.json()).sessions??[]}async function jv(e){const t=await e.text(),n=await fetch("/api/import",{method:"POST",headers:{"content-type":"application/json","x-acp-source-filename":jS(e.name)},body:t});if(!n.ok){const o=await Yu(n);throw new Error(o)}return await n.json()}async function TS(e){const t=await fetch(`/api/sessions/${e}`,{method:"DELETE"});if(!t.ok&&t.status!==404){const n=await Yu(t);throw new Error(n)}}function tl(e){return`ws://${window.location.host}/replay/${e}`}function Qu(e){return e!==null&&/\/replay\/\d+$/.test(e)}function _S(e){const t=e.match(/\/replay\/(\d+)$/);return t?Number(t[1]):null}async function Yu(e){try{const t=await e.json();if(t.error)return t.error}catch{}return`HTTP ${e.status} ${e.statusText}`}function jS(e){return e.replace(/[^\x20-\x7E]/g,"?").slice(0,200)}const Pd="acp.discovery.selectedUrl";function NS(){try{return localStorage.getItem(Pd)}catch{return null}}function CS(e){try{e?localStorage.setItem(Pd,e):localStorage.removeItem(Pd)}catch{}}const at=Ku(e=>({captures:[],savedSessions:[],selectedUrl:NS(),lastFetchAt:null,lastError:null,setCaptures:t=>e({captures:t,lastFetchAt:Date.now(),lastError:null}),setSavedSessions:t=>e({savedSessions:t}),setSelected:t=>{CS(t),e({selectedUrl:t})},setError:t=>e({lastError:t})})),ES=2500;let rr=null;async function PS(){const e=await fetch("/api/active",{headers:{accept:"application/json"}});if(!e.ok)throw new Error(`discovery: HTTP ${e.status}`);return(await e.json()).captures??[]}async function qm(){const e=at.getState();try{const[t,n]=await Promise.all([PS(),_v().catch(()=>e.savedSessions)]);e.setCaptures(t),e.setSavedSessions(n)}catch(t){e.setError(t instanceof Error?t.message:String(t))}}function IS(){return qm(),rr&&clearInterval(rr),rr=setInterval(()=>{qm()},ES),()=>{rr&&(clearInterval(rr),rr=null)}}async function Xu(){const e=at.getState();try{const t=await _v();e.setSavedSessions(t)}catch(t){e.setError(t instanceof Error?t.message:String(t))}}const Nv="acp.theme.v1";function OS(){try{const e=localStorage.getItem(Nv);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function RS(){return typeof window>"u"||!window.matchMedia?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Cv(e){return e==="system"?RS()?"dark":"light":e}function Ev(e){if(typeof document>"u")return;const t=document.documentElement;t.classList.toggle("light",e==="light"),t.classList.toggle("dark",e==="dark")}const Pv=typeof window<"u"?OS():"system",Iv=Cv(Pv);typeof window<"u"&&Ev(Iv);const Id=Ku(e=>({mode:Pv,resolved:Iv,setMode:t=>{try{localStorage.setItem(Nv,t)}catch{}const n=Cv(t);Ev(n),e({mode:t,resolved:n})}}));function AS(){if(typeof window>"u"||!window.matchMedia)return()=>{};const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{const{mode:n,setMode:o}=Id.getState();n==="system"&&o("system")};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}const MS={AcceptNesNotification:{description:"Notification sent when a suggestion is accepted.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
41
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
42
|
+
these keys.
|
|
43
|
+
|
|
44
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},id:{description:"The ID of the accepted suggestion.",type:"string"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this notification."}},required:["sessionId","id"],type:"object","x-method":"nes/accept","x-side":"agent"},AgentAuthCapabilities:{description:`**UNSTABLE**
|
|
45
|
+
|
|
46
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
47
|
+
|
|
48
|
+
Authentication-related capabilities supported by the agent.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
49
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
50
|
+
these keys.
|
|
51
|
+
|
|
52
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},logout:{anyOf:[{$ref:"#/$defs/LogoutCapabilities"},{type:"null"}],description:"Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method."}},type:"object"},AgentCapabilities:{description:`Capabilities supported by the agent.
|
|
53
|
+
|
|
54
|
+
Advertised during initialization to inform the client about
|
|
55
|
+
available features and content types.
|
|
56
|
+
|
|
57
|
+
See protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
58
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
59
|
+
these keys.
|
|
60
|
+
|
|
61
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},auth:{allOf:[{$ref:"#/$defs/AgentAuthCapabilities"}],default:{},description:`**UNSTABLE**
|
|
62
|
+
|
|
63
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
64
|
+
|
|
65
|
+
Authentication-related capabilities supported by the agent.`},loadSession:{default:!1,description:"Whether the agent supports `session/load`.",type:"boolean"},mcpCapabilities:{allOf:[{$ref:"#/$defs/McpCapabilities"}],default:{acp:!1,http:!1,sse:!1},description:"MCP capabilities supported by the agent."},nes:{anyOf:[{$ref:"#/$defs/NesCapabilities"},{type:"null"}],description:`**UNSTABLE**
|
|
66
|
+
|
|
67
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
68
|
+
|
|
69
|
+
NES (Next Edit Suggestions) capabilities supported by the agent.`},positionEncoding:{anyOf:[{$ref:"#/$defs/PositionEncodingKind"},{type:"null"}],description:`**UNSTABLE**
|
|
70
|
+
|
|
71
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
72
|
+
|
|
73
|
+
The position encoding selected by the agent from the client's supported encodings.`},promptCapabilities:{allOf:[{$ref:"#/$defs/PromptCapabilities"}],default:{audio:!1,embeddedContext:!1,image:!1},description:"Prompt capabilities supported by the agent."},providers:{anyOf:[{$ref:"#/$defs/ProvidersCapabilities"},{type:"null"}],description:`**UNSTABLE**
|
|
74
|
+
|
|
75
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
76
|
+
|
|
77
|
+
Provider configuration capabilities supported by the agent.
|
|
78
|
+
|
|
79
|
+
By supplying \`{}\` it means that the agent supports provider configuration methods.`},sessionCapabilities:{allOf:[{$ref:"#/$defs/SessionCapabilities"}],default:{}}},type:"object"},AgentNotification:{properties:{method:{type:"string"},params:{anyOf:[{anyOf:[{allOf:[{$ref:"#/$defs/SessionNotification"}],description:`Handles session update notifications from the agent.
|
|
80
|
+
|
|
81
|
+
This is a notification endpoint (no response expected) that receives
|
|
82
|
+
real-time updates about session progress, including message chunks,
|
|
83
|
+
tool calls, and execution plans.
|
|
84
|
+
|
|
85
|
+
Note: Clients SHOULD continue accepting tool call updates even after
|
|
86
|
+
sending a \`session/cancel\` notification, as the agent may send final
|
|
87
|
+
updates before responding with the cancelled stop reason.
|
|
88
|
+
|
|
89
|
+
See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)`,title:"SessionNotification"},{allOf:[{$ref:"#/$defs/CompleteElicitationNotification"}],description:`**UNSTABLE**
|
|
90
|
+
|
|
91
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
92
|
+
|
|
93
|
+
Notification that a URL-based elicitation has completed.`,title:"CompleteElicitationNotification"},{allOf:[{$ref:"#/$defs/MessageMcpNotification"}],description:`**UNSTABLE**
|
|
94
|
+
|
|
95
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
96
|
+
|
|
97
|
+
Receives an MCP-over-ACP notification.`,title:"MessageMcpNotification"},{allOf:[{$ref:"#/$defs/ExtNotification"}],description:`Handles extension notifications from the agent.
|
|
98
|
+
|
|
99
|
+
Allows the Agent to send an arbitrary notification that is not part of the ACP spec.
|
|
100
|
+
Extension notifications provide a way to send one-way messages for custom functionality
|
|
101
|
+
while maintaining protocol compatibility.
|
|
102
|
+
|
|
103
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,title:"ExtNotification"}],description:`All possible notifications that an agent can send to a client.
|
|
104
|
+
|
|
105
|
+
This enum is used internally for routing RPC notifications. You typically won't need
|
|
106
|
+
to use this directly.
|
|
107
|
+
|
|
108
|
+
Notifications do not expect a response.`},{type:"null"}]}},required:["method"],type:"object","x-docs-ignore":!0},AgentRequest:{properties:{id:{$ref:"#/$defs/RequestId"},method:{type:"string"},params:{anyOf:[{anyOf:[{allOf:[{$ref:"#/$defs/WriteTextFileRequest"}],description:`Writes content to a text file in the client's file system.
|
|
109
|
+
|
|
110
|
+
Only available if the client advertises the \`fs.writeTextFile\` capability.
|
|
111
|
+
Allows the agent to create or modify files within the client's environment.
|
|
112
|
+
|
|
113
|
+
See protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)`,title:"WriteTextFileRequest"},{allOf:[{$ref:"#/$defs/ReadTextFileRequest"}],description:`Reads content from a text file in the client's file system.
|
|
114
|
+
|
|
115
|
+
Only available if the client advertises the \`fs.readTextFile\` capability.
|
|
116
|
+
Allows the agent to access file contents within the client's environment.
|
|
117
|
+
|
|
118
|
+
See protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)`,title:"ReadTextFileRequest"},{allOf:[{$ref:"#/$defs/RequestPermissionRequest"}],description:`Requests permission from the user for a tool call operation.
|
|
119
|
+
|
|
120
|
+
Called by the agent when it needs user authorization before executing
|
|
121
|
+
a potentially sensitive operation. The client should present the options
|
|
122
|
+
to the user and return their decision.
|
|
123
|
+
|
|
124
|
+
If the client cancels the prompt turn via \`session/cancel\`, it MUST
|
|
125
|
+
respond to this request with \`RequestPermissionOutcome::Cancelled\`.
|
|
126
|
+
|
|
127
|
+
See protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)`,title:"RequestPermissionRequest"},{allOf:[{$ref:"#/$defs/CreateTerminalRequest"}],description:`Executes a command in a new terminal
|
|
128
|
+
|
|
129
|
+
Only available if the \`terminal\` Client capability is set to \`true\`.
|
|
130
|
+
|
|
131
|
+
Returns a \`TerminalId\` that can be used with other terminal methods
|
|
132
|
+
to get the current output, wait for exit, and kill the command.
|
|
133
|
+
|
|
134
|
+
The \`TerminalId\` can also be used to embed the terminal in a tool call
|
|
135
|
+
by using the \`ToolCallContent::Terminal\` variant.
|
|
136
|
+
|
|
137
|
+
The Agent is responsible for releasing the terminal by using the \`terminal/release\`
|
|
138
|
+
method.
|
|
139
|
+
|
|
140
|
+
See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)`,title:"CreateTerminalRequest"},{allOf:[{$ref:"#/$defs/TerminalOutputRequest"}],description:`Gets the terminal output and exit status
|
|
141
|
+
|
|
142
|
+
Returns the current content in the terminal without waiting for the command to exit.
|
|
143
|
+
If the command has already exited, the exit status is included.
|
|
144
|
+
|
|
145
|
+
See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)`,title:"TerminalOutputRequest"},{allOf:[{$ref:"#/$defs/ReleaseTerminalRequest"}],description:`Releases a terminal
|
|
146
|
+
|
|
147
|
+
The command is killed if it hasn't exited yet. Use \`terminal/wait_for_exit\`
|
|
148
|
+
to wait for the command to exit before releasing the terminal.
|
|
149
|
+
|
|
150
|
+
After release, the \`TerminalId\` can no longer be used with other \`terminal/*\` methods,
|
|
151
|
+
but tool calls that already contain it, continue to display its output.
|
|
152
|
+
|
|
153
|
+
The \`terminal/kill\` method can be used to terminate the command without releasing
|
|
154
|
+
the terminal, allowing the Agent to call \`terminal/output\` and other methods.
|
|
155
|
+
|
|
156
|
+
See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)`,title:"ReleaseTerminalRequest"},{allOf:[{$ref:"#/$defs/WaitForTerminalExitRequest"}],description:`Waits for the terminal command to exit and return its exit status
|
|
157
|
+
|
|
158
|
+
See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)`,title:"WaitForTerminalExitRequest"},{allOf:[{$ref:"#/$defs/KillTerminalRequest"}],description:`Kills the terminal command without releasing the terminal
|
|
159
|
+
|
|
160
|
+
While \`terminal/release\` will also kill the command, this method will keep
|
|
161
|
+
the \`TerminalId\` valid so it can be used with other methods.
|
|
162
|
+
|
|
163
|
+
This method can be helpful when implementing command timeouts which terminate
|
|
164
|
+
the command as soon as elapsed, and then get the final output so it can be sent
|
|
165
|
+
to the model.
|
|
166
|
+
|
|
167
|
+
Note: Call \`terminal/release\` when \`TerminalId\` is no longer needed.
|
|
168
|
+
|
|
169
|
+
See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)`,title:"KillTerminalRequest"},{allOf:[{$ref:"#/$defs/CreateElicitationRequest"}],description:`**UNSTABLE**
|
|
170
|
+
|
|
171
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
172
|
+
|
|
173
|
+
Requests structured user input via a form or URL.`,title:"CreateElicitationRequest"},{allOf:[{$ref:"#/$defs/ConnectMcpRequest"}],description:`**UNSTABLE**
|
|
174
|
+
|
|
175
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
176
|
+
|
|
177
|
+
Opens an MCP-over-ACP connection.`,title:"ConnectMcpRequest"},{allOf:[{$ref:"#/$defs/MessageMcpRequest"}],description:`**UNSTABLE**
|
|
178
|
+
|
|
179
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
180
|
+
|
|
181
|
+
Exchanges an MCP-over-ACP message.`,title:"MessageMcpRequest"},{allOf:[{$ref:"#/$defs/DisconnectMcpRequest"}],description:`**UNSTABLE**
|
|
182
|
+
|
|
183
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
184
|
+
|
|
185
|
+
Closes an MCP-over-ACP connection.`,title:"DisconnectMcpRequest"},{allOf:[{$ref:"#/$defs/ExtRequest"}],description:`Handles extension method requests from the agent.
|
|
186
|
+
|
|
187
|
+
Allows the Agent to send an arbitrary request that is not part of the ACP spec.
|
|
188
|
+
Extension methods provide a way to add custom functionality while maintaining
|
|
189
|
+
protocol compatibility.
|
|
190
|
+
|
|
191
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,title:"ExtMethodRequest"}],description:`All possible requests that an agent can send to a client.
|
|
192
|
+
|
|
193
|
+
This enum is used internally for routing RPC requests. You typically won't need
|
|
194
|
+
to use this directly.
|
|
195
|
+
|
|
196
|
+
This enum encompasses all method calls from agent to client.`},{type:"null"}]}},required:["id","method"],type:"object","x-docs-ignore":!0},AgentResponse:{anyOf:[{properties:{id:{$ref:"#/$defs/RequestId"},result:{anyOf:[{allOf:[{$ref:"#/$defs/InitializeResponse"}],title:"InitializeResponse"},{allOf:[{$ref:"#/$defs/AuthenticateResponse"}],title:"AuthenticateResponse"},{allOf:[{$ref:"#/$defs/ListProvidersResponse"}],title:"ListProvidersResponse"},{allOf:[{$ref:"#/$defs/SetProvidersResponse"}],title:"SetProvidersResponse"},{allOf:[{$ref:"#/$defs/DisableProvidersResponse"}],title:"DisableProvidersResponse"},{allOf:[{$ref:"#/$defs/LogoutResponse"}],title:"LogoutResponse"},{allOf:[{$ref:"#/$defs/NewSessionResponse"}],title:"NewSessionResponse"},{allOf:[{$ref:"#/$defs/LoadSessionResponse"}],title:"LoadSessionResponse"},{allOf:[{$ref:"#/$defs/ListSessionsResponse"}],title:"ListSessionsResponse"},{allOf:[{$ref:"#/$defs/DeleteSessionResponse"}],title:"DeleteSessionResponse"},{allOf:[{$ref:"#/$defs/ForkSessionResponse"}],title:"ForkSessionResponse"},{allOf:[{$ref:"#/$defs/ResumeSessionResponse"}],title:"ResumeSessionResponse"},{allOf:[{$ref:"#/$defs/CloseSessionResponse"}],title:"CloseSessionResponse"},{allOf:[{$ref:"#/$defs/SetSessionModeResponse"}],title:"SetSessionModeResponse"},{allOf:[{$ref:"#/$defs/SetSessionConfigOptionResponse"}],title:"SetSessionConfigOptionResponse"},{allOf:[{$ref:"#/$defs/PromptResponse"}],title:"PromptResponse"},{allOf:[{$ref:"#/$defs/SetSessionModelResponse"}],title:"SetSessionModelResponse"},{allOf:[{$ref:"#/$defs/StartNesResponse"}],title:"StartNesResponse"},{allOf:[{$ref:"#/$defs/SuggestNesResponse"}],title:"SuggestNesResponse"},{allOf:[{$ref:"#/$defs/CloseNesResponse"}],title:"CloseNesResponse"},{allOf:[{$ref:"#/$defs/ExtResponse"}],title:"ExtMethodResponse"},{allOf:[{$ref:"#/$defs/MessageMcpResponse"}],title:"MessageMcpResponse"}],description:`All possible responses that an agent can send to a client.
|
|
197
|
+
|
|
198
|
+
This enum is used internally for routing RPC responses. You typically won't need
|
|
199
|
+
to use this directly - the responses are handled automatically by the connection.
|
|
200
|
+
|
|
201
|
+
These are responses to the corresponding \`ClientRequest\` variants.`}},required:["id","result"],title:"Result",type:"object"},{properties:{error:{$ref:"#/$defs/Error"},id:{$ref:"#/$defs/RequestId"}},required:["id","error"],title:"Error",type:"object"}],"x-docs-ignore":!0},Annotations:{description:"Optional annotations for the client. The client can use annotations to inform how objects are used or displayed",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
202
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
203
|
+
these keys.
|
|
204
|
+
|
|
205
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},audience:{items:{$ref:"#/$defs/Role"},type:["array","null"]},lastModified:{type:["string","null"]},priority:{format:"double",type:["number","null"]}},type:"object"},AudioContent:{description:"Audio provided to or from an LLM.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
206
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
207
|
+
these keys.
|
|
208
|
+
|
|
209
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},annotations:{anyOf:[{$ref:"#/$defs/Annotations"},{type:"null"}]},data:{type:"string"},mimeType:{type:"string"}},required:["data","mimeType"],type:"object"},AuthCapabilities:{description:`**UNSTABLE**
|
|
210
|
+
|
|
211
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
212
|
+
|
|
213
|
+
Authentication capabilities supported by the client.
|
|
214
|
+
|
|
215
|
+
Advertised during initialization to inform the agent which authentication
|
|
216
|
+
method types the client can handle. This governs opt-in types that require
|
|
217
|
+
additional client-side support.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
218
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
219
|
+
these keys.
|
|
220
|
+
|
|
221
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},terminal:{default:!1,description:"Whether the client supports `terminal` authentication methods.\n\nWhen `true`, the agent may include `terminal` entries in its authentication methods.",type:"boolean"}},type:"object"},AuthEnvVar:{description:`**UNSTABLE**
|
|
222
|
+
|
|
223
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
224
|
+
|
|
225
|
+
Describes a single environment variable for an [\`AuthMethodEnvVar\`] authentication method.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
226
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
227
|
+
these keys.
|
|
228
|
+
|
|
229
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},label:{description:"Human-readable label for this variable, displayed in client UI.",type:["string","null"]},name:{description:'The environment variable name (e.g. `"OPENAI_API_KEY"`).',type:"string"},optional:{default:!1,description:"Whether this variable is optional.\n\nDefaults to `false`.",type:"boolean"},secret:{default:!0,description:`Whether this value is a secret (e.g. API key, token).
|
|
230
|
+
Clients should use a password-style input for secret vars.
|
|
231
|
+
|
|
232
|
+
Defaults to \`true\`.`,type:"boolean"}},required:["name"],type:"object"},AuthMethod:{anyOf:[{allOf:[{$ref:"#/$defs/AuthMethodEnvVar"}],description:`**UNSTABLE**
|
|
233
|
+
|
|
234
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
235
|
+
|
|
236
|
+
User provides a key that the client passes to the agent as an environment variable.`,properties:{type:{const:"env_var",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/AuthMethodTerminal"}],description:`**UNSTABLE**
|
|
237
|
+
|
|
238
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
239
|
+
|
|
240
|
+
Client runs an interactive terminal for the user to authenticate via a TUI.`,properties:{type:{const:"terminal",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/AuthMethodAgent"}],description:"Agent handles authentication itself.\n\nThis is the default when no `type` is specified.",title:"agent"}],description:"Describes an available authentication method.\n\nThe `type` field acts as the discriminator in the serialized JSON form.\nWhen no `type` is present, the method is treated as `agent`."},AuthMethodAgent:{description:`Agent handles authentication itself.
|
|
241
|
+
|
|
242
|
+
This is the default authentication method type.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
243
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
244
|
+
these keys.
|
|
245
|
+
|
|
246
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},description:{description:"Optional description providing more details about this authentication method.",type:["string","null"]},id:{description:"Unique identifier for this authentication method.",type:"string"},name:{description:"Human-readable name of the authentication method.",type:"string"}},required:["id","name"],type:"object"},AuthMethodEnvVar:{description:`**UNSTABLE**
|
|
247
|
+
|
|
248
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
249
|
+
|
|
250
|
+
Environment variable authentication method.
|
|
251
|
+
|
|
252
|
+
The user provides credentials that the client passes to the agent as environment variables.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
253
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
254
|
+
these keys.
|
|
255
|
+
|
|
256
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},description:{description:"Optional description providing more details about this authentication method.",type:["string","null"]},id:{description:"Unique identifier for this authentication method.",type:"string"},link:{description:"Optional link to a page where the user can obtain their credentials.",type:["string","null"]},name:{description:"Human-readable name of the authentication method.",type:"string"},vars:{description:"The environment variables the client should set.",items:{$ref:"#/$defs/AuthEnvVar"},type:"array"}},required:["id","name","vars"],type:"object"},AuthMethodTerminal:{description:`**UNSTABLE**
|
|
257
|
+
|
|
258
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
259
|
+
|
|
260
|
+
Terminal-based authentication method.
|
|
261
|
+
|
|
262
|
+
The client runs an interactive terminal for the user to authenticate via a TUI.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
263
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
264
|
+
these keys.
|
|
265
|
+
|
|
266
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},args:{description:"Additional arguments to pass when running the agent binary for terminal auth.",items:{type:"string"},type:"array"},description:{description:"Optional description providing more details about this authentication method.",type:["string","null"]},env:{additionalProperties:{type:"string"},description:"Additional environment variables to set when running the agent binary for terminal auth.",type:"object"},id:{description:"Unique identifier for this authentication method.",type:"string"},name:{description:"Human-readable name of the authentication method.",type:"string"}},required:["id","name"],type:"object"},AuthenticateRequest:{description:`Request parameters for the authenticate method.
|
|
267
|
+
|
|
268
|
+
Specifies which authentication method to use.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
269
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
270
|
+
these keys.
|
|
271
|
+
|
|
272
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},methodId:{description:`The ID of the authentication method to use.
|
|
273
|
+
Must be one of the methods advertised in the initialize response.`,type:"string"}},required:["methodId"],type:"object","x-method":"authenticate","x-side":"agent"},AuthenticateResponse:{description:"Response to the `authenticate` method.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
274
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
275
|
+
these keys.
|
|
276
|
+
|
|
277
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"authenticate","x-side":"agent"},AvailableCommand:{description:"Information about a command.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
278
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
279
|
+
these keys.
|
|
280
|
+
|
|
281
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},description:{description:"Human-readable description of what the command does.",type:"string"},input:{anyOf:[{$ref:"#/$defs/AvailableCommandInput"},{type:"null"}],description:"Input for the command if required"},name:{description:"Command name (e.g., `create_plan`, `research_codebase`).",type:"string"}},required:["name","description"],type:"object"},AvailableCommandInput:{anyOf:[{allOf:[{$ref:"#/$defs/UnstructuredCommandInput"}],description:"All text that was typed after the command name is provided as input.",title:"unstructured"}],description:"The input specification for a command."},AvailableCommandsUpdate:{description:"Available commands are ready or have changed",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
282
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
283
|
+
these keys.
|
|
284
|
+
|
|
285
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},availableCommands:{description:"Commands the agent can execute",items:{$ref:"#/$defs/AvailableCommand"},type:"array"}},required:["availableCommands"],type:"object"},BlobResourceContents:{description:"Binary resource contents.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
286
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
287
|
+
these keys.
|
|
288
|
+
|
|
289
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},blob:{type:"string"},mimeType:{type:["string","null"]},uri:{type:"string"}},required:["blob","uri"],type:"object"},BooleanPropertySchema:{description:"Schema for boolean properties in an elicitation form.",properties:{default:{description:"Default value.",type:["boolean","null"]},description:{description:"Human-readable description.",type:["string","null"]},title:{description:"Optional title for the property.",type:["string","null"]}},type:"object"},CancelNotification:{description:`Notification to cancel ongoing operations for a session.
|
|
290
|
+
|
|
291
|
+
See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
292
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
293
|
+
these keys.
|
|
294
|
+
|
|
295
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to cancel operations for."}},required:["sessionId"],type:"object","x-method":"session/cancel","x-side":"agent"},CancelRequestNotification:{description:`**UNSTABLE**
|
|
296
|
+
|
|
297
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
298
|
+
|
|
299
|
+
Notification to cancel an ongoing request.
|
|
300
|
+
|
|
301
|
+
See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
302
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
303
|
+
these keys.
|
|
304
|
+
|
|
305
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},requestId:{allOf:[{$ref:"#/$defs/RequestId"}],description:"The ID of the request to cancel."}},required:["requestId"],type:"object","x-method":"$/cancel_request","x-side":"protocol"},ClientCapabilities:{description:`Capabilities supported by the client.
|
|
306
|
+
|
|
307
|
+
Advertised during initialization to inform the agent about
|
|
308
|
+
available features and methods.
|
|
309
|
+
|
|
310
|
+
See protocol docs: [Client Capabilities](https://agentclientprotocol.com/protocol/initialization#client-capabilities)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
311
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
312
|
+
these keys.
|
|
313
|
+
|
|
314
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},auth:{allOf:[{$ref:"#/$defs/AuthCapabilities"}],default:{terminal:!1},description:`**UNSTABLE**
|
|
315
|
+
|
|
316
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
317
|
+
|
|
318
|
+
Authentication capabilities supported by the client.
|
|
319
|
+
Determines which authentication method types the agent may include
|
|
320
|
+
in its \`InitializeResponse\`.`},elicitation:{anyOf:[{$ref:"#/$defs/ElicitationCapabilities"},{type:"null"}],description:`**UNSTABLE**
|
|
321
|
+
|
|
322
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
323
|
+
|
|
324
|
+
Elicitation capabilities supported by the client.
|
|
325
|
+
Determines which elicitation modes the agent may use.`},fs:{allOf:[{$ref:"#/$defs/FileSystemCapabilities"}],default:{readTextFile:!1,writeTextFile:!1},description:`File system capabilities supported by the client.
|
|
326
|
+
Determines which file operations the agent can request.`},nes:{anyOf:[{$ref:"#/$defs/ClientNesCapabilities"},{type:"null"}],description:`**UNSTABLE**
|
|
327
|
+
|
|
328
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
329
|
+
|
|
330
|
+
NES (Next Edit Suggestions) capabilities supported by the client.`},positionEncodings:{description:`**UNSTABLE**
|
|
331
|
+
|
|
332
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
333
|
+
|
|
334
|
+
The position encodings supported by the client, in order of preference.`,items:{$ref:"#/$defs/PositionEncodingKind"},type:"array"},terminal:{default:!1,description:"Whether the Client support all `terminal/*` methods.",type:"boolean"}},type:"object"},ClientNesCapabilities:{description:"NES capabilities advertised by the client during initialization.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
335
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
336
|
+
these keys.
|
|
337
|
+
|
|
338
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},jump:{anyOf:[{$ref:"#/$defs/NesJumpCapabilities"},{type:"null"}],description:"Whether the client supports the `jump` suggestion kind."},rename:{anyOf:[{$ref:"#/$defs/NesRenameCapabilities"},{type:"null"}],description:"Whether the client supports the `rename` suggestion kind."},searchAndReplace:{anyOf:[{$ref:"#/$defs/NesSearchAndReplaceCapabilities"},{type:"null"}],description:"Whether the client supports the `searchAndReplace` suggestion kind."}},type:"object"},ClientNotification:{properties:{method:{type:"string"},params:{anyOf:[{anyOf:[{allOf:[{$ref:"#/$defs/CancelNotification"}],description:`Cancels ongoing operations for a session.
|
|
339
|
+
|
|
340
|
+
This is a notification sent by the client to cancel an ongoing prompt turn.
|
|
341
|
+
|
|
342
|
+
Upon receiving this notification, the Agent SHOULD:
|
|
343
|
+
- Stop all language model requests as soon as possible
|
|
344
|
+
- Abort all tool call invocations in progress
|
|
345
|
+
- Send any pending \`session/update\` notifications
|
|
346
|
+
- Respond to the original \`session/prompt\` request with \`StopReason::Cancelled\`
|
|
347
|
+
|
|
348
|
+
See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)`,title:"CancelNotification"},{allOf:[{$ref:"#/$defs/DidOpenDocumentNotification"}],description:`**UNSTABLE**
|
|
349
|
+
|
|
350
|
+
Notification sent when a file is opened in the editor.`,title:"DidOpenDocumentNotification"},{allOf:[{$ref:"#/$defs/DidChangeDocumentNotification"}],description:`**UNSTABLE**
|
|
351
|
+
|
|
352
|
+
Notification sent when a file is edited.`,title:"DidChangeDocumentNotification"},{allOf:[{$ref:"#/$defs/DidCloseDocumentNotification"}],description:`**UNSTABLE**
|
|
353
|
+
|
|
354
|
+
Notification sent when a file is closed.`,title:"DidCloseDocumentNotification"},{allOf:[{$ref:"#/$defs/DidSaveDocumentNotification"}],description:`**UNSTABLE**
|
|
355
|
+
|
|
356
|
+
Notification sent when a file is saved.`,title:"DidSaveDocumentNotification"},{allOf:[{$ref:"#/$defs/DidFocusDocumentNotification"}],description:`**UNSTABLE**
|
|
357
|
+
|
|
358
|
+
Notification sent when a file becomes the active editor tab.`,title:"DidFocusDocumentNotification"},{allOf:[{$ref:"#/$defs/AcceptNesNotification"}],description:`**UNSTABLE**
|
|
359
|
+
|
|
360
|
+
Notification sent when a suggestion is accepted.`,title:"AcceptNesNotification"},{allOf:[{$ref:"#/$defs/RejectNesNotification"}],description:`**UNSTABLE**
|
|
361
|
+
|
|
362
|
+
Notification sent when a suggestion is rejected.`,title:"RejectNesNotification"},{allOf:[{$ref:"#/$defs/MessageMcpNotification"}],description:`**UNSTABLE**
|
|
363
|
+
|
|
364
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
365
|
+
|
|
366
|
+
Sends an MCP-over-ACP notification.`,title:"MessageMcpNotification"},{allOf:[{$ref:"#/$defs/ExtNotification"}],description:`Handles extension notifications from the client.
|
|
367
|
+
|
|
368
|
+
Extension notifications provide a way to send one-way messages for custom functionality
|
|
369
|
+
while maintaining protocol compatibility.
|
|
370
|
+
|
|
371
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,title:"ExtNotification"}],description:`All possible notifications that a client can send to an agent.
|
|
372
|
+
|
|
373
|
+
This enum is used internally for routing RPC notifications. You typically won't need
|
|
374
|
+
to use this directly.
|
|
375
|
+
|
|
376
|
+
Notifications do not expect a response.`},{type:"null"}]}},required:["method"],type:"object","x-docs-ignore":!0},ClientRequest:{properties:{id:{$ref:"#/$defs/RequestId"},method:{type:"string"},params:{anyOf:[{anyOf:[{allOf:[{$ref:"#/$defs/InitializeRequest"}],description:`Establishes the connection with a client and negotiates protocol capabilities.
|
|
377
|
+
|
|
378
|
+
This method is called once at the beginning of the connection to:
|
|
379
|
+
- Negotiate the protocol version to use
|
|
380
|
+
- Exchange capability information between client and agent
|
|
381
|
+
- Determine available authentication methods
|
|
382
|
+
|
|
383
|
+
The agent should respond with its supported protocol version and capabilities.
|
|
384
|
+
|
|
385
|
+
See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)`,title:"InitializeRequest"},{allOf:[{$ref:"#/$defs/AuthenticateRequest"}],description:`Authenticates the client using the specified authentication method.
|
|
386
|
+
|
|
387
|
+
Called when the agent requires authentication before allowing session creation.
|
|
388
|
+
The client provides the authentication method ID that was advertised during initialization.
|
|
389
|
+
|
|
390
|
+
After successful authentication, the client can proceed to create sessions with
|
|
391
|
+
\`new_session\` without receiving an \`auth_required\` error.
|
|
392
|
+
|
|
393
|
+
See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)`,title:"AuthenticateRequest"},{allOf:[{$ref:"#/$defs/ListProvidersRequest"}],description:`**UNSTABLE**
|
|
394
|
+
|
|
395
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
396
|
+
|
|
397
|
+
Lists providers that can be configured by the client.`,title:"ListProvidersRequest"},{allOf:[{$ref:"#/$defs/SetProvidersRequest"}],description:`**UNSTABLE**
|
|
398
|
+
|
|
399
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
400
|
+
|
|
401
|
+
Replaces the configuration for a provider.`,title:"SetProvidersRequest"},{allOf:[{$ref:"#/$defs/DisableProvidersRequest"}],description:`**UNSTABLE**
|
|
402
|
+
|
|
403
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
404
|
+
|
|
405
|
+
Disables a provider.`,title:"DisableProvidersRequest"},{allOf:[{$ref:"#/$defs/LogoutRequest"}],description:`**UNSTABLE**
|
|
406
|
+
|
|
407
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
408
|
+
|
|
409
|
+
Logs out of the current authenticated state.
|
|
410
|
+
|
|
411
|
+
After a successful logout, all new sessions will require authentication.
|
|
412
|
+
There is no guarantee about the behavior of already running sessions.`,title:"LogoutRequest"},{allOf:[{$ref:"#/$defs/NewSessionRequest"}],description:`Creates a new conversation session with the agent.
|
|
413
|
+
|
|
414
|
+
Sessions represent independent conversation contexts with their own history and state.
|
|
415
|
+
|
|
416
|
+
The agent should:
|
|
417
|
+
- Create a new session context
|
|
418
|
+
- Connect to any specified MCP servers
|
|
419
|
+
- Return a unique session ID for future requests
|
|
420
|
+
|
|
421
|
+
May return an \`auth_required\` error if the agent requires authentication.
|
|
422
|
+
|
|
423
|
+
See protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)`,title:"NewSessionRequest"},{allOf:[{$ref:"#/$defs/LoadSessionRequest"}],description:`Loads an existing session to resume a previous conversation.
|
|
424
|
+
|
|
425
|
+
This method is only available if the agent advertises the \`loadSession\` capability.
|
|
426
|
+
|
|
427
|
+
The agent should:
|
|
428
|
+
- Restore the session context and conversation history
|
|
429
|
+
- Connect to the specified MCP servers
|
|
430
|
+
- Stream the entire conversation history back to the client via notifications
|
|
431
|
+
|
|
432
|
+
See protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)`,title:"LoadSessionRequest"},{allOf:[{$ref:"#/$defs/ListSessionsRequest"}],description:`Lists existing sessions known to the agent.
|
|
433
|
+
|
|
434
|
+
This method is only available if the agent advertises the \`sessionCapabilities.list\` capability.
|
|
435
|
+
|
|
436
|
+
The agent should return metadata about sessions with optional filtering and pagination support.`,title:"ListSessionsRequest"},{allOf:[{$ref:"#/$defs/DeleteSessionRequest"}],description:`**UNSTABLE**
|
|
437
|
+
|
|
438
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
439
|
+
|
|
440
|
+
Deletes an existing session from \`session/list\`.
|
|
441
|
+
|
|
442
|
+
This method is only available if the agent advertises the \`sessionCapabilities.delete\` capability.`,title:"DeleteSessionRequest"},{allOf:[{$ref:"#/$defs/ForkSessionRequest"}],description:`**UNSTABLE**
|
|
443
|
+
|
|
444
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
445
|
+
|
|
446
|
+
Forks an existing session to create a new independent session.
|
|
447
|
+
|
|
448
|
+
This method is only available if the agent advertises the \`session.fork\` capability.
|
|
449
|
+
|
|
450
|
+
The agent should create a new session with the same conversation context as the
|
|
451
|
+
original, allowing operations like generating summaries without affecting the
|
|
452
|
+
original session's history.`,title:"ForkSessionRequest"},{allOf:[{$ref:"#/$defs/ResumeSessionRequest"}],description:`Resumes an existing session without returning previous messages.
|
|
453
|
+
|
|
454
|
+
This method is only available if the agent advertises the \`sessionCapabilities.resume\` capability.
|
|
455
|
+
|
|
456
|
+
The agent should resume the session context, allowing the conversation to continue
|
|
457
|
+
without replaying the message history (unlike \`session/load\`).`,title:"ResumeSessionRequest"},{allOf:[{$ref:"#/$defs/CloseSessionRequest"}],description:`Closes an active session and frees up any resources associated with it.
|
|
458
|
+
|
|
459
|
+
This method is only available if the agent advertises the \`sessionCapabilities.close\` capability.
|
|
460
|
+
|
|
461
|
+
The agent must cancel any ongoing work (as if \`session/cancel\` was called)
|
|
462
|
+
and then free up any resources associated with the session.`,title:"CloseSessionRequest"},{allOf:[{$ref:"#/$defs/SetSessionModeRequest"}],description:`Sets the current mode for a session.
|
|
463
|
+
|
|
464
|
+
Allows switching between different agent modes (e.g., "ask", "architect", "code")
|
|
465
|
+
that affect system prompts, tool availability, and permission behaviors.
|
|
466
|
+
|
|
467
|
+
The mode must be one of the modes advertised in \`availableModes\` during session
|
|
468
|
+
creation or loading. Agents may also change modes autonomously and notify the
|
|
469
|
+
client via \`current_mode_update\` notifications.
|
|
470
|
+
|
|
471
|
+
This method can be called at any time during a session, whether the Agent is
|
|
472
|
+
idle or actively generating a response.
|
|
473
|
+
|
|
474
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`,title:"SetSessionModeRequest"},{allOf:[{$ref:"#/$defs/SetSessionConfigOptionRequest"}],description:"Sets the current value for a session configuration option.",title:"SetSessionConfigOptionRequest"},{allOf:[{$ref:"#/$defs/PromptRequest"}],description:`Processes a user prompt within a session.
|
|
475
|
+
|
|
476
|
+
This method handles the whole lifecycle of a prompt:
|
|
477
|
+
- Receives user messages with optional context (files, images, etc.)
|
|
478
|
+
- Processes the prompt using language models
|
|
479
|
+
- Reports language model content and tool calls to the Clients
|
|
480
|
+
- Requests permission to run tools
|
|
481
|
+
- Executes any requested tool calls
|
|
482
|
+
- Returns when the turn is complete with a stop reason
|
|
483
|
+
|
|
484
|
+
See protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)`,title:"PromptRequest"},{allOf:[{$ref:"#/$defs/SetSessionModelRequest"}],description:`**UNSTABLE**
|
|
485
|
+
|
|
486
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
487
|
+
|
|
488
|
+
Select a model for a given session.`,title:"SetSessionModelRequest"},{allOf:[{$ref:"#/$defs/StartNesRequest"}],description:`**UNSTABLE**
|
|
489
|
+
|
|
490
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
491
|
+
|
|
492
|
+
Starts an NES session.`,title:"StartNesRequest"},{allOf:[{$ref:"#/$defs/SuggestNesRequest"}],description:`**UNSTABLE**
|
|
493
|
+
|
|
494
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
495
|
+
|
|
496
|
+
Requests a code suggestion.`,title:"SuggestNesRequest"},{allOf:[{$ref:"#/$defs/CloseNesRequest"}],description:`**UNSTABLE**
|
|
497
|
+
|
|
498
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
499
|
+
|
|
500
|
+
Closes an active NES session and frees up any resources associated with it.
|
|
501
|
+
|
|
502
|
+
The agent must cancel any ongoing work and then free up any resources
|
|
503
|
+
associated with the NES session.`,title:"CloseNesRequest"},{allOf:[{$ref:"#/$defs/MessageMcpRequest"}],description:`**UNSTABLE**
|
|
504
|
+
|
|
505
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
506
|
+
|
|
507
|
+
Exchanges an MCP-over-ACP message.`,title:"MessageMcpRequest"},{allOf:[{$ref:"#/$defs/ExtRequest"}],description:`Handles extension method requests from the client.
|
|
508
|
+
|
|
509
|
+
Extension methods provide a way to add custom functionality while maintaining
|
|
510
|
+
protocol compatibility.
|
|
511
|
+
|
|
512
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,title:"ExtMethodRequest"}],description:`All possible requests that a client can send to an agent.
|
|
513
|
+
|
|
514
|
+
This enum is used internally for routing RPC requests. You typically won't need
|
|
515
|
+
to use this directly.
|
|
516
|
+
|
|
517
|
+
This enum encompasses all method calls from client to agent.`},{type:"null"}]}},required:["id","method"],type:"object","x-docs-ignore":!0},ClientResponse:{anyOf:[{properties:{id:{$ref:"#/$defs/RequestId"},result:{anyOf:[{allOf:[{$ref:"#/$defs/WriteTextFileResponse"}],title:"WriteTextFileResponse"},{allOf:[{$ref:"#/$defs/ReadTextFileResponse"}],title:"ReadTextFileResponse"},{allOf:[{$ref:"#/$defs/RequestPermissionResponse"}],title:"RequestPermissionResponse"},{allOf:[{$ref:"#/$defs/CreateTerminalResponse"}],title:"CreateTerminalResponse"},{allOf:[{$ref:"#/$defs/TerminalOutputResponse"}],title:"TerminalOutputResponse"},{allOf:[{$ref:"#/$defs/ReleaseTerminalResponse"}],title:"ReleaseTerminalResponse"},{allOf:[{$ref:"#/$defs/WaitForTerminalExitResponse"}],title:"WaitForTerminalExitResponse"},{allOf:[{$ref:"#/$defs/KillTerminalResponse"}],title:"KillTerminalResponse"},{allOf:[{$ref:"#/$defs/CreateElicitationResponse"}],title:"CreateElicitationResponse"},{allOf:[{$ref:"#/$defs/ConnectMcpResponse"}],title:"ConnectMcpResponse"},{allOf:[{$ref:"#/$defs/DisconnectMcpResponse"}],title:"DisconnectMcpResponse"},{allOf:[{$ref:"#/$defs/ExtResponse"}],title:"ExtMethodResponse"},{allOf:[{$ref:"#/$defs/MessageMcpResponse"}],title:"MessageMcpResponse"}],description:`All possible responses that a client can send to an agent.
|
|
518
|
+
|
|
519
|
+
This enum is used internally for routing RPC responses. You typically won't need
|
|
520
|
+
to use this directly - the responses are handled automatically by the connection.
|
|
521
|
+
|
|
522
|
+
These are responses to the corresponding \`AgentRequest\` variants.`}},required:["id","result"],title:"Result",type:"object"},{properties:{error:{$ref:"#/$defs/Error"},id:{$ref:"#/$defs/RequestId"}},required:["id","error"],title:"Error",type:"object"}],"x-docs-ignore":!0},CloseNesRequest:{description:`Request to close an NES session.
|
|
523
|
+
|
|
524
|
+
The agent **must** cancel any ongoing work related to the NES session
|
|
525
|
+
and then free up any resources associated with the session.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
526
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
527
|
+
these keys.
|
|
528
|
+
|
|
529
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the NES session to close."}},required:["sessionId"],type:"object","x-method":"nes/close","x-side":"agent"},CloseNesResponse:{description:"Response from closing an NES session.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
530
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
531
|
+
these keys.
|
|
532
|
+
|
|
533
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"nes/close","x-side":"agent"},CloseSessionRequest:{description:`Request parameters for closing an active session.
|
|
534
|
+
|
|
535
|
+
If supported, the agent **must** cancel any ongoing work related to the session
|
|
536
|
+
(treat it as if \`session/cancel\` was called) and then free up any resources
|
|
537
|
+
associated with the session.
|
|
538
|
+
|
|
539
|
+
Only available if the Agent supports the \`sessionCapabilities.close\` capability.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
540
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
541
|
+
these keys.
|
|
542
|
+
|
|
543
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to close."}},required:["sessionId"],type:"object","x-method":"session/close","x-side":"agent"},CloseSessionResponse:{description:"Response from closing a session.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
544
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
545
|
+
these keys.
|
|
546
|
+
|
|
547
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"session/close","x-side":"agent"},CompleteElicitationNotification:{description:`**UNSTABLE**
|
|
548
|
+
|
|
549
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
550
|
+
|
|
551
|
+
Notification sent by the agent when a URL-based elicitation is complete.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
552
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
553
|
+
these keys.
|
|
554
|
+
|
|
555
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},elicitationId:{allOf:[{$ref:"#/$defs/ElicitationId"}],description:"The ID of the elicitation that completed."}},required:["elicitationId"],type:"object","x-method":"elicitation/complete","x-side":"client"},ConfigOptionUpdate:{description:"Session configuration options have been updated.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
556
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
557
|
+
these keys.
|
|
558
|
+
|
|
559
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},configOptions:{description:"The full set of configuration options and their current values.",items:{$ref:"#/$defs/SessionConfigOption"},type:"array"}},required:["configOptions"],type:"object"},ConnectMcpRequest:{description:`**UNSTABLE**
|
|
560
|
+
|
|
561
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
562
|
+
|
|
563
|
+
Request parameters for \`mcp/connect\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
564
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
565
|
+
these keys.
|
|
566
|
+
|
|
567
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},acpId:{allOf:[{$ref:"#/$defs/McpServerAcpId"}],description:"The ACP MCP server ID that was provided by the component declaring the MCP server."}},required:["acpId"],type:"object","x-method":"mcp/connect","x-side":"client"},ConnectMcpResponse:{description:`**UNSTABLE**
|
|
568
|
+
|
|
569
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
570
|
+
|
|
571
|
+
Response to \`mcp/connect\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
572
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
573
|
+
these keys.
|
|
574
|
+
|
|
575
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},connectionId:{allOf:[{$ref:"#/$defs/McpConnectionId"}],description:"The unique identifier for this MCP-over-ACP connection."}},required:["connectionId"],type:"object","x-method":"mcp/connect","x-side":"client"},Content:{description:"Standard content block (text, images, resources).",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
576
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
577
|
+
these keys.
|
|
578
|
+
|
|
579
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},content:{allOf:[{$ref:"#/$defs/ContentBlock"}],description:"The actual content block."}},required:["content"],type:"object"},ContentBlock:{description:`Content blocks represent displayable information in the Agent Client Protocol.
|
|
580
|
+
|
|
581
|
+
They provide a structured way to handle various types of user-facing content—whether
|
|
582
|
+
it's text from language models, images for analysis, or embedded resources for context.
|
|
583
|
+
|
|
584
|
+
Content blocks appear in:
|
|
585
|
+
- User prompts sent via \`session/prompt\`
|
|
586
|
+
- Language model output streamed through \`session/update\` notifications
|
|
587
|
+
- Progress updates and results from tool calls
|
|
588
|
+
|
|
589
|
+
This structure is compatible with the Model Context Protocol (MCP), enabling
|
|
590
|
+
agents to seamlessly forward content from MCP tool outputs without transformation.
|
|
591
|
+
|
|
592
|
+
See protocol docs: [Content](https://agentclientprotocol.com/protocol/content)`,discriminator:{propertyName:"type"},oneOf:[{allOf:[{$ref:"#/$defs/TextContent"}],description:`Text content. May be plain text or formatted with Markdown.
|
|
593
|
+
|
|
594
|
+
All agents MUST support text content blocks in prompts.
|
|
595
|
+
Clients SHOULD render this text as Markdown.`,properties:{type:{const:"text",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/ImageContent"}],description:"Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.",properties:{type:{const:"image",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/AudioContent"}],description:"Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.",properties:{type:{const:"audio",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/ResourceLink"}],description:`References to resources that the agent can access.
|
|
596
|
+
|
|
597
|
+
All agents MUST support resource links in prompts.`,properties:{type:{const:"resource_link",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/EmbeddedResource"}],description:`Complete resource contents embedded directly in the message.
|
|
598
|
+
|
|
599
|
+
Preferred for including context as it avoids extra round-trips.
|
|
600
|
+
|
|
601
|
+
Requires the \`embeddedContext\` prompt capability when included in prompts.`,properties:{type:{const:"resource",type:"string"}},required:["type"],type:"object"}]},ContentChunk:{description:"A streamed item of content",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
602
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
603
|
+
these keys.
|
|
604
|
+
|
|
605
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},content:{allOf:[{$ref:"#/$defs/ContentBlock"}],description:"A single item of content"},messageId:{description:`**UNSTABLE**
|
|
606
|
+
|
|
607
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
608
|
+
|
|
609
|
+
A unique identifier for the message this chunk belongs to.
|
|
610
|
+
|
|
611
|
+
All chunks belonging to the same message share the same \`messageId\`.
|
|
612
|
+
A change in \`messageId\` indicates a new message has started.
|
|
613
|
+
Both clients and agents MUST use UUID format for message IDs.`,type:["string","null"]}},required:["content"],type:"object"},Cost:{description:`**UNSTABLE**
|
|
614
|
+
|
|
615
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
616
|
+
|
|
617
|
+
Cost information for a session.`,properties:{amount:{description:"Total cumulative cost for session.",format:"double",type:"number"},currency:{description:'ISO 4217 currency code (e.g., "USD", "EUR").',type:"string"}},required:["amount","currency"],type:"object"},CreateElicitationRequest:{description:`**UNSTABLE**
|
|
618
|
+
|
|
619
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
620
|
+
|
|
621
|
+
Request from the agent to elicit structured user input.
|
|
622
|
+
|
|
623
|
+
The agent sends this to the client to request information from the user,
|
|
624
|
+
either via a form or by directing them to a URL.
|
|
625
|
+
Elicitations are tied to a session (optionally a tool call) or a request.`,discriminator:{propertyName:"mode"},oneOf:[{allOf:[{$ref:"#/$defs/ElicitationFormMode"}],description:"Form-based elicitation where the client renders a form from the provided schema.",properties:{mode:{const:"form",type:"string"}},required:["mode"],type:"object"},{allOf:[{$ref:"#/$defs/ElicitationUrlMode"}],description:"URL-based elicitation where the client directs the user to a URL.",properties:{mode:{const:"url",type:"string"}},required:["mode"],type:"object"}],properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
626
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
627
|
+
these keys.
|
|
628
|
+
|
|
629
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},message:{description:"A human-readable message describing what input is needed.",type:"string"}},required:["message"],type:"object","x-method":"elicitation/create","x-side":"client"},CreateElicitationResponse:{description:`**UNSTABLE**
|
|
630
|
+
|
|
631
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
632
|
+
|
|
633
|
+
Response from the client to an elicitation request.`,discriminator:{propertyName:"action"},oneOf:[{allOf:[{$ref:"#/$defs/ElicitationAcceptAction"}],description:"The user accepted and provided content.",properties:{action:{const:"accept",type:"string"}},required:["action"],type:"object"},{description:"The user declined the elicitation.",properties:{action:{const:"decline",type:"string"}},required:["action"],type:"object"},{description:"The elicitation was cancelled.",properties:{action:{const:"cancel",type:"string"}},required:["action"],type:"object"}],properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
634
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
635
|
+
these keys.
|
|
636
|
+
|
|
637
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"elicitation/create","x-side":"client"},CreateTerminalRequest:{description:"Request to create a new terminal and execute a command.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
638
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
639
|
+
these keys.
|
|
640
|
+
|
|
641
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},args:{description:"Array of command arguments.",items:{type:"string"},type:"array"},command:{description:"The command to execute.",type:"string"},cwd:{description:"Working directory for the command (absolute path).",type:["string","null"]},env:{description:"Environment variables for the command.",items:{$ref:"#/$defs/EnvVariable"},type:"array"},outputByteLimit:{description:`Maximum number of output bytes to retain.
|
|
642
|
+
|
|
643
|
+
When the limit is exceeded, the Client truncates from the beginning of the output
|
|
644
|
+
to stay within the limit.
|
|
645
|
+
|
|
646
|
+
The Client MUST ensure truncation happens at a character boundary to maintain valid
|
|
647
|
+
string output, even if this means the retained output is slightly less than the
|
|
648
|
+
specified limit.`,format:"uint64",minimum:0,type:["integer","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."}},required:["sessionId","command"],type:"object","x-method":"terminal/create","x-side":"client"},CreateTerminalResponse:{description:"Response containing the ID of the created terminal.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
649
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
650
|
+
these keys.
|
|
651
|
+
|
|
652
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},terminalId:{description:"The unique identifier for the created terminal.",type:"string"}},required:["terminalId"],type:"object","x-method":"terminal/create","x-side":"client"},CurrentModeUpdate:{description:`The current mode of the session has changed
|
|
653
|
+
|
|
654
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
655
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
656
|
+
these keys.
|
|
657
|
+
|
|
658
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},currentModeId:{allOf:[{$ref:"#/$defs/SessionModeId"}],description:"The ID of the current mode"}},required:["currentModeId"],type:"object"},DeleteSessionRequest:{description:`**UNSTABLE**
|
|
659
|
+
|
|
660
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
661
|
+
|
|
662
|
+
Request parameters for deleting an existing session from \`session/list\`.
|
|
663
|
+
|
|
664
|
+
Only available if the Agent supports the \`sessionCapabilities.delete\` capability.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
665
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
666
|
+
these keys.
|
|
667
|
+
|
|
668
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to delete."}},required:["sessionId"],type:"object","x-method":"session/delete","x-side":"agent"},DeleteSessionResponse:{description:`**UNSTABLE**
|
|
669
|
+
|
|
670
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
671
|
+
|
|
672
|
+
Response from deleting a session.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
673
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
674
|
+
these keys.
|
|
675
|
+
|
|
676
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"session/delete","x-side":"agent"},DidChangeDocumentNotification:{description:"Notification sent when a file is edited.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
677
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
678
|
+
these keys.
|
|
679
|
+
|
|
680
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},contentChanges:{description:"The content changes.",items:{$ref:"#/$defs/TextDocumentContentChangeEvent"},type:"array"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this notification."},uri:{description:"The URI of the changed document.",type:"string"},version:{description:"The new version number of the document.",format:"int64",type:"integer"}},required:["sessionId","uri","version","contentChanges"],type:"object","x-method":"document/didChange","x-side":"agent"},DidCloseDocumentNotification:{description:"Notification sent when a file is closed.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
681
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
682
|
+
these keys.
|
|
683
|
+
|
|
684
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this notification."},uri:{description:"The URI of the closed document.",type:"string"}},required:["sessionId","uri"],type:"object","x-method":"document/didClose","x-side":"agent"},DidFocusDocumentNotification:{description:"Notification sent when a file becomes the active editor tab.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
685
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
686
|
+
these keys.
|
|
687
|
+
|
|
688
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},position:{allOf:[{$ref:"#/$defs/Position"}],description:"The current cursor position."},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this notification."},uri:{description:"The URI of the focused document.",type:"string"},version:{description:"The version number of the document.",format:"int64",type:"integer"},visibleRange:{allOf:[{$ref:"#/$defs/Range"}],description:"The portion of the file currently visible in the editor viewport."}},required:["sessionId","uri","version","position","visibleRange"],type:"object","x-method":"document/didFocus","x-side":"agent"},DidOpenDocumentNotification:{description:"Notification sent when a file is opened in the editor.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
689
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
690
|
+
these keys.
|
|
691
|
+
|
|
692
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},languageId:{description:'The language identifier of the document (e.g., "rust", "python").',type:"string"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this notification."},text:{description:"The full text content of the document.",type:"string"},uri:{description:"The URI of the opened document.",type:"string"},version:{description:"The version number of the document.",format:"int64",type:"integer"}},required:["sessionId","uri","languageId","version","text"],type:"object","x-method":"document/didOpen","x-side":"agent"},DidSaveDocumentNotification:{description:"Notification sent when a file is saved.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
693
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
694
|
+
these keys.
|
|
695
|
+
|
|
696
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this notification."},uri:{description:"The URI of the saved document.",type:"string"}},required:["sessionId","uri"],type:"object","x-method":"document/didSave","x-side":"agent"},Diff:{description:`A diff representing file modifications.
|
|
697
|
+
|
|
698
|
+
Shows changes to files in a format suitable for display in the client UI.
|
|
699
|
+
|
|
700
|
+
See protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
701
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
702
|
+
these keys.
|
|
703
|
+
|
|
704
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},newText:{description:"The new content after modification.",type:"string"},oldText:{description:"The original content (None for new files).",type:["string","null"]},path:{description:"The file path being modified.",type:"string"}},required:["path","newText"],type:"object"},DisableProvidersRequest:{description:`**UNSTABLE**
|
|
705
|
+
|
|
706
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
707
|
+
|
|
708
|
+
Request parameters for \`providers/disable\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
709
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
710
|
+
these keys.
|
|
711
|
+
|
|
712
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},id:{description:"Provider id to disable.",type:"string"}},required:["id"],type:"object","x-method":"providers/disable","x-side":"agent"},DisableProvidersResponse:{description:`**UNSTABLE**
|
|
713
|
+
|
|
714
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
715
|
+
|
|
716
|
+
Response to \`providers/disable\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
717
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
718
|
+
these keys.
|
|
719
|
+
|
|
720
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"providers/disable","x-side":"agent"},DisconnectMcpRequest:{description:`**UNSTABLE**
|
|
721
|
+
|
|
722
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
723
|
+
|
|
724
|
+
Request parameters for \`mcp/disconnect\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
725
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
726
|
+
these keys.
|
|
727
|
+
|
|
728
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},connectionId:{allOf:[{$ref:"#/$defs/McpConnectionId"}],description:"The MCP-over-ACP connection to close."}},required:["connectionId"],type:"object","x-method":"mcp/disconnect","x-side":"client"},DisconnectMcpResponse:{description:`**UNSTABLE**
|
|
729
|
+
|
|
730
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
731
|
+
|
|
732
|
+
Response to \`mcp/disconnect\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
733
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
734
|
+
these keys.
|
|
735
|
+
|
|
736
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"mcp/disconnect","x-side":"client"},ElicitationAcceptAction:{description:`**UNSTABLE**
|
|
737
|
+
|
|
738
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
739
|
+
|
|
740
|
+
The user accepted the elicitation and provided content.`,properties:{content:{additionalProperties:{$ref:"#/$defs/ElicitationContentValue"},description:"The user-provided content, if any, as an object matching the requested schema.",type:["object","null"]}},type:"object"},ElicitationCapabilities:{description:`**UNSTABLE**
|
|
741
|
+
|
|
742
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
743
|
+
|
|
744
|
+
Elicitation capabilities supported by the client.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
745
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
746
|
+
these keys.
|
|
747
|
+
|
|
748
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},form:{anyOf:[{$ref:"#/$defs/ElicitationFormCapabilities"},{type:"null"}],description:"Whether the client supports form-based elicitation."},url:{anyOf:[{$ref:"#/$defs/ElicitationUrlCapabilities"},{type:"null"}],description:"Whether the client supports URL-based elicitation."}},type:"object"},ElicitationContentValue:{anyOf:[{title:"String",type:"string"},{format:"int64",title:"Integer",type:"integer"},{format:"double",title:"Number",type:"number"},{title:"Boolean",type:"boolean"},{items:{type:"string"},title:"StringArray",type:"array"}]},ElicitationFormCapabilities:{description:`**UNSTABLE**
|
|
749
|
+
|
|
750
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
751
|
+
|
|
752
|
+
Form-based elicitation capabilities.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
753
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
754
|
+
these keys.
|
|
755
|
+
|
|
756
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},ElicitationFormMode:{anyOf:[{allOf:[{$ref:"#/$defs/ElicitationSessionScope"}],description:"Tied to a session, optionally to a specific tool call within that session.",title:"Session"},{allOf:[{$ref:"#/$defs/ElicitationRequestScope"}],description:`Tied to a specific JSON-RPC request outside of a session
|
|
757
|
+
(e.g., during auth/configuration phases before any session is started).`,title:"Request"}],description:`**UNSTABLE**
|
|
758
|
+
|
|
759
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
760
|
+
|
|
761
|
+
Form-based elicitation mode where the client renders a form from the provided schema.`,properties:{requestedSchema:{allOf:[{$ref:"#/$defs/ElicitationSchema"}],description:"A JSON Schema describing the form fields to present to the user."}},required:["requestedSchema"],type:"object"},ElicitationId:{description:`**UNSTABLE**
|
|
762
|
+
|
|
763
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
764
|
+
|
|
765
|
+
Unique identifier for an elicitation.`,type:"string"},ElicitationPropertySchema:{description:'Property schema for elicitation form fields.\n\nEach variant corresponds to a JSON Schema `"type"` value.\nSingle-select enums use the `String` variant with `enum` or `oneOf` set.\nMulti-select enums use the `Array` variant.',discriminator:{propertyName:"type"},oneOf:[{allOf:[{$ref:"#/$defs/StringPropertySchema"}],description:"String property (or single-select enum when `enum`/`oneOf` is set).",properties:{type:{const:"string",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/NumberPropertySchema"}],description:"Number (floating-point) property.",properties:{type:{const:"number",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/IntegerPropertySchema"}],description:"Integer property.",properties:{type:{const:"integer",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/BooleanPropertySchema"}],description:"Boolean property.",properties:{type:{const:"boolean",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/MultiSelectPropertySchema"}],description:"Multi-select array property.",properties:{type:{const:"array",type:"string"}},required:["type"],type:"object"}]},ElicitationRequestScope:{description:`**UNSTABLE**
|
|
766
|
+
|
|
767
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
768
|
+
|
|
769
|
+
Request-scoped elicitation, tied to a specific JSON-RPC request outside of a session
|
|
770
|
+
(e.g., during auth/configuration phases before any session is started).`,properties:{requestId:{allOf:[{$ref:"#/$defs/RequestId"}],description:"The request this elicitation is tied to."}},required:["requestId"],type:"object"},ElicitationSchema:{description:`Type-safe elicitation schema for requesting structured user input.
|
|
771
|
+
|
|
772
|
+
This represents a JSON Schema object with primitive-typed properties,
|
|
773
|
+
as required by the elicitation specification.`,properties:{description:{description:"Optional description of what this schema represents.",type:["string","null"]},properties:{additionalProperties:{$ref:"#/$defs/ElicitationPropertySchema"},default:{},description:"Property definitions (must be primitive types).",type:"object"},required:{description:"List of required property names.",items:{type:"string"},type:["array","null"]},title:{description:"Optional title for the schema.",type:["string","null"]},type:{allOf:[{$ref:"#/$defs/ElicitationSchemaType"}],default:"object",description:'Type discriminator. Always `"object"`.'}},type:"object"},ElicitationSchemaType:{description:"Type discriminator for elicitation schemas.",oneOf:[{const:"object",description:"Object schema type.",type:"string"}]},ElicitationSessionScope:{description:`**UNSTABLE**
|
|
774
|
+
|
|
775
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
776
|
+
|
|
777
|
+
Session-scoped elicitation, optionally tied to a specific tool call.
|
|
778
|
+
|
|
779
|
+
When \`tool_call_id\` is set, the elicitation is tied to a specific tool call.
|
|
780
|
+
This is useful when an agent receives an elicitation from an MCP server
|
|
781
|
+
during a tool call and needs to redirect it to the user.`,properties:{sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session this elicitation is tied to."},toolCallId:{anyOf:[{$ref:"#/$defs/ToolCallId"},{type:"null"}],description:"Optional tool call within the session."}},required:["sessionId"],type:"object"},ElicitationStringType:{description:"Items definition for untitled multi-select enum properties.",oneOf:[{const:"string",description:"String schema type.",type:"string"}]},ElicitationUrlCapabilities:{description:`**UNSTABLE**
|
|
782
|
+
|
|
783
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
784
|
+
|
|
785
|
+
URL-based elicitation capabilities.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
786
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
787
|
+
these keys.
|
|
788
|
+
|
|
789
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},ElicitationUrlMode:{anyOf:[{allOf:[{$ref:"#/$defs/ElicitationSessionScope"}],description:"Tied to a session, optionally to a specific tool call within that session.",title:"Session"},{allOf:[{$ref:"#/$defs/ElicitationRequestScope"}],description:`Tied to a specific JSON-RPC request outside of a session
|
|
790
|
+
(e.g., during auth/configuration phases before any session is started).`,title:"Request"}],description:`**UNSTABLE**
|
|
791
|
+
|
|
792
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
793
|
+
|
|
794
|
+
URL-based elicitation mode where the client directs the user to a URL.`,properties:{elicitationId:{allOf:[{$ref:"#/$defs/ElicitationId"}],description:"The unique identifier for this elicitation."},url:{description:"The URL to direct the user to.",format:"uri",type:"string"}},required:["elicitationId","url"],type:"object"},EmbeddedResource:{description:"The contents of a resource, embedded into a prompt or tool call result.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
795
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
796
|
+
these keys.
|
|
797
|
+
|
|
798
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},annotations:{anyOf:[{$ref:"#/$defs/Annotations"},{type:"null"}]},resource:{$ref:"#/$defs/EmbeddedResourceResource"}},required:["resource"],type:"object"},EmbeddedResourceResource:{anyOf:[{allOf:[{$ref:"#/$defs/TextResourceContents"}],title:"TextResourceContents"},{allOf:[{$ref:"#/$defs/BlobResourceContents"}],title:"BlobResourceContents"}],description:"Resource content that can be embedded in a message."},EnumOption:{description:"A titled enum option with a const value and human-readable title.",properties:{const:{description:"The constant value for this option.",type:"string"},title:{description:"Human-readable title for this option.",type:"string"}},required:["const","title"],type:"object"},EnvVariable:{description:"An environment variable to set when launching an MCP server.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
799
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
800
|
+
these keys.
|
|
801
|
+
|
|
802
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},name:{description:"The name of the environment variable.",type:"string"},value:{description:"The value to set for the environment variable.",type:"string"}},required:["name","value"],type:"object"},Error:{description:`JSON-RPC error object.
|
|
803
|
+
|
|
804
|
+
Represents an error that occurred during method execution, following the
|
|
805
|
+
JSON-RPC 2.0 error object specification with optional additional data.
|
|
806
|
+
|
|
807
|
+
See protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)`,properties:{code:{allOf:[{$ref:"#/$defs/ErrorCode"}],description:`A number indicating the error type that occurred.
|
|
808
|
+
This must be an integer as defined in the JSON-RPC specification.`},data:{description:`Optional primitive or structured value that contains additional information about the error.
|
|
809
|
+
This may include debugging information or context-specific details.`},message:{description:`A string providing a short description of the error.
|
|
810
|
+
The message should be limited to a concise single sentence.`,type:"string"}},required:["code","message"],type:"object"},ErrorCode:{anyOf:[{const:-32700,description:`**Parse error**: Invalid JSON was received by the server.
|
|
811
|
+
An error occurred on the server while parsing the JSON text.`,format:"int32",title:"Parse error",type:"integer"},{const:-32600,description:"**Invalid request**: The JSON sent is not a valid Request object.",format:"int32",title:"Invalid request",type:"integer"},{const:-32601,description:"**Method not found**: The method does not exist or is not available.",format:"int32",title:"Method not found",type:"integer"},{const:-32602,description:"**Invalid params**: Invalid method parameter(s).",format:"int32",title:"Invalid params",type:"integer"},{const:-32603,description:`**Internal error**: Internal JSON-RPC error.
|
|
812
|
+
Reserved for implementation-defined server errors.`,format:"int32",title:"Internal error",type:"integer"},{const:-32800,description:`**Request cancelled**: **UNSTABLE**
|
|
813
|
+
|
|
814
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
815
|
+
|
|
816
|
+
Execution of the method was aborted either due to a cancellation request from the caller or
|
|
817
|
+
because of resource constraints or shutdown.`,format:"int32",title:"Request cancelled",type:"integer"},{const:-32e3,description:"**Authentication required**: Authentication is required before this operation can be performed.",format:"int32",title:"Authentication required",type:"integer"},{const:-32002,description:"**Resource not found**: A given resource, such as a file, was not found.",format:"int32",title:"Resource not found",type:"integer"},{const:-32042,description:`**URL elicitation required**: **UNSTABLE**
|
|
818
|
+
|
|
819
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
820
|
+
|
|
821
|
+
The agent requires user input via a URL-based elicitation before it can proceed.`,format:"int32",title:"URL elicitation required",type:"integer"},{description:"Other undefined error code.",format:"int32",title:"Other",type:"integer"}],description:`Predefined error codes for common JSON-RPC and ACP-specific errors.
|
|
822
|
+
|
|
823
|
+
These codes follow the JSON-RPC 2.0 specification for standard errors
|
|
824
|
+
and use the reserved range (-32000 to -32099) for protocol-specific errors.`},ExtNotification:{description:`Allows the Agent to send an arbitrary notification that is not part of the ACP spec.
|
|
825
|
+
Extension notifications provide a way to send one-way messages for custom functionality
|
|
826
|
+
while maintaining protocol compatibility.
|
|
827
|
+
|
|
828
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`},ExtRequest:{description:`Allows for sending an arbitrary request that is not part of the ACP spec.
|
|
829
|
+
Extension methods provide a way to add custom functionality while maintaining
|
|
830
|
+
protocol compatibility.
|
|
831
|
+
|
|
832
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`},ExtResponse:{description:`Allows for sending an arbitrary response to an [\`ExtRequest\`] that is not part of the ACP spec.
|
|
833
|
+
Extension methods provide a way to add custom functionality while maintaining
|
|
834
|
+
protocol compatibility.
|
|
835
|
+
|
|
836
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`},FileSystemCapabilities:{description:`File system capabilities that a client may support.
|
|
837
|
+
|
|
838
|
+
See protocol docs: [FileSystem](https://agentclientprotocol.com/protocol/initialization#filesystem)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
839
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
840
|
+
these keys.
|
|
841
|
+
|
|
842
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},readTextFile:{default:!1,description:"Whether the Client supports `fs/read_text_file` requests.",type:"boolean"},writeTextFile:{default:!1,description:"Whether the Client supports `fs/write_text_file` requests.",type:"boolean"}},type:"object"},ForkSessionRequest:{description:`**UNSTABLE**
|
|
843
|
+
|
|
844
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
845
|
+
|
|
846
|
+
Request parameters for forking an existing session.
|
|
847
|
+
|
|
848
|
+
Creates a new session based on the context of an existing one, allowing
|
|
849
|
+
operations like generating summaries without affecting the original session's history.
|
|
850
|
+
|
|
851
|
+
Only available if the Agent supports the \`session.fork\` capability.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
852
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
853
|
+
these keys.
|
|
854
|
+
|
|
855
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},additionalDirectories:{description:`**UNSTABLE**
|
|
856
|
+
|
|
857
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
858
|
+
|
|
859
|
+
Additional workspace roots to activate for this session. Each path must be absolute.
|
|
860
|
+
|
|
861
|
+
When omitted or empty, no additional roots are activated. When non-empty,
|
|
862
|
+
this is the complete resulting additional-root list for the forked
|
|
863
|
+
session.`,items:{type:"string"},type:"array"},cwd:{description:"The working directory for this session.",type:"string"},mcpServers:{description:"List of MCP servers to connect to for this session.",items:{$ref:"#/$defs/McpServer"},type:"array"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to fork."}},required:["sessionId","cwd"],type:"object","x-method":"session/fork","x-side":"agent"},ForkSessionResponse:{description:`**UNSTABLE**
|
|
864
|
+
|
|
865
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
866
|
+
|
|
867
|
+
Response from forking an existing session.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
868
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
869
|
+
these keys.
|
|
870
|
+
|
|
871
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},configOptions:{description:"Initial session configuration options if supported by the Agent.",items:{$ref:"#/$defs/SessionConfigOption"},type:["array","null"]},models:{anyOf:[{$ref:"#/$defs/SessionModelState"},{type:"null"}],description:`**UNSTABLE**
|
|
872
|
+
|
|
873
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
874
|
+
|
|
875
|
+
Initial model state if supported by the Agent`},modes:{anyOf:[{$ref:"#/$defs/SessionModeState"},{type:"null"}],description:`Initial mode state if supported by the Agent
|
|
876
|
+
|
|
877
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"Unique identifier for the newly created forked session."}},required:["sessionId"],type:"object","x-method":"session/fork","x-side":"agent"},HttpHeader:{description:"An HTTP header to set when making requests to the MCP server.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
878
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
879
|
+
these keys.
|
|
880
|
+
|
|
881
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},name:{description:"The name of the HTTP header.",type:"string"},value:{description:"The value to set for the HTTP header.",type:"string"}},required:["name","value"],type:"object"},ImageContent:{description:"An image provided to or from an LLM.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
882
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
883
|
+
these keys.
|
|
884
|
+
|
|
885
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},annotations:{anyOf:[{$ref:"#/$defs/Annotations"},{type:"null"}]},data:{type:"string"},mimeType:{type:"string"},uri:{type:["string","null"]}},required:["data","mimeType"],type:"object"},Implementation:{description:`Metadata about the implementation of the client or agent.
|
|
886
|
+
Describes the name and version of an MCP implementation, with an optional
|
|
887
|
+
title for UI representation.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
888
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
889
|
+
these keys.
|
|
890
|
+
|
|
891
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},name:{description:`Intended for programmatic or logical use, but can be used as a display
|
|
892
|
+
name fallback if title isn’t present.`,type:"string"},title:{description:`Intended for UI and end-user contexts — optimized to be human-readable
|
|
893
|
+
and easily understood.
|
|
894
|
+
|
|
895
|
+
If not provided, the name should be used for display.`,type:["string","null"]},version:{description:`Version of the implementation. Can be displayed to the user or used
|
|
896
|
+
for debugging or metrics purposes. (e.g. "1.0.0").`,type:"string"}},required:["name","version"],type:"object"},InitializeRequest:{description:`Request parameters for the initialize method.
|
|
897
|
+
|
|
898
|
+
Sent by the client to establish connection and negotiate capabilities.
|
|
899
|
+
|
|
900
|
+
See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
901
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
902
|
+
these keys.
|
|
903
|
+
|
|
904
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},clientCapabilities:{allOf:[{$ref:"#/$defs/ClientCapabilities"}],default:{auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1},description:"Capabilities supported by the client."},clientInfo:{anyOf:[{$ref:"#/$defs/Implementation"},{type:"null"}],description:`Information about the Client name and version sent to the Agent.
|
|
905
|
+
|
|
906
|
+
Note: in future versions of the protocol, this will be required.`},protocolVersion:{allOf:[{$ref:"#/$defs/ProtocolVersion"}],description:"The latest protocol version supported by the client."}},required:["protocolVersion"],type:"object","x-method":"initialize","x-side":"agent"},InitializeResponse:{description:`Response to the \`initialize\` method.
|
|
907
|
+
|
|
908
|
+
Contains the negotiated protocol version and agent capabilities.
|
|
909
|
+
|
|
910
|
+
See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
911
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
912
|
+
these keys.
|
|
913
|
+
|
|
914
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},agentCapabilities:{allOf:[{$ref:"#/$defs/AgentCapabilities"}],default:{auth:{},loadSession:!1,mcpCapabilities:{acp:!1,http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}},description:"Capabilities supported by the agent."},agentInfo:{anyOf:[{$ref:"#/$defs/Implementation"},{type:"null"}],description:`Information about the Agent name and version sent to the Client.
|
|
915
|
+
|
|
916
|
+
Note: in future versions of the protocol, this will be required.`},authMethods:{default:[],description:"Authentication methods supported by the agent.",items:{$ref:"#/$defs/AuthMethod"},type:"array"},protocolVersion:{allOf:[{$ref:"#/$defs/ProtocolVersion"}],description:`The protocol version the client specified if supported by the agent,
|
|
917
|
+
or the latest protocol version supported by the agent.
|
|
918
|
+
|
|
919
|
+
The client should disconnect, if it doesn't support this version.`}},required:["protocolVersion"],type:"object","x-method":"initialize","x-side":"agent"},IntegerPropertySchema:{description:"Schema for integer properties in an elicitation form.",properties:{default:{description:"Default value.",format:"int64",type:["integer","null"]},description:{description:"Human-readable description.",type:["string","null"]},maximum:{description:"Maximum value (inclusive).",format:"int64",type:["integer","null"]},minimum:{description:"Minimum value (inclusive).",format:"int64",type:["integer","null"]},title:{description:"Optional title for the property.",type:["string","null"]}},type:"object"},KillTerminalRequest:{description:"Request to kill a terminal without releasing it.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
920
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
921
|
+
these keys.
|
|
922
|
+
|
|
923
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."},terminalId:{description:"The ID of the terminal to kill.",type:"string"}},required:["sessionId","terminalId"],type:"object","x-method":"terminal/kill","x-side":"client"},KillTerminalResponse:{description:"Response to `terminal/kill` method",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
924
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
925
|
+
these keys.
|
|
926
|
+
|
|
927
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"terminal/kill","x-side":"client"},ListProvidersRequest:{description:`**UNSTABLE**
|
|
928
|
+
|
|
929
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
930
|
+
|
|
931
|
+
Request parameters for \`providers/list\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
932
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
933
|
+
these keys.
|
|
934
|
+
|
|
935
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"providers/list","x-side":"agent"},ListProvidersResponse:{description:`**UNSTABLE**
|
|
936
|
+
|
|
937
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
938
|
+
|
|
939
|
+
Response to \`providers/list\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
940
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
941
|
+
these keys.
|
|
942
|
+
|
|
943
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},providers:{description:"Configurable providers with current routing info suitable for UI display.",items:{$ref:"#/$defs/ProviderInfo"},type:"array"}},required:["providers"],type:"object","x-method":"providers/list","x-side":"agent"},ListSessionsRequest:{description:"Request parameters for listing existing sessions.\n\nOnly available if the Agent supports the `sessionCapabilities.list` capability.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
944
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
945
|
+
these keys.
|
|
946
|
+
|
|
947
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},cursor:{description:"Opaque cursor token from a previous response's nextCursor field for cursor-based pagination",type:["string","null"]},cwd:{description:"Filter sessions by working directory. Must be an absolute path.",type:["string","null"]}},type:"object","x-method":"session/list","x-side":"agent"},ListSessionsResponse:{description:"Response from listing sessions.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
948
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
949
|
+
these keys.
|
|
950
|
+
|
|
951
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},nextCursor:{description:`Opaque cursor token. If present, pass this in the next request's cursor parameter
|
|
952
|
+
to fetch the next page. If absent, there are no more results.`,type:["string","null"]},sessions:{description:"Array of session information objects",items:{$ref:"#/$defs/SessionInfo"},type:"array"}},required:["sessions"],type:"object","x-method":"session/list","x-side":"agent"},LlmProtocol:{anyOf:[{const:"anthropic",description:"Anthropic API protocol.",type:"string"},{const:"openai",description:"OpenAI API protocol.",type:"string"},{const:"azure",description:"Azure OpenAI API protocol.",type:"string"},{const:"vertex",description:"Google Vertex AI API protocol.",type:"string"},{const:"bedrock",description:"AWS Bedrock API protocol.",type:"string"},{description:"Unknown or custom protocol.",title:"other",type:"string"}],description:`**UNSTABLE**
|
|
953
|
+
|
|
954
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
955
|
+
|
|
956
|
+
Well-known API protocol identifiers for LLM providers.
|
|
957
|
+
|
|
958
|
+
Agents and clients MUST handle unknown protocol identifiers gracefully.
|
|
959
|
+
|
|
960
|
+
Protocol names beginning with \`_\` are free for custom use, like other ACP extension methods.
|
|
961
|
+
Protocol names that do not begin with \`_\` are reserved for the ACP spec.`},LoadSessionRequest:{description:`Request parameters for loading an existing session.
|
|
962
|
+
|
|
963
|
+
Only available if the Agent supports the \`loadSession\` capability.
|
|
964
|
+
|
|
965
|
+
See protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
966
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
967
|
+
these keys.
|
|
968
|
+
|
|
969
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},additionalDirectories:{description:`**UNSTABLE**
|
|
970
|
+
|
|
971
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
972
|
+
|
|
973
|
+
Additional workspace roots to activate for this session. Each path must be absolute.
|
|
974
|
+
|
|
975
|
+
When omitted or empty, no additional roots are activated. When non-empty,
|
|
976
|
+
this is the complete resulting additional-root list for the loaded
|
|
977
|
+
session. It may differ from any previously used or reported list as long as
|
|
978
|
+
the request \`cwd\` matches the session's \`cwd\`.`,items:{type:"string"},type:"array"},cwd:{description:"The working directory for this session.",type:"string"},mcpServers:{description:"List of MCP servers to connect to for this session.",items:{$ref:"#/$defs/McpServer"},type:"array"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to load."}},required:["mcpServers","cwd","sessionId"],type:"object","x-method":"session/load","x-side":"agent"},LoadSessionResponse:{description:"Response from loading an existing session.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
979
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
980
|
+
these keys.
|
|
981
|
+
|
|
982
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},configOptions:{description:"Initial session configuration options if supported by the Agent.",items:{$ref:"#/$defs/SessionConfigOption"},type:["array","null"]},models:{anyOf:[{$ref:"#/$defs/SessionModelState"},{type:"null"}],description:`**UNSTABLE**
|
|
983
|
+
|
|
984
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
985
|
+
|
|
986
|
+
Initial model state if supported by the Agent`},modes:{anyOf:[{$ref:"#/$defs/SessionModeState"},{type:"null"}],description:`Initial mode state if supported by the Agent
|
|
987
|
+
|
|
988
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`}},type:"object","x-method":"session/load","x-side":"agent"},LogoutCapabilities:{description:`**UNSTABLE**
|
|
989
|
+
|
|
990
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
991
|
+
|
|
992
|
+
Logout capabilities supported by the agent.
|
|
993
|
+
|
|
994
|
+
By supplying \`{}\` it means that the agent supports the logout method.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
995
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
996
|
+
these keys.
|
|
997
|
+
|
|
998
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},LogoutRequest:{description:`**UNSTABLE**
|
|
999
|
+
|
|
1000
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1001
|
+
|
|
1002
|
+
Request parameters for the logout method.
|
|
1003
|
+
|
|
1004
|
+
Terminates the current authenticated session.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1005
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1006
|
+
these keys.
|
|
1007
|
+
|
|
1008
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"logout","x-side":"agent"},LogoutResponse:{description:`**UNSTABLE**
|
|
1009
|
+
|
|
1010
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1011
|
+
|
|
1012
|
+
Response to the \`logout\` method.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1013
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1014
|
+
these keys.
|
|
1015
|
+
|
|
1016
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"logout","x-side":"agent"},McpCapabilities:{description:"MCP capabilities supported by the agent",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1017
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1018
|
+
these keys.
|
|
1019
|
+
|
|
1020
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},acp:{default:!1,description:`**UNSTABLE**
|
|
1021
|
+
|
|
1022
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1023
|
+
|
|
1024
|
+
Agent supports [\`McpServer::Acp\`].`,type:"boolean"},http:{default:!1,description:"Agent supports [`McpServer::Http`].",type:"boolean"},sse:{default:!1,description:"Agent supports [`McpServer::Sse`].",type:"boolean"}},type:"object"},McpConnectionId:{description:`**UNSTABLE**
|
|
1025
|
+
|
|
1026
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1027
|
+
|
|
1028
|
+
A unique identifier for an active MCP-over-ACP connection.`,type:"string"},McpServer:{anyOf:[{allOf:[{$ref:"#/$defs/McpServerHttp"}],description:"HTTP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.http` is `true`.",properties:{type:{const:"http",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/McpServerSse"}],description:"SSE transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.",properties:{type:{const:"sse",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/McpServerAcp"}],description:`**UNSTABLE**
|
|
1029
|
+
|
|
1030
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1031
|
+
|
|
1032
|
+
ACP transport configuration
|
|
1033
|
+
|
|
1034
|
+
Only available when the Agent capabilities indicate \`mcp_capabilities.acp\` is \`true\`.
|
|
1035
|
+
The MCP server is provided by an ACP component and communicates over the ACP channel.`,properties:{type:{const:"acp",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/McpServerStdio"}],description:`Stdio transport configuration
|
|
1036
|
+
|
|
1037
|
+
All Agents MUST support this transport.`,title:"stdio"}],description:`Configuration for connecting to an MCP (Model Context Protocol) server.
|
|
1038
|
+
|
|
1039
|
+
MCP servers provide tools and context that the agent can use when
|
|
1040
|
+
processing prompts.
|
|
1041
|
+
|
|
1042
|
+
See protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)`},McpServerAcp:{description:`**UNSTABLE**
|
|
1043
|
+
|
|
1044
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1045
|
+
|
|
1046
|
+
ACP transport configuration for MCP.
|
|
1047
|
+
|
|
1048
|
+
The MCP server is provided by an ACP component and communicates over the ACP channel
|
|
1049
|
+
using \`mcp/connect\`, \`mcp/message\`, and \`mcp/disconnect\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1050
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1051
|
+
these keys.
|
|
1052
|
+
|
|
1053
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},id:{allOf:[{$ref:"#/$defs/McpServerAcpId"}],description:`Unique identifier for this MCP server, generated by the component providing it.
|
|
1054
|
+
|
|
1055
|
+
Providers MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible
|
|
1056
|
+
on the same ACP connection.`},name:{description:"Human-readable name identifying this MCP server.",type:"string"}},required:["name","id"],type:"object"},McpServerAcpId:{description:`**UNSTABLE**
|
|
1057
|
+
|
|
1058
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1059
|
+
|
|
1060
|
+
Unique identifier for an MCP server using the ACP transport.
|
|
1061
|
+
|
|
1062
|
+
The value is opaque and generated by the ACP component providing the MCP server. It is
|
|
1063
|
+
used by \`mcp/connect\` to route connection requests back to the component that declared the
|
|
1064
|
+
server.`,type:"string"},McpServerHttp:{description:"HTTP transport configuration for MCP.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1065
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1066
|
+
these keys.
|
|
1067
|
+
|
|
1068
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},headers:{description:"HTTP headers to set when making requests to the MCP server.",items:{$ref:"#/$defs/HttpHeader"},type:"array"},name:{description:"Human-readable name identifying this MCP server.",type:"string"},url:{description:"URL to the MCP server.",type:"string"}},required:["name","url","headers"],type:"object"},McpServerSse:{description:"SSE transport configuration for MCP.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1069
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1070
|
+
these keys.
|
|
1071
|
+
|
|
1072
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},headers:{description:"HTTP headers to set when making requests to the MCP server.",items:{$ref:"#/$defs/HttpHeader"},type:"array"},name:{description:"Human-readable name identifying this MCP server.",type:"string"},url:{description:"URL to the MCP server.",type:"string"}},required:["name","url","headers"],type:"object"},McpServerStdio:{description:"Stdio transport configuration for MCP.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1073
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1074
|
+
these keys.
|
|
1075
|
+
|
|
1076
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},args:{description:"Command-line arguments to pass to the MCP server.",items:{type:"string"},type:"array"},command:{description:"Path to the MCP server executable.",type:"string"},env:{description:"Environment variables to set when launching the MCP server.",items:{$ref:"#/$defs/EnvVariable"},type:"array"},name:{description:"Human-readable name identifying this MCP server.",type:"string"}},required:["name","command","args","env"],type:"object"},MessageMcpNotification:{description:`**UNSTABLE**
|
|
1077
|
+
|
|
1078
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1079
|
+
|
|
1080
|
+
Notification parameters for \`mcp/message\`.
|
|
1081
|
+
|
|
1082
|
+
This is used when the wrapped MCP message is a notification and the outer JSON-RPC
|
|
1083
|
+
envelope has no \`id\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1084
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1085
|
+
these keys.
|
|
1086
|
+
|
|
1087
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},connectionId:{allOf:[{$ref:"#/$defs/McpConnectionId"}],description:"The MCP-over-ACP connection this message is sent on."},method:{description:"The inner MCP method name.",type:"string"},params:{additionalProperties:!0,description:"Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.",type:["object","null"]}},required:["connectionId","method"],type:"object","x-method":"mcp/message","x-side":"both"},MessageMcpRequest:{description:`**UNSTABLE**
|
|
1088
|
+
|
|
1089
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1090
|
+
|
|
1091
|
+
Request parameters for \`mcp/message\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1092
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1093
|
+
these keys.
|
|
1094
|
+
|
|
1095
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},connectionId:{allOf:[{$ref:"#/$defs/McpConnectionId"}],description:"The MCP-over-ACP connection this message is sent on."},method:{description:"The inner MCP method name.",type:"string"},params:{additionalProperties:!0,description:"Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.",type:["object","null"]}},required:["connectionId","method"],type:"object","x-method":"mcp/message","x-side":"both"},MessageMcpResponse:{description:`**UNSTABLE**
|
|
1096
|
+
|
|
1097
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1098
|
+
|
|
1099
|
+
Response to \`mcp/message\`.
|
|
1100
|
+
|
|
1101
|
+
This is the inner MCP response result payload. Any JSON value is valid.`,"x-method":"mcp/message","x-side":"both"},ModelId:{description:`**UNSTABLE**
|
|
1102
|
+
|
|
1103
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1104
|
+
|
|
1105
|
+
A unique identifier for a model.`,type:"string"},ModelInfo:{description:`**UNSTABLE**
|
|
1106
|
+
|
|
1107
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1108
|
+
|
|
1109
|
+
Information about a selectable model.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1110
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1111
|
+
these keys.
|
|
1112
|
+
|
|
1113
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},description:{description:"Optional description of the model.",type:["string","null"]},modelId:{allOf:[{$ref:"#/$defs/ModelId"}],description:"Unique identifier for the model."},name:{description:"Human-readable name of the model.",type:"string"}},required:["modelId","name"],type:"object"},MultiSelectItems:{anyOf:[{allOf:[{$ref:"#/$defs/UntitledMultiSelectItems"}],description:"Untitled multi-select items with plain string values.",title:"Untitled"},{allOf:[{$ref:"#/$defs/TitledMultiSelectItems"}],description:"Titled multi-select items with human-readable labels.",title:"Titled"}],description:"Items for a multi-select (array) property schema."},MultiSelectPropertySchema:{description:"Schema for multi-select (array) properties in an elicitation form.",properties:{default:{description:"Default selected values.",items:{type:"string"},type:["array","null"]},description:{description:"Human-readable description.",type:["string","null"]},items:{allOf:[{$ref:"#/$defs/MultiSelectItems"}],description:"The items definition describing allowed values."},maxItems:{description:"Maximum number of items to select.",format:"uint64",minimum:0,type:["integer","null"]},minItems:{description:"Minimum number of items to select.",format:"uint64",minimum:0,type:["integer","null"]},title:{description:"Optional title for the property.",type:["string","null"]}},required:["items"],type:"object"},NesCapabilities:{description:"NES capabilities advertised by the agent during initialization.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1114
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1115
|
+
these keys.
|
|
1116
|
+
|
|
1117
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},context:{anyOf:[{$ref:"#/$defs/NesContextCapabilities"},{type:"null"}],description:"Context the agent wants attached to each suggestion request."},events:{anyOf:[{$ref:"#/$defs/NesEventCapabilities"},{type:"null"}],description:"Events the agent wants to receive."}},type:"object"},NesContextCapabilities:{description:"Context capabilities the agent wants attached to each suggestion request.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1118
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1119
|
+
these keys.
|
|
1120
|
+
|
|
1121
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},diagnostics:{anyOf:[{$ref:"#/$defs/NesDiagnosticsCapabilities"},{type:"null"}],description:"Whether the agent wants diagnostics context."},editHistory:{anyOf:[{$ref:"#/$defs/NesEditHistoryCapabilities"},{type:"null"}],description:"Whether the agent wants edit history context."},openFiles:{anyOf:[{$ref:"#/$defs/NesOpenFilesCapabilities"},{type:"null"}],description:"Whether the agent wants open files context."},recentFiles:{anyOf:[{$ref:"#/$defs/NesRecentFilesCapabilities"},{type:"null"}],description:"Whether the agent wants recent files context."},relatedSnippets:{anyOf:[{$ref:"#/$defs/NesRelatedSnippetsCapabilities"},{type:"null"}],description:"Whether the agent wants related snippets context."},userActions:{anyOf:[{$ref:"#/$defs/NesUserActionsCapabilities"},{type:"null"}],description:"Whether the agent wants user actions context."}},type:"object"},NesDiagnostic:{description:"A diagnostic (error, warning, etc.).",properties:{message:{description:"The diagnostic message.",type:"string"},range:{allOf:[{$ref:"#/$defs/Range"}],description:"The range of the diagnostic."},severity:{allOf:[{$ref:"#/$defs/NesDiagnosticSeverity"}],description:"The severity of the diagnostic."},uri:{description:"The URI of the file containing the diagnostic.",type:"string"}},required:["uri","range","severity","message"],type:"object"},NesDiagnosticSeverity:{description:"Severity of a diagnostic.",oneOf:[{const:"error",description:"An error.",type:"string"},{const:"warning",description:"A warning.",type:"string"},{const:"information",description:"An informational message.",type:"string"},{const:"hint",description:"A hint.",type:"string"}]},NesDiagnosticsCapabilities:{description:"Capabilities for diagnostics context.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1122
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1123
|
+
these keys.
|
|
1124
|
+
|
|
1125
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesDocumentDidChangeCapabilities:{description:"Capabilities for `document/didChange` events.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1126
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1127
|
+
these keys.
|
|
1128
|
+
|
|
1129
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},syncKind:{allOf:[{$ref:"#/$defs/TextDocumentSyncKind"}],description:'The sync kind the agent wants: `"full"` or `"incremental"`.'}},required:["syncKind"],type:"object"},NesDocumentDidCloseCapabilities:{description:"Marker for `document/didClose` capability support.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1130
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1131
|
+
these keys.
|
|
1132
|
+
|
|
1133
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesDocumentDidFocusCapabilities:{description:"Marker for `document/didFocus` capability support.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1134
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1135
|
+
these keys.
|
|
1136
|
+
|
|
1137
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesDocumentDidOpenCapabilities:{description:"Marker for `document/didOpen` capability support.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1138
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1139
|
+
these keys.
|
|
1140
|
+
|
|
1141
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesDocumentDidSaveCapabilities:{description:"Marker for `document/didSave` capability support.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1142
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1143
|
+
these keys.
|
|
1144
|
+
|
|
1145
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesDocumentEventCapabilities:{description:"Document event capabilities the agent wants to receive.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1146
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1147
|
+
these keys.
|
|
1148
|
+
|
|
1149
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},didChange:{anyOf:[{$ref:"#/$defs/NesDocumentDidChangeCapabilities"},{type:"null"}],description:"Whether the agent wants `document/didChange` events, and the sync kind."},didClose:{anyOf:[{$ref:"#/$defs/NesDocumentDidCloseCapabilities"},{type:"null"}],description:"Whether the agent wants `document/didClose` events."},didFocus:{anyOf:[{$ref:"#/$defs/NesDocumentDidFocusCapabilities"},{type:"null"}],description:"Whether the agent wants `document/didFocus` events."},didOpen:{anyOf:[{$ref:"#/$defs/NesDocumentDidOpenCapabilities"},{type:"null"}],description:"Whether the agent wants `document/didOpen` events."},didSave:{anyOf:[{$ref:"#/$defs/NesDocumentDidSaveCapabilities"},{type:"null"}],description:"Whether the agent wants `document/didSave` events."}},type:"object"},NesEditHistoryCapabilities:{description:"Capabilities for edit history context.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1150
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1151
|
+
these keys.
|
|
1152
|
+
|
|
1153
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},maxCount:{description:"Maximum number of edit history entries the agent can use.",format:"uint32",minimum:0,type:["integer","null"]}},type:"object"},NesEditHistoryEntry:{description:"An entry in the edit history.",properties:{diff:{description:"A diff representing the edit.",type:"string"},uri:{description:"The URI of the edited file.",type:"string"}},required:["uri","diff"],type:"object"},NesEditSuggestion:{description:"A text edit suggestion.",properties:{cursorPosition:{anyOf:[{$ref:"#/$defs/Position"},{type:"null"}],description:"Optional suggested cursor position after applying edits."},edits:{description:"The text edits to apply.",items:{$ref:"#/$defs/NesTextEdit"},type:"array"},id:{description:"Unique identifier for accept/reject tracking.",type:"string"},uri:{description:"The URI of the file to edit.",type:"string"}},required:["id","uri","edits"],type:"object"},NesEventCapabilities:{description:"Event capabilities the agent can consume.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1154
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1155
|
+
these keys.
|
|
1156
|
+
|
|
1157
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},document:{anyOf:[{$ref:"#/$defs/NesDocumentEventCapabilities"},{type:"null"}],description:"Document event capabilities."}},type:"object"},NesExcerpt:{description:"A code excerpt from a file.",properties:{endLine:{description:"The end line of the excerpt (zero-based).",format:"uint32",minimum:0,type:"integer"},startLine:{description:"The start line of the excerpt (zero-based).",format:"uint32",minimum:0,type:"integer"},text:{description:"The text content of the excerpt.",type:"string"}},required:["startLine","endLine","text"],type:"object"},NesJumpCapabilities:{description:"Marker for jump suggestion support.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1158
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1159
|
+
these keys.
|
|
1160
|
+
|
|
1161
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesJumpSuggestion:{description:"A jump-to-location suggestion.",properties:{id:{description:"Unique identifier for accept/reject tracking.",type:"string"},position:{allOf:[{$ref:"#/$defs/Position"}],description:"The target position within the file."},uri:{description:"The file to navigate to.",type:"string"}},required:["id","uri","position"],type:"object"},NesOpenFile:{description:"An open file in the editor.",properties:{languageId:{description:"The language identifier.",type:"string"},lastFocusedMs:{description:"Timestamp in milliseconds since epoch of when the file was last focused.",format:"uint64",minimum:0,type:["integer","null"]},uri:{description:"The URI of the file.",type:"string"},visibleRange:{anyOf:[{$ref:"#/$defs/Range"},{type:"null"}],description:"The visible range in the editor, if any."}},required:["uri","languageId"],type:"object"},NesOpenFilesCapabilities:{description:"Capabilities for open files context.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1162
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1163
|
+
these keys.
|
|
1164
|
+
|
|
1165
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesRecentFile:{description:"A recently accessed file.",properties:{languageId:{description:"The language identifier.",type:"string"},text:{description:"The full text content of the file.",type:"string"},uri:{description:"The URI of the file.",type:"string"}},required:["uri","languageId","text"],type:"object"},NesRecentFilesCapabilities:{description:"Capabilities for recent files context.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1166
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1167
|
+
these keys.
|
|
1168
|
+
|
|
1169
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},maxCount:{description:"Maximum number of recent files the agent can use.",format:"uint32",minimum:0,type:["integer","null"]}},type:"object"},NesRejectReason:{description:"The reason a suggestion was rejected.",oneOf:[{const:"rejected",description:"The user explicitly dismissed the suggestion.",type:"string"},{const:"ignored",description:"The suggestion was shown but the user continued editing without interacting.",type:"string"},{const:"replaced",description:"The suggestion was superseded by a newer suggestion.",type:"string"},{const:"cancelled",description:"The request was cancelled before the agent returned a response.",type:"string"}]},NesRelatedSnippet:{description:"A related code snippet from a file.",properties:{excerpts:{description:"The code excerpts.",items:{$ref:"#/$defs/NesExcerpt"},type:"array"},uri:{description:"The URI of the file containing the snippets.",type:"string"}},required:["uri","excerpts"],type:"object"},NesRelatedSnippetsCapabilities:{description:"Capabilities for related snippets context.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1170
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1171
|
+
these keys.
|
|
1172
|
+
|
|
1173
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesRenameCapabilities:{description:"Marker for rename suggestion support.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1174
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1175
|
+
these keys.
|
|
1176
|
+
|
|
1177
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesRenameSuggestion:{description:"A rename symbol suggestion.",properties:{id:{description:"Unique identifier for accept/reject tracking.",type:"string"},newName:{description:"The new name for the symbol.",type:"string"},position:{allOf:[{$ref:"#/$defs/Position"}],description:"The position of the symbol to rename."},uri:{description:"The file URI containing the symbol.",type:"string"}},required:["id","uri","position","newName"],type:"object"},NesRepository:{description:"Repository metadata for an NES session.",properties:{name:{description:"The repository name.",type:"string"},owner:{description:"The repository owner.",type:"string"},remoteUrl:{description:"The remote URL of the repository.",type:"string"}},required:["name","owner","remoteUrl"],type:"object"},NesSearchAndReplaceCapabilities:{description:"Marker for search and replace suggestion support.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1178
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1179
|
+
these keys.
|
|
1180
|
+
|
|
1181
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},NesSearchAndReplaceSuggestion:{description:"A search-and-replace suggestion.",properties:{id:{description:"Unique identifier for accept/reject tracking.",type:"string"},isRegex:{description:"Whether `search` is a regular expression. Defaults to `false`.",type:["boolean","null"]},replace:{description:"The replacement text.",type:"string"},search:{description:"The text or pattern to find.",type:"string"},uri:{description:"The file URI to search within.",type:"string"}},required:["id","uri","search","replace"],type:"object"},NesSuggestContext:{description:"Context attached to a suggestion request.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1182
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1183
|
+
these keys.
|
|
1184
|
+
|
|
1185
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},diagnostics:{description:"Current diagnostics (errors, warnings).",items:{$ref:"#/$defs/NesDiagnostic"},type:["array","null"]},editHistory:{description:"Recent edit history.",items:{$ref:"#/$defs/NesEditHistoryEntry"},type:["array","null"]},openFiles:{description:"Currently open files in the editor.",items:{$ref:"#/$defs/NesOpenFile"},type:["array","null"]},recentFiles:{description:"Recently accessed files.",items:{$ref:"#/$defs/NesRecentFile"},type:["array","null"]},relatedSnippets:{description:"Related code snippets.",items:{$ref:"#/$defs/NesRelatedSnippet"},type:["array","null"]},userActions:{description:"Recent user actions (typing, navigation, etc.).",items:{$ref:"#/$defs/NesUserAction"},type:["array","null"]}},type:"object"},NesSuggestion:{description:"A suggestion returned by the agent.",discriminator:{propertyName:"kind"},oneOf:[{allOf:[{$ref:"#/$defs/NesEditSuggestion"}],description:"A text edit suggestion.",properties:{kind:{const:"edit",type:"string"}},required:["kind"],type:"object"},{allOf:[{$ref:"#/$defs/NesJumpSuggestion"}],description:"A jump-to-location suggestion.",properties:{kind:{const:"jump",type:"string"}},required:["kind"],type:"object"},{allOf:[{$ref:"#/$defs/NesRenameSuggestion"}],description:"A rename symbol suggestion.",properties:{kind:{const:"rename",type:"string"}},required:["kind"],type:"object"},{allOf:[{$ref:"#/$defs/NesSearchAndReplaceSuggestion"}],description:"A search-and-replace suggestion.",properties:{kind:{const:"searchAndReplace",type:"string"}},required:["kind"],type:"object"}]},NesTextEdit:{description:"A text edit within a suggestion.",properties:{newText:{description:"The replacement text.",type:"string"},range:{allOf:[{$ref:"#/$defs/Range"}],description:"The range to replace."}},required:["range","newText"],type:"object"},NesTriggerKind:{description:"What triggered the suggestion request.",oneOf:[{const:"automatic",description:"Triggered by user typing or cursor movement.",type:"string"},{const:"diagnostic",description:"Triggered by a diagnostic appearing at or near the cursor.",type:"string"},{const:"manual",description:"Triggered by an explicit user action (keyboard shortcut).",type:"string"}]},NesUserAction:{description:"A user action (typing, cursor movement, etc.).",properties:{action:{description:'The kind of action (e.g., "insertChar", "cursorMovement").',type:"string"},position:{allOf:[{$ref:"#/$defs/Position"}],description:"The position where the action occurred."},timestampMs:{description:"Timestamp in milliseconds since epoch.",format:"uint64",minimum:0,type:"integer"},uri:{description:"The URI of the file where the action occurred.",type:"string"}},required:["action","uri","position","timestampMs"],type:"object"},NesUserActionsCapabilities:{description:"Capabilities for user actions context.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1186
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1187
|
+
these keys.
|
|
1188
|
+
|
|
1189
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},maxCount:{description:"Maximum number of user actions the agent can use.",format:"uint32",minimum:0,type:["integer","null"]}},type:"object"},NewSessionRequest:{description:`Request parameters for creating a new session.
|
|
1190
|
+
|
|
1191
|
+
See protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1192
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1193
|
+
these keys.
|
|
1194
|
+
|
|
1195
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},additionalDirectories:{description:`**UNSTABLE**
|
|
1196
|
+
|
|
1197
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1198
|
+
|
|
1199
|
+
Additional workspace roots for this session. Each path must be absolute.
|
|
1200
|
+
|
|
1201
|
+
These expand the session's filesystem scope without changing \`cwd\`, which
|
|
1202
|
+
remains the base for relative paths. When omitted or empty, no
|
|
1203
|
+
additional roots are activated for the new session.`,items:{type:"string"},type:"array"},cwd:{description:"The working directory for this session. Must be an absolute path.",type:"string"},mcpServers:{description:"List of MCP (Model Context Protocol) servers the agent should connect to.",items:{$ref:"#/$defs/McpServer"},type:"array"}},required:["cwd","mcpServers"],type:"object","x-method":"session/new","x-side":"agent"},NewSessionResponse:{description:`Response from creating a new session.
|
|
1204
|
+
|
|
1205
|
+
See protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1206
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1207
|
+
these keys.
|
|
1208
|
+
|
|
1209
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},configOptions:{description:"Initial session configuration options if supported by the Agent.",items:{$ref:"#/$defs/SessionConfigOption"},type:["array","null"]},models:{anyOf:[{$ref:"#/$defs/SessionModelState"},{type:"null"}],description:`**UNSTABLE**
|
|
1210
|
+
|
|
1211
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1212
|
+
|
|
1213
|
+
Initial model state if supported by the Agent`},modes:{anyOf:[{$ref:"#/$defs/SessionModeState"},{type:"null"}],description:`Initial mode state if supported by the Agent
|
|
1214
|
+
|
|
1215
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:`Unique identifier for the created session.
|
|
1216
|
+
|
|
1217
|
+
Used in all subsequent requests for this conversation.`}},required:["sessionId"],type:"object","x-method":"session/new","x-side":"agent"},NumberPropertySchema:{description:"Schema for number (floating-point) properties in an elicitation form.",properties:{default:{description:"Default value.",format:"double",type:["number","null"]},description:{description:"Human-readable description.",type:["string","null"]},maximum:{description:"Maximum value (inclusive).",format:"double",type:["number","null"]},minimum:{description:"Minimum value (inclusive).",format:"double",type:["number","null"]},title:{description:"Optional title for the property.",type:["string","null"]}},type:"object"},PermissionOption:{description:"An option presented to the user when requesting permission.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1218
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1219
|
+
these keys.
|
|
1220
|
+
|
|
1221
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},kind:{allOf:[{$ref:"#/$defs/PermissionOptionKind"}],description:"Hint about the nature of this permission option."},name:{description:"Human-readable label to display to the user.",type:"string"},optionId:{allOf:[{$ref:"#/$defs/PermissionOptionId"}],description:"Unique identifier for this permission option."}},required:["optionId","name","kind"],type:"object"},PermissionOptionId:{description:"Unique identifier for a permission option.",type:"string"},PermissionOptionKind:{description:`The type of permission option being presented to the user.
|
|
1222
|
+
|
|
1223
|
+
Helps clients choose appropriate icons and UI treatment.`,oneOf:[{const:"allow_once",description:"Allow this operation only this time.",type:"string"},{const:"allow_always",description:"Allow this operation and remember the choice.",type:"string"},{const:"reject_once",description:"Reject this operation only this time.",type:"string"},{const:"reject_always",description:"Reject this operation and remember the choice.",type:"string"}]},Plan:{description:`An execution plan for accomplishing complex tasks.
|
|
1224
|
+
|
|
1225
|
+
Plans consist of multiple entries representing individual tasks or goals.
|
|
1226
|
+
Agents report plans to clients to provide visibility into their execution strategy.
|
|
1227
|
+
Plans can evolve during execution as the agent discovers new requirements or completes tasks.
|
|
1228
|
+
|
|
1229
|
+
See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1230
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1231
|
+
these keys.
|
|
1232
|
+
|
|
1233
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},entries:{description:`The list of tasks to be accomplished.
|
|
1234
|
+
|
|
1235
|
+
When updating a plan, the agent must send a complete list of all entries
|
|
1236
|
+
with their current status. The client replaces the entire plan with each update.`,items:{$ref:"#/$defs/PlanEntry"},type:"array"}},required:["entries"],type:"object"},PlanEntry:{description:`A single entry in the execution plan.
|
|
1237
|
+
|
|
1238
|
+
Represents a task or goal that the assistant intends to accomplish
|
|
1239
|
+
as part of fulfilling the user's request.
|
|
1240
|
+
See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1241
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1242
|
+
these keys.
|
|
1243
|
+
|
|
1244
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},content:{description:"Human-readable description of what this task aims to accomplish.",type:"string"},priority:{allOf:[{$ref:"#/$defs/PlanEntryPriority"}],description:`The relative importance of this task.
|
|
1245
|
+
Used to indicate which tasks are most critical to the overall goal.`},status:{allOf:[{$ref:"#/$defs/PlanEntryStatus"}],description:"Current execution status of this task."}},required:["content","priority","status"],type:"object"},PlanEntryPriority:{description:`Priority levels for plan entries.
|
|
1246
|
+
|
|
1247
|
+
Used to indicate the relative importance or urgency of different
|
|
1248
|
+
tasks in the execution plan.
|
|
1249
|
+
See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)`,oneOf:[{const:"high",description:"High priority task - critical to the overall goal.",type:"string"},{const:"medium",description:"Medium priority task - important but not critical.",type:"string"},{const:"low",description:"Low priority task - nice to have but not essential.",type:"string"}]},PlanEntryStatus:{description:`Status of a plan entry in the execution flow.
|
|
1250
|
+
|
|
1251
|
+
Tracks the lifecycle of each task from planning through completion.
|
|
1252
|
+
See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)`,oneOf:[{const:"pending",description:"The task has not started yet.",type:"string"},{const:"in_progress",description:"The task is currently being worked on.",type:"string"},{const:"completed",description:"The task has been successfully completed.",type:"string"}]},Position:{description:"A zero-based position in a text document.\n\nThe meaning of `character` depends on the negotiated position encoding.",properties:{character:{description:"Zero-based character offset (encoding-dependent).",format:"uint32",minimum:0,type:"integer"},line:{description:"Zero-based line number.",format:"uint32",minimum:0,type:"integer"}},required:["line","character"],type:"object"},PositionEncodingKind:{description:`The encoding used for character offsets in positions.
|
|
1253
|
+
|
|
1254
|
+
Follows the same conventions as LSP 3.17. The default is UTF-16.`,oneOf:[{const:"utf-16",description:"Character offsets count UTF-16 code units. This is the default.",type:"string"},{const:"utf-32",description:"Character offsets count Unicode code points.",type:"string"},{const:"utf-8",description:"Character offsets count UTF-8 code units (bytes).",type:"string"}]},PromptCapabilities:{description:`Prompt capabilities supported by the agent in \`session/prompt\` requests.
|
|
1255
|
+
|
|
1256
|
+
Baseline agent functionality requires support for [\`ContentBlock::Text\`]
|
|
1257
|
+
and [\`ContentBlock::ResourceLink\`] in prompt requests.
|
|
1258
|
+
|
|
1259
|
+
Other variants must be explicitly opted in to.
|
|
1260
|
+
Capabilities for different types of content in prompt requests.
|
|
1261
|
+
|
|
1262
|
+
Indicates which content types beyond the baseline (text and resource links)
|
|
1263
|
+
the agent can process.
|
|
1264
|
+
|
|
1265
|
+
See protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1266
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1267
|
+
these keys.
|
|
1268
|
+
|
|
1269
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},audio:{default:!1,description:"Agent supports [`ContentBlock::Audio`].",type:"boolean"},embeddedContext:{default:!1,description:"Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.",type:"boolean"},image:{default:!1,description:"Agent supports [`ContentBlock::Image`].",type:"boolean"}},type:"object"},PromptRequest:{description:`Request parameters for sending a user prompt to the agent.
|
|
1270
|
+
|
|
1271
|
+
Contains the user's message and any additional context.
|
|
1272
|
+
|
|
1273
|
+
See protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1274
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1275
|
+
these keys.
|
|
1276
|
+
|
|
1277
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},messageId:{description:`**UNSTABLE**
|
|
1278
|
+
|
|
1279
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1280
|
+
|
|
1281
|
+
A client-generated unique identifier for this user message.
|
|
1282
|
+
|
|
1283
|
+
If provided, the Agent SHOULD echo this value as \`userMessageId\` in the
|
|
1284
|
+
[\`PromptResponse\`] to confirm it was recorded.
|
|
1285
|
+
Both clients and agents MUST use UUID format for message IDs.`,type:["string","null"]},prompt:{description:"The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to.",items:{$ref:"#/$defs/ContentBlock"},type:"array"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to send this user message to"}},required:["sessionId","prompt"],type:"object","x-method":"session/prompt","x-side":"agent"},PromptResponse:{description:`Response from processing a user prompt.
|
|
1286
|
+
|
|
1287
|
+
See protocol docs: [Check for Completion](https://agentclientprotocol.com/protocol/prompt-turn#4-check-for-completion)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1288
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1289
|
+
these keys.
|
|
1290
|
+
|
|
1291
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},stopReason:{allOf:[{$ref:"#/$defs/StopReason"}],description:"Indicates why the agent stopped processing the turn."},usage:{anyOf:[{$ref:"#/$defs/Usage"},{type:"null"}],description:`**UNSTABLE**
|
|
1292
|
+
|
|
1293
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1294
|
+
|
|
1295
|
+
Token usage for this turn (optional).`},userMessageId:{description:`**UNSTABLE**
|
|
1296
|
+
|
|
1297
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1298
|
+
|
|
1299
|
+
The acknowledged user message ID.
|
|
1300
|
+
|
|
1301
|
+
If the client provided a \`messageId\` in the [\`PromptRequest\`], the agent echoes it here
|
|
1302
|
+
to confirm it was recorded. If the client did not provide one, the agent MAY assign one
|
|
1303
|
+
and return it here. Absence of this field indicates the agent did not record a message ID.`,type:["string","null"]}},required:["stopReason"],type:"object","x-method":"session/prompt","x-side":"agent"},ProtocolVersion:{description:`Protocol version identifier.
|
|
1304
|
+
|
|
1305
|
+
This version is only bumped for breaking changes.
|
|
1306
|
+
Non-breaking changes should be introduced via capabilities.`,format:"uint16",maximum:65535,minimum:0,type:"integer"},ProviderCurrentConfig:{description:`**UNSTABLE**
|
|
1307
|
+
|
|
1308
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1309
|
+
|
|
1310
|
+
Current effective non-secret routing configuration for a provider.`,properties:{apiType:{allOf:[{$ref:"#/$defs/LlmProtocol"}],description:"Protocol currently used by this provider."},baseUrl:{description:"Base URL currently used by this provider.",type:"string"}},required:["apiType","baseUrl"],type:"object"},ProviderInfo:{description:`**UNSTABLE**
|
|
1311
|
+
|
|
1312
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1313
|
+
|
|
1314
|
+
Information about a configurable LLM provider.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1315
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1316
|
+
these keys.
|
|
1317
|
+
|
|
1318
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},current:{anyOf:[{$ref:"#/$defs/ProviderCurrentConfig"},{type:"null"}],description:`Current effective non-secret routing config.
|
|
1319
|
+
Null or omitted means provider is disabled.`},id:{description:'Provider identifier, for example "main" or "openai".',type:"string"},required:{description:"Whether this provider is mandatory and cannot be disabled via `providers/disable`.\nIf true, clients must not call `providers/disable` for this id.",type:"boolean"},supported:{description:"Supported protocol types for this provider.",items:{$ref:"#/$defs/LlmProtocol"},type:"array"}},required:["id","supported","required"],type:"object"},ProvidersCapabilities:{description:`**UNSTABLE**
|
|
1320
|
+
|
|
1321
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1322
|
+
|
|
1323
|
+
Provider configuration capabilities supported by the agent.
|
|
1324
|
+
|
|
1325
|
+
By supplying \`{}\` it means that the agent supports provider configuration methods.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1326
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1327
|
+
these keys.
|
|
1328
|
+
|
|
1329
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},Range:{description:"A range in a text document, expressed as start and end positions.",properties:{end:{allOf:[{$ref:"#/$defs/Position"}],description:"The end position (exclusive)."},start:{allOf:[{$ref:"#/$defs/Position"}],description:"The start position (inclusive)."}},required:["start","end"],type:"object"},ReadTextFileRequest:{description:"Request to read content from a text file.\n\nOnly available if the client supports the `fs.readTextFile` capability.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1330
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1331
|
+
these keys.
|
|
1332
|
+
|
|
1333
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},limit:{description:"Maximum number of lines to read.",format:"uint32",minimum:0,type:["integer","null"]},line:{description:"Line number to start reading from (1-based).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Absolute path to the file to read.",type:"string"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."}},required:["sessionId","path"],type:"object","x-method":"fs/read_text_file","x-side":"client"},ReadTextFileResponse:{description:"Response containing the contents of a text file.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1334
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1335
|
+
these keys.
|
|
1336
|
+
|
|
1337
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},content:{type:"string"}},required:["content"],type:"object","x-method":"fs/read_text_file","x-side":"client"},RejectNesNotification:{description:"Notification sent when a suggestion is rejected.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1338
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1339
|
+
these keys.
|
|
1340
|
+
|
|
1341
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},id:{description:"The ID of the rejected suggestion.",type:"string"},reason:{anyOf:[{$ref:"#/$defs/NesRejectReason"},{type:"null"}],description:"The reason for rejection."},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this notification."}},required:["sessionId","id"],type:"object","x-method":"nes/reject","x-side":"agent"},ReleaseTerminalRequest:{description:"Request to release a terminal and free its resources.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1342
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1343
|
+
these keys.
|
|
1344
|
+
|
|
1345
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."},terminalId:{description:"The ID of the terminal to release.",type:"string"}},required:["sessionId","terminalId"],type:"object","x-method":"terminal/release","x-side":"client"},ReleaseTerminalResponse:{description:"Response to terminal/release method",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1346
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1347
|
+
these keys.
|
|
1348
|
+
|
|
1349
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"terminal/release","x-side":"client"},RequestId:{anyOf:[{title:"Null",type:"null"},{format:"int64",title:"Number",type:"integer"},{title:"Str",type:"string"}],description:`JSON RPC Request Id
|
|
1350
|
+
|
|
1351
|
+
An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]
|
|
1352
|
+
|
|
1353
|
+
The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.
|
|
1354
|
+
|
|
1355
|
+
\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.
|
|
1356
|
+
|
|
1357
|
+
\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions.`},RequestPermissionOutcome:{description:"The outcome of a permission request.",discriminator:{propertyName:"outcome"},oneOf:[{description:"The prompt turn was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel an ongoing\nprompt turn, it MUST respond to all pending `session/request_permission`\nrequests with this `Cancelled` outcome.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)",properties:{outcome:{const:"cancelled",type:"string"}},required:["outcome"],type:"object"},{allOf:[{$ref:"#/$defs/SelectedPermissionOutcome"}],description:"The user selected one of the provided options.",properties:{outcome:{const:"selected",type:"string"}},required:["outcome"],type:"object"}]},RequestPermissionRequest:{description:`Request for user permission to execute a tool call.
|
|
1358
|
+
|
|
1359
|
+
Sent when the agent needs authorization before performing a sensitive operation.
|
|
1360
|
+
|
|
1361
|
+
See protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1362
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1363
|
+
these keys.
|
|
1364
|
+
|
|
1365
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},options:{description:"Available permission options for the user to choose from.",items:{$ref:"#/$defs/PermissionOption"},type:"array"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."},toolCall:{allOf:[{$ref:"#/$defs/ToolCallUpdate"}],description:"Details about the tool call requiring permission."}},required:["sessionId","toolCall","options"],type:"object","x-method":"session/request_permission","x-side":"client"},RequestPermissionResponse:{description:"Response to a permission request.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1366
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1367
|
+
these keys.
|
|
1368
|
+
|
|
1369
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},outcome:{allOf:[{$ref:"#/$defs/RequestPermissionOutcome"}],description:"The user's decision on the permission request."}},required:["outcome"],type:"object","x-method":"session/request_permission","x-side":"client"},ResourceLink:{description:"A resource that the server is capable of reading, included in a prompt or tool call result.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1370
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1371
|
+
these keys.
|
|
1372
|
+
|
|
1373
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},annotations:{anyOf:[{$ref:"#/$defs/Annotations"},{type:"null"}]},description:{type:["string","null"]},mimeType:{type:["string","null"]},name:{type:"string"},size:{format:"int64",type:["integer","null"]},title:{type:["string","null"]},uri:{type:"string"}},required:["name","uri"],type:"object"},ResumeSessionRequest:{description:`Request parameters for resuming an existing session.
|
|
1374
|
+
|
|
1375
|
+
Resumes an existing session without returning previous messages (unlike \`session/load\`).
|
|
1376
|
+
This is useful for agents that can resume sessions but don't implement full session loading.
|
|
1377
|
+
|
|
1378
|
+
Only available if the Agent supports the \`sessionCapabilities.resume\` capability.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1379
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1380
|
+
these keys.
|
|
1381
|
+
|
|
1382
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},additionalDirectories:{description:`**UNSTABLE**
|
|
1383
|
+
|
|
1384
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1385
|
+
|
|
1386
|
+
Additional workspace roots to activate for this session. Each path must be absolute.
|
|
1387
|
+
|
|
1388
|
+
When omitted or empty, no additional roots are activated. When non-empty,
|
|
1389
|
+
this is the complete resulting additional-root list for the resumed
|
|
1390
|
+
session. It may differ from any previously used or reported list as long as
|
|
1391
|
+
the request \`cwd\` matches the session's \`cwd\`.`,items:{type:"string"},type:"array"},cwd:{description:"The working directory for this session.",type:"string"},mcpServers:{description:"List of MCP servers to connect to for this session.",items:{$ref:"#/$defs/McpServer"},type:"array"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to resume."}},required:["sessionId","cwd"],type:"object","x-method":"session/resume","x-side":"agent"},ResumeSessionResponse:{description:"Response from resuming an existing session.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1392
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1393
|
+
these keys.
|
|
1394
|
+
|
|
1395
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},configOptions:{description:"Initial session configuration options if supported by the Agent.",items:{$ref:"#/$defs/SessionConfigOption"},type:["array","null"]},models:{anyOf:[{$ref:"#/$defs/SessionModelState"},{type:"null"}],description:`**UNSTABLE**
|
|
1396
|
+
|
|
1397
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1398
|
+
|
|
1399
|
+
Initial model state if supported by the Agent`},modes:{anyOf:[{$ref:"#/$defs/SessionModeState"},{type:"null"}],description:`Initial mode state if supported by the Agent
|
|
1400
|
+
|
|
1401
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`}},type:"object","x-method":"session/resume","x-side":"agent"},Role:{description:"The sender or recipient of messages and data in a conversation.",enum:["assistant","user"],type:"string"},SelectedPermissionOutcome:{description:"The user selected one of the provided options.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1402
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1403
|
+
these keys.
|
|
1404
|
+
|
|
1405
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},optionId:{allOf:[{$ref:"#/$defs/PermissionOptionId"}],description:"The ID of the option the user selected."}},required:["optionId"],type:"object"},SessionAdditionalDirectoriesCapabilities:{description:`**UNSTABLE**
|
|
1406
|
+
|
|
1407
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1408
|
+
|
|
1409
|
+
Capabilities for additional session directories support.
|
|
1410
|
+
|
|
1411
|
+
By supplying \`{}\` it means that the agent supports the \`additionalDirectories\`
|
|
1412
|
+
field on supported session lifecycle requests. Agents that also support
|
|
1413
|
+
\`session/list\` may return \`SessionInfo.additionalDirectories\` when they track
|
|
1414
|
+
that state.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1415
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1416
|
+
these keys.
|
|
1417
|
+
|
|
1418
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},SessionCapabilities:{description:"Session capabilities supported by the agent.\n\nAs a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`.\n\nOptionally, they **MAY** support other session methods and notifications by specifying additional capabilities.\n\nNote: `session/load` is still handled by the top-level `load_session` capability. This will be unified in future versions of the protocol.\n\nSee protocol docs: [Session Capabilities](https://agentclientprotocol.com/protocol/initialization#session-capabilities)",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1419
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1420
|
+
these keys.
|
|
1421
|
+
|
|
1422
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},additionalDirectories:{anyOf:[{$ref:"#/$defs/SessionAdditionalDirectoriesCapabilities"},{type:"null"}],description:`**UNSTABLE**
|
|
1423
|
+
|
|
1424
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1425
|
+
|
|
1426
|
+
Whether the agent supports \`additionalDirectories\` on supported session lifecycle requests.
|
|
1427
|
+
|
|
1428
|
+
Agents that also support \`session/list\` may return
|
|
1429
|
+
\`SessionInfo.additionalDirectories\` when they track that state.`},close:{anyOf:[{$ref:"#/$defs/SessionCloseCapabilities"},{type:"null"}],description:"Whether the agent supports `session/close`."},delete:{anyOf:[{$ref:"#/$defs/SessionDeleteCapabilities"},{type:"null"}],description:"**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`."},fork:{anyOf:[{$ref:"#/$defs/SessionForkCapabilities"},{type:"null"}],description:`**UNSTABLE**
|
|
1430
|
+
|
|
1431
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1432
|
+
|
|
1433
|
+
Whether the agent supports \`session/fork\`.`},list:{anyOf:[{$ref:"#/$defs/SessionListCapabilities"},{type:"null"}],description:"Whether the agent supports `session/list`."},resume:{anyOf:[{$ref:"#/$defs/SessionResumeCapabilities"},{type:"null"}],description:"Whether the agent supports `session/resume`."}},type:"object"},SessionCloseCapabilities:{description:"Capabilities for the `session/close` method.\n\nBy supplying `{}` it means that the agent supports closing of sessions.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1434
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1435
|
+
these keys.
|
|
1436
|
+
|
|
1437
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},SessionConfigBoolean:{description:`**UNSTABLE**
|
|
1438
|
+
|
|
1439
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1440
|
+
|
|
1441
|
+
A boolean on/off toggle session configuration option payload.`,properties:{currentValue:{description:"The current value of the boolean option.",type:"boolean"}},required:["currentValue"],type:"object"},SessionConfigGroupId:{description:"Unique identifier for a session configuration option value group.",type:"string"},SessionConfigId:{description:"Unique identifier for a session configuration option.",type:"string"},SessionConfigOption:{description:"A session configuration option selector and its current state.",discriminator:{propertyName:"type"},oneOf:[{allOf:[{$ref:"#/$defs/SessionConfigSelect"}],description:"Single-value selector (dropdown).",properties:{type:{const:"select",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/SessionConfigBoolean"}],description:`**UNSTABLE**
|
|
1442
|
+
|
|
1443
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1444
|
+
|
|
1445
|
+
Boolean on/off toggle.`,properties:{type:{const:"boolean",type:"string"}},required:["type"],type:"object"}],properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1446
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1447
|
+
these keys.
|
|
1448
|
+
|
|
1449
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},category:{anyOf:[{$ref:"#/$defs/SessionConfigOptionCategory"},{type:"null"}],description:"Optional semantic category for this option (UX only)."},description:{description:"Optional description for the Client to display to the user.",type:["string","null"]},id:{allOf:[{$ref:"#/$defs/SessionConfigId"}],description:"Unique identifier for the configuration option."},name:{description:"Human-readable label for the option.",type:"string"}},required:["id","name"],type:"object"},SessionConfigOptionCategory:{anyOf:[{const:"mode",description:"Session mode selector.",type:"string"},{const:"model",description:"Model selector.",type:"string"},{const:"thought_level",description:"Thought/reasoning level selector.",type:"string"},{description:"Unknown / uncategorized selector.",title:"other",type:"string"}],description:`Semantic category for a session configuration option.
|
|
1450
|
+
|
|
1451
|
+
This is intended to help Clients distinguish broadly common selectors (e.g. model selector vs
|
|
1452
|
+
session mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,
|
|
1453
|
+
placement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown
|
|
1454
|
+
categories gracefully.
|
|
1455
|
+
|
|
1456
|
+
Category names beginning with \`_\` are free for custom use, like other ACP extension methods.
|
|
1457
|
+
Category names that do not begin with \`_\` are reserved for the ACP spec.`},SessionConfigSelect:{description:"A single-value selector (dropdown) session configuration option payload.",properties:{currentValue:{allOf:[{$ref:"#/$defs/SessionConfigValueId"}],description:"The currently selected value."},options:{allOf:[{$ref:"#/$defs/SessionConfigSelectOptions"}],description:"The set of selectable options."}},required:["currentValue","options"],type:"object"},SessionConfigSelectGroup:{description:"A group of possible values for a session configuration option.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1458
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1459
|
+
these keys.
|
|
1460
|
+
|
|
1461
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},group:{allOf:[{$ref:"#/$defs/SessionConfigGroupId"}],description:"Unique identifier for this group."},name:{description:"Human-readable label for this group.",type:"string"},options:{description:"The set of option values in this group.",items:{$ref:"#/$defs/SessionConfigSelectOption"},type:"array"}},required:["group","name","options"],type:"object"},SessionConfigSelectOption:{description:"A possible value for a session configuration option.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1462
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1463
|
+
these keys.
|
|
1464
|
+
|
|
1465
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},description:{description:"Optional description for this option value.",type:["string","null"]},name:{description:"Human-readable label for this option value.",type:"string"},value:{allOf:[{$ref:"#/$defs/SessionConfigValueId"}],description:"Unique identifier for this option value."}},required:["value","name"],type:"object"},SessionConfigSelectOptions:{anyOf:[{description:"A flat list of options with no grouping.",items:{$ref:"#/$defs/SessionConfigSelectOption"},title:"Ungrouped",type:"array"},{description:"A list of options grouped under headers.",items:{$ref:"#/$defs/SessionConfigSelectGroup"},title:"Grouped",type:"array"}],description:"Possible values for a session configuration option."},SessionConfigValueId:{description:"Unique identifier for a session configuration option value.",type:"string"},SessionDeleteCapabilities:{description:"**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for the `session/delete` method.\n\nSupplying `{}` means the agent supports deleting sessions from `session/list`.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1466
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1467
|
+
these keys.
|
|
1468
|
+
|
|
1469
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},SessionForkCapabilities:{description:`**UNSTABLE**
|
|
1470
|
+
|
|
1471
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1472
|
+
|
|
1473
|
+
Capabilities for the \`session/fork\` method.
|
|
1474
|
+
|
|
1475
|
+
By supplying \`{}\` it means that the agent supports forking of sessions.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1476
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1477
|
+
these keys.
|
|
1478
|
+
|
|
1479
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},SessionId:{description:`A unique identifier for a conversation session between a client and agent.
|
|
1480
|
+
|
|
1481
|
+
Sessions maintain their own context, conversation history, and state,
|
|
1482
|
+
allowing multiple independent interactions with the same agent.
|
|
1483
|
+
|
|
1484
|
+
See protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)`,type:"string"},SessionInfo:{description:"Information about a session returned by session/list",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1485
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1486
|
+
these keys.
|
|
1487
|
+
|
|
1488
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},additionalDirectories:{description:`**UNSTABLE**
|
|
1489
|
+
|
|
1490
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1491
|
+
|
|
1492
|
+
Additional workspace roots for this session, if the Agent reports them. Each path must be absolute.
|
|
1493
|
+
|
|
1494
|
+
Agents may omit this field when they do not track or surface additional-root
|
|
1495
|
+
state. When present, this is the complete additional-root list known to
|
|
1496
|
+
the Agent for the session.`,items:{type:"string"},type:"array"},cwd:{description:"The working directory for this session. Must be an absolute path.",type:"string"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"Unique identifier for the session"},title:{description:"Human-readable title for the session",type:["string","null"]},updatedAt:{description:"ISO 8601 timestamp of last activity",type:["string","null"]}},required:["sessionId","cwd"],type:"object"},SessionInfoUpdate:{description:`Update to session metadata. All fields are optional to support partial updates.
|
|
1497
|
+
|
|
1498
|
+
Agents send this notification to update session information like title or custom metadata.
|
|
1499
|
+
This allows clients to display dynamic session names and track session state changes.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1500
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1501
|
+
these keys.
|
|
1502
|
+
|
|
1503
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},title:{description:"Human-readable title for the session. Set to null to clear.",type:["string","null"]},updatedAt:{description:"ISO 8601 timestamp of last activity. Set to null to clear.",type:["string","null"]}},type:"object"},SessionListCapabilities:{description:"Capabilities for the `session/list` method.\n\nBy supplying `{}` it means that the agent supports listing of sessions.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1504
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1505
|
+
these keys.
|
|
1506
|
+
|
|
1507
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},SessionMode:{description:`A mode the agent can operate in.
|
|
1508
|
+
|
|
1509
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1510
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1511
|
+
these keys.
|
|
1512
|
+
|
|
1513
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},description:{type:["string","null"]},id:{$ref:"#/$defs/SessionModeId"},name:{type:"string"}},required:["id","name"],type:"object"},SessionModeId:{description:"Unique identifier for a Session Mode.",type:"string"},SessionModeState:{description:"The set of modes and the one currently active.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1514
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1515
|
+
these keys.
|
|
1516
|
+
|
|
1517
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},availableModes:{description:"The set of modes that the Agent can operate in",items:{$ref:"#/$defs/SessionMode"},type:"array"},currentModeId:{allOf:[{$ref:"#/$defs/SessionModeId"}],description:"The current mode the Agent is in."}},required:["currentModeId","availableModes"],type:"object"},SessionModelState:{description:`**UNSTABLE**
|
|
1518
|
+
|
|
1519
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1520
|
+
|
|
1521
|
+
The set of models and the one currently active.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1522
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1523
|
+
these keys.
|
|
1524
|
+
|
|
1525
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},availableModels:{description:"The set of models that the Agent can use",items:{$ref:"#/$defs/ModelInfo"},type:"array"},currentModelId:{allOf:[{$ref:"#/$defs/ModelId"}],description:"The current model the Agent is in."}},required:["currentModelId","availableModels"],type:"object"},SessionNotification:{description:`Notification containing a session update from the agent.
|
|
1526
|
+
|
|
1527
|
+
Used to stream real-time progress and results during prompt processing.
|
|
1528
|
+
|
|
1529
|
+
See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1530
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1531
|
+
these keys.
|
|
1532
|
+
|
|
1533
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session this update pertains to."},update:{allOf:[{$ref:"#/$defs/SessionUpdate"}],description:"The actual update content."}},required:["sessionId","update"],type:"object","x-method":"session/update","x-side":"client"},SessionResumeCapabilities:{description:"Capabilities for the `session/resume` method.\n\nBy supplying `{}` it means that the agent supports resuming of sessions.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1534
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1535
|
+
these keys.
|
|
1536
|
+
|
|
1537
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object"},SessionUpdate:{description:`Different types of updates that can be sent during session processing.
|
|
1538
|
+
|
|
1539
|
+
These updates provide real-time feedback about the agent's progress.
|
|
1540
|
+
|
|
1541
|
+
See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)`,discriminator:{propertyName:"sessionUpdate"},oneOf:[{allOf:[{$ref:"#/$defs/ContentChunk"}],description:"A chunk of the user's message being streamed.",properties:{sessionUpdate:{const:"user_message_chunk",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/ContentChunk"}],description:"A chunk of the agent's response being streamed.",properties:{sessionUpdate:{const:"agent_message_chunk",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/ContentChunk"}],description:"A chunk of the agent's internal reasoning being streamed.",properties:{sessionUpdate:{const:"agent_thought_chunk",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/ToolCall"}],description:"Notification that a new tool call has been initiated.",properties:{sessionUpdate:{const:"tool_call",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/ToolCallUpdate"}],description:"Update on the status or results of a tool call.",properties:{sessionUpdate:{const:"tool_call_update",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/Plan"}],description:`The agent's execution plan for complex tasks.
|
|
1542
|
+
See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)`,properties:{sessionUpdate:{const:"plan",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/AvailableCommandsUpdate"}],description:"Available commands are ready or have changed",properties:{sessionUpdate:{const:"available_commands_update",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/CurrentModeUpdate"}],description:`The current mode of the session has changed
|
|
1543
|
+
|
|
1544
|
+
See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)`,properties:{sessionUpdate:{const:"current_mode_update",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/ConfigOptionUpdate"}],description:"Session configuration options have been updated.",properties:{sessionUpdate:{const:"config_option_update",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/SessionInfoUpdate"}],description:"Session metadata has been updated (title, timestamps, custom metadata)",properties:{sessionUpdate:{const:"session_info_update",type:"string"}},required:["sessionUpdate"],type:"object"},{allOf:[{$ref:"#/$defs/UsageUpdate"}],description:`**UNSTABLE**
|
|
1545
|
+
|
|
1546
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1547
|
+
|
|
1548
|
+
Context window and cost update for the session.`,properties:{sessionUpdate:{const:"usage_update",type:"string"}},required:["sessionUpdate"],type:"object"}]},SetProvidersRequest:{description:`**UNSTABLE**
|
|
1549
|
+
|
|
1550
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1551
|
+
|
|
1552
|
+
Request parameters for \`providers/set\`.
|
|
1553
|
+
|
|
1554
|
+
Replaces the full configuration for one provider id.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1555
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1556
|
+
these keys.
|
|
1557
|
+
|
|
1558
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},apiType:{allOf:[{$ref:"#/$defs/LlmProtocol"}],description:"Protocol type for this provider."},baseUrl:{description:"Base URL for requests sent through this provider.",type:"string"},headers:{additionalProperties:{type:"string"},description:`Full headers map for this provider.
|
|
1559
|
+
May include authorization, routing, or other integration-specific headers.`,type:"object"},id:{description:"Provider id to configure.",type:"string"}},required:["id","apiType","baseUrl"],type:"object","x-method":"providers/set","x-side":"agent"},SetProvidersResponse:{description:`**UNSTABLE**
|
|
1560
|
+
|
|
1561
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1562
|
+
|
|
1563
|
+
Response to \`providers/set\`.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1564
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1565
|
+
these keys.
|
|
1566
|
+
|
|
1567
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"providers/set","x-side":"agent"},SetSessionConfigOptionRequest:{anyOf:[{description:'A boolean value (`type: "boolean"`).',properties:{type:{const:"boolean",type:"string"},value:{description:"The boolean value.",type:"boolean"}},required:["type","value"],type:"object"},{description:"A [`SessionConfigValueId`] string value.\n\nThis is the default when `type` is absent on the wire. Unknown `type`\nvalues with string payloads also gracefully deserialize into this\nvariant.",properties:{value:{allOf:[{$ref:"#/$defs/SessionConfigValueId"}],description:"The value ID."}},required:["value"],title:"value_id",type:"object"}],description:"Request parameters for setting a session configuration option.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1568
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1569
|
+
these keys.
|
|
1570
|
+
|
|
1571
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},configId:{allOf:[{$ref:"#/$defs/SessionConfigId"}],description:"The ID of the configuration option to set."},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to set the configuration option for."}},required:["sessionId","configId"],type:"object","x-method":"session/set_config_option","x-side":"agent"},SetSessionConfigOptionResponse:{description:"Response to `session/set_config_option` method.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1572
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1573
|
+
these keys.
|
|
1574
|
+
|
|
1575
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},configOptions:{description:"The full set of configuration options and their current values.",items:{$ref:"#/$defs/SessionConfigOption"},type:"array"}},required:["configOptions"],type:"object","x-method":"session/set_config_option","x-side":"agent"},SetSessionModeRequest:{description:"Request parameters for setting a session mode.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1576
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1577
|
+
these keys.
|
|
1578
|
+
|
|
1579
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},modeId:{allOf:[{$ref:"#/$defs/SessionModeId"}],description:"The ID of the mode to set."},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to set the mode for."}},required:["sessionId","modeId"],type:"object","x-method":"session/set_mode","x-side":"agent"},SetSessionModeResponse:{description:"Response to `session/set_mode` method.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1580
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1581
|
+
these keys.
|
|
1582
|
+
|
|
1583
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"session/set_mode","x-side":"agent"},SetSessionModelRequest:{description:`**UNSTABLE**
|
|
1584
|
+
|
|
1585
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1586
|
+
|
|
1587
|
+
Request parameters for setting a session model.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1588
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1589
|
+
these keys.
|
|
1590
|
+
|
|
1591
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},modelId:{allOf:[{$ref:"#/$defs/ModelId"}],description:"The ID of the model to set."},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The ID of the session to set the model for."}},required:["sessionId","modelId"],type:"object","x-method":"session/set_model","x-side":"agent"},SetSessionModelResponse:{description:`**UNSTABLE**
|
|
1592
|
+
|
|
1593
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1594
|
+
|
|
1595
|
+
Response to \`session/set_model\` method.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1596
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1597
|
+
these keys.
|
|
1598
|
+
|
|
1599
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"session/set_model","x-side":"agent"},StartNesRequest:{description:"Request to start an NES session.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1600
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1601
|
+
these keys.
|
|
1602
|
+
|
|
1603
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},repository:{anyOf:[{$ref:"#/$defs/NesRepository"},{type:"null"}],description:"Repository metadata, if the workspace is a git repository."},workspaceFolders:{description:"The workspace folders.",items:{$ref:"#/$defs/WorkspaceFolder"},type:["array","null"]},workspaceUri:{description:"The root URI of the workspace.",type:["string","null"]}},type:"object","x-method":"nes/start","x-side":"agent"},StartNesResponse:{description:"Response to `nes/start`.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1604
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1605
|
+
these keys.
|
|
1606
|
+
|
|
1607
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for the newly started NES session."}},required:["sessionId"],type:"object","x-method":"nes/start","x-side":"agent"},StopReason:{description:`Reasons why an agent stops processing a prompt turn.
|
|
1608
|
+
|
|
1609
|
+
See protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)`,oneOf:[{const:"end_turn",description:"The turn ended successfully.",type:"string"},{const:"max_tokens",description:"The turn ended because the agent reached the maximum number of tokens.",type:"string"},{const:"max_turn_requests",description:`The turn ended because the agent reached the maximum number of allowed
|
|
1610
|
+
agent requests between user turns.`,type:"string"},{const:"refusal",description:`The turn ended because the agent refused to continue. The user prompt
|
|
1611
|
+
and everything that comes after it won't be included in the next
|
|
1612
|
+
prompt, so this should be reflected in the UI.`,type:"string"},{const:"cancelled",description:`The turn was cancelled by the client via \`session/cancel\`.
|
|
1613
|
+
|
|
1614
|
+
This stop reason MUST be returned when the client sends a \`session/cancel\`
|
|
1615
|
+
notification, even if the cancellation causes exceptions in underlying operations.
|
|
1616
|
+
Agents should catch these exceptions and return this semantically meaningful
|
|
1617
|
+
response to confirm successful cancellation.`,type:"string"}]},StringFormat:{description:"String format types for string properties in elicitation schemas.",oneOf:[{const:"email",description:"Email address format.",type:"string"},{const:"uri",description:"URI format.",type:"string"},{const:"date",description:"Date format (YYYY-MM-DD).",type:"string"},{const:"date-time",description:"Date-time format (ISO 8601).",type:"string"}]},StringPropertySchema:{description:'Schema for string properties in an elicitation form.\n\nWhen `enum` or `oneOf` is set, this represents a single-select enum\nwith `"type": "string"`.',properties:{default:{description:"Default value.",type:["string","null"]},description:{description:"Human-readable description.",type:["string","null"]},enum:{description:"Enum values for untitled single-select enums.",items:{type:"string"},type:["array","null"]},format:{anyOf:[{$ref:"#/$defs/StringFormat"},{type:"null"}],description:"String format."},maxLength:{description:"Maximum string length.",format:"uint32",minimum:0,type:["integer","null"]},minLength:{description:"Minimum string length.",format:"uint32",minimum:0,type:["integer","null"]},oneOf:{description:"Titled enum options for titled single-select enums.",items:{$ref:"#/$defs/EnumOption"},type:["array","null"]},pattern:{description:"Pattern the string must match.",type:["string","null"]},title:{description:"Optional title for the property.",type:["string","null"]}},type:"object"},SuggestNesRequest:{description:"Request for a code suggestion.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1618
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1619
|
+
these keys.
|
|
1620
|
+
|
|
1621
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},context:{anyOf:[{$ref:"#/$defs/NesSuggestContext"},{type:"null"}],description:"Context for the suggestion, included based on agent capabilities."},position:{allOf:[{$ref:"#/$defs/Position"}],description:"The current cursor position."},selection:{anyOf:[{$ref:"#/$defs/Range"},{type:"null"}],description:"The current text selection range, if any."},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."},triggerKind:{allOf:[{$ref:"#/$defs/NesTriggerKind"}],description:"What triggered this suggestion request."},uri:{description:"The URI of the document to suggest for.",type:"string"},version:{description:"The version number of the document.",format:"int64",type:"integer"}},required:["sessionId","uri","version","position","triggerKind"],type:"object","x-method":"nes/suggest","x-side":"agent"},SuggestNesResponse:{description:"Response to `nes/suggest`.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1622
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1623
|
+
these keys.
|
|
1624
|
+
|
|
1625
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},suggestions:{description:"The list of suggestions.",items:{$ref:"#/$defs/NesSuggestion"},type:"array"}},required:["suggestions"],type:"object","x-method":"nes/suggest","x-side":"agent"},Terminal:{description:"Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1626
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1627
|
+
these keys.
|
|
1628
|
+
|
|
1629
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},terminalId:{type:"string"}},required:["terminalId"],type:"object"},TerminalExitStatus:{description:"Exit status of a terminal command.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1630
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1631
|
+
these keys.
|
|
1632
|
+
|
|
1633
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},exitCode:{description:"The process exit code (may be null if terminated by signal).",format:"uint32",minimum:0,type:["integer","null"]},signal:{description:"The signal that terminated the process (may be null if exited normally).",type:["string","null"]}},type:"object"},TerminalOutputRequest:{description:"Request to get the current output and status of a terminal.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1634
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1635
|
+
these keys.
|
|
1636
|
+
|
|
1637
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."},terminalId:{description:"The ID of the terminal to get output from.",type:"string"}},required:["sessionId","terminalId"],type:"object","x-method":"terminal/output","x-side":"client"},TerminalOutputResponse:{description:"Response containing the terminal output and exit status.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1638
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1639
|
+
these keys.
|
|
1640
|
+
|
|
1641
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},exitStatus:{anyOf:[{$ref:"#/$defs/TerminalExitStatus"},{type:"null"}],description:"Exit status if the command has completed."},output:{description:"The terminal output captured so far.",type:"string"},truncated:{description:"Whether the output was truncated due to byte limits.",type:"boolean"}},required:["output","truncated"],type:"object","x-method":"terminal/output","x-side":"client"},TextContent:{description:"Text provided to or from an LLM.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1642
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1643
|
+
these keys.
|
|
1644
|
+
|
|
1645
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},annotations:{anyOf:[{$ref:"#/$defs/Annotations"},{type:"null"}]},text:{type:"string"}},required:["text"],type:"object"},TextDocumentContentChangeEvent:{description:"A content change event for a document.\n\nWhen `range` is `None`, `text` is the full content of the document.\nWhen `range` is `Some`, `text` replaces the given range.",properties:{range:{anyOf:[{$ref:"#/$defs/Range"},{type:"null"}],description:"The range of the document that changed. If `None`, the entire content is replaced."},text:{description:"The new text for the range, or the full document content if `range` is `None`.",type:"string"}},required:["text"],type:"object"},TextDocumentSyncKind:{description:"How the agent wants document changes delivered.",oneOf:[{const:"full",description:"Client sends the entire file content on each change.",type:"string"},{const:"incremental",description:"Client sends only the changed ranges.",type:"string"}]},TextResourceContents:{description:"Text-based resource contents.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1646
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1647
|
+
these keys.
|
|
1648
|
+
|
|
1649
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},mimeType:{type:["string","null"]},text:{type:"string"},uri:{type:"string"}},required:["text","uri"],type:"object"},TitledMultiSelectItems:{description:"Items definition for titled multi-select enum properties.",properties:{anyOf:{description:"Titled enum options.",items:{$ref:"#/$defs/EnumOption"},type:"array"}},required:["anyOf"],type:"object"},ToolCall:{description:`Represents a tool call that the language model has requested.
|
|
1650
|
+
|
|
1651
|
+
Tool calls are actions that the agent executes on behalf of the language model,
|
|
1652
|
+
such as reading files, executing code, or fetching data from external sources.
|
|
1653
|
+
|
|
1654
|
+
See protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1655
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1656
|
+
these keys.
|
|
1657
|
+
|
|
1658
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},content:{description:"Content produced by the tool call.",items:{$ref:"#/$defs/ToolCallContent"},type:"array"},kind:{allOf:[{$ref:"#/$defs/ToolKind"}],description:`The category of tool being invoked.
|
|
1659
|
+
Helps clients choose appropriate icons and UI treatment.`},locations:{description:`File locations affected by this tool call.
|
|
1660
|
+
Enables "follow-along" features in clients.`,items:{$ref:"#/$defs/ToolCallLocation"},type:"array"},rawInput:{description:"Raw input parameters sent to the tool."},rawOutput:{description:"Raw output returned by the tool."},status:{allOf:[{$ref:"#/$defs/ToolCallStatus"}],description:"Current execution status of the tool call."},title:{description:"Human-readable title describing what the tool is doing.",type:"string"},toolCallId:{allOf:[{$ref:"#/$defs/ToolCallId"}],description:"Unique identifier for this tool call within the session."}},required:["toolCallId","title"],type:"object"},ToolCallContent:{description:`Content produced by a tool call.
|
|
1661
|
+
|
|
1662
|
+
Tool calls can produce different types of content including
|
|
1663
|
+
standard content blocks (text, images) or file diffs.
|
|
1664
|
+
|
|
1665
|
+
See protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)`,discriminator:{propertyName:"type"},oneOf:[{allOf:[{$ref:"#/$defs/Content"}],description:"Standard content block (text, images, resources).",properties:{type:{const:"content",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/Diff"}],description:"File modification shown as a diff.",properties:{type:{const:"diff",type:"string"}},required:["type"],type:"object"},{allOf:[{$ref:"#/$defs/Terminal"}],description:"Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)",properties:{type:{const:"terminal",type:"string"}},required:["type"],type:"object"}]},ToolCallId:{description:"Unique identifier for a tool call within a session.",type:"string"},ToolCallLocation:{description:`A file location being accessed or modified by a tool.
|
|
1666
|
+
|
|
1667
|
+
Enables clients to implement "follow-along" features that track
|
|
1668
|
+
which files the agent is working with in real-time.
|
|
1669
|
+
|
|
1670
|
+
See protocol docs: [Following the Agent](https://agentclientprotocol.com/protocol/tool-calls#following-the-agent)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1671
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1672
|
+
these keys.
|
|
1673
|
+
|
|
1674
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},line:{description:"Optional line number within the file.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"The file path being accessed or modified.",type:"string"}},required:["path"],type:"object"},ToolCallStatus:{description:`Execution status of a tool call.
|
|
1675
|
+
|
|
1676
|
+
Tool calls progress through different statuses during their lifecycle.
|
|
1677
|
+
|
|
1678
|
+
See protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls#status)`,oneOf:[{const:"pending",description:`The tool call hasn't started running yet because the input is either
|
|
1679
|
+
streaming or we're awaiting approval.`,type:"string"},{const:"in_progress",description:"The tool call is currently running.",type:"string"},{const:"completed",description:"The tool call completed successfully.",type:"string"},{const:"failed",description:"The tool call failed with an error.",type:"string"}]},ToolCallUpdate:{description:`An update to an existing tool call.
|
|
1680
|
+
|
|
1681
|
+
Used to report progress and results as tools execute. All fields except
|
|
1682
|
+
the tool call ID are optional - only changed fields need to be included.
|
|
1683
|
+
|
|
1684
|
+
See protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating)`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1685
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1686
|
+
these keys.
|
|
1687
|
+
|
|
1688
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},content:{description:"Replace the content collection.",items:{$ref:"#/$defs/ToolCallContent"},type:["array","null"]},kind:{anyOf:[{$ref:"#/$defs/ToolKind"},{type:"null"}],description:"Update the tool kind."},locations:{description:"Replace the locations collection.",items:{$ref:"#/$defs/ToolCallLocation"},type:["array","null"]},rawInput:{description:"Update the raw input."},rawOutput:{description:"Update the raw output."},status:{anyOf:[{$ref:"#/$defs/ToolCallStatus"},{type:"null"}],description:"Update the execution status."},title:{description:"Update the human-readable title.",type:["string","null"]},toolCallId:{allOf:[{$ref:"#/$defs/ToolCallId"}],description:"The ID of the tool call being updated."}},required:["toolCallId"],type:"object"},ToolKind:{description:`Categories of tools that can be invoked.
|
|
1689
|
+
|
|
1690
|
+
Tool kinds help clients choose appropriate icons and optimize how they
|
|
1691
|
+
display tool execution progress.
|
|
1692
|
+
|
|
1693
|
+
See protocol docs: [Creating](https://agentclientprotocol.com/protocol/tool-calls#creating)`,oneOf:[{const:"read",description:"Reading files or data.",type:"string"},{const:"edit",description:"Modifying files or content.",type:"string"},{const:"delete",description:"Removing files or data.",type:"string"},{const:"move",description:"Moving or renaming files.",type:"string"},{const:"search",description:"Searching for information.",type:"string"},{const:"execute",description:"Running commands or code.",type:"string"},{const:"think",description:"Internal reasoning or planning.",type:"string"},{const:"fetch",description:"Retrieving external data.",type:"string"},{const:"switch_mode",description:"Switching the current session mode.",type:"string"},{const:"other",description:"Other tool types (default).",type:"string"}]},UnstructuredCommandInput:{description:"All text that was typed after the command name is provided as input.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1694
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1695
|
+
these keys.
|
|
1696
|
+
|
|
1697
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},hint:{description:"A hint to display when the input hasn't been provided yet",type:"string"}},required:["hint"],type:"object"},UntitledMultiSelectItems:{description:"Items definition for untitled multi-select enum properties.",properties:{enum:{description:"Allowed enum values.",items:{type:"string"},type:"array"},type:{allOf:[{$ref:"#/$defs/ElicitationStringType"}],description:'Item type discriminator. Must be `"string"`.'}},required:["type","enum"],type:"object"},Usage:{description:`**UNSTABLE**
|
|
1698
|
+
|
|
1699
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1700
|
+
|
|
1701
|
+
Token usage information for a prompt turn.`,properties:{cachedReadTokens:{description:"Total cache read tokens.",format:"uint64",minimum:0,type:["integer","null"]},cachedWriteTokens:{description:"Total cache write tokens.",format:"uint64",minimum:0,type:["integer","null"]},inputTokens:{description:"Total input tokens across all turns.",format:"uint64",minimum:0,type:"integer"},outputTokens:{description:"Total output tokens across all turns.",format:"uint64",minimum:0,type:"integer"},thoughtTokens:{description:"Total thought/reasoning tokens",format:"uint64",minimum:0,type:["integer","null"]},totalTokens:{description:"Sum of all token types across session.",format:"uint64",minimum:0,type:"integer"}},required:["totalTokens","inputTokens","outputTokens"],type:"object"},UsageUpdate:{description:`**UNSTABLE**
|
|
1702
|
+
|
|
1703
|
+
This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1704
|
+
|
|
1705
|
+
Context window and cost update for a session.`,properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1706
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1707
|
+
these keys.
|
|
1708
|
+
|
|
1709
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},cost:{anyOf:[{$ref:"#/$defs/Cost"},{type:"null"}],description:"Cumulative session cost (optional)."},size:{description:"Total context window size in tokens.",format:"uint64",minimum:0,type:"integer"},used:{description:"Tokens currently in context.",format:"uint64",minimum:0,type:"integer"}},required:["used","size"],type:"object"},WaitForTerminalExitRequest:{description:"Request to wait for a terminal command to exit.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1710
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1711
|
+
these keys.
|
|
1712
|
+
|
|
1713
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."},terminalId:{description:"The ID of the terminal to wait for.",type:"string"}},required:["sessionId","terminalId"],type:"object","x-method":"terminal/wait_for_exit","x-side":"client"},WaitForTerminalExitResponse:{description:"Response containing the exit status of a terminal command.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1714
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1715
|
+
these keys.
|
|
1716
|
+
|
|
1717
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},exitCode:{description:"The process exit code (may be null if terminated by signal).",format:"uint32",minimum:0,type:["integer","null"]},signal:{description:"The signal that terminated the process (may be null if exited normally).",type:["string","null"]}},type:"object","x-method":"terminal/wait_for_exit","x-side":"client"},WorkspaceFolder:{description:"A workspace folder.",properties:{name:{description:"The display name of the folder.",type:"string"},uri:{description:"The URI of the folder.",type:"string"}},required:["uri","name"],type:"object"},WriteTextFileRequest:{description:"Request to write content to a text file.\n\nOnly available if the client supports the `fs.writeTextFile` capability.",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1718
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1719
|
+
these keys.
|
|
1720
|
+
|
|
1721
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]},content:{description:"The text content to write to the file.",type:"string"},path:{description:"Absolute path to the file to write.",type:"string"},sessionId:{allOf:[{$ref:"#/$defs/SessionId"}],description:"The session ID for this request."}},required:["sessionId","path","content"],type:"object","x-method":"fs/write_text_file","x-side":"client"},WriteTextFileResponse:{description:"Response to `fs/write_text_file`",properties:{_meta:{additionalProperties:!0,description:`The _meta property is reserved by ACP to allow clients and agents to attach additional
|
|
1722
|
+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
|
|
1723
|
+
these keys.
|
|
1724
|
+
|
|
1725
|
+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)`,type:["object","null"]}},type:"object","x-method":"fs/write_text_file","x-side":"client"}},qS="https://json-schema.org/draft/2020-12/schema",US=[{anyOf:[{allOf:[{$ref:"#/$defs/AgentRequest"}],title:"Request"},{allOf:[{$ref:"#/$defs/AgentResponse"}],title:"Response"},{allOf:[{$ref:"#/$defs/AgentNotification"}],title:"Notification"}],description:`A message (request, response, or notification) with \`"jsonrpc": "2.0"\` specified as
|
|
1726
|
+
[required by JSON-RPC 2.0 Specification][1].
|
|
1727
|
+
|
|
1728
|
+
[1]: https://www.jsonrpc.org/specification#compatibility`,properties:{jsonrpc:{enum:["2.0"],type:"string"}},required:["jsonrpc"],title:"Agent",type:"object"},{anyOf:[{allOf:[{$ref:"#/$defs/ClientRequest"}],title:"Request"},{allOf:[{$ref:"#/$defs/ClientResponse"}],title:"Response"},{allOf:[{$ref:"#/$defs/ClientNotification"}],title:"Notification"}],description:`A message (request, response, or notification) with \`"jsonrpc": "2.0"\` specified as
|
|
1729
|
+
[required by JSON-RPC 2.0 Specification][1].
|
|
1730
|
+
|
|
1731
|
+
[1]: https://www.jsonrpc.org/specification#compatibility`,properties:{jsonrpc:{enum:["2.0"],type:"string"}},required:["jsonrpc"],title:"Client",type:"object"},{anyOf:[{allOf:[{$ref:"#/$defs/CancelRequestNotification"}],description:`**UNSTABLE**
|
|
1732
|
+
|
|
1733
|
+
This capability is not part of the spec yet, and may be removed or
|
|
1734
|
+
changed at any point.
|
|
1735
|
+
|
|
1736
|
+
Cancels an ongoing request.
|
|
1737
|
+
|
|
1738
|
+
This is a notification sent by the side that sent a request to cancel that request.
|
|
1739
|
+
|
|
1740
|
+
Upon receiving this notification, the receiver:
|
|
1741
|
+
|
|
1742
|
+
1. MUST cancel the corresponding request activity and all nested activities
|
|
1743
|
+
2. MAY send any pending notifications.
|
|
1744
|
+
3. MUST send one of these responses for the original request:
|
|
1745
|
+
- Valid response with appropriate data (partial results or cancellation marker)
|
|
1746
|
+
- Error response with code \`-32800\` (Cancelled)
|
|
1747
|
+
|
|
1748
|
+
See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)`,title:"CancelRequestNotification"}],description:`General protocol-level notifications that all sides are expected to
|
|
1749
|
+
implement.
|
|
1750
|
+
|
|
1751
|
+
Notifications whose methods start with '$/' are messages which
|
|
1752
|
+
are protocol implementation dependent and might not be implementable in all
|
|
1753
|
+
clients or agents. For example if the implementation uses a single threaded
|
|
1754
|
+
synchronous programming language then there is little it can do to react to
|
|
1755
|
+
a \`$/cancel_request\` notification. If an agent or client receives
|
|
1756
|
+
notifications starting with '$/' it is free to ignore the notification.
|
|
1757
|
+
|
|
1758
|
+
Notifications do not expect a response.`,title:"ProtocolLevel"}],LS="Agent Client Protocol",Ov={$defs:MS,$schema:qS,anyOf:US,title:LS};var Od={exports:{}},Rv={},ln={},Vr={},Ns={},ue={},us={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(u){if(super(),!e.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class o extends t{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((x,S)=>`${x}${S}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((x,S)=>(S instanceof n&&(x[S.str]=(x[S.str]||0)+1),x),{})}}e._Code=o,e.nil=new o("");function r(p,...u){const x=[p[0]];let S=0;for(;S<u.length;)a(x,u[S]),x.push(p[++S]);return new o(x)}e._=r;const i=new o("+");function s(p,...u){const x=[h(p[0])];let S=0;for(;S<u.length;)x.push(i),a(x,u[S]),x.push(i,h(p[++S]));return l(x),new o(x)}e.str=s;function a(p,u){u instanceof o?p.push(...u._items):u instanceof n?p.push(u):p.push(m(u))}e.addCodeArg=a;function l(p){let u=1;for(;u<p.length-1;){if(p[u]===i){const x=c(p[u-1],p[u+1]);if(x!==void 0){p.splice(u-1,3,x);continue}p[u++]="+"}u++}}function c(p,u){if(u==='""')return p;if(p==='""')return u;if(typeof p=="string")return u instanceof n||p[p.length-1]!=='"'?void 0:typeof u!="string"?`${p.slice(0,-1)}${u}"`:u[0]==='"'?p.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(p instanceof n))return`"${p}${u.slice(1)}`}function f(p,u){return u.emptyStr()?p:p.emptyStr()?u:s`${p}${u}`}e.strConcat=f;function m(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:h(Array.isArray(p)?p.join(","):p)}function v(p){return new o(h(p))}e.stringify=v;function h(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=h;function y(p){return typeof p=="string"&&e.IDENTIFIER.test(p)?new o(`.${p}`):r`[${p}]`}e.getProperty=y;function b(p){if(typeof p=="string"&&e.IDENTIFIER.test(p))return new o(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}e.getEsmExportName=b;function g(p){return new o(p.toString())}e.regexpCode=g})(us);var Rd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=us;class n extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var o;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class r{constructor({prefixes:c,parent:f}={}){this._names={},this._prefixes=c,this._parent=f}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const f=this._names[c]||this._nameGroup(c);return`${c}${f.index++}`}_nameGroup(c){var f,m;if(!((m=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||m===void 0)&&m.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=r;class i extends t.Name{constructor(c,f){super(f),this.prefix=c}setValue(c,{property:f,itemIndex:m}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(f)}[${m}]`}}e.ValueScopeName=i;const s=(0,t._)`\n`;class a extends r{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil}}get(){return this._scope}name(c){return new i(c,this._newName(c))}value(c,f){var m;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const v=this.toName(c),{prefix:h}=v,y=(m=f.key)!==null&&m!==void 0?m:f.ref;let b=this._values[h];if(b){const u=b.get(y);if(u)return u}else b=this._values[h]=new Map;b.set(y,v);const g=this._scope[h]||(this._scope[h]=[]),p=g.length;return g[p]=f.ref,v.setValue(f,{property:h,itemIndex:p}),v}getValue(c,f){const m=this._values[c];if(m)return m.get(f)}scopeRefs(c,f=this._values){return this._reduceValues(f,m=>{if(m.scopePath===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${c}${m.scopePath}`})}scopeCode(c=this._values,f,m){return this._reduceValues(c,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},f,m)}_reduceValues(c,f,m={},v){let h=t.nil;for(const y in c){const b=c[y];if(!b)continue;const g=m[y]=m[y]||new Map;b.forEach(p=>{if(g.has(p))return;g.set(p,o.Started);let u=f(p);if(u){const x=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${x} ${p} = ${u};${this.opts._n}`}else if(u=v==null?void 0:v(p))h=(0,t._)`${h}${u}${this.opts._n}`;else throw new n(p);g.set(p,o.Completed)})}return h}}e.ValueScope=a})(Rd);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=us,n=Rd;var o=us;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var r=Rd;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(w,k){return this}}class s extends i{constructor(w,k,N){super(),this.varKind=w,this.name=k,this.rhs=N}render({es5:w,_n:k}){const N=w?n.varKinds.var:this.varKind,H=this.rhs===void 0?"":` = ${this.rhs}`;return`${N} ${this.name}${H};`+k}optimizeNames(w,k){if(w[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,w,k)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(w,k,N){super(),this.lhs=w,this.rhs=k,this.sideEffects=N}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,k){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=L(this.rhs,w,k),this}get names(){const w=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(w,this.rhs)}}class l extends a{constructor(w,k,N,H){super(w,N,H),this.op=k}render({_n:w}){return`${this.lhs} ${this.op}= ${this.rhs};`+w}}class c extends i{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class f extends i{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class m extends i{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class v extends i{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code};`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,k){return this.code=L(this.code,w,k),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends i{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((k,N)=>k+N.render(w),"")}optimizeNodes(){const{nodes:w}=this;let k=w.length;for(;k--;){const N=w[k].optimizeNodes();Array.isArray(N)?w.splice(k,1,...N):N?w[k]=N:w.splice(k,1)}return w.length>0?this:void 0}optimizeNames(w,k){const{nodes:N}=this;let H=N.length;for(;H--;){const R=N[H];R.optimizeNames(w,k)||(F(w,R.names),N.splice(H,1))}return N.length>0?this:void 0}get names(){return this.nodes.reduce((w,k)=>z(w,k.names),{})}}class y extends h{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class b extends h{}class g extends y{}g.kind="else";class p extends y{constructor(w,k){super(k),this.condition=w}render(w){let k=`if(${this.condition})`+super.render(w);return this.else&&(k+="else "+this.else.render(w)),k}optimizeNodes(){super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let k=this.else;if(k){const N=k.optimizeNodes();k=this.else=Array.isArray(N)?new g(N):N}if(k)return w===!1?k instanceof p?k:k.nodes:this.nodes.length?this:new p(G(w),k instanceof p?[k]:k.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,k){var N;if(this.else=(N=this.else)===null||N===void 0?void 0:N.optimizeNames(w,k),!!(super.optimizeNames(w,k)||this.else))return this.condition=L(this.condition,w,k),this}get names(){const w=super.names;return U(w,this.condition),this.else&&z(w,this.else.names),w}}p.kind="if";class u extends y{}u.kind="for";class x extends u{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,k){if(super.optimizeNames(w,k))return this.iteration=L(this.iteration,w,k),this}get names(){return z(super.names,this.iteration.names)}}class S extends u{constructor(w,k,N,H){super(),this.varKind=w,this.name=k,this.from=N,this.to=H}render(w){const k=w.es5?n.varKinds.var:this.varKind,{name:N,from:H,to:R}=this;return`for(${k} ${N}=${H}; ${N}<${R}; ${N}++)`+super.render(w)}get names(){const w=U(super.names,this.from);return U(w,this.to)}}class T extends u{constructor(w,k,N,H){super(),this.loop=w,this.varKind=k,this.name=N,this.iterable=H}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,k){if(super.optimizeNames(w,k))return this.iterable=L(this.iterable,w,k),this}get names(){return z(super.names,this.iterable.names)}}class C extends y{constructor(w,k,N){super(),this.name=w,this.args=k,this.async=N}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}C.kind="func";class $ extends h{render(w){return"return "+super.render(w)}}$.kind="return";class j extends y{render(w){let k="try"+super.render(w);return this.catch&&(k+=this.catch.render(w)),this.finally&&(k+=this.finally.render(w)),k}optimizeNodes(){var w,k;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(w,k){var N,H;return super.optimizeNames(w,k),(N=this.catch)===null||N===void 0||N.optimizeNames(w,k),(H=this.finally)===null||H===void 0||H.optimizeNames(w,k),this}get names(){const w=super.names;return this.catch&&z(w,this.catch.names),this.finally&&z(w,this.finally.names),w}}class A extends y{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.render(w)}}A.kind="catch";class E extends y{render(w){return"finally"+super.render(w)}}E.kind="finally";class q{constructor(w,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
1759
|
+
`:""},this._extScope=w,this._scope=new n.Scope({parent:w}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,k){const N=this._extScope.value(w,k);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue(w,k){return this._extScope.getValue(w,k)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,k,N,H){const R=this._scope.toName(k);return N!==void 0&&H&&(this._constants[R.str]=N),this._leafNode(new s(w,R,N)),R}const(w,k,N){return this._def(n.varKinds.const,w,k,N)}let(w,k,N){return this._def(n.varKinds.let,w,k,N)}var(w,k,N){return this._def(n.varKinds.var,w,k,N)}assign(w,k,N){return this._leafNode(new a(w,k,N))}add(w,k){return this._leafNode(new l(w,e.operators.ADD,k))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new v(w)),this}object(...w){const k=["{"];for(const[N,H]of w)k.length>1&&k.push(","),k.push(N),(N!==H||this.opts.es5)&&(k.push(":"),(0,t.addCodeArg)(k,H));return k.push("}"),new t._Code(k)}if(w,k,N){if(this._blockNode(new p(w)),k&&N)this.code(k).else().code(N).endIf();else if(k)this.code(k).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new p(w))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(p,g)}_for(w,k){return this._blockNode(w),k&&this.code(k).endFor(),this}for(w,k){return this._for(new x(w),k)}forRange(w,k,N,H,R=this.opts.es5?n.varKinds.var:n.varKinds.let){const X=this._scope.toName(w);return this._for(new S(R,X,k,N),()=>H(X))}forOf(w,k,N,H=n.varKinds.const){const R=this._scope.toName(w);if(this.opts.es5){const X=k instanceof t.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,t._)`${X}.length`,ie=>{this.var(R,(0,t._)`${X}[${ie}]`),N(R)})}return this._for(new T("of",H,R,k),()=>N(R))}forIn(w,k,N,H=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0,t._)`Object.keys(${k})`,N);const R=this._scope.toName(w);return this._for(new T("in",H,R,k),()=>N(R))}endFor(){return this._endBlockNode(u)}label(w){return this._leafNode(new c(w))}break(w){return this._leafNode(new f(w))}return(w){const k=new $;if(this._blockNode(k),this.code(w),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(w,k,N){if(!k&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const H=new j;if(this._blockNode(H),this.code(w),k){const R=this.name("e");this._currNode=H.catch=new A(R),k(R)}return N&&(this._currNode=H.finally=new E,this.code(N)),this._endBlockNode(A,E)}throw(w){return this._leafNode(new m(w))}block(w,k){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(k),this}endBlock(w){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-k;if(N<0||w!==void 0&&N!==w)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${w} expected`);return this._nodes.length=k,this}func(w,k=t.nil,N,H){return this._blockNode(new C(w,k,N)),H&&this.code(H).endFunc(),this}endFunc(){return this._endBlockNode(C)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,k){const N=this._currNode;if(N instanceof w||k&&N instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${w.kind}/${k.kind}`:w.kind}"`)}_elseNode(w){const k=this._currNode;if(!(k instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const k=this._nodes;k[k.length-1]=w}}e.CodeGen=q;function z(P,w){for(const k in w)P[k]=(P[k]||0)+(w[k]||0);return P}function U(P,w){return w instanceof t._CodeOrName?z(P,w.names):P}function L(P,w,k){if(P instanceof t.Name)return N(P);if(!H(P))return P;return new t._Code(P._items.reduce((R,X)=>(X instanceof t.Name&&(X=N(X)),X instanceof t._Code?R.push(...X._items):R.push(X),R),[]));function N(R){const X=k[R.str];return X===void 0||w[R.str]!==1?R:(delete w[R.str],X)}function H(R){return R instanceof t._Code&&R._items.some(X=>X instanceof t.Name&&w[X.str]===1&&k[X.str]!==void 0)}}function F(P,w){for(const k in w)P[k]=(P[k]||0)-(w[k]||0)}function G(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${M(P)}`}e.not=G;const Y=_(e.operators.AND);function D(...P){return P.reduce(Y)}e.and=D;const J=_(e.operators.OR);function O(...P){return P.reduce(J)}e.or=O;function _(P){return(w,k)=>w===t.nil?k:k===t.nil?w:(0,t._)`${M(w)} ${P} ${M(k)}`}function M(P){return P instanceof t.Name?P:(0,t._)`(${P})`}})(ue);var Q={};Object.defineProperty(Q,"__esModule",{value:!0});Q.checkStrictMode=Q.getErrorPath=Q.Type=Q.useFunc=Q.setEvaluated=Q.evaluatedPropsToName=Q.mergeEvaluated=Q.eachItem=Q.unescapeJsonPointer=Q.escapeJsonPointer=Q.escapeFragment=Q.unescapeFragment=Q.schemaRefOrVal=Q.schemaHasRulesButRef=Q.schemaHasRules=Q.checkUnknownRules=Q.alwaysValidSchema=Q.toHash=void 0;const je=ue,DS=us;function zS(e){const t={};for(const n of e)t[n]=!0;return t}Q.toHash=zS;function FS(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Av(e,t),!Mv(t,e.self.RULES.all))}Q.alwaysValidSchema=FS;function Av(e,t=e.schema){const{opts:n,self:o}=e;if(!n.strictSchema||typeof t=="boolean")return;const r=o.RULES.keywords;for(const i in t)r[i]||Lv(e,`unknown keyword: "${i}"`)}Q.checkUnknownRules=Av;function Mv(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(t[n])return!0;return!1}Q.schemaHasRules=Mv;function BS(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Q.schemaHasRulesButRef=BS;function HS({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,je._)`${n}`}return(0,je._)`${e}${t}${(0,je.getProperty)(o)}`}Q.schemaRefOrVal=HS;function VS(e){return qv(decodeURIComponent(e))}Q.unescapeFragment=VS;function WS(e){return encodeURIComponent(Zu(e))}Q.escapeFragment=WS;function Zu(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Q.escapeJsonPointer=Zu;function qv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Q.unescapeJsonPointer=qv;function KS(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)}Q.eachItem=KS;function Um({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,s,a)=>{const l=s===void 0?i:s instanceof je.Name?(i instanceof je.Name?e(r,i,s):t(r,i,s),s):i instanceof je.Name?(t(r,s,i),i):n(i,s);return a===je.Name&&!(l instanceof je.Name)?o(r,l):l}}Q.mergeEvaluated={props:Um({mergeNames:(e,t,n)=>e.if((0,je._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,je._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,je._)`${n} || {}`).code((0,je._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,je._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,je._)`${n} || {}`),ep(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Uv}),items:Um({mergeNames:(e,t,n)=>e.if((0,je._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,je._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,je._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,je._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Uv(e,t){if(t===!0)return e.var("props",!0);const n=e.var("props",(0,je._)`{}`);return t!==void 0&&ep(e,n,t),n}Q.evaluatedPropsToName=Uv;function ep(e,t,n){Object.keys(n).forEach(o=>e.assign((0,je._)`${t}${(0,je.getProperty)(o)}`,!0))}Q.setEvaluated=ep;const Lm={};function GS(e,t){return e.scopeValue("func",{ref:t,code:Lm[t.code]||(Lm[t.code]=new DS._Code(t.code))})}Q.useFunc=GS;var Ad;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ad||(Q.Type=Ad={}));function JS(e,t,n){if(e instanceof je.Name){const o=t===Ad.Num;return n?o?(0,je._)`"[" + ${e} + "]"`:(0,je._)`"['" + ${e} + "']"`:o?(0,je._)`"/" + ${e}`:(0,je._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,je.getProperty)(e).toString():"/"+Zu(e)}Q.getErrorPath=JS;function Lv(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}Q.checkStrictMode=Lv;var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0});const ft=ue,QS={data:new ft.Name("data"),valCxt:new ft.Name("valCxt"),instancePath:new ft.Name("instancePath"),parentData:new ft.Name("parentData"),parentDataProperty:new ft.Name("parentDataProperty"),rootData:new ft.Name("rootData"),dynamicAnchors:new ft.Name("dynamicAnchors"),vErrors:new ft.Name("vErrors"),errors:new ft.Name("errors"),this:new ft.Name("this"),self:new ft.Name("self"),scope:new ft.Name("scope"),json:new ft.Name("json"),jsonPos:new ft.Name("jsonPos"),jsonLen:new ft.Name("jsonLen"),jsonPart:new ft.Name("jsonPart")};Dt.default=QS;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ue,n=Q,o=Dt;e.keywordError={message:({keyword:g})=>(0,t.str)`must pass "${g}" keyword validation`},e.keyword$DataError={message:({keyword:g,schemaType:p})=>p?(0,t.str)`"${g}" keyword must be ${p} ($data)`:(0,t.str)`"${g}" keyword is invalid ($data)`};function r(g,p=e.keywordError,u,x){const{it:S}=g,{gen:T,compositeRule:C,allErrors:$}=S,j=m(g,p,u);x??(C||$)?l(T,j):c(S,(0,t._)`[${j}]`)}e.reportError=r;function i(g,p=e.keywordError,u){const{it:x}=g,{gen:S,compositeRule:T,allErrors:C}=x,$=m(g,p,u);l(S,$),T||C||c(x,o.default.vErrors)}e.reportExtraError=i;function s(g,p){g.assign(o.default.errors,p),g.if((0,t._)`${o.default.vErrors} !== null`,()=>g.if(p,()=>g.assign((0,t._)`${o.default.vErrors}.length`,p),()=>g.assign(o.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:g,keyword:p,schemaValue:u,data:x,errsCount:S,it:T}){if(S===void 0)throw new Error("ajv implementation error");const C=g.name("err");g.forRange("i",S,o.default.errors,$=>{g.const(C,(0,t._)`${o.default.vErrors}[${$}]`),g.if((0,t._)`${C}.instancePath === undefined`,()=>g.assign((0,t._)`${C}.instancePath`,(0,t.strConcat)(o.default.instancePath,T.errorPath))),g.assign((0,t._)`${C}.schemaPath`,(0,t.str)`${T.errSchemaPath}/${p}`),T.opts.verbose&&(g.assign((0,t._)`${C}.schema`,u),g.assign((0,t._)`${C}.data`,x))})}e.extendErrors=a;function l(g,p){const u=g.const("err",p);g.if((0,t._)`${o.default.vErrors} === null`,()=>g.assign(o.default.vErrors,(0,t._)`[${u}]`),(0,t._)`${o.default.vErrors}.push(${u})`),g.code((0,t._)`${o.default.errors}++`)}function c(g,p){const{gen:u,validateName:x,schemaEnv:S}=g;S.$async?u.throw((0,t._)`new ${g.ValidationError}(${p})`):(u.assign((0,t._)`${x}.errors`,p),u.return(!1))}const f={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(g,p,u){const{createErrors:x}=g.it;return x===!1?(0,t._)`{}`:v(g,p,u)}function v(g,p,u={}){const{gen:x,it:S}=g,T=[h(S,u),y(g,u)];return b(g,p,T),x.object(...T)}function h({errorPath:g},{instancePath:p}){const u=p?(0,t.str)`${g}${(0,n.getErrorPath)(p,n.Type.Str)}`:g;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,u)]}function y({keyword:g,it:{errSchemaPath:p}},{schemaPath:u,parentSchema:x}){let S=x?p:(0,t.str)`${p}/${g}`;return u&&(S=(0,t.str)`${S}${(0,n.getErrorPath)(u,n.Type.Str)}`),[f.schemaPath,S]}function b(g,{params:p,message:u},x){const{keyword:S,data:T,schemaValue:C,it:$}=g,{opts:j,propertyName:A,topSchemaRef:E,schemaPath:q}=$;x.push([f.keyword,S],[f.params,typeof p=="function"?p(g):p||(0,t._)`{}`]),j.messages&&x.push([f.message,typeof u=="function"?u(g):u]),j.verbose&&x.push([f.schema,C],[f.parentSchema,(0,t._)`${E}${q}`],[o.default.data,T]),A&&x.push([f.propertyName,A])}})(Ns);Object.defineProperty(Vr,"__esModule",{value:!0});Vr.boolOrEmptySchema=Vr.topBoolOrEmptySchema=void 0;const YS=Ns,XS=ue,ZS=Dt,e$={message:"boolean schema is false"};function t$(e){const{gen:t,schema:n,validateName:o}=e;n===!1?Dv(e,!1):typeof n=="object"&&n.$async===!0?t.return(ZS.default.data):(t.assign((0,XS._)`${o}.errors`,null),t.return(!0))}Vr.topBoolOrEmptySchema=t$;function n$(e,t){const{gen:n,schema:o}=e;o===!1?(n.var(t,!1),Dv(e)):n.var(t,!0)}Vr.boolOrEmptySchema=n$;function Dv(e,t){const{gen:n,data:o}=e,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,YS.reportError)(r,e$,void 0,t)}var et={},Go={};Object.defineProperty(Go,"__esModule",{value:!0});Go.getRules=Go.isJSONType=void 0;const o$=["string","number","integer","boolean","null","object","array"],r$=new Set(o$);function i$(e){return typeof e=="string"&&r$.has(e)}Go.isJSONType=i$;function s$(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Go.getRules=s$;var An={};Object.defineProperty(An,"__esModule",{value:!0});An.shouldUseRule=An.shouldUseGroup=An.schemaHasRulesForType=void 0;function a$({schema:e,self:t},n){const o=t.RULES.types[n];return o&&o!==!0&&zv(e,o)}An.schemaHasRulesForType=a$;function zv(e,t){return t.rules.some(n=>Fv(e,n))}An.shouldUseGroup=zv;function Fv(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(o=>e[o]!==void 0))}An.shouldUseRule=Fv;Object.defineProperty(et,"__esModule",{value:!0});et.reportTypeError=et.checkDataTypes=et.checkDataType=et.coerceAndCheckDataType=et.getJSONTypes=et.getSchemaTypes=et.DataType=void 0;const l$=Go,c$=An,d$=Ns,fe=ue,Bv=Q;var Ir;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ir||(et.DataType=Ir={}));function u$(e){const t=Hv(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}et.getSchemaTypes=u$;function Hv(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(l$.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}et.getJSONTypes=Hv;function p$(e,t){const{gen:n,data:o,opts:r}=e,i=f$(t,r.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,c$.schemaHasRulesForType)(e,t[0]));if(s){const a=tp(t,o,r.strictNumbers,Ir.Wrong);n.if(a,()=>{i.length?m$(e,t,i):np(e)})}return s}et.coerceAndCheckDataType=p$;const Vv=new Set(["string","number","integer","boolean","null"]);function f$(e,t){return t?e.filter(n=>Vv.has(n)||t==="array"&&n==="array"):[]}function m$(e,t,n){const{gen:o,data:r,opts:i}=e,s=o.let("dataType",(0,fe._)`typeof ${r}`),a=o.let("coerced",(0,fe._)`undefined`);i.coerceTypes==="array"&&o.if((0,fe._)`${s} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,(0,fe._)`${r}[0]`).assign(s,(0,fe._)`typeof ${r}`).if(tp(t,r,i.strictNumbers),()=>o.assign(a,r))),o.if((0,fe._)`${a} !== undefined`);for(const c of n)(Vv.has(c)||c==="array"&&i.coerceTypes==="array")&&l(c);o.else(),np(e),o.endIf(),o.if((0,fe._)`${a} !== undefined`,()=>{o.assign(r,a),h$(e,a)});function l(c){switch(c){case"string":o.elseIf((0,fe._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,fe._)`"" + ${r}`).elseIf((0,fe._)`${r} === null`).assign(a,(0,fe._)`""`);return;case"number":o.elseIf((0,fe._)`${s} == "boolean" || ${r} === null
|
|
1760
|
+
|| (${s} == "string" && ${r} && ${r} == +${r})`).assign(a,(0,fe._)`+${r}`);return;case"integer":o.elseIf((0,fe._)`${s} === "boolean" || ${r} === null
|
|
1761
|
+
|| (${s} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(a,(0,fe._)`+${r}`);return;case"boolean":o.elseIf((0,fe._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(a,!1).elseIf((0,fe._)`${r} === "true" || ${r} === 1`).assign(a,!0);return;case"null":o.elseIf((0,fe._)`${r} === "" || ${r} === 0 || ${r} === false`),o.assign(a,null);return;case"array":o.elseIf((0,fe._)`${s} === "string" || ${s} === "number"
|
|
1762
|
+
|| ${s} === "boolean" || ${r} === null`).assign(a,(0,fe._)`[${r}]`)}}}function h$({gen:e,parentData:t,parentDataProperty:n},o){e.if((0,fe._)`${t} !== undefined`,()=>e.assign((0,fe._)`${t}[${n}]`,o))}function Md(e,t,n,o=Ir.Correct){const r=o===Ir.Correct?fe.operators.EQ:fe.operators.NEQ;let i;switch(e){case"null":return(0,fe._)`${t} ${r} null`;case"array":i=(0,fe._)`Array.isArray(${t})`;break;case"object":i=(0,fe._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,fe._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,fe._)`typeof ${t} ${r} ${e}`}return o===Ir.Correct?i:(0,fe.not)(i);function s(a=fe.nil){return(0,fe.and)((0,fe._)`typeof ${t} == "number"`,a,n?(0,fe._)`isFinite(${t})`:fe.nil)}}et.checkDataType=Md;function tp(e,t,n,o){if(e.length===1)return Md(e[0],t,n,o);let r;const i=(0,Bv.toHash)(e);if(i.array&&i.object){const s=(0,fe._)`typeof ${t} != "object"`;r=i.null?s:(0,fe._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else r=fe.nil;i.number&&delete i.integer;for(const s in i)r=(0,fe.and)(r,Md(s,t,n,o));return r}et.checkDataTypes=tp;const y$={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,fe._)`{type: ${e}}`:(0,fe._)`{type: ${t}}`};function np(e){const t=g$(e);(0,d$.reportError)(t,y$)}et.reportTypeError=np;function g$(e){const{gen:t,data:n,schema:o}=e,r=(0,Bv.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:n,schema:o.type,schemaCode:r,schemaValue:r,parentSchema:o,params:{},it:e}}var El={};Object.defineProperty(El,"__esModule",{value:!0});El.assignDefaults=void 0;const ir=ue,v$=Q;function b$(e,t){const{properties:n,items:o}=e.schema;if(t==="object"&&n)for(const r in n)Dm(e,r,n[r].default);else t==="array"&&Array.isArray(o)&&o.forEach((r,i)=>Dm(e,i,r.default))}El.assignDefaults=b$;function Dm(e,t,n){const{gen:o,compositeRule:r,data:i,opts:s}=e;if(n===void 0)return;const a=(0,ir._)`${i}${(0,ir.getProperty)(t)}`;if(r){(0,v$.checkStrictMode)(e,`default is ignored for: ${a}`);return}let l=(0,ir._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,ir._)`${l} || ${a} === null || ${a} === ""`),o.if(l,(0,ir._)`${a} = ${(0,ir.stringify)(n)}`)}var bn={},ye={};Object.defineProperty(ye,"__esModule",{value:!0});ye.validateUnion=ye.validateArray=ye.usePattern=ye.callValidateCode=ye.schemaProperties=ye.allSchemaProperties=ye.noPropertyInData=ye.propertyInData=ye.isOwnProperty=ye.hasPropFunc=ye.reportMissingProp=ye.checkMissingProp=ye.checkReportMissingProp=void 0;const Ae=ue,op=Q,Kn=Dt,x$=Q;function w$(e,t){const{gen:n,data:o,it:r}=e;n.if(ip(n,o,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ae._)`${t}`},!0),e.error()})}ye.checkReportMissingProp=w$;function S$({gen:e,data:t,it:{opts:n}},o,r){return(0,Ae.or)(...o.map(i=>(0,Ae.and)(ip(e,t,i,n.ownProperties),(0,Ae._)`${r} = ${i}`)))}ye.checkMissingProp=S$;function $$(e,t){e.setParams({missingProperty:t},!0),e.error()}ye.reportMissingProp=$$;function Wv(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ae._)`Object.prototype.hasOwnProperty`})}ye.hasPropFunc=Wv;function rp(e,t,n){return(0,Ae._)`${Wv(e)}.call(${t}, ${n})`}ye.isOwnProperty=rp;function k$(e,t,n,o){const r=(0,Ae._)`${t}${(0,Ae.getProperty)(n)} !== undefined`;return o?(0,Ae._)`${r} && ${rp(e,t,n)}`:r}ye.propertyInData=k$;function ip(e,t,n,o){const r=(0,Ae._)`${t}${(0,Ae.getProperty)(n)} === undefined`;return o?(0,Ae.or)(r,(0,Ae.not)(rp(e,t,n))):r}ye.noPropertyInData=ip;function Kv(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ye.allSchemaProperties=Kv;function T$(e,t){return Kv(t).filter(n=>!(0,op.alwaysValidSchema)(e,t[n]))}ye.schemaProperties=T$;function _$({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:r,errorPath:i},it:s},a,l,c){const f=c?(0,Ae._)`${e}, ${t}, ${o}${r}`:t,m=[[Kn.default.instancePath,(0,Ae.strConcat)(Kn.default.instancePath,i)],[Kn.default.parentData,s.parentData],[Kn.default.parentDataProperty,s.parentDataProperty],[Kn.default.rootData,Kn.default.rootData]];s.opts.dynamicRef&&m.push([Kn.default.dynamicAnchors,Kn.default.dynamicAnchors]);const v=(0,Ae._)`${f}, ${n.object(...m)}`;return l!==Ae.nil?(0,Ae._)`${a}.call(${l}, ${v})`:(0,Ae._)`${a}(${v})`}ye.callValidateCode=_$;const j$=(0,Ae._)`new RegExp`;function N$({gen:e,it:{opts:t}},n){const o=t.unicodeRegExp?"u":"",{regExp:r}=t.code,i=r(n,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Ae._)`${r.code==="new RegExp"?j$:(0,x$.useFunc)(e,r)}(${n}, ${o})`})}ye.usePattern=N$;function C$(e){const{gen:t,data:n,keyword:o,it:r}=e,i=t.name("valid");if(r.allErrors){const a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){const l=t.const("len",(0,Ae._)`${n}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:o,dataProp:c,dataPropType:op.Type.Num},i),t.if((0,Ae.not)(i),a)})}}ye.validateArray=C$;function E$(e){const{gen:t,schema:n,keyword:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,op.alwaysValidSchema)(r,l))&&!r.opts.unevaluated)return;const s=t.let("valid",!1),a=t.name("_valid");t.block(()=>n.forEach((l,c)=>{const f=e.subschema({keyword:o,schemaProp:c,compositeRule:!0},a);t.assign(s,(0,Ae._)`${s} || ${a}`),e.mergeValidEvaluated(f,a)||t.if((0,Ae.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}ye.validateUnion=E$;Object.defineProperty(bn,"__esModule",{value:!0});bn.validateKeywordUsage=bn.validSchemaType=bn.funcKeywordCode=bn.macroKeywordCode=void 0;const bt=ue,Po=Dt,P$=ye,I$=Ns;function O$(e,t){const{gen:n,keyword:o,schema:r,parentSchema:i,it:s}=e,a=t.macro.call(s.self,r,i,s),l=Gv(n,o,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);const c=n.name("valid");e.subschema({schema:a,schemaPath:bt.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}bn.macroKeywordCode=O$;function R$(e,t){var n;const{gen:o,keyword:r,schema:i,parentSchema:s,$data:a,it:l}=e;M$(l,t);const c=!a&&t.compile?t.compile.call(l.self,i,s,l):t.validate,f=Gv(o,r,c),m=o.let("valid");e.block$data(m,v),e.ok((n=t.valid)!==null&&n!==void 0?n:m);function v(){if(t.errors===!1)b(),t.modifying&&zm(e),g(()=>e.error());else{const p=t.async?h():y();t.modifying&&zm(e),g(()=>A$(e,p))}}function h(){const p=o.let("ruleErrs",null);return o.try(()=>b((0,bt._)`await `),u=>o.assign(m,!1).if((0,bt._)`${u} instanceof ${l.ValidationError}`,()=>o.assign(p,(0,bt._)`${u}.errors`),()=>o.throw(u))),p}function y(){const p=(0,bt._)`${f}.errors`;return o.assign(p,null),b(bt.nil),p}function b(p=t.async?(0,bt._)`await `:bt.nil){const u=l.opts.passContext?Po.default.this:Po.default.self,x=!("compile"in t&&!a||t.schema===!1);o.assign(m,(0,bt._)`${p}${(0,P$.callValidateCode)(e,f,u,x)}`,t.modifying)}function g(p){var u;o.if((0,bt.not)((u=t.valid)!==null&&u!==void 0?u:m),p)}}bn.funcKeywordCode=R$;function zm(e){const{gen:t,data:n,it:o}=e;t.if(o.parentData,()=>t.assign(n,(0,bt._)`${o.parentData}[${o.parentDataProperty}]`))}function A$(e,t){const{gen:n}=e;n.if((0,bt._)`Array.isArray(${t})`,()=>{n.assign(Po.default.vErrors,(0,bt._)`${Po.default.vErrors} === null ? ${t} : ${Po.default.vErrors}.concat(${t})`).assign(Po.default.errors,(0,bt._)`${Po.default.vErrors}.length`),(0,I$.extendErrors)(e)},()=>e.error())}function M$({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Gv(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,bt.stringify)(n)})}function q$(e,t,n=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||n&&typeof e>"u")}bn.validSchemaType=q$;function U$({schema:e,opts:t,self:n,errSchemaPath:o},r,i){if(Array.isArray(r.keyword)?!r.keyword.includes(i):r.keyword!==i)throw new Error("ajv implementation error");const s=r.dependencies;if(s!=null&&s.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[i])){const l=`keyword "${i}" value is invalid at path "${o}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}bn.validateKeywordUsage=U$;var yo={};Object.defineProperty(yo,"__esModule",{value:!0});yo.extendSubschemaMode=yo.extendSubschemaData=yo.getSubschema=void 0;const vn=ue,Jv=Q;function L$(e,{keyword:t,schemaProp:n,schema:o,schemaPath:r,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const a=e.schema[t];return n===void 0?{schema:a,schemaPath:(0,vn._)`${e.schemaPath}${(0,vn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[n],schemaPath:(0,vn._)`${e.schemaPath}${(0,vn.getProperty)(t)}${(0,vn.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Jv.escapeFragment)(n)}`}}if(o!==void 0){if(r===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:r,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}yo.getSubschema=L$;function D$(e,t,{dataProp:n,dataPropType:o,data:r,dataTypes:i,propertyName:s}){if(r!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(n!==void 0){const{errorPath:c,dataPathArr:f,opts:m}=t,v=a.let("data",(0,vn._)`${t.data}${(0,vn.getProperty)(n)}`,!0);l(v),e.errorPath=(0,vn.str)`${c}${(0,Jv.getErrorPath)(n,o,m.jsPropertySyntax)}`,e.parentDataProperty=(0,vn._)`${n}`,e.dataPathArr=[...f,e.parentDataProperty]}if(r!==void 0){const c=r instanceof vn.Name?r:a.let("data",r,!0);l(c),s!==void 0&&(e.propertyName=s)}i&&(e.dataTypes=i);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}yo.extendSubschemaData=D$;function z$(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:o,createErrors:r,allErrors:i}){o!==void 0&&(e.compositeRule=o),r!==void 0&&(e.createErrors=r),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=n}yo.extendSubschemaMode=z$;var lt={},Qv=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;r--!==0;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},Yv={exports:{}},so=Yv.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var o=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};va(t,o,r,e,"",e)};so.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};so.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};so.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};so.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function va(e,t,n,o,r,i,s,a,l,c){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,r,i,s,a,l,c);for(var f in o){var m=o[f];if(Array.isArray(m)){if(f in so.arrayKeywords)for(var v=0;v<m.length;v++)va(e,t,n,m[v],r+"/"+f+"/"+v,i,r,f,o,v)}else if(f in so.propsKeywords){if(m&&typeof m=="object")for(var h in m)va(e,t,n,m[h],r+"/"+f+"/"+F$(h),i,r,f,o,h)}else(f in so.keywords||e.allKeys&&!(f in so.skipKeywords))&&va(e,t,n,m,r+"/"+f,i,r,f,o)}n(o,r,i,s,a,l,c)}}function F$(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var B$=Yv.exports;Object.defineProperty(lt,"__esModule",{value:!0});lt.getSchemaRefs=lt.resolveUrl=lt.normalizeId=lt._getFullPath=lt.getFullPath=lt.inlineRef=void 0;const H$=Q,V$=Qv,W$=B$,K$=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function G$(e,t=!0){return typeof e=="boolean"?!0:t===!0?!qd(e):t?Xv(e)<=t:!1}lt.inlineRef=G$;const J$=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function qd(e){for(const t in e){if(J$.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(qd)||typeof n=="object"&&qd(n))return!0}return!1}function Xv(e){let t=0;for(const n in e){if(n==="$ref")return 1/0;if(t++,!K$.has(n)&&(typeof e[n]=="object"&&(0,H$.eachItem)(e[n],o=>t+=Xv(o)),t===1/0))return 1/0}return t}function Zv(e,t="",n){n!==!1&&(t=Or(t));const o=e.parse(t);return eb(e,o)}lt.getFullPath=Zv;function eb(e,t){return e.serialize(t).split("#")[0]+"#"}lt._getFullPath=eb;const Q$=/#\/?$/;function Or(e){return e?e.replace(Q$,""):""}lt.normalizeId=Or;function Y$(e,t,n){return n=Or(n),e.resolve(t,n)}lt.resolveUrl=Y$;const X$=/^[a-z_][-a-z0-9._]*$/i;function Z$(e,t){if(typeof e=="boolean")return{};const{schemaId:n,uriResolver:o}=this.opts,r=Or(e[n]||t),i={"":r},s=Zv(o,r,!1),a={},l=new Set;return W$(e,{allKeys:!0},(m,v,h,y)=>{if(y===void 0)return;const b=s+v;let g=i[y];typeof m[n]=="string"&&(g=p.call(this,m[n])),u.call(this,m.$anchor),u.call(this,m.$dynamicAnchor),i[v]=g;function p(x){const S=this.opts.uriResolver.resolve;if(x=Or(g?S(g,x):x),l.has(x))throw f(x);l.add(x);let T=this.refs[x];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?c(m,T.schema,x):x!==Or(b)&&(x[0]==="#"?(c(m,a[x],x),a[x]=m):this.refs[x]=b),x}function u(x){if(typeof x=="string"){if(!X$.test(x))throw new Error(`invalid anchor "${x}"`);p.call(this,`#${x}`)}}}),a;function c(m,v,h){if(v!==void 0&&!V$(m,v))throw f(h)}function f(m){return new Error(`reference "${m}" resolves to more than one schema`)}}lt.getSchemaRefs=Z$;Object.defineProperty(ln,"__esModule",{value:!0});ln.getData=ln.KeywordCxt=ln.validateFunctionCode=void 0;const tb=Vr,Fm=et,sp=An,nl=et,ek=El,Ui=bn,gc=yo,re=ue,le=Dt,tk=lt,Mn=Q,hi=Ns;function nk(e){if(rb(e)&&(ib(e),ob(e))){ik(e);return}nb(e,()=>(0,tb.topBoolOrEmptySchema)(e))}ln.validateFunctionCode=nk;function nb({gen:e,validateName:t,schema:n,schemaEnv:o,opts:r},i){r.code.es5?e.func(t,(0,re._)`${le.default.data}, ${le.default.valCxt}`,o.$async,()=>{e.code((0,re._)`"use strict"; ${Bm(n,r)}`),rk(e,r),e.code(i)}):e.func(t,(0,re._)`${le.default.data}, ${ok(r)}`,o.$async,()=>e.code(Bm(n,r)).code(i))}function ok(e){return(0,re._)`{${le.default.instancePath}="", ${le.default.parentData}, ${le.default.parentDataProperty}, ${le.default.rootData}=${le.default.data}${e.dynamicRef?(0,re._)`, ${le.default.dynamicAnchors}={}`:re.nil}}={}`}function rk(e,t){e.if(le.default.valCxt,()=>{e.var(le.default.instancePath,(0,re._)`${le.default.valCxt}.${le.default.instancePath}`),e.var(le.default.parentData,(0,re._)`${le.default.valCxt}.${le.default.parentData}`),e.var(le.default.parentDataProperty,(0,re._)`${le.default.valCxt}.${le.default.parentDataProperty}`),e.var(le.default.rootData,(0,re._)`${le.default.valCxt}.${le.default.rootData}`),t.dynamicRef&&e.var(le.default.dynamicAnchors,(0,re._)`${le.default.valCxt}.${le.default.dynamicAnchors}`)},()=>{e.var(le.default.instancePath,(0,re._)`""`),e.var(le.default.parentData,(0,re._)`undefined`),e.var(le.default.parentDataProperty,(0,re._)`undefined`),e.var(le.default.rootData,le.default.data),t.dynamicRef&&e.var(le.default.dynamicAnchors,(0,re._)`{}`)})}function ik(e){const{schema:t,opts:n,gen:o}=e;nb(e,()=>{n.$comment&&t.$comment&&ab(e),dk(e),o.let(le.default.vErrors,null),o.let(le.default.errors,0),n.unevaluated&&sk(e),sb(e),fk(e)})}function sk(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,re._)`${n}.evaluated`),t.if((0,re._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,re._)`${e.evaluated}.props`,(0,re._)`undefined`)),t.if((0,re._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,re._)`${e.evaluated}.items`,(0,re._)`undefined`))}function Bm(e,t){const n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,re._)`/*# sourceURL=${n} */`:re.nil}function ak(e,t){if(rb(e)&&(ib(e),ob(e))){lk(e,t);return}(0,tb.boolOrEmptySchema)(e,t)}function ob({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function rb(e){return typeof e.schema!="boolean"}function lk(e,t){const{schema:n,gen:o,opts:r}=e;r.$comment&&n.$comment&&ab(e),uk(e),pk(e);const i=o.const("_errs",le.default.errors);sb(e,i),o.var(t,(0,re._)`${i} === ${le.default.errors}`)}function ib(e){(0,Mn.checkUnknownRules)(e),ck(e)}function sb(e,t){if(e.opts.jtd)return Hm(e,[],!1,t);const n=(0,Fm.getSchemaTypes)(e.schema),o=(0,Fm.coerceAndCheckDataType)(e,n);Hm(e,n,!o,t)}function ck(e){const{schema:t,errSchemaPath:n,opts:o,self:r}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,Mn.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function dk(e){const{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Mn.checkStrictMode)(e,"default is ignored in the schema root")}function uk(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,tk.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function pk(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function ab({gen:e,schemaEnv:t,schema:n,errSchemaPath:o,opts:r}){const i=n.$comment;if(r.$comment===!0)e.code((0,re._)`${le.default.self}.logger.log(${i})`);else if(typeof r.$comment=="function"){const s=(0,re.str)`${o}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,re._)`${le.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function fk(e){const{gen:t,schemaEnv:n,validateName:o,ValidationError:r,opts:i}=e;n.$async?t.if((0,re._)`${le.default.errors} === 0`,()=>t.return(le.default.data),()=>t.throw((0,re._)`new ${r}(${le.default.vErrors})`)):(t.assign((0,re._)`${o}.errors`,le.default.vErrors),i.unevaluated&&mk(e),t.return((0,re._)`${le.default.errors} === 0`))}function mk({gen:e,evaluated:t,props:n,items:o}){n instanceof re.Name&&e.assign((0,re._)`${t}.props`,n),o instanceof re.Name&&e.assign((0,re._)`${t}.items`,o)}function Hm(e,t,n,o){const{gen:r,schema:i,data:s,allErrors:a,opts:l,self:c}=e,{RULES:f}=c;if(i.$ref&&(l.ignoreKeywordsWithRef||!(0,Mn.schemaHasRulesButRef)(i,f))){r.block(()=>db(e,"$ref",f.all.$ref.definition));return}l.jtd||hk(e,t),r.block(()=>{for(const v of f.rules)m(v);m(f.post)});function m(v){(0,sp.shouldUseGroup)(i,v)&&(v.type?(r.if((0,nl.checkDataType)(v.type,s,l.strictNumbers)),Vm(e,v),t.length===1&&t[0]===v.type&&n&&(r.else(),(0,nl.reportTypeError)(e)),r.endIf()):Vm(e,v),a||r.if((0,re._)`${le.default.errors} === ${o||0}`))}}function Vm(e,t){const{gen:n,schema:o,opts:{useDefaults:r}}=e;r&&(0,ek.assignDefaults)(e,t.type),n.block(()=>{for(const i of t.rules)(0,sp.shouldUseRule)(o,i)&&db(e,i.keyword,i.definition,t.type)})}function hk(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(yk(e,t),e.opts.allowUnionTypes||gk(e,t),vk(e,e.dataTypes))}function yk(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{lb(e.dataTypes,n)||ap(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),xk(e,t)}}function gk(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ap(e,"use allowUnionTypes to allow union type keyword")}function vk(e,t){const n=e.self.RULES.all;for(const o in n){const r=n[o];if(typeof r=="object"&&(0,sp.shouldUseRule)(e.schema,r)){const{type:i}=r.definition;i.length&&!i.some(s=>bk(t,s))&&ap(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function bk(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function lb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function xk(e,t){const n=[];for(const o of e.dataTypes)lb(t,o)?n.push(o):t.includes("integer")&&o==="number"&&n.push("integer");e.dataTypes=n}function ap(e,t){const n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,Mn.checkStrictMode)(e,t,e.opts.strictTypes)}class cb{constructor(t,n,o){if((0,Ui.validateKeywordUsage)(t,n,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Mn.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",ub(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ui.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",le.default.errors))}result(t,n,o){this.failResult((0,re.not)(t),n,o)}failResult(t,n,o){this.gen.if(t),o?o():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,re.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:n}=this;this.fail((0,re._)`${n} !== undefined && (${(0,re.or)(this.invalid$data(),t)})`)}error(t,n,o){if(n){this.setParams(n),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,n){(t?hi.reportExtraError:hi.reportError)(this,this.def.error,n)}$dataError(){(0,hi.reportError)(this,this.def.$dataError||hi.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,hi.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,o=re.nil){this.gen.block(()=>{this.check$data(t,o),n()})}check$data(t=re.nil,n=re.nil){if(!this.$data)return;const{gen:o,schemaCode:r,schemaType:i,def:s}=this;o.if((0,re.or)((0,re._)`${r} === undefined`,n)),t!==re.nil&&o.assign(t,!0),(i.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==re.nil&&o.assign(t,!1)),o.else()}invalid$data(){const{gen:t,schemaCode:n,schemaType:o,def:r,it:i}=this;return(0,re.or)(s(),a());function s(){if(o.length){if(!(n instanceof re.Name))throw new Error("ajv implementation error");const l=Array.isArray(o)?o:[o];return(0,re._)`${(0,nl.checkDataTypes)(l,n,i.opts.strictNumbers,nl.DataType.Wrong)}`}return re.nil}function a(){if(r.validateSchema){const l=t.scopeValue("validate$data",{ref:r.validateSchema});return(0,re._)`!${l}(${n})`}return re.nil}}subschema(t,n){const o=(0,gc.getSubschema)(this.it,t);(0,gc.extendSubschemaData)(o,this.it,t),(0,gc.extendSubschemaMode)(o,t);const r={...this.it,...o,items:void 0,props:void 0};return ak(r,n),r}mergeEvaluated(t,n){const{it:o,gen:r}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=Mn.mergeEvaluated.props(r,t.props,o.props,n)),o.items!==!0&&t.items!==void 0&&(o.items=Mn.mergeEvaluated.items(r,t.items,o.items,n)))}mergeValidEvaluated(t,n){const{it:o,gen:r}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return r.if(n,()=>this.mergeEvaluated(t,re.Name)),!0}}ln.KeywordCxt=cb;function db(e,t,n,o){const r=new cb(e,n,t);"code"in n?n.code(r,o):r.$data&&n.validate?(0,Ui.funcKeywordCode)(r,n):"macro"in n?(0,Ui.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,Ui.funcKeywordCode)(r,n)}const wk=/^\/(?:[^~]|~0|~1)*$/,Sk=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ub(e,{dataLevel:t,dataNames:n,dataPathArr:o}){let r,i;if(e==="")return le.default.rootData;if(e[0]==="/"){if(!wk.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,i=le.default.rootData}else{const c=Sk.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const f=+c[1];if(r=c[2],r==="#"){if(f>=t)throw new Error(l("property/index",f));return o[t-f]}if(f>t)throw new Error(l("data",f));if(i=n[t-f],!r)return i}let s=i;const a=r.split("/");for(const c of a)c&&(i=(0,re._)`${i}${(0,re.getProperty)((0,Mn.unescapeJsonPointer)(c))}`,s=(0,re._)`${s} && ${i}`);return s;function l(c,f){return`Cannot access ${c} ${f} levels up, current level is ${t}`}}ln.getData=ub;var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});class $k extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Cs.default=$k;var Yr={};Object.defineProperty(Yr,"__esModule",{value:!0});const vc=lt;class kk extends Error{constructor(t,n,o,r){super(r||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,vc.resolveUrl)(t,n,o),this.missingSchema=(0,vc.normalizeId)((0,vc.getFullPath)(t,this.missingRef))}}Yr.default=kk;var xt={};Object.defineProperty(xt,"__esModule",{value:!0});xt.resolveSchema=xt.getCompilingSchema=xt.resolveRef=xt.compileSchema=xt.SchemaEnv=void 0;const Zt=ue,Tk=Cs,jo=Dt,rn=lt,Wm=Q,_k=ln;class Pl{constructor(t){var n;this.refs={},this.dynamicAnchors={};let o;typeof t.schema=="object"&&(o=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,rn.normalizeId)(o==null?void 0:o[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o==null?void 0:o.$async,this.refs={}}}xt.SchemaEnv=Pl;function lp(e){const t=pb.call(this,e);if(t)return t;const n=(0,rn.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:r}=this.opts.code,{ownProperties:i}=this.opts,s=new Zt.CodeGen(this.scope,{es5:o,lines:r,ownProperties:i});let a;e.$async&&(a=s.scopeValue("Error",{ref:Tk.default,code:(0,Zt._)`require("ajv/dist/runtime/validation_error").default`}));const l=s.scopeName("validate");e.validateName=l;const c={gen:s,allErrors:this.opts.allErrors,data:jo.default.data,parentData:jo.default.parentData,parentDataProperty:jo.default.parentDataProperty,dataNames:[jo.default.data],dataPathArr:[Zt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Zt.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:Zt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Zt._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(e),(0,_k.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);const m=s.toString();f=`${s.scopeRefs(jo.default.scope)}return ${m}`,this.opts.code.process&&(f=this.opts.code.process(f,e));const h=new Function(`${jo.default.self}`,`${jo.default.scope}`,f)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:l,validateCode:m,scopeValues:s._values}),this.opts.unevaluated){const{props:y,items:b}=c;h.evaluated={props:y instanceof Zt.Name?void 0:y,items:b instanceof Zt.Name?void 0:b,dynamicProps:y instanceof Zt.Name,dynamicItems:b instanceof Zt.Name},h.source&&(h.source.evaluated=(0,Zt.stringify)(h.evaluated))}return e.validate=h,e}catch(m){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),m}finally{this._compilations.delete(e)}}xt.compileSchema=lp;function jk(e,t,n){var o;n=(0,rn.resolveUrl)(this.opts.uriResolver,t,n);const r=e.refs[n];if(r)return r;let i=Ek.call(this,e,n);if(i===void 0){const s=(o=e.localRefs)===null||o===void 0?void 0:o[n],{schemaId:a}=this.opts;s&&(i=new Pl({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[n]=Nk.call(this,i)}xt.resolveRef=jk;function Nk(e){return(0,rn.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:lp.call(this,e)}function pb(e){for(const t of this._compilations)if(Ck(t,e))return t}xt.getCompilingSchema=pb;function Ck(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Ek(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||Il.call(this,e,t)}function Il(e,t){const n=this.opts.uriResolver.parse(t),o=(0,rn._getFullPath)(this.opts.uriResolver,n);let r=(0,rn.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===r)return bc.call(this,n,e);const i=(0,rn.normalizeId)(o),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){const a=Il.call(this,e,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:bc.call(this,n,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||lp.call(this,s),i===(0,rn.normalizeId)(t)){const{schema:a}=s,{schemaId:l}=this.opts,c=a[l];return c&&(r=(0,rn.resolveUrl)(this.opts.uriResolver,r,c)),new Pl({schema:a,schemaId:l,root:e,baseId:r})}return bc.call(this,n,s)}}xt.resolveSchema=Il;const Pk=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function bc(e,{baseId:t,schema:n,root:o}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(const a of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,Wm.unescapeFragment)(a)];if(l===void 0)return;n=l;const c=typeof n=="object"&&n[this.opts.schemaId];!Pk.has(a)&&c&&(t=(0,rn.resolveUrl)(this.opts.uriResolver,t,c))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,Wm.schemaHasRulesButRef)(n,this.RULES)){const a=(0,rn.resolveUrl)(this.opts.uriResolver,t,n.$ref);i=Il.call(this,o,a)}const{schemaId:s}=this.opts;if(i=i||new Pl({schema:n,schemaId:s,root:o,baseId:t}),i.schema!==i.root.schema)return i}const Ik="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Ok="Meta-schema for $data reference (JSON AnySchema extension proposal)",Rk="object",Ak=["$data"],Mk={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},qk=!1,Uk={$id:Ik,description:Ok,type:Rk,required:Ak,properties:Mk,additionalProperties:qk};var cp={},Ol={exports:{}};const Lk=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),fb=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),dp=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),mb=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Dk=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function hb(e){let t="",n=0,o=0;for(o=0;o<e.length;o++)if(n=e[o].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(n=e[o].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o]}return t}const zk=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Km(e){return e.length=0,!0}function Fk(e,t,n){if(e.length){const o=hb(e);if(o!=="")t.push(o);else return n.error=!0,!1;e.length=0}return!0}function Bk(e){let t=0;const n={error:!1,address:"",zone:""},o=[],r=[];let i=!1,s=!1,a=Fk;for(let l=0;l<e.length;l++){const c=e[l];if(!(c==="["||c==="]"))if(c===":"){if(i===!0&&(s=!0),!a(r,o,n))break;if(++t>7){n.error=!0;break}l>0&&e[l-1]===":"&&(i=!0),o.push(":");continue}else if(c==="%"){if(!a(r,o,n))break;a=Km}else{r.push(c);continue}}return r.length&&(a===Km?n.zone=r.join(""):s?o.push(r.join("")):o.push(hb(r))),n.address=o.join(""),n}function yb(e){if(Hk(e,":")<2)return{host:e,isIPV6:!1};const t=Bk(e);if(t.error)return{host:e,isIPV6:!1};{let n=t.address,o=t.address;return t.zone&&(n+="%"+t.zone,o+="%25"+t.zone),{host:n,isIPV6:!0,escapedHost:o}}}function Hk(e,t){let n=0;for(let o=0;o<e.length;o++)e[o]===t&&n++;return n}function Vk(e){let t=e;const n=[];let o=-1,r=0;for(;r=t.length;){if(r===1){if(t===".")break;if(t==="/"){n.push("/");break}else{n.push(t);break}}else if(r===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){n.push("/");break}}else if(r===3&&t==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),n.length!==0&&n.pop();continue}}if((o=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,o)),t=t.slice(o)}return n.join("")}const Wk={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Kk=/[@/?#:]/g,Gk=/[@/?#]/g;function gb(e,t){const n=t?Gk:Kk;return n.lastIndex=0,e.replace(n,o=>Wk[o])}function Jk(e,t=!1){if(e.indexOf("%")===-1)return e;let n="";for(let o=0;o<e.length;o++){if(e[o]==="%"&&o+2<e.length){const r=e.slice(o+1,o+3);if(dp(r)){const i=r.toUpperCase(),s=String.fromCharCode(parseInt(i,16));t&&mb(s)?n+=s:n+="%"+i,o+=2;continue}}n+=e[o]}return n}function Qk(e){let t="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){const o=e.slice(n+1,n+3);if(dp(o)){const r=o.toUpperCase(),i=String.fromCharCode(parseInt(r,16));i!=="."&&mb(i)?t+=i:t+="%"+r,n+=2;continue}}Dk(e[n])?t+=e[n]:t+=escape(e[n])}return t}function Yk(e){let t="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){const o=e.slice(n+1,n+3);if(dp(o)){t+="%"+o.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function Xk(e){const t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let n=unescape(e.host);if(!fb(n)){const o=yb(n);o.isIPV6===!0?n=`[${o.escapedHost}]`:n=gb(n,!1)}t.push(n)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}var vb={nonSimpleDomain:zk,recomposeAuthority:Xk,reescapeHostDelimiters:gb,normalizePercentEncoding:Jk,normalizePathEncoding:Qk,escapePreservingEscapes:Yk,removeDotSegments:Vk,isIPv4:fb,isUUID:Lk,normalizeIPv6:yb};const{isUUID:Zk}=vb,eT=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function bb(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function xb(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function wb(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function tT(e){return e.secure=bb(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function nT(e){if((e.port===(bb(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function oT(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(eT);if(n){const o=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const r=`${o}:${t.nid||e.nid}`,i=up(r);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function rT(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");const n=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),r=`${n}:${t.nid||o}`,i=up(r);i&&(e=i.serialize(e,t));const s=e,a=e.nss;return s.path=`${o||t.nid}:${a}`,t.skipEscape=!0,s}function iT(e,t){const n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!Zk(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function sT(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const Sb={scheme:"http",domainHost:!0,parse:xb,serialize:wb},aT={scheme:"https",domainHost:Sb.domainHost,parse:xb,serialize:wb},ba={scheme:"ws",domainHost:!0,parse:tT,serialize:nT},lT={scheme:"wss",domainHost:ba.domainHost,parse:ba.parse,serialize:ba.serialize},cT={scheme:"urn",parse:oT,serialize:rT,skipNormalize:!0},dT={scheme:"urn:uuid",parse:iT,serialize:sT,skipNormalize:!0},ol={http:Sb,https:aT,ws:ba,wss:lT,urn:cT,"urn:uuid":dT};Object.setPrototypeOf(ol,null);function up(e){return e&&(ol[e]||ol[e.toLowerCase()])||void 0}var uT={SCHEMES:ol,getSchemeHandler:up};const{normalizeIPv6:pT,removeDotSegments:_i,recomposeAuthority:fT,normalizePercentEncoding:mT,normalizePathEncoding:hT,escapePreservingEscapes:yT,reescapeHostDelimiters:gT,isIPv4:vT,nonSimpleDomain:bT}=vb,{SCHEMES:xT,getSchemeHandler:$b}=uT;function wT(e,t){return typeof e=="string"?e=_T(e,t):typeof e=="object"&&(e=Wr(Jo(e,t),t)),e}function ST(e,t,n){const o=n?Object.assign({scheme:"null"},n):{scheme:"null"},r=kb(Wr(e,o),Wr(t,o),o,!0);return o.skipEscape=!0,Jo(r,o)}function kb(e,t,n,o){const r={};return o||(e=Wr(Jo(e,n),n),t=Wr(Jo(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=_i(t.path||""),r.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=_i(t.path||""),r.query=t.query):(t.path?(t.path[0]==="/"?r.path=_i(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?r.path="/"+t.path:e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path,r.path=_i(r.path)),r.query=t.query):(r.path=e.path,t.query!==void 0?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function $T(e,t,n){const o=Gm(e,n),r=Gm(t,n);return o!==void 0&&r!==void 0&&o.toLowerCase()===r.toLowerCase()}function Jo(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),r=[],i=$b(o.scheme||n.scheme);i&&i.serialize&&i.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=mT(n.path):(n.path=yT(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),o.reference!=="suffix"&&n.scheme&&r.push(n.scheme,":");const s=fT(n);if(s!==void 0&&(o.reference!=="suffix"&&r.push("//"),r.push(s),n.path&&n.path[0]!=="/"&&r.push("/")),n.path!==void 0){let a=n.path;!o.absolutePath&&(!i||!i.absolutePath)&&(a=_i(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),r.push(a)}return n.query!==void 0&&r.push("?",n.query),n.fragment!==void 0&&r.push("#",n.fragment),r.join("")}const kT=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function TT(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Tb(e,t){const n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let r=!1,i=!1;n.reference==="suffix"&&(n.scheme?e=n.scheme+":"+e:e="//"+e);const s=e.match(kT);if(s){o.scheme=s[1],o.userinfo=s[3],o.host=s[4],o.port=parseInt(s[5],10),o.path=s[6]||"",o.query=s[7],o.fragment=s[8],isNaN(o.port)&&(o.port=s[5]);const a=TT(o,s);if(a!==void 0&&(o.error=o.error||a,r=!0),o.host)if(vT(o.host)===!1){const f=pT(o.host);o.host=f.host.toLowerCase(),i=f.isIPV6}else i=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==o.reference&&(o.error=o.error||"URI is not a "+n.reference+" reference.");const l=$b(n.scheme||o.scheme);if(!n.unicodeSupport&&(!l||!l.unicodeSupport)&&o.host&&(n.domainHost||l&&l.domainHost)&&i===!1&&bT(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(c){o.error=o.error||"Host's domain name can not be converted to ASCII: "+c}if((!l||l&&!l.skipNormalize)&&(e.indexOf("%")!==-1&&(o.scheme!==void 0&&(o.scheme=unescape(o.scheme)),o.host!==void 0&&(o.host=gT(unescape(o.host),i))),o.path&&(o.path=hT(o.path)),o.fragment))try{o.fragment=encodeURI(decodeURIComponent(o.fragment))}catch{o.error=o.error||"URI malformed"}l&&l.parse&&l.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:r}}function Wr(e,t){return Tb(e,t).parsed}function _T(e,t){return _b(e,t).normalized}function _b(e,t){const{parsed:n,malformedAuthorityOrPort:o}=Tb(e,t);return{normalized:o?e:Jo(n,t),malformedAuthorityOrPort:o}}function Gm(e,t){if(typeof e=="string"){const{normalized:n,malformedAuthorityOrPort:o}=_b(e,t);return o?void 0:n}if(typeof e=="object")return Jo(e,t)}const pp={SCHEMES:xT,normalize:wT,resolve:ST,resolveComponent:kb,equal:$T,serialize:Jo,parse:Wr};Ol.exports=pp;Ol.exports.default=pp;Ol.exports.fastUri=pp;var jT=Ol.exports;Object.defineProperty(cp,"__esModule",{value:!0});const jb=jT;jb.code='require("ajv/dist/runtime/uri").default';cp.default=jb;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=ln;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=ue;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const o=Cs,r=Yr,i=Go,s=xt,a=ue,l=lt,c=et,f=Q,m=Uk,v=cp,h=(O,_)=>new RegExp(O,_);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},p={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},u=200;function x(O){var _,M,P,w,k,N,H,R,X,ie,de,we,ze,Ee,Se,_e,Ye,Pe,_n,Bn,_o,tr,Hn,pn,Yt;const Vn=O.strict,nr=(_=O.code)===null||_===void 0?void 0:_.optimize,ii=nr===!0||nr===void 0?1:nr||0,si=(P=(M=O.code)===null||M===void 0?void 0:M.regExp)!==null&&P!==void 0?P:h,Hl=(w=O.uriResolver)!==null&&w!==void 0?w:v.default;return{strictSchema:(N=(k=O.strictSchema)!==null&&k!==void 0?k:Vn)!==null&&N!==void 0?N:!0,strictNumbers:(R=(H=O.strictNumbers)!==null&&H!==void 0?H:Vn)!==null&&R!==void 0?R:!0,strictTypes:(ie=(X=O.strictTypes)!==null&&X!==void 0?X:Vn)!==null&&ie!==void 0?ie:"log",strictTuples:(we=(de=O.strictTuples)!==null&&de!==void 0?de:Vn)!==null&&we!==void 0?we:"log",strictRequired:(Ee=(ze=O.strictRequired)!==null&&ze!==void 0?ze:Vn)!==null&&Ee!==void 0?Ee:!1,code:O.code?{...O.code,optimize:ii,regExp:si}:{optimize:ii,regExp:si},loopRequired:(Se=O.loopRequired)!==null&&Se!==void 0?Se:u,loopEnum:(_e=O.loopEnum)!==null&&_e!==void 0?_e:u,meta:(Ye=O.meta)!==null&&Ye!==void 0?Ye:!0,messages:(Pe=O.messages)!==null&&Pe!==void 0?Pe:!0,inlineRefs:(_n=O.inlineRefs)!==null&&_n!==void 0?_n:!0,schemaId:(Bn=O.schemaId)!==null&&Bn!==void 0?Bn:"$id",addUsedSchema:(_o=O.addUsedSchema)!==null&&_o!==void 0?_o:!0,validateSchema:(tr=O.validateSchema)!==null&&tr!==void 0?tr:!0,validateFormats:(Hn=O.validateFormats)!==null&&Hn!==void 0?Hn:!0,unicodeRegExp:(pn=O.unicodeRegExp)!==null&&pn!==void 0?pn:!0,int32range:(Yt=O.int32range)!==null&&Yt!==void 0?Yt:!0,uriResolver:Hl}}class S{constructor(_={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,_=this.opts={..._,...x(_)};const{es5:M,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:b,es5:M,lines:P}),this.logger=z(_.logger);const w=_.validateFormats;_.validateFormats=!1,this.RULES=(0,i.getRules)(),T.call(this,g,_,"NOT SUPPORTED"),T.call(this,p,_,"DEPRECATED","warn"),this._metaOpts=E.call(this),_.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),_.keywords&&A.call(this,_.keywords),typeof _.meta=="object"&&this.addMetaSchema(_.meta),$.call(this),_.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:_,meta:M,schemaId:P}=this.opts;let w=m;P==="id"&&(w={...m},w.id=w.$id,delete w.$id),M&&_&&this.addMetaSchema(w,w[P],!1)}defaultMeta(){const{meta:_,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof _=="object"?_[M]||_:void 0}validate(_,M){let P;if(typeof _=="string"){if(P=this.getSchema(_),!P)throw new Error(`no schema with key or ref "${_}"`)}else P=this.compile(_);const w=P(M);return"$async"in P||(this.errors=P.errors),w}compile(_,M){const P=this._addSchema(_,M);return P.validate||this._compileSchemaEnv(P)}compileAsync(_,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return w.call(this,_,M);async function w(ie,de){await k.call(this,ie.$schema);const we=this._addSchema(ie,de);return we.validate||N.call(this,we)}async function k(ie){ie&&!this.getSchema(ie)&&await w.call(this,{$ref:ie},!0)}async function N(ie){try{return this._compileSchemaEnv(ie)}catch(de){if(!(de instanceof r.default))throw de;return H.call(this,de),await R.call(this,de.missingSchema),N.call(this,ie)}}function H({missingSchema:ie,missingRef:de}){if(this.refs[ie])throw new Error(`AnySchema ${ie} is loaded but ${de} cannot be resolved`)}async function R(ie){const de=await X.call(this,ie);this.refs[ie]||await k.call(this,de.$schema),this.refs[ie]||this.addSchema(de,ie,M)}async function X(ie){const de=this._loading[ie];if(de)return de;try{return await(this._loading[ie]=P(ie))}finally{delete this._loading[ie]}}}addSchema(_,M,P,w=this.opts.validateSchema){if(Array.isArray(_)){for(const N of _)this.addSchema(N,void 0,P,w);return this}let k;if(typeof _=="object"){const{schemaId:N}=this.opts;if(k=_[N],k!==void 0&&typeof k!="string")throw new Error(`schema ${N} must be string`)}return M=(0,l.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(_,P,M,w,!0),this}addMetaSchema(_,M,P=this.opts.validateSchema){return this.addSchema(_,M,!0,P),this}validateSchema(_,M){if(typeof _=="boolean")return!0;let P;if(P=_.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(P,_);if(!w&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return w}getSchema(_){let M;for(;typeof(M=C.call(this,_))=="string";)_=M;if(M===void 0){const{schemaId:P}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:P});if(M=s.resolveSchema.call(this,w,_),!M)return;this.refs[_]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(_){if(_ instanceof RegExp)return this._removeAllSchemas(this.schemas,_),this._removeAllSchemas(this.refs,_),this;switch(typeof _){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=C.call(this,_);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[_],delete this.refs[_],this}case"object":{const M=_;this._cache.delete(M);let P=_[this.opts.schemaId];return P&&(P=(0,l.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(_){for(const M of _)this.addKeyword(M);return this}addKeyword(_,M){let P;if(typeof _=="string")P=_,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=P);else if(typeof _=="object"&&M===void 0){if(M=_,P=M.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(L.call(this,P,M),!M)return(0,f.eachItem)(P,k=>F.call(this,k)),this;Y.call(this,M);const w={...M,type:(0,c.getJSONTypes)(M.type),schemaType:(0,c.getJSONTypes)(M.schemaType)};return(0,f.eachItem)(P,w.type.length===0?k=>F.call(this,k,w):k=>w.type.forEach(N=>F.call(this,k,w,N))),this}getKeyword(_){const M=this.RULES.all[_];return typeof M=="object"?M.definition:!!M}removeKeyword(_){const{RULES:M}=this;delete M.keywords[_],delete M.all[_];for(const P of M.rules){const w=P.rules.findIndex(k=>k.keyword===_);w>=0&&P.rules.splice(w,1)}return this}addFormat(_,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[_]=M,this}errorsText(_=this.errors,{separator:M=", ",dataVar:P="data"}={}){return!_||_.length===0?"No errors":_.map(w=>`${P}${w.instancePath} ${w.message}`).reduce((w,k)=>w+M+k)}$dataMetaSchema(_,M){const P=this.RULES.all;_=JSON.parse(JSON.stringify(_));for(const w of M){const k=w.split("/").slice(1);let N=_;for(const H of k)N=N[H];for(const H in P){const R=P[H];if(typeof R!="object")continue;const{$data:X}=R.definition,ie=N[H];X&&ie&&(N[H]=J(ie))}}return _}_removeAllSchemas(_,M){for(const P in _){const w=_[P];(!M||M.test(P))&&(typeof w=="string"?delete _[P]:w&&!w.meta&&(this._cache.delete(w.schema),delete _[P]))}}_addSchema(_,M,P,w=this.opts.validateSchema,k=this.opts.addUsedSchema){let N;const{schemaId:H}=this.opts;if(typeof _=="object")N=_[H];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof _!="boolean")throw new Error("schema must be object or boolean")}let R=this._cache.get(_);if(R!==void 0)return R;P=(0,l.normalizeId)(N||P);const X=l.getSchemaRefs.call(this,_,P);return R=new s.SchemaEnv({schema:_,schemaId:H,meta:M,baseId:P,localRefs:X}),this._cache.set(R.schema,R),k&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=R),w&&this.validateSchema(_,!0),R}_checkUnique(_){if(this.schemas[_]||this.refs[_])throw new Error(`schema with key or id "${_}" already exists`)}_compileSchemaEnv(_){if(_.meta?this._compileMetaSchema(_):s.compileSchema.call(this,_),!_.validate)throw new Error("ajv implementation error");return _.validate}_compileMetaSchema(_){const M=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,_)}finally{this.opts=M}}}S.ValidationError=o.default,S.MissingRefError=r.default,e.default=S;function T(O,_,M,P="error"){for(const w in O){const k=w;k in _&&this.logger[P](`${M}: option ${w}. ${O[k]}`)}}function C(O){return O=(0,l.normalizeId)(O),this.schemas[O]||this.refs[O]}function $(){const O=this.opts.schemas;if(O)if(Array.isArray(O))this.addSchema(O);else for(const _ in O)this.addSchema(O[_],_)}function j(){for(const O in this.opts.formats){const _=this.opts.formats[O];_&&this.addFormat(O,_)}}function A(O){if(Array.isArray(O)){this.addVocabulary(O);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const _ in O){const M=O[_];M.keyword||(M.keyword=_),this.addKeyword(M)}}function E(){const O={...this.opts};for(const _ of y)delete O[_];return O}const q={log(){},warn(){},error(){}};function z(O){if(O===!1)return q;if(O===void 0)return console;if(O.log&&O.warn&&O.error)return O;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function L(O,_){const{RULES:M}=this;if((0,f.eachItem)(O,P=>{if(M.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!U.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!_&&_.$data&&!("code"in _||"validate"in _))throw new Error('$data keyword must have "code" or "validate" function')}function F(O,_,M){var P;const w=_==null?void 0:_.post;if(M&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let N=w?k.post:k.rules.find(({type:R})=>R===M);if(N||(N={type:M,rules:[]},k.rules.push(N)),k.keywords[O]=!0,!_)return;const H={keyword:O,definition:{..._,type:(0,c.getJSONTypes)(_.type),schemaType:(0,c.getJSONTypes)(_.schemaType)}};_.before?G.call(this,N,H,_.before):N.rules.push(H),k.all[O]=H,(P=_.implements)===null||P===void 0||P.forEach(R=>this.addKeyword(R))}function G(O,_,M){const P=O.rules.findIndex(w=>w.keyword===M);P>=0?O.rules.splice(P,0,_):(O.rules.push(_),this.logger.warn(`rule ${M} is not defined`))}function Y(O){let{metaSchema:_}=O;_!==void 0&&(O.$data&&this.opts.$data&&(_=J(_)),O.validateSchema=this.compile(_,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function J(O){return{anyOf:[O,D]}}})(Rv);var fp={},mp={},hp={};Object.defineProperty(hp,"__esModule",{value:!0});const NT={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};hp.default=NT;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});zn.callRef=zn.getValidate=void 0;const CT=Yr,Jm=ye,Tt=ue,sr=Dt,Qm=xt,Ys=Q,ET={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:o}=e,{baseId:r,schemaEnv:i,validateName:s,opts:a,self:l}=o,{root:c}=i;if((n==="#"||n==="#/")&&r===c.baseId)return m();const f=Qm.resolveRef.call(l,c,r,n);if(f===void 0)throw new CT.default(o.opts.uriResolver,r,n);if(f instanceof Qm.SchemaEnv)return v(f);return h(f);function m(){if(i===c)return xa(e,s,i,i.$async);const y=t.scopeValue("root",{ref:c});return xa(e,(0,Tt._)`${y}.validate`,c,c.$async)}function v(y){const b=Nb(e,y);xa(e,b,y,y.$async)}function h(y){const b=t.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Tt.stringify)(y)}:{ref:y}),g=t.name("valid"),p=e.subschema({schema:y,dataTypes:[],schemaPath:Tt.nil,topSchemaRef:b,errSchemaPath:n},g);e.mergeEvaluated(p),e.ok(g)}}};function Nb(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,Tt._)`${n.scopeValue("wrapper",{ref:t})}.validate`}zn.getValidate=Nb;function xa(e,t,n,o){const{gen:r,it:i}=e,{allErrors:s,schemaEnv:a,opts:l}=i,c=l.passContext?sr.default.this:Tt.nil;o?f():m();function f(){if(!a.$async)throw new Error("async schema referenced by sync schema");const y=r.let("valid");r.try(()=>{r.code((0,Tt._)`await ${(0,Jm.callValidateCode)(e,t,c)}`),h(t),s||r.assign(y,!0)},b=>{r.if((0,Tt._)`!(${b} instanceof ${i.ValidationError})`,()=>r.throw(b)),v(b),s||r.assign(y,!1)}),e.ok(y)}function m(){e.result((0,Jm.callValidateCode)(e,t,c),()=>h(t),()=>v(t))}function v(y){const b=(0,Tt._)`${y}.errors`;r.assign(sr.default.vErrors,(0,Tt._)`${sr.default.vErrors} === null ? ${b} : ${sr.default.vErrors}.concat(${b})`),r.assign(sr.default.errors,(0,Tt._)`${sr.default.vErrors}.length`)}function h(y){var b;if(!i.opts.unevaluated)return;const g=(b=n==null?void 0:n.validate)===null||b===void 0?void 0:b.evaluated;if(i.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(i.props=Ys.mergeEvaluated.props(r,g.props,i.props));else{const p=r.var("props",(0,Tt._)`${y}.evaluated.props`);i.props=Ys.mergeEvaluated.props(r,p,i.props,Tt.Name)}if(i.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(i.items=Ys.mergeEvaluated.items(r,g.items,i.items));else{const p=r.var("items",(0,Tt._)`${y}.evaluated.items`);i.items=Ys.mergeEvaluated.items(r,p,i.items,Tt.Name)}}}zn.callRef=xa;zn.default=ET;Object.defineProperty(mp,"__esModule",{value:!0});const PT=hp,IT=zn,OT=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",PT.default,IT.default];mp.default=OT;var yp={},gp={};Object.defineProperty(gp,"__esModule",{value:!0});const rl=ue,Gn=rl.operators,il={maximum:{okStr:"<=",ok:Gn.LTE,fail:Gn.GT},minimum:{okStr:">=",ok:Gn.GTE,fail:Gn.LT},exclusiveMaximum:{okStr:"<",ok:Gn.LT,fail:Gn.GTE},exclusiveMinimum:{okStr:">",ok:Gn.GT,fail:Gn.LTE}},RT={message:({keyword:e,schemaCode:t})=>(0,rl.str)`must be ${il[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,rl._)`{comparison: ${il[e].okStr}, limit: ${t}}`},AT={keyword:Object.keys(il),type:"number",schemaType:"number",$data:!0,error:RT,code(e){const{keyword:t,data:n,schemaCode:o}=e;e.fail$data((0,rl._)`${n} ${il[t].fail} ${o} || isNaN(${n})`)}};gp.default=AT;var vp={};Object.defineProperty(vp,"__esModule",{value:!0});const Li=ue,MT={message:({schemaCode:e})=>(0,Li.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Li._)`{multipleOf: ${e}}`},qT={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:MT,code(e){const{gen:t,data:n,schemaCode:o,it:r}=e,i=r.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,Li._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Li._)`${s} !== parseInt(${s})`;e.fail$data((0,Li._)`(${o} === 0 || (${s} = ${n}/${o}, ${a}))`)}};vp.default=qT;var bp={},xp={};Object.defineProperty(xp,"__esModule",{value:!0});function Cb(e){const t=e.length;let n=0,o=0,r;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),(r&64512)===56320&&o++);return n}xp.default=Cb;Cb.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(bp,"__esModule",{value:!0});const Io=ue,UT=Q,LT=xp,DT={message({keyword:e,schemaCode:t}){const n=e==="maxLength"?"more":"fewer";return(0,Io.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,Io._)`{limit: ${e}}`},zT={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:DT,code(e){const{keyword:t,data:n,schemaCode:o,it:r}=e,i=t==="maxLength"?Io.operators.GT:Io.operators.LT,s=r.opts.unicode===!1?(0,Io._)`${n}.length`:(0,Io._)`${(0,UT.useFunc)(e.gen,LT.default)}(${n})`;e.fail$data((0,Io._)`${s} ${i} ${o}`)}};bp.default=zT;var wp={};Object.defineProperty(wp,"__esModule",{value:!0});const FT=ye,BT=Q,kr=ue,HT={message:({schemaCode:e})=>(0,kr.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,kr._)`{pattern: ${e}}`},VT={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:HT,code(e){const{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(o){const{regExp:l}=s.opts.code,c=l.code==="new RegExp"?(0,kr._)`new RegExp`:(0,BT.useFunc)(t,l),f=t.let("valid");t.try(()=>t.assign(f,(0,kr._)`${c}(${i}, ${a}).test(${n})`),()=>t.assign(f,!1)),e.fail$data((0,kr._)`!${f}`)}else{const l=(0,FT.usePattern)(e,r);e.fail$data((0,kr._)`!${l}.test(${n})`)}}};wp.default=VT;var Sp={};Object.defineProperty(Sp,"__esModule",{value:!0});const Di=ue,WT={message({keyword:e,schemaCode:t}){const n=e==="maxProperties"?"more":"fewer";return(0,Di.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,Di._)`{limit: ${e}}`},KT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:WT,code(e){const{keyword:t,data:n,schemaCode:o}=e,r=t==="maxProperties"?Di.operators.GT:Di.operators.LT;e.fail$data((0,Di._)`Object.keys(${n}).length ${r} ${o}`)}};Sp.default=KT;var $p={};Object.defineProperty($p,"__esModule",{value:!0});const yi=ye,zi=ue,GT=Q,JT={message:({params:{missingProperty:e}})=>(0,zi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,zi._)`{missingProperty: ${e}}`},QT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:JT,code(e){const{gen:t,schema:n,schemaCode:o,data:r,$data:i,it:s}=e,{opts:a}=s;if(!i&&n.length===0)return;const l=n.length>=a.loopRequired;if(s.allErrors?c():f(),a.strictRequired){const h=e.parentSchema.properties,{definedProperties:y}=e.it;for(const b of n)if((h==null?void 0:h[b])===void 0&&!y.has(b)){const g=s.schemaEnv.baseId+s.errSchemaPath,p=`required property "${b}" is not defined at "${g}" (strictRequired)`;(0,GT.checkStrictMode)(s,p,s.opts.strictRequired)}}function c(){if(l||i)e.block$data(zi.nil,m);else for(const h of n)(0,yi.checkReportMissingProp)(e,h)}function f(){const h=t.let("missing");if(l||i){const y=t.let("valid",!0);e.block$data(y,()=>v(h,y)),e.ok(y)}else t.if((0,yi.checkMissingProp)(e,n,h)),(0,yi.reportMissingProp)(e,h),t.else()}function m(){t.forOf("prop",o,h=>{e.setParams({missingProperty:h}),t.if((0,yi.noPropertyInData)(t,r,h,a.ownProperties),()=>e.error())})}function v(h,y){e.setParams({missingProperty:h}),t.forOf(h,o,()=>{t.assign(y,(0,yi.propertyInData)(t,r,h,a.ownProperties)),t.if((0,zi.not)(y),()=>{e.error(),t.break()})},zi.nil)}}};$p.default=QT;var kp={};Object.defineProperty(kp,"__esModule",{value:!0});const Fi=ue,YT={message({keyword:e,schemaCode:t}){const n=e==="maxItems"?"more":"fewer";return(0,Fi.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,Fi._)`{limit: ${e}}`},XT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:YT,code(e){const{keyword:t,data:n,schemaCode:o}=e,r=t==="maxItems"?Fi.operators.GT:Fi.operators.LT;e.fail$data((0,Fi._)`${n}.length ${r} ${o}`)}};kp.default=XT;var Tp={},Es={};Object.defineProperty(Es,"__esModule",{value:!0});const Eb=Qv;Eb.code='require("ajv/dist/runtime/equal").default';Es.default=Eb;Object.defineProperty(Tp,"__esModule",{value:!0});const xc=et,it=ue,ZT=Q,e1=Es,t1={message:({params:{i:e,j:t}})=>(0,it.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,it._)`{i: ${e}, j: ${t}}`},n1={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:t1,code(e){const{gen:t,data:n,$data:o,schema:r,parentSchema:i,schemaCode:s,it:a}=e;if(!o&&!r)return;const l=t.let("valid"),c=i.items?(0,xc.getSchemaTypes)(i.items):[];e.block$data(l,f,(0,it._)`${s} === false`),e.ok(l);function f(){const y=t.let("i",(0,it._)`${n}.length`),b=t.let("j");e.setParams({i:y,j:b}),t.assign(l,!0),t.if((0,it._)`${y} > 1`,()=>(m()?v:h)(y,b))}function m(){return c.length>0&&!c.some(y=>y==="object"||y==="array")}function v(y,b){const g=t.name("item"),p=(0,xc.checkDataTypes)(c,g,a.opts.strictNumbers,xc.DataType.Wrong),u=t.const("indices",(0,it._)`{}`);t.for((0,it._)`;${y}--;`,()=>{t.let(g,(0,it._)`${n}[${y}]`),t.if(p,(0,it._)`continue`),c.length>1&&t.if((0,it._)`typeof ${g} == "string"`,(0,it._)`${g} += "_"`),t.if((0,it._)`typeof ${u}[${g}] == "number"`,()=>{t.assign(b,(0,it._)`${u}[${g}]`),e.error(),t.assign(l,!1).break()}).code((0,it._)`${u}[${g}] = ${y}`)})}function h(y,b){const g=(0,ZT.useFunc)(t,e1.default),p=t.name("outer");t.label(p).for((0,it._)`;${y}--;`,()=>t.for((0,it._)`${b} = ${y}; ${b}--;`,()=>t.if((0,it._)`${g}(${n}[${y}], ${n}[${b}])`,()=>{e.error(),t.assign(l,!1).break(p)})))}}};Tp.default=n1;var _p={};Object.defineProperty(_p,"__esModule",{value:!0});const Ud=ue,o1=Q,r1=Es,i1={message:"must be equal to constant",params:({schemaCode:e})=>(0,Ud._)`{allowedValue: ${e}}`},s1={keyword:"const",$data:!0,error:i1,code(e){const{gen:t,data:n,$data:o,schemaCode:r,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,Ud._)`!${(0,o1.useFunc)(t,r1.default)}(${n}, ${r})`):e.fail((0,Ud._)`${i} !== ${n}`)}};_p.default=s1;var jp={};Object.defineProperty(jp,"__esModule",{value:!0});const ji=ue,a1=Q,l1=Es,c1={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ji._)`{allowedValues: ${e}}`},d1={keyword:"enum",schemaType:"array",$data:!0,error:c1,code(e){const{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:s}=e;if(!o&&r.length===0)throw new Error("enum must have non-empty array");const a=r.length>=s.opts.loopEnum;let l;const c=()=>l??(l=(0,a1.useFunc)(t,l1.default));let f;if(a||o)f=t.let("valid"),e.block$data(f,m);else{if(!Array.isArray(r))throw new Error("ajv implementation error");const h=t.const("vSchema",i);f=(0,ji.or)(...r.map((y,b)=>v(h,b)))}e.pass(f);function m(){t.assign(f,!1),t.forOf("v",i,h=>t.if((0,ji._)`${c()}(${n}, ${h})`,()=>t.assign(f,!0).break()))}function v(h,y){const b=r[y];return typeof b=="object"&&b!==null?(0,ji._)`${c()}(${n}, ${h}[${y}])`:(0,ji._)`${n} === ${b}`}}};jp.default=d1;Object.defineProperty(yp,"__esModule",{value:!0});const u1=gp,p1=vp,f1=bp,m1=wp,h1=Sp,y1=$p,g1=kp,v1=Tp,b1=_p,x1=jp,w1=[u1.default,p1.default,f1.default,m1.default,h1.default,y1.default,g1.default,v1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},b1.default,x1.default];yp.default=w1;var Np={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.validateAdditionalItems=void 0;const Oo=ue,Ld=Q,S1={message:({params:{len:e}})=>(0,Oo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Oo._)`{limit: ${e}}`},$1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:S1,code(e){const{parentSchema:t,it:n}=e,{items:o}=t;if(!Array.isArray(o)){(0,Ld.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}Pb(e,o)}};function Pb(e,t){const{gen:n,schema:o,data:r,keyword:i,it:s}=e;s.items=!0;const a=n.const("len",(0,Oo._)`${r}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Oo._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,Ld.alwaysValidSchema)(s,o)){const c=n.var("valid",(0,Oo._)`${a} <= ${t.length}`);n.if((0,Oo.not)(c),()=>l(c)),e.ok(c)}function l(c){n.forRange("i",t.length,a,f=>{e.subschema({keyword:i,dataProp:f,dataPropType:Ld.Type.Num},c),s.allErrors||n.if((0,Oo.not)(c),()=>n.break())})}}Xr.validateAdditionalItems=Pb;Xr.default=$1;var Cp={},Zr={};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.validateTuple=void 0;const Ym=ue,wa=Q,k1=ye,T1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return Ib(e,"additionalItems",t);n.items=!0,!(0,wa.alwaysValidSchema)(n,t)&&e.ok((0,k1.validateArray)(e))}};function Ib(e,t,n=e.schema){const{gen:o,parentSchema:r,data:i,keyword:s,it:a}=e;f(r),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=wa.mergeEvaluated.items(o,n.length,a.items));const l=o.name("valid"),c=o.const("len",(0,Ym._)`${i}.length`);n.forEach((m,v)=>{(0,wa.alwaysValidSchema)(a,m)||(o.if((0,Ym._)`${c} > ${v}`,()=>e.subschema({keyword:s,schemaProp:v,dataProp:v},l)),e.ok(l))});function f(m){const{opts:v,errSchemaPath:h}=a,y=n.length,b=y===m.minItems&&(y===m.maxItems||m[t]===!1);if(v.strictTuples&&!b){const g=`"${s}" is ${y}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,wa.checkStrictMode)(a,g,v.strictTuples)}}}Zr.validateTuple=Ib;Zr.default=T1;Object.defineProperty(Cp,"__esModule",{value:!0});const _1=Zr,j1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,_1.validateTuple)(e,"items")};Cp.default=j1;var Ep={};Object.defineProperty(Ep,"__esModule",{value:!0});const Xm=ue,N1=Q,C1=ye,E1=Xr,P1={message:({params:{len:e}})=>(0,Xm.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Xm._)`{limit: ${e}}`},I1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:P1,code(e){const{schema:t,parentSchema:n,it:o}=e,{prefixItems:r}=n;o.items=!0,!(0,N1.alwaysValidSchema)(o,t)&&(r?(0,E1.validateAdditionalItems)(e,r):e.ok((0,C1.validateArray)(e)))}};Ep.default=I1;var Pp={};Object.defineProperty(Pp,"__esModule",{value:!0});const zt=ue,Xs=Q,O1={message:({params:{min:e,max:t}})=>t===void 0?(0,zt.str)`must contain at least ${e} valid item(s)`:(0,zt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,zt._)`{minContains: ${e}}`:(0,zt._)`{minContains: ${e}, maxContains: ${t}}`},R1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:O1,code(e){const{gen:t,schema:n,parentSchema:o,data:r,it:i}=e;let s,a;const{minContains:l,maxContains:c}=o;i.opts.next?(s=l===void 0?1:l,a=c):s=1;const f=t.const("len",(0,zt._)`${r}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Xs.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Xs.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Xs.alwaysValidSchema)(i,n)){let b=(0,zt._)`${f} >= ${s}`;a!==void 0&&(b=(0,zt._)`${b} && ${f} <= ${a}`),e.pass(b);return}i.items=!0;const m=t.name("valid");a===void 0&&s===1?h(m,()=>t.if(m,()=>t.break())):s===0?(t.let(m,!0),a!==void 0&&t.if((0,zt._)`${r}.length > 0`,v)):(t.let(m,!1),v()),e.result(m,()=>e.reset());function v(){const b=t.name("_valid"),g=t.let("count",0);h(b,()=>t.if(b,()=>y(g)))}function h(b,g){t.forRange("i",0,f,p=>{e.subschema({keyword:"contains",dataProp:p,dataPropType:Xs.Type.Num,compositeRule:!0},b),g()})}function y(b){t.code((0,zt._)`${b}++`),a===void 0?t.if((0,zt._)`${b} >= ${s}`,()=>t.assign(m,!0).break()):(t.if((0,zt._)`${b} > ${a}`,()=>t.assign(m,!1).break()),s===1?t.assign(m,!0):t.if((0,zt._)`${b} >= ${s}`,()=>t.assign(m,!0)))}}};Pp.default=R1;var Rl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ue,n=Q,o=ye;e.error={message:({params:{property:l,depsCount:c,deps:f}})=>{const m=c===1?"property":"properties";return(0,t.str)`must have ${m} ${f} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:f,missingProperty:m}})=>(0,t._)`{property: ${l},
|
|
1763
|
+
missingProperty: ${m},
|
|
1764
|
+
depsCount: ${c},
|
|
1765
|
+
deps: ${f}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,f]=i(l);s(l,c),a(l,f)}};function i({schema:l}){const c={},f={};for(const m in l){if(m==="__proto__")continue;const v=Array.isArray(l[m])?c:f;v[m]=l[m]}return[c,f]}function s(l,c=l.schema){const{gen:f,data:m,it:v}=l;if(Object.keys(c).length===0)return;const h=f.let("missing");for(const y in c){const b=c[y];if(b.length===0)continue;const g=(0,o.propertyInData)(f,m,y,v.opts.ownProperties);l.setParams({property:y,depsCount:b.length,deps:b.join(", ")}),v.allErrors?f.if(g,()=>{for(const p of b)(0,o.checkReportMissingProp)(l,p)}):(f.if((0,t._)`${g} && (${(0,o.checkMissingProp)(l,b,h)})`),(0,o.reportMissingProp)(l,h),f.else())}}e.validatePropertyDeps=s;function a(l,c=l.schema){const{gen:f,data:m,keyword:v,it:h}=l,y=f.name("valid");for(const b in c)(0,n.alwaysValidSchema)(h,c[b])||(f.if((0,o.propertyInData)(f,m,b,h.opts.ownProperties),()=>{const g=l.subschema({keyword:v,schemaProp:b},y);l.mergeValidEvaluated(g,y)},()=>f.var(y,!0)),l.ok(y))}e.validateSchemaDeps=a,e.default=r})(Rl);var Ip={};Object.defineProperty(Ip,"__esModule",{value:!0});const Ob=ue,A1=Q,M1={message:"property name must be valid",params:({params:e})=>(0,Ob._)`{propertyName: ${e.propertyName}}`},q1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:M1,code(e){const{gen:t,schema:n,data:o,it:r}=e;if((0,A1.alwaysValidSchema)(r,n))return;const i=t.name("valid");t.forIn("key",o,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,Ob.not)(i),()=>{e.error(!0),r.allErrors||t.break()})}),e.ok(i)}};Ip.default=q1;var Al={};Object.defineProperty(Al,"__esModule",{value:!0});const Zs=ye,en=ue,U1=Dt,ea=Q,L1={message:"must NOT have additional properties",params:({params:e})=>(0,en._)`{additionalProperty: ${e.additionalProperty}}`},D1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:L1,code(e){const{gen:t,schema:n,parentSchema:o,data:r,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,ea.alwaysValidSchema)(s,n))return;const c=(0,Zs.allSchemaProperties)(o.properties),f=(0,Zs.allSchemaProperties)(o.patternProperties);m(),e.ok((0,en._)`${i} === ${U1.default.errors}`);function m(){t.forIn("key",r,g=>{!c.length&&!f.length?y(g):t.if(v(g),()=>y(g))})}function v(g){let p;if(c.length>8){const u=(0,ea.schemaRefOrVal)(s,o.properties,"properties");p=(0,Zs.isOwnProperty)(t,u,g)}else c.length?p=(0,en.or)(...c.map(u=>(0,en._)`${g} === ${u}`)):p=en.nil;return f.length&&(p=(0,en.or)(p,...f.map(u=>(0,en._)`${(0,Zs.usePattern)(e,u)}.test(${g})`))),(0,en.not)(p)}function h(g){t.code((0,en._)`delete ${r}[${g}]`)}function y(g){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){h(g);return}if(n===!1){e.setParams({additionalProperty:g}),e.error(),a||t.break();return}if(typeof n=="object"&&!(0,ea.alwaysValidSchema)(s,n)){const p=t.name("valid");l.removeAdditional==="failing"?(b(g,p,!1),t.if((0,en.not)(p),()=>{e.reset(),h(g)})):(b(g,p),a||t.if((0,en.not)(p),()=>t.break()))}}function b(g,p,u){const x={keyword:"additionalProperties",dataProp:g,dataPropType:ea.Type.Str};u===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(x,p)}}};Al.default=D1;var Op={};Object.defineProperty(Op,"__esModule",{value:!0});const z1=ln,Zm=ye,wc=Q,eh=Al,F1={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:o,data:r,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&eh.default.code(new z1.KeywordCxt(i,eh.default,"additionalProperties"));const s=(0,Zm.allSchemaProperties)(n);for(const m of s)i.definedProperties.add(m);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=wc.mergeEvaluated.props(t,(0,wc.toHash)(s),i.props));const a=s.filter(m=>!(0,wc.alwaysValidSchema)(i,n[m]));if(a.length===0)return;const l=t.name("valid");for(const m of a)c(m)?f(m):(t.if((0,Zm.propertyInData)(t,r,m,i.opts.ownProperties)),f(m),i.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(m),e.ok(l);function c(m){return i.opts.useDefaults&&!i.compositeRule&&n[m].default!==void 0}function f(m){e.subschema({keyword:"properties",schemaProp:m,dataProp:m},l)}}};Op.default=F1;var Rp={};Object.defineProperty(Rp,"__esModule",{value:!0});const th=ye,ta=ue,nh=Q,oh=Q,B1={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:o,parentSchema:r,it:i}=e,{opts:s}=i,a=(0,th.allSchemaProperties)(n),l=a.filter(b=>(0,nh.alwaysValidSchema)(i,n[b]));if(a.length===0||l.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;const c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,f=t.name("valid");i.props!==!0&&!(i.props instanceof ta.Name)&&(i.props=(0,oh.evaluatedPropsToName)(t,i.props));const{props:m}=i;v();function v(){for(const b of a)c&&h(b),i.allErrors?y(b):(t.var(f,!0),y(b),t.if(f))}function h(b){for(const g in c)new RegExp(b).test(g)&&(0,nh.checkStrictMode)(i,`property ${g} matches pattern ${b} (use allowMatchingProperties)`)}function y(b){t.forIn("key",o,g=>{t.if((0,ta._)`${(0,th.usePattern)(e,b)}.test(${g})`,()=>{const p=l.includes(b);p||e.subschema({keyword:"patternProperties",schemaProp:b,dataProp:g,dataPropType:oh.Type.Str},f),i.opts.unevaluated&&m!==!0?t.assign((0,ta._)`${m}[${g}]`,!0):!p&&!i.allErrors&&t.if((0,ta.not)(f),()=>t.break())})})}}};Rp.default=B1;var Ap={};Object.defineProperty(Ap,"__esModule",{value:!0});const H1=Q,V1={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:o}=e;if((0,H1.alwaysValidSchema)(o,n)){e.fail();return}const r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Ap.default=V1;var Mp={};Object.defineProperty(Mp,"__esModule",{value:!0});const W1=ye,K1={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:W1.validateUnion,error:{message:"must match a schema in anyOf"}};Mp.default=K1;var qp={};Object.defineProperty(qp,"__esModule",{value:!0});const Sa=ue,G1=Q,J1={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Sa._)`{passingSchemas: ${e.passing}}`},Q1={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:J1,code(e){const{gen:t,schema:n,parentSchema:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(r.opts.discriminator&&o.discriminator)return;const i=n,s=t.let("valid",!1),a=t.let("passing",null),l=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(s,()=>e.reset(),()=>e.error(!0));function c(){i.forEach((f,m)=>{let v;(0,G1.alwaysValidSchema)(r,f)?t.var(l,!0):v=e.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},l),m>0&&t.if((0,Sa._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Sa._)`[${a}, ${m}]`).else(),t.if(l,()=>{t.assign(s,!0),t.assign(a,m),v&&e.mergeEvaluated(v,Sa.Name)})})}}};qp.default=Q1;var Up={};Object.defineProperty(Up,"__esModule",{value:!0});const Y1=Q,X1={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const r=t.name("valid");n.forEach((i,s)=>{if((0,Y1.alwaysValidSchema)(o,i))return;const a=e.subschema({keyword:"allOf",schemaProp:s},r);e.ok(r),e.mergeEvaluated(a)})}};Up.default=X1;var Lp={};Object.defineProperty(Lp,"__esModule",{value:!0});const sl=ue,Rb=Q,Z1={message:({params:e})=>(0,sl.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,sl._)`{failingKeyword: ${e.ifClause}}`},e_={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Z1,code(e){const{gen:t,parentSchema:n,it:o}=e;n.then===void 0&&n.else===void 0&&(0,Rb.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const r=rh(o,"then"),i=rh(o,"else");if(!r&&!i)return;const s=t.let("valid",!0),a=t.name("_valid");if(l(),e.reset(),r&&i){const f=t.let("ifClause");e.setParams({ifClause:f}),t.if(a,c("then",f),c("else",f))}else r?t.if(a,c("then")):t.if((0,sl.not)(a),c("else"));e.pass(s,()=>e.error(!0));function l(){const f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(f)}function c(f,m){return()=>{const v=e.subschema({keyword:f},a);t.assign(s,a),e.mergeValidEvaluated(v,s),m?t.assign(m,(0,sl._)`${f}`):e.setParams({ifClause:f})}}}};function rh(e,t){const n=e.schema[t];return n!==void 0&&!(0,Rb.alwaysValidSchema)(e,n)}Lp.default=e_;var Dp={};Object.defineProperty(Dp,"__esModule",{value:!0});const t_=Q,n_={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,t_.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Dp.default=n_;Object.defineProperty(Np,"__esModule",{value:!0});const o_=Xr,r_=Cp,i_=Zr,s_=Ep,a_=Pp,l_=Rl,c_=Ip,d_=Al,u_=Op,p_=Rp,f_=Ap,m_=Mp,h_=qp,y_=Up,g_=Lp,v_=Dp;function b_(e=!1){const t=[f_.default,m_.default,h_.default,y_.default,g_.default,v_.default,c_.default,d_.default,l_.default,u_.default,p_.default];return e?t.push(r_.default,s_.default):t.push(o_.default,i_.default),t.push(a_.default),t}Np.default=b_;var zp={},ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.dynamicAnchor=void 0;const Sc=ue,x_=Dt,ih=xt,w_=zn,S_={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Ab(e,e.schema)};function Ab(e,t){const{gen:n,it:o}=e;o.schemaEnv.root.dynamicAnchors[t]=!0;const r=(0,Sc._)`${x_.default.dynamicAnchors}${(0,Sc.getProperty)(t)}`,i=o.errSchemaPath==="#"?o.validateName:$_(e);n.if((0,Sc._)`!${r}`,()=>n.assign(r,i))}ei.dynamicAnchor=Ab;function $_(e){const{schemaEnv:t,schema:n,self:o}=e.it,{root:r,baseId:i,localRefs:s,meta:a}=t.root,{schemaId:l}=o.opts,c=new ih.SchemaEnv({schema:n,schemaId:l,root:r,baseId:i,localRefs:s,meta:a});return ih.compileSchema.call(o,c),(0,w_.getValidate)(e,c)}ei.default=S_;var ti={};Object.defineProperty(ti,"__esModule",{value:!0});ti.dynamicRef=void 0;const sh=ue,k_=Dt,ah=zn,T_={keyword:"$dynamicRef",schemaType:"string",code:e=>Mb(e,e.schema)};function Mb(e,t){const{gen:n,keyword:o,it:r}=e;if(t[0]!=="#")throw new Error(`"${o}" only supports hash fragment reference`);const i=t.slice(1);if(r.allErrors)s();else{const l=n.let("valid",!1);s(l),e.ok(l)}function s(l){if(r.schemaEnv.root.dynamicAnchors[i]){const c=n.let("_v",(0,sh._)`${k_.default.dynamicAnchors}${(0,sh.getProperty)(i)}`);n.if(c,a(c,l),a(r.validateName,l))}else a(r.validateName,l)()}function a(l,c){return c?()=>n.block(()=>{(0,ah.callRef)(e,l),n.let(c,!0)}):()=>(0,ah.callRef)(e,l)}}ti.dynamicRef=Mb;ti.default=T_;var Fp={};Object.defineProperty(Fp,"__esModule",{value:!0});const __=ei,j_=Q,N_={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,__.dynamicAnchor)(e,""):(0,j_.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Fp.default=N_;var Bp={};Object.defineProperty(Bp,"__esModule",{value:!0});const C_=ti,E_={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,C_.dynamicRef)(e,e.schema)};Bp.default=E_;Object.defineProperty(zp,"__esModule",{value:!0});const P_=ei,I_=ti,O_=Fp,R_=Bp,A_=[P_.default,I_.default,O_.default,R_.default];zp.default=A_;var Hp={},Vp={};Object.defineProperty(Vp,"__esModule",{value:!0});const lh=Rl,M_={keyword:"dependentRequired",type:"object",schemaType:"object",error:lh.error,code:e=>(0,lh.validatePropertyDeps)(e)};Vp.default=M_;var Wp={};Object.defineProperty(Wp,"__esModule",{value:!0});const q_=Rl,U_={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,q_.validateSchemaDeps)(e)};Wp.default=U_;var Kp={};Object.defineProperty(Kp,"__esModule",{value:!0});const L_=Q,D_={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:n}){t.contains===void 0&&(0,L_.checkStrictMode)(n,`"${e}" without "contains" is ignored`)}};Kp.default=D_;Object.defineProperty(Hp,"__esModule",{value:!0});const z_=Vp,F_=Wp,B_=Kp,H_=[z_.default,F_.default,B_.default];Hp.default=H_;var Gp={},Jp={};Object.defineProperty(Jp,"__esModule",{value:!0});const Xn=ue,ch=Q,V_=Dt,W_={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Xn._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},K_={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:W_,code(e){const{gen:t,schema:n,data:o,errsCount:r,it:i}=e;if(!r)throw new Error("ajv implementation error");const{allErrors:s,props:a}=i;a instanceof Xn.Name?t.if((0,Xn._)`${a} !== true`,()=>t.forIn("key",o,m=>t.if(c(a,m),()=>l(m)))):a!==!0&&t.forIn("key",o,m=>a===void 0?l(m):t.if(f(a,m),()=>l(m))),i.props=!0,e.ok((0,Xn._)`${r} === ${V_.default.errors}`);function l(m){if(n===!1){e.setParams({unevaluatedProperty:m}),e.error(),s||t.break();return}if(!(0,ch.alwaysValidSchema)(i,n)){const v=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:ch.Type.Str},v),s||t.if((0,Xn.not)(v),()=>t.break())}}function c(m,v){return(0,Xn._)`!${m} || !${m}[${v}]`}function f(m,v){const h=[];for(const y in m)m[y]===!0&&h.push((0,Xn._)`${v} !== ${y}`);return(0,Xn.and)(...h)}}};Jp.default=K_;var Qp={};Object.defineProperty(Qp,"__esModule",{value:!0});const Ro=ue,dh=Q,G_={message:({params:{len:e}})=>(0,Ro.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ro._)`{limit: ${e}}`},J_={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:G_,code(e){const{gen:t,schema:n,data:o,it:r}=e,i=r.items||0;if(i===!0)return;const s=t.const("len",(0,Ro._)`${o}.length`);if(n===!1)e.setParams({len:i}),e.fail((0,Ro._)`${s} > ${i}`);else if(typeof n=="object"&&!(0,dh.alwaysValidSchema)(r,n)){const l=t.var("valid",(0,Ro._)`${s} <= ${i}`);t.if((0,Ro.not)(l),()=>a(l,i)),e.ok(l)}r.items=!0;function a(l,c){t.forRange("i",c,s,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:dh.Type.Num},l),r.allErrors||t.if((0,Ro.not)(l),()=>t.break())})}}};Qp.default=J_;Object.defineProperty(Gp,"__esModule",{value:!0});const Q_=Jp,Y_=Qp,X_=[Q_.default,Y_.default];Gp.default=X_;var Yp={},Xp={};Object.defineProperty(Xp,"__esModule",{value:!0});const We=ue,Z_={message:({schemaCode:e})=>(0,We.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,We._)`{format: ${e}}`},ej={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Z_,code(e,t){const{gen:n,data:o,$data:r,schema:i,schemaCode:s,it:a}=e,{opts:l,errSchemaPath:c,schemaEnv:f,self:m}=a;if(!l.validateFormats)return;r?v():h();function v(){const y=n.scopeValue("formats",{ref:m.formats,code:l.code.formats}),b=n.const("fDef",(0,We._)`${y}[${s}]`),g=n.let("fType"),p=n.let("format");n.if((0,We._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>n.assign(g,(0,We._)`${b}.type || "string"`).assign(p,(0,We._)`${b}.validate`),()=>n.assign(g,(0,We._)`"string"`).assign(p,b)),e.fail$data((0,We.or)(u(),x()));function u(){return l.strictSchema===!1?We.nil:(0,We._)`${s} && !${p}`}function x(){const S=f.$async?(0,We._)`(${b}.async ? await ${p}(${o}) : ${p}(${o}))`:(0,We._)`${p}(${o})`,T=(0,We._)`(typeof ${p} == "function" ? ${S} : ${p}.test(${o}))`;return(0,We._)`${p} && ${p} !== true && ${g} === ${t} && !${T}`}}function h(){const y=m.formats[i];if(!y){u();return}if(y===!0)return;const[b,g,p]=x(y);b===t&&e.pass(S());function u(){if(l.strictSchema===!1){m.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${i}" ignored in schema at path "${c}"`}}function x(T){const C=T instanceof RegExp?(0,We.regexpCode)(T):l.code.formats?(0,We._)`${l.code.formats}${(0,We.getProperty)(i)}`:void 0,$=n.scopeValue("formats",{key:i,ref:T,code:C});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,We._)`${$}.validate`]:["string",T,$]}function S(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!f.$async)throw new Error("async format in sync schema");return(0,We._)`await ${p}(${o})`}return typeof g=="function"?(0,We._)`${p}(${o})`:(0,We._)`${p}.test(${o})`}}}};Xp.default=ej;Object.defineProperty(Yp,"__esModule",{value:!0});const tj=Xp,nj=[tj.default];Yp.default=nj;var Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.contentVocabulary=Kr.metadataVocabulary=void 0;Kr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Kr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(fp,"__esModule",{value:!0});const oj=mp,rj=yp,ij=Np,sj=zp,aj=Hp,lj=Gp,cj=Yp,uh=Kr,dj=[sj.default,oj.default,rj.default,(0,ij.default)(!0),cj.default,uh.metadataVocabulary,uh.contentVocabulary,aj.default,lj.default];fp.default=dj;var Zp={},Ml={};Object.defineProperty(Ml,"__esModule",{value:!0});Ml.DiscrError=void 0;var ph;(function(e){e.Tag="tag",e.Mapping="mapping"})(ph||(Ml.DiscrError=ph={}));Object.defineProperty(Zp,"__esModule",{value:!0});const dr=ue,Dd=Ml,fh=xt,uj=Yr,pj=Q,fj={message:({params:{discrError:e,tagName:t}})=>e===Dd.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,dr._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},mj={keyword:"discriminator",type:"object",schemaType:"object",error:fj,code(e){const{gen:t,data:n,schema:o,parentSchema:r,it:i}=e,{oneOf:s}=r;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=o.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",(0,dr._)`${n}${(0,dr.getProperty)(a)}`);t.if((0,dr._)`typeof ${c} == "string"`,()=>f(),()=>e.error(!1,{discrError:Dd.DiscrError.Tag,tag:c,tagName:a})),e.ok(l);function f(){const h=v();t.if(!1);for(const y in h)t.elseIf((0,dr._)`${c} === ${y}`),t.assign(l,m(h[y]));t.else(),e.error(!1,{discrError:Dd.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function m(h){const y=t.name("valid"),b=e.subschema({keyword:"oneOf",schemaProp:h},y);return e.mergeEvaluated(b,dr.Name),y}function v(){var h;const y={},b=p(r);let g=!0;for(let S=0;S<s.length;S++){let T=s[S];if(T!=null&&T.$ref&&!(0,pj.schemaHasRulesButRef)(T,i.self.RULES)){const $=T.$ref;if(T=fh.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,$),T instanceof fh.SchemaEnv&&(T=T.schema),T===void 0)throw new uj.default(i.opts.uriResolver,i.baseId,$)}const C=(h=T==null?void 0:T.properties)===null||h===void 0?void 0:h[a];if(typeof C!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(b||p(T)),u(C,S)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return y;function p({required:S}){return Array.isArray(S)&&S.includes(a)}function u(S,T){if(S.const)x(S.const,T);else if(S.enum)for(const C of S.enum)x(C,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(S,T){if(typeof S!="string"||S in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[S]=T}}}};Zp.default=mj;var ef={};const hj="https://json-schema.org/draft/2020-12/schema",yj="https://json-schema.org/draft/2020-12/schema",gj={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},vj="meta",bj="Core and Validation specifications meta-schema",xj=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],wj=["object","boolean"],Sj="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",$j={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},kj={$schema:hj,$id:yj,$vocabulary:gj,$dynamicAnchor:vj,title:bj,allOf:xj,type:wj,$comment:Sj,properties:$j},Tj="https://json-schema.org/draft/2020-12/schema",_j="https://json-schema.org/draft/2020-12/meta/applicator",jj={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},Nj="meta",Cj="Applicator vocabulary meta-schema",Ej=["object","boolean"],Pj={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},Ij={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},Oj={$schema:Tj,$id:_j,$vocabulary:jj,$dynamicAnchor:Nj,title:Cj,type:Ej,properties:Pj,$defs:Ij},Rj="https://json-schema.org/draft/2020-12/schema",Aj="https://json-schema.org/draft/2020-12/meta/unevaluated",Mj={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},qj="meta",Uj="Unevaluated applicator vocabulary meta-schema",Lj=["object","boolean"],Dj={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},zj={$schema:Rj,$id:Aj,$vocabulary:Mj,$dynamicAnchor:qj,title:Uj,type:Lj,properties:Dj},Fj="https://json-schema.org/draft/2020-12/schema",Bj="https://json-schema.org/draft/2020-12/meta/content",Hj={"https://json-schema.org/draft/2020-12/vocab/content":!0},Vj="meta",Wj="Content vocabulary meta-schema",Kj=["object","boolean"],Gj={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},Jj={$schema:Fj,$id:Bj,$vocabulary:Hj,$dynamicAnchor:Vj,title:Wj,type:Kj,properties:Gj},Qj="https://json-schema.org/draft/2020-12/schema",Yj="https://json-schema.org/draft/2020-12/meta/core",Xj={"https://json-schema.org/draft/2020-12/vocab/core":!0},Zj="meta",eN="Core vocabulary meta-schema",tN=["object","boolean"],nN={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},oN={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},rN={$schema:Qj,$id:Yj,$vocabulary:Xj,$dynamicAnchor:Zj,title:eN,type:tN,properties:nN,$defs:oN},iN="https://json-schema.org/draft/2020-12/schema",sN="https://json-schema.org/draft/2020-12/meta/format-annotation",aN={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},lN="meta",cN="Format vocabulary meta-schema for annotation results",dN=["object","boolean"],uN={format:{type:"string"}},pN={$schema:iN,$id:sN,$vocabulary:aN,$dynamicAnchor:lN,title:cN,type:dN,properties:uN},fN="https://json-schema.org/draft/2020-12/schema",mN="https://json-schema.org/draft/2020-12/meta/meta-data",hN={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},yN="meta",gN="Meta-data vocabulary meta-schema",vN=["object","boolean"],bN={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},xN={$schema:fN,$id:mN,$vocabulary:hN,$dynamicAnchor:yN,title:gN,type:vN,properties:bN},wN="https://json-schema.org/draft/2020-12/schema",SN="https://json-schema.org/draft/2020-12/meta/validation",$N={"https://json-schema.org/draft/2020-12/vocab/validation":!0},kN="meta",TN="Validation vocabulary meta-schema",_N=["object","boolean"],jN={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},NN={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},CN={$schema:wN,$id:SN,$vocabulary:$N,$dynamicAnchor:kN,title:TN,type:_N,properties:jN,$defs:NN};Object.defineProperty(ef,"__esModule",{value:!0});const EN=kj,PN=Oj,IN=zj,ON=Jj,RN=rN,AN=pN,MN=xN,qN=CN,UN=["/properties"];function LN(e){return[EN,PN,IN,ON,RN,t(this,AN),MN,t(this,qN)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function t(n,o){return e?n.$dataMetaSchema(o,UN):o}}ef.default=LN;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const n=Rv,o=fp,r=Zp,i=ef,s="https://json-schema.org/draft/2020-12/schema";class a extends n.default{constructor(h={}){super({...h,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),o.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:h,meta:y}=this.opts;y&&(i.default.call(this,h),this.refs["http://json-schema.org/schema"]=s)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var l=ln;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=ue;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=Cs;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var m=Yr;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Od,Od.exports);var DN=Od.exports;const zN=Yd(DN),mh=zN,FN=mh.default??mh,hh="acp";function BN(e){const t={path:e.instancePath||"/",message:e.message??"validation failed"};return e.keyword&&(t.keyword=e.keyword),t}function HN(e){const t=new FN({strict:!1,allErrors:!0,validateFormats:!1});t.addSchema(e,hh);const n=new Map,o=e.$defs??{};for(const[l,c]of Object.entries(o)){const f=c["x-method"];if(typeof f!="string")continue;let m=n.get(f);m||(m={},n.set(f,m)),l.endsWith("Request")?m.requestDef=l:l.endsWith("Response")?m.responseDef=l:l.endsWith("Notification")&&(m.notificationDef=l)}const r=new Map,i=l=>{const c=r.get(l);if(c)return c;const f=t.compile({$ref:`${hh}#/$defs/${l}`});return r.set(l,f),f};function s(l,c={}){if(!l.payload)return{valid:!0,errors:[],skipped:"parse-error"};if(l.kind==="unknown")return{valid:!0,errors:[],skipped:"wrong-kind"};const f=l.method??c.pairedMethod;if(!f)return{valid:!0,errors:[],skipped:"no-method"};const m=n.get(f);if(!m)return{valid:!0,errors:[],skipped:"unknown-method"};let v,h;const y=l.payload;if(l.kind==="request")v=m.requestDef,h=y.params;else if(l.kind==="notification")v=m.notificationDef,h=y.params;else if(l.kind==="response")v=m.responseDef,h=y.result;else return{valid:!0,errors:[],skipped:"wrong-kind"};if(!v)return{valid:!0,errors:[],skipped:"no-schema-for-kind"};const b=i(v);return b(h)?{valid:!0,errors:[],schemaName:v}:{valid:!1,errors:(b.errors??[]).map(BN),schemaName:v}}function a(){return[...n.keys()].sort()}return{validateAcpMessage:s,knownAcpMethods:a}}const VN=HN(Ov),WN=VN.validateAcpMessage;function tf(e){const t=Cl(e),n=new Map;for(const r of e)r.method&&n.set(r.seq,r.method);const o=new Map;for(const r of e){const i=t.get(r.seq),s=i!==void 0?n.get(i):void 0,a={};s!==void 0&&(a.pairedMethod=s),o.set(r.seq,WN(r,a))}return o}function KN(e){let t=0,n=0,o=0;const r=new Set;for(const[,i]of e)if(!i.skipped&&(t+=1,!i.valid&&(n+=1,o+=i.errors.length,i.schemaName))){const s=i.schemaName.replace(/(Request|Response|Notification)$/,"");r.add(s)}return{checked:t,invalidFrames:n,totalErrors:o,affectedMethods:[...r].sort()}}const GN={"claude-code":{shortName:"claude-code",displayName:"Claude Code",description:"Anthropic Claude Code via @agentclientprotocol/claude-agent-acp",command:"npx",args:["-y","@agentclientprotocol/claude-agent-acp"],aliases:[["npx","-y","@zed-industries/claude-code-acp"]]},codex:{shortName:"codex",displayName:"Codex",description:"OpenAI Codex via @zed-industries/codex-acp",command:"npx",args:["-y","@zed-industries/codex-acp"]},goose:{shortName:"goose",displayName:"Goose",description:"Block Goose — install separately, then this runs `goose acp`",command:"goose",args:["acp"],requiresExternalInstall:!0},opencode:{shortName:"opencode",displayName:"OpenCode",description:"SST OpenCode — install via opencode.ai/install, then `opencode acp`",command:"opencode",args:["acp"],requiresExternalInstall:!0}};function JN(e){const t=e.trim();if(t.length===0)return null;for(const n of Object.values(GN)){const o=[[n.command,...n.args],...n.aliases??[]];for(const r of o){const i=r.join(" ");if(t===i||t.startsWith(i+" "))return n}}return null}function Rt(e){const t=JN(e);if(t)return t.displayName;const n=e.trim().split(/\s+/).filter(Boolean);if(n.length===0)return e;if(n[0]==="npx")for(let o=1;o<n.length;o++){const r=n[o];if(!r.startsWith("-"))return r}return n[0]==="node"&&n[1]?n[1].split("/").pop()??n[1]:n[0]}function nf(e){const t=e.sessionDbId!==null?`#${e.sessionDbId}`:`pid ${e.pid}`;if(e.sessionName)return`${t} · ${e.sessionName}`;const n=Rt(e.agentCommand);return e.clientName?`${t} · ${e.clientName} · ${n}`:`${t} · ${n}`}function ql(e){const t=e.id>0?`#${e.id}`:"ephemeral";if(e.name)return{primary:t,secondary:e.name};const n=Rt(e.agentCommand??""),o=e.clientName?`${e.clientName} · ${n}`:n;return{primary:t,secondary:o}}const QN={};function YN(){const e=QN;return(e==null?void 0:e.VITE_PLAYGROUND)==="1"}const XN={"editor-to-agent":"out","agent-to-editor":"in"},ZN={out:"editor-to-agent",in:"agent-to-editor"},eC={request:"req",response:"rsp",notification:"ntf",error:"err",unknown:"unk"},tC={req:"request",rsp:"response",ntf:"notification",err:"error",unk:"unknown"},nC=["tree","raw","meta"];function yh(e){const t=new URLSearchParams(e),n={},o=t.get("dir");if(o!==null){const y=o.split(",").map(b=>b.trim()).filter(Boolean).map(b=>ZN[b]).filter(b=>b!==void 0);y.length>0&&(n.directions=new Set(y))}const r=t.get("kind");if(r!==null){const y=r.split(",").map(b=>b.trim()).filter(Boolean).map(b=>tC[b]).filter(b=>b!==void 0);y.length>0&&(n.kinds=new Set(y))}t.get("streams")==="0"&&(n.showStreams=!1);const i=t.get("q");i!==null&&(n.search=i);const s=t.get("seq"),a=s!==null&&/^\d+$/.test(s)?Number(s):null,l=t.get("tab"),c=l!==null&&nC.includes(l)?l:null,f=t.get("play"),m=f!==null&&/^\d+$/.test(f)?Number(f):null,v=t.get("ws");return{filters:n,selectedSeq:a,detailTab:c,playhead:m,captureUrl:v}}const oC=["ws","dir","kind","streams","q","seq","tab","play"];function rC(e){const t=new URLSearchParams(window.location.search);for(const r of oC)t.delete(r);e.captureUrl&&t.set("ws",e.captureUrl),e.filters.directions.size<ls.length&&t.set("dir",[...e.filters.directions].map(r=>XN[r]).filter(Boolean).join(",")),e.filters.kinds.size<cs.length&&t.set("kind",[...e.filters.kinds].map(r=>eC[r]).filter(Boolean).join(",")),e.filters.showStreams||t.set("streams","0"),e.filters.search&&t.set("q",e.filters.search),e.selectedSeq!==null&&t.set("seq",String(e.selectedSeq)),e.detailTab!=="tree"&&t.set("tab",e.detailTab),e.playhead!==null&&t.set("play",String(e.playhead));const n=t.toString(),o=`${window.location.pathname}${n?`?${n}`:""}${window.location.hash}`;o!==window.location.pathname+window.location.search+window.location.hash&&window.history.replaceState(window.history.state,"",o)}function qb(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=qb(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function iC(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=qb(e))&&(o&&(o+=" "),o+=t);return o}const of="-",sC=e=>{const t=lC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const a=s.split(of);return a[0]===""&&a.length!==1&&a.shift(),Ub(a,t)||aC(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&o[s]?[...l,...o[s]]:l}}},Ub=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?Ub(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join(of);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},gh=/^\[(.+)\]$/,aC=e=>{if(gh.test(e)){const t=gh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},lC=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return dC(Object.entries(e.classGroups),n).forEach(([i,s])=>{zd(s,o,i,t)}),o},zd=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:vh(t,r);i.classGroupId=n;return}if(typeof r=="function"){if(cC(r)){zd(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([i,s])=>{zd(s,vh(t,i),n,o)})})},vh=(e,t)=>{let n=e;return t.split(of).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},cC=e=>e.isThemeGetter,dC=(e,t)=>t?e.map(([n,o])=>{const r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,r]}):e,uC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,o=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return r(i,s),s},set(i,s){n.has(i)?n.set(i,s):r(i,s)}}},Lb="!",pC=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],i=t.length,s=a=>{const l=[];let c=0,f=0,m;for(let g=0;g<a.length;g++){let p=a[g];if(c===0){if(p===r&&(o||a.slice(g,g+i)===t)){l.push(a.slice(f,g)),f=g+i;continue}if(p==="/"){m=g;continue}}p==="["?c++:p==="]"&&c--}const v=l.length===0?a:a.substring(f),h=v.startsWith(Lb),y=h?v.substring(1):v,b=m&&m>f?m-f:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:b}};return n?a=>n({className:a,parseClassName:s}):s},fC=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},mC=e=>({cache:uC(e.cacheSize),parseClassName:pC(e),...sC(e)}),hC=/\s+/,yC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],s=e.trim().split(hC);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:f,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:h}=n(c);let y=!!h,b=o(y?v.substring(0,h):v);if(!b){if(!y){a=c+(a.length>0?" "+a:a);continue}if(b=o(v),!b){a=c+(a.length>0?" "+a:a);continue}y=!1}const g=fC(f).join(":"),p=m?g+Lb:g,u=p+b;if(i.includes(u))continue;i.push(u);const x=r(b,y);for(let S=0;S<x.length;++S){const T=x[S];i.push(p+T)}a=c+(a.length>0?" "+a:a)}return a};function gC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Db(t))&&(o&&(o+=" "),o+=n);return o}const Db=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Db(e[o]))&&(n&&(n+=" "),n+=t);return n};function vC(e,...t){let n,o,r,i=s;function s(l){const c=t.reduce((f,m)=>m(f),e());return n=mC(c),o=n.cache.get,r=n.cache.set,i=a,a(l)}function a(l){const c=o(l);if(c)return c;const f=yC(l,n);return r(l,f),f}return function(){return i(gC.apply(null,arguments))}}const Ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},zb=/^\[(?:([a-z-]+):)?(.+)\]$/i,bC=/^\d+\/\d+$/,xC=new Set(["px","full","screen"]),wC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SC=/\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$/,$C=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jn=e=>Rr(e)||xC.has(e)||bC.test(e),Jn=e=>ni(e,"length",OC),Rr=e=>!!e&&!Number.isNaN(Number(e)),$c=e=>ni(e,"number",Rr),gi=e=>!!e&&Number.isInteger(Number(e)),_C=e=>e.endsWith("%")&&Rr(e.slice(0,-1)),pe=e=>zb.test(e),Qn=e=>wC.test(e),jC=new Set(["length","size","percentage"]),NC=e=>ni(e,jC,Fb),CC=e=>ni(e,"position",Fb),EC=new Set(["image","url"]),PC=e=>ni(e,EC,AC),IC=e=>ni(e,"",RC),vi=()=>!0,ni=(e,t,n)=>{const o=zb.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},OC=e=>SC.test(e)&&!$C.test(e),Fb=()=>!1,RC=e=>kC.test(e),AC=e=>TC.test(e),MC=()=>{const e=Ie("colors"),t=Ie("spacing"),n=Ie("blur"),o=Ie("brightness"),r=Ie("borderColor"),i=Ie("borderRadius"),s=Ie("borderSpacing"),a=Ie("borderWidth"),l=Ie("contrast"),c=Ie("grayscale"),f=Ie("hueRotate"),m=Ie("invert"),v=Ie("gap"),h=Ie("gradientColorStops"),y=Ie("gradientColorStopPositions"),b=Ie("inset"),g=Ie("margin"),p=Ie("opacity"),u=Ie("padding"),x=Ie("saturate"),S=Ie("scale"),T=Ie("sepia"),C=Ie("skew"),$=Ie("space"),j=Ie("translate"),A=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",pe,t],z=()=>[pe,t],U=()=>["",jn,Jn],L=()=>["auto",Rr,pe],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",pe],O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>[Rr,pe];return{cacheSize:500,separator:":",theme:{colors:[vi],spacing:[jn,Jn],blur:["none","",Qn,pe],brightness:_(),borderColor:[e],borderRadius:["none","","full",Qn,pe],borderSpacing:z(),borderWidth:U(),contrast:_(),grayscale:J(),hueRotate:_(),invert:J(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[_C,Jn],inset:q(),margin:q(),opacity:_(),padding:z(),saturate:_(),scale:_(),sepia:J(),skew:_(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F(),pe]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gi,pe]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",gi,pe]}],"grid-cols":[{"grid-cols":[vi]}],"col-start-end":[{col:["auto",{span:["full",gi,pe]},pe]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[vi]}],"row-start-end":[{row:["auto",{span:[gi,pe]},pe]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[u]}],px:[{px:[u]}],py:[{py:[u]}],ps:[{ps:[u]}],pe:[{pe:[u]}],pt:[{pt:[u]}],pr:[{pr:[u]}],pb:[{pb:[u]}],pl:[{pl:[u]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Jn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$c]}],"font-family":[{font:[vi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",Rr,$c]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jn,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jn,Jn]}],"underline-offset":[{"underline-offset":["auto",jn,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),CC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},PC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:G()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[jn,pe]}],"outline-w":[{outline:[jn,Jn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[jn,Jn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qn,IC]}],"shadow-color":[{shadow:[vi]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,pe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[m]}],saturate:[{saturate:[x]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:_()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:_()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[gi,pe]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[jn,Jn,$c]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},qC=vC(MC);function K(...e){return qC(iC(e))}const $a=1;function UC(e,t,n){return{version:$a,exportedAt:n.exportedAt??Date.now(),tool:{name:n.tool.name,version:n.tool.version},session:{id:e.id,name:e.name,agentCommand:e.agentCommand,clientName:e.clientName,startedAt:e.startedAt,endedAt:e.endedAt},messages:[...t]}}function LC(e,t=4){return JSON.stringify(e,null,t)+`
|
|
1766
|
+
`}class Ke extends Error{constructor(t){super(t),this.name="ExportParseError"}}function DC(e){let t;try{t=JSON.parse(e)}catch(l){throw new Ke(`invalid JSON: ${l instanceof Error?l.message:String(l)}`)}if(!ka(t))throw new Ke("expected an object at the top level");const n=t.version;if(n!==$a)throw new Ke(`unsupported export version ${String(n)} (expected ${$a})`);const o=t.exportedAt;if(typeof o!="number")throw new Ke("exportedAt must be a number");if(!ka(t.tool))throw new Ke("tool must be an object");const r=t.tool.name,i=t.tool.version;if(typeof r!="string")throw new Ke("tool.name must be a string");if(typeof i!="string")throw new Ke("tool.version must be a string");const s=t.session;if(!ka(s))throw new Ke("session must be an object");if(typeof s.id!="number")throw new Ke("session.id must be a number");if(typeof s.startedAt!="number")throw new Ke("session.startedAt must be a number");if(s.endedAt!==null&&typeof s.endedAt!="number")throw new Ke("session.endedAt must be a number or null");if(s.name!==null&&typeof s.name!="string")throw new Ke("session.name must be a string or null");if(s.agentCommand!==null&&typeof s.agentCommand!="string")throw new Ke("session.agentCommand must be a string or null");if(s.clientName!==null&&typeof s.clientName!="string")throw new Ke("session.clientName must be a string or null");if(!Array.isArray(t.messages))throw new Ke("messages must be an array");const a=t.messages.map((l,c)=>zC(l,c));return{version:$a,exportedAt:o,tool:{name:r,version:i},session:{id:s.id,name:s.name,agentCommand:s.agentCommand,clientName:s.clientName,startedAt:s.startedAt,endedAt:s.endedAt},messages:a}}function zC(e,t){if(!ka(e))throw new Ke(`messages[${t}] must be an object`);if(typeof e.seq!="number")throw new Ke(`messages[${t}].seq must be a number`);if(typeof e.timestamp!="number")throw new Ke(`messages[${t}].timestamp must be a number`);if(e.direction!=="editor-to-agent"&&e.direction!=="agent-to-editor")throw new Ke(`messages[${t}].direction must be 'editor-to-agent' or 'agent-to-editor'`);const n=e.kind;if(n!=="request"&&n!=="response"&&n!=="error"&&n!=="notification"&&n!=="unknown")throw new Ke(`messages[${t}].kind has unexpected value '${String(n)}'`);if(typeof e.raw!="string")throw new Ke(`messages[${t}].raw must be a string`);const o={seq:e.seq,timestamp:e.timestamp,direction:e.direction,kind:n,raw:e.raw,payload:e.payload===null?null:e.payload};return typeof e.method=="string"&&(o.method=e.method),(typeof e.rpcId=="string"||typeof e.rpcId=="number"||e.rpcId===null)&&(o.rpcId=e.rpcId),typeof e.parseError=="string"&&(o.parseError=e.parseError),o}function ka(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Bb="<REDACTED>",FC=new Set(["authorization","proxy-authorization","proxy-authentication","x-api-key","x-api-token","x-auth-token","api-key","api_key","proxy_key","cookie","set-cookie"]);function BC(e){if(e.payload==null)return{redacted:e,count:0};const{value:t,count:n}=Fd(e.payload,{inProxyConfig:!1});if(n===0)return{redacted:e,count:0};const o=t;return{redacted:{...e,payload:o,raw:JSON.stringify(o)},count:n}}function Fd(e,t){if(Array.isArray(e)){let n=0;const o=new Array(e.length);for(let r=0;r<e.length;r++){const i=Fd(e[r],t);o[r]=i.value,n+=i.count}return{value:o,count:n}}if(e!==null&&typeof e=="object"){let n=0;const o={};for(const[r,i]of Object.entries(e)){if(typeof i=="string"&&FC.has(r.toLowerCase())){o[r]=Bb,n+=1;continue}if(t.inProxyConfig&&r==="headers"&&i!==null&&typeof i=="object"&&!Array.isArray(i)){const l=HC(i);o[r]=l.value,n+=l.count;continue}const s=t.inProxyConfig||r.toLowerCase()==="proxyconfig"?{inProxyConfig:!0}:t,a=Fd(i,s);o[r]=a.value,n+=a.count}return{value:o,count:n}}return{value:e,count:0}}function HC(e){let t=0;const n={};for(const[o,r]of Object.entries(e))typeof r=="string"?(n[o]=Bb,t+=1):n[o]=r;return{value:n,count:t}}function VC(e){let t=0,n=0;const o=e.messages.map(r=>{const i=BC(r);return i.count>0&&(t+=1,n+=i.count),i.redacted});return n===0?{export:e,messagesAffected:0,fieldsRedacted:0}:{export:{...e,messages:o},messagesAffected:t,fieldsRedacted:n}}const WC={name:"acp-devtools-ui",version:"0.4.0"};function KC(e,t=Date.now()){const n=e.id>0?String(e.id):"live",o=new Date(t).toISOString().slice(0,19).replace(/[:T]/g,"-");return`acp-session-${n}-${o}.json`}function GC(e,t,n=Date.now()){const o=UC(e,t,{tool:WC,exportedAt:n}),{export:r}=VC(o);return LC(r)}function Hb(e,t,n=Date.now()){const o=GC(e,t,n),r=new Blob([o],{type:"application/json"}),i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=KC(e,n),s.rel="noopener",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)}function JC({open:e,onClose:t}){const[n,o]=I.useState(""),[r,i]=I.useState(0),s=I.useRef(null);I.useEffect(()=>{if(!e)return;o(""),i(0);const c=setTimeout(()=>{var f;return(f=s.current)==null?void 0:f.focus()},0);return()=>clearTimeout(c)},[e]);const a=I.useMemo(()=>QC(),[t,e]),l=I.useMemo(()=>YC(a,n),[a,n]);return I.useEffect(()=>{r>=l.length&&i(0)},[l.length,r]),I.useEffect(()=>{if(!e)return;const c=f=>{if(f.key==="Escape"){f.preventDefault(),t();return}if(f.key==="ArrowDown"){f.preventDefault(),i(m=>l.length===0?0:(m+1)%l.length);return}if(f.key==="ArrowUp"){f.preventDefault(),i(m=>l.length===0?0:(m-1+l.length)%l.length);return}if(f.key==="Enter"){f.preventDefault();const m=l[r];m&&(m.run(),t())}};return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[e,l,r,t]),e?d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] flex items-start justify-center bg-black/60 pt-[8vh] backdrop-blur-sm",onMouseDown:c=>{c.target===c.currentTarget&&t()},children:d.jsxs("div",{className:"w-[min(620px,92vw)] overflow-hidden rounded-md border border-line-strong bg-surface-elev shadow-2xl",children:[d.jsx("div",{className:"border-b border-line bg-surface-base/60",children:d.jsx("input",{ref:s,value:n,onChange:c=>{o(c.target.value),i(0)},placeholder:"type a command… esc closes ↑↓ navigate ↵ run",className:"w-full bg-transparent px-4 py-3 font-mono text-[13px] text-ink-primary placeholder-ink-muted outline-none"})}),d.jsxs("ul",{className:"max-h-[60vh] overflow-y-auto py-1",children:[l.length===0&&d.jsx("li",{className:"px-4 py-3 text-center font-mono text-[11px] uppercase tracking-widest text-ink-muted",children:"no match"}),l.map((c,f)=>{const m=f===r,v=l[f-1],h=!v||v.section!==c.section;return d.jsxs("li",{children:[h&&d.jsx("div",{className:"px-4 pt-2 pb-1 font-mono text-[9px] uppercase tracking-widest text-ink-muted",children:c.section}),d.jsxs("button",{type:"button",onClick:()=>{c.run(),t()},onMouseEnter:()=>i(f),className:K("flex w-full items-center justify-between px-4 py-1.5 text-left font-mono text-[12px] transition-colors",m?"bg-accent-out/10 text-ink-primary":"text-ink-secondary hover:bg-surface-rowHover hover:text-ink-primary"),children:[d.jsx("span",{className:"truncate",children:c.label}),c.hint&&d.jsx("span",{className:"ml-3 shrink-0 rounded-sm border border-line px-1.5 py-0.5 text-[10px] uppercase tracking-widest text-ink-muted",children:c.hint})]})]},c.id)})]})]})}):null}function QC(e){const t=ne.getState(),n=at.getState(),o=[];o.push({id:"session.import",label:"Import session JSON from disk…",section:"session",run:()=>{const r=document.createElement("input");r.type="file",r.accept="application/json,.json",r.addEventListener("change",()=>{var s;const i=(s=r.files)==null?void 0:s[0];i&&(async()=>{try{const a=await jv(i);await Xu(),n.setSelected(tl(a.id))}catch(a){const l=a instanceof Error?a.message:String(a);window.alert(`Import failed: ${l}`)}})()}),r.click()}}),t.session!==null&&t.messages.length>0&&o.push({id:"session.export",label:"Export current session as JSON (redacted — auth tokens hidden)",section:"session",run:()=>Hb(t.session,t.messages)}),o.push({id:"view.deselect",label:"Deselect message",hint:"esc",section:"view",run:()=>t.select(null)}),o.push({id:"view.toggle-streams",label:t.filters.showStreams?"Hide streaming chunks":"Show streaming chunks",section:"filter",run:()=>t.toggleStreams()}),o.push({id:"filter.reset",label:"Reset all filters",section:"filter",run:()=>{const r={directions:new Set(ls),kinds:new Set(cs),showStreams:!0,search:""};ne.setState({filters:r})}});for(const r of ls){const i=t.filters.directions.has(r);o.push({id:`filter.dir.${r}`,label:`${i?"Hide":"Show"} ${r==="editor-to-agent"?"editor → agent":"agent → editor"} messages`,section:"filter",run:()=>t.toggleDirection(r)})}for(const r of cs){const i=t.filters.kinds.has(r);o.push({id:`filter.kind.${r}`,label:`${i?"Hide":"Show"} ${r} kind`,section:"filter",run:()=>t.toggleKind(r)})}if(t.selectedSeq!==null){const r=t.messages.find(i=>i.seq===t.selectedSeq);r&&(o.push({id:"copy.raw",label:`Copy selected message raw line (seq ${r.seq})`,section:"copy",run:()=>{navigator.clipboard.writeText(r.raw)}}),r.payload&&o.push({id:"copy.payload",label:`Copy selected payload as JSON (seq ${r.seq})`,section:"copy",run:()=>{navigator.clipboard.writeText(JSON.stringify(r.payload,null,2))}}))}for(const r of n.captures)o.push({id:`switch.live.${r.url}`,label:`Switch to live: ${nf(r)}`,section:"switch",run:()=>n.setSelected(r.url)});for(const r of n.savedSessions.slice(0,25)){const i=Rt(r.agent_command??""),s=r.name??(r.client_name?`${r.client_name} · ${i}`:i);o.push({id:`switch.saved.${r.id}`,label:`Open saved #${r.id} · ${s} (${r.message_count} msg)`,section:"switch",run:()=>n.setSelected(tl(r.id))})}return o}function YC(e,t){const n=t.trim().toLowerCase();if(n==="")return e;const o=n.split(/\s+/);return e.filter(r=>{const i=r.label.toLowerCase();return o.every(s=>i.includes(s))})}const XC={idle:"idle",connecting:"connecting",open:"restoring view",closed:"disconnected",error:"connection error"};function ZC({status:e,url:t,lastError:n}){const o=XC[e],r=e==="connecting"||e==="open";return d.jsx("div",{className:"flex h-full w-full items-center justify-center bg-surface-base",children:d.jsxs("div",{className:"flex items-center gap-3 font-mono text-[11px] uppercase tracking-widest text-ink-muted",children:[d.jsx("span",{"aria-hidden":!0,className:K("inline-block h-2 w-2 rounded-full",r?"animate-pulse-soft bg-accent-out":"bg-ink-dim",e==="error"&&"bg-accent-error")}),d.jsx("span",{children:o}),d.jsx("span",{className:"text-ink-dim",children:"·"}),d.jsx("span",{className:"lowercase tracking-normal text-ink-secondary",children:t}),n&&e==="error"&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-ink-dim",children:"·"}),d.jsx("span",{className:"lowercase tracking-normal text-accent-error",children:n})]})]})})}function eE(e){const t=e.$defs??{},n=new Map;for(const[y,b]of Object.entries(t)){const g=b["x-method"];if(typeof g!="string")continue;let p=n.get(g);p||(p={},n.set(g,p)),y.endsWith("Request")?p.requestDef=y:y.endsWith("Response")?p.responseDef=y:y.endsWith("Notification")&&(p.notificationDef=y)}function o(y,b){var g,p,u;switch(y.kind){case"request":{const x=y.method;return x?((g=n.get(x))==null?void 0:g.requestDef)??null:null}case"notification":{const x=y.method;return x?((p=n.get(x))==null?void 0:p.notificationDef)??null:null}case"response":case"error":return b?((u=n.get(b))==null?void 0:u.responseDef)??null:null;default:return null}}function r(y){return y==="request"||y==="notification"?"params":y==="response"?"result":y==="error"?"error":null}function i(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function s(y,b){const g=y.properties;if(!g)return!0;for(const[p,u]of Object.entries(g))if(!(!u||typeof u!="object")){if("const"in u){if(b[p]!==u.const)return!1}else if(Array.isArray(u.enum)&&!u.enum.includes(b[p]))return!1}return!0}function a(y,b){const g=y.type;if(typeof g=="string"){if(g==="null")return b===null;if(g==="string")return typeof b=="string";if(g==="boolean")return typeof b=="boolean";if(g==="number"||g==="integer")return typeof b=="number";if(g==="array")return Array.isArray(b);if(g==="object")return i(b)&&s(y,b)}return y.$ref||y.properties||y.allOf?i(b)&&s(y,b):!1}function l(y,b=void 0){if(!y)return null;if(y.$ref){const g=y.$ref.replace(/^#\/\$defs\//,""),p=t[g];return p?l(p,b):null}if(y.allOf&&y.allOf.length>0){const g={properties:{}};for(const p of y.allOf){const u=l(p,b);u!=null&&u.properties&&(g.properties={...g.properties,...u.properties}),u!=null&&u.type&&!g.type&&(g.type=u.type),u!=null&&u.items&&!g.items&&(g.items=u.items)}return y.description&&!g.description&&(g.description=y.description),g}if(y.anyOf||y.oneOf){const g=y.anyOf??y.oneOf;if(b!==void 0){for(const p of g)if(p.type!=="null"&&a(p,b))return l(p,b)}for(const p of g){if(p.type==="null")continue;const u=l(p,b);if(u)return u}return null}return y}function c(y,b){let g=y;for(const p of b){if(g==null)return;if(Array.isArray(g)&&/^\d+$/.test(p))g=g[Number(p)];else if(typeof g=="object")g=g[p];else return}return g}function f(y){if(!y)return;if(y.$ref)return y.$ref.replace(/^#\/\$defs\//,"");const b=y.type;if(typeof b=="string")return b;if(Array.isArray(b))return b.find(p=>p!=="null")}function m(y,b){const g=t[y];return{typeName:y,typeDescription:(g==null?void 0:g.description)??null,resolve(p){var A;if(p.length===0)return{inSpec:!0,isExtension:!1,description:g==null?void 0:g.description,type:y};const u=p.slice(1);if(u.length===0)return null;let x=!1,S=g??null;for(let E=0;E<u.length;E++){const q=u[E];q==="_meta"&&(x=!0);const z=/^\d+$/.test(q),U=c(b,p.slice(0,E+1));if(S=l(S,U),!S)return null;if(z){const F=c(b,p.slice(0,E+2));S=l(S.items,F);continue}if(x&&q!=="_meta")return{inSpec:!1,isExtension:!0};const L=(A=S.properties)==null?void 0:A[q];if(!L)return{inSpec:!1,isExtension:x};S=L}const T=c(b,p),C=l(S,T),$={inSpec:!0,isExtension:x};S!=null&&S.description?$.description=S.description:C!=null&&C.description&&($.description=C.description);const j=f(S??null)??f(C);return j&&($.type=j),C!=null&&C.enum&&($.enumValues=C.enum),$}}}function v(y,b={}){const g=o(y,b.pairedMethod);return!g||!r(y.kind)?null:m(g,y.payload)}function h(){return[...n.keys()].sort()}return{resolveForMessage:v,knownMethods:h}}const tE=eE(Ov),nE=tE.resolveForMessage,oE={info:"border-line bg-surface-base text-ink-primary",warn:"border-accent-warn/40 bg-accent-warn/10 text-ink-primary",error:"border-accent-error/40 bg-accent-error/10 text-ink-primary"};function ps({label:e,children:t,delay:n=60,tone:o="info",className:r,focusable:i=!1}){const s=I.useRef(null),a=I.useRef(null),[l,c]=I.useState(null),f=l!==null,m=()=>{const y=s.current;if(!y)return null;const b=y.getBoundingClientRect(),p=window.innerHeight-b.bottom<120;return{top:p?b.top-8:b.bottom+8,left:Math.min(b.left,window.innerWidth-380),flipUp:p}},v=()=>{a.current!==null&&clearTimeout(a.current),a.current=setTimeout(()=>{const y=m();y&&c(y)},n)},h=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null),c(null)};return I.useEffect(()=>()=>{a.current!==null&&clearTimeout(a.current)},[]),I.useEffect(()=>{if(!f)return;const y=()=>h();return window.addEventListener("scroll",y,!0),()=>window.removeEventListener("scroll",y,!0)},[f]),d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:s,className:K("cursor-help",r),onMouseEnter:v,onMouseLeave:h,...i?{onFocus:v,onBlur:h,tabIndex:0}:{},children:t}),l&&Wu.createPortal(d.jsx("div",{role:"tooltip",className:K("pointer-events-none fixed z-[200] max-w-[360px] rounded-sm border px-3 py-2 font-mono text-[11px] leading-snug shadow-lg backdrop-blur-sm",oE[o]),style:{top:l.flipUp?void 0:l.top,bottom:l.flipUp?window.innerHeight-l.top:void 0,left:l.left},children:e}),document.body)]})}const rE=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function Ta(e){return rE.format(e)}function fs(e){const t=e%1e3;return`${Ta(e)}.${String(t).padStart(3,"0")}`}const iE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function sE(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function _a(e,t=Date.now()){const n=new Date(e),o=new Date(t);if(sE(n,o))return Ta(e);if(n.getFullYear()===o.getFullYear())return`${iE[n.getMonth()]} ${n.getDate()} ${Ta(e)}`;const r=String(n.getMonth()+1).padStart(2,"0"),i=String(n.getDate()).padStart(2,"0");return`${n.getFullYear()}-${r}-${i} ${Ta(e)}`}function Ul(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Vt(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function aE(e){return e<250?"ok":e<1500?"warn":"error"}function Vb(e){return e==="editor-to-agent"?"OUT":"IN"}function Wb(e){return e==="editor-to-agent"?"→":"←"}const lE=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function cE(e){const t=String(e);return lE.test(t)?t.slice(0,8)+"…":t.length>12?t.slice(0,10)+"…":t}function Ar(e,t=Date.now()){const n=Math.max(0,Math.round((t-e)/1e3));if(n<60)return`${n}s`;const o=Math.floor(n/60);if(o<60)return`${o}m`;const r=Math.floor(o/60);if(r<24){const a=o%60;return`${r}h${String(a).padStart(2,"0")}m`}const i=Math.floor(r/24),s=r%24;return`${i}d${String(s).padStart(2,"0")}h`}function bh(e,t){if(e.length===0)return 0;const n=t/100*(e.length-1),o=Math.floor(n),r=Math.ceil(n),i=e[o],s=e[r];return i===void 0||s===void 0?i??0:o===r?i:i+(s-i)*(n-o)}const dE=6;function xh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function uE(e){if(e===null)return"text-accent-error";switch(typeof e){case"string":return"text-accent-out";case"number":return"text-accent-in";case"boolean":return"text-accent-note";default:return"text-ink-secondary"}}function pE(e){return e===null?"null":typeof e=="string"?JSON.stringify(e):String(e)}function al({value:e,name:t,depth:n=0,defaultExpanded:o,path:r=[],getSpec:i}){const s=xh(e)||Array.isArray(e),a=xh(e)?Object.keys(e).length:Array.isArray(e)?e.length:0,l=o??(n<2&&a<=dE),[c,f]=I.useState(l),m=t!==void 0&&i?i(r):null,v=t!==void 0?d.jsx(fE,{name:t,spec:m}):null;if(!s)return d.jsxs("div",{className:"flex items-baseline gap-2 font-mono text-xs leading-relaxed",children:[v,d.jsx("span",{className:K("whitespace-pre-wrap break-all",uE(e)),children:pE(e)})]});const h=Array.isArray(e),y=h?"[":"{",b=h?"]":"}";return d.jsxs("div",{className:"font-mono text-xs leading-relaxed",children:[d.jsxs("button",{type:"button",onClick:()=>f(g=>!g),className:"group/expand flex items-baseline gap-2 text-left hover:text-ink-primary",children:[d.jsx("span",{"aria-hidden":!0,className:K("inline-block w-3 text-ink-muted transition-transform",c?"rotate-90":""),children:"▸"}),v,d.jsx("span",{className:"text-ink-secondary",children:y}),!c&&d.jsxs("span",{className:"text-ink-muted",children:[a," ",h?"items":"keys"]}),!c&&d.jsx("span",{className:"text-ink-secondary",children:b})]}),c&&d.jsxs("div",{className:"ml-3 border-l border-line-grid pl-3",children:[h?e.map((g,p)=>d.jsx(al,{value:g,name:String(p),depth:n+1,path:[...r,String(p)],...i?{getSpec:i}:{}},p)):Object.entries(e).map(([g,p])=>d.jsx(al,{value:p,name:g,depth:n+1,path:[...r,g],...i?{getSpec:i}:{}},g)),d.jsx("div",{className:"text-ink-secondary",children:b})]})]})}function fE({name:e,spec:t}){const n=/^\d+$/.test(e),o=(t==null?void 0:t.description)??null;return d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{className:K(n?"text-ink-muted":"text-ink-secondary"),children:n?`${e}:`:`"${e}":`}),t&&!t.inSpec&&d.jsx(wh,{tone:t.isExtension?"extension":"unknown",explanation:t.isExtension?"Extension — not declared in the ACP spec; contents are implementation-defined.":"Unknown — this field is not declared in the ACP schema for this message."}),(t==null?void 0:t.inSpec)&&t.isExtension&&d.jsx(wh,{tone:"extension",explanation:"Extension — _meta payload is implementation-defined per ACP spec."}),o&&d.jsx(ps,{label:d.jsx(mE,{text:o,type:t==null?void 0:t.type,enumValues:t==null?void 0:t.enumValues}),tone:"info",className:"text-ink-muted hover:text-ink-primary",focusable:!0,children:d.jsx("span",{"aria-label":`spec: ${o.split(`
|
|
1767
|
+
`)[0]}`,children:"ⓘ"})})]})}function mE({text:e,type:t,enumValues:n}){return d.jsxs("div",{className:"space-y-1.5",children:[t&&d.jsx("div",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:d.jsx("span",{className:"text-accent-info",children:t})}),d.jsx("div",{className:"whitespace-pre-wrap font-sans text-[12px] leading-snug text-ink-secondary",children:e}),n&&n.length>0&&d.jsxs("div",{className:"font-mono text-[10px] text-ink-muted",children:["enum: ",n.map(o=>JSON.stringify(o)).join(" · ")]})]})}function wh({tone:e,explanation:t}){const n=e==="extension"?"border-accent-warn/40 bg-accent-warn/10 text-accent-warn":"border-accent-error/40 bg-accent-error/10 text-accent-error";return d.jsx(ps,{label:d.jsx("span",{className:"font-sans",children:t}),tone:e==="extension"?"warn":"error",focusable:!0,children:d.jsx("span",{className:K("inline-flex items-center rounded-sm border px-1 font-mono text-[9px] uppercase tracking-widest",n),children:e==="extension"?"⚠ ext":"⚠ unknown"})})}function hE({message:e,latencyMs:t,pairedRequest:n,onJumpToPaired:o,validation:r}){const i=ne(c=>c.detailTab),s=ne(c=>c.setDetailTab),a=I.useMemo(()=>{if(!e)return null;const c=(n==null?void 0:n.method)??void 0;return nE(e,c?{pairedMethod:c}:void 0)},[e,n]);if(!e)return d.jsx("div",{className:"flex h-full items-center justify-center bg-surface-elev/40",children:d.jsx("div",{className:"text-center font-mono text-xs uppercase tracking-widest text-ink-muted",children:"select a message to inspect"})});const l=e.direction==="editor-to-agent";return d.jsxs("div",{className:"flex h-full flex-col bg-surface-elev/30",children:[d.jsxs("header",{className:"border-b border-line bg-surface-elev px-5 py-3",children:[d.jsxs("div",{className:"flex items-baseline gap-3",children:[d.jsxs("span",{className:K("font-mono text-[11px] font-semibold tracking-widest",l?"text-accent-out":"text-accent-in"),children:[Wb(e.direction)," ",Vb(e.direction)]}),d.jsxs("span",{className:"font-mono text-xs text-ink-muted",children:["seq ",e.seq]}),d.jsx("span",{className:"font-mono text-xs text-ink-muted",children:fs(e.timestamp)})]}),d.jsx("h2",{className:"mt-1 truncate font-display text-lg uppercase tracking-tight text-ink-primary",children:e.method??e.kind}),d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 font-mono text-[11px] text-ink-secondary",children:[d.jsx(xE,{message:e,resolver:a}),e.rpcId!==void 0&&e.rpcId!==null&&d.jsx(ja,{label:"id",value:String(e.rpcId)}),d.jsx(ja,{label:"bytes",value:Ul(e.raw.length)}),t!==void 0&&d.jsx(ja,{label:"latency",value:`+${Vt(t)}`,accent:!0}),n&&d.jsxs("button",{type:"button",onClick:o?()=>o(n.seq):void 0,className:"inline-flex items-baseline gap-1 transition-colors hover:text-ink-primary",title:"jump to paired message",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-widest text-ink-muted",children:"paired"}),d.jsxs("span",{className:"text-ink-primary underline decoration-line-strong decoration-dotted underline-offset-4",children:["seq ",n.seq," ",n.method??""]})]})]})]}),d.jsxs("nav",{className:"flex gap-1 border-b border-line bg-surface-elev/70 px-4",children:[d.jsx(na,{active:i==="tree",onClick:()=>s("tree"),children:"Tree"}),d.jsx(na,{active:i==="raw",onClick:()=>s("raw"),children:"Raw"}),d.jsx(na,{active:i==="meta",onClick:()=>s("meta"),children:"Meta"}),d.jsx(na,{active:i==="spec",onClick:()=>s("spec"),badge:r&&!r.skipped&&!r.valid?r.errors.length:void 0,children:"Spec"})]}),d.jsxs("div",{className:"flex-1 overflow-auto px-5 py-4",children:[i==="tree"&&d.jsx(gE,{message:e,resolver:a}),i==="raw"&&d.jsx(vE,{raw:e.raw}),i==="meta"&&d.jsx(bE,{message:e}),i==="spec"&&d.jsx(yE,{validation:r})]})]})}function yE({validation:e}){if(!e)return d.jsx("div",{className:"font-mono text-[11px] text-ink-muted",children:"no validation result yet"});if(e.skipped){const t={"parse-error":"this frame failed to parse as JSON-RPC — already surfaced in the Tree tab as a parse error","no-method":"no method available for validation (e.g. response without a paired request)","unknown-method":"the ACP spec has no schema for this method — likely an extension or a future addition","no-schema-for-kind":"the spec has no schema for this kind of frame for this method (e.g. notification-only method)","wrong-kind":"no per-method ACP schema applies (e.g. JSON-RPC error envelope, parse failure)"};return d.jsxs("div",{className:"space-y-2 font-mono text-[11px]",children:[d.jsx("div",{className:"text-ink-muted uppercase tracking-widest text-[10px]",children:"not validated"}),d.jsx("div",{className:"text-ink-secondary",children:t[e.skipped]})]})}return e.valid?d.jsx("div",{className:"space-y-2 font-mono text-[11px]",children:d.jsxs("div",{className:"inline-flex items-baseline gap-2",children:[d.jsx("span",{className:"rounded-sm border border-accent-ok/40 bg-accent-ok/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-widest text-accent-ok",children:"✓ conforms"}),d.jsxs("span",{className:"text-ink-muted",children:["matched ",d.jsx("span",{className:"text-ink-secondary",children:e.schemaName})," ","from the ACP schema"]})]})}):d.jsxs("div",{className:"space-y-3 font-mono text-[11px]",children:[d.jsxs("div",{className:"inline-flex items-baseline gap-2",children:[d.jsxs("span",{className:"rounded-sm border border-accent-error/40 bg-accent-error/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-widest text-accent-error",children:["⚠ ",e.errors.length," violation",e.errors.length===1?"":"s"]}),d.jsxs("span",{className:"text-ink-muted",children:["against ",d.jsx("span",{className:"text-ink-secondary",children:e.schemaName})]})]}),d.jsx("ul",{className:"space-y-1.5",children:e.errors.map((t,n)=>d.jsxs("li",{className:"rounded-sm border border-accent-error/25 bg-accent-error/[0.04] px-2 py-1.5",children:[d.jsxs("div",{className:"text-[10px] uppercase tracking-widest text-ink-muted",children:[t.keyword??"error"," · ",t.path==="/"?"(root)":t.path]}),d.jsx("div",{className:"mt-0.5 text-ink-primary",children:t.message})]},`${t.path}-${t.keyword}-${n}`))})]})}function gE({message:e,resolver:t}){const n=I.useMemo(()=>{if(t)return o=>t.resolve(o)},[t]);return e.payload===null?d.jsxs("div",{className:"space-y-2 font-mono text-xs",children:[d.jsxs("div",{className:"text-accent-error",children:["parse error: ",e.parseError??"unknown"]}),d.jsx("pre",{className:"whitespace-pre-wrap break-all text-ink-secondary",children:e.raw})]}):d.jsx(al,{value:e.payload,defaultExpanded:!0,...n?{getSpec:n}:{}})}function vE({raw:e}){const[t,n]=I.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}catch{}};return d.jsxs("div",{className:"group relative",children:[d.jsx("button",{type:"button",onClick:o,"aria-label":"Copy raw frame to clipboard",title:"Copy raw frame to clipboard",className:K("absolute right-0 top-0 inline-flex h-6 items-center rounded-sm border bg-surface-elev/70 px-2 font-mono text-[10px] uppercase tracking-widest opacity-0 transition-[opacity,background-color,border-color,color] duration-150","group-hover:opacity-100 focus-visible:opacity-100",t?"border-accent-ok/60 bg-surface-elev text-accent-ok opacity-100":"border-line text-ink-secondary hover:border-accent-info/70 hover:bg-surface-rowHover hover:text-accent-info"),children:t?"✓ copied":"copy"}),d.jsx("pre",{className:"whitespace-pre-wrap break-all font-mono text-[11px] leading-relaxed text-ink-primary",children:e})]})}function bE({message:e}){const t=[["seq",String(e.seq)],["direction",e.direction],["kind",e.kind],["method",e.method??"(none)"],["rpcId",String(e.rpcId??"(none)")],["timestamp",`${fs(e.timestamp)} (${e.timestamp})`],["raw size",Ul(e.raw.length)],["parse error",e.parseError??"(none)"]];return d.jsx("dl",{className:"grid grid-cols-[110px_1fr] gap-x-4 gap-y-1 font-mono text-[12px]",children:t.map(([n,o])=>d.jsxs("div",{className:"contents",children:[d.jsx("dt",{className:"text-ink-muted uppercase tracking-widest text-[10px]",children:n}),d.jsx("dd",{className:"text-ink-primary",children:o})]},n))})}function xE({message:e,resolver:t}){const n=d.jsx(ja,{label:"kind",value:e.kind});return t!=null&&t.typeDescription?d.jsx(ps,{label:d.jsx("div",{className:"whitespace-pre-wrap font-sans text-[12px] leading-snug text-ink-secondary",children:t.typeDescription}),tone:"info",children:n}):n}function ja({label:e,value:t,accent:n}){return d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-widest text-ink-muted",children:e}),d.jsx("span",{className:K(n?"text-accent-warn":"text-ink-primary"),children:t})]})}function na({children:e,active:t,onClick:n,badge:o,tab:r}){return d.jsxs("button",{type:"button",onClick:n,className:K("relative flex items-baseline gap-1.5 px-4 py-2 font-mono text-[11px] uppercase tracking-widest transition-colors",t?"text-ink-primary":"text-ink-muted hover:text-ink-secondary"),children:[d.jsx("span",{children:e}),o!==void 0&&d.jsx("span",{className:"rounded-sm border border-accent-error/40 bg-accent-error/10 px-1 text-[9px] font-semibold text-accent-error",children:o}),t&&d.jsx("span",{className:"absolute inset-x-2 -bottom-px h-px bg-accent-out","aria-hidden":!0})]})}function rf(e){const t=new Map,n=new Map;for(const o of e){if(o.rpcId===void 0||o.rpcId===null)continue;const r=String(o.rpcId);if(o.kind==="request")t.set(r,o);else if(o.kind==="response"||o.kind==="error"){const i=t.get(r);if(!i)continue;const s=Math.max(0,o.timestamp-i.timestamp);n.set(i.seq,{pairSeq:o.seq,latencyMs:s}),n.set(o.seq,{pairSeq:i.seq,latencyMs:s})}}return n}function Bd(e){const t=rf(e),n=new Map,o=new Map;for(const i of e)if(i.method){if(i.kind==="request"){let s=n.get(i.method);s||(s={count:0,latencies:[]},n.set(i.method,s)),s.count+=1;const a=t.get(i.seq);a&&s.latencies.push(a.latencyMs)}else if(i.kind==="notification"){let s=o.get(i.method);s||(s={count:0,latencies:[]},o.set(i.method,s)),s.count+=1}}const r=[];for(const[i,s]of n)s.latencies.sort((a,l)=>a-l),r.push({method:i,kind:"request",count:s.count,sampleSize:s.latencies.length,p50:s.latencies.length?Sh(s.latencies,50):null,p99:s.latencies.length?Sh(s.latencies,99):null,max:s.latencies.length?s.latencies[s.latencies.length-1]:null,totalLatencyMs:s.latencies.length?s.latencies.reduce((a,l)=>a+l,0):null,latencies:s.latencies});for(const[i,s]of o)r.push({method:i,kind:"notification",count:s.count,sampleSize:0,p50:null,p99:null,max:null,totalLatencyMs:null,latencies:[]});return r.sort((i,s)=>s.count-i.count||(i.kind==="request"?-1:1)),r}function Sh(e,t){if(e.length===0)return 0;const n=t/100*(e.length-1),o=Math.floor(n),r=Math.ceil(n),i=e[o],s=e[r];return i===void 0||s===void 0?i??0:o===r?i:i+(s-i)*(n-o)}const Kb=100;function wE(e,t,n={}){const o=n.maxChangesPerRow??Kb,r=$h(e),i=$h(t),s=SE(r,i),a=[],l={equal:0,changed:0,added:0,removed:0,total:0};for(const c of s)if(c.kind==="match"){const f=e[c.i],m=t[c.j],v=$E(f,m,o),h=v.length===0?"equal":"changed";a.push({op:h,a:f,b:m,signature:r[c.i],changes:v}),h==="equal"?l.equal+=1:l.changed+=1}else if(c.kind==="removed"){const f=e[c.i];a.push({op:"removed",a:f,b:null,signature:r[c.i],changes:[]}),l.removed+=1}else{const f=t[c.j];a.push({op:"added",a:null,b:f,signature:i[c.j],changes:[]}),l.added+=1}return l.total=a.length,{rows:a,summary:l}}function $h(e){const t=rf(e),n=new Map;for(const o of e)o.method&&n.set(o.seq,o.method);return e.map(o=>{let r=o.method??"";if(!r&&(o.kind==="response"||o.kind==="error")){const i=t.get(o.seq);i&&(r=n.get(i.pairSeq)??"")}return`${o.direction}|${o.kind}|${r}`})}function SE(e,t){const n=e.length,o=t.length,r=o+1,i=new Uint32Array((n+1)*r);for(let c=n-1;c>=0;c--)for(let f=o-1;f>=0;f--){const m=c*r+f;if(e[c]===t[f])i[m]=i[(c+1)*r+(f+1)]+1;else{const v=i[(c+1)*r+f],h=i[c*r+(f+1)];i[m]=v>=h?v:h}}const s=[];let a=0,l=0;for(;a<n&&l<o;)e[a]===t[l]?(s.push({kind:"match",i:a,j:l}),a++,l++):i[(a+1)*r+l]>=i[a*r+(l+1)]?(s.push({kind:"removed",i:a}),a++):(s.push({kind:"added",j:l}),l++);for(;a<n;)s.push({kind:"removed",i:a}),a++;for(;l<o;)s.push({kind:"added",j:l}),l++;return s}function kh(e){const t=e.payload;if(t===null||typeof t!="object")return{raw:e.raw,parseError:e.parseError??null};const n=t,o={};return"method"in n&&(o.method=n.method),"params"in n&&(o.params=n.params),"result"in n&&(o.result=n.result),"error"in n&&(o.error=n.error),o}function $E(e,t,n){const o=[];return ll(kh(e),kh(t),"",o,n),o}function kE(e,t,n=Kb){const o=[];return ll(e,t,"",o,n),o}function Th(e){return Array.isArray(e)?"array":e!==null&&typeof e=="object"?"object":"leaf"}function ll(e,t,n,o,r){if(o.length>=r||Object.is(e,t))return;const i=Th(e),s=Th(t);if(i!==s||i==="leaf"){if(TE(e,t))return;o.push({path:n||"$",kind:"change",a:e,b:t});return}if(i==="array"){const f=e,m=t,v=Math.max(f.length,m.length);for(let h=0;h<v;h++){if(o.length>=r)return;const y=`${n}[${h}]`,b=h<f.length,g=h<m.length;b&&g?ll(f[h],m[h],y,o,r):g?o.push({path:y,kind:"add",b:m[h]}):o.push({path:y,kind:"remove",a:f[h]})}return}const a=e,l=t,c=[...new Set([...Object.keys(a),...Object.keys(l)])].sort();for(const f of c){if(o.length>=r)return;const m=n?`${n}.${f}`:f,v=f in a,h=f in l;v&&h?ll(a[f],l[f],m,o,r):h?o.push({path:m,kind:"add",b:l[f]}):o.push({path:m,kind:"remove",a:a[f]})}}function TE(e,t){return Object.is(e,t)}function Ne(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function xn(e){return typeof e=="string"&&e.length>0?e:null}function Ao(e){return e===!0}function _E(e){for(const t of e)if(t.kind==="request"&&t.method==="initialize"&&t.direction==="editor-to-agent")return t;return null}function jE(e,t){if(t==null)return null;for(const n of e)if(n.kind==="response"&&n.direction==="agent-to-editor"&&n.rpcId===t)return n;return null}function NE(e){var r,i;const t={name:null,title:null,version:null,platform:null};if(!e)return t;const n=Ne((r=Ne(e.payload))==null?void 0:r.params),o=Ne(n==null?void 0:n.clientInfo);return o?{name:xn(o.name),title:xn(o.title),version:xn(o.version),platform:xn((i=Ne(o._meta))==null?void 0:i.platform)}:t}function CE(e){var s,a;const t={fsReadTextFile:!1,fsWriteTextFile:!1,terminal:!1,authTerminal:!1,authGateway:!1};if(!e)return t;const n=Ne((s=Ne(e.payload))==null?void 0:s.params),o=Ne(n==null?void 0:n.clientCapabilities);if(!o)return t;const r=Ne(o.fs),i=Ne(o.auth);return{fsReadTextFile:Ao(r==null?void 0:r.readTextFile),fsWriteTextFile:Ao(r==null?void 0:r.writeTextFile),terminal:Ao(o.terminal),authTerminal:Ao(i==null?void 0:i.terminal),authGateway:Ao((a=Ne(i==null?void 0:i._meta))==null?void 0:a.gateway)}}function EE(e){var i;const t={name:null,version:null,authMethods:0};if(!e)return t;const n=Ne((i=Ne(e.payload))==null?void 0:i.result);if(!n)return t;const o=Ne(n.agentInfo),r=n.authMethods;return{name:xn(o==null?void 0:o.name),version:xn(o==null?void 0:o.version),authMethods:Array.isArray(r)?r.length:0}}function PE(e){var r;const t={prompt:!1,loadSession:!1};if(!e)return t;const n=Ne((r=Ne(e.payload))==null?void 0:r.result),o=Ne(n==null?void 0:n.agentCapabilities);return o?{prompt:Ao(o.promptCapabilities)||o.promptCapabilities!==void 0,loadSession:Ao(o.loadSession)}:t}function IE(e,t){const n=t??e;if(!n)return null;const o=Ne(n.payload),r=Ne(o==null?void 0:o.result)??Ne(o==null?void 0:o.params),i=r==null?void 0:r.protocolVersion;return typeof i=="number"?i:null}function OE(e){var s,a;let t=null,n=0,o=null,r=0,i=[];for(const l of e){l.direction!=="editor-to-agent"&&l.kind;const c=Ne((s=Ne(l.payload))==null?void 0:s.params);if(c){if(l.method==="session/set_mode"){const f=xn(c.modeId);f!==null&&(t!==null&&t!==f&&(n+=1),t=f)}else if(l.method==="session/set_model"){const f=xn(c.modelId);f!==null&&(o!==null&&o!==f&&(r+=1),o=f)}else if(l.method==="session/update"){const f=Ne(c.update);if((f==null?void 0:f.sessionUpdate)==="available_commands_update"){const m=f.availableCommands;if(Array.isArray(m)){const v=[];for(const h of m){const y=xn((a=Ne(h))==null?void 0:a.name);y!==null&&v.push(y)}v.length>0&&(i=v)}}else if((f==null?void 0:f.sessionUpdate)==="current_mode_update"){const m=xn(f.currentModeId);m!==null&&(t!==null&&t!==m&&(n+=1),t=m)}}}}return{currentMode:t,modeChanges:n,currentModel:o,modelChanges:r,availableCommands:i}}function RE(e){if(!e)return{jetbrainsProxyConfig:null};const t=Ne(e.payload),n=Ne(t==null?void 0:t.params),o=Ne(n==null?void 0:n._meta);return{jetbrainsProxyConfig:(o==null?void 0:o.proxyConfig)??null}}function cl(e){const t=_E(e),n=jE(e,t==null?void 0:t.rpcId);return{protocolVersion:IE(t,n),client:NE(t),agent:EE(n),clientCapabilities:CE(t),agentCapabilities:PE(n),runtime:OE(e),extensions:RE(t)}}function _h(e){return{protocolVersion:e.protocolVersion,client:e.client,agent:e.agent,clientCapabilities:e.clientCapabilities,agentCapabilities:e.agentCapabilities,runtime:e.runtime}}function AE(e,t){const n=cl(e),o=cl(t);return{a:n,b:o,changes:kE(_h(n),_h(o))}}function ME(e,t){const n=Bd(e),o=Bd(t),r=l=>`${l.kind}:${l.method}`,i=new Map(n.map(l=>[r(l),l])),s=new Map(o.map(l=>[r(l),l])),a=[];for(const l of new Set([...i.keys(),...s.keys()])){const c=i.get(l)??null,f=s.get(l)??null,m=c??f;a.push({method:m.method,kind:m.kind,a:c,b:f,countDelta:((f==null?void 0:f.count)??0)-((c==null?void 0:c.count)??0),p50Delta:kc(c==null?void 0:c.p50,f==null?void 0:f.p50),p99Delta:kc(c==null?void 0:c.p99,f==null?void 0:f.p99),maxDelta:kc(c==null?void 0:c.max,f==null?void 0:f.max)})}return a.sort((l,c)=>Math.abs(c.p99Delta??0)-Math.abs(l.p99Delta??0)||Math.abs(c.countDelta)-Math.abs(l.countDelta)||l.method.localeCompare(c.method)),a}function kc(e,t){return e==null||t===null||t===void 0?null:t-e}function sf(e,t=200){const[n,o]=I.useState(e),[r,i]=I.useState(!1);return I.useEffect(()=>{if(e){o(!0);let a=null;const l=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>i(!0))});return()=>{cancelAnimationFrame(l),a!==null&&cancelAnimationFrame(a)}}i(!1);const s=setTimeout(()=>o(!1),t);return()=>clearTimeout(s)},[e,t]),{rendered:n,visible:r}}const af="flex h-9 items-center gap-4 border-b border-line bg-surface-base px-5",qE={request:"REQ",response:"RSP",notification:"NTF",error:"ERR",unknown:"UNK"};function UE(e){return e.direction==="editor-to-agent"?"→A":"A←"}function Gb(e){if(e.name)return`#${e.id} · ${e.name}`;const t=e.agent_command?Rt(e.agent_command):"agent";return e.client_name?`#${e.id} · ${e.client_name} · ${t}`:`#${e.id} · ${t}`}const jh={messages:null,loading:!1,error:null};function Nh(e){const[t,n]=I.useState(jh);return I.useEffect(()=>{if(e===null){n(jh);return}let o=!1;return n({messages:null,loading:!0,error:null}),kS(e).then(r=>{o||n({messages:r.messages,loading:!1,error:null})}).catch(r=>{o||n({messages:null,loading:!1,error:r instanceof Error?r.message:String(r)})}),()=>{o=!0}},[e]),t}function LE({open:e,onClose:t}){const n=ne(F=>F.messages),o=ne(F=>F.session),r=at(F=>F.savedSessions),i=(o==null?void 0:o.id)??null,[s,a]=I.useState(null),[l,c]=I.useState(null),[f,m]=I.useState("frames"),[v,h]=I.useState(!0),[y,b]=I.useState(null),{rendered:g,visible:p}=sf(e);I.useEffect(()=>{if(!e)return;const F=G=>{G.key==="Escape"&&(G.preventDefault(),t())};return window.addEventListener("keydown",F,!0),()=>window.removeEventListener("keydown",F,!0)},[e,t]),I.useEffect(()=>{e&&(a(i),c(null),b(null))},[e,i]),I.useEffect(()=>b(null),[s,l]);const u=Nh(s!==null&&s!==i?s:null),x=Nh(l!==null&&l!==i?l:null),S=s===null?null:s===i?n:u.messages,T=l===null?null:l===i?n:x.messages,C=u.loading||x.loading,$=u.error??x.error,j=I.useMemo(()=>S===null||T===null?null:wE(S,T),[S,T]),A=I.useMemo(()=>{if(!j)return[];const F=[];return j.rows.forEach((G,Y)=>{v&&G.op==="equal"||F.push({row:G,index:Y})}),F},[j,v]),E=I.useMemo(()=>{const F=r.find(G=>G.id===l);return F?Gb(F):null},[r,l]),q=I.useMemo(()=>S&&T?AE(S,T):null,[S,T]),z=I.useMemo(()=>S&&T?ME(S,T):null,[S,T]);if(!g)return null;const U=r.filter(F=>F.id!==l),L=r.filter(F=>F.id!==s);return d.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Session diff",className:K("fixed inset-0 z-[100] flex flex-col bg-surface-base/95 backdrop-blur-sm transition-opacity duration-200 ease-out",p?"opacity-100":"opacity-0"),children:d.jsxs("div",{className:K("flex h-full w-full flex-col transition-transform duration-200 ease-out",p?"translate-y-0":"-translate-y-2"),children:[d.jsxs("header",{className:"flex items-center justify-between border-b border-line px-5 py-3",children:[d.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:"Diff — compare two sessions"}),d.jsx("button",{type:"button",onClick:t,className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted transition-colors hover:text-ink-primary","aria-label":"Close diff panel",children:"close"})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-line bg-surface-elev px-5 py-2.5",children:[d.jsx("span",{className:"font-mono text-[11px] text-accent-out",title:"baseline (left)",children:"A"}),d.jsx(Ih,{ariaLabel:"Baseline session",sessions:U,selectedId:s,onSelect:a}),d.jsx("span",{className:"text-ink-muted",children:"→"}),d.jsx("span",{className:"font-mono text-[11px] text-ink-secondary",title:"comparison (right)",children:"B"}),d.jsx(Ih,{ariaLabel:"Comparison session",sessions:L,selectedId:l,onSelect:c})]}),s===null?d.jsx(bi,{children:"Pick a baseline session (A) to compare from."}):l===null?d.jsx(bi,{children:"Pick a session in the B selector above to compare against A."}):C?d.jsx(bi,{children:"Loading sessions…"}):$?d.jsxs(bi,{tone:"error",children:["Could not load a session: ",$]}):!j||!q||!z?d.jsx(bi,{children:"No data."}):d.jsxs(d.Fragment,{children:[d.jsx(DE,{tab:f,onTab:m,summary:j.summary,infoCount:q.changes.length}),d.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[f==="frames"&&d.jsx(zE,{diff:j,bLabel:E,hideEqual:v,onHideEqual:h,visibleRows:A,expanded:y,onToggleExpand:F=>b(G=>G===F?null:F)}),f==="info"&&d.jsx(FE,{meta:q}),f==="perf"&&d.jsx(HE,{perf:z})]})]})]})})}function DE({tab:e,onTab:t,summary:n,infoCount:o}){const i=[{id:"frames",label:"frames",badge:n.changed+n.added+n.removed},{id:"info",label:"info",badge:o},{id:"perf",label:"perf",badge:0}];return d.jsx("div",{className:"flex items-center gap-1 border-b border-line bg-surface-elev px-5 py-1.5",children:i.map(s=>d.jsxs("button",{type:"button",onClick:()=>t(s.id),className:K("inline-flex items-center gap-1.5 rounded-sm px-3 py-1 font-mono text-[10px] uppercase tracking-widest transition-colors",e===s.id?"bg-surface-rowHover text-ink-primary":"text-ink-muted hover:text-ink-secondary"),children:[s.label,s.badge>0&&d.jsx("span",{className:"rounded-sm border border-line px-1 text-[9px] text-ink-secondary",children:s.badge})]},s.id))})}function zE({diff:e,bLabel:t,hideEqual:n,onHideEqual:o,visibleRows:r,expanded:i,onToggleExpand:s}){const a=e.summary.changed===0&&e.summary.added===0&&e.summary.removed===0;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:K(af,"font-mono text-[11px]"),children:[d.jsxs("span",{className:"text-ink-muted",children:[e.summary.equal," same"]}),d.jsxs("span",{className:"text-accent-warn",children:[e.summary.changed," differs"]}),d.jsxs("span",{className:"text-accent-error",children:[e.summary.removed," only in A"]}),d.jsxs("span",{className:"text-accent-ok",children:[e.summary.added," only in B"]}),d.jsxs("label",{className:"ml-auto flex cursor-pointer select-none items-center gap-2 text-[10px] uppercase tracking-widest text-ink-muted",children:[d.jsx("input",{type:"checkbox",checked:n,onChange:l=>o(l.target.checked),className:"accent-accent-info"}),"hide unchanged"]})]}),a?d.jsxs(ms,{tone:"ok",children:["Sessions are identical",t?` — every frame in B (${t}) matches A`:"","."]}):r.length===0?d.jsx(ms,{children:"Only unchanged frames — toggle “hide unchanged” to see them."}):d.jsxs("table",{className:"w-full table-fixed border-collapse font-mono text-[11px]",children:[d.jsxs("colgroup",{children:[d.jsx("col",{className:"w-[24px]"}),d.jsx("col",{className:"w-1/2"}),d.jsx("col",{className:"w-1/2"})]}),d.jsx("tbody",{children:r.map(({row:l,index:c})=>d.jsx(KE,{row:l,expanded:i===c,onToggle:()=>s(c)},c))})]})]})}function Jb(){return d.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:[d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{className:"text-accent-warn",children:"~"})," changed"]}),d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{className:"text-accent-ok",children:"+"})," only in B"]}),d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{className:"text-accent-error",children:"−"})," only in A"]})]})}function FE({meta:e}){return e.changes.length===0?d.jsx(ms,{tone:"ok",children:"Metadata identical — same client, agent, capabilities, protocol and runtime."}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:af,children:d.jsx(Jb,{})}),d.jsx("ul",{className:"space-y-1 px-5 py-3 font-mono text-[11px]",children:e.changes.map((t,n)=>d.jsx("li",{className:"leading-snug",children:d.jsx(Qb,{change:t})},n))})]})}function Ch(e){return e==null?"—":Vt(e)}function BE(e){return e===null?{text:"—",tone:"text-ink-dim"}:e===0?{text:"0",tone:"text-ink-muted"}:{text:(e>0?"+":"−")+Vt(Math.abs(e)),tone:e>0?"text-accent-error":"text-accent-ok"}}function HE({perf:e}){return e.length===0?d.jsx(ms,{children:"No methods to compare."}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:K(af,"font-mono text-[10px] uppercase tracking-widest text-ink-muted"),children:[d.jsx("span",{children:"Δ = B − A · sorted by |Δ p99|"}),d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{className:"text-accent-error",children:"+"})," slower in B"]}),d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{className:"text-accent-ok",children:"−"})," faster in B"]})]}),d.jsxs("table",{className:"w-full text-[11px]",children:[d.jsx("thead",{className:"sticky top-0 z-10 bg-surface-base",children:d.jsxs("tr",{className:"border-b border-line text-left font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:[d.jsx("th",{className:"py-2 pl-5 pr-3",children:"method"}),d.jsx("th",{className:"px-3 py-2",children:"kind"}),d.jsx("th",{className:"px-3 py-2 text-right",children:"A p99"}),d.jsx("th",{className:"px-3 py-2 text-right",children:"B p99"}),d.jsx("th",{className:"px-3 py-2 text-right",children:"Δ p99"}),d.jsx("th",{className:"px-3 py-2 text-right",children:"count"})]})}),d.jsx("tbody",{className:"font-mono",children:e.map(t=>{var o,r,i,s;const n=BE(t.p99Delta);return d.jsxs("tr",{className:"border-b border-line/40 hover:bg-surface-rowHover/50",children:[d.jsx("td",{className:"truncate py-1.5 pl-5 pr-3 text-ink-primary",title:t.method,children:t.method}),d.jsx("td",{className:"px-3 py-1.5 text-[10px] uppercase tracking-widest text-ink-muted",children:t.kind==="request"?"req":"ntf"}),d.jsx("td",{className:"px-3 py-1.5 text-right text-ink-secondary",children:Ch(((o=t.a)==null?void 0:o.p99)??null)}),d.jsx("td",{className:"px-3 py-1.5 text-right text-ink-secondary",children:Ch(((r=t.b)==null?void 0:r.p99)??null)}),d.jsx("td",{className:K("px-3 py-1.5 text-right",n.tone),children:n.text}),d.jsxs("td",{className:"px-3 py-1.5 text-right text-ink-muted",children:[((i=t.a)==null?void 0:i.count)??0,"→",((s=t.b)==null?void 0:s.count)??0]})]},`${t.kind}:${t.method}`)})})]})]})}function bi({children:e,tone:t}){return d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:d.jsx(ms,{...t?{tone:t}:{},children:e})})}const VE={equal:"",changed:"bg-accent-warn/5",added:"bg-accent-ok/5",removed:"bg-accent-error/5"},WE={equal:{glyph:"=",tone:"text-ink-dim"},changed:{glyph:"≠",tone:"text-accent-warn"},added:{glyph:"▸",tone:"text-accent-ok"},removed:{glyph:"◂",tone:"text-accent-error"}};function KE({row:e,expanded:t,onToggle:n}){const o=WE[e.op],r=e.op==="changed"&&e.changes.length>0;return d.jsxs(d.Fragment,{children:[d.jsxs("tr",{className:K("border-b border-line/40 align-top",VE[e.op],r&&"cursor-pointer hover:bg-accent-warn/10"),onClick:r?n:void 0,children:[d.jsx("td",{className:K("py-1.5 pl-5 text-center",o.tone),children:o.glyph}),d.jsx("td",{className:"px-3 py-1.5",children:d.jsx(Eh,{frame:e.a,muted:e.op==="added"})}),d.jsxs("td",{className:"px-3 py-1.5",children:[d.jsx(Eh,{frame:e.b,muted:e.op==="removed"}),r&&d.jsxs("span",{className:"ml-2 text-[10px] text-accent-warn",children:[t?"▾":"▸"," ",e.changes.length," field",e.changes.length===1?"":"s"]})]})]}),r&&t&&d.jsxs("tr",{className:"border-b border-line/40 bg-surface-elev",children:[d.jsx("td",{}),d.jsxs("td",{colSpan:2,className:"px-5 py-2",children:[d.jsx("div",{className:"mb-1.5",children:d.jsx(Jb,{})}),d.jsx("ul",{className:"space-y-1",children:e.changes.map((i,s)=>d.jsx("li",{className:"leading-snug",children:d.jsx(Qb,{change:i})},s))})]})]})]})}function Eh({frame:e,muted:t}){if(e===null)return d.jsx("span",{className:"text-ink-dim",children:"—"});const n=e.method??(e.parseError?`! ${e.parseError}`:"—");return d.jsxs("span",{className:K("inline-flex items-baseline gap-2",t&&"opacity-60"),children:[d.jsx("span",{className:"text-ink-dim",children:UE(e)}),d.jsx("span",{className:"text-[10px] uppercase tracking-widest text-ink-muted",children:qE[e.kind]}),d.jsx("span",{className:"truncate text-ink-primary",title:n,children:n}),d.jsxs("span",{className:"text-ink-dim",children:["#",e.seq]})]})}const Ph=80;function oa(e){let t;try{t=JSON.stringify(e)}catch{t=String(e)}return t===void 0&&(t="undefined"),t.length>Ph&&(t=t.slice(0,Ph-1)+"…"),t}function Qb({change:e}){return e.kind==="add"?d.jsxs("span",{children:[d.jsx("span",{className:"text-accent-ok",children:"+ "}),d.jsx("span",{className:"text-ink-secondary",children:e.path}),d.jsx("span",{className:"text-ink-muted",children:": "}),d.jsx("span",{className:"text-accent-ok",children:oa(e.b)})]}):e.kind==="remove"?d.jsxs("span",{children:[d.jsx("span",{className:"text-accent-error",children:"− "}),d.jsx("span",{className:"text-ink-secondary",children:e.path}),d.jsx("span",{className:"text-ink-muted",children:": "}),d.jsx("span",{className:"text-accent-error line-through",children:oa(e.a)})]}):d.jsxs("span",{children:[d.jsx("span",{className:"text-accent-warn",children:"~ "}),d.jsx("span",{className:"text-ink-secondary",children:e.path}),d.jsx("span",{className:"text-ink-muted",children:": "}),d.jsx("span",{className:"text-accent-error line-through",children:oa(e.a)}),d.jsx("span",{className:"text-ink-muted",children:" → "}),d.jsx("span",{className:"text-accent-ok",children:oa(e.b)})]})}function ms({children:e,tone:t="muted"}){const n=t==="error"?"text-accent-error":t==="ok"?"text-accent-ok":"text-ink-muted";return d.jsx("div",{className:K("px-5 py-8 text-center font-mono text-[12px]",n),children:e})}function Ih({ariaLabel:e,sessions:t,selectedId:n,onSelect:o}){const[r,i]=I.useState(!1),s=I.useRef(null);I.useEffect(()=>{if(!r)return;const m=v=>{s.current&&!s.current.contains(v.target)&&i(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[r]);const a=t.filter(m=>m.imported_at===null),l=t.filter(m=>m.imported_at!==null),c=n!==null?t.find(m=>m.id===n)??null:null,f=c?Gb(c):n!==null?`#${n}`:"select a session…";return d.jsxs("div",{ref:s,className:"relative",children:[d.jsxs("button",{type:"button",onClick:()=>i(m=>!m),"aria-label":e,"aria-haspopup":"listbox","aria-expanded":r,className:K("inline-flex h-7 items-center gap-2 rounded-sm border px-3 font-mono text-[10px] uppercase tracking-widest transition-colors","border-line bg-surface-row text-ink-secondary hover:border-line-strong hover:text-ink-primary",r?"border-line-strong text-ink-primary":""),title:`${e} — pick which session to compare`,children:[d.jsx("span",{className:"inline-block w-[240px] truncate text-left",children:f}),d.jsx("span",{"aria-hidden":!0,className:K("transition-transform",r?"rotate-180":""),children:"▾"})]}),r&&d.jsxs("div",{className:"absolute left-0 top-[calc(100%+6px)] z-50 w-[460px] rounded-md border border-line bg-surface-elev shadow-xl",children:[d.jsxs(Oh,{children:["saved · ",a.length," session",a.length===1?"":"s"]}),a.length===0&&d.jsx("div",{className:"px-3 py-3 text-center font-mono text-[11px] text-ink-muted",children:"no other saved sessions to compare"}),d.jsx("ul",{className:"max-h-[300px] overflow-y-auto",children:a.map(m=>d.jsx(Rh,{s:m,active:m.id===n,onPick:()=>{o(m.id),i(!1)}},m.id))}),l.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs(Oh,{children:["imported · ",l.length," file",l.length===1?"":"s"]}),d.jsx("ul",{className:"max-h-[200px] overflow-y-auto",children:l.map(m=>d.jsx(Rh,{s:m,active:m.id===n,onPick:()=>{o(m.id),i(!1)}},m.id))})]})]})]})}function Oh({children:e}){return d.jsx("div",{className:"border-b border-line bg-surface-base/50 px-3 py-1.5 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:e})}function Rh({s:e,active:t,onPick:n}){return d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:n,title:`session #${e.id} · ${e.agent_command??""} · ${e.message_count} messages`,className:K("flex w-full items-baseline gap-3 border-b border-line-grid/70 px-3 py-2 text-left transition-colors hover:bg-surface-rowHover",t?"bg-surface-rowHover":""),children:[d.jsx("span",{"aria-hidden":!0,className:K("h-2 w-2 shrink-0 rounded-full",t?"bg-accent-note animate-pulse-soft":"bg-ink-dim")}),d.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-ink-primary",children:[d.jsxs("span",{className:"text-accent-note",children:["#",e.id]}),d.jsx("span",{className:"text-ink-muted",children:" · "}),e.name??(e.client_name?`${e.client_name} · ${Rt(e.agent_command??"")}`:Rt(e.agent_command??""))]}),d.jsxs("span",{className:"shrink-0 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:[e.message_count,"msg · ",Ar(e.started_at)]})]})})}let Tc=null,xi=null;async function GE(){if(Tc)return Tc;if(xi)return xi;xi=(async()=>{const e=await fetch("/api/info",{headers:{accept:"application/json"}});if(!e.ok)throw new Error(`info: HTTP ${e.status}`);const t=await e.json();return Tc=t,t})();try{return await xi}finally{xi=null}}const JE=[{id:"zed",label:"Zed"},{id:"jetbrains",label:"JetBrains"}],QE="/absolute/path/to/acp-devtools";function YE(e){return JSON.stringify({agent_servers:{"Claude Code (via ACP Devtools)":{type:"custom",command:e}}},null,4)}function Yb({text:e,label:t="Copy"}){const[n,o]=I.useState(!1),r=async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),1400)}catch{o(!1)}};return d.jsx("button",{type:"button",onClick:r,className:K("rounded border border-line px-2 py-0.5 font-mono text-[10px] uppercase tracking-widest transition-colors",n?"border-accent-out text-accent-out":"text-ink-secondary hover:border-ink-secondary hover:text-ink-primary"),children:n?"Copied":t})}function XE(){const[e,t]=I.useState("zed"),[n,o]=I.useState(null);I.useEffect(()=>{let a=!0;return GE().then(l=>{a&&o(l.binaryPath)}).catch(()=>{}),()=>{a=!1}},[]);const r=n??QE,i=n===null,s=I.useMemo(()=>({zed:YE(r),jetbrainsName:"Claude Code (via ACP Devtools)"}),[r]);return d.jsxs("div",{className:"rounded border border-line bg-surface-base",children:[d.jsx("div",{className:"flex items-center gap-1 border-b border-line px-3 py-2",children:JE.map(a=>d.jsx("button",{type:"button",onClick:()=>t(a.id),className:K("rounded px-2 py-1 font-mono text-[10px] uppercase tracking-widest transition-colors",e===a.id?"bg-surface-elev text-ink-primary":"text-ink-secondary hover:text-ink-primary"),children:a.label},a.id))}),e==="zed"&&d.jsxs("div",{className:"px-3 py-3",children:[d.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[d.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:"~/.config/zed/settings.json"}),d.jsx(Yb,{text:s.zed})]}),d.jsx("pre",{className:"overflow-x-auto rounded border border-line bg-surface-elev/60 px-3 py-2 font-mono text-[11px] leading-relaxed text-ink-primary",children:s.zed}),d.jsxs("p",{className:"mt-2 font-sans text-[11px] leading-relaxed text-ink-secondary",children:["Open Zed, paste into ",d.jsx("span",{className:"font-mono",children:"settings.json"})," ","(Cmd+,), pick the new agent in the right-side panel, send a prompt. The CLI auto-proxies ",d.jsx("span",{className:"font-mono",children:"@zed-industries/claude-code-acp"})," ","when launched with no args."]}),d.jsx(Ah,{isPlaceholder:i})]}),e==="jetbrains"&&d.jsxs("div",{className:"px-3 py-3",children:[d.jsxs("p",{className:"mb-2 font-sans text-[11px] leading-relaxed text-ink-secondary",children:["Settings (Cmd+,) → search ",d.jsx("span",{className:"font-mono",children:"agent"})," → open the AI Assistant / Junie agent-servers page → add a new entry with these fields (no arguments needed):"]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(Mh,{label:"Name",value:s.jetbrainsName}),d.jsx(Mh,{label:"Command",value:r})]}),d.jsxs("p",{className:"mt-3 font-sans text-[11px] leading-relaxed text-ink-secondary",children:["JetBrains IDEs require an absolute ",d.jsx("span",{className:"font-mono",children:"command"}),". See ",d.jsx("span",{className:"font-mono",children:"examples/jetbrains-config.md"})," if the agent-servers page is not where the search suggests."]}),d.jsx(Ah,{isPlaceholder:i})]})]})}function Ah({isPlaceholder:e}){return e?d.jsxs("div",{className:"mt-3 rounded border border-line border-dashed bg-surface-elev/40 px-3 py-2 font-sans text-[11px] leading-relaxed text-ink-secondary",children:["You're viewing the UI through a development server, so the absolute binary path couldn't be auto-detected. After running"," ",d.jsx("span",{className:"font-mono",children:"npm run build:full"})," in the repo and"," ",d.jsx("span",{className:"font-mono",children:"npm link"})," inside"," ",d.jsx("span",{className:"font-mono",children:"packages/cli/"}),", find the path with"," ",d.jsx("span",{className:"font-mono",children:"which acp-devtools"})," and replace the placeholder above."]}):d.jsxs("p",{className:"mt-3 font-mono text-[10px] uppercase tracking-widest text-ink-dim",children:["path auto-resolved · verify with ",d.jsx("span",{className:"text-ink-secondary",children:"which acp-devtools"})]})}function Mh({label:e,value:t}){return d.jsxs("div",{className:"flex items-center gap-2 rounded border border-line bg-surface-elev/60 px-3 py-1.5",children:[d.jsx("span",{className:"w-20 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:e}),d.jsx("span",{className:"flex-1 truncate font-mono text-[11px] text-ink-primary",children:t}),d.jsx(Yb,{text:t})]})}function ZE({status:e,lastError:t,url:n,captureCount:o}){const r=e==="open"?"Awaiting messages":e==="connecting"?"Connecting":e==="closed"?"Disconnected":e==="error"?"Connection error":"No live capture",i=e==="open"?"text-accent-out":e==="error"?"text-accent-error":"text-ink-secondary";return d.jsx("div",{className:"flex h-full w-full items-center justify-center bg-grid",children:d.jsxs("div",{className:"relative w-[min(720px,92%)] rounded-md border border-line bg-surface-elev/80 p-6 backdrop-blur-sm",children:[d.jsxs("div",{className:"mb-1 flex items-baseline gap-3",children:[d.jsx("span",{className:"font-display text-sm uppercase tracking-[0.18em] text-ink-muted",children:"acp.devtools"}),d.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-dim",children:"v0.4.0 / pre-alpha"})]}),d.jsx("h2",{className:K("font-display text-2xl uppercase tracking-tight",i),children:r}),d.jsx("p",{className:"mt-2 font-sans text-sm leading-relaxed text-ink-secondary",children:"Connect an IDE to start streaming ACP frames. Pick yours below — the snippet plugs acp-devtools between editor and agent so every message is captured live."}),o>0&&d.jsxs("p",{className:"mt-2 font-mono text-[11px] uppercase tracking-widest text-accent-out",children:[o," live capture",o===1?"":"s"," discovered — pick one in the picker above"]}),d.jsx("div",{className:"mt-4",children:d.jsx(XE,{})}),d.jsxs("div",{className:"mt-4 flex items-center gap-3 font-mono text-[11px]",children:[d.jsx(eP,{status:e}),d.jsx("span",{className:"text-ink-secondary",children:n}),t&&d.jsx("span",{className:"text-accent-error",children:t})]})]})})}function eP({status:e}){const t=e==="open"?"bg-accent-out":e==="connecting"?"bg-accent-warn animate-pulse-soft":e==="error"?"bg-accent-error":"bg-ink-dim";return d.jsx("span",{className:K("h-2 w-2 rounded-full",t),"aria-hidden":!0})}function tP(){const e=ne(i=>i.filters),t=ne(i=>i.toggleDirection),n=ne(i=>i.toggleKind),o=ne(i=>i.toggleStreams),r=ne(i=>i.setSearch);return d.jsxs("div",{className:"flex items-center gap-3 border-b border-line bg-surface-elev/70 px-4 py-2",children:[d.jsx("div",{className:"flex items-center gap-1",children:ls.map(i=>d.jsx(rP,{dir:i,active:e.directions.has(i),onClick:()=>t(i)},i))}),d.jsx(aP,{}),d.jsxs("div",{className:"flex items-center gap-1",children:[cs.map(i=>d.jsx(iP,{kind:i,active:e.kinds.has(i),onClick:()=>n(i)},i)),d.jsx(sP,{active:e.showStreams,onClick:o})]}),d.jsx("div",{className:"ml-auto",children:d.jsx("input",{type:"search",placeholder:"search payload…",value:e.search,onChange:i=>r(i.target.value),className:K("h-7 w-64 rounded border border-line bg-surface-base px-2 font-mono text-[11px] text-ink-primary placeholder-ink-muted","focus:border-accent-out focus:outline-none")})})]})}const nP={"editor-to-agent":"editor → agent (toggle to filter messages flowing from your IDE to the AI)","agent-to-editor":"agent → editor (toggle to filter messages coming back from the AI)"},oP={request:"request — expects a response",response:"response — answer to a previous request",notification:"notification — one-way event, no response",error:"error — response carrying an error object",unknown:"unknown — frames that could not be classified as JSON-RPC"};function rP({dir:e,active:t,onClick:n}){const o=e==="editor-to-agent",r=o?"→ OUT":"← IN",i=o?"text-accent-out":"text-accent-in";return d.jsx("button",{type:"button",onClick:n,title:nP[e],className:K("inline-flex items-center gap-1 rounded-sm border px-2 py-0.5 font-mono text-[10px] font-semibold tracking-widest transition-colors",t?K(i,o?"border-accent-out/50 bg-accent-out/10":"border-accent-in/50 bg-accent-in/10"):"border-line text-ink-muted hover:border-line-strong hover:text-ink-secondary"),children:r})}function iP({kind:e,active:t,onClick:n}){const r={request:{color:"text-accent-out",border:"border-accent-out/50",bg:"bg-accent-out/10"},response:{color:"text-accent-in",border:"border-accent-in/50",bg:"bg-accent-in/10"},notification:{color:"text-accent-note",border:"border-accent-note/50",bg:"bg-accent-note/10"},error:{color:"text-accent-error",border:"border-accent-error/50",bg:"bg-accent-error/10"},unknown:{color:"text-ink-muted",border:"border-line",bg:"bg-surface-row"}}[e];return d.jsx("button",{type:"button",onClick:n,title:oP[e],className:K("rounded-sm border px-2 py-0.5 font-mono text-[10px] font-semibold uppercase tracking-widest transition-colors",t?K(r.color,r.border,r.bg):"border-line text-ink-muted hover:border-line-strong hover:text-ink-secondary"),children:e})}function sP({active:e,onClick:t}){return d.jsx("button",{type:"button",onClick:t,title:"stream — collapse runs of agent_message_chunk notifications into a single row",className:K("rounded-sm border px-2 py-0.5 font-mono text-[10px] font-semibold uppercase tracking-widest transition-colors",e?"border-accent-note/50 bg-accent-note/10 text-accent-note":"border-line text-ink-muted hover:border-line-strong hover:text-ink-secondary"),children:"stream"})}function aP(){return d.jsx("span",{"aria-hidden":!0,className:"h-5 w-px bg-line"})}const lP={minSamplesForTail:3,longTailRatio:5,minBusiestCount:50,minBusiestRatio:2.5,minHotspotShare:.4,minSamplesForOutlier:5,outlierRatio:3};function cP(e,t,n={}){const o={...lP,...n},r=[],i=t.reduce((h,y)=>h+(y.totalLatencyMs??0),0);if(i>0){const y=t.filter(b=>b.totalLatencyMs!==null&&b.totalLatencyMs>0).sort((b,g)=>(g.totalLatencyMs??0)-(b.totalLatencyMs??0))[0];if(y&&y.totalLatencyMs!==null){const b=y.totalLatencyMs/i;b>=o.minHotspotShare&&r.push({kind:"hotspot",summary:`${y.method} consumed ${ar(y.totalLatencyMs)} of total wall time`,detail:`${Math.round(b*100)}% of ${ar(i)} sampled latency`,methods:[y.method]})}}const a=t.filter(h=>h.sampleSize>=o.minSamplesForTail&&h.p50!==null&&h.p99!==null&&h.p50>0&&h.p99/h.p50>=o.longTailRatio).sort((h,y)=>(y.p99??0)/(y.p50??1)-(h.p99??0)/(h.p50??1))[0];if(a&&a.p99!==null&&a.p50!==null){const h=Math.round(a.p99/a.p50);r.push({kind:"long-tail",summary:`${a.method} has a long tail — p99 is ${h}× the p50`,detail:`p50 ${ar(a.p50)} · p99 ${ar(a.p99)} · ${a.sampleSize} samples`,methods:[a.method]})}const l=[...t].filter(h=>h.sampleSize>=o.minSamplesForOutlier&&h.p99!==null&&h.max!==null&&h.p99>0&&h.max/h.p99>=o.outlierRatio).sort((h,y)=>(y.max??0)-(h.max??0))[0];if(l&&l.max!==null&&l.p99!==null){const h=Math.round(l.max/l.p99);r.push({kind:"outlier",summary:`${l.method} had one ${ar(l.max)} call — ${h}× its p99`,detail:`p99 ${ar(l.p99)} · ${l.sampleSize} samples`,methods:[l.method]})}const c=[...t].sort((h,y)=>y.count-h.count),f=c[0],m=c[1];if(f&&f.count>=o.minBusiestCount){const h=m&&m.count>0?f.count/m.count:1/0;if(h>=o.minBusiestRatio){const y=f.kind==="notification"?"notifications":"calls";r.push({kind:"busiest",summary:`${f.method} sent ${f.count} ${y}`,detail:m?`${h.toFixed(1)}× the next-busiest method (${m.method} · ${m.count})`:"no other methods to compare against",methods:[f.method]})}}const v=dP(e);if(v.length>0){const h=v.slice(0,3),y=v.length>3?` (+${v.length-3} more)`:"";r.push({kind:"errors",summary:`${v.length} method${v.length===1?"":"s"} returned an error`,detail:h.join(", ")+y,methods:v})}return r}function dP(e){const t=new Map,n=new Set;for(const o of e){const r=o.rpcId===void 0||o.rpcId===null?null:String(o.rpcId);if(o.kind==="request"&&o.method&&r!==null)t.set(r,o.method);else if(o.kind==="error"&&r!==null){const i=t.get(r);i&&n.add(i)}}return[...n].sort()}function ar(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<1e4)return`${(e/1e3).toFixed(2)}s`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return`${t}m${n}s`}function uP(e,t){if(e.length<=t)return e;const n=[];for(let o=0;o<t;o++){const r=Math.round(o*(e.length-1)/(t-1));n.push(e[r])}return n}function pP({values:e,width:t=64,height:n=14,className:o,title:r}){if(e.length===0)return null;const i=e[e.length-1]??0;if(i===0)return null;const s=Math.max(1,Math.floor(t/4)),a=uP(e,s),l=1,c=(t-l*(a.length-1))/a.length;return d.jsx("svg",{viewBox:`0 0 ${t} ${n}`,width:t,height:n,className:K("inline-block align-middle",o),role:"img","aria-label":r??`latency distribution, ${e.length} samples`,children:a.map((f,m)=>{const v=Math.max(1,f/i*n);return d.jsx("rect",{x:m*(c+l),y:n-v,width:c,height:v,fill:"currentColor",opacity:.4+f/i*.6},m)})})}function fP(e){const t={events:[],startTs:0,endTs:0,durationMs:0,laneCounts:{"editor-req":0,"agent-req":0,notification:0}};if(e.length===0)return t;const n=rf(e),o=new Map;for(const l of e)o.set(l.seq,l);let r=1/0,i=-1/0;const s=[],a={"editor-req":0,"agent-req":0,notification:0};for(const l of e)if(l.timestamp<r&&(r=l.timestamp),l.timestamp>i&&(i=l.timestamp),l.kind==="request"){const c=l.direction==="editor-to-agent"?"editor-req":"agent-req",f=n.get(l.seq),m=f?o.get(f.pairSeq):void 0,v=(m==null?void 0:m.kind)==="error",h=m?m.timestamp:l.timestamp;h>i&&(i=h),s.push({seq:l.seq,startTs:l.timestamp,endTs:h,lane:c,method:l.method??null,kind:l.kind,erroredOut:v,pairedSeq:m?m.seq:null}),a[c]+=1}else l.kind==="notification"&&(s.push({seq:l.seq,startTs:l.timestamp,endTs:l.timestamp,lane:"notification",method:l.method??null,kind:l.kind,erroredOut:!1,pairedSeq:null}),a.notification+=1);return!Number.isFinite(r)||!Number.isFinite(i)?t:{events:s,startTs:r,endTs:i,durationMs:Math.max(0,i-r),laneCounts:a}}const dl=["editor-req","agent-req","notification"],mP={"editor-req":"editor → agent","agent-req":"agent → editor",notification:"notifications"},oo=48,lf=6,Ll=24,wn=132,hs=20,Dl=8,hP=20,qh=3e4,Uh=50;function yP(e,t,n,o,r,i){if(e.length===0||n<=t)return{segments:[{kind:"active",tStart:t,tEnd:n,pxStart:0,pxEnd:o*r}],tsToX:()=>wn-i,totalActiveMs:0};const s=[...e].sort((u,x)=>u.startTs-x.startTs),a=[];let l=t,c=t;for(const u of s)u.startTs-c>qh&&(c>l&&a.push({kind:"active",tStart:l,tEnd:c}),a.push({kind:"gap",tStart:c,tEnd:u.startTs}),l=u.startTs),c=Math.max(c,u.endTs);c>l&&a.push({kind:"active",tStart:l,tEnd:c}),n>c+qh?a.push({kind:"gap",tStart:c,tEnd:n}):n>c&&a.length>0&&(a[a.length-1].tEnd=n);const f=a.filter(u=>u.kind==="gap").length,m=a.filter(u=>u.kind==="active").reduce((u,x)=>u+(x.tEnd-x.tStart),0),v=o*r,h=Math.max(50,v-f*Uh),y=m>0?h/m:0;let b=0;const g=[];for(const u of a){const x=u.kind==="gap"?Uh:(u.tEnd-u.tStart)*y;g.push({...u,pxStart:b,pxEnd:b+x}),b+=x}return{segments:g,tsToX:u=>{if(u<=g[0].tStart)return wn+g[0].pxStart-i;for(const S of g)if(u>=S.tStart&&u<=S.tEnd){const T=S.tEnd>S.tStart?(u-S.tStart)/(S.tEnd-S.tStart):0,C=S.pxStart+T*(S.pxEnd-S.pxStart);return wn+C-i}const x=g[g.length-1];return wn+x.pxEnd-i},totalActiveMs:m}}function gP({messages:e,onSelectSeq:t,height:n=220,controlsRef:o,onZoomChange:r}){const i=I.useMemo(()=>fP(e),[e]),s=I.useRef(null),a=I.useRef(null),[l,c]=I.useState({width:800,height:n}),[f,m]=I.useState(1),[v,h]=I.useState(0),[y,b]=I.useState(null),[g,p]=I.useState({x:0,y:0}),u=I.useRef(null);I.useEffect(()=>{const U=s.current;if(!U||typeof ResizeObserver>"u")return;const L=new ResizeObserver(F=>{const G=F[0];if(!G)return;const Y=G.contentRect;c({width:Math.max(320,Y.width),height:Math.max(120,Y.height)})});return L.observe(U),()=>L.disconnect()},[]),I.useEffect(()=>{m(1),h(0),b(null)},[i.startTs,i.endTs]);const x=I.useMemo(()=>{const U=Math.max(50,l.width-wn-hs);return yP(i.events,i.startTs,i.endTs,U,f,v)},[i,l.width,f,v]),S=I.useMemo(()=>{if(i.events.length===0)return[];const U=[];for(const L of i.events){const F=x.tsToX(L.startTs),G=x.tsToX(L.endTs),Y=Math.max(2,G-F),D=dl.indexOf(L.lane),J=Dl+Ll+D*(oo+lf)+oo/2-9;U.push({...L,x:F,y:J,width:Y,height:18})}return U},[i,x]);I.useEffect(()=>{const U=a.current;if(!U)return;const L=window.devicePixelRatio||1;U.width=l.width*L,U.height=l.height*L,U.style.width=`${l.width}px`,U.style.height=`${l.height}px`;const F=U.getContext("2d");if(!F)return;F.setTransform(L,0,0,L,0,0);const G=getComputedStyle(document.documentElement),Y=J=>`rgb(${G.getPropertyValue(`--${J}`).trim()})`,D=(J,O)=>`rgba(${G.getPropertyValue(`--${J}`).trim()} / ${O})`;F.clearRect(0,0,l.width,l.height),vP(F,l,Y),xP(F,x,l,Y,D),bP(F,l,x,Y),$P(F,S,y,Y,D)},[S,x,l,y]);const T=(U,L)=>{for(const F of S){const G=Math.max(F.width,6);if(U>=F.x&&U<=F.x+G&&L>=F.y&&L<=F.y+F.height)return F}return null},C=U=>{const L=U.currentTarget.getBoundingClientRect(),F=U.clientX-L.left,G=U.clientY-L.top;if(u.current){const D=F-u.current.startX;h(Math.max(0,u.current.startPan-D));return}const Y=T(F,G);b(Y),p({x:U.clientX,y:U.clientY})},$=U=>{const L=U.currentTarget.getBoundingClientRect(),F=U.clientX-L.left,G=U.clientY-L.top,Y=T(F,G);if(Y&&t){t(Y.seq);return}u.current={startX:F,startPan:v}},j=()=>{u.current=null},A=U=>{if(!U.metaKey&&!U.ctrlKey)return;U.preventDefault();const L=U.deltaY<0?1.15:1/1.15;m(F=>Math.min(50,Math.max(.3,F*L)))},E=()=>m(U=>Math.min(50,U*1.5)),q=()=>m(U=>Math.max(.3,U/1.5)),z=()=>{m(1),h(0)};return I.useEffect(()=>{if(o)return o.current={zoomIn:E,zoomOut:q,reset:z,getZoom:()=>f},()=>{o.current&&(o.current=null)}}),I.useEffect(()=>{r==null||r(f)},[f,r]),i.events.length===0?d.jsx("div",{className:"flex h-full items-center justify-center font-mono text-[11px] uppercase tracking-widest text-ink-muted",children:"no messages — capture or load a session first"}):d.jsxs("div",{ref:s,className:"relative h-full w-full",style:{minHeight:0},children:[d.jsx("canvas",{ref:a,className:K("block h-full w-full",u.current?"cursor-grabbing":y?"cursor-pointer":"cursor-grab"),onMouseMove:C,onMouseDown:$,onMouseUp:j,onMouseLeave:()=>{b(null),u.current=null},onWheel:A}),y&&d.jsxs("div",{role:"tooltip",className:"pointer-events-none fixed z-[150] rounded-sm border border-line bg-surface-base px-3 py-2 font-mono text-[11px] shadow-lg",style:{left:Math.min(window.innerWidth-280,g.x+12),top:g.y+12,maxWidth:280},children:[d.jsxs("div",{className:"text-ink-primary",children:[d.jsxs("span",{className:"text-ink-muted",children:["seq ",y.seq]})," · ",y.method??y.kind]}),d.jsx("div",{className:"text-ink-muted",children:y.endTs>y.startTs?`${Vt(y.endTs-y.startTs)}${y.erroredOut?" · error":""}`:y.lane==="notification"?"notification":"pending"}),t&&d.jsx("div",{className:"mt-1 text-[10px] text-ink-dim",children:"click to inspect"})]})]})}function vP(e,t,n){e.font="10px monospace",e.textBaseline="middle",e.textAlign="start";for(let o=0;o<dl.length;o++){const r=dl[o],i=Dl+Ll+o*(oo+lf);e.fillStyle=n("surface-elev"),e.fillRect(wn,i,t.width-wn-hs,oo),e.fillStyle=n("ink-muted"),e.fillText(mP[r],hP,i+oo/2),e.strokeStyle=n("line"),e.lineWidth=1,e.beginPath(),e.moveTo(wn,i+oo),e.lineTo(t.width-hs,i+oo),e.stroke()}}function bP(e,t,n,o){var y;const r=Dl+Ll-4;e.strokeStyle=o("line"),e.fillStyle=o("ink-muted"),e.font="10px monospace",e.textBaseline="bottom",e.textAlign="center",e.lineWidth=1;const i=n.segments.filter(b=>b.kind==="active").reduce((b,g)=>Math.max(b,g.tEnd-g.tStart),0),s=n.segments.reduce((b,g)=>b+(g.kind==="active"?g.pxEnd-g.pxStart:0),0),l=(i>0?s/n.totalActiveMs:0)*1e3,c=[.1,.25,.5,1,2,5,10,30,60,120,300],f=80;let m=c[c.length-1];for(const b of c)if(b*l>=f){m=b;break}const v=m*1e3,h=((y=n.segments[0])==null?void 0:y.tStart)??0;for(const b of n.segments){if(b.kind!=="active")continue;const g=Math.ceil((b.tStart-h)/v)*v+h;for(let p=g;p<=b.tEnd;p+=v){const u=n.tsToX(p);u<wn||u>t.width-hs||(e.beginPath(),e.moveTo(u,r),e.lineTo(u,r+4),e.stroke(),e.fillText(SP(p-h),u,r-2))}}}function xP(e,t,n,o,r){const i=Dl+Ll,s=i+dl.length*(oo+lf);for(const a of t.segments){if(a.kind!=="gap")continue;const l=t.tsToX(a.tStart),f=t.tsToX(a.tEnd)-l;if(l>n.width-hs||l+f<wn)continue;e.fillStyle=r("ink-muted",.06),e.fillRect(l,i,f,s-i),e.strokeStyle=o("line"),e.setLineDash([3,3]),e.lineWidth=1,e.beginPath(),e.moveTo(l+.5,i),e.lineTo(l+.5,s),e.moveTo(l+f-.5,i),e.lineTo(l+f-.5,s),e.stroke(),e.setLineDash([]),e.fillStyle=o("ink-muted"),e.font="10px monospace",e.textBaseline="middle",e.textAlign="center";const m=l+f/2,v=i+(s-i)/2;e.fillText(wP(a.tEnd-a.tStart),m,v)}}function wP(e){if(e<6e4)return`${Math.round(e/1e3)}s idle`;if(e<36e5)return`${Math.round(e/6e4)}m idle`;const t=Math.floor(e/36e5),n=Math.round(e%36e5/6e4);return n>0?`${t}h${n}m idle`:`${t}h idle`}function SP(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(e<1e4?1:0)}s`;const t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return`${t}m${n}s`}function $P(e,t,n,o,r){for(const i of t){const s=(n==null?void 0:n.seq)===i.seq,a=i.erroredOut?r("accent-error",.6):i.kind==="notification"?r("accent-note",.7):i.lane==="editor-req"?r("accent-out",.7):r("accent-in",.7);e.fillStyle=s?a.replace(/0\.\d+/,"0.95"):a,e.fillRect(i.x,i.y,Math.max(i.width,2),i.height),s&&(e.strokeStyle=o("ink-primary"),e.lineWidth=1,e.strokeRect(i.x-.5,i.y-.5,Math.max(i.width,2)+1,i.height+1))}}function kP({open:e,onClose:t,onNavigateToSeq:n}){const o=ne(S=>S.messages),r=ne(S=>S.session),i=ne(S=>S.select),s=I.useRef(null),[a,l]=I.useState(1),c=I.useMemo(()=>Bd(o),[o]),f=I.useMemo(()=>cP(o,c),[o,c]),m=I.useMemo(()=>c.reduce((S,T)=>Math.max(S,T.count),0),[c]),[v,h]=I.useState("count"),[y,b]=I.useState("desc"),{rendered:g,visible:p}=sf(e);I.useEffect(()=>{if(!e)return;const S=T=>{T.key==="Escape"&&(T.preventDefault(),t())};return window.addEventListener("keydown",S,!0),()=>window.removeEventListener("keydown",S,!0)},[e,t]);const u=I.useMemo(()=>IP(c,v,y),[c,v,y]),x=I.useMemo(()=>PP(c),[c]);return g?d.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Performance dashboard",className:K("fixed inset-0 z-[100] flex flex-col bg-surface-base/95 backdrop-blur-sm transition-opacity duration-200 ease-out",p?"opacity-100":"opacity-0"),children:d.jsxs("div",{className:K("flex h-full w-full flex-col transition-transform duration-200 ease-out",p?"translate-y-0":"-translate-y-2"),children:[d.jsxs("header",{className:"flex items-center justify-between border-b border-line px-5 py-3",children:[d.jsxs("div",{className:"flex min-w-0 items-baseline gap-3",children:[d.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:"Performance — per-method latency"}),r&&d.jsx("span",{className:"truncate font-mono text-[11px] text-ink-secondary",children:(()=>{const S=ql(r);let T=S.secondary;if(!r.clientName){const C=cl(o),$=C.client.title??C.client.name??null;if($){const j=S.secondary;T=j?`${$} · ${j}`:$}}return T?`${S.primary} · ${T}`:S.primary})()})]}),d.jsx("button",{type:"button",onClick:t,className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted transition-colors hover:text-ink-primary","aria-label":"Close performance panel",children:"close"})]}),f.length>0&&d.jsx(NP,{insights:f}),d.jsx("div",{className:"border-b border-line bg-surface-elev px-5 py-2 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:c.length===0?d.jsx("span",{children:"no messages — capture or load a session first"}):d.jsxs("span",{children:[x.methods," methods · ",x.requests," requests ·"," ",x.notifications," notifications · ",x.samples," latency samples"]})}),d.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[d.jsx("div",{className:"flex-1 overflow-y-auto",children:u.length===0?null:d.jsxs("table",{className:"w-full table-fixed text-[11px]",children:[d.jsxs("colgroup",{children:[d.jsx("col",{}),d.jsx("col",{className:"w-[64px]"}),d.jsx("col",{className:"w-[88px]"}),d.jsx("col",{className:"w-[80px]"}),d.jsx("col",{className:"w-[80px]"}),d.jsx("col",{className:"w-[80px]"}),d.jsx("col",{className:"w-[80px]"}),d.jsx("col",{className:"w-[120px]"})]}),d.jsx("thead",{className:"sticky top-0 z-10 bg-surface-base",children:d.jsxs("tr",{className:"border-b border-line text-left font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:[d.jsx(cr,{sk:"method",current:v,dir:y,onSort:lr(h,b,y),className:"!pl-5",children:"method"}),d.jsx("th",{className:"px-3 py-2",children:"kind"}),d.jsx(cr,{sk:"count",current:v,dir:y,onSort:lr(h,b,y),align:"right",children:"count"}),d.jsx(cr,{sk:"p50",current:v,dir:y,onSort:lr(h,b,y),align:"right",children:"p50"}),d.jsx(cr,{sk:"p99",current:v,dir:y,onSort:lr(h,b,y),align:"right",children:"p99"}),d.jsx(cr,{sk:"max",current:v,dir:y,onSort:lr(h,b,y),align:"right",children:"max"}),d.jsx(cr,{sk:"total",current:v,dir:y,onSort:lr(h,b,y),align:"right",children:"total"}),d.jsx("th",{className:"py-2 pl-3 pr-5 text-right",children:"dist"})]})}),d.jsx("tbody",{className:"font-mono",children:u.map(S=>d.jsxs("tr",{className:"border-b border-line/40 transition-colors hover:bg-surface-rowHover/50",children:[d.jsx("td",{className:"truncate py-1.5 pl-5 pr-3 text-ink-primary",title:S.method,children:S.method}),d.jsx("td",{className:"px-3 py-1.5 text-ink-muted",children:d.jsx(EP,{kind:S.kind})}),d.jsx("td",{className:"px-3 py-1.5 text-right text-ink-primary",children:d.jsx(CP,{count:S.count,max:m,kind:S.kind})}),d.jsx("td",{className:"px-3 py-1.5 text-right text-ink-secondary",children:S.p50!==null?Vt(S.p50):"—"}),d.jsx("td",{className:"px-3 py-1.5 text-right text-ink-secondary",children:S.p99!==null?Vt(S.p99):"—"}),d.jsx("td",{className:"px-3 py-1.5 text-right text-ink-secondary",children:S.max!==null?Vt(S.max):"—"}),d.jsx("td",{className:"px-3 py-1.5 text-right text-ink-secondary",children:S.totalLatencyMs!==null?Vt(S.totalLatencyMs):"—"}),d.jsx("td",{className:"py-1.5 pl-3 pr-5 text-right",children:S.latencies.length>0?d.jsx(pP,{values:S.latencies,width:88,height:14,className:"text-accent-info",title:`${S.method} latency distribution`}):d.jsx("span",{className:"text-ink-dim",children:"—"})})]},`${S.kind}:${S.method}`))})]})}),o.length>0&&d.jsxs("div",{className:"flex h-[260px] shrink-0 flex-col border-t border-line bg-surface-elev",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-line bg-surface-base px-5 py-2 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:[d.jsxs("div",{className:"flex min-w-0 items-baseline gap-2 truncate",children:[d.jsx("span",{children:"timeline — wall-clock waterfall"}),d.jsx("span",{className:"text-ink-dim",children:"· drag to pan · Cmd/Ctrl + wheel zoom · click to inspect"})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[d.jsxs("span",{className:"text-ink-secondary",children:[a.toFixed(a<1?2:1),"×"]}),d.jsx("button",{type:"button",onClick:()=>{var S;return(S=s.current)==null?void 0:S.zoomOut()},className:"inline-flex h-5 w-5 items-center justify-center rounded-sm border border-line hover:bg-surface-rowHover hover:text-ink-primary","aria-label":"Zoom out",title:"Zoom out",children:"−"}),d.jsx("button",{type:"button",onClick:()=>{var S;return(S=s.current)==null?void 0:S.zoomIn()},className:"inline-flex h-5 w-5 items-center justify-center rounded-sm border border-line hover:bg-surface-rowHover hover:text-ink-primary","aria-label":"Zoom in",title:"Zoom in",children:"+"}),d.jsx("button",{type:"button",onClick:()=>{var S;return(S=s.current)==null?void 0:S.reset()},className:"inline-flex h-5 items-center justify-center rounded-sm border border-line px-2 hover:bg-surface-rowHover hover:text-ink-primary","aria-label":"Reset zoom and pan",title:"Reset zoom and pan to defaults",children:"reset"})]})]}),d.jsx("div",{className:"flex-1",children:d.jsx(gP,{messages:o,controlsRef:s,onZoomChange:l,onSelectSeq:S=>{n?n(S):(i(S),t())}})})]})]})]})}):null}const TP={hotspot:"●","long-tail":"▲",outlier:"◆",busiest:"■",errors:"✗"},_P={hotspot:"text-accent-warn","long-tail":"text-accent-warn",outlier:"text-accent-warn",busiest:"text-accent-info",errors:"text-accent-error"},jP={hotspot:"hotspot","long-tail":"long tail",outlier:"outlier",busiest:"busiest",errors:"errors"};function NP({insights:e}){return d.jsxs("div",{className:"border-b border-line bg-surface-base px-5 py-2.5",children:[d.jsx("div",{className:"mb-2 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:"insights"}),d.jsx("ul",{className:"space-y-1.5",children:e.map(t=>d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{"aria-hidden":!0,className:K("mt-[3px] inline-block text-[9px] leading-none",_P[t.kind]),children:TP[t.kind]}),d.jsx("div",{className:"min-w-[68px] font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:jP[t.kind]}),d.jsxs("div",{className:"flex-1 text-[11px] leading-snug",children:[d.jsx("div",{className:"text-ink-primary",children:t.summary}),t.detail&&d.jsx("div",{className:"text-[10px] text-ink-muted",children:t.detail})]})]},t.kind))})]})}function CP({count:e,max:t,kind:n}){const o=t>0?e/t*100:0,r=n==="request"?"bg-accent-out/15":"bg-accent-note/15";return d.jsxs("div",{className:"relative inline-block w-[44px] text-right",children:[d.jsx("div",{"aria-hidden":!0,className:K("absolute inset-y-[1px] right-0 rounded-sm",r),style:{width:`${o}%`}}),d.jsx("span",{className:"relative",children:e})]})}function lr(e,t,n){return(o,r)=>{r?t(n==="asc"?"desc":"asc"):(e(o),t(o==="method"?"asc":"desc"))}}function cr({sk:e,current:t,dir:n,onSort:o,align:r="left",className:i,children:s}){const a=t===e;return d.jsxs("th",{className:K("cursor-pointer select-none px-3 py-2 transition-colors hover:text-ink-primary",r==="right"?"text-right":"",a?"text-ink-primary":"",i),onClick:()=>o(e,a),"aria-sort":a?n==="asc"?"ascending":"descending":"none",children:[d.jsx("span",{children:s}),a&&d.jsx("span",{className:"ml-1 text-accent-warn",children:n==="asc"?"↑":"↓"})]})}function EP({kind:e}){const t=e==="request"?"text-accent-out":"text-accent-note",n=e==="request"?"req":"ntf";return d.jsx("span",{className:K("text-[10px] uppercase tracking-widest",t),title:e,children:n})}function PP(e){let t=0,n=0,o=0;for(const r of e)r.kind==="request"?t+=r.count:n+=r.count,o+=r.sampleSize;return{methods:e.length,requests:t,notifications:n,samples:o}}function IP(e,t,n){const o=n==="asc"?1:-1,r=[...e];return r.sort((i,s)=>{const a=Lh(i,t),l=Lh(s,t);return a===null&&l!==null?1:a!==null&&l===null?-1:t==="method"?o*i.method.localeCompare(s.method):a===null||l===null?0:o*(a-l)}),r}function Lh(e,t){switch(t){case"method":return 0;case"count":return e.count;case"p50":return e.p50;case"p99":return e.p99;case"max":return e.max;case"total":return e.totalLatencyMs}}const cf=["raw.githubusercontent.com","gist.githubusercontent.com"];function Xb(e){try{return{ok:!0,export:DC(e)}}catch(t){return{ok:!1,error:t instanceof Error?t.message:String(t)}}}function OP(e){let t;try{t=new URL(e)}catch{return!1}return t.protocol!=="https:"?!1:cf.includes(t.host)}async function RP(e){if(!OP(e))return{ok:!1,error:`host not in playground allowlist (${cf.join(", ")})`};let t;try{t=await fetch(e,{redirect:"follow"})}catch(o){return{ok:!1,error:`fetch failed: ${o instanceof Error?o.message:String(o)}`}}if(!t.ok)return{ok:!1,error:`HTTP ${t.status} ${t.statusText}`};const n=await t.text();return Xb(n)}function AP({initialUrl:e=null}){const[t,n]=I.useState(null),[o,r]=I.useState(e!==null),[i,s]=I.useState(!1),[a,l]=I.useState(""),c=I.useRef(null),f=(b,g)=>{b.ok?(ne.getState().loadFromExport(b.export),n(null)):n(`${g}: ${b.error}`),r(!1)},m=async b=>{r(!0),n(null);try{const g=await b.text();f(Xb(g),b.name)}catch(g){n(`${b.name}: ${g instanceof Error?g.message:String(g)}`),r(!1)}},v=async b=>{r(!0),n(null),f(await RP(b),b)},h=I.useRef(e);if(h.current!==null){const b=h.current;h.current=null,v(b)}const y=b=>{var p;b.preventDefault(),s(!1);const g=(p=b.dataTransfer.files)==null?void 0:p[0];g&&m(g)};return d.jsx("div",{className:"flex h-full w-full items-center justify-center bg-grid",children:d.jsxs("div",{className:"relative w-[min(720px,92%)] rounded-md border border-line bg-surface-elev/80 p-6 backdrop-blur-sm",children:[d.jsxs("div",{className:"mb-1 flex items-baseline gap-3",children:[d.jsx("span",{className:"font-display text-sm uppercase tracking-[0.18em] text-ink-muted",children:"acp.devtools"}),d.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-dim",children:"playground"})]}),d.jsx("h2",{className:"font-display text-2xl uppercase tracking-tight text-ink-primary",children:"Drop an exported session"}),d.jsxs("p",{className:"mt-2 font-sans text-sm leading-relaxed text-ink-secondary",children:["The playground renders ACP session exports client-side. Nothing leaves your browser. Generate exports with ",d.jsx("code",{className:"font-mono",children:"acp-devtools export <id>"})," ","— auth headers and proxy tokens are redacted by default."]}),d.jsxs("div",{role:"button",tabIndex:0,"aria-label":"Drop session export here or click to pick a file",onClick:()=>{var b;return(b=c.current)==null?void 0:b.click()},onKeyDown:b=>{var g;(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),(g=c.current)==null||g.click())},onDragOver:b=>{b.preventDefault(),s(!0)},onDragLeave:()=>s(!1),onDrop:y,className:K("mt-5 flex h-40 cursor-pointer flex-col items-center justify-center rounded-md border-2 border-dashed text-center transition-colors",i?"border-accent-out bg-accent-out/10":"border-line bg-surface-base/40 hover:border-ink-muted"),children:[d.jsx("span",{className:"font-display text-sm uppercase tracking-[0.18em] text-ink-muted",children:o?"Loading…":"Drop .json here"}),d.jsx("span",{className:"mt-1 font-mono text-[11px] text-ink-dim",children:"or click to pick a file"}),d.jsx("input",{ref:c,type:"file",accept:".json,application/json",className:"hidden",onChange:b=>{var p;const g=(p=b.target.files)==null?void 0:p[0];g&&m(g),b.target.value=""}})]}),d.jsxs("form",{className:"mt-4 flex items-center gap-2",onSubmit:b=>{b.preventDefault();const g=a.trim();g&&v(g)},children:[d.jsx("input",{type:"url",value:a,onChange:b=>l(b.target.value),placeholder:"https://raw.githubusercontent.com/…/session.json",className:"flex-1 rounded-sm border border-line bg-surface-base px-3 py-2 font-mono text-[12px] text-ink-primary outline-none focus:border-ink-muted","aria-label":"Load session from URL"}),d.jsx("button",{type:"submit",disabled:o||a.trim().length===0,className:"rounded-sm border border-line bg-surface-base px-3 py-2 font-display text-[11px] uppercase tracking-widest text-ink-secondary transition-colors hover:border-ink-muted disabled:cursor-not-allowed disabled:opacity-50",children:"Load"})]}),d.jsxs("p",{className:"mt-2 font-mono text-[10px] leading-relaxed text-ink-dim",children:["URL allowlist: ",cf.join(", "),". Gists are public — don't use this for anything you wouldn't post on Twitter."]}),t&&d.jsx("p",{className:"mt-3 font-mono text-[11px] text-accent-error",children:t})]})})}const MP=[.5,1,2,4,8];function qP(){const e=ne(h=>h.messages),t=ne(h=>h.playback),n=ne(h=>h.setPlayhead),o=ne(h=>h.setPlaying),r=ne(h=>h.setPlaybackSpeed),i=e.length>0?e[0].seq:0,s=e.length>0?e[e.length-1].seq:0,a=t.playhead,l=a??i,c=a!==null&&a>=s,f=I.useRef(null);if(I.useEffect(()=>{if(!t.playing)return;if(c){o(!1);return}const h=a===null?-1:e.findIndex(u=>u.seq===a),y=e[h+1];if(!y){o(!1);return}const b=h>=0?e[h]:void 0,g=b?y.timestamp-b.timestamp:0,p=Math.max(15,Math.min(1500,g/t.speed));return f.current=setTimeout(()=>{n(y.seq)},p),()=>{f.current&&(clearTimeout(f.current),f.current=null)}},[t.playing,t.speed,a,e,c,n,o]),e.length===0)return null;const m=h=>{n(h),t.playing&&o(!1)},v=()=>{c?(n(null),o(!0)):o(!t.playing)};return d.jsxs("div",{className:"flex items-center gap-3 border-t border-line bg-surface-elev/70 px-4 py-2 font-mono text-[11px]",children:[d.jsx("button",{type:"button",onClick:v,className:K("inline-flex h-6 w-12 items-center justify-center rounded-sm border font-semibold uppercase tracking-widest transition-colors",t.playing?"border-accent-warn/50 bg-accent-warn/10 text-accent-warn":"border-accent-out/50 bg-accent-out/10 text-accent-out"),title:t.playing?"pause":c?"restart playback":"play",children:t.playing?"❚❚":c?"↺":"▶"}),d.jsxs("span",{className:"w-20 shrink-0 text-right text-ink-secondary",children:[String(a??0).padStart(3,"0")," / ",String(s).padStart(3,"0")]}),d.jsx("input",{type:"range",min:i,max:s,value:l,onChange:h=>m(Number(h.target.value)),className:"h-1 flex-1 cursor-pointer accent-accent-out"}),d.jsx("div",{className:"flex shrink-0 items-center gap-1",children:MP.map(h=>d.jsxs("button",{type:"button",onClick:()=>r(h),className:K("rounded-sm border px-1.5 py-0.5 text-[10px] uppercase tracking-widest transition-colors",t.speed===h?"border-accent-out/50 bg-accent-out/10 text-accent-out":"border-line text-ink-muted hover:border-line-strong hover:text-ink-secondary"),title:`${h}× speed`,children:[h,"×"]},h))})]})}function Zb(e=5e3){const[t,n]=I.useState(()=>Date.now());return I.useEffect(()=>{const o=setInterval(()=>n(Date.now()),e);return()=>clearInterval(o)},[e]),t}function UP({open:e,onClose:t}){const n=ne(a=>a.session),o=ne(a=>a.messages),r=I.useMemo(()=>cl(o),[o]),{rendered:i,visible:s}=sf(e);return I.useEffect(()=>{if(!e)return;const a=l=>{l.key==="Escape"&&(l.preventDefault(),t())};return window.addEventListener("keydown",a,!0),()=>window.removeEventListener("keydown",a,!0)},[e,t]),i?d.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Session info",className:K("fixed inset-0 z-[100] flex items-start justify-end bg-black/60 backdrop-blur-sm transition-opacity duration-200 ease-out",s?"opacity-100":"opacity-0"),onMouseDown:a=>{a.target===a.currentTarget&&t()},children:d.jsxs("div",{className:K("flex h-full w-full max-w-[440px] flex-col border-l border-line bg-surface-base shadow-2xl transition-transform duration-200 ease-out",s?"translate-x-0":"translate-x-full"),children:[d.jsxs("header",{className:"flex items-center justify-between border-b border-line px-5 py-3",children:[d.jsx("div",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:"Session info"}),d.jsx("button",{type:"button",onClick:t,className:"font-mono text-[10px] uppercase tracking-widest text-ink-muted transition-colors hover:text-ink-primary","aria-label":"Close session info panel",children:"close"})]}),d.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:n?d.jsx(LP,{session:n,meta:r,messages:o}):d.jsx("div",{className:"font-mono text-[11px] text-ink-muted",children:"No session attached."})})]})}):null}function LP({session:e,meta:t,messages:n}){const o=Zb(5e3),{primary:r}=ql(e),i=I.useMemo(()=>zP(n),[n]);return d.jsxs("div",{className:"space-y-5 text-[12px]",children:[d.jsxs(wi,{title:"Summary",children:[d.jsx(mn,{label:"Session",value:r}),d.jsx(mn,{label:"Client",value:t.client.title||t.client.name||e.clientName||"—",secondary:t.client.version?`v${t.client.version}${t.client.platform?` · ${t.client.platform}`:""}`:null}),d.jsx(mn,{label:"Agent",value:t.agent.name||DP(e.agentCommand)||"—",secondary:t.agent.version?`v${t.agent.version}`:null}),d.jsx(mn,{label:"Protocol",value:t.protocolVersion!==null?`ACP v${t.protocolVersion}`:"—"}),d.jsx(mn,{label:"Started",value:_a(e.startedAt,o)}),d.jsx(mn,{label:"Messages",value:`${n.length} (req ${i.req} · rsp ${i.rsp} · ntf ${i.note} · err ${i.err})`})]}),d.jsxs(wi,{title:"Client capabilities",children:[d.jsx(No,{label:"fs.readTextFile",enabled:t.clientCapabilities.fsReadTextFile}),d.jsx(No,{label:"fs.writeTextFile",enabled:t.clientCapabilities.fsWriteTextFile}),d.jsx(No,{label:"terminal",enabled:t.clientCapabilities.terminal}),d.jsx(No,{label:"auth.terminal",enabled:t.clientCapabilities.authTerminal}),d.jsx(No,{label:"auth.gateway",enabled:t.clientCapabilities.authGateway})]}),d.jsxs(wi,{title:"Agent capabilities",children:[d.jsx(No,{label:"prompt",enabled:t.agentCapabilities.prompt}),d.jsx(No,{label:"loadSession",enabled:t.agentCapabilities.loadSession}),d.jsx(mn,{label:"Auth methods",value:String(t.agent.authMethods)})]}),d.jsxs(wi,{title:"Runtime state",children:[d.jsx(mn,{label:"Mode",value:t.runtime.currentMode??"—",secondary:t.runtime.modeChanges>0?`changed ${t.runtime.modeChanges}× this session`:null}),d.jsx(mn,{label:"Model",value:t.runtime.currentModel??"—",secondary:t.runtime.modelChanges>0?`changed ${t.runtime.modelChanges}× this session`:null}),d.jsx(mn,{label:"Commands",value:t.runtime.availableCommands.length>0?t.runtime.availableCommands.join(", "):"—",wrap:!0})]}),t.extensions.jetbrainsProxyConfig!==null&&d.jsx(wi,{title:"JetBrains extensions",children:d.jsx("div",{className:"rounded-sm border border-line bg-surface-elev p-3 font-mono text-[11px] text-ink-secondary",children:d.jsx(al,{value:t.extensions.jetbrainsProxyConfig})})})]})}function DP(e){if(!e)return null;const t=e.trim().split(/\s+/);if(t[0]==="npx")for(let n=1;n<t.length;n++){const o=t[n];if(!o.startsWith("-"))return o}return t[0]??null}function zP(e){let t=0,n=0,o=0,r=0;for(const i of e)i.kind==="request"?t++:i.kind==="response"?n++:i.kind==="notification"?o++:i.kind==="error"&&r++;return{req:t,rsp:n,note:o,err:r}}function wi({title:e,children:t}){return d.jsxs("div",{children:[d.jsx("h3",{className:"mb-2 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:e}),d.jsx("div",{className:"space-y-1.5",children:t})]})}function mn({label:e,value:t,secondary:n,wrap:o=!1}){return d.jsxs("div",{className:"flex items-baseline gap-3",children:[d.jsx("span",{className:"w-[120px] shrink-0 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:e}),d.jsxs("span",{className:K("flex-1 text-ink-primary",o?"whitespace-normal break-words":"truncate"),title:o?void 0:t,children:[t,n&&d.jsx("span",{className:"ml-2 text-[10px] text-ink-muted",children:n})]})]})}function No({label:e,enabled:t}){return d.jsxs("div",{className:"flex items-baseline gap-3",children:[d.jsx("span",{className:"w-[120px] shrink-0 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:e}),d.jsx("span",{className:K("flex-1 font-mono text-[11px]",t?"text-accent-ok":"text-ink-dim"),children:t?"✓ enabled":"— not advertised"})]})}function FP({left:e,right:t,storageKey:n,initialLeftFraction:o=.6,minLeft:r=320,minRight:i=320}){const s=I.useRef(null),[a,l]=I.useState(null),c=I.useRef(!1);I.useEffect(()=>{if(!s.current)return;const h=s.current.clientWidth,y=n?Number(localStorage.getItem(n)):NaN;n&&Number.isFinite(y)&&y>0&&y<h?l(y):l(Math.round(h*o))},[o,n]);const f=I.useCallback(h=>{h.preventDefault(),c.current=!0,h.currentTarget.setPointerCapture(h.pointerId)},[]),m=I.useCallback(h=>{if(!c.current||!s.current)return;const y=s.current.getBoundingClientRect(),b=h.clientX-y.left,g=y.width,p=Math.min(Math.max(b,r),g-i);l(p),n&&localStorage.setItem(n,String(Math.round(p)))},[r,i,n]),v=I.useCallback(h=>{c.current=!1;try{h.currentTarget.releasePointerCapture(h.pointerId)}catch{}},[]);return d.jsxs("div",{ref:s,className:"flex h-full w-full overflow-hidden",children:[d.jsx("div",{style:{width:a??"60%"},className:"flex h-full min-w-0 flex-col",children:e}),d.jsx("div",{role:"separator","aria-orientation":"vertical",className:K("group relative w-px shrink-0 cursor-col-resize bg-line",'before:absolute before:inset-y-0 before:-left-1 before:-right-1 before:content-[""]'),onPointerDown:f,onPointerMove:m,onPointerUp:v,onPointerCancel:v,children:d.jsx("div",{className:"absolute inset-y-0 left-0 w-px bg-line transition-colors group-hover:bg-accent-out/40"})}),d.jsx("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:t})]})}function BP(){const e=ne(n=>n.messages),t=I.useMemo(()=>{let n=0,o=0,r=0,i=0,s=0;const a=new Map;for(const h of e)switch(a.set(h.seq,h.timestamp),s+=h.raw.length,h.kind){case"request":n+=1;break;case"response":o+=1;break;case"notification":r+=1;break;case"error":i+=1;break}const l=Cl(e),c=[];for(const h of e){if(h.kind!=="response"&&h.kind!=="error")continue;const y=l.get(h.seq);if(y===void 0)continue;const b=a.get(y);b!==void 0&&c.push(h.timestamp-b)}c.sort((h,y)=>h-y);const f=c.length?bh(c,50):null,m=c.length?bh(c,99):null,v=KN(tf(e));return{total:e.length,req:n,res:o,note:r,err:i,bytes:s,p50:f,p99:m,spec:v}},[e]);return d.jsxs("footer",{className:"flex items-center justify-between gap-6 border-t border-line bg-surface-elev/80 px-5 py-1.5 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:[d.jsxs("div",{className:"flex items-center gap-5",children:[d.jsx(Yn,{label:"msgs",value:t.total,tone:"primary"}),d.jsx(Yn,{label:"req",value:t.req,tone:"out"}),d.jsx(Yn,{label:"rsp",value:t.res,tone:"in"}),d.jsx(Yn,{label:"ntf",value:t.note,tone:"note"}),d.jsx(Yn,{label:"err",value:t.err,tone:t.err>0?"error":"muted"})]}),d.jsxs("div",{className:"flex items-center gap-5",children:[d.jsx(Yn,{label:"p50",value:t.p50!==null?Vt(t.p50):"—",tone:"primary"}),d.jsx(Yn,{label:"p99",value:t.p99!==null?Vt(t.p99):"—",tone:"primary"}),d.jsx(Yn,{label:"bytes",value:t.total>0?Ul(t.bytes):"—",tone:"primary"}),t.spec.checked>0&&d.jsx(VP,{invalidFrames:t.spec.invalidFrames,totalErrors:t.spec.totalErrors,affectedMethods:t.spec.affectedMethods}),d.jsx(HP,{})]})]})}function HP(){return d.jsxs("a",{href:"https://github.com/maksugr/acp-devtools",target:"_blank",rel:"noreferrer noopener",title:"Enjoying acp-devtools? Star it on GitHub — thank you!","aria-label":"Star acp-devtools on GitHub",className:"inline-flex items-baseline gap-1 text-ink-muted transition-colors hover:text-accent-warn focus-visible:text-accent-warn focus-visible:outline-none",children:[d.jsx("span",{"aria-hidden":"true",className:"text-[10px]",children:"★"}),d.jsx("span",{className:"text-[9px] tracking-normal",children:"Star on GitHub"})]})}function VP({invalidFrames:e,totalErrors:t,affectedMethods:n}){if(e===0)return d.jsx(ps,{label:d.jsx("span",{className:"font-sans",children:"every frame validates against the ACP schema"}),tone:"info",children:d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{children:"spec"}),d.jsx("span",{className:"text-accent-ok",children:"✓"})]})});const o=`${t} schema error${t===1?"":"s"} in ${e} frame${e===1?"":"s"}`;return d.jsx(ps,{tone:"warn",label:d.jsxs("div",{className:"space-y-1.5 font-sans",children:[d.jsx("div",{children:o}),n.length>0&&d.jsxs("div",{className:"font-mono text-[10px] text-ink-muted",children:["methods: ",n.join(", ")]})]}),children:d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{children:"spec"}),d.jsxs("span",{className:"text-accent-error",children:["⚠ ",e]})]})})}function Yn({label:e,value:t,tone:n}){const o=n==="primary"?"text-ink-primary":n==="out"?"text-accent-out":n==="in"?"text-accent-in":n==="note"?"text-accent-note":n==="error"?"text-accent-error":"text-ink-muted";return d.jsxs("span",{className:"inline-flex items-baseline gap-1",children:[d.jsx("span",{children:e}),d.jsx("span",{className:o,children:t})]})}const zl=0,$o=1,oi=2,ex=4;function Dh(e){return()=>e}function WP(e){e()}function tx(e,t){return n=>e(t(n))}function zh(e,t){return()=>e(t)}function KP(e,t){return n=>e(t,n)}function df(e){return e!==void 0}function GP(...e){return()=>{e.map(WP)}}function ri(){}function Fl(e,t){return t(e),e}function JP(e,t){return t(e)}function Ue(...e){return e}function $e(e,t){return e($o,t)}function me(e,t){e(zl,t)}function uf(e){e(oi)}function Le(e){return e(ex)}function oe(e,t){return $e(e,KP(t,zl))}function cn(e,t){const n=e($o,o=>{n(),t(o)});return n}function Fh(e){let t,n;return o=>r=>{t=r,n&&clearTimeout(n),n=setTimeout(()=>{o(t)},e)}}function nx(e,t){return e===t}function Me(e=nx){let t;return n=>o=>{e(t,o)||(t=o,n(o))}}function ae(e){return t=>n=>{e(n)&&t(n)}}function Z(e){return t=>tx(t,e)}function yn(e){return t=>()=>{t(e)}}function B(e,...t){const n=QP(...t);return(o,r)=>{switch(o){case oi:uf(e);return;case $o:return $e(e,n(r))}}}function Sn(e,t){return n=>o=>{n(t=e(t,o))}}function Qo(e){return t=>n=>{e>0?e--:t(n)}}function On(e){let t=null,n;return o=>r=>{t=r,!n&&(n=setTimeout(()=>{n=void 0,o(t)},e))}}function he(...e){const t=new Array(e.length);let n=0,o=null;const r=2**e.length-1;return e.forEach((i,s)=>{const a=2**s;$e(i,l=>{const c=n;n|=a,t[s]=l,c!==r&&n===r&&o&&(o(),o=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===r?a():o=a}}function QP(...e){return t=>e.reduceRight(JP,t)}function YP(e){let t,n;const o=()=>t==null?void 0:t();return function(r,i){switch(r){case $o:return i?n===i?void 0:(o(),n=i,t=$e(e,i),t):(o(),ri);case oi:o(),n=null;return}}}function W(e){let t=e;const n=ve();return(o,r)=>{switch(o){case zl:t=r;break;case $o:{r(t);break}case ex:return t}return n(o,r)}}function yt(e,t){return Fl(W(t),n=>oe(e,n))}function ve(){const e=[];return(t,n)=>{switch(t){case zl:e.slice().forEach(o=>{o(n)});return;case oi:e.splice(0,e.length);return;case $o:return e.push(n),()=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)}}}}function Mt(e){return Fl(ve(),t=>oe(e,t))}function xe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:XP(),singleton:n}}const XP=()=>Symbol();function ZP(e){const t=new Map,n=({constructor:o,dependencies:r,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=o(r.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function Qe(...e){const t=ve(),n=new Array(e.length);let o=0;const r=2**e.length-1;return e.forEach((i,s)=>{const a=2**s;$e(i,l=>{n[s]=l,o|=a,o===r&&me(t,n)})}),function(i,s){switch(i){case oi:{uf(t);return}case $o:return o===r&&s(n),$e(t,s)}}}function se(e,t=nx){return B(e,Me(t))}function Hd(...e){return function(t,n){switch(t){case oi:return;case $o:return GP(...e.map(o=>$e(o,n)))}}}const nt={DEBUG:0,INFO:1,WARN:2,ERROR:3},eI={[nt.DEBUG]:"debug",[nt.ERROR]:"error",[nt.INFO]:"log",[nt.WARN]:"warn"},tI=()=>typeof globalThis>"u"?window:globalThis,ko=xe(()=>{const e=W(nt.ERROR);return{log:W((t,n,o=nt.INFO)=>{const r=tI().VIRTUOSO_LOG_LEVEL??Le(e);o>=r&&console[eI[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0}),Vd=new WeakMap;function ox(e){return"self"in e?e.document.documentElement:e}function nI(e){const t=ox(e),n=Vd.get(t);if(n!==void 0)return n;const o=t.ownerDocument.defaultView.getComputedStyle(t).direction==="rtl";return Vd.set(t,o),o}function Bh(e){Vd.delete(ox(e))}function rx(e,t){return nI(e)?-t:t}const Lo=rx;function Hh(e,t){return rx(e,t)}function Zo(e,t,n){return pf(e,t,n).callbackRef}function pf(e,t,n){const o=te.useRef(null);let r=s=>{};const i=te.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return r=s=>{s&&t?(i==null||i.observe(s),o.current=s):(o.current&&(i==null||i.unobserve(o.current)),o.current=null)},{callbackRef:r,ref:o}}function oI(e,t,n,o,r,i,s,a,l){const c=te.useCallback(f=>{const m=rI(f.children,t,a?"offsetWidth":"offsetHeight",r);let v=f.parentElement;for(;v.dataset.virtuosoScroller===void 0;)v=v.parentElement;const h=v.lastElementChild.dataset.viewportType==="window";let y;h&&(y=v.ownerDocument.defaultView);const b=s?a?s.scrollWidth:s.scrollHeight:h?a?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:a?v.scrollWidth:v.scrollHeight,g=s?a?s.offsetWidth:s.offsetHeight:h?a?y.innerWidth:y.innerHeight:a?v.offsetWidth:v.offsetHeight,p=s?a?Lo(s,s.scrollLeft):s.scrollTop:h?a?Lo(y,y.scrollX||y.document.documentElement.scrollLeft):y.scrollY||y.document.documentElement.scrollTop:a?Lo(v,v.scrollLeft):v.scrollTop;o({scrollHeight:b,scrollTop:Math.max(p,0),viewportHeight:g}),i==null||i(a?Vh("column-gap",getComputedStyle(f).columnGap,r):Vh("row-gap",getComputedStyle(f).rowGap,r)),m!==null&&e(m)},[e,t,r,i,s,o,a]);return pf(c,n,l)}function rI(e,t,n,o){const r=e.length;if(r===0)return null;const i=[];for(let s=0;s<r;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),f=t(a,n);if(f===0&&o("Zero-sized element, this should not happen",{child:a},nt.ERROR),f===c)continue;const m=i[i.length-1];i.length===0||m.size!==f||m.endIndex!==l-1?i.push({endIndex:l,size:f,startIndex:l}):i[i.length-1].endIndex++}return i}function Vh(e,t,n){return t!=="normal"&&(t==null?void 0:t.endsWith("px"))!==!0&&n(`${e} was not resolved to pixel value correctly`,t,nt.WARN),t==="normal"?0:parseInt(t??"0",10)}function ix(e,t,n){const o=te.useRef(null),r=te.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),f=c.width;let m,v;if(t){const h=t.getBoundingClientRect(),y=c.top-h.top;v=h.height-Math.max(0,y),m=y+t.scrollTop}else{const h=s.current.ownerDocument.defaultView;v=h.innerHeight-Math.max(0,c.top),m=c.top+h.scrollY}o.current={listHeight:c.height,offsetTop:m,visibleHeight:v,visibleWidth:f},e(o.current)},[e,t]),{callbackRef:i,ref:s}=pf(r,!0,n),a=te.useCallback(()=>{r(s.current)},[r,s]);return te.useEffect(()=>{var c;if(t){t.addEventListener("scroll",a);const f=new ResizeObserver(()=>{requestAnimationFrame(a)});return f.observe(t),()=>{t.removeEventListener("scroll",a),f.unobserve(t)}}const l=(c=s.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",a),l==null||l.addEventListener("resize",a),()=>{l==null||l.removeEventListener("scroll",a),l==null||l.removeEventListener("resize",a)}},[a,t,s]),i}const kt=xe(()=>{const e=ve(),t=ve(),n=W(0),o=ve(),r=W(0),i=ve(),s=ve(),a=W(0),l=W(0),c=W(0),f=W(0),m=ve(),v=ve(),h=W(!1),y=W(!1),b=W(!1);return oe(B(e,Z(({scrollTop:g})=>g)),t),oe(B(e,Z(({scrollHeight:g})=>g)),s),oe(t,r),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:f,headerHeight:a,horizontalDirection:y,scrollBy:v,scrollContainerState:e,scrollHeight:s,scrollingInProgress:h,scrollTo:m,scrollTop:t,skipAnimationFrameInResizeObserver:b,smoothScrollTargetReached:o,statefulScrollTop:r,viewportHeight:i}},[],{singleton:!0}),ys={lvl:0};function sx(e,t){const n=e.length;if(n===0)return[];let{index:o,value:r}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:o,value:r}),o=a,r=l}return i.push({end:1/0,start:o,value:r}),i}function Te(e){return e===ys}function gs(e,t){if(!Te(e))return t===e.k?e.v:t<e.k?gs(e.l,t):gs(e.r,t)}function un(e,t,n="k"){if(Te(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const o=un(e.r,t,n);return o[0]===-1/0?[e.k,e.v]:o}return un(e.l,t,n)}function It(e,t,n){return Te(e)?cx(t,n,1):t===e.k?Ze(e,{k:t,v:n}):t<e.k?Wh(Ze(e,{l:It(e.l,t,n)})):Wh(Ze(e,{r:It(e.r,t,n)}))}function Mr(){return ys}function qr(e,t,n){if(Te(e))return[];const o=un(e,t)[0];return iI(Kd(e,o,n))}function Wd(e,t){if(Te(e))return ys;const{k:n,l:o,r}=e;if(t===n){if(Te(o))return r;if(Te(r))return o;const[i,s]=lx(o);return Na(Ze(e,{k:i,l:ax(o),v:s}))}return t<n?Na(Ze(e,{l:Wd(o,t)})):Na(Ze(e,{r:Wd(r,t)}))}function Do(e){return Te(e)?[]:[...Do(e.l),{k:e.k,v:e.v},...Do(e.r)]}function Kd(e,t,n){if(Te(e))return[];const{k:o,l:r,r:i,v:s}=e;let a=[];return o>t&&(a=a.concat(Kd(r,t,n))),o>=t&&o<=n&&a.push({k:o,v:s}),o<=n&&(a=a.concat(Kd(i,t,n))),a}function Na(e){const{l:t,lvl:n,r:o}=e;if(o.lvl>=n-1&&t.lvl>=n-1)return e;if(n>o.lvl+1){if(_c(t))return dx(Ze(e,{lvl:n-1}));if(!Te(t)&&!Te(t.r))return Ze(t.r,{l:Ze(t,{r:t.r.l}),lvl:n,r:Ze(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(_c(e))return Gd(Ze(e,{lvl:n-1}));if(!Te(o)&&!Te(o.l)){const r=o.l,i=_c(r)?o.lvl-1:o.lvl;return Ze(r,{l:Ze(e,{lvl:n-1,r:r.l}),lvl:r.lvl+1,r:Gd(Ze(o,{l:r.r,lvl:i}))})}throw new Error("Unexpected empty nodes")}function Ze(e,t){return cx(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function ax(e){return Te(e.r)?e.l:Na(Ze(e,{r:ax(e.r)}))}function _c(e){return Te(e)||e.lvl>e.r.lvl}function lx(e){return Te(e.r)?[e.k,e.v]:lx(e.r)}function cx(e,t,n,o=ys,r=ys){return{k:e,l:o,lvl:n,r,v:t}}function Wh(e){return Gd(dx(e))}function dx(e){const{l:t}=e;return!Te(t)&&t.lvl===e.lvl?Ze(t,{r:Ze(e,{l:t.r})}):e}function Gd(e){const{lvl:t,r:n}=e;return!Te(n)&&!Te(n.r)&&n.lvl===t&&n.r.lvl===t?Ze(n,{l:Ze(e,{r:n.l}),lvl:t+1}):e}function iI(e){return sx(e,({k:t,v:n})=>({index:t,value:n}))}function ux(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function vs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const ff=xe(()=>({recalcInProgress:W(!1)}),[],{singleton:!0});function px(e,t,n){return e[ul(e,t,n)]}function ul(e,t,n,o=0){let r=e.length-1;for(;o<=r;){const i=Math.floor((o+r)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function sI(e,t,n,o){const r=ul(e,t,o),i=ul(e,n,o,r);return e.slice(r,i+1)}function bo(e,t){return Math.round(e.getBoundingClientRect()[t])}function Bl(e){return!Te(e.groupOffsetTree)}function mf({index:e},t){return t===e?0:t<e?-1:1}function aI(){return{groupIndices:[],groupOffsetTree:Mr(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Mr()}}function lI(e,t){let n=Te(e)?0:1/0;for(const o of t){const{endIndex:r,size:i,startIndex:s}=o;if(n=Math.min(n,s),Te(e)){e=It(e,0,i);continue}const a=qr(e,s-1,r+1);if(a.some(hI(o)))continue;let l=!1,c=!1;for(const{end:f,start:m,value:v}of a)l?(r>=m||i===v)&&(e=Wd(e,m)):(c=v!==i,l=!0),f>r&&r>=m&&v!==i&&(e=It(e,r+1,v));c&&(e=It(e,s,i))}return[e,n]}function cI(e){return typeof e.groupIndex<"u"}function dI({offset:e},t){return t===e?0:t<e?-1:1}function bs(e,t,n){if(t.length===0)return 0;const{index:o,offset:r,size:i}=px(t,e,mf),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function fx(e,t){if(!Bl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function mx(e,t,n){if(cI(e))return t.groupIndices[e.groupIndex]+1;const o=e.index==="LAST"?n:e.index;let r=fx(o,t);return r=Math.max(0,r,Math.min(n,r)),r}function uI(e,t,n,o=0){return o>0&&(t=Math.max(t,px(e,o,mf).offset)),sx(sI(e,t,n,dI),mI)}function pI(e,[t,n,o,r]){t.length>0&&o("received item sizes",t,nt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&Te(i)&&t.length===2){const v=t[0].size,h=t[1].size;s=n.reduce((y,b)=>It(It(y,b,v),b+1,h),s)}else[s,a]=lI(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:f,offsetTree:m}=Jd(e.offsetTree,a,s,r);return{groupIndices:n,groupOffsetTree:n.reduce((v,h)=>It(v,h,bs(h,m,r)),Mr()),lastIndex:l,lastOffset:c,lastSize:f,offsetTree:m,sizeTree:s}}function fI(e){return Do(e).map(({k:t,v:n},o,r)=>{const i=r[o+1];return{endIndex:i!==void 0?i.k-1:1/0,size:n,startIndex:t}})}function Kh(e,t){let n=0,o=0;for(;n<e;)n+=t[o+1]-t[o]-1,o++;return o-(n===e?0:1)}function Jd(e,t,n,o){let r=e,i=0,s=0,a=0,l=0;if(t!==0){l=ul(r,t-1,mf),a=r[l].offset;const c=un(n,t-1);i=c[0],s=c[1],r.length&&r[l].size===un(n,t)[1]&&(l-=1),r=r.slice(0,l+1)}else r=[];for(const{start:c,value:f}of qr(n,t,1/0)){const m=c-i,v=m*s+a+m*o;r.push({index:c,offset:v,size:f}),i=c,a=v,s=f}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:r}}function mI(e){return{index:e.index,value:e}}function hI(e){const{endIndex:t,size:n,startIndex:o}=e;return r=>r.start===o&&(r.end===t||r.end===1/0)&&r.value===n}const yI={offsetHeight:"height",offsetWidth:"width"},Tn=xe(([{log:e},{recalcInProgress:t}])=>{const n=ve(),o=ve(),r=yt(o,0),i=ve(),s=ve(),a=W(0),l=W([]),c=W(void 0),f=W(void 0),m=W(void 0),v=W(void 0),h=W(($,j)=>bo($,yI[j])),y=W(void 0),b=W(0),g=aI(),p=yt(B(n,he(l,e,b),Sn(pI,g),Me()),g),u=yt(B(l,Me(),Sn(($,j)=>({current:j,prev:$.current}),{current:[],prev:[]}),Z(({prev:$})=>$)),[]);oe(B(l,ae($=>$.length>0),he(p,b),Z(([$,j,A])=>{const E=$.reduce((q,z,U)=>It(q,z,bs(z,j.offsetTree,A)||U),Mr());return{...j,groupIndices:$,groupOffsetTree:E}})),p),oe(B(o,he(p),ae(([$,{lastIndex:j}])=>$<j),Z(([$,{lastIndex:j,lastSize:A}])=>[{endIndex:j,size:A,startIndex:$}])),n),oe(c,f);const x=yt(B(c,Z($=>$===void 0)),!0);oe(B(f,ae($=>$!==void 0&&Te(Le(p).sizeTree)),Z($=>{const j=Le(m),A=Le(l).length>0;return j!==void 0&&j!==0?A?[{endIndex:0,size:j,startIndex:0},{endIndex:1,size:$,startIndex:1}]:[]:[{endIndex:0,size:$,startIndex:0}]})),n),oe(B(v,ae($=>$!==void 0&&$.length>0&&Te(Le(p).sizeTree)),Z($=>{const j=[];let A=$[0],E=0;for(let q=1;q<$.length;q++){const z=$[q];z!==A&&(j.push({endIndex:q-1,size:A,startIndex:E}),A=z,E=q)}return j.push({endIndex:$.length-1,size:A,startIndex:E}),j})),n),oe(B(l,he(m,f),ae(([,$,j])=>$!==void 0&&j!==void 0),Z(([$,j,A])=>{const E=[];for(let q=0;q<$.length;q++){const z=$[q],U=$[q+1];E.push({startIndex:z,endIndex:z,size:j}),U!==void 0&&E.push({startIndex:z+1,endIndex:U-1,size:A})}return E})),n);const S=Mt(B(n,he(p),Sn(({sizes:$},[j,A])=>({changed:A!==$,sizes:A}),{changed:!1,sizes:g}),Z($=>$.changed)));$e(B(a,Sn(($,j)=>({diff:$.prev-j,prev:j}),{diff:0,prev:0}),Z($=>$.diff)),$=>{const{groupIndices:j}=Le(p);if($>0)me(t,!0),me(i,$+Kh($,j));else if($<0){const A=Le(u);A.length>0&&($-=Kh(-$,A)),me(s,$)}}),$e(B(a,he(e)),([$,j])=>{$<0&&j("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},nt.ERROR)});const T=Mt(i);oe(B(i,he(p),Z(([$,j])=>{const A=j.groupIndices.length>0,E=[],q=j.lastSize;if(A){const z=gs(j.sizeTree,0);let U=0,L=0;for(;U<$;){const G=j.groupIndices[L],Y=j.groupIndices.length===L+1?1/0:j.groupIndices[L+1]-G-1;E.push({endIndex:G,size:z,startIndex:G}),E.push({endIndex:G+1+Y-1,size:q,startIndex:G+1}),L++,U+=Y+1}const F=Do(j.sizeTree);return U!==$&&F.shift(),F.reduce((G,{k:Y,v:D})=>{let J=G.ranges;return G.prevSize!==0&&(J=[...G.ranges,{endIndex:Y+$-1,size:G.prevSize,startIndex:G.prevIndex}]),{prevIndex:Y+$,prevSize:D,ranges:J}},{prevIndex:$,prevSize:0,ranges:E}).ranges}return Do(j.sizeTree).reduce((z,{k:U,v:L})=>({prevIndex:U+$,prevSize:L,ranges:[...z.ranges,{endIndex:U+$-1,size:z.prevSize,startIndex:z.prevIndex}]}),{prevIndex:0,prevSize:q,ranges:[]}).ranges})),n);const C=Mt(B(s,he(p,b),Z(([$,{offsetTree:j},A])=>{const E=-$;return bs(E,j,A)})));return oe(B(s,he(p,b),Z(([$,j,A])=>{if(j.groupIndices.length>0){if(Te(j.sizeTree))return j;let q=Mr();const z=Le(u);let U=0,L=0,F=0;for(;U<-$;){F=z[L];const G=z[L+1]-F-1;L++,U+=G+1}if(q=Do(j.sizeTree).reduce((G,{k:Y,v:D})=>It(G,Math.max(0,Y+$),D),q),U!==-$){const G=gs(j.sizeTree,F);q=It(q,0,G);const Y=un(j.sizeTree,-$+1)[1];q=It(q,1,Y)}return{...j,sizeTree:q,...Jd(j.offsetTree,0,q,A)}}const E=Do(j.sizeTree).reduce((q,{k:z,v:U})=>It(q,Math.max(0,z+$),U),Mr());return{...j,sizeTree:E,...Jd(j.offsetTree,0,E,A)}})),p),{beforeUnshiftWith:T,data:y,defaultItemSize:f,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:m,gap:b,groupIndices:l,heightEstimates:v,itemSize:h,listRefresh:S,shiftWith:s,shiftWithOffset:C,sizeRanges:n,sizes:p,statefulTotalCount:r,totalCount:o,trackItemSizes:x,unshiftWith:i}},Ue(ko,ff),{singleton:!0});function gI(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const hx=xe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:o,scrollTop:r}])=>{const i=ve(),s=ve(),a=Mt(B(i,Z(gI)));return oe(B(a,Z(l=>l.totalCount)),n),oe(B(a,Z(l=>l.groupIndices)),e),oe(B(Qe(r,t,o),ae(([l,c])=>Bl(c)),Z(([l,c,f])=>un(c.groupOffsetTree,Math.max(l-f,0),"v")[0]),Me(),Z(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Ue(Tn,kt)),To=xe(([{log:e}])=>{const t=W(!1),n=Mt(B(t,ae(o=>o),Me()));return $e(t,o=>{o&&Le(e)("props updated",{},nt.DEBUG)}),{didMount:n,propsReady:t}},Ue(ko),{singleton:!0}),vI=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function yx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!vI)&&(t.behavior="auto"),t.offset===void 0&&(t.offset=0),t}const Ps=xe(([{gap:e,listRefresh:t,sizes:n,totalCount:o},{fixedFooterHeight:r,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:f,viewportHeight:m},{log:v}])=>{const h=ve(),y=ve(),b=W(0);let g=null,p=null,u=null;function x(){g!==null&&(g(),g=null),u!==null&&(u(),u=null),p&&(clearTimeout(p),p=null),me(l,!1)}return oe(B(h,he(n,m,o,b,a,s,v),he(e,i,r),Z(([[S,T,C,$,j,A,E,q],z,U,L])=>{const F=yx(S),{align:G,behavior:Y,offset:D}=F,J=$-1,O=mx(F,T,J);let _=bs(O,T.offsetTree,z)+A;G==="end"?(_+=U+un(T.sizeTree,O)[1]-C+L,O===J&&(_+=E)):G==="center"?_+=(U+un(T.sizeTree,O)[1]-C+L)/2:_-=j,D!==void 0&&D!==0&&(_+=D);const M=P=>{x(),P?(q("retrying to scroll to",{location:S},nt.DEBUG),me(h,S)):(me(y,!0),q("list did not change, scroll successful",{},nt.DEBUG))};if(x(),Y==="smooth"){let P=!1;u=$e(t,w=>{P=P||w}),g=cn(f,()=>{M(P)})}else g=cn(B(t,bI(150)),M);return p=setTimeout(()=>{x()},1200),me(l,!0),q("scrolling from index to",{behavior:Y,index:O,top:_},nt.DEBUG),{behavior:Y,top:_}})),c),{scrollTargetReached:y,scrollToIndex:h,topListHeight:b}},Ue(Tn,kt,ko),{singleton:!0});function bI(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return o=>{o&&(t(!0),clearTimeout(n))}}}function hf(e,t){e===0?t():requestAnimationFrame(()=>{hf(e-1,t)})}function yf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Is=xe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:o},{scrollTargetReached:r,scrollToIndex:i},{didMount:s}])=>{const a=W(!0),l=W(0),c=W(!0);return oe(B(s,he(l),ae(([f,m])=>m!==0),yn(!1)),a),oe(B(s,he(l),ae(([f,m])=>m!==0),yn(!1)),c),$e(B(Qe(t,s),he(a,n,e,c),ae(([[,f],m,{sizeTree:v},h,y])=>f&&(!Te(v)||df(h))&&!m&&!y),he(l)),([,f])=>{cn(r,()=>{me(c,!0)}),hf(4,()=>{cn(o,()=>{me(a,!0)}),me(i,f)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},Ue(Tn,kt,Ps,To),{singleton:!0});function gx(e,t){return Math.abs(e-t)<1.01}const xs="up",Bi="down",xI="none",wI={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},SI=0,Os=xe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:o,scrollTop:r,viewportHeight:i}])=>{const s=W(!1),a=W(!0),l=ve(),c=ve(),f=W(4),m=W(SI),v=yt(B(Hd(B(se(r),Qo(1),yn(!0)),B(se(r),Qo(1),yn(!1),Fh(100))),Me()),!1),h=yt(B(Hd(B(n,yn(!0)),B(n,yn(!1),Fh(200))),Me()),!1);oe(B(Qe(se(r),se(m)),Z(([u,x])=>u<=x),Me()),a),oe(B(a,On(50)),c);const y=Mt(B(Qe(o,se(i),se(t),se(e),se(f)),Sn((u,[{scrollHeight:x,scrollTop:S},T,C,$,j])=>{const A=S+T-x>-j,E={scrollHeight:x,scrollTop:S,viewportHeight:T};if(A){let z,U;return S>u.state.scrollTop?(z="SCROLLED_DOWN",U=u.state.scrollTop-S):(z="SIZE_DECREASED",U=u.state.scrollTop-S||u.scrollTopDelta),{atBottom:!0,atBottomBecause:z,scrollTopDelta:U,state:E}}let q;return E.scrollHeight>u.state.scrollHeight?q="SIZE_INCREASED":T<u.state.viewportHeight?q="VIEWPORT_HEIGHT_DECREASING":S<u.state.scrollTop?q="SCROLLING_UPWARDS":q="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:q,state:E}},wI),Me((u,x)=>u!==void 0&&u.atBottom===x.atBottom))),b=yt(B(o,Sn((u,{scrollHeight:x,scrollTop:S,viewportHeight:T})=>{if(!gx(u.scrollHeight,x)){const C=x-(S+T)<1;return u.scrollTop!==S&&C?{changed:!0,jump:u.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}return{changed:!1,jump:0,scrollHeight:x,scrollTop:S}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ae(u=>u.changed),Z(u=>u.jump)),0);oe(B(y,Z(u=>u.atBottom)),s),oe(B(s,On(50)),l);const g=W(Bi);oe(B(o,Z(({scrollTop:u})=>u),Me(),Sn((u,x)=>Le(h)?{direction:u.direction,prevScrollTop:x}:{direction:x<u.prevScrollTop?xs:Bi,prevScrollTop:x},{direction:Bi,prevScrollTop:0}),Z(u=>u.direction)),g),oe(B(o,On(50),yn(xI)),g);const p=W(0);return oe(B(v,ae(u=>!u),yn(0)),p),oe(B(r,On(100),he(v),ae(([u,x])=>x),Sn(([u,x],[S])=>[x,S],[0,0]),Z(([u,x])=>x-u)),p),{atBottomState:y,atBottomStateChange:l,atBottomThreshold:f,atTopStateChange:c,atTopThreshold:m,isAtBottom:s,isAtTop:a,isScrolling:v,lastJumpDueToItemResize:b,scrollDirection:g,scrollVelocity:p}},Ue(kt)),ws="top",Ss="bottom",Gh="none";function Jh(e,t,n){return typeof e=="number"?n===xs&&t===ws||n===Bi&&t===Ss?e:0:n===xs?t===ws?e.main:e.reverse:t===Ss?e.main:e.reverse}function Qh(e,t){return typeof e=="number"?e:e[t]??0}const gf=xe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:o,viewportHeight:r}])=>{const i=ve(),s=W(0),a=W(0),l=W(0),c=yt(B(Qe(se(o),se(r),se(n),se(i,vs),se(l),se(s),se(t),se(e),se(a)),Z(([f,m,v,[h,y],b,g,p,u,x])=>{const S=f-u,T=g+p,C=Math.max(v-S,0);let $=Gh;const j=Qh(x,ws),A=Qh(x,Ss);return h-=u,h+=v+p,y+=v+p,y-=u,h>f+T-j&&($=xs),y<f-C+m+A&&($=Bi),$!==Gh?[Math.max(S-v-Jh(b,ws,$)-j,0),S-C-p+m+Jh(b,Ss,$)+A]:null}),ae(f=>f!==null),Me(vs)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},Ue(kt),{singleton:!0});function $I(e,t,n){if(Bl(t)){const o=fx(e,t);return[{index:un(t.groupOffsetTree,o)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:o,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const jc={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ca(e,t,n,o,r,i){const{lastIndex:s,lastOffset:a,lastSize:l}=r;let c=0,f=0;if(e.length>0){c=e[0].offset;const b=e[e.length-1];f=b.offset+b.size}const m=n-s,v=a+m*l+(m-1)*o,h=c,y=v-f;return{bottom:f,firstItemIndex:i,items:Yh(e,r,i),offsetBottom:y,offsetTop:c,top:h,topItems:Yh(t,r,i),topListHeight:t.reduce((b,g)=>g.size+b,0),totalCount:n}}function vx(e,t,n,o,r,i){let s=0;if(n.groupIndices.length>0)for(const f of n.groupIndices){if(f-s>=e)break;s++}const a=e+s,l=yf(t,a),c=Array.from({length:a}).map((f,m)=>({data:i[m+l],index:m+l,offset:0,size:0}));return Ca(c,[],a,r,n,o)}function Yh(e,t,n){if(e.length===0)return[];if(!Bl(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const o=e[0].index,r=e[e.length-1].index,i=[],s=qr(t.groupOffsetTree,o,r);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let f;c.index===a.start?f={index:l,type:"group"}:f={groupIndex:l,index:c.index-(l+1)+n},i.push({...f,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function Xh(e,t){return e===void 0?0:typeof e=="number"?e:e[t]??0}const er=xe(([{data:e,firstItemIndex:t,gap:n,sizes:o,totalCount:r},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:f},{topListHeight:m},v,{didMount:h},{recalcInProgress:y}])=>{const b=W([]),g=W(0),p=ve(),u=W(0);oe(i.topItemsIndexes,b);const x=yt(B(Qe(h,y,se(l,vs),se(r),se(o),se(c),f,se(b),se(t),se(n),se(u),e),ae(([$,j,,A,,,,,,,,E])=>{const q=E!==void 0&&E.length!==A;return $&&!j&&!q}),Z(([,,[$,j],A,E,q,z,U,L,F,G,Y])=>{var X,ie;const D=E,{offsetTree:J,sizeTree:O}=D,_=Le(g);if(A===0)return{...jc,totalCount:A};if($===0&&j===0)return _===0?{...jc,totalCount:A}:vx(_,q,E,L,F,Y||[]);if(Te(O))return _>0?null:Ca($I(yf(q,A),D,Y),[],A,F,D,L);const M=[];if(U.length>0){const de=U[0],we=U[U.length-1];let ze=0;for(const Ee of qr(O,de,we)){const Se=Ee.value,_e=Math.max(Ee.start,de),Ye=Math.min(Ee.end,we);for(let Pe=_e;Pe<=Ye;Pe++)M.push({data:Y==null?void 0:Y[Pe],index:Pe,offset:ze,size:Se}),ze+=Se}}if(!z)return Ca([],M,A,F,D,L);const P=U.length>0?U[U.length-1]+1:0,w=uI(J,$,j,P);if(w.length===0)return null;const k=A-1,N=Fl([],de=>{for(const we of w){const ze=we.value;let Ee=ze.offset,Se=we.start;const _e=ze.size;if(ze.offset<$){Se+=Math.floor(($-ze.offset+F)/(_e+F));const Pe=Se-we.start;Ee+=Pe*_e+Pe*F}Se<P&&(Ee+=(P-Se)*_e,Se=P);const Ye=Math.min(we.end,k);for(let Pe=Se;Pe<=Ye&&!(Ee>=j);Pe++)de.push({data:Y==null?void 0:Y[Pe],index:Pe,offset:Ee,size:_e}),Ee+=_e+F}}),H=Xh(G,ws),R=Xh(G,Ss);if(N.length>0&&(H>0||R>0)){const de=N[0],we=N[N.length-1];if(H>0&&de.index>P){const ze=Math.min(H,de.index-P),Ee=[];let Se=de.offset;for(let _e=de.index-1;_e>=de.index-ze;_e--){const Ye=((X=qr(O,_e,_e)[0])==null?void 0:X.value)??de.size;Se-=Ye+F,Ee.unshift({data:Y==null?void 0:Y[_e],index:_e,offset:Se,size:Ye})}N.unshift(...Ee)}if(R>0&&we.index<k){const ze=Math.min(R,k-we.index);let Ee=we.offset+we.size+F;for(let Se=we.index+1;Se<=we.index+ze;Se++){const _e=((ie=qr(O,Se,Se)[0])==null?void 0:ie.value)??we.size;N.push({data:Y==null?void 0:Y[Se],index:Se,offset:Ee,size:_e}),Ee+=_e+F}}}return Ca(N,M,A,F,D,L)}),ae($=>$!==null),Me()),jc);oe(B(e,ae(df),Z($=>$==null?void 0:$.length)),r),oe(B(x,Z($=>$.topListHeight)),m),oe(m,a),oe(B(x,Z($=>[$.top,$.bottom])),s),oe(B(x,Z($=>$.items)),p);const S=Mt(B(x,ae(({items:$})=>$.length>0),he(r,e),ae(([{items:$},j])=>$[$.length-1].originalIndex===j-1),Z(([,$,j])=>[$-1,j]),Me(vs),Z(([$])=>$))),T=Mt(B(x,On(200),ae(({items:$,topItems:j})=>$.length>0&&$[0].originalIndex===j.length),Z(({items:$})=>$[0].index),Me())),C=Mt(B(x,ae(({items:$})=>$.length>0),Z(({items:$})=>{let j=0,A=$.length-1;for(;$[j].type==="group"&&j<A;)j++;for(;$[A].type==="group"&&A>j;)A--;return{endIndex:$[A].index,startIndex:$[j].index}}),Me(ux)));return{endReached:S,initialItemCount:g,itemsRendered:p,listState:x,minOverscanItemCount:u,rangeChanged:C,startReached:T,topItemsIndexes:b,...v}},Ue(Tn,hx,gf,Is,Ps,Os,To,ff),{singleton:!0}),bx=xe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:o},{listState:r}])=>{const i=ve(),s=yt(B(Qe(n,e,o,t,r),Z(([a,l,c,f,m])=>a+l+c+f+m.offsetBottom+m.bottom)),0);return oe(se(s),i),{totalListHeight:s,totalListHeightChanged:i}},Ue(kt,er),{singleton:!0}),kI=xe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=W(!1),o=yt(B(Qe(n,e,t),ae(([r])=>r),Z(([,r,i])=>Math.max(0,r-i)),On(0),Me()),0);return{alignToBottom:n,paddingTopAddition:o}},Ue(kt,bx),{singleton:!0}),xx=xe(()=>({context:W(null)})),TI=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:o,...r},viewportBottom:i,viewportTop:s})=>t<s?{...r,align:n??"start",...o!==void 0?{behavior:o}:{}}:e>i?{...r,align:n??"end",...o!==void 0?{behavior:o}:{}}:null,wx=xe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:o,fixedHeaderHeight:r,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const f=ve();return oe(B(f,he(t,l,n,i,r,o,a),he(e),Z(([[m,v,h,y,b,g,p,u],x])=>{const{calculateViewLocation:S=TI,done:T,...C}=m,$=mx(m,v,y-1),j=bs($,v.offsetTree,x)+b+g,A=j+un(v.sizeTree,$)[1],E=u+g,q=u+h-p,z=S({itemBottom:A,itemTop:j,locationParams:C,viewportBottom:q,viewportTop:E});return z!==null?T&&cn(B(s,ae(U=>!U),Qo(Le(s)?1:2)),T):T==null||T(),z}),ae(m=>m!==null)),c),{scrollIntoView:f}},Ue(Tn,kt,Ps,er,ko),{singleton:!0});function Zh(e){return e===!1?!1:e==="smooth"?"smooth":"auto"}const _I=(e,t)=>typeof e=="function"?Zh(e(t)):t&&Zh(e),jI=xe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:o},{atBottomState:r,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:f},{scrollingInProgress:m},{context:v},{scrollIntoView:h}])=>{const y=W(!1),b=ve();let g=null;function p(T){me(s,{align:"end",behavior:T,index:"LAST"})}$e(B(Qe(B(se(t),Qo(1)),l),he(se(y),i,a,m),Z(([[T,C],$,j,A,E])=>{let q=C&&A,z="auto";return q&&(z=_I($,j||E),q=q&&z!==!1),{followOutputBehavior:z,shouldFollow:q,totalCount:T}}),ae(({shouldFollow:T})=>T)),({followOutputBehavior:T,totalCount:C})=>{g!==null&&(g(),g=null),Le(n)!==void 0?requestAnimationFrame(()=>{Le(f)("following output to ",{totalCount:C},nt.DEBUG),p(T)}):g=cn(e,()=>{Le(f)("following output to ",{totalCount:C},nt.DEBUG),p(T),g=null})});function u(T){const C=cn(r,$=>{T&&!$.atBottom&&$.notAtBottomBecause==="SIZE_INCREASED"&&g===null&&(Le(f)("scrolling to bottom due to increased size",{},nt.DEBUG),p("auto"))});setTimeout(C,100)}$e(B(Qe(se(y),t,c),ae(([T,,C])=>T!==!1&&C),Sn(({value:T},[,C])=>({refreshed:T===C,value:C}),{refreshed:!1,value:0}),ae(({refreshed:T})=>T),he(y,t)),([,T])=>{Le(a)&&u(T!==!1)}),$e(b,()=>{u(Le(y)!==!1)}),$e(Qe(se(y),r),([T,C])=>{T!==!1&&!C.atBottom&&C.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&p("auto")});const x=W(null),S=ve();return oe(Hd(B(se(o),Z(T=>(T==null?void 0:T.length)??0)),B(se(t))),S),$e(B(Qe(B(S,Qo(1)),l),he(se(x),a,m,v),Z(([[T,C],$,j,A,E])=>C&&j&&($==null?void 0:$({context:E,totalCount:T,scrollingInProgress:A}))),ae(T=>!!T),On(0)),T=>{g!==null&&(g(),g=null),Le(n)!==void 0?requestAnimationFrame(()=>{Le(f)("scrolling into view",{}),me(h,T)}):g=cn(e,()=>{Le(f)("scrolling into view",{}),me(h,T),g=null})}),{autoscrollToBottom:b,followOutput:y,scrollIntoViewOnChange:x}},Ue(Tn,Os,Ps,Is,To,ko,kt,xx,wx)),NI=xe(([{data:e,firstItemIndex:t,gap:n,sizes:o},{initialTopMostItemIndex:r},{initialItemCount:i,listState:s},{didMount:a}])=>(oe(B(a,he(i),ae(([,l])=>l!==0),he(r,o,t,n,e),Z(([[,l],c,f,m,v,h=[]])=>vx(l,c,f,m,v,h))),s),{}),Ue(Tn,Is,er,To),{singleton:!0}),CI=xe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const o=W(0);return $e(B(e,he(o),ae(([,r])=>r!==0),Z(([,r])=>({top:r}))),r=>{cn(B(n,Qo(1),ae(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{me(t,r)})})}),{initialScrollTop:o}},Ue(To,kt,er),{singleton:!0}),Sx=xe(([{scrollVelocity:e}])=>{const t=W(!1),n=ve(),o=W(!1);return oe(B(e,he(o,t,n),ae(([r,i])=>i!==!1&&i!==void 0),Z(([r,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(r,a))return!1}else if(l(r,a))return!0;return s}),Me()),t),$e(B(Qe(t,e,n),he(o)),([[r,i,s],a])=>{r&&a!==!1&&a!==void 0&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:o,scrollSeekRangeChanged:n,scrollVelocity:e}},Ue(Os),{singleton:!0}),vf=xe(([{scrollContainerState:e,scrollTo:t}])=>{const n=ve(),o=ve(),r=ve(),i=W(!1),s=W(void 0);return oe(B(Qe(n,o),Z(([{scrollTop:a,viewportHeight:l},{offsetTop:c,listHeight:f}])=>({scrollHeight:f,scrollTop:Math.max(0,a-c),viewportHeight:l}))),e),oe(B(t,he(o),Z(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),r),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:r,windowViewportRect:o}},Ue(kt)),EI=xe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:o},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ve(),f=W(void 0),m=W(null),v=W(null);return oe(a,m),oe(l,v),$e(B(c,he(t,o,s,m,v,n)),([h,y,b,g,p,u,x])=>{const S=fI(y.sizeTree);g&&p!==null&&u!==null&&(b=p.scrollTop-u.offsetTop),b-=x,h({ranges:S,scrollTop:b})}),oe(B(f,ae(df),Z(PI)),r),oe(B(i,he(f),ae(([,h])=>h!==void 0),Me(),Z(([,h])=>h.ranges)),e),{getState:c,restoreStateFrom:f}},Ue(Tn,kt,Is,To,vf));function PI(e){return{align:"start",index:0,offset:e.scrollTop}}const II=xe(([{topItemsIndexes:e}])=>{const t=W(0);return oe(B(t,ae(n=>n>=0),Z(n=>Array.from({length:n}).map((o,r)=>r))),e),{topItemCount:t}},Ue(er));function $x(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const OI=$x(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),RI=xe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:o},{isAtBottom:r,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:f,shiftWithOffset:m,sizes:v},{log:h},{recalcInProgress:y}])=>{const b=Mt(B(l,he(s),Sn(([,p,u,x],[{bottom:S,items:T,offsetBottom:C,totalCount:$},j])=>{const A=S+C;let E=0;return u===$&&p.length>0&&T.length>0&&(T[0].originalIndex===0&&p[0].originalIndex===0||(E=A-x,E!==0&&(E+=j))),[E,T,$,A]},[0,[],0,0]),ae(([p])=>p!==0),he(o,a,n,r,h,y),ae(([,p,u,x,,,S])=>!S&&!x&&p!==0&&u===xs),Z(([[p],,,,,u])=>(u("Upward scrolling compensation",{amount:p},nt.DEBUG),p))));function g(p){p>0?(me(t,{behavior:"auto",top:-p}),me(e,0)):(me(e,0),me(t,{behavior:"auto",top:-p}))}return $e(B(b,he(e,i)),([p,u,x])=>{x&&OI()?me(e,u-p):g(-p)}),$e(B(Qe(yt(i,!1),e,y),ae(([p,u,x])=>!p&&!x&&u!==0),Z(([p,u])=>u),On(1)),g),oe(B(m,Z(p=>({top:-p}))),t),$e(B(c,he(v,f),Z(([p,{groupIndices:u,lastSize:x,sizeTree:S},T])=>{function C(q){return q*(x+T)}if(u.length===0)return C(p);let $=0;const j=gs(S,0);let A=0,E=0;for(;A<p;){A++,$+=j;let q=u.length===E+1?1/0:u[E+1]-u[E]-1;A+q>p&&($-=j,q=p-A+1),A+=q,$+=C(q),E++}return $})),p=>{me(e,p),requestAnimationFrame(()=>{me(t,{top:p}),requestAnimationFrame(()=>{me(e,0),me(y,!1)})})}),{deviation:e}},Ue(kt,Os,er,Tn,ko,ff)),AI=xe(([e,t,n,o,r,i,s,a,l,c,f])=>({...e,...t,...n,...o,...r,...i,...s,...a,...l,...c,...f}),Ue(gf,NI,To,Sx,bx,CI,kI,vf,wx,ko,xx)),kx=xe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:o,fixedGroupSize:r,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:f,statefulTotalCount:m,totalCount:v,trackItemSizes:h},{initialItemFinalLocationReached:y,initialTopMostItemIndex:b,scrolledToInitialItem:g},p,u,x,S,{scrollToIndex:T},C,{topItemCount:$},{groupCounts:j},A])=>{const{listState:E,minOverscanItemCount:q,topItemsIndexes:z,rangeChanged:U,...L}=S;return oe(U,A.scrollSeekRangeChanged),oe(B(A.windowViewportRect,Z(F=>F.visibleHeight)),p.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:o,fixedGroupHeight:r,gap:i,groupCounts:j,heightEstimates:a,initialItemFinalLocationReached:y,initialTopMostItemIndex:b,scrolledToInitialItem:g,sizeRanges:c,topItemCount:$,topItemsIndexes:z,totalCount:v,...x,groupIndices:s,itemSize:l,listState:E,minOverscanItemCount:q,scrollToIndex:T,statefulTotalCount:m,trackItemSizes:h,rangeChanged:U,...L,...A,...p,sizes:f,...u}},Ue(Tn,Is,kt,EI,jI,er,Ps,RI,II,hx,AI));function MI(e,t){const n={},o={};let r=0;const i=e.length;for(;r<i;)o[e[r]]=1,r+=1;for(const s in t)Object.hasOwn(o,s)||(n[s]=t[s]);return n}const ra=typeof document<"u"?te.useLayoutEffect:te.useEffect;function Tx(e,t,n){const o=Object.keys(t.required||{}),r=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=te.createContext({});function l(g,p){g.propsReady!==void 0&&me(g.propsReady,!1);for(const u of o){const x=g[t.required[u]];me(x,p[u])}for(const u of r)if(u in p){const x=g[t.optional[u]];me(x,p[u])}g.propsReady!==void 0&&me(g.propsReady,!0)}function c(g){return i.reduce((p,u)=>(p[u]=x=>{const S=g[t.methods[u]];me(S,x)},p),{})}function f(g){return s.reduce((p,u)=>(p[u]=YP(g[t.events[u]]),p),{})}const m=te.forwardRef(function(g,p){const{children:u,...x}=g,[S]=te.useState(()=>Fl(ZP(e),$=>{l($,x)})),[T]=te.useState(zh(f,S));ra(()=>{for(const $ of s)$ in x&&$e(T[$],x[$]);return()=>{Object.values(T).map(uf)}},[x,T,S]),ra(()=>{l(S,x)}),te.useImperativeHandle(p,Dh(c(S)));const C=n;return d.jsx(a.Provider,{value:S,children:n!==void 0?d.jsx(C,{...MI([...o,...r,...s],x),children:u}):u})}),v=g=>{const p=te.useContext(a);return te.useCallback(u=>{me(p[g],u)},[p,g])},h=g=>{const p=te.useContext(a)[g],u=te.useCallback(x=>$e(p,x),[p]);return te.useSyncExternalStore(u,()=>Le(p),()=>Le(p))},y=g=>{const p=te.useContext(a)[g],[u,x]=te.useState(zh(Le,p));return ra(()=>$e(p,S=>{S!==u&&x(Dh(S))}),[p,u]),u},b=parseInt(te.version)>=18?h:y;return{Component:m,useEmitter:(g,p)=>{const u=te.useContext(a)[g];ra(()=>$e(u,p),[p,u])},useEmitterValue:b,usePublisher:v}}const _x=te.createContext(void 0),jx=te.createContext(void 0),Nc="-webkit-sticky",ey="sticky",bf=$x(()=>{if(typeof document>"u")return ey;const e=document.createElement("div");return e.style.position=Nc,e.style.position===Nc?Nc:ey}),Nx=typeof document<"u"?te.useLayoutEffect:te.useEffect;function Cc(e){return"self"in e}function qI(e){return"body"in e}function Cx(e,t,n,o=ri,r,i){const s=te.useRef(null),a=te.useRef(null),l=te.useRef(null),c=te.useCallback(v=>{let h,y,b;const g=v.target;if(qI(g)||Cc(g)){const u=Cc(g)?g:g.defaultView;b=i===!0?Lo(u,u.scrollX):u.scrollY,h=i===!0?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight,y=i===!0?u.innerWidth:u.innerHeight}else b=i===!0?Lo(g,g.scrollLeft):g.scrollTop,h=i===!0?g.scrollWidth:g.scrollHeight,y=i===!0?g.offsetWidth:g.offsetHeight;const p=()=>{e({scrollHeight:h,scrollTop:Math.max(b,0),viewportHeight:y})};v.suppressFlushSync===!0?p():cS.flushSync(p),a.current!==null&&(b===a.current||b<=0||b===h-y)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);te.useEffect(()=>{const v=r||s.current;return Bh(v),o(r||s.current),c({suppressFlushSync:!0,target:v}),v.addEventListener("scroll",c,{passive:!0}),()=>{Bh(v),o(null),v.removeEventListener("scroll",c)}},[s,c,n,o,r]);function f(v){const h=s.current;if(!h||(i===!0?"offsetWidth"in h&&h.offsetWidth===0:"offsetHeight"in h&&h.offsetHeight===0))return;const y=v.behavior==="smooth";let b,g,p;Cc(h)?(g=Math.max(bo(h.document.documentElement,i===!0?"width":"height"),i===!0?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight),b=i===!0?h.innerWidth:h.innerHeight,p=i===!0?Lo(h,h.scrollX):h.scrollY):(g=h[i===!0?"scrollWidth":"scrollHeight"],b=bo(h,i===!0?"width":"height"),p=i===!0?Lo(h,h.scrollLeft):h.scrollTop);const u=g-b;if(v.top===void 0){h.scrollTo(v);return}const x=Math.ceil(Math.max(Math.min(u,v.top),0));if(v.top=x,gx(b,g)||x===p){e({scrollHeight:g,scrollTop:p,viewportHeight:b}),y&&t(!0);return}y?(a.current=x,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i===!0&&(v={...v.behavior!==void 0?{behavior:v.behavior}:{},left:Hh(h,x)}),h.scrollTo(v)}function m(v){i===!0&&(v={...v.behavior!==void 0?{behavior:v.behavior}:{},...v.top!==void 0?{left:Hh(s.current,v.top)}:{}}),s.current.scrollBy(v)}return{scrollByCallback:m,scrollerRef:s,scrollToCallback:f}}function xf(e){return e}const UI=xe(()=>{const e=W(a=>`Item ${a}`),t=W(a=>`Group ${a}`),n=W({}),o=W(xf),r=W("div"),i=W(ri),s=(a,l=null)=>yt(B(n,Z(c=>c[a]),Me()),l);return{components:n,computeItemKey:o,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:r,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),LI=xe(([e,t])=>({...e,...t}),Ue(kx,UI)),DI=({height:e})=>d.jsx("div",{style:{height:e}}),zI={overflowAnchor:"none",position:bf(),zIndex:1},Ex={overflowAnchor:"none"},FI={...Ex,display:"inline-block",height:"100%"},ty=te.memo(function({showTopList:e=!1}){const t=ce("listState"),n=Wt("sizeRanges"),o=ce("useWindowScroll"),r=ce("customScrollParent"),i=Wt("windowScrollContainerState"),s=Wt("scrollContainerState"),a=r||o?i:s,l=ce("itemContent"),c=ce("context"),f=ce("groupContent"),m=ce("trackItemSizes"),v=ce("itemSize"),h=ce("log"),y=Wt("gap"),b=ce("horizontalDirection"),{callbackRef:g}=oI(n,v,m,e?ri:a,h,y,r,b,ce("skipAnimationFrameInResizeObserver")),[p,u]=te.useState(0);Sf("deviation",L=>{p!==L&&u(L)});const x=ce("EmptyPlaceholder"),S=ce("ScrollSeekPlaceholder")??DI,T=ce("ListComponent"),C=ce("ItemComponent"),$=ce("GroupComponent"),j=ce("computeItemKey"),A=ce("isSeeking"),E=ce("groupIndices").length>0,q=ce("alignToBottom"),z=ce("initialItemFinalLocationReached"),U=e?{}:{boxSizing:"border-box",...b?{display:"inline-block",height:"100%",marginInlineStart:p!==0?p:q?"auto":0,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:"nowrap"}:{marginTop:p!==0?p:q?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...z?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x!==null&&x!==void 0?d.jsx(x,{...ht(x,c)}):d.jsx(T,{...ht(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:U,children:(e?t.topItems:t.items).map(L=>{const F=L.originalIndex,G=j(F+t.firstItemIndex,L.data,c);return A?I.createElement(S,{...ht(S,c),height:L.size,index:L.index,key:G,type:L.type||"item",...L.type==="group"?{}:{groupIndex:L.groupIndex}}):L.type==="group"?I.createElement($,{...ht($,c),"data-index":F,"data-item-index":L.index,"data-known-size":L.size,key:G,style:zI},f(L.index,c)):I.createElement(C,{...ht(C,c),...WI(C,L.data),"data-index":F,"data-item-group-index":L.groupIndex,"data-item-index":L.index,"data-known-size":L.size,key:G,style:b?FI:Ex},E?l(L.index,L.groupIndex,L.data,c):l(L.index,L.data,c))})})}),BI={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},HI={outline:"none",overflowX:"auto",position:"relative"},wf=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),Px=(e,t,n=0)=>({...wf(e),position:t?"relative":"absolute",top:t?-n:0}),VI={position:bf(),top:0,width:"100%",zIndex:1};function ht(e,t){if(typeof e!="string")return{context:t}}function WI(e,t){return{item:typeof e=="string"?void 0:t}}const KI=te.memo(function(){const e=ce("HeaderComponent"),t=Wt("headerHeight"),n=ce("HeaderFooterTag"),o=Zo(te.useMemo(()=>i=>{t(bo(i,"height"))},[t]),!0,ce("skipAnimationFrameInResizeObserver")),r=ce("context");return e!=null?d.jsx(n,{ref:o,children:d.jsx(e,{...ht(e,r)})}):null}),GI=te.memo(function(){const e=ce("FooterComponent"),t=Wt("footerHeight"),n=ce("HeaderFooterTag"),o=Zo(te.useMemo(()=>i=>{t(bo(i,"height"))},[t]),!0,ce("skipAnimationFrameInResizeObserver")),r=ce("context");return e!=null?d.jsx(n,{ref:o,children:d.jsx(e,{...ht(e,r)})}):null});function Ix({useEmitter:e,useEmitterValue:t,usePublisher:n}){return te.memo(function({children:o,style:r,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),f=t("scrollerRef"),m=t("horizontalDirection")||!1,{scrollByCallback:v,scrollerRef:h,scrollToCallback:y}=Cx(a,c,l,f,void 0,m);return e("scrollTo",y),e("scrollBy",v),d.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:h,style:{...m?HI:BI,...r},tabIndex:0,...s,...ht(l,i),children:o})})}function Ox({useEmitter:e,useEmitterValue:t,usePublisher:n}){return te.memo(function({children:o,style:r,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),f=t("totalListHeight"),m=t("deviation"),v=t("customScrollParent"),h=te.useRef(null),y=t("scrollerRef"),{scrollByCallback:b,scrollerRef:g,scrollToCallback:p}=Cx(a,c,l,y,v);return Nx(()=>{var u;return g.current=v||((u=h.current)==null?void 0:u.ownerDocument.defaultView),()=>{g.current=null}},[g,v]),e("windowScrollTo",p),e("scrollBy",b),d.jsx(l,{ref:h,"data-virtuoso-scroller":!0,style:{position:"relative",...r,...f!==0?{height:f+m}:void 0},...s,...ht(l,i),children:o})})}const JI=({children:e})=>{const t=te.useContext(_x),n=Wt("viewportHeight"),o=Wt("fixedItemHeight"),r=ce("alignToBottom"),i=ce("horizontalDirection"),s=te.useMemo(()=>tx(n,l=>bo(l,i?"width":"height")),[n,i]),a=Zo(s,!0,ce("skipAnimationFrameInResizeObserver"));return te.useEffect(()=>{t&&(n(t.viewportHeight),o(t.itemHeight))},[t,n,o]),d.jsx("div",{"data-viewport-type":"element",ref:a,style:wf(r),children:e})},QI=({children:e})=>{const t=te.useContext(_x),n=Wt("windowViewportRect"),o=Wt("fixedItemHeight"),r=ce("customScrollParent"),i=ce("useWindowScroll"),s=ce("topListHeight"),a=ix(n,r,ce("skipAnimationFrameInResizeObserver")),l=ce("alignToBottom");return te.useEffect(()=>{t&&(o(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,o]),d.jsx("div",{"data-viewport-type":"window",ref:a,style:Px(l,i,s),children:e})},YI=({children:e})=>{const t=ce("TopItemListComponent")??"div",n=ce("headerHeight"),o={...VI,marginTop:`${n}px`},r=ce("context");return d.jsx(t,{style:o,...ht(t,r),children:e})},XI=te.memo(function(e){const t=ce("useWindowScroll"),n=ce("topItemsIndexes").length>0,o=ce("customScrollParent"),r=ce("context");return d.jsxs(o||t?tO:eO,{...e,context:r,children:[n&&d.jsx(YI,{children:d.jsx(ty,{showTopList:!0})}),d.jsxs(o||t?QI:JI,{children:[d.jsx(KI,{}),d.jsx(ty,{}),d.jsx(GI,{})]})]})}),{Component:ZI,useEmitter:Sf,useEmitterValue:ce,usePublisher:Wt}=Tx(LI,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},XI),eO=Ix({useEmitter:Sf,useEmitterValue:ce,usePublisher:Wt}),tO=Ox({useEmitter:Sf,useEmitterValue:ce,usePublisher:Wt}),nO=ZI,oO=xe(()=>{const e=W(c=>d.jsxs("td",{children:["Item $",c]})),t=W(null),n=W(c=>d.jsxs("td",{colSpan:1e3,children:["Group ",c]})),o=W(null),r=W(null),i=W({}),s=W(xf),a=W(ri),l=(c,f=null)=>yt(B(i,Z(m=>m[c]),Me()),f);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:r,fixedHeaderContent:o,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}});Ue(kx,oO);bf();const ny={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},rO={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:oy,floor:pl,max:Hi,min:Ec,round:ry}=Math;function iy(e,t,n){return Array.from({length:t-e+1}).map((o,r)=>({data:n===null?null:n[r+e],index:r+e}))}function iO(e){return{...rO,items:e}}function ia(e,t){return e!==void 0&&e.width===t.width&&e.height===t.height}function sO(e,t){return e!==void 0&&e.column===t.column&&e.row===t.row}const aO=xe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:o},{footerHeight:r,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:f,viewportHeight:m},v,h,{didMount:y,propsReady:b},{customScrollParent:g,useWindowScroll:p,windowScrollContainerState:u,windowScrollTo:x,windowViewportRect:S},T])=>{const C=W(0),$=W(0),j=W(ny),A=W({height:0,width:0}),E=W({height:0,width:0}),q=ve(),z=ve(),U=W(0),L=W(null),F=W({column:0,row:0}),G=ve(),Y=ve(),D=W(!1),J=W(0),O=W(!0),_=W(!1),M=W(!1);$e(B(y,he(J),ae(([R,X])=>X!==0)),()=>{me(O,!1)}),$e(B(Qe(y,O,E,A,J,_),ae(([R,X,ie,de,,we])=>R&&!X&&ie.height!==0&&de.height!==0&&!we)),([,,,,R])=>{me(_,!0),hf(1,()=>{me(q,R)}),cn(B(c),()=>{me(t,[0,0]),me(O,!0)})}),oe(B(Y,ae(R=>R!=null&&R.scrollTop>0),yn(0)),$),$e(B(y,he(Y),ae(([,R])=>R!=null)),([,R])=>{R&&(me(A,R.viewport),me(E,R.item),me(F,R.gap),R.scrollTop>0&&(me(D,!0),cn(B(c,Qo(1)),X=>{me(D,!1)}),me(l,{top:R.scrollTop})))}),oe(B(A,Z(({height:R})=>R)),m),oe(B(Qe(se(A,ia),se(E,ia),se(F,(R,X)=>R!==void 0&&R.column===X.column&&R.row===X.row),se(c)),Z(([R,X,ie,de])=>({gap:ie,item:X,scrollTop:de,viewport:R}))),G),oe(B(Qe(se(C),o,se(F,sO),se(E,ia),se(A,ia),se(L),se($),se(D),se(O),se(J)),ae(([,,,,,,,R])=>!R),Z(([R,[X,ie],de,we,ze,Ee,Se,,_e,Ye])=>{const{column:Pe,row:_n}=de,{height:Bn,width:_o}=we,{width:tr}=ze;if(Se===0&&(R===0||tr===0))return ny;if(_o===0){const $f=yf(Ye,R),qx=$f+Math.max(Se-1,0);return iO(iy($f,qx,Ee))}const Hn=Rx(tr,_o,Pe);let pn,Yt;_e?X===0&&ie===0&&Se>0?(pn=0,Yt=Se-1):(pn=Hn*pl((X+_n)/(Bn+_n)),Yt=Hn*oy((ie+_n)/(Bn+_n))-1,Yt=Ec(R-1,Hi(Yt,Hn-1)),pn=Ec(Yt,Hi(0,pn))):(pn=0,Yt=-1);const Vn=iy(pn,Yt,Ee),{bottom:nr,top:ii}=sy(ze,de,we,Vn),si=oy(R/Hn),Hl=si*Bn+(si-1)*_n-nr;return{bottom:nr,itemHeight:Bn,items:Vn,itemWidth:_o,offsetBottom:Hl,offsetTop:ii,top:ii}})),j),oe(B(L,ae(R=>R!==null),Z(R=>R.length)),C),oe(B(Qe(A,E,j,F),ae(([R,X,{items:ie}])=>ie.length>0&&X.height!==0&&R.height!==0),Z(([R,X,{items:ie},de])=>{const{bottom:we,top:ze}=sy(R,de,X,ie);return[ze,we]}),Me(vs)),t);const P=W(!1);oe(B(c,he(P),Z(([R,X])=>X||R!==0)),P);const w=Mt(B(Qe(j,C),ae(([{items:R}])=>R.length>0),he(P),ae(([[R,X],ie])=>{const de=R.items[R.items.length-1].index===X-1;return(ie||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===X)&&de}),Z(([[,R]])=>R-1),Me())),k=Mt(B(se(j),ae(({items:R})=>R.length>0&&R[0].index===0),yn(0),Me())),N=Mt(B(se(j),he(D),ae(([{items:R},X])=>R.length>0&&!X),Z(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),Me(ux),On(0)));oe(N,h.scrollSeekRangeChanged),oe(B(q,he(A,E,C,F),Z(([R,X,ie,de,we])=>{const ze=yx(R),{align:Ee,behavior:Se,offset:_e}=ze;let Ye=ze.index;Ye==="LAST"&&(Ye=de-1),Ye=Hi(0,Ye,Ec(de-1,Ye));let Pe=Qd(X,we,ie,Ye);return Ee==="end"?Pe=ry(Pe-X.height+ie.height):Ee==="center"&&(Pe=ry(Pe-X.height/2+ie.height/2)),_e!==void 0&&_e!==0&&(Pe+=_e),{behavior:Se,top:Pe}})),l);const H=yt(B(j,Z(R=>R.offsetBottom+R.bottom)),0);return oe(B(S,Z(R=>({height:R.visibleHeight,width:R.visibleWidth}))),A),{customScrollParent:g,data:L,deviation:U,footerHeight:r,gap:F,headerHeight:i,increaseViewportBy:e,initialItemCount:$,itemDimensions:E,overscan:n,restoreStateFrom:Y,scrollBy:s,scrollContainerState:a,scrollHeight:z,scrollTo:l,scrollToIndex:q,scrollTop:c,smoothScrollTargetReached:f,totalCount:C,useWindowScroll:p,viewportDimensions:A,windowScrollContainerState:u,windowScrollTo:x,windowViewportRect:S,...h,gridState:j,horizontalDirection:M,initialTopMostItemIndex:J,totalListHeight:H,...v,endReached:w,propsReady:b,rangeChanged:N,startReached:k,stateChanged:G,stateRestoreInProgress:D,...T}},Ue(gf,kt,Os,Sx,To,vf,ko));function Rx(e,t,n){return Hi(1,pl((e+n)/(pl(t)+n)))}function sy(e,t,n,o){const{height:r}=n;if(r===void 0||o.length===0)return{bottom:0,top:0};const i=Qd(e,t,n,o[0].index);return{bottom:Qd(e,t,n,o[o.length-1].index)+r,top:i}}function Qd(e,t,n,o){const r=Rx(e.width,n.width,t.column),i=pl(o/r),s=i*n.height+Hi(0,i-1)*t.row;return s>0?s+t.row:s}const lO=xe(()=>{const e=W(m=>`Item ${m}`),t=W({}),n=W(null),o=W("virtuoso-grid-item"),r=W("virtuoso-grid-list"),i=W(xf),s=W("div"),a=W(ri),l=(m,v=null)=>yt(B(t,Z(h=>h[m]),Me()),v),c=W(!1),f=W(!1);return oe(se(f),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:o,ItemComponent:l("Item","div"),itemContent:e,listClassName:r,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:f,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),cO=xe(([e,t])=>({...e,...t}),Ue(aO,lO)),dO=te.memo(function(){const e=Re("gridState"),t=Re("listClassName"),n=Re("itemClassName"),o=Re("itemContent"),r=Re("computeItemKey"),i=Re("isSeeking"),s=Kt("scrollHeight"),a=Re("ItemComponent"),l=Re("ListComponent"),c=Re("ScrollSeekPlaceholder"),f=Re("context"),m=Kt("itemDimensions"),v=Kt("gap"),h=Re("log"),y=Re("stateRestoreInProgress"),b=Kt("reportReadyState"),g=Zo(te.useMemo(()=>p=>{const u=p.parentElement.parentElement.scrollHeight;s(u);const x=p.firstChild;if(x!==null){const{height:S,width:T}=x.getBoundingClientRect();m({height:S,width:T})}v({column:ay("column-gap",getComputedStyle(p).columnGap,h),row:ay("row-gap",getComputedStyle(p).rowGap,h)})},[s,m,v,h]),!0,!1);return Nx(()=>{e.itemHeight>0&&e.itemWidth>0&&b(!0)},[e]),y?null:d.jsx(l,{className:t,ref:g,...ht(l,f),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(p=>{const u=r(p.index,p.data,f);return i?d.jsx(c,{...ht(c,f),height:e.itemHeight,index:p.index,width:e.itemWidth},u):I.createElement(a,{...ht(a,f),className:n,"data-index":p.index,key:u},o(p.index,p.data,f))})})}),uO=te.memo(function(){const e=Re("HeaderComponent"),t=Kt("headerHeight"),n=Re("headerFooterTag"),o=Zo(te.useMemo(()=>i=>{t(bo(i,"height"))},[t]),!0,!1),r=Re("context");return e!=null?d.jsx(n,{ref:o,children:d.jsx(e,{...ht(e,r)})}):null}),pO=te.memo(function(){const e=Re("FooterComponent"),t=Kt("footerHeight"),n=Re("headerFooterTag"),o=Zo(te.useMemo(()=>i=>{t(bo(i,"height"))},[t]),!0,!1),r=Re("context");return e!=null?d.jsx(n,{ref:o,children:d.jsx(e,{...ht(e,r)})}):null}),fO=({children:e})=>{const t=te.useContext(jx),n=Kt("itemDimensions"),o=Kt("viewportDimensions"),r=Zo(te.useMemo(()=>i=>{o(i.getBoundingClientRect())},[o]),!0,!1);return te.useEffect(()=>{t&&(o({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,o,n]),d.jsx("div",{ref:r,style:wf(!1),children:e})},mO=({children:e})=>{const t=te.useContext(jx),n=Kt("windowViewportRect"),o=Kt("itemDimensions"),r=Re("customScrollParent"),i=Re("useWindowScroll"),s=ix(n,r,!1);return te.useEffect(()=>{t&&(o({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,o]),d.jsx("div",{ref:s,style:Px(!1,i),children:e})},hO=te.memo(function({...e}){const t=Re("useWindowScroll"),n=Re("customScrollParent"),o=n||t?gO:yO,r=n||t?mO:fO,i=Re("context");return d.jsx(o,{...e,...ht(o,i),children:d.jsxs(r,{children:[d.jsx(uO,{}),d.jsx(dO,{}),d.jsx(pO,{})]})})}),{useEmitter:Ax,useEmitterValue:Re,usePublisher:Kt}=Tx(cO,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},hO),yO=Ix({useEmitter:Ax,useEmitterValue:Re,usePublisher:Kt}),gO=Ox({useEmitter:Ax,useEmitterValue:Re,usePublisher:Kt});function ay(e,t,n){return t!=="normal"&&(t==null?void 0:t.endsWith("px"))!==!0&&n(`${e} was not resolved to pixel value correctly`,t,nt.WARN),t==="normal"?0:parseInt(t??"0",10)}function vO(e){var o,r,i;if(e.kind!=="notification"||e.method!=="session/update")return null;const t=e.payload;if(!t||typeof t!="object")return null;const n=t.params;return!n||((o=n.update)==null?void 0:o.sessionUpdate)!=="agent_message_chunk"?null:{sessionId:String(n.sessionId??""),text:((i=(r=n.update)==null?void 0:r.content)==null?void 0:i.text)??""}}function bO(e){const t=[];let n=null;const o=()=>{if(n){if(n.messages.length===1){const r=n.messages[0];t.push({type:"message",message:r})}else{const r=n.messages[0],i=n.messages[n.messages.length-1];t.push({type:"stream-cluster",sessionId:n.sessionId,messages:n.messages,firstSeq:r.seq,lastSeq:i.seq,combinedText:n.text,firstTimestamp:r.timestamp,lastTimestamp:i.timestamp})}n=null}};for(const r of e){const i=vO(r);if(i&&n&&n.sessionId===i.sessionId){n.messages.push(r),n.text+=i.text;continue}o(),i?n={sessionId:i.sessionId,messages:[r],text:i.text}:t.push({type:"message",message:r})}return o(),t}function xO(e){var n;if(!e.payload||typeof e.payload!="object")return null;const t=e.payload.params;if(!t||typeof t!="object")return null;if(e.method==="session/prompt"){const o=t.prompt;if(!Array.isArray(o))return null;const r=[];for(const s of o)(s==null?void 0:s.type)==="text"&&typeof s.text=="string"&&r.push(s.text);const i=r.join(" ").trim();return i.length>0?i:null}if(e.method==="session/update"){const o=t.update;if(!o)return null;const r=((n=o.content)==null?void 0:n.text)??o.text;return typeof r=="string"&&r.length>0?r:null}return null}function wO(e){return e.method==="session/prompt"&&e.kind==="request"}const SO={request:"REQ",response:"RSP",notification:"NTF",error:"ERR",unknown:"???"},$O={request:"request — expects a response",response:"response — answer to a previous request",notification:"notification — one-way event, no response",error:"error — response carrying an error object",unknown:"unknown — could not classify as JSON-RPC"},kO={"editor-to-agent":"editor → agent (e.g. JetBrains/Zed sending to the AI)","agent-to-editor":"agent → editor (AI replying or calling the host)"};function TO(e){switch(e){case"error":return"text-accent-error";case"notification":return"text-accent-note";case"request":return"text-accent-out";case"response":return"text-accent-in";default:return"text-ink-muted"}}function _O({message:e,selected:t,paired:n=!1,latencyMs:o,validation:r,onSelect:i}){const s=e.direction==="editor-to-agent",a=e.kind==="error",l=o!==void 0?aE(o):null,c=xO(e),f=wO(e),m=r&&!r.skipped&&!r.valid;return d.jsxs("button",{type:"button",onClick:()=>i(e.seq),className:K("relative flex w-full items-center gap-3 px-4 py-1.5 text-left font-mono text-[12px] leading-5","border-b border-line-grid/70 transition-colors","hover:bg-surface-rowHover",t?"bg-surface-rowHover ring-1 ring-inset ring-accent-out/40":"",n&&!t?"bg-accent-out/[0.04] ring-1 ring-inset ring-accent-out/15":"",a?"bg-accent-error/[0.06]":""),children:[d.jsx("span",{"aria-hidden":!0,className:K("absolute inset-y-0 left-0 w-[3px]",s?"bg-accent-out":"bg-accent-in",a?"bg-accent-error":"")}),d.jsx("span",{className:"w-10 shrink-0 text-right text-ink-muted",children:String(e.seq).padStart(3,"0")}),d.jsx("span",{className:"w-24 shrink-0 text-ink-secondary",children:fs(e.timestamp)}),d.jsxs("span",{className:K("flex w-16 shrink-0 items-center gap-1 font-semibold",s?"text-accent-out":"text-accent-in"),title:kO[e.direction],children:[d.jsx("span",{"aria-hidden":!0,children:Wb(e.direction)}),d.jsx("span",{className:"text-[10px] tracking-widest",children:Vb(e.direction)})]}),d.jsx("span",{className:K("inline-flex w-12 shrink-0 items-center justify-center rounded-sm border px-1 text-[10px] font-semibold tracking-widest",TO(e.kind),"border-current/40"),title:$O[e.kind],children:SO[e.kind]}),d.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline gap-3 overflow-hidden",children:[d.jsx("span",{className:K("shrink-0",f?"text-accent-out":"text-ink-primary"),children:e.method?e.method:"—"}),m&&r&&d.jsxs("span",{className:K("inline-flex shrink-0 items-center gap-0.5 rounded-sm border border-accent-error/40","bg-accent-error/10 px-1 text-[9px] font-semibold uppercase tracking-widest text-accent-error"),title:`fails ACP schema (${r.schemaName??"?"}): ${r.errors.map(v=>`${v.path==="/"?"":v.path+" "}${v.message}`).join(" · ")}`,children:["⚠ SPEC ",r.errors.length]}),c&&d.jsxs("span",{className:K("truncate",f?"text-accent-out/85":"text-ink-secondary"),title:c,children:["“",c,"”"]})]}),d.jsx("span",{className:"w-20 shrink-0 text-right text-ink-muted",title:e.rpcId!==void 0&&e.rpcId!==null?`id:${String(e.rpcId)}`:void 0,children:e.rpcId!==void 0&&e.rpcId!==null?`id:${cE(e.rpcId)}`:""}),d.jsx("span",{className:"w-20 shrink-0 text-right text-ink-muted",children:Ul(e.raw.length)}),d.jsx("span",{className:K("w-20 shrink-0 text-right",l==="ok"&&"text-accent-ok",l==="warn"&&"text-accent-warn",l==="error"&&"text-accent-error",!l&&"text-ink-dim"),children:o!==void 0?`+${Vt(o)}`:""})]})}const jO=I.memo(_O);function NO({messages:e,combinedText:t,firstTimestamp:n,lastTimestamp:o,selectedSeq:r,onSelect:i}){const[s,a]=I.useState(!1),l=e[0],c=e[e.length-1],f=o-n,m=t.length>140?`${t.slice(0,140)}…`:t,v=r!==null&&e.some(h=>h.seq===r);return d.jsxs("div",{className:"border-b border-line-grid/70",children:[d.jsxs("button",{type:"button",onClick:()=>{a(h=>!h),i(l.seq)},className:K("relative flex w-full items-center gap-3 px-4 py-1.5 text-left font-mono text-[12px] leading-5","transition-colors hover:bg-surface-rowHover",v?"bg-surface-rowHover ring-1 ring-inset ring-accent-note/40":""),children:[d.jsx("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent-note"}),d.jsxs("span",{className:"w-10 shrink-0 text-right text-ink-muted",children:[String(l.seq).padStart(3,"0"),"…",String(c.seq).padStart(3,"0")]}),d.jsx("span",{className:"w-24 shrink-0 text-ink-secondary",children:fs(n)}),d.jsxs("span",{className:"flex w-16 shrink-0 items-center gap-1 font-semibold text-accent-in",title:"agent → editor (AI replying or calling the host)",children:[d.jsx("span",{"aria-hidden":!0,children:"←"}),d.jsx("span",{className:"text-[10px] tracking-widest",children:"IN"})]}),d.jsx("span",{className:K("inline-flex w-12 shrink-0 items-center justify-center rounded-sm border border-accent-note/40 px-1 text-[10px] font-semibold tracking-widest text-accent-note"),title:`stream — ${e.length} consecutive agent_message_chunk notifications collapsed into one row`,children:"STR"}),d.jsxs("span",{className:"flex flex-1 items-center gap-2 truncate text-ink-primary",children:[d.jsx("span",{className:"inline-flex h-[14px] w-1 rounded-sm bg-accent-note/60","aria-hidden":!0}),d.jsx("span",{className:"truncate text-ink-secondary",children:m||d.jsx("span",{className:"text-ink-muted",children:"(empty stream)"})})]}),d.jsxs("span",{className:"w-20 shrink-0 text-right text-ink-muted",children:[e.length," chunks"]}),d.jsx("span",{className:"w-20 shrink-0 text-right text-ink-muted",children:Vt(f)}),d.jsx("span",{"aria-hidden":!0,className:K("w-3 shrink-0 text-ink-muted transition-transform",s?"rotate-90":""),children:"▸"})]}),s&&d.jsx("div",{className:"border-l border-line-grid/70 bg-surface-base/40",children:e.map((h,y)=>d.jsxs("button",{type:"button",onClick:()=>i(h.seq),className:K("flex w-full items-center gap-3 px-8 py-1 text-left font-mono text-[11px] leading-5 text-ink-secondary","transition-colors hover:bg-surface-rowHover",r===h.seq?"bg-surface-rowHover text-ink-primary":""),children:[d.jsx("span",{className:"w-10 shrink-0 text-right text-ink-muted",children:String(h.seq).padStart(3,"0")}),d.jsx("span",{className:"w-24 shrink-0 text-ink-muted",children:fs(h.timestamp)}),d.jsxs("span",{className:"w-8 shrink-0 text-ink-muted",children:["#",y+1]}),d.jsx("span",{className:"flex-1 truncate text-ink-primary",children:CO(h)})]},h.seq))})]})}function CO(e){var o,r;const t=e.payload;if(!t||typeof t!="object")return"";const n=t.params;return((r=(o=n==null?void 0:n.update)==null?void 0:o.content)==null?void 0:r.text)??""}const ly="border-ink-secondary/45",cy="border-dashed border-ink-muted/35";function EO({state:e,firstRow:t=!1,lastRow:n=!1}){const o=e!=="upcoming",r=e==="played";return d.jsxs("span",{"aria-hidden":!0,className:"relative w-4 shrink-0 self-stretch",children:[!t&&d.jsx("span",{className:K("absolute left-1/2 top-0 h-1/2 -translate-x-1/2 border-l",o?ly:cy)}),!n&&d.jsx("span",{className:K("absolute bottom-0 left-1/2 h-1/2 -translate-x-1/2 border-l",r?ly:cy)}),e==="current"&&d.jsx("span",{className:"absolute left-1/2 top-1/2 h-[7px] w-[7px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-ink-primary ring-2 ring-surface-base"})]})}function PO(e,t,n){return n===null?"upcoming":n>=e&&n<=t?"current":t<n?"played":"upcoming"}const IO=80;function Pc(e){return e.type==="message"?[e.message.seq,e.message.seq]:[e.firstSeq,e.lastSeq]}function OO(){const e=ne(E=>E.messages),t=ne(E=>E.selectedSeq),n=ne(E=>E.filters),o=ne(E=>E.playback.playhead),r=ne(E=>E.playback.playing),i=ne(E=>E.select),s=ne(E=>E.setPlayhead),a=I.useMemo(()=>vS(e,n),[e,n]),l=I.useMemo(()=>bO(a),[a]),c=I.useMemo(()=>Cl(e),[e]),f=I.useMemo(()=>tf(e),[e]),m=I.useMemo(()=>{const E=new Map;for(const q of e)E.set(q.seq,q.timestamp);return E},[e]),v=I.useMemo(()=>{if(t===null)return null;const E=c.get(t);if(E!==void 0)return E;for(const[q,z]of c)if(z===t)return q;return null},[t,c]),h=I.useRef(null),y=I.useRef({startIndex:0,endIndex:0}),b=at(E=>E.selectedUrl),g=b!==null&&!Qu(b),p=ne(E=>{var q;return((q=E.session)==null?void 0:q.id)??null}),u=ne(E=>E.replayDone),x=I.useRef(p),S=I.useRef(!1),T=I.useRef(!1);I.useEffect(()=>{x.current!==p&&(x.current=p,S.current=!1,T.current=!1)},[p]),I.useEffect(()=>{if(!g||!u||p===null||S.current||l.length===0)return;S.current=!0;const E=l.length-1,q=window.setTimeout(()=>{var z;(z=h.current)==null||z.scrollToIndex({index:E,align:"end",behavior:"smooth"})},50);return()=>window.clearTimeout(q)},[g,u,p,l.length]),I.useEffect(()=>{var F;if(g||!u||p===null||T.current||l.length===0)return;T.current=!0;const E=((F=e[e.length-1])==null?void 0:F.seq)??null;let q=o;o!==null&&E!==null&&o>=E&&(s(null),q=null);const z=t??q;if(z===null)return;const U=l.findIndex(G=>{const[Y,D]=Pc(G);return z>=Y&&z<=D});if(U<0)return;const L=G=>{var Y;return(Y=h.current)==null?void 0:Y.scrollToIndex({index:U,align:"center",behavior:G})};requestAnimationFrame(()=>requestAnimationFrame(()=>{L("smooth"),window.setTimeout(()=>{const{startIndex:G,endIndex:Y}=y.current;(U<G||U>Y)&&L("auto")},500)}))},[g,u,p,l,e,o,t,s]);const C=!g&&l.length>0,$=I.useMemo(()=>o===null?-1:l.findIndex(E=>{const[q,z]=Pc(E);return o>=q&&o<=z}),[l,o]),j=I.useRef(!0);I.useEffect(()=>{r&&(j.current=!0)},[r]),I.useEffect(()=>{var U;if(!r||!j.current||$<0)return;const{startIndex:E,endIndex:q}=y.current;($<=E||$>=q)&&((U=h.current)==null||U.scrollToIndex({index:$,align:"center",behavior:"auto"}))},[r,$]);const A=E=>{const q=l[E];if(!q)return null;const z=RO(q,{selectedSeq:t,pairedSeq:v,onSelect:i,responseToRequest:c,reqTimestampBySeq:m,validationBySeq:f});if(!C)return z;const[U,L]=Pc(q);return d.jsxs("div",{className:"flex items-stretch",children:[d.jsx(EO,{state:PO(U,L,o),firstRow:E===0,lastRow:E===l.length-1}),d.jsx("div",{className:"min-w-0 flex-1",children:z})]})};return d.jsxs("div",{className:"relative flex h-full flex-col",onWheel:()=>{r&&(j.current=!1)},children:[l.length===0?d.jsx("div",{className:"flex h-full items-center justify-center bg-surface-base font-mono text-xs text-ink-muted",children:"no messages match current filters"}):d.jsx(nO,{ref:h,className:"flex-1 bg-surface-base",totalCount:l.length,itemContent:A,rangeChanged:E=>{y.current=E},atBottomThreshold:IO,...g?{initialTopMostItemIndex:Math.max(0,l.length-1)}:{},followOutput:g?E=>E?"auto":!1:!1,computeItemKey:E=>AO(l[E])}),d.jsx(MO,{total:e.length,shown:a.length})]})}function RO(e,t){if(e.type==="message"){const n=e.message,o=t.responseToRequest.get(n.seq),r=o!==void 0?n.timestamp-(t.reqTimestampBySeq.get(o)??n.timestamp):void 0,i=t.validationBySeq.get(n.seq);return d.jsx(jO,{message:n,selected:t.selectedSeq===n.seq,paired:t.pairedSeq===n.seq,...r!==void 0?{latencyMs:r}:{},...i!==void 0?{validation:i}:{},onSelect:t.onSelect})}return d.jsx(NO,{messages:e.messages,combinedText:e.combinedText,firstTimestamp:e.firstTimestamp,lastTimestamp:e.lastTimestamp,selectedSeq:t.selectedSeq,onSelect:t.onSelect})}function AO(e){return e.type==="message"?`m-${e.message.seq}`:`c-${e.firstSeq}-${e.lastSeq}`}function MO({total:e,shown:t}){return e===0||t===e?null:d.jsxs("div",{className:"border-t border-line bg-surface-elev/60 px-4 py-1 text-right font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:["showing ",t," of ",e]})}function qO({message:e,tone:t="info"}){if(!e)return null;const n=t==="success"?"border-accent-out/50 bg-accent-out/10 text-accent-out":t==="warn"?"border-accent-warn/50 bg-accent-warn/10 text-accent-warn":"border-accent-info/50 bg-accent-info/10 text-accent-info";return d.jsx("div",{role:"status",className:K("pointer-events-none fixed right-4 top-[60px] z-50 rounded-sm border px-3 py-2 font-mono text-[11px] uppercase tracking-widest shadow-lg backdrop-blur-sm",n),children:e})}function UO({onImportResult:e}){const[t,n]=I.useState(!1),[o,r]=I.useState(!1),i=I.useRef(null),s=I.useRef(null),a=ne(h=>h.session),l=ne(h=>h.messages.length),c=a!==null&&l>0;I.useEffect(()=>{if(!t)return;const h=b=>{i.current&&!i.current.contains(b.target)&&n(!1)},y=b=>{b.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",y)}},[t]);const f=()=>{var h;n(!1),(h=s.current)==null||h.click()},m=()=>{n(!1);const h=ne.getState();h.session&&h.messages.length>0&&Hb(h.session,h.messages)},v=async h=>{var b;const y=(b=h.target.files)==null?void 0:b[0];if(h.target.value="",!!y){r(!0);try{const g=await jv(y);await Xu(),at.getState().setSelected(tl(g.id)),e==null||e(`imported ${y.name} · #${g.id} · ${g.messageCount} message${g.messageCount===1?"":"s"}`,"success")}catch(g){const p=g instanceof Error?g.message:String(g);e==null||e(`import failed: ${p}`,"warn")}finally{r(!1)}}};return d.jsxs("div",{ref:i,className:"relative",children:[d.jsx("input",{ref:s,type:"file",accept:"application/json,.json",onChange:v,className:"hidden","aria-hidden":"true",tabIndex:-1}),d.jsx("button",{type:"button",onClick:()=>n(h=>!h),title:"Session actions — import file · export","aria-haspopup":"menu","aria-expanded":t,"aria-label":"session actions",disabled:o,className:K("inline-flex h-7 w-7 items-center justify-center rounded-sm border font-mono text-[14px] leading-none transition-colors",t?"border-line-strong bg-surface-rowHover text-ink-primary":"border-line bg-surface-row text-ink-secondary hover:border-line-strong hover:text-ink-primary",o&&"cursor-progress opacity-60"),children:d.jsx("span",{"aria-hidden":!0,children:"⋯"})}),t&&d.jsxs("div",{role:"menu",className:"absolute right-0 top-[calc(100%+6px)] z-50 w-max overflow-hidden rounded-sm border border-line bg-surface-elev p-1 font-mono text-[11px] uppercase tracking-widest shadow-lg",children:[d.jsx(dy,{icon:"↑",label:"import",onClick:f,title:"Open a session JSON exported earlier — yours or someone else's."}),d.jsx(dy,{icon:"↓",label:"export",onClick:m,disabled:!c,title:"Download this session as JSON. Auth headers and proxy tokens (Authorization, X-Api-Key, JetBrains proxy_key) are redacted — safe to attach to a bug report. For an un-redacted copy (self-debug only), use 'acp-devtools export <id> --raw' in the CLI.",disabledTitle:"Nothing to export yet — wait for the first message."})]})]})}function dy({icon:e,label:t,onClick:n,disabled:o,title:r,disabledTitle:i}){return d.jsxs("button",{type:"button",role:"menuitem",disabled:o,onClick:n,title:o?i:r,className:K("flex w-full items-center gap-2 rounded-[2px] px-2 py-1.5 text-left transition-colors",o?"cursor-not-allowed text-ink-dim opacity-50":"text-ink-muted hover:bg-surface-rowHover hover:text-ink-secondary"),children:[d.jsx("span",{"aria-hidden":!0,className:"w-4 text-center text-[13px] leading-none",children:e}),d.jsx("span",{className:"flex-1",children:t})]})}function LO({onSelect:e,activeUrl:t,overrideUrl:n}){const o=at(u=>u.captures),r=at(u=>u.savedSessions),i=at(u=>u.lastFetchAt),[s,a]=I.useState(!1),l=I.useRef(null);I.useEffect(()=>{if(!s)return;const u=x=>{l.current&&!l.current.contains(x.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[s]);const c=o.find(u=>u.url===t)??null,f=t!==null&&Qu(t)?_S(t):null,m=I.useMemo(()=>new Set(o.map(u=>u.sessionDbId).filter(u=>u!==null)),[o]),v=I.useMemo(()=>r.filter(u=>!m.has(u.id)),[r,m]),h=I.useMemo(()=>v.filter(u=>u.imported_at===null),[v]),y=I.useMemo(()=>v.filter(u=>u.imported_at!==null),[v]),b=f!==null?v.find(u=>u.id===f)??null:null,g=o.length+v.length;let p;return n?p="?ws override":c?p=nf(c):b?p=`#${b.id} · ${b.name??(b.client_name?`${b.client_name} · ${Rt(b.agent_command??"")}`:Rt(b.agent_command??""))}`:g===0?p="no captures":p="pick capture",d.jsxs("div",{ref:l,className:"relative",children:[d.jsxs("button",{type:"button",onClick:()=>a(u=>!u),className:K("inline-flex h-7 items-center gap-2 rounded-sm border px-3 font-mono text-[10px] uppercase tracking-widest transition-colors","border-line bg-surface-row text-ink-secondary hover:border-line-strong hover:text-ink-primary",s?"border-line-strong text-ink-primary":""),title:"Select a live capture or saved session",children:[d.jsx("span",{className:"inline-block w-[200px] truncate text-left",children:p}),g>1&&!n&&d.jsx("span",{className:"rounded-sm border border-line-strong px-1 text-[9px] text-ink-secondary",children:g}),d.jsx("span",{"aria-hidden":!0,className:K("transition-transform",s?"rotate-180":""),children:"▾"})]}),s&&d.jsxs("div",{className:K("absolute right-0 top-[calc(100%+6px)] z-50 w-[460px] rounded-md border border-line bg-surface-elev shadow-xl"),children:[d.jsxs(Ic,{children:["live captures · last poll"," ",i?`${Math.round((Date.now()-i)/1e3)}s ago`:"—"]}),o.length===0&&d.jsxs("div",{className:"px-3 py-3 text-center font-mono text-[11px] text-ink-muted",children:["none. start a proxy with"," ",d.jsx("span",{className:"text-ink-secondary",children:"acp-devtools proxy …"})]}),d.jsx("ul",{className:"max-h-[260px] overflow-y-auto",children:o.map(u=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>{e(u.url),a(!1)},title:`${u.agentCommand} · ${u.url}${u.saveTo?" · saved to local store":" · not persisted"}`,className:K("flex w-full items-baseline gap-3 border-b border-line-grid/70 px-3 py-2 text-left transition-colors hover:bg-surface-rowHover",u.url===t?"bg-surface-rowHover":""),children:[d.jsx("span",{"aria-hidden":!0,className:K("h-2 w-2 shrink-0 rounded-full",u.url===t?"bg-accent-out animate-pulse-soft":"bg-accent-warn/50")}),d.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-ink-primary",children:[d.jsx("span",{className:"text-accent-out",children:u.sessionDbId!==null?`#${u.sessionDbId}`:`pid ${u.pid}`}),d.jsx("span",{className:"text-ink-muted",children:" · "}),u.sessionName??(u.clientName?`${u.clientName} · ${Rt(u.agentCommand)}`:Rt(u.agentCommand))]}),d.jsx("span",{className:"shrink-0 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:Ar(u.startedAt)})]})},u.url))}),d.jsxs(Ic,{children:["saved · ",h.length," session",h.length===1?"":"s"]}),h.length===0&&d.jsx("div",{className:"px-3 py-3 text-center font-mono text-[11px] text-ink-muted",children:r.length===0?"no saved sessions yet":y.length>0?"no live-captured sessions yet":"all saved sessions are currently live"}),d.jsx("ul",{className:"max-h-[300px] overflow-y-auto",children:h.map(u=>d.jsx(uy,{s:u,activeUrl:t,onPick:x=>{e(x),a(!1)}},u.id))}),(y.length>0||r.some(u=>u.imported_at!==null))&&d.jsxs(d.Fragment,{children:[d.jsxs(Ic,{children:["imported · ",y.length," file",y.length===1?"":"s"]}),y.length===0?d.jsx("div",{className:"px-3 py-3 text-center font-mono text-[11px] text-ink-muted",children:"no imported files"}):d.jsx("ul",{className:"max-h-[200px] overflow-y-auto",children:y.map(u=>d.jsx(uy,{s:u,activeUrl:t,onPick:x=>{e(x),a(!1)}},u.id))})]}),n&&d.jsx("div",{className:"border-t border-line px-3 py-2 font-mono text-[10px] uppercase tracking-widest text-accent-warn",children:"?ws override active — discovery selection ignored"})]})]})}function Ic({children:e}){return d.jsx("div",{className:"border-b border-line bg-surface-base/50 px-3 py-1.5 font-mono text-[10px] uppercase tracking-widest text-ink-muted",children:e})}function uy({s:e,activeUrl:t,onPick:n}){const o=tl(e.id),r=o===t,i=s=>{s.stopPropagation();const a=e.name??Rt(e.agent_command??"");window.confirm(`Delete session #${e.id} ${a} forever?`)&&(async()=>{try{await TS(e.id),r&&at.getState().setSelected(null),await Xu()}catch(l){const c=l instanceof Error?l.message:String(l);window.alert(`Delete failed: ${c}`)}})()};return d.jsxs("li",{className:"group relative",children:[d.jsxs("button",{type:"button",onClick:()=>n(o),title:`session #${e.id} · ${e.agent_command??""} · ${e.message_count} messages`,className:K("flex w-full items-baseline gap-3 border-b border-line-grid/70 px-3 py-2 text-left transition-colors hover:bg-surface-rowHover",r?"bg-surface-rowHover":""),children:[d.jsx("span",{"aria-hidden":!0,className:K("h-2 w-2 shrink-0 rounded-full",r?"bg-accent-note animate-pulse-soft":"bg-ink-dim")}),d.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-ink-primary",children:[d.jsxs("span",{className:"text-accent-note",children:["#",e.id]}),d.jsx("span",{className:"text-ink-muted",children:" · "}),e.name??(e.client_name?`${e.client_name} · ${Rt(e.agent_command??"")}`:Rt(e.agent_command??""))]}),d.jsxs("span",{className:"shrink-0 font-mono text-[10px] uppercase tracking-widest text-ink-muted transition-colors group-hover:text-ink-secondary",children:[e.message_count,"msg · ",Ar(e.started_at)]})]}),d.jsx("button",{type:"button",onClick:i,"aria-label":`delete session #${e.id} forever`,title:"Delete this session permanently",className:K("absolute right-2 top-1/2 hidden h-6 w-6 -translate-y-1/2 items-center justify-center rounded-sm border border-line bg-surface-elev/70 text-[12px] leading-none text-ink-muted transition-colors","group-hover:flex hover:border-accent-error/70 hover:bg-surface-rowHover hover:text-accent-error"),children:d.jsx("span",{"aria-hidden":!0,children:"×"})})]})}const Oc=[{mode:"system",label:"AUTO",title:"follow OS theme",icon:"◐"},{mode:"light",label:"LIGHT",title:"force light theme",icon:"☀"},{mode:"dark",label:"DARK",title:"force dark theme",icon:"☾"}];function DO(){const e=Id(s=>s.mode),t=Id(s=>s.setMode),[n,o]=I.useState(!1),r=I.useRef(null);I.useEffect(()=>{if(!n)return;const s=a=>{r.current&&!r.current.contains(a.target)&&o(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[n]);const i=Oc.find(s=>s.mode===e)??Oc[0];return d.jsxs("div",{ref:r,className:"relative",children:[d.jsx("button",{type:"button",onClick:()=>o(s=>!s),title:`theme · ${i.title}`,"aria-haspopup":"menu","aria-expanded":n,className:K("inline-flex h-7 w-7 items-center justify-center rounded-sm border font-mono text-[12px] transition-colors",n?"border-line-strong bg-surface-rowHover text-ink-primary":"border-line bg-surface-row text-ink-secondary hover:border-line-strong hover:text-ink-primary"),children:d.jsx("span",{"aria-hidden":!0,children:i.icon})}),n&&d.jsx("div",{role:"menu",className:"absolute right-0 top-[calc(100%+6px)] z-50 inline-flex items-center gap-px rounded-sm border border-line bg-surface-elev p-px font-mono text-[10px] uppercase tracking-widest shadow-lg",children:Oc.map(s=>{const a=s.mode===e;return d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":a,onClick:()=>{t(s.mode),o(!1)},title:s.title,className:K("inline-flex items-center gap-1 rounded-[2px] px-2 py-1 transition-colors",a?"bg-accent-out/15 text-accent-out":"text-ink-muted hover:bg-surface-rowHover hover:text-ink-secondary"),children:[d.jsx("span",{"aria-hidden":!0,children:s.icon}),d.jsx("span",{children:s.label})]},s.mode)})})]})}function zO({wsUrl:e,overrideUrl:t,activeUrl:n,isReplay:o,isImported:r=!1,onPickCapture:i,onImportResult:s,onOpenInfo:a,onOpenPerf:l,onOpenDiff:c}){const f=ne(b=>b.connection),m=ne(b=>b.session),v=ne(b=>b.lastError),h=ne(b=>b.messages.length>0?b.messages[b.messages.length-1].timestamp:null),y=Zb(5e3);return d.jsxs("header",{className:"flex items-center justify-between border-b border-line bg-surface-base px-5 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:"wordmark-rule",children:d.jsx("span",{className:"font-display text-[18px] uppercase tracking-[0.18em] text-ink-primary",children:"acp.devtools"})}),d.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-ink-dim",children:"v0.4.0"})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[m&&(()=>{const{primary:b}=ql(m),g=o||r,p=m.endedAt!==null?m.endedAt:h??m.startedAt,u=g?Ar(m.startedAt,p):Ar(m.startedAt,y),x=h!==null?y-h:null,S=!g&&x!==null&&x>5e3,T=_a(m.startedAt,y),C=r?"IMPORTED":o?"REPLAY":"SESSION",$=r?"session loaded from a JSON file on disk — not connected to any proxy":o?"replay of a saved session — proxy has ended":"live capture — proxy process is still running",j=r?"text-accent-warn":o?"text-accent-note":"text-accent-out";return d.jsxs("div",{className:"flex items-center gap-3 font-mono text-[11px] text-ink-secondary",children:[d.jsx("span",{className:"text-ink-muted",title:$,children:C}),d.jsx("span",{className:j,title:m.agentCommand?`session #${m.id} · ${m.agentCommand}`:"persisted session id",children:b}),d.jsx("span",{className:"text-ink-muted",children:"·"}),d.jsx("span",{title:`session started at ${T}`,children:_a(m.startedAt,y)}),u&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-ink-muted",children:"·"}),d.jsxs("span",{className:"text-ink-muted",title:g?"capture duration (start → end of recorded session)":"how long the proxy process has been alive",children:[g?"lasted":"alive"," ",u]})]}),S&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-ink-muted",children:"·"}),d.jsxs("span",{className:"text-ink-dim",title:`time since the most recent ACP frame · last event ${_a(h,y)}`,children:["idle ",Ar(h,y)]})]})]})})(),d.jsxs("div",{className:"flex items-center gap-1.5",children:[i&&d.jsx(LO,{onSelect:i,activeUrl:n,overrideUrl:t}),d.jsx(FO,{status:f,wsUrl:e,lastError:v,isReplay:o,isImported:r,onReconnect:$S})]}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[a&&m&&d.jsx("button",{type:"button",onClick:a,className:"inline-flex h-7 items-center rounded-sm border border-line bg-surface-row px-3 font-mono text-[10px] uppercase tracking-widest text-ink-secondary transition-colors hover:bg-surface-rowHover hover:text-ink-primary",title:"Show session info — client/agent capabilities, runtime state","aria-label":"Open session info panel",children:"info"}),l&&m&&d.jsx("button",{type:"button",onClick:l,className:"inline-flex h-7 items-center rounded-sm border border-line bg-surface-row px-3 font-mono text-[10px] uppercase tracking-widest text-ink-secondary transition-colors hover:bg-surface-rowHover hover:text-ink-primary",title:"Show performance dashboard — per-method latency stats and waterfall timeline","aria-label":"Open performance dashboard",children:"perf"}),c&&m&&d.jsx("button",{type:"button",onClick:c,className:"inline-flex h-7 items-center rounded-sm border border-line bg-surface-row px-3 font-mono text-[10px] uppercase tracking-widest text-ink-secondary transition-colors hover:bg-surface-rowHover hover:text-ink-primary",title:"Compare this session against another — metadata, per-method latency, and frame-level differences","aria-label":"Open session diff",children:"diff"}),d.jsx(UO,{...s?{onImportResult:s}:{}})]}),d.jsx("div",{className:"flex items-center gap-1.5",children:d.jsx(DO,{})})]})]})}function FO({status:e,wsUrl:t,lastError:n,isReplay:o,isImported:r,onReconnect:i}){if(r)return d.jsxs("div",{className:"inline-flex h-7 cursor-default items-center gap-2 rounded-sm border border-accent-warn/40 bg-accent-warn/10 px-3 font-mono text-[10px] font-semibold uppercase tracking-widest text-accent-warn",title:`viewing data from a JSON file · ${t}`,children:[d.jsx("span",{"aria-hidden":!0,className:"inline-block h-2 w-2 rounded-full bg-accent-warn"}),d.jsx("span",{className:"inline-block min-w-[52px] text-center",children:"FILE"})]});const a=e==="open"?o?"REPLAY":"LIVE":e==="connecting"?"WAITING":e==="idle"?"IDLE":e==="closed"?"CLOSED":"ERROR",c={idle:"text-ink-secondary bg-surface-row border-line",connecting:"text-accent-warn/80 bg-accent-warn/10 border-accent-warn/30",open:o?"text-accent-note bg-accent-note/10 border-accent-note/40":"text-accent-out bg-accent-out/10 border-accent-out/40",closed:"text-ink-secondary bg-surface-row border-line",error:"text-accent-error bg-accent-error/10 border-accent-error/40"},m=e==="open"?o?"bg-accent-note animate-pulse-soft":"bg-accent-out animate-pulse-soft":e==="connecting"?"bg-accent-warn/60 animate-pulse-soft":e==="error"?"bg-accent-error":"bg-ink-dim",v=e==="idle"||e==="closed"||e==="error",y=n||(e==="open"?`${o?"serving a recorded session from the local store":"connected to a live proxy capture"} · ${t}`:v?`click to reconnect · ${t}`:t);return d.jsxs("button",{type:"button",onClick:v?i:void 0,disabled:!v,className:K("inline-flex h-7 items-center gap-2 rounded-sm border px-3 font-mono text-[10px] font-semibold uppercase tracking-widest transition-colors",c[e],v?"cursor-pointer hover:bg-surface-rowHover":"cursor-default"),title:y,children:[d.jsx("span",{"aria-hidden":!0,className:K("inline-block h-2 w-2 rounded-full",m)}),d.jsx("span",{className:"inline-block min-w-[52px] text-center",children:a})]})}const ur=YN(),BO=ur?new URLSearchParams(typeof window<"u"?window.location.search:"").get("url"):null;function HO(){const e=at(w=>w.captures),t=at(w=>w.selectedUrl),n=at(w=>w.setSelected),o=ne(w=>{var k;return((k=w.session)==null?void 0:k.importedAt)??null}),r=t,i=Qu(t),s=o!==null;I.useEffect(()=>ur?void 0:IS(),[]),I.useEffect(()=>AS(),[]);const[a,l]=I.useState(null),c=I.useRef(new Set);I.useEffect(()=>{const w=yh(window.location.search),k=ne.getState(),N={};Object.keys(w.filters).length>0&&(N.filters={...k.filters,...w.filters}),w.selectedSeq!==null&&(N.selectedSeq=w.selectedSeq),w.detailTab!==null&&(N.detailTab=w.detailTab),w.playhead!==null&&(N.playback={...k.playback,playhead:w.playhead}),Object.keys(N).length>0&&ne.setState(N),w.captureUrl&&at.getState().setSelected(w.captureUrl)},[]);const[f,m]=I.useState(!1),[v,h]=I.useState(!1),[y,b]=I.useState(!1);I.useEffect(()=>{const w=()=>{const H=ne.getState(),R=at.getState();rC({filters:H.filters,selectedSeq:H.selectedSeq,detailTab:H.detailTab,playhead:H.playback.playhead,captureUrl:R.selectedUrl})},k=ne.subscribe(w),N=at.subscribe(w);return w(),()=>{k(),N()}},[]);const g=()=>{f||(window.history.pushState({drawer:"info"},"",window.location.href),m(!0))},p=()=>{v||(window.history.pushState({drawer:"perf"},"",window.location.href),h(!0))},u=()=>{y||(window.history.pushState({drawer:"diff"},"",window.location.href),b(!0))},x=()=>{f&&window.history.back()},S=()=>{v&&window.history.back()},T=()=>{y&&window.history.back()},C=w=>{window.history.pushState({drawer:null},"",window.location.href),ne.getState().select(w),m(!1),h(!1),b(!1)};I.useEffect(()=>{const w=k=>{const N=k.state;m((N==null?void 0:N.drawer)==="info"),h((N==null?void 0:N.drawer)==="perf"),b((N==null?void 0:N.drawer)==="diff");const H=yh(window.location.search),R=ne.getState(),X=at.getState(),ie={};Object.keys(H.filters).length>0&&(ie.filters={...R.filters,...H.filters}),ie.selectedSeq=H.selectedSeq,ie.detailTab=H.detailTab??"tree",ie.playback={...R.playback,playhead:H.playhead},ne.setState(ie),H.captureUrl!==X.selectedUrl&&H.captureUrl&&X.setSelected(H.captureUrl)};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]),I.useEffect(()=>{const w=new Set(e.map(X=>X.url));if(c.current=c.current,i){c.current=w;return}const k=e[0]??null,N=t===null,H=t!==null&&w.has(t),R=k!==null&&!c.current.has(k.url)&&c.current.size>0;e.length===0?t!==null&&n(null):N||!H?n(k.url):R&&k.url!==t&&(n(k.url),l({message:`switched → ${nf(k)}`,tone:"success"})),c.current=w},[e,t,n,i]),I.useEffect(()=>{if(!a)return;let w=3e3,k=Date.now(),N=null;const H=()=>{N===null&&document.visibilityState==="visible"&&(k=Date.now(),N=setTimeout(()=>l(null),w))},R=()=>{N!==null&&(clearTimeout(N),N=null,w=Math.max(0,w-(Date.now()-k)))},X=()=>{document.visibilityState==="visible"?H():R()};return document.addEventListener("visibilitychange",X),H(),()=>{document.removeEventListener("visibilitychange",X),N&&clearTimeout(N)}},[a]),I.useEffect(()=>{if(ur){Ed();return}if(!r){Ed();return}Ju(r)},[r]);const[$,j]=I.useState(!1);I.useEffect(()=>{const w=k=>{if((k.metaKey||k.ctrlKey)&&(k.key==="k"||k.key==="K")){k.preventDefault(),j(H=>!H);return}if($)return;const N=k.target;if(!(N&&(N.tagName==="INPUT"||N.tagName==="TEXTAREA"))){if(k.key==="Escape"){ne.getState().select(null);return}if(k.key==="j"||k.key==="J"){py(1);return}if(k.key==="k"||k.key==="K"){py(-1);return}}};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[$]);const A=ne(w=>w.messages),E=ne(w=>w.session),q=ne(w=>w.selectedSeq),z=ne(w=>w.connection),U=ne(w=>w.lastError);I.useEffect(()=>{const w="ACP Devtools";if(!E){document.title=w;return}const{primary:k,secondary:N}=ql(E),H=N?`${k} · ${N}`:k;document.title=`${H} — ${w}`},[E]);const L=I.useMemo(()=>bS(A,q),[A,q]),F=I.useMemo(()=>{const w=Cl(A),k=new Map;for(const[N,H]of w.entries())k.set(H,N);return{responseToRequest:w,requestToResponse:k}},[A]),G=I.useMemo(()=>tf(A),[A]);let Y,D=null;if(L){if(L.kind==="response"||L.kind==="error"){const w=F.responseToRequest.get(L.seq);w!==void 0&&(D=A.find(k=>k.seq===w)??null,D&&(Y=L.timestamp-D.timestamp))}else if(L.kind==="request"){const w=F.requestToResponse.get(L.seq);w!==void 0&&(D=A.find(k=>k.seq===w)??null,D&&(Y=D.timestamp-L.timestamp))}}const J=A.length===0&&!E,O=r??"no capture selected",_=ur&&J,M=!ur&&J&&r===null&&e.length===0,P=!ur&&J&&!M;return d.jsxs("div",{className:"flex h-full flex-col bg-surface-base text-ink-primary",children:[d.jsx(qO,{message:(a==null?void 0:a.message)??null,tone:(a==null?void 0:a.tone)??"info"}),d.jsx(JC,{open:$,onClose:()=>j(!1)}),d.jsx(UP,{open:f,onClose:x}),d.jsx(kP,{open:v,onClose:S,onNavigateToSeq:C}),d.jsx(LE,{open:y,onClose:T}),d.jsx(zO,{wsUrl:O,overrideUrl:null,isReplay:i,isImported:s,onPickCapture:w=>{n(w),c.current.add(w)},onImportResult:(w,k)=>l({message:w,tone:k}),activeUrl:r,onOpenInfo:g,onOpenPerf:p,onOpenDiff:u}),d.jsx(tP,{}),d.jsx("main",{className:"flex-1 overflow-hidden",children:_?d.jsx(AP,{initialUrl:BO}):M?d.jsx(ZE,{status:z,lastError:U,url:O,captureCount:e.length}):P?d.jsx(ZC,{status:z,url:O,lastError:U}):d.jsx(FP,{storageKey:"acp.split.leftPx",initialLeftFraction:.62,minLeft:420,minRight:360,left:d.jsxs("div",{className:"flex h-full flex-col",children:[d.jsx("div",{className:"min-h-0 flex-1",children:d.jsx(OO,{})}),(i||s)&&d.jsx(qP,{})]}),right:d.jsx(hE,{message:L,...Y!==void 0?{latencyMs:Y}:{},...D?{pairedRequest:D}:{},...L?(()=>{const w=G.get(L.seq);return w?{validation:w}:{}})():{},onJumpToPaired:w=>ne.getState().select(w)})})}),d.jsx(BP,{})]})}function py(e){const t=ne.getState(),{messages:n,selectedSeq:o}=t;if(n.length===0)return;if(o===null){const s=e===1?n[0]:n[n.length-1];s&&t.select(s.seq);return}const r=n.findIndex(s=>s.seq===o);if(r===-1){const s=n[0];s&&t.select(s.seq);return}const i=n[r+e];i&&t.select(i.seq)}const Mx=document.getElementById("root");if(!Mx)throw new Error("#root not found");Rc.createRoot(Mx).render(d.jsx(te.StrictMode,{children:d.jsx(HO,{})}));
|
|
1768
|
+
//# sourceMappingURL=index-CjS5-QNm.js.map
|