genaicode 0.15.0 → 1.0.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.
Files changed (37) hide show
  1. package/README.md +0 -7
  2. package/dist/main/codegen.d.ts +1 -3
  3. package/dist/main/codegen.js +2 -19
  4. package/dist/main/codegen.js.map +1 -1
  5. package/dist/main/generate-content-functions.d.ts +3 -0
  6. package/dist/main/generate-content-functions.js +19 -0
  7. package/dist/main/generate-content-functions.js.map +1 -0
  8. package/dist/main/ui/backend/endpoints/generate-content-endpoint.js +2 -4
  9. package/dist/main/ui/backend/endpoints/generate-content-endpoint.js.map +1 -1
  10. package/dist/main/ui/backend/service.d.ts +1 -0
  11. package/dist/main/ui/backend/service.js +5 -1
  12. package/dist/main/ui/backend/service.js.map +1 -1
  13. package/dist/main/ui/frontend/assets/index-C_k1AhO2.js +3445 -0
  14. package/dist/main/ui/frontend/index.html +1 -1
  15. package/dist/prompt/dynamic-function-generator.d.ts +2 -0
  16. package/dist/prompt/dynamic-function-generator.js +58 -0
  17. package/dist/prompt/dynamic-function-generator.js.map +1 -0
  18. package/dist/vite-genaicode/code-transformer.d.ts +5 -0
  19. package/dist/vite-genaicode/code-transformer.js +83 -0
  20. package/dist/vite-genaicode/code-transformer.js.map +1 -0
  21. package/dist/vite-genaicode/constants.d.ts +3 -0
  22. package/dist/vite-genaicode/constants.js +4 -0
  23. package/dist/vite-genaicode/constants.js.map +1 -0
  24. package/dist/vite-genaicode/dynamic-function-generator.d.ts +2 -0
  25. package/dist/vite-genaicode/dynamic-function-generator.js +47 -0
  26. package/dist/vite-genaicode/dynamic-function-generator.js.map +1 -0
  27. package/dist/vite-genaicode/html-injector.d.ts +6 -0
  28. package/dist/vite-genaicode/html-injector.js +14 -0
  29. package/dist/vite-genaicode/html-injector.js.map +1 -0
  30. package/dist/vite-genaicode/server-manager.d.ts +26 -0
  31. package/dist/vite-genaicode/server-manager.js +91 -0
  32. package/dist/vite-genaicode/server-manager.js.map +1 -0
  33. package/dist/vite-genaicode/vite-genaicode-plugin.d.ts +11 -2
  34. package/dist/vite-genaicode/vite-genaicode-plugin.js +60 -65
  35. package/dist/vite-genaicode/vite-genaicode-plugin.js.map +1 -1
  36. package/package.json +4 -4
  37. package/dist/main/ui/frontend/assets/index-DAM_kJhM.js +0 -3445
@@ -1,3445 +0,0 @@
1
- var _k=Object.defineProperty;var Ok=(e,t,r)=>t in e?_k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Rn=(e,t,r)=>Ok(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function r(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(l){if(l.ep)return;l.ep=!0;const a=r(l);fetch(l.href,a)}})();function Ud(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ec={exports:{}},ze={};/**
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 Cm;function Mk(){if(Cm)return ze;Cm=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=m&&z[m]||z["@@iterator"],typeof z=="function"?z:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function j(z,q,R){this.props=z,this.context=q,this.refs=S,this.updater=R||w}j.prototype.isReactComponent={},j.prototype.setState=function(z,q){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,q,"setState")},j.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function E(){}E.prototype=j.prototype;function I(z,q,R){this.props=z,this.context=q,this.refs=S,this.updater=R||w}var A=I.prototype=new E;A.constructor=I,k(A,j.prototype),A.isPureReactComponent=!0;var F=Array.isArray,O=Object.prototype.hasOwnProperty,N={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function K(z,q,R){var ce,ye={},ke=null,he=null;if(q!=null)for(ce in q.ref!==void 0&&(he=q.ref),q.key!==void 0&&(ke=""+q.key),q)O.call(q,ce)&&!H.hasOwnProperty(ce)&&(ye[ce]=q[ce]);var fe=arguments.length-2;if(fe===1)ye.children=R;else if(1<fe){for(var se=Array(fe),ve=0;ve<fe;ve++)se[ve]=arguments[ve+2];ye.children=se}if(z&&z.defaultProps)for(ce in fe=z.defaultProps,fe)ye[ce]===void 0&&(ye[ce]=fe[ce]);return{$$typeof:e,type:z,key:ke,ref:he,props:ye,_owner:N.current}}function ne(z,q){return{$$typeof:e,type:z.type,key:q,ref:z.ref,props:z.props,_owner:z._owner}}function M(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function Z(z){var q={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(R){return q[R]})}var le=/\/+/g;function X(z,q){return typeof z=="object"&&z!==null&&z.key!=null?Z(""+z.key):q.toString(36)}function re(z,q,R,ce,ye){var ke=typeof z;(ke==="undefined"||ke==="boolean")&&(z=null);var he=!1;if(z===null)he=!0;else switch(ke){case"string":case"number":he=!0;break;case"object":switch(z.$$typeof){case e:case t:he=!0}}if(he)return he=z,ye=ye(he),z=ce===""?"."+X(he,0):ce,F(ye)?(R="",z!=null&&(R=z.replace(le,"$&/")+"/"),re(ye,q,R,"",function(ve){return ve})):ye!=null&&(M(ye)&&(ye=ne(ye,R+(!ye.key||he&&he.key===ye.key?"":(""+ye.key).replace(le,"$&/")+"/")+z)),q.push(ye)),1;if(he=0,ce=ce===""?".":ce+":",F(z))for(var fe=0;fe<z.length;fe++){ke=z[fe];var se=ce+X(ke,fe);he+=re(ke,q,R,se,ye)}else if(se=v(z),typeof se=="function")for(z=se.call(z),fe=0;!(ke=z.next()).done;)ke=ke.value,se=ce+X(ke,fe++),he+=re(ke,q,R,se,ye);else if(ke==="object")throw q=String(z),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return he}function U(z,q,R){if(z==null)return z;var ce=[],ye=0;return re(z,ce,"","",function(ke){return q.call(R,ke,ye++)}),ce}function pe(z){if(z._status===-1){var q=z._result;q=q(),q.then(function(R){(z._status===0||z._status===-1)&&(z._status=1,z._result=R)},function(R){(z._status===0||z._status===-1)&&(z._status=2,z._result=R)}),z._status===-1&&(z._status=0,z._result=q)}if(z._status===1)return z._result.default;throw z._result}var ae={current:null},Q={transition:null},de={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Q,ReactCurrentOwner:N};function T(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:U,forEach:function(z,q,R){U(z,function(){q.apply(this,arguments)},R)},count:function(z){var q=0;return U(z,function(){q++}),q},toArray:function(z){return U(z,function(q){return q})||[]},only:function(z){if(!M(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},ze.Component=j,ze.Fragment=r,ze.Profiler=l,ze.PureComponent=I,ze.StrictMode=i,ze.Suspense=f,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=de,ze.act=T,ze.cloneElement=function(z,q,R){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ce=k({},z.props),ye=z.key,ke=z.ref,he=z._owner;if(q!=null){if(q.ref!==void 0&&(ke=q.ref,he=N.current),q.key!==void 0&&(ye=""+q.key),z.type&&z.type.defaultProps)var fe=z.type.defaultProps;for(se in q)O.call(q,se)&&!H.hasOwnProperty(se)&&(ce[se]=q[se]===void 0&&fe!==void 0?fe[se]:q[se])}var se=arguments.length-2;if(se===1)ce.children=R;else if(1<se){fe=Array(se);for(var ve=0;ve<se;ve++)fe[ve]=arguments[ve+2];ce.children=fe}return{$$typeof:e,type:z.type,key:ye,ref:ke,props:ce,_owner:he}},ze.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:a,_context:z},z.Consumer=z},ze.createElement=K,ze.createFactory=function(z){var q=K.bind(null,z);return q.type=z,q},ze.createRef=function(){return{current:null}},ze.forwardRef=function(z){return{$$typeof:d,render:z}},ze.isValidElement=M,ze.lazy=function(z){return{$$typeof:x,_payload:{_status:-1,_result:z},_init:pe}},ze.memo=function(z,q){return{$$typeof:p,type:z,compare:q===void 0?null:q}},ze.startTransition=function(z){var q=Q.transition;Q.transition={};try{z()}finally{Q.transition=q}},ze.unstable_act=T,ze.useCallback=function(z,q){return ae.current.useCallback(z,q)},ze.useContext=function(z){return ae.current.useContext(z)},ze.useDebugValue=function(){},ze.useDeferredValue=function(z){return ae.current.useDeferredValue(z)},ze.useEffect=function(z,q){return ae.current.useEffect(z,q)},ze.useId=function(){return ae.current.useId()},ze.useImperativeHandle=function(z,q,R){return ae.current.useImperativeHandle(z,q,R)},ze.useInsertionEffect=function(z,q){return ae.current.useInsertionEffect(z,q)},ze.useLayoutEffect=function(z,q){return ae.current.useLayoutEffect(z,q)},ze.useMemo=function(z,q){return ae.current.useMemo(z,q)},ze.useReducer=function(z,q,R){return ae.current.useReducer(z,q,R)},ze.useRef=function(z){return ae.current.useRef(z)},ze.useState=function(z){return ae.current.useState(z)},ze.useSyncExternalStore=function(z,q,R){return ae.current.useSyncExternalStore(z,q,R)},ze.useTransition=function(){return ae.current.useTransition()},ze.version="18.3.1",ze}var Em;function Vd(){return Em||(Em=1,Ec.exports=Mk()),Ec.exports}var $=Vd();const Tt=Ud($);var Ps={},jc={exports:{}},Gt={},Tc={exports:{}},$c={};/**
10
- * @license React
11
- * scheduler.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 jm;function Dk(){return jm||(jm=1,function(e){function t(Q,de){var T=Q.length;Q.push(de);e:for(;0<T;){var z=T-1>>>1,q=Q[z];if(0<l(q,de))Q[z]=de,Q[T]=q,T=z;else break e}}function r(Q){return Q.length===0?null:Q[0]}function i(Q){if(Q.length===0)return null;var de=Q[0],T=Q.pop();if(T!==de){Q[0]=T;e:for(var z=0,q=Q.length,R=q>>>1;z<R;){var ce=2*(z+1)-1,ye=Q[ce],ke=ce+1,he=Q[ke];if(0>l(ye,T))ke<q&&0>l(he,ye)?(Q[z]=he,Q[ke]=T,z=ke):(Q[z]=ye,Q[ce]=T,z=ce);else if(ke<q&&0>l(he,T))Q[z]=he,Q[ke]=T,z=ke;else break e}}return de}function l(Q,de){var T=Q.sortIndex-de.sortIndex;return T!==0?T:Q.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],p=[],x=1,m=null,v=3,w=!1,k=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(Q){for(var de=r(p);de!==null;){if(de.callback===null)i(p);else if(de.startTime<=Q)i(p),de.sortIndex=de.expirationTime,t(f,de);else break;de=r(p)}}function F(Q){if(S=!1,A(Q),!k)if(r(f)!==null)k=!0,pe(O);else{var de=r(p);de!==null&&ae(F,de.startTime-Q)}}function O(Q,de){k=!1,S&&(S=!1,E(K),K=-1),w=!0;var T=v;try{for(A(de),m=r(f);m!==null&&(!(m.expirationTime>de)||Q&&!Z());){var z=m.callback;if(typeof z=="function"){m.callback=null,v=m.priorityLevel;var q=z(m.expirationTime<=de);de=e.unstable_now(),typeof q=="function"?m.callback=q:m===r(f)&&i(f),A(de)}else i(f);m=r(f)}if(m!==null)var R=!0;else{var ce=r(p);ce!==null&&ae(F,ce.startTime-de),R=!1}return R}finally{m=null,v=T,w=!1}}var N=!1,H=null,K=-1,ne=5,M=-1;function Z(){return!(e.unstable_now()-M<ne)}function le(){if(H!==null){var Q=e.unstable_now();M=Q;var de=!0;try{de=H(!0,Q)}finally{de?X():(N=!1,H=null)}}else N=!1}var X;if(typeof I=="function")X=function(){I(le)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,U=re.port2;re.port1.onmessage=le,X=function(){U.postMessage(null)}}else X=function(){j(le,0)};function pe(Q){H=Q,N||(N=!0,X())}function ae(Q,de){K=j(function(){Q(e.unstable_now())},de)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){k||w||(k=!0,pe(O))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var de=3;break;default:de=v}var T=v;v=de;try{return Q()}finally{v=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,de){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var T=v;v=Q;try{return de()}finally{v=T}},e.unstable_scheduleCallback=function(Q,de,T){var z=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?z+T:z):T=z,Q){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=T+q,Q={id:x++,callback:de,priorityLevel:Q,startTime:T,expirationTime:q,sortIndex:-1},T>z?(Q.sortIndex=T,t(p,Q),r(f)===null&&Q===r(p)&&(S?(E(K),K=-1):S=!0,ae(F,T-z))):(Q.sortIndex=q,t(f,Q),k||w||(k=!0,pe(O))),Q},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(Q){var de=v;return function(){var T=v;v=de;try{return Q.apply(this,arguments)}finally{v=T}}}}($c)),$c}var Tm;function Bk(){return Tm||(Tm=1,Tc.exports=Dk()),Tc.exports}/**
18
- * @license React
19
- * react-dom.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
- */var $m;function Uk(){if($m)return Gt;$m=1;var e=Vd(),t=Bk();function r(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s<arguments.length;s++)o+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function a(n,o){u(n,o),u(n+"Capture",o)}function u(n,o){for(l[n]=o,n=0;n<o.length;n++)i.add(o[n])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,x={},m={};function v(n){return f.call(m,n)?!0:f.call(x,n)?!1:p.test(n)?m[n]=!0:(x[n]=!0,!1)}function w(n,o,s,c){if(s!==null&&s.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return c?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,o,s,c){if(o===null||typeof o>"u"||w(n,o,s,c))return!0;if(c)return!1;if(s!==null)switch(s.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function S(n,o,s,c,g,y,b){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=c,this.attributeNamespace=g,this.mustUseProperty=s,this.propertyName=n,this.type=o,this.sanitizeURL=y,this.removeEmptyString=b}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){j[n]=new S(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];j[o]=new S(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){j[n]=new S(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){j[n]=new S(n,2,!1,n,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(n){j[n]=new S(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){j[n]=new S(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){j[n]=new S(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){j[n]=new S(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){j[n]=new S(n,5,!1,n.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function I(n){return n[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(n){var o=n.replace(E,I);j[o]=new S(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(E,I);j[o]=new S(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(E,I);j[o]=new S(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){j[n]=new S(n,1,!1,n.toLowerCase(),null,!1,!1)}),j.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){j[n]=new S(n,1,!1,n.toLowerCase(),null,!0,!0)});function A(n,o,s,c){var g=j.hasOwnProperty(o)?j[o]:null;(g!==null?g.type!==0:c||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(k(o,s,g,c)&&(s=null),c||g===null?v(o)&&(s===null?n.removeAttribute(o):n.setAttribute(o,""+s)):g.mustUseProperty?n[g.propertyName]=s===null?g.type===3?!1:"":s:(o=g.attributeName,c=g.attributeNamespace,s===null?n.removeAttribute(o):(g=g.type,s=g===3||g===4&&s===!0?"":""+s,c?n.setAttributeNS(c,o,s):n.setAttribute(o,s))))}var F=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),N=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),Z=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),Q=Symbol.iterator;function de(n){return n===null||typeof n!="object"?null:(n=Q&&n[Q]||n["@@iterator"],typeof n=="function"?n:null)}var T=Object.assign,z;function q(n){if(z===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);z=o&&o[1]||""}return`
26
- `+z+n}var R=!1;function ce(n,o){if(!n||R)return"";R=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(V){var c=V}Reflect.construct(n,[],o)}else{try{o.call()}catch(V){c=V}n.call(o.prototype)}else{try{throw Error()}catch(V){c=V}n()}}catch(V){if(V&&c&&typeof V.stack=="string"){for(var g=V.stack.split(`
27
- `),y=c.stack.split(`
28
- `),b=g.length-1,P=y.length-1;1<=b&&0<=P&&g[b]!==y[P];)P--;for(;1<=b&&0<=P;b--,P--)if(g[b]!==y[P]){if(b!==1||P!==1)do if(b--,P--,0>P||g[b]!==y[P]){var L=`
29
- `+g[b].replace(" at new "," at ");return n.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",n.displayName)),L}while(1<=b&&0<=P);break}}}finally{R=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?q(n):""}function ye(n){switch(n.tag){case 5:return q(n.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return n=ce(n.type,!1),n;case 11:return n=ce(n.type.render,!1),n;case 1:return n=ce(n.type,!0),n;default:return""}}function ke(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case H:return"Fragment";case N:return"Portal";case ne:return"Profiler";case K:return"StrictMode";case X:return"Suspense";case re:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Z:return(n.displayName||"Context")+".Consumer";case M:return(n._context.displayName||"Context")+".Provider";case le:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case U:return o=n.displayName||null,o!==null?o:ke(n.type)||"Memo";case pe:o=n._payload,n=n._init;try{return ke(n(o))}catch{}}return null}function he(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(o);case 8:return o===K?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function fe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function se(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ve(n){var o=se(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),c=""+n[o];if(!n.hasOwnProperty(o)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var g=s.get,y=s.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return g.call(this)},set:function(b){c=""+b,y.call(this,b)}}),Object.defineProperty(n,o,{enumerable:s.enumerable}),{getValue:function(){return c},setValue:function(b){c=""+b},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Le(n){n._valueTracker||(n._valueTracker=ve(n))}function Ie(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),c="";return n&&(c=se(n)?n.checked?"true":"false":n.value),n=c,n!==s?(o.setValue(n),!0):!1}function Ge(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function $t(n,o){var s=o.checked;return T({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??n._wrapperState.initialChecked})}function bt(n,o){var s=o.defaultValue==null?"":o.defaultValue,c=o.checked!=null?o.checked:o.defaultChecked;s=fe(o.value!=null?o.value:s),n._wrapperState={initialChecked:c,initialValue:s,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Bt(n,o){o=o.checked,o!=null&&A(n,"checked",o,!1)}function qn(n,o){Bt(n,o);var s=fe(o.value),c=o.type;if(s!=null)c==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?Fe(n,o.type,s):o.hasOwnProperty("defaultValue")&&Fe(n,o.type,fe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function co(n,o,s){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var c=o.type;if(!(c!=="submit"&&c!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,s||o===n.value||(n.value=o),n.defaultValue=o}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function Fe(n,o,s){(o!=="number"||Ge(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var dt=Array.isArray;function _t(n,o,s,c){if(n=n.options,o){o={};for(var g=0;g<s.length;g++)o["$"+s[g]]=!0;for(s=0;s<n.length;s++)g=o.hasOwnProperty("$"+n[s].value),n[s].selected!==g&&(n[s].selected=g),g&&c&&(n[s].defaultSelected=!0)}else{for(s=""+fe(s),o=null,g=0;g<n.length;g++){if(n[g].value===s){n[g].selected=!0,c&&(n[g].defaultSelected=!0);return}o!==null||n[g].disabled||(o=n[g])}o!==null&&(o.selected=!0)}}function ft(n,o){if(o.dangerouslySetInnerHTML!=null)throw Error(r(91));return T({},o,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function De(n,o){var s=o.value;if(s==null){if(s=o.children,o=o.defaultValue,s!=null){if(o!=null)throw Error(r(92));if(dt(s)){if(1<s.length)throw Error(r(93));s=s[0]}o=s}o==null&&(o=""),s=o}n._wrapperState={initialValue:fe(s)}}function mt(n,o){var s=fe(o.value),c=fe(o.defaultValue);s!=null&&(s=""+s,s!==n.value&&(n.value=s),o.defaultValue==null&&n.defaultValue!==s&&(n.defaultValue=s)),c!=null&&(n.defaultValue=""+c)}function Rt(n){var o=n.textContent;o===n._wrapperState.initialValue&&o!==""&&o!==null&&(n.value=o)}function G(n){switch(n){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 te(n,o){return n==null||n==="http://www.w3.org/1999/xhtml"?G(o):n==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var be,Te=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,s,c,g){MSApp.execUnsafeLocalFunction(function(){return n(o,s,c,g)})}:n}(function(n,o){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=o;else{for(be=be||document.createElement("div"),be.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=be.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function Pe(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}var St={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},Gn=["Webkit","ms","Moz","O"];Object.keys(St).forEach(function(n){Gn.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),St[o]=St[n]})});function fn(n,o,s){return o==null||typeof o=="boolean"||o===""?"":s||typeof o!="number"||o===0||St.hasOwnProperty(n)&&St[n]?(""+o).trim():o+"px"}function ir(n,o){n=n.style;for(var s in o)if(o.hasOwnProperty(s)){var c=s.indexOf("--")===0,g=fn(s,o[s],c);s==="float"&&(s="cssFloat"),c?n.setProperty(s,g):n[s]=g}}var Ar=T({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 Ct(n,o){if(o){if(Ar[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(r(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(r(61))}if(o.style!=null&&typeof o.style!="object")throw Error(r(62))}}function Ln(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){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 Zt=null;function Da(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ba=null,fo=null,po=null;function Bf(n){if(n=Ii(n)){if(typeof Ba!="function")throw Error(r(280));var o=n.stateNode;o&&(o=ql(o),Ba(n.stateNode,n.type,o))}}function Uf(n){fo?po?po.push(n):po=[n]:fo=n}function Vf(){if(fo){var n=fo,o=po;if(po=fo=null,Bf(n),o)for(n=0;n<o.length;n++)Bf(o[n])}}function Hf(n,o){return n(o)}function Wf(){}var Ua=!1;function qf(n,o,s){if(Ua)return n(o,s);Ua=!0;try{return Hf(n,o,s)}finally{Ua=!1,(fo!==null||po!==null)&&(Wf(),Vf())}}function ui(n,o){var s=n.stateNode;if(s===null)return null;var c=ql(s);if(c===null)return null;s=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(r(231,o,typeof s));return s}var Va=!1;if(d)try{var ci={};Object.defineProperty(ci,"passive",{get:function(){Va=!0}}),window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch{Va=!1}function V1(n,o,s,c,g,y,b,P,L){var V=Array.prototype.slice.call(arguments,3);try{o.apply(s,V)}catch(ee){this.onError(ee)}}var di=!1,Cl=null,El=!1,Ha=null,H1={onError:function(n){di=!0,Cl=n}};function W1(n,o,s,c,g,y,b,P,L){di=!1,Cl=null,V1.apply(H1,arguments)}function q1(n,o,s,c,g,y,b,P,L){if(W1.apply(this,arguments),di){if(di){var V=Cl;di=!1,Cl=null}else throw Error(r(198));El||(El=!0,Ha=V)}}function Lr(n){var o=n,s=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(s=o.return),n=o.return;while(n)}return o.tag===3?s:null}function Gf(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function Jf(n){if(Lr(n)!==n)throw Error(r(188))}function G1(n){var o=n.alternate;if(!o){if(o=Lr(n),o===null)throw Error(r(188));return o!==n?null:n}for(var s=n,c=o;;){var g=s.return;if(g===null)break;var y=g.alternate;if(y===null){if(c=g.return,c!==null){s=c;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===s)return Jf(g),n;if(y===c)return Jf(g),o;y=y.sibling}throw Error(r(188))}if(s.return!==c.return)s=g,c=y;else{for(var b=!1,P=g.child;P;){if(P===s){b=!0,s=g,c=y;break}if(P===c){b=!0,c=g,s=y;break}P=P.sibling}if(!b){for(P=y.child;P;){if(P===s){b=!0,s=y,c=g;break}if(P===c){b=!0,c=y,s=g;break}P=P.sibling}if(!b)throw Error(r(189))}}if(s.alternate!==c)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?n:o}function Kf(n){return n=G1(n),n!==null?Qf(n):null}function Qf(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var o=Qf(n);if(o!==null)return o;n=n.sibling}return null}var Yf=t.unstable_scheduleCallback,Xf=t.unstable_cancelCallback,J1=t.unstable_shouldYield,K1=t.unstable_requestPaint,lt=t.unstable_now,Q1=t.unstable_getCurrentPriorityLevel,Wa=t.unstable_ImmediatePriority,Zf=t.unstable_UserBlockingPriority,jl=t.unstable_NormalPriority,Y1=t.unstable_LowPriority,ep=t.unstable_IdlePriority,Tl=null,zn=null;function X1(n){if(zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(Tl,n,void 0,(n.current.flags&128)===128)}catch{}}var bn=Math.clz32?Math.clz32:tw,Z1=Math.log,ew=Math.LN2;function tw(n){return n>>>=0,n===0?32:31-(Z1(n)/ew|0)|0}var $l=64,Rl=4194304;function fi(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Il(n,o){var s=n.pendingLanes;if(s===0)return 0;var c=0,g=n.suspendedLanes,y=n.pingedLanes,b=s&268435455;if(b!==0){var P=b&~g;P!==0?c=fi(P):(y&=b,y!==0&&(c=fi(y)))}else b=s&~g,b!==0?c=fi(b):y!==0&&(c=fi(y));if(c===0)return 0;if(o!==0&&o!==c&&(o&g)===0&&(g=c&-c,y=o&-o,g>=y||g===16&&(y&4194240)!==0))return o;if((c&4)!==0&&(c|=s&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=c;0<o;)s=31-bn(o),g=1<<s,c|=n[s],o&=~g;return c}function nw(n,o){switch(n){case 1:case 2:case 4:return o+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 o+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 rw(n,o){for(var s=n.suspendedLanes,c=n.pingedLanes,g=n.expirationTimes,y=n.pendingLanes;0<y;){var b=31-bn(y),P=1<<b,L=g[b];L===-1?((P&s)===0||(P&c)!==0)&&(g[b]=nw(P,o)):L<=o&&(n.expiredLanes|=P),y&=~P}}function qa(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function tp(){var n=$l;return $l<<=1,($l&4194240)===0&&($l=64),n}function Ga(n){for(var o=[],s=0;31>s;s++)o.push(n);return o}function pi(n,o,s){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-bn(o),n[o]=s}function ow(n,o){var s=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<s;){var g=31-bn(s),y=1<<g;o[g]=0,c[g]=-1,n[g]=-1,s&=~y}}function Ja(n,o){var s=n.entangledLanes|=o;for(n=n.entanglements;s;){var c=31-bn(s),g=1<<c;g&o|n[c]&o&&(n[c]|=o),s&=~g}}var We=0;function np(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var rp,Ka,op,ip,lp,Qa=!1,Pl=[],lr=null,sr=null,ar=null,hi=new Map,mi=new Map,ur=[],iw="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 sp(n,o){switch(n){case"focusin":case"focusout":lr=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":hi.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":mi.delete(o.pointerId)}}function gi(n,o,s,c,g,y){return n===null||n.nativeEvent!==y?(n={blockedOn:o,domEventName:s,eventSystemFlags:c,nativeEvent:y,targetContainers:[g]},o!==null&&(o=Ii(o),o!==null&&Ka(o)),n):(n.eventSystemFlags|=c,o=n.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),n)}function lw(n,o,s,c,g){switch(o){case"focusin":return lr=gi(lr,n,o,s,c,g),!0;case"dragenter":return sr=gi(sr,n,o,s,c,g),!0;case"mouseover":return ar=gi(ar,n,o,s,c,g),!0;case"pointerover":var y=g.pointerId;return hi.set(y,gi(hi.get(y)||null,n,o,s,c,g)),!0;case"gotpointercapture":return y=g.pointerId,mi.set(y,gi(mi.get(y)||null,n,o,s,c,g)),!0}return!1}function ap(n){var o=zr(n.target);if(o!==null){var s=Lr(o);if(s!==null){if(o=s.tag,o===13){if(o=Gf(s),o!==null){n.blockedOn=o,lp(n.priority,function(){op(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Nl(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var s=Xa(n.domEventName,n.eventSystemFlags,o[0],n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);Zt=c,s.target.dispatchEvent(c),Zt=null}else return o=Ii(s),o!==null&&Ka(o),n.blockedOn=s,!1;o.shift()}return!0}function up(n,o,s){Nl(n)&&s.delete(o)}function sw(){Qa=!1,lr!==null&&Nl(lr)&&(lr=null),sr!==null&&Nl(sr)&&(sr=null),ar!==null&&Nl(ar)&&(ar=null),hi.forEach(up),mi.forEach(up)}function xi(n,o){n.blockedOn===o&&(n.blockedOn=null,Qa||(Qa=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,sw)))}function yi(n){function o(g){return xi(g,n)}if(0<Pl.length){xi(Pl[0],n);for(var s=1;s<Pl.length;s++){var c=Pl[s];c.blockedOn===n&&(c.blockedOn=null)}}for(lr!==null&&xi(lr,n),sr!==null&&xi(sr,n),ar!==null&&xi(ar,n),hi.forEach(o),mi.forEach(o),s=0;s<ur.length;s++)c=ur[s],c.blockedOn===n&&(c.blockedOn=null);for(;0<ur.length&&(s=ur[0],s.blockedOn===null);)ap(s),s.blockedOn===null&&ur.shift()}var ho=F.ReactCurrentBatchConfig,Al=!0;function aw(n,o,s,c){var g=We,y=ho.transition;ho.transition=null;try{We=1,Ya(n,o,s,c)}finally{We=g,ho.transition=y}}function uw(n,o,s,c){var g=We,y=ho.transition;ho.transition=null;try{We=4,Ya(n,o,s,c)}finally{We=g,ho.transition=y}}function Ya(n,o,s,c){if(Al){var g=Xa(n,o,s,c);if(g===null)mu(n,o,c,Ll,s),sp(n,c);else if(lw(g,n,o,s,c))c.stopPropagation();else if(sp(n,c),o&4&&-1<iw.indexOf(n)){for(;g!==null;){var y=Ii(g);if(y!==null&&rp(y),y=Xa(n,o,s,c),y===null&&mu(n,o,c,Ll,s),y===g)break;g=y}g!==null&&c.stopPropagation()}else mu(n,o,c,null,s)}}var Ll=null;function Xa(n,o,s,c){if(Ll=null,n=Da(c),n=zr(n),n!==null)if(o=Lr(n),o===null)n=null;else if(s=o.tag,s===13){if(n=Gf(o),n!==null)return n;n=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null);return Ll=n,null}function cp(n){switch(n){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(Q1()){case Wa:return 1;case Zf:return 4;case jl:case Y1:return 16;case ep:return 536870912;default:return 16}default:return 16}}var cr=null,Za=null,zl=null;function dp(){if(zl)return zl;var n,o=Za,s=o.length,c,g="value"in cr?cr.value:cr.textContent,y=g.length;for(n=0;n<s&&o[n]===g[n];n++);var b=s-n;for(c=1;c<=b&&o[s-c]===g[y-c];c++);return zl=g.slice(n,1<c?1-c:void 0)}function Fl(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function _l(){return!0}function fp(){return!1}function en(n){function o(s,c,g,y,b){this._reactName=s,this._targetInst=g,this.type=c,this.nativeEvent=y,this.target=b,this.currentTarget=null;for(var P in n)n.hasOwnProperty(P)&&(s=n[P],this[P]=s?s(y):y[P]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?_l:fp,this.isPropagationStopped=fp,this}return T(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=_l)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=_l)},persist:function(){},isPersistent:_l}),o}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=en(mo),vi=T({},mo,{view:0,detail:0}),cw=en(vi),tu,nu,wi,Ol=T({},vi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ou,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==wi&&(wi&&n.type==="mousemove"?(tu=n.screenX-wi.screenX,nu=n.screenY-wi.screenY):nu=tu=0,wi=n),tu)},movementY:function(n){return"movementY"in n?n.movementY:nu}}),pp=en(Ol),dw=T({},Ol,{dataTransfer:0}),fw=en(dw),pw=T({},vi,{relatedTarget:0}),ru=en(pw),hw=T({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),mw=en(hw),gw=T({},mo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),xw=en(gw),yw=T({},mo,{data:0}),hp=en(yw),vw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ww={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"},kw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bw(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=kw[n])?!!o[n]:!1}function ou(){return bw}var Sw=T({},vi,{key:function(n){if(n.key){var o=vw[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=Fl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ww[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ou,charCode:function(n){return n.type==="keypress"?Fl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Fl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Cw=en(Sw),Ew=T({},Ol,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mp=en(Ew),jw=T({},vi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ou}),Tw=en(jw),$w=T({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rw=en($w),Iw=T({},Ol,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Pw=en(Iw),Nw=[9,13,27,32],iu=d&&"CompositionEvent"in window,ki=null;d&&"documentMode"in document&&(ki=document.documentMode);var Aw=d&&"TextEvent"in window&&!ki,gp=d&&(!iu||ki&&8<ki&&11>=ki),xp=" ",yp=!1;function vp(n,o){switch(n){case"keyup":return Nw.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var go=!1;function Lw(n,o){switch(n){case"compositionend":return wp(o);case"keypress":return o.which!==32?null:(yp=!0,xp);case"textInput":return n=o.data,n===xp&&yp?null:n;default:return null}}function zw(n,o){if(go)return n==="compositionend"||!iu&&vp(n,o)?(n=dp(),zl=Za=cr=null,go=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return gp&&o.locale!=="ko"?null:o.data;default:return null}}var Fw={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 kp(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!Fw[n.type]:o==="textarea"}function bp(n,o,s,c){Uf(c),o=Vl(o,"onChange"),0<o.length&&(s=new eu("onChange","change",null,s,c),n.push({event:s,listeners:o}))}var bi=null,Si=null;function _w(n){Dp(n,0)}function Ml(n){var o=ko(n);if(Ie(o))return n}function Ow(n,o){if(n==="change")return o}var Sp=!1;if(d){var lu;if(d){var su="oninput"in document;if(!su){var Cp=document.createElement("div");Cp.setAttribute("oninput","return;"),su=typeof Cp.oninput=="function"}lu=su}else lu=!1;Sp=lu&&(!document.documentMode||9<document.documentMode)}function Ep(){bi&&(bi.detachEvent("onpropertychange",jp),Si=bi=null)}function jp(n){if(n.propertyName==="value"&&Ml(Si)){var o=[];bp(o,Si,n,Da(n)),qf(_w,o)}}function Mw(n,o,s){n==="focusin"?(Ep(),bi=o,Si=s,bi.attachEvent("onpropertychange",jp)):n==="focusout"&&Ep()}function Dw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ml(Si)}function Bw(n,o){if(n==="click")return Ml(o)}function Uw(n,o){if(n==="input"||n==="change")return Ml(o)}function Vw(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var Sn=typeof Object.is=="function"?Object.is:Vw;function Ci(n,o){if(Sn(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var s=Object.keys(n),c=Object.keys(o);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var g=s[c];if(!f.call(o,g)||!Sn(n[g],o[g]))return!1}return!0}function Tp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function $p(n,o){var s=Tp(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=o&&c>=o)return{node:s,offset:o-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Tp(s)}}function Rp(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?Rp(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function Ip(){for(var n=window,o=Ge();o instanceof n.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch{s=!1}if(s)n=o.contentWindow;else break;o=Ge(n.document)}return o}function au(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function Hw(n){var o=Ip(),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Rp(s.ownerDocument.documentElement,s)){if(c!==null&&au(s)){if(o=c.start,n=c.end,n===void 0&&(n=o),"selectionStart"in s)s.selectionStart=o,s.selectionEnd=Math.min(n,s.value.length);else if(n=(o=s.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var g=s.textContent.length,y=Math.min(c.start,g);c=c.end===void 0?y:Math.min(c.end,g),!n.extend&&y>c&&(g=c,c=y,y=g),g=$p(s,y);var b=$p(s,c);g&&b&&(n.rangeCount!==1||n.anchorNode!==g.node||n.anchorOffset!==g.offset||n.focusNode!==b.node||n.focusOffset!==b.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),n.removeAllRanges(),y>c?(n.addRange(o),n.extend(b.node,b.offset)):(o.setEnd(b.node,b.offset),n.addRange(o)))}}for(o=[],n=s;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<o.length;s++)n=o[s],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var Ww=d&&"documentMode"in document&&11>=document.documentMode,xo=null,uu=null,Ei=null,cu=!1;function Pp(n,o,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;cu||xo==null||xo!==Ge(c)||(c=xo,"selectionStart"in c&&au(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ei&&Ci(Ei,c)||(Ei=c,c=Vl(uu,"onSelect"),0<c.length&&(o=new eu("onSelect","select",null,o,s),n.push({event:o,listeners:c}),o.target=xo)))}function Dl(n,o){var s={};return s[n.toLowerCase()]=o.toLowerCase(),s["Webkit"+n]="webkit"+o,s["Moz"+n]="moz"+o,s}var yo={animationend:Dl("Animation","AnimationEnd"),animationiteration:Dl("Animation","AnimationIteration"),animationstart:Dl("Animation","AnimationStart"),transitionend:Dl("Transition","TransitionEnd")},du={},Np={};d&&(Np=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function Bl(n){if(du[n])return du[n];if(!yo[n])return n;var o=yo[n],s;for(s in o)if(o.hasOwnProperty(s)&&s in Np)return du[n]=o[s];return n}var Ap=Bl("animationend"),Lp=Bl("animationiteration"),zp=Bl("animationstart"),Fp=Bl("transitionend"),_p=new Map,Op="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 dr(n,o){_p.set(n,o),a(o,[n])}for(var fu=0;fu<Op.length;fu++){var pu=Op[fu],qw=pu.toLowerCase(),Gw=pu[0].toUpperCase()+pu.slice(1);dr(qw,"on"+Gw)}dr(Ap,"onAnimationEnd"),dr(Lp,"onAnimationIteration"),dr(zp,"onAnimationStart"),dr("dblclick","onDoubleClick"),dr("focusin","onFocus"),dr("focusout","onBlur"),dr(Fp,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ji="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(" "),Jw=new Set("cancel close invalid load scroll toggle".split(" ").concat(ji));function Mp(n,o,s){var c=n.type||"unknown-event";n.currentTarget=s,q1(c,o,void 0,n),n.currentTarget=null}function Dp(n,o){o=(o&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],g=c.event;c=c.listeners;e:{var y=void 0;if(o)for(var b=c.length-1;0<=b;b--){var P=c[b],L=P.instance,V=P.currentTarget;if(P=P.listener,L!==y&&g.isPropagationStopped())break e;Mp(g,P,V),y=L}else for(b=0;b<c.length;b++){if(P=c[b],L=P.instance,V=P.currentTarget,P=P.listener,L!==y&&g.isPropagationStopped())break e;Mp(g,P,V),y=L}}}if(El)throw n=Ha,El=!1,Ha=null,n}function Xe(n,o){var s=o[ku];s===void 0&&(s=o[ku]=new Set);var c=n+"__bubble";s.has(c)||(Bp(o,n,2,!1),s.add(c))}function hu(n,o,s){var c=0;o&&(c|=4),Bp(s,n,c,o)}var Ul="_reactListening"+Math.random().toString(36).slice(2);function Ti(n){if(!n[Ul]){n[Ul]=!0,i.forEach(function(s){s!=="selectionchange"&&(Jw.has(s)||hu(s,!1,n),hu(s,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Ul]||(o[Ul]=!0,hu("selectionchange",!1,o))}}function Bp(n,o,s,c){switch(cp(o)){case 1:var g=aw;break;case 4:g=uw;break;default:g=Ya}s=g.bind(null,o,s,n),g=void 0,!Va||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),c?g!==void 0?n.addEventListener(o,s,{capture:!0,passive:g}):n.addEventListener(o,s,!0):g!==void 0?n.addEventListener(o,s,{passive:g}):n.addEventListener(o,s,!1)}function mu(n,o,s,c,g){var y=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var b=c.tag;if(b===3||b===4){var P=c.stateNode.containerInfo;if(P===g||P.nodeType===8&&P.parentNode===g)break;if(b===4)for(b=c.return;b!==null;){var L=b.tag;if((L===3||L===4)&&(L=b.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;b=b.return}for(;P!==null;){if(b=zr(P),b===null)return;if(L=b.tag,L===5||L===6){c=y=b;continue e}P=P.parentNode}}c=c.return}qf(function(){var V=y,ee=Da(s),oe=[];e:{var Y=_p.get(n);if(Y!==void 0){var me=eu,xe=n;switch(n){case"keypress":if(Fl(s)===0)break e;case"keydown":case"keyup":me=Cw;break;case"focusin":xe="focus",me=ru;break;case"focusout":xe="blur",me=ru;break;case"beforeblur":case"afterblur":me=ru;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=pp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=fw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=Tw;break;case Ap:case Lp:case zp:me=mw;break;case Fp:me=Rw;break;case"scroll":me=cw;break;case"wheel":me=Pw;break;case"copy":case"cut":case"paste":me=xw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=mp}var we=(o&4)!==0,st=!we&&n==="scroll",D=we?Y!==null?Y+"Capture":null:Y;we=[];for(var _=V,B;_!==null;){B=_;var ue=B.stateNode;if(B.tag===5&&ue!==null&&(B=ue,D!==null&&(ue=ui(_,D),ue!=null&&we.push($i(_,ue,B)))),st)break;_=_.return}0<we.length&&(Y=new me(Y,xe,null,s,ee),oe.push({event:Y,listeners:we}))}}if((o&7)===0){e:{if(Y=n==="mouseover"||n==="pointerover",me=n==="mouseout"||n==="pointerout",Y&&s!==Zt&&(xe=s.relatedTarget||s.fromElement)&&(zr(xe)||xe[Jn]))break e;if((me||Y)&&(Y=ee.window===ee?ee:(Y=ee.ownerDocument)?Y.defaultView||Y.parentWindow:window,me?(xe=s.relatedTarget||s.toElement,me=V,xe=xe?zr(xe):null,xe!==null&&(st=Lr(xe),xe!==st||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(me=null,xe=V),me!==xe)){if(we=pp,ue="onMouseLeave",D="onMouseEnter",_="mouse",(n==="pointerout"||n==="pointerover")&&(we=mp,ue="onPointerLeave",D="onPointerEnter",_="pointer"),st=me==null?Y:ko(me),B=xe==null?Y:ko(xe),Y=new we(ue,_+"leave",me,s,ee),Y.target=st,Y.relatedTarget=B,ue=null,zr(ee)===V&&(we=new we(D,_+"enter",xe,s,ee),we.target=B,we.relatedTarget=st,ue=we),st=ue,me&&xe)t:{for(we=me,D=xe,_=0,B=we;B;B=vo(B))_++;for(B=0,ue=D;ue;ue=vo(ue))B++;for(;0<_-B;)we=vo(we),_--;for(;0<B-_;)D=vo(D),B--;for(;_--;){if(we===D||D!==null&&we===D.alternate)break t;we=vo(we),D=vo(D)}we=null}else we=null;me!==null&&Up(oe,Y,me,we,!1),xe!==null&&st!==null&&Up(oe,st,xe,we,!0)}}e:{if(Y=V?ko(V):window,me=Y.nodeName&&Y.nodeName.toLowerCase(),me==="select"||me==="input"&&Y.type==="file")var Se=Ow;else if(kp(Y))if(Sp)Se=Uw;else{Se=Dw;var Ce=Mw}else(me=Y.nodeName)&&me.toLowerCase()==="input"&&(Y.type==="checkbox"||Y.type==="radio")&&(Se=Bw);if(Se&&(Se=Se(n,V))){bp(oe,Se,s,ee);break e}Ce&&Ce(n,Y,V),n==="focusout"&&(Ce=Y._wrapperState)&&Ce.controlled&&Y.type==="number"&&Fe(Y,"number",Y.value)}switch(Ce=V?ko(V):window,n){case"focusin":(kp(Ce)||Ce.contentEditable==="true")&&(xo=Ce,uu=V,Ei=null);break;case"focusout":Ei=uu=xo=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Pp(oe,s,ee);break;case"selectionchange":if(Ww)break;case"keydown":case"keyup":Pp(oe,s,ee)}var Ee;if(iu)e:{switch(n){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else go?vp(n,s)&&($e="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&($e="onCompositionStart");$e&&(gp&&s.locale!=="ko"&&(go||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&go&&(Ee=dp()):(cr=ee,Za="value"in cr?cr.value:cr.textContent,go=!0)),Ce=Vl(V,$e),0<Ce.length&&($e=new hp($e,n,null,s,ee),oe.push({event:$e,listeners:Ce}),Ee?$e.data=Ee:(Ee=wp(s),Ee!==null&&($e.data=Ee)))),(Ee=Aw?Lw(n,s):zw(n,s))&&(V=Vl(V,"onBeforeInput"),0<V.length&&(ee=new hp("onBeforeInput","beforeinput",null,s,ee),oe.push({event:ee,listeners:V}),ee.data=Ee))}Dp(oe,o)})}function $i(n,o,s){return{instance:n,listener:o,currentTarget:s}}function Vl(n,o){for(var s=o+"Capture",c=[];n!==null;){var g=n,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=ui(n,s),y!=null&&c.unshift($i(n,y,g)),y=ui(n,o),y!=null&&c.push($i(n,y,g))),n=n.return}return c}function vo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Up(n,o,s,c,g){for(var y=o._reactName,b=[];s!==null&&s!==c;){var P=s,L=P.alternate,V=P.stateNode;if(L!==null&&L===c)break;P.tag===5&&V!==null&&(P=V,g?(L=ui(s,y),L!=null&&b.unshift($i(s,L,P))):g||(L=ui(s,y),L!=null&&b.push($i(s,L,P)))),s=s.return}b.length!==0&&n.push({event:o,listeners:b})}var Kw=/\r\n?/g,Qw=/\u0000|\uFFFD/g;function Vp(n){return(typeof n=="string"?n:""+n).replace(Kw,`
30
- `).replace(Qw,"")}function Hl(n,o,s){if(o=Vp(o),Vp(n)!==o&&s)throw Error(r(425))}function Wl(){}var gu=null,xu=null;function yu(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var vu=typeof setTimeout=="function"?setTimeout:void 0,Yw=typeof clearTimeout=="function"?clearTimeout:void 0,Hp=typeof Promise=="function"?Promise:void 0,Xw=typeof queueMicrotask=="function"?queueMicrotask:typeof Hp<"u"?function(n){return Hp.resolve(null).then(n).catch(Zw)}:vu;function Zw(n){setTimeout(function(){throw n})}function wu(n,o){var s=o,c=0;do{var g=s.nextSibling;if(n.removeChild(s),g&&g.nodeType===8)if(s=g.data,s==="/$"){if(c===0){n.removeChild(g),yi(o);return}c--}else s!=="$"&&s!=="$?"&&s!=="$!"||c++;s=g}while(s);yi(o)}function fr(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return n}function Wp(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"){if(o===0)return n;o--}else s==="/$"&&o++}n=n.previousSibling}return null}var wo=Math.random().toString(36).slice(2),Fn="__reactFiber$"+wo,Ri="__reactProps$"+wo,Jn="__reactContainer$"+wo,ku="__reactEvents$"+wo,ek="__reactListeners$"+wo,tk="__reactHandles$"+wo;function zr(n){var o=n[Fn];if(o)return o;for(var s=n.parentNode;s;){if(o=s[Jn]||s[Fn]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(n=Wp(n);n!==null;){if(s=n[Fn])return s;n=Wp(n)}return o}n=s,s=n.parentNode}return null}function Ii(n){return n=n[Fn]||n[Jn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function ko(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function ql(n){return n[Ri]||null}var bu=[],bo=-1;function pr(n){return{current:n}}function Ze(n){0>bo||(n.current=bu[bo],bu[bo]=null,bo--)}function Ke(n,o){bo++,bu[bo]=n.current,n.current=o}var hr={},It=pr(hr),Ut=pr(!1),Fr=hr;function So(n,o){var s=n.type.contextTypes;if(!s)return hr;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in s)g[y]=o[y];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=g),g}function Vt(n){return n=n.childContextTypes,n!=null}function Gl(){Ze(Ut),Ze(It)}function qp(n,o,s){if(It.current!==hr)throw Error(r(168));Ke(It,o),Ke(Ut,s)}function Gp(n,o,s){var c=n.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return s;c=c.getChildContext();for(var g in c)if(!(g in o))throw Error(r(108,he(n)||"Unknown",g));return T({},s,c)}function Jl(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||hr,Fr=It.current,Ke(It,n),Ke(Ut,Ut.current),!0}function Jp(n,o,s){var c=n.stateNode;if(!c)throw Error(r(169));s?(n=Gp(n,o,Fr),c.__reactInternalMemoizedMergedChildContext=n,Ze(Ut),Ze(It),Ke(It,n)):Ze(Ut),Ke(Ut,s)}var Kn=null,Kl=!1,Su=!1;function Kp(n){Kn===null?Kn=[n]:Kn.push(n)}function nk(n){Kl=!0,Kp(n)}function mr(){if(!Su&&Kn!==null){Su=!0;var n=0,o=We;try{var s=Kn;for(We=1;n<s.length;n++){var c=s[n];do c=c(!0);while(c!==null)}Kn=null,Kl=!1}catch(g){throw Kn!==null&&(Kn=Kn.slice(n+1)),Yf(Wa,mr),g}finally{We=o,Su=!1}}return null}var Co=[],Eo=0,Ql=null,Yl=0,pn=[],hn=0,_r=null,Qn=1,Yn="";function Or(n,o){Co[Eo++]=Yl,Co[Eo++]=Ql,Ql=n,Yl=o}function Qp(n,o,s){pn[hn++]=Qn,pn[hn++]=Yn,pn[hn++]=_r,_r=n;var c=Qn;n=Yn;var g=32-bn(c)-1;c&=~(1<<g),s+=1;var y=32-bn(o)+g;if(30<y){var b=g-g%5;y=(c&(1<<b)-1).toString(32),c>>=b,g-=b,Qn=1<<32-bn(o)+g|s<<g|c,Yn=y+n}else Qn=1<<y|s<<g|c,Yn=n}function Cu(n){n.return!==null&&(Or(n,1),Qp(n,1,0))}function Eu(n){for(;n===Ql;)Ql=Co[--Eo],Co[Eo]=null,Yl=Co[--Eo],Co[Eo]=null;for(;n===_r;)_r=pn[--hn],pn[hn]=null,Yn=pn[--hn],pn[hn]=null,Qn=pn[--hn],pn[hn]=null}var tn=null,nn=null,tt=!1,Cn=null;function Yp(n,o){var s=yn(5,null,null,0);s.elementType="DELETED",s.stateNode=o,s.return=n,o=n.deletions,o===null?(n.deletions=[s],n.flags|=16):o.push(s)}function Xp(n,o){switch(n.tag){case 5:var s=n.type;return o=o.nodeType!==1||s.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(n.stateNode=o,tn=n,nn=fr(o.firstChild),!0):!1;case 6:return o=n.pendingProps===""||o.nodeType!==3?null:o,o!==null?(n.stateNode=o,tn=n,nn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(s=_r!==null?{id:Qn,overflow:Yn}:null,n.memoizedState={dehydrated:o,treeContext:s,retryLane:1073741824},s=yn(18,null,null,0),s.stateNode=o,s.return=n,n.child=s,tn=n,nn=null,!0):!1;default:return!1}}function ju(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Tu(n){if(tt){var o=nn;if(o){var s=o;if(!Xp(n,o)){if(ju(n))throw Error(r(418));o=fr(s.nextSibling);var c=tn;o&&Xp(n,o)?Yp(c,s):(n.flags=n.flags&-4097|2,tt=!1,tn=n)}}else{if(ju(n))throw Error(r(418));n.flags=n.flags&-4097|2,tt=!1,tn=n}}}function Zp(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;tn=n}function Xl(n){if(n!==tn)return!1;if(!tt)return Zp(n),tt=!0,!1;var o;if((o=n.tag!==3)&&!(o=n.tag!==5)&&(o=n.type,o=o!=="head"&&o!=="body"&&!yu(n.type,n.memoizedProps)),o&&(o=nn)){if(ju(n))throw eh(),Error(r(418));for(;o;)Yp(n,o),o=fr(o.nextSibling)}if(Zp(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"){if(o===0){nn=fr(n.nextSibling);break e}o--}else s!=="$"&&s!=="$!"&&s!=="$?"||o++}n=n.nextSibling}nn=null}}else nn=tn?fr(n.stateNode.nextSibling):null;return!0}function eh(){for(var n=nn;n;)n=fr(n.nextSibling)}function jo(){nn=tn=null,tt=!1}function $u(n){Cn===null?Cn=[n]:Cn.push(n)}var rk=F.ReactCurrentBatchConfig;function Pi(n,o,s){if(n=s.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(r(309));var c=s.stateNode}if(!c)throw Error(r(147,n));var g=c,y=""+n;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===y?o.ref:(o=function(b){var P=g.refs;b===null?delete P[y]:P[y]=b},o._stringRef=y,o)}if(typeof n!="string")throw Error(r(284));if(!s._owner)throw Error(r(290,n))}return n}function Zl(n,o){throw n=Object.prototype.toString.call(o),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n))}function th(n){var o=n._init;return o(n._payload)}function nh(n){function o(D,_){if(n){var B=D.deletions;B===null?(D.deletions=[_],D.flags|=16):B.push(_)}}function s(D,_){if(!n)return null;for(;_!==null;)o(D,_),_=_.sibling;return null}function c(D,_){for(D=new Map;_!==null;)_.key!==null?D.set(_.key,_):D.set(_.index,_),_=_.sibling;return D}function g(D,_){return D=Sr(D,_),D.index=0,D.sibling=null,D}function y(D,_,B){return D.index=B,n?(B=D.alternate,B!==null?(B=B.index,B<_?(D.flags|=2,_):B):(D.flags|=2,_)):(D.flags|=1048576,_)}function b(D){return n&&D.alternate===null&&(D.flags|=2),D}function P(D,_,B,ue){return _===null||_.tag!==6?(_=vc(B,D.mode,ue),_.return=D,_):(_=g(_,B),_.return=D,_)}function L(D,_,B,ue){var Se=B.type;return Se===H?ee(D,_,B.props.children,ue,B.key):_!==null&&(_.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===pe&&th(Se)===_.type)?(ue=g(_,B.props),ue.ref=Pi(D,_,B),ue.return=D,ue):(ue=Ss(B.type,B.key,B.props,null,D.mode,ue),ue.ref=Pi(D,_,B),ue.return=D,ue)}function V(D,_,B,ue){return _===null||_.tag!==4||_.stateNode.containerInfo!==B.containerInfo||_.stateNode.implementation!==B.implementation?(_=wc(B,D.mode,ue),_.return=D,_):(_=g(_,B.children||[]),_.return=D,_)}function ee(D,_,B,ue,Se){return _===null||_.tag!==7?(_=qr(B,D.mode,ue,Se),_.return=D,_):(_=g(_,B),_.return=D,_)}function oe(D,_,B){if(typeof _=="string"&&_!==""||typeof _=="number")return _=vc(""+_,D.mode,B),_.return=D,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case O:return B=Ss(_.type,_.key,_.props,null,D.mode,B),B.ref=Pi(D,null,_),B.return=D,B;case N:return _=wc(_,D.mode,B),_.return=D,_;case pe:var ue=_._init;return oe(D,ue(_._payload),B)}if(dt(_)||de(_))return _=qr(_,D.mode,B,null),_.return=D,_;Zl(D,_)}return null}function Y(D,_,B,ue){var Se=_!==null?_.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return Se!==null?null:P(D,_,""+B,ue);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return B.key===Se?L(D,_,B,ue):null;case N:return B.key===Se?V(D,_,B,ue):null;case pe:return Se=B._init,Y(D,_,Se(B._payload),ue)}if(dt(B)||de(B))return Se!==null?null:ee(D,_,B,ue,null);Zl(D,B)}return null}function me(D,_,B,ue,Se){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return D=D.get(B)||null,P(_,D,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case O:return D=D.get(ue.key===null?B:ue.key)||null,L(_,D,ue,Se);case N:return D=D.get(ue.key===null?B:ue.key)||null,V(_,D,ue,Se);case pe:var Ce=ue._init;return me(D,_,B,Ce(ue._payload),Se)}if(dt(ue)||de(ue))return D=D.get(B)||null,ee(_,D,ue,Se,null);Zl(_,ue)}return null}function xe(D,_,B,ue){for(var Se=null,Ce=null,Ee=_,$e=_=0,yt=null;Ee!==null&&$e<B.length;$e++){Ee.index>$e?(yt=Ee,Ee=null):yt=Ee.sibling;var Ue=Y(D,Ee,B[$e],ue);if(Ue===null){Ee===null&&(Ee=yt);break}n&&Ee&&Ue.alternate===null&&o(D,Ee),_=y(Ue,_,$e),Ce===null?Se=Ue:Ce.sibling=Ue,Ce=Ue,Ee=yt}if($e===B.length)return s(D,Ee),tt&&Or(D,$e),Se;if(Ee===null){for(;$e<B.length;$e++)Ee=oe(D,B[$e],ue),Ee!==null&&(_=y(Ee,_,$e),Ce===null?Se=Ee:Ce.sibling=Ee,Ce=Ee);return tt&&Or(D,$e),Se}for(Ee=c(D,Ee);$e<B.length;$e++)yt=me(Ee,D,$e,B[$e],ue),yt!==null&&(n&&yt.alternate!==null&&Ee.delete(yt.key===null?$e:yt.key),_=y(yt,_,$e),Ce===null?Se=yt:Ce.sibling=yt,Ce=yt);return n&&Ee.forEach(function(Cr){return o(D,Cr)}),tt&&Or(D,$e),Se}function we(D,_,B,ue){var Se=de(B);if(typeof Se!="function")throw Error(r(150));if(B=Se.call(B),B==null)throw Error(r(151));for(var Ce=Se=null,Ee=_,$e=_=0,yt=null,Ue=B.next();Ee!==null&&!Ue.done;$e++,Ue=B.next()){Ee.index>$e?(yt=Ee,Ee=null):yt=Ee.sibling;var Cr=Y(D,Ee,Ue.value,ue);if(Cr===null){Ee===null&&(Ee=yt);break}n&&Ee&&Cr.alternate===null&&o(D,Ee),_=y(Cr,_,$e),Ce===null?Se=Cr:Ce.sibling=Cr,Ce=Cr,Ee=yt}if(Ue.done)return s(D,Ee),tt&&Or(D,$e),Se;if(Ee===null){for(;!Ue.done;$e++,Ue=B.next())Ue=oe(D,Ue.value,ue),Ue!==null&&(_=y(Ue,_,$e),Ce===null?Se=Ue:Ce.sibling=Ue,Ce=Ue);return tt&&Or(D,$e),Se}for(Ee=c(D,Ee);!Ue.done;$e++,Ue=B.next())Ue=me(Ee,D,$e,Ue.value,ue),Ue!==null&&(n&&Ue.alternate!==null&&Ee.delete(Ue.key===null?$e:Ue.key),_=y(Ue,_,$e),Ce===null?Se=Ue:Ce.sibling=Ue,Ce=Ue);return n&&Ee.forEach(function(Fk){return o(D,Fk)}),tt&&Or(D,$e),Se}function st(D,_,B,ue){if(typeof B=="object"&&B!==null&&B.type===H&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case O:e:{for(var Se=B.key,Ce=_;Ce!==null;){if(Ce.key===Se){if(Se=B.type,Se===H){if(Ce.tag===7){s(D,Ce.sibling),_=g(Ce,B.props.children),_.return=D,D=_;break e}}else if(Ce.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===pe&&th(Se)===Ce.type){s(D,Ce.sibling),_=g(Ce,B.props),_.ref=Pi(D,Ce,B),_.return=D,D=_;break e}s(D,Ce);break}else o(D,Ce);Ce=Ce.sibling}B.type===H?(_=qr(B.props.children,D.mode,ue,B.key),_.return=D,D=_):(ue=Ss(B.type,B.key,B.props,null,D.mode,ue),ue.ref=Pi(D,_,B),ue.return=D,D=ue)}return b(D);case N:e:{for(Ce=B.key;_!==null;){if(_.key===Ce)if(_.tag===4&&_.stateNode.containerInfo===B.containerInfo&&_.stateNode.implementation===B.implementation){s(D,_.sibling),_=g(_,B.children||[]),_.return=D,D=_;break e}else{s(D,_);break}else o(D,_);_=_.sibling}_=wc(B,D.mode,ue),_.return=D,D=_}return b(D);case pe:return Ce=B._init,st(D,_,Ce(B._payload),ue)}if(dt(B))return xe(D,_,B,ue);if(de(B))return we(D,_,B,ue);Zl(D,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,_!==null&&_.tag===6?(s(D,_.sibling),_=g(_,B),_.return=D,D=_):(s(D,_),_=vc(B,D.mode,ue),_.return=D,D=_),b(D)):s(D,_)}return st}var To=nh(!0),rh=nh(!1),es=pr(null),ts=null,$o=null,Ru=null;function Iu(){Ru=$o=ts=null}function Pu(n){var o=es.current;Ze(es),n._currentValue=o}function Nu(n,o,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),n===s)break;n=n.return}}function Ro(n,o){ts=n,Ru=$o=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(Ht=!0),n.firstContext=null)}function mn(n){var o=n._currentValue;if(Ru!==n)if(n={context:n,memoizedValue:o,next:null},$o===null){if(ts===null)throw Error(r(308));$o=n,ts.dependencies={lanes:0,firstContext:n}}else $o=$o.next=n;return o}var Mr=null;function Au(n){Mr===null?Mr=[n]:Mr.push(n)}function oh(n,o,s,c){var g=o.interleaved;return g===null?(s.next=s,Au(o)):(s.next=g.next,g.next=s),o.interleaved=s,Xn(n,c)}function Xn(n,o){n.lanes|=o;var s=n.alternate;for(s!==null&&(s.lanes|=o),s=n,n=n.return;n!==null;)n.childLanes|=o,s=n.alternate,s!==null&&(s.childLanes|=o),s=n,n=n.return;return s.tag===3?s.stateNode:null}var gr=!1;function Lu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ih(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Zn(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function xr(n,o,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Be&2)!==0){var g=c.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),c.pending=o,Xn(n,s)}return g=c.interleaved,g===null?(o.next=o,Au(c)):(o.next=g.next,g.next=o),c.interleaved=o,Xn(n,s)}function ns(n,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194240)!==0)){var c=o.lanes;c&=n.pendingLanes,s|=c,o.lanes=s,Ja(n,s)}}function lh(n,o){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var g=null,y=null;if(s=s.firstBaseUpdate,s!==null){do{var b={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};y===null?g=y=b:y=y.next=b,s=s.next}while(s!==null);y===null?g=y=o:y=y.next=o}else g=y=o;s={baseState:c.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:c.shared,effects:c.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=o:n.next=o,s.lastBaseUpdate=o}function rs(n,o,s,c){var g=n.updateQueue;gr=!1;var y=g.firstBaseUpdate,b=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var L=P,V=L.next;L.next=null,b===null?y=V:b.next=V,b=L;var ee=n.alternate;ee!==null&&(ee=ee.updateQueue,P=ee.lastBaseUpdate,P!==b&&(P===null?ee.firstBaseUpdate=V:P.next=V,ee.lastBaseUpdate=L))}if(y!==null){var oe=g.baseState;b=0,ee=V=L=null,P=y;do{var Y=P.lane,me=P.eventTime;if((c&Y)===Y){ee!==null&&(ee=ee.next={eventTime:me,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var xe=n,we=P;switch(Y=o,me=s,we.tag){case 1:if(xe=we.payload,typeof xe=="function"){oe=xe.call(me,oe,Y);break e}oe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=we.payload,Y=typeof xe=="function"?xe.call(me,oe,Y):xe,Y==null)break e;oe=T({},oe,Y);break e;case 2:gr=!0}}P.callback!==null&&P.lane!==0&&(n.flags|=64,Y=g.effects,Y===null?g.effects=[P]:Y.push(P))}else me={eventTime:me,lane:Y,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ee===null?(V=ee=me,L=oe):ee=ee.next=me,b|=Y;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;Y=P,P=Y.next,Y.next=null,g.lastBaseUpdate=Y,g.shared.pending=null}}while(!0);if(ee===null&&(L=oe),g.baseState=L,g.firstBaseUpdate=V,g.lastBaseUpdate=ee,o=g.shared.interleaved,o!==null){g=o;do b|=g.lane,g=g.next;while(g!==o)}else y===null&&(g.shared.lanes=0);Ur|=b,n.lanes=b,n.memoizedState=oe}}function sh(n,o,s){if(n=o.effects,o.effects=null,n!==null)for(o=0;o<n.length;o++){var c=n[o],g=c.callback;if(g!==null){if(c.callback=null,c=s,typeof g!="function")throw Error(r(191,g));g.call(c)}}}var Ni={},_n=pr(Ni),Ai=pr(Ni),Li=pr(Ni);function Dr(n){if(n===Ni)throw Error(r(174));return n}function zu(n,o){switch(Ke(Li,o),Ke(Ai,n),Ke(_n,Ni),n=o.nodeType,n){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:te(null,"");break;default:n=n===8?o.parentNode:o,o=n.namespaceURI||null,n=n.tagName,o=te(o,n)}Ze(_n),Ke(_n,o)}function Io(){Ze(_n),Ze(Ai),Ze(Li)}function ah(n){Dr(Li.current);var o=Dr(_n.current),s=te(o,n.type);o!==s&&(Ke(Ai,n),Ke(_n,s))}function Fu(n){Ai.current===n&&(Ze(_n),Ze(Ai))}var rt=pr(0);function os(n){for(var o=n;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var _u=[];function Ou(){for(var n=0;n<_u.length;n++)_u[n]._workInProgressVersionPrimary=null;_u.length=0}var is=F.ReactCurrentDispatcher,Mu=F.ReactCurrentBatchConfig,Br=0,ot=null,pt=null,gt=null,ls=!1,zi=!1,Fi=0,ok=0;function Pt(){throw Error(r(321))}function Du(n,o){if(o===null)return!1;for(var s=0;s<o.length&&s<n.length;s++)if(!Sn(n[s],o[s]))return!1;return!0}function Bu(n,o,s,c,g,y){if(Br=y,ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,is.current=n===null||n.memoizedState===null?ak:uk,n=s(c,g),zi){y=0;do{if(zi=!1,Fi=0,25<=y)throw Error(r(301));y+=1,gt=pt=null,o.updateQueue=null,is.current=ck,n=s(c,g)}while(zi)}if(is.current=us,o=pt!==null&&pt.next!==null,Br=0,gt=pt=ot=null,ls=!1,o)throw Error(r(300));return n}function Uu(){var n=Fi!==0;return Fi=0,n}function On(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?ot.memoizedState=gt=n:gt=gt.next=n,gt}function gn(){if(pt===null){var n=ot.alternate;n=n!==null?n.memoizedState:null}else n=pt.next;var o=gt===null?ot.memoizedState:gt.next;if(o!==null)gt=o,pt=n;else{if(n===null)throw Error(r(310));pt=n,n={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},gt===null?ot.memoizedState=gt=n:gt=gt.next=n}return gt}function _i(n,o){return typeof o=="function"?o(n):o}function Vu(n){var o=gn(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var c=pt,g=c.baseQueue,y=s.pending;if(y!==null){if(g!==null){var b=g.next;g.next=y.next,y.next=b}c.baseQueue=g=y,s.pending=null}if(g!==null){y=g.next,c=c.baseState;var P=b=null,L=null,V=y;do{var ee=V.lane;if((Br&ee)===ee)L!==null&&(L=L.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),c=V.hasEagerState?V.eagerState:n(c,V.action);else{var oe={lane:ee,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};L===null?(P=L=oe,b=c):L=L.next=oe,ot.lanes|=ee,Ur|=ee}V=V.next}while(V!==null&&V!==y);L===null?b=c:L.next=P,Sn(c,o.memoizedState)||(Ht=!0),o.memoizedState=c,o.baseState=b,o.baseQueue=L,s.lastRenderedState=c}if(n=s.interleaved,n!==null){g=n;do y=g.lane,ot.lanes|=y,Ur|=y,g=g.next;while(g!==n)}else g===null&&(s.lanes=0);return[o.memoizedState,s.dispatch]}function Hu(n){var o=gn(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var c=s.dispatch,g=s.pending,y=o.memoizedState;if(g!==null){s.pending=null;var b=g=g.next;do y=n(y,b.action),b=b.next;while(b!==g);Sn(y,o.memoizedState)||(Ht=!0),o.memoizedState=y,o.baseQueue===null&&(o.baseState=y),s.lastRenderedState=y}return[y,c]}function uh(){}function ch(n,o){var s=ot,c=gn(),g=o(),y=!Sn(c.memoizedState,g);if(y&&(c.memoizedState=g,Ht=!0),c=c.queue,Wu(ph.bind(null,s,c,n),[n]),c.getSnapshot!==o||y||gt!==null&&gt.memoizedState.tag&1){if(s.flags|=2048,Oi(9,fh.bind(null,s,c,g,o),void 0,null),xt===null)throw Error(r(349));(Br&30)!==0||dh(s,o,g)}return g}function dh(n,o,s){n.flags|=16384,n={getSnapshot:o,value:s},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.stores=[n]):(s=o.stores,s===null?o.stores=[n]:s.push(n))}function fh(n,o,s,c){o.value=s,o.getSnapshot=c,hh(o)&&mh(n)}function ph(n,o,s){return s(function(){hh(o)&&mh(n)})}function hh(n){var o=n.getSnapshot;n=n.value;try{var s=o();return!Sn(n,s)}catch{return!0}}function mh(n){var o=Xn(n,1);o!==null&&$n(o,n,1,-1)}function gh(n){var o=On();return typeof n=="function"&&(n=n()),o.memoizedState=o.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:n},o.queue=n,n=n.dispatch=sk.bind(null,ot,n),[o.memoizedState,n]}function Oi(n,o,s,c){return n={tag:n,create:o,destroy:s,deps:c,next:null},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.lastEffect=n.next=n):(s=o.lastEffect,s===null?o.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,o.lastEffect=n)),n}function xh(){return gn().memoizedState}function ss(n,o,s,c){var g=On();ot.flags|=n,g.memoizedState=Oi(1|o,s,void 0,c===void 0?null:c)}function as(n,o,s,c){var g=gn();c=c===void 0?null:c;var y=void 0;if(pt!==null){var b=pt.memoizedState;if(y=b.destroy,c!==null&&Du(c,b.deps)){g.memoizedState=Oi(o,s,y,c);return}}ot.flags|=n,g.memoizedState=Oi(1|o,s,y,c)}function yh(n,o){return ss(8390656,8,n,o)}function Wu(n,o){return as(2048,8,n,o)}function vh(n,o){return as(4,2,n,o)}function wh(n,o){return as(4,4,n,o)}function kh(n,o){if(typeof o=="function")return n=n(),o(n),function(){o(null)};if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function bh(n,o,s){return s=s!=null?s.concat([n]):null,as(4,4,kh.bind(null,o,n),s)}function qu(){}function Sh(n,o){var s=gn();o=o===void 0?null:o;var c=s.memoizedState;return c!==null&&o!==null&&Du(o,c[1])?c[0]:(s.memoizedState=[n,o],n)}function Ch(n,o){var s=gn();o=o===void 0?null:o;var c=s.memoizedState;return c!==null&&o!==null&&Du(o,c[1])?c[0]:(n=n(),s.memoizedState=[n,o],n)}function Eh(n,o,s){return(Br&21)===0?(n.baseState&&(n.baseState=!1,Ht=!0),n.memoizedState=s):(Sn(s,o)||(s=tp(),ot.lanes|=s,Ur|=s,n.baseState=!0),o)}function ik(n,o){var s=We;We=s!==0&&4>s?s:4,n(!0);var c=Mu.transition;Mu.transition={};try{n(!1),o()}finally{We=s,Mu.transition=c}}function jh(){return gn().memoizedState}function lk(n,o,s){var c=kr(n);if(s={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null},Th(n))$h(o,s);else if(s=oh(n,o,s,c),s!==null){var g=Mt();$n(s,n,c,g),Rh(s,o,c)}}function sk(n,o,s){var c=kr(n),g={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null};if(Th(n))$h(o,g);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=o.lastRenderedReducer,y!==null))try{var b=o.lastRenderedState,P=y(b,s);if(g.hasEagerState=!0,g.eagerState=P,Sn(P,b)){var L=o.interleaved;L===null?(g.next=g,Au(o)):(g.next=L.next,L.next=g),o.interleaved=g;return}}catch{}finally{}s=oh(n,o,g,c),s!==null&&(g=Mt(),$n(s,n,c,g),Rh(s,o,c))}}function Th(n){var o=n.alternate;return n===ot||o!==null&&o===ot}function $h(n,o){zi=ls=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function Rh(n,o,s){if((s&4194240)!==0){var c=o.lanes;c&=n.pendingLanes,s|=c,o.lanes=s,Ja(n,s)}}var us={readContext:mn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},ak={readContext:mn,useCallback:function(n,o){return On().memoizedState=[n,o===void 0?null:o],n},useContext:mn,useEffect:yh,useImperativeHandle:function(n,o,s){return s=s!=null?s.concat([n]):null,ss(4194308,4,kh.bind(null,o,n),s)},useLayoutEffect:function(n,o){return ss(4194308,4,n,o)},useInsertionEffect:function(n,o){return ss(4,2,n,o)},useMemo:function(n,o){var s=On();return o=o===void 0?null:o,n=n(),s.memoizedState=[n,o],n},useReducer:function(n,o,s){var c=On();return o=s!==void 0?s(o):o,c.memoizedState=c.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},c.queue=n,n=n.dispatch=lk.bind(null,ot,n),[c.memoizedState,n]},useRef:function(n){var o=On();return n={current:n},o.memoizedState=n},useState:gh,useDebugValue:qu,useDeferredValue:function(n){return On().memoizedState=n},useTransition:function(){var n=gh(!1),o=n[0];return n=ik.bind(null,n[1]),On().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,s){var c=ot,g=On();if(tt){if(s===void 0)throw Error(r(407));s=s()}else{if(s=o(),xt===null)throw Error(r(349));(Br&30)!==0||dh(c,o,s)}g.memoizedState=s;var y={value:s,getSnapshot:o};return g.queue=y,yh(ph.bind(null,c,y,n),[n]),c.flags|=2048,Oi(9,fh.bind(null,c,y,s,o),void 0,null),s},useId:function(){var n=On(),o=xt.identifierPrefix;if(tt){var s=Yn,c=Qn;s=(c&~(1<<32-bn(c)-1)).toString(32)+s,o=":"+o+"R"+s,s=Fi++,0<s&&(o+="H"+s.toString(32)),o+=":"}else s=ok++,o=":"+o+"r"+s.toString(32)+":";return n.memoizedState=o},unstable_isNewReconciler:!1},uk={readContext:mn,useCallback:Sh,useContext:mn,useEffect:Wu,useImperativeHandle:bh,useInsertionEffect:vh,useLayoutEffect:wh,useMemo:Ch,useReducer:Vu,useRef:xh,useState:function(){return Vu(_i)},useDebugValue:qu,useDeferredValue:function(n){var o=gn();return Eh(o,pt.memoizedState,n)},useTransition:function(){var n=Vu(_i)[0],o=gn().memoizedState;return[n,o]},useMutableSource:uh,useSyncExternalStore:ch,useId:jh,unstable_isNewReconciler:!1},ck={readContext:mn,useCallback:Sh,useContext:mn,useEffect:Wu,useImperativeHandle:bh,useInsertionEffect:vh,useLayoutEffect:wh,useMemo:Ch,useReducer:Hu,useRef:xh,useState:function(){return Hu(_i)},useDebugValue:qu,useDeferredValue:function(n){var o=gn();return pt===null?o.memoizedState=n:Eh(o,pt.memoizedState,n)},useTransition:function(){var n=Hu(_i)[0],o=gn().memoizedState;return[n,o]},useMutableSource:uh,useSyncExternalStore:ch,useId:jh,unstable_isNewReconciler:!1};function En(n,o){if(n&&n.defaultProps){o=T({},o),n=n.defaultProps;for(var s in n)o[s]===void 0&&(o[s]=n[s]);return o}return o}function Gu(n,o,s,c){o=n.memoizedState,s=s(c,o),s=s==null?o:T({},o,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var cs={isMounted:function(n){return(n=n._reactInternals)?Lr(n)===n:!1},enqueueSetState:function(n,o,s){n=n._reactInternals;var c=Mt(),g=kr(n),y=Zn(c,g);y.payload=o,s!=null&&(y.callback=s),o=xr(n,y,g),o!==null&&($n(o,n,g,c),ns(o,n,g))},enqueueReplaceState:function(n,o,s){n=n._reactInternals;var c=Mt(),g=kr(n),y=Zn(c,g);y.tag=1,y.payload=o,s!=null&&(y.callback=s),o=xr(n,y,g),o!==null&&($n(o,n,g,c),ns(o,n,g))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var s=Mt(),c=kr(n),g=Zn(s,c);g.tag=2,o!=null&&(g.callback=o),o=xr(n,g,c),o!==null&&($n(o,n,c,s),ns(o,n,c))}};function Ih(n,o,s,c,g,y,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,b):o.prototype&&o.prototype.isPureReactComponent?!Ci(s,c)||!Ci(g,y):!0}function Ph(n,o,s){var c=!1,g=hr,y=o.contextType;return typeof y=="object"&&y!==null?y=mn(y):(g=Vt(o)?Fr:It.current,c=o.contextTypes,y=(c=c!=null)?So(n,g):hr),o=new o(s,y),n.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=cs,n.stateNode=o,o._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=g,n.__reactInternalMemoizedMaskedChildContext=y),o}function Nh(n,o,s,c){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(s,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(s,c),o.state!==n&&cs.enqueueReplaceState(o,o.state,null)}function Ju(n,o,s,c){var g=n.stateNode;g.props=s,g.state=n.memoizedState,g.refs={},Lu(n);var y=o.contextType;typeof y=="object"&&y!==null?g.context=mn(y):(y=Vt(o)?Fr:It.current,g.context=So(n,y)),g.state=n.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(Gu(n,o,y,s),g.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&cs.enqueueReplaceState(g,g.state,null),rs(n,s,g,c),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308)}function Po(n,o){try{var s="",c=o;do s+=ye(c),c=c.return;while(c);var g=s}catch(y){g=`
31
- Error generating stack: `+y.message+`
32
- `+y.stack}return{value:n,source:o,stack:g,digest:null}}function Ku(n,o,s){return{value:n,source:null,stack:s??null,digest:o??null}}function Qu(n,o){try{console.error(o.value)}catch(s){setTimeout(function(){throw s})}}var dk=typeof WeakMap=="function"?WeakMap:Map;function Ah(n,o,s){s=Zn(-1,s),s.tag=3,s.payload={element:null};var c=o.value;return s.callback=function(){xs||(xs=!0,dc=c),Qu(n,o)},s}function Lh(n,o,s){s=Zn(-1,s),s.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var g=o.value;s.payload=function(){return c(g)},s.callback=function(){Qu(n,o)}}var y=n.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(s.callback=function(){Qu(n,o),typeof c!="function"&&(vr===null?vr=new Set([this]):vr.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})}),s}function zh(n,o,s){var c=n.pingCache;if(c===null){c=n.pingCache=new dk;var g=new Set;c.set(o,g)}else g=c.get(o),g===void 0&&(g=new Set,c.set(o,g));g.has(s)||(g.add(s),n=Ek.bind(null,n,o,s),o.then(n,n))}function Fh(n){do{var o;if((o=n.tag===13)&&(o=n.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return n;n=n.return}while(n!==null);return null}function _h(n,o,s,c,g){return(n.mode&1)===0?(n===o?n.flags|=65536:(n.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(o=Zn(-1,1),o.tag=2,xr(s,o,1))),s.lanes|=1),n):(n.flags|=65536,n.lanes=g,n)}var fk=F.ReactCurrentOwner,Ht=!1;function Ot(n,o,s,c){o.child=n===null?rh(o,null,s,c):To(o,n.child,s,c)}function Oh(n,o,s,c,g){s=s.render;var y=o.ref;return Ro(o,g),c=Bu(n,o,s,c,y,g),s=Uu(),n!==null&&!Ht?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~g,er(n,o,g)):(tt&&s&&Cu(o),o.flags|=1,Ot(n,o,c,g),o.child)}function Mh(n,o,s,c,g){if(n===null){var y=s.type;return typeof y=="function"&&!yc(y)&&y.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(o.tag=15,o.type=y,Dh(n,o,y,c,g)):(n=Ss(s.type,null,c,o,o.mode,g),n.ref=o.ref,n.return=o,o.child=n)}if(y=n.child,(n.lanes&g)===0){var b=y.memoizedProps;if(s=s.compare,s=s!==null?s:Ci,s(b,c)&&n.ref===o.ref)return er(n,o,g)}return o.flags|=1,n=Sr(y,c),n.ref=o.ref,n.return=o,o.child=n}function Dh(n,o,s,c,g){if(n!==null){var y=n.memoizedProps;if(Ci(y,c)&&n.ref===o.ref)if(Ht=!1,o.pendingProps=c=y,(n.lanes&g)!==0)(n.flags&131072)!==0&&(Ht=!0);else return o.lanes=n.lanes,er(n,o,g)}return Yu(n,o,s,c,g)}function Bh(n,o,s){var c=o.pendingProps,g=c.children,y=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke(Ao,rn),rn|=s;else{if((s&1073741824)===0)return n=y!==null?y.baseLanes|s:s,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:n,cachePool:null,transitions:null},o.updateQueue=null,Ke(Ao,rn),rn|=n,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=y!==null?y.baseLanes:s,Ke(Ao,rn),rn|=c}else y!==null?(c=y.baseLanes|s,o.memoizedState=null):c=s,Ke(Ao,rn),rn|=c;return Ot(n,o,g,s),o.child}function Uh(n,o){var s=o.ref;(n===null&&s!==null||n!==null&&n.ref!==s)&&(o.flags|=512,o.flags|=2097152)}function Yu(n,o,s,c,g){var y=Vt(s)?Fr:It.current;return y=So(o,y),Ro(o,g),s=Bu(n,o,s,c,y,g),c=Uu(),n!==null&&!Ht?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~g,er(n,o,g)):(tt&&c&&Cu(o),o.flags|=1,Ot(n,o,s,g),o.child)}function Vh(n,o,s,c,g){if(Vt(s)){var y=!0;Jl(o)}else y=!1;if(Ro(o,g),o.stateNode===null)fs(n,o),Ph(o,s,c),Ju(o,s,c,g),c=!0;else if(n===null){var b=o.stateNode,P=o.memoizedProps;b.props=P;var L=b.context,V=s.contextType;typeof V=="object"&&V!==null?V=mn(V):(V=Vt(s)?Fr:It.current,V=So(o,V));var ee=s.getDerivedStateFromProps,oe=typeof ee=="function"||typeof b.getSnapshotBeforeUpdate=="function";oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P!==c||L!==V)&&Nh(o,b,c,V),gr=!1;var Y=o.memoizedState;b.state=Y,rs(o,c,b,g),L=o.memoizedState,P!==c||Y!==L||Ut.current||gr?(typeof ee=="function"&&(Gu(o,s,ee,c),L=o.memoizedState),(P=gr||Ih(o,s,P,c,Y,L,V))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=L),b.props=c,b.state=L,b.context=V,c=P):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{b=o.stateNode,ih(n,o),P=o.memoizedProps,V=o.type===o.elementType?P:En(o.type,P),b.props=V,oe=o.pendingProps,Y=b.context,L=s.contextType,typeof L=="object"&&L!==null?L=mn(L):(L=Vt(s)?Fr:It.current,L=So(o,L));var me=s.getDerivedStateFromProps;(ee=typeof me=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P!==oe||Y!==L)&&Nh(o,b,c,L),gr=!1,Y=o.memoizedState,b.state=Y,rs(o,c,b,g);var xe=o.memoizedState;P!==oe||Y!==xe||Ut.current||gr?(typeof me=="function"&&(Gu(o,s,me,c),xe=o.memoizedState),(V=gr||Ih(o,s,V,c,Y,xe,L)||!1)?(ee||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(c,xe,L),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(c,xe,L)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||P===n.memoizedProps&&Y===n.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&Y===n.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=xe),b.props=c,b.state=xe,b.context=L,c=V):(typeof b.componentDidUpdate!="function"||P===n.memoizedProps&&Y===n.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&Y===n.memoizedState||(o.flags|=1024),c=!1)}return Xu(n,o,s,c,y,g)}function Xu(n,o,s,c,g,y){Uh(n,o);var b=(o.flags&128)!==0;if(!c&&!b)return g&&Jp(o,s,!1),er(n,o,y);c=o.stateNode,fk.current=o;var P=b&&typeof s.getDerivedStateFromError!="function"?null:c.render();return o.flags|=1,n!==null&&b?(o.child=To(o,n.child,null,y),o.child=To(o,null,P,y)):Ot(n,o,P,y),o.memoizedState=c.state,g&&Jp(o,s,!0),o.child}function Hh(n){var o=n.stateNode;o.pendingContext?qp(n,o.pendingContext,o.pendingContext!==o.context):o.context&&qp(n,o.context,!1),zu(n,o.containerInfo)}function Wh(n,o,s,c,g){return jo(),$u(g),o.flags|=256,Ot(n,o,s,c),o.child}var Zu={dehydrated:null,treeContext:null,retryLane:0};function ec(n){return{baseLanes:n,cachePool:null,transitions:null}}function qh(n,o,s){var c=o.pendingProps,g=rt.current,y=!1,b=(o.flags&128)!==0,P;if((P=b)||(P=n!==null&&n.memoizedState===null?!1:(g&2)!==0),P?(y=!0,o.flags&=-129):(n===null||n.memoizedState!==null)&&(g|=1),Ke(rt,g&1),n===null)return Tu(o),n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((o.mode&1)===0?o.lanes=1:n.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(b=c.children,n=c.fallback,y?(c=o.mode,y=o.child,b={mode:"hidden",children:b},(c&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=b):y=Cs(b,c,0,null),n=qr(n,c,s,null),y.return=o,n.return=o,y.sibling=n,o.child=y,o.child.memoizedState=ec(s),o.memoizedState=Zu,n):tc(o,b));if(g=n.memoizedState,g!==null&&(P=g.dehydrated,P!==null))return pk(n,o,b,c,P,g,s);if(y){y=c.fallback,b=o.mode,g=n.child,P=g.sibling;var L={mode:"hidden",children:c.children};return(b&1)===0&&o.child!==g?(c=o.child,c.childLanes=0,c.pendingProps=L,o.deletions=null):(c=Sr(g,L),c.subtreeFlags=g.subtreeFlags&14680064),P!==null?y=Sr(P,y):(y=qr(y,b,s,null),y.flags|=2),y.return=o,c.return=o,c.sibling=y,o.child=c,c=y,y=o.child,b=n.child.memoizedState,b=b===null?ec(s):{baseLanes:b.baseLanes|s,cachePool:null,transitions:b.transitions},y.memoizedState=b,y.childLanes=n.childLanes&~s,o.memoizedState=Zu,c}return y=n.child,n=y.sibling,c=Sr(y,{mode:"visible",children:c.children}),(o.mode&1)===0&&(c.lanes=s),c.return=o,c.sibling=null,n!==null&&(s=o.deletions,s===null?(o.deletions=[n],o.flags|=16):s.push(n)),o.child=c,o.memoizedState=null,c}function tc(n,o){return o=Cs({mode:"visible",children:o},n.mode,0,null),o.return=n,n.child=o}function ds(n,o,s,c){return c!==null&&$u(c),To(o,n.child,null,s),n=tc(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function pk(n,o,s,c,g,y,b){if(s)return o.flags&256?(o.flags&=-257,c=Ku(Error(r(422))),ds(n,o,b,c)):o.memoizedState!==null?(o.child=n.child,o.flags|=128,null):(y=c.fallback,g=o.mode,c=Cs({mode:"visible",children:c.children},g,0,null),y=qr(y,g,b,null),y.flags|=2,c.return=o,y.return=o,c.sibling=y,o.child=c,(o.mode&1)!==0&&To(o,n.child,null,b),o.child.memoizedState=ec(b),o.memoizedState=Zu,y);if((o.mode&1)===0)return ds(n,o,b,null);if(g.data==="$!"){if(c=g.nextSibling&&g.nextSibling.dataset,c)var P=c.dgst;return c=P,y=Error(r(419)),c=Ku(y,c,void 0),ds(n,o,b,c)}if(P=(b&n.childLanes)!==0,Ht||P){if(c=xt,c!==null){switch(b&-b){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(c.suspendedLanes|b))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Xn(n,g),$n(c,n,g,-1))}return xc(),c=Ku(Error(r(421))),ds(n,o,b,c)}return g.data==="$?"?(o.flags|=128,o.child=n.child,o=jk.bind(null,n),g._reactRetry=o,null):(n=y.treeContext,nn=fr(g.nextSibling),tn=o,tt=!0,Cn=null,n!==null&&(pn[hn++]=Qn,pn[hn++]=Yn,pn[hn++]=_r,Qn=n.id,Yn=n.overflow,_r=o),o=tc(o,c.children),o.flags|=4096,o)}function Gh(n,o,s){n.lanes|=o;var c=n.alternate;c!==null&&(c.lanes|=o),Nu(n.return,o,s)}function nc(n,o,s,c,g){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:g}:(y.isBackwards=o,y.rendering=null,y.renderingStartTime=0,y.last=c,y.tail=s,y.tailMode=g)}function Jh(n,o,s){var c=o.pendingProps,g=c.revealOrder,y=c.tail;if(Ot(n,o,c.children,s),c=rt.current,(c&2)!==0)c=c&1|2,o.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Gh(n,s,o);else if(n.tag===19)Gh(n,s,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(Ke(rt,c),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(s=o.child,g=null;s!==null;)n=s.alternate,n!==null&&os(n)===null&&(g=s),s=s.sibling;s=g,s===null?(g=o.child,o.child=null):(g=s.sibling,s.sibling=null),nc(o,!1,g,s,y);break;case"backwards":for(s=null,g=o.child,o.child=null;g!==null;){if(n=g.alternate,n!==null&&os(n)===null){o.child=g;break}n=g.sibling,g.sibling=s,s=g,g=n}nc(o,!0,s,null,y);break;case"together":nc(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function fs(n,o){(o.mode&1)===0&&n!==null&&(n.alternate=null,o.alternate=null,o.flags|=2)}function er(n,o,s){if(n!==null&&(o.dependencies=n.dependencies),Ur|=o.lanes,(s&o.childLanes)===0)return null;if(n!==null&&o.child!==n.child)throw Error(r(153));if(o.child!==null){for(n=o.child,s=Sr(n,n.pendingProps),o.child=s,s.return=o;n.sibling!==null;)n=n.sibling,s=s.sibling=Sr(n,n.pendingProps),s.return=o;s.sibling=null}return o.child}function hk(n,o,s){switch(o.tag){case 3:Hh(o),jo();break;case 5:ah(o);break;case 1:Vt(o.type)&&Jl(o);break;case 4:zu(o,o.stateNode.containerInfo);break;case 10:var c=o.type._context,g=o.memoizedProps.value;Ke(es,c._currentValue),c._currentValue=g;break;case 13:if(c=o.memoizedState,c!==null)return c.dehydrated!==null?(Ke(rt,rt.current&1),o.flags|=128,null):(s&o.child.childLanes)!==0?qh(n,o,s):(Ke(rt,rt.current&1),n=er(n,o,s),n!==null?n.sibling:null);Ke(rt,rt.current&1);break;case 19:if(c=(s&o.childLanes)!==0,(n.flags&128)!==0){if(c)return Jh(n,o,s);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Ke(rt,rt.current),c)break;return null;case 22:case 23:return o.lanes=0,Bh(n,o,s)}return er(n,o,s)}var Kh,rc,Qh,Yh;Kh=function(n,o){for(var s=o.child;s!==null;){if(s.tag===5||s.tag===6)n.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},rc=function(){},Qh=function(n,o,s,c){var g=n.memoizedProps;if(g!==c){n=o.stateNode,Dr(_n.current);var y=null;switch(s){case"input":g=$t(n,g),c=$t(n,c),y=[];break;case"select":g=T({},g,{value:void 0}),c=T({},c,{value:void 0}),y=[];break;case"textarea":g=ft(n,g),c=ft(n,c),y=[];break;default:typeof g.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=Wl)}Ct(s,c);var b;s=null;for(V in g)if(!c.hasOwnProperty(V)&&g.hasOwnProperty(V)&&g[V]!=null)if(V==="style"){var P=g[V];for(b in P)P.hasOwnProperty(b)&&(s||(s={}),s[b]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(l.hasOwnProperty(V)?y||(y=[]):(y=y||[]).push(V,null));for(V in c){var L=c[V];if(P=g!=null?g[V]:void 0,c.hasOwnProperty(V)&&L!==P&&(L!=null||P!=null))if(V==="style")if(P){for(b in P)!P.hasOwnProperty(b)||L&&L.hasOwnProperty(b)||(s||(s={}),s[b]="");for(b in L)L.hasOwnProperty(b)&&P[b]!==L[b]&&(s||(s={}),s[b]=L[b])}else s||(y||(y=[]),y.push(V,s)),s=L;else V==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,P=P?P.__html:void 0,L!=null&&P!==L&&(y=y||[]).push(V,L)):V==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(V,""+L):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(l.hasOwnProperty(V)?(L!=null&&V==="onScroll"&&Xe("scroll",n),y||P===L||(y=[])):(y=y||[]).push(V,L))}s&&(y=y||[]).push("style",s);var V=y;(o.updateQueue=V)&&(o.flags|=4)}},Yh=function(n,o,s,c){s!==c&&(o.flags|=4)};function Mi(n,o){if(!tt)switch(n.tailMode){case"hidden":o=n.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Nt(n){var o=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(o)for(var g=n.child;g!==null;)s|=g.lanes|g.childLanes,c|=g.subtreeFlags&14680064,c|=g.flags&14680064,g.return=n,g=g.sibling;else for(g=n.child;g!==null;)s|=g.lanes|g.childLanes,c|=g.subtreeFlags,c|=g.flags,g.return=n,g=g.sibling;return n.subtreeFlags|=c,n.childLanes=s,o}function mk(n,o,s){var c=o.pendingProps;switch(Eu(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(o),null;case 1:return Vt(o.type)&&Gl(),Nt(o),null;case 3:return c=o.stateNode,Io(),Ze(Ut),Ze(It),Ou(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(Xl(o)?o.flags|=4:n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Cn!==null&&(hc(Cn),Cn=null))),rc(n,o),Nt(o),null;case 5:Fu(o);var g=Dr(Li.current);if(s=o.type,n!==null&&o.stateNode!=null)Qh(n,o,s,c,g),n.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!c){if(o.stateNode===null)throw Error(r(166));return Nt(o),null}if(n=Dr(_n.current),Xl(o)){c=o.stateNode,s=o.type;var y=o.memoizedProps;switch(c[Fn]=o,c[Ri]=y,n=(o.mode&1)!==0,s){case"dialog":Xe("cancel",c),Xe("close",c);break;case"iframe":case"object":case"embed":Xe("load",c);break;case"video":case"audio":for(g=0;g<ji.length;g++)Xe(ji[g],c);break;case"source":Xe("error",c);break;case"img":case"image":case"link":Xe("error",c),Xe("load",c);break;case"details":Xe("toggle",c);break;case"input":bt(c,y),Xe("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!y.multiple},Xe("invalid",c);break;case"textarea":De(c,y),Xe("invalid",c)}Ct(s,y),g=null;for(var b in y)if(y.hasOwnProperty(b)){var P=y[b];b==="children"?typeof P=="string"?c.textContent!==P&&(y.suppressHydrationWarning!==!0&&Hl(c.textContent,P,n),g=["children",P]):typeof P=="number"&&c.textContent!==""+P&&(y.suppressHydrationWarning!==!0&&Hl(c.textContent,P,n),g=["children",""+P]):l.hasOwnProperty(b)&&P!=null&&b==="onScroll"&&Xe("scroll",c)}switch(s){case"input":Le(c),co(c,y,!0);break;case"textarea":Le(c),Rt(c);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(c.onclick=Wl)}c=g,o.updateQueue=c,c!==null&&(o.flags|=4)}else{b=g.nodeType===9?g:g.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=G(s)),n==="http://www.w3.org/1999/xhtml"?s==="script"?(n=b.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=b.createElement(s,{is:c.is}):(n=b.createElement(s),s==="select"&&(b=n,c.multiple?b.multiple=!0:c.size&&(b.size=c.size))):n=b.createElementNS(n,s),n[Fn]=o,n[Ri]=c,Kh(n,o,!1,!1),o.stateNode=n;e:{switch(b=Ln(s,c),s){case"dialog":Xe("cancel",n),Xe("close",n),g=c;break;case"iframe":case"object":case"embed":Xe("load",n),g=c;break;case"video":case"audio":for(g=0;g<ji.length;g++)Xe(ji[g],n);g=c;break;case"source":Xe("error",n),g=c;break;case"img":case"image":case"link":Xe("error",n),Xe("load",n),g=c;break;case"details":Xe("toggle",n),g=c;break;case"input":bt(n,c),g=$t(n,c),Xe("invalid",n);break;case"option":g=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},g=T({},c,{value:void 0}),Xe("invalid",n);break;case"textarea":De(n,c),g=ft(n,c),Xe("invalid",n);break;default:g=c}Ct(s,g),P=g;for(y in P)if(P.hasOwnProperty(y)){var L=P[y];y==="style"?ir(n,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&Te(n,L)):y==="children"?typeof L=="string"?(s!=="textarea"||L!=="")&&Pe(n,L):typeof L=="number"&&Pe(n,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(l.hasOwnProperty(y)?L!=null&&y==="onScroll"&&Xe("scroll",n):L!=null&&A(n,y,L,b))}switch(s){case"input":Le(n),co(n,c,!1);break;case"textarea":Le(n),Rt(n);break;case"option":c.value!=null&&n.setAttribute("value",""+fe(c.value));break;case"select":n.multiple=!!c.multiple,y=c.value,y!=null?_t(n,!!c.multiple,y,!1):c.defaultValue!=null&&_t(n,!!c.multiple,c.defaultValue,!0);break;default:typeof g.onClick=="function"&&(n.onclick=Wl)}switch(s){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Nt(o),null;case 6:if(n&&o.stateNode!=null)Yh(n,o,n.memoizedProps,c);else{if(typeof c!="string"&&o.stateNode===null)throw Error(r(166));if(s=Dr(Li.current),Dr(_n.current),Xl(o)){if(c=o.stateNode,s=o.memoizedProps,c[Fn]=o,(y=c.nodeValue!==s)&&(n=tn,n!==null))switch(n.tag){case 3:Hl(c.nodeValue,s,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Hl(c.nodeValue,s,(n.mode&1)!==0)}y&&(o.flags|=4)}else c=(s.nodeType===9?s:s.ownerDocument).createTextNode(c),c[Fn]=o,o.stateNode=c}return Nt(o),null;case 13:if(Ze(rt),c=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(tt&&nn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)eh(),jo(),o.flags|=98560,y=!1;else if(y=Xl(o),c!==null&&c.dehydrated!==null){if(n===null){if(!y)throw Error(r(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Fn]=o}else jo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Nt(o),y=!1}else Cn!==null&&(hc(Cn),Cn=null),y=!0;if(!y)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=s,o):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(o.child.flags|=8192,(o.mode&1)!==0&&(n===null||(rt.current&1)!==0?ht===0&&(ht=3):xc())),o.updateQueue!==null&&(o.flags|=4),Nt(o),null);case 4:return Io(),rc(n,o),n===null&&Ti(o.stateNode.containerInfo),Nt(o),null;case 10:return Pu(o.type._context),Nt(o),null;case 17:return Vt(o.type)&&Gl(),Nt(o),null;case 19:if(Ze(rt),y=o.memoizedState,y===null)return Nt(o),null;if(c=(o.flags&128)!==0,b=y.rendering,b===null)if(c)Mi(y,!1);else{if(ht!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(b=os(n),b!==null){for(o.flags|=128,Mi(y,!1),c=b.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),o.subtreeFlags=0,c=s,s=o.child;s!==null;)y=s,n=c,y.flags&=14680066,b=y.alternate,b===null?(y.childLanes=0,y.lanes=n,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=b.childLanes,y.lanes=b.lanes,y.child=b.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=b.memoizedProps,y.memoizedState=b.memoizedState,y.updateQueue=b.updateQueue,y.type=b.type,n=b.dependencies,y.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),s=s.sibling;return Ke(rt,rt.current&1|2),o.child}n=n.sibling}y.tail!==null&&lt()>Lo&&(o.flags|=128,c=!0,Mi(y,!1),o.lanes=4194304)}else{if(!c)if(n=os(b),n!==null){if(o.flags|=128,c=!0,s=n.updateQueue,s!==null&&(o.updateQueue=s,o.flags|=4),Mi(y,!0),y.tail===null&&y.tailMode==="hidden"&&!b.alternate&&!tt)return Nt(o),null}else 2*lt()-y.renderingStartTime>Lo&&s!==1073741824&&(o.flags|=128,c=!0,Mi(y,!1),o.lanes=4194304);y.isBackwards?(b.sibling=o.child,o.child=b):(s=y.last,s!==null?s.sibling=b:o.child=b,y.last=b)}return y.tail!==null?(o=y.tail,y.rendering=o,y.tail=o.sibling,y.renderingStartTime=lt(),o.sibling=null,s=rt.current,Ke(rt,c?s&1|2:s&1),o):(Nt(o),null);case 22:case 23:return gc(),c=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(o.flags|=8192),c&&(o.mode&1)!==0?(rn&1073741824)!==0&&(Nt(o),o.subtreeFlags&6&&(o.flags|=8192)):Nt(o),null;case 24:return null;case 25:return null}throw Error(r(156,o.tag))}function gk(n,o){switch(Eu(o),o.tag){case 1:return Vt(o.type)&&Gl(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return Io(),Ze(Ut),Ze(It),Ou(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return Fu(o),null;case 13:if(Ze(rt),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(r(340));jo()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return Ze(rt),null;case 4:return Io(),null;case 10:return Pu(o.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var ps=!1,At=!1,xk=typeof WeakSet=="function"?WeakSet:Set,ge=null;function No(n,o){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(c){it(n,o,c)}else s.current=null}function oc(n,o,s){try{s()}catch(c){it(n,o,c)}}var Xh=!1;function yk(n,o){if(gu=Al,n=Ip(),au(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var g=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{s.nodeType,y.nodeType}catch{s=null;break e}var b=0,P=-1,L=-1,V=0,ee=0,oe=n,Y=null;t:for(;;){for(var me;oe!==s||g!==0&&oe.nodeType!==3||(P=b+g),oe!==y||c!==0&&oe.nodeType!==3||(L=b+c),oe.nodeType===3&&(b+=oe.nodeValue.length),(me=oe.firstChild)!==null;)Y=oe,oe=me;for(;;){if(oe===n)break t;if(Y===s&&++V===g&&(P=b),Y===y&&++ee===c&&(L=b),(me=oe.nextSibling)!==null)break;oe=Y,Y=oe.parentNode}oe=me}s=P===-1||L===-1?null:{start:P,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(xu={focusedElem:n,selectionRange:s},Al=!1,ge=o;ge!==null;)if(o=ge,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,ge=n;else for(;ge!==null;){o=ge;try{var xe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var we=xe.memoizedProps,st=xe.memoizedState,D=o.stateNode,_=D.getSnapshotBeforeUpdate(o.elementType===o.type?we:En(o.type,we),st);D.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var B=o.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ue){it(o,o.return,ue)}if(n=o.sibling,n!==null){n.return=o.return,ge=n;break}ge=o.return}return xe=Xh,Xh=!1,xe}function Di(n,o,s){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var g=c=c.next;do{if((g.tag&n)===n){var y=g.destroy;g.destroy=void 0,y!==void 0&&oc(o,s,y)}g=g.next}while(g!==c)}}function hs(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var s=o=o.next;do{if((s.tag&n)===n){var c=s.create;s.destroy=c()}s=s.next}while(s!==o)}}function ic(n){var o=n.ref;if(o!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof o=="function"?o(n):o.current=n}}function Zh(n){var o=n.alternate;o!==null&&(n.alternate=null,Zh(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[Fn],delete o[Ri],delete o[ku],delete o[ek],delete o[tk])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function em(n){return n.tag===5||n.tag===3||n.tag===4}function tm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||em(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function lc(n,o,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?s.nodeType===8?s.parentNode.insertBefore(n,o):s.insertBefore(n,o):(s.nodeType===8?(o=s.parentNode,o.insertBefore(n,s)):(o=s,o.appendChild(n)),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=Wl));else if(c!==4&&(n=n.child,n!==null))for(lc(n,o,s),n=n.sibling;n!==null;)lc(n,o,s),n=n.sibling}function sc(n,o,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?s.insertBefore(n,o):s.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(sc(n,o,s),n=n.sibling;n!==null;)sc(n,o,s),n=n.sibling}var Et=null,jn=!1;function yr(n,o,s){for(s=s.child;s!==null;)nm(n,o,s),s=s.sibling}function nm(n,o,s){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(Tl,s)}catch{}switch(s.tag){case 5:At||No(s,o);case 6:var c=Et,g=jn;Et=null,yr(n,o,s),Et=c,jn=g,Et!==null&&(jn?(n=Et,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):Et.removeChild(s.stateNode));break;case 18:Et!==null&&(jn?(n=Et,s=s.stateNode,n.nodeType===8?wu(n.parentNode,s):n.nodeType===1&&wu(n,s),yi(n)):wu(Et,s.stateNode));break;case 4:c=Et,g=jn,Et=s.stateNode.containerInfo,jn=!0,yr(n,o,s),Et=c,jn=g;break;case 0:case 11:case 14:case 15:if(!At&&(c=s.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){g=c=c.next;do{var y=g,b=y.destroy;y=y.tag,b!==void 0&&((y&2)!==0||(y&4)!==0)&&oc(s,o,b),g=g.next}while(g!==c)}yr(n,o,s);break;case 1:if(!At&&(No(s,o),c=s.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=s.memoizedProps,c.state=s.memoizedState,c.componentWillUnmount()}catch(P){it(s,o,P)}yr(n,o,s);break;case 21:yr(n,o,s);break;case 22:s.mode&1?(At=(c=At)||s.memoizedState!==null,yr(n,o,s),At=c):yr(n,o,s);break;default:yr(n,o,s)}}function rm(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new xk),o.forEach(function(c){var g=Tk.bind(null,n,c);s.has(c)||(s.add(c),c.then(g,g))})}}function Tn(n,o){var s=o.deletions;if(s!==null)for(var c=0;c<s.length;c++){var g=s[c];try{var y=n,b=o,P=b;e:for(;P!==null;){switch(P.tag){case 5:Et=P.stateNode,jn=!1;break e;case 3:Et=P.stateNode.containerInfo,jn=!0;break e;case 4:Et=P.stateNode.containerInfo,jn=!0;break e}P=P.return}if(Et===null)throw Error(r(160));nm(y,b,g),Et=null,jn=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(V){it(g,o,V)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)om(o,n),o=o.sibling}function om(n,o){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(Tn(o,n),Mn(n),c&4){try{Di(3,n,n.return),hs(3,n)}catch(we){it(n,n.return,we)}try{Di(5,n,n.return)}catch(we){it(n,n.return,we)}}break;case 1:Tn(o,n),Mn(n),c&512&&s!==null&&No(s,s.return);break;case 5:if(Tn(o,n),Mn(n),c&512&&s!==null&&No(s,s.return),n.flags&32){var g=n.stateNode;try{Pe(g,"")}catch(we){it(n,n.return,we)}}if(c&4&&(g=n.stateNode,g!=null)){var y=n.memoizedProps,b=s!==null?s.memoizedProps:y,P=n.type,L=n.updateQueue;if(n.updateQueue=null,L!==null)try{P==="input"&&y.type==="radio"&&y.name!=null&&Bt(g,y),Ln(P,b);var V=Ln(P,y);for(b=0;b<L.length;b+=2){var ee=L[b],oe=L[b+1];ee==="style"?ir(g,oe):ee==="dangerouslySetInnerHTML"?Te(g,oe):ee==="children"?Pe(g,oe):A(g,ee,oe,V)}switch(P){case"input":qn(g,y);break;case"textarea":mt(g,y);break;case"select":var Y=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var me=y.value;me!=null?_t(g,!!y.multiple,me,!1):Y!==!!y.multiple&&(y.defaultValue!=null?_t(g,!!y.multiple,y.defaultValue,!0):_t(g,!!y.multiple,y.multiple?[]:"",!1))}g[Ri]=y}catch(we){it(n,n.return,we)}}break;case 6:if(Tn(o,n),Mn(n),c&4){if(n.stateNode===null)throw Error(r(162));g=n.stateNode,y=n.memoizedProps;try{g.nodeValue=y}catch(we){it(n,n.return,we)}}break;case 3:if(Tn(o,n),Mn(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{yi(o.containerInfo)}catch(we){it(n,n.return,we)}break;case 4:Tn(o,n),Mn(n);break;case 13:Tn(o,n),Mn(n),g=n.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(cc=lt())),c&4&&rm(n);break;case 22:if(ee=s!==null&&s.memoizedState!==null,n.mode&1?(At=(V=At)||ee,Tn(o,n),At=V):Tn(o,n),Mn(n),c&8192){if(V=n.memoizedState!==null,(n.stateNode.isHidden=V)&&!ee&&(n.mode&1)!==0)for(ge=n,ee=n.child;ee!==null;){for(oe=ge=ee;ge!==null;){switch(Y=ge,me=Y.child,Y.tag){case 0:case 11:case 14:case 15:Di(4,Y,Y.return);break;case 1:No(Y,Y.return);var xe=Y.stateNode;if(typeof xe.componentWillUnmount=="function"){c=Y,s=Y.return;try{o=c,xe.props=o.memoizedProps,xe.state=o.memoizedState,xe.componentWillUnmount()}catch(we){it(c,s,we)}}break;case 5:No(Y,Y.return);break;case 22:if(Y.memoizedState!==null){sm(oe);continue}}me!==null?(me.return=Y,ge=me):sm(oe)}ee=ee.sibling}e:for(ee=null,oe=n;;){if(oe.tag===5){if(ee===null){ee=oe;try{g=oe.stateNode,V?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(P=oe.stateNode,L=oe.memoizedProps.style,b=L!=null&&L.hasOwnProperty("display")?L.display:null,P.style.display=fn("display",b))}catch(we){it(n,n.return,we)}}}else if(oe.tag===6){if(ee===null)try{oe.stateNode.nodeValue=V?"":oe.memoizedProps}catch(we){it(n,n.return,we)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===n)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===n)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===n)break e;ee===oe&&(ee=null),oe=oe.return}ee===oe&&(ee=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Tn(o,n),Mn(n),c&4&&rm(n);break;case 21:break;default:Tn(o,n),Mn(n)}}function Mn(n){var o=n.flags;if(o&2){try{e:{for(var s=n.return;s!==null;){if(em(s)){var c=s;break e}s=s.return}throw Error(r(160))}switch(c.tag){case 5:var g=c.stateNode;c.flags&32&&(Pe(g,""),c.flags&=-33);var y=tm(n);sc(n,y,g);break;case 3:case 4:var b=c.stateNode.containerInfo,P=tm(n);lc(n,P,b);break;default:throw Error(r(161))}}catch(L){it(n,n.return,L)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function vk(n,o,s){ge=n,im(n)}function im(n,o,s){for(var c=(n.mode&1)!==0;ge!==null;){var g=ge,y=g.child;if(g.tag===22&&c){var b=g.memoizedState!==null||ps;if(!b){var P=g.alternate,L=P!==null&&P.memoizedState!==null||At;P=ps;var V=At;if(ps=b,(At=L)&&!V)for(ge=g;ge!==null;)b=ge,L=b.child,b.tag===22&&b.memoizedState!==null?am(g):L!==null?(L.return=b,ge=L):am(g);for(;y!==null;)ge=y,im(y),y=y.sibling;ge=g,ps=P,At=V}lm(n)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,ge=y):lm(n)}}function lm(n){for(;ge!==null;){var o=ge;if((o.flags&8772)!==0){var s=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:At||hs(5,o);break;case 1:var c=o.stateNode;if(o.flags&4&&!At)if(s===null)c.componentDidMount();else{var g=o.elementType===o.type?s.memoizedProps:En(o.type,s.memoizedProps);c.componentDidUpdate(g,s.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var y=o.updateQueue;y!==null&&sh(o,y,c);break;case 3:var b=o.updateQueue;if(b!==null){if(s=null,o.child!==null)switch(o.child.tag){case 5:s=o.child.stateNode;break;case 1:s=o.child.stateNode}sh(o,b,s)}break;case 5:var P=o.stateNode;if(s===null&&o.flags&4){s=P;var L=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&s.focus();break;case"img":L.src&&(s.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var V=o.alternate;if(V!==null){var ee=V.memoizedState;if(ee!==null){var oe=ee.dehydrated;oe!==null&&yi(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}At||o.flags&512&&ic(o)}catch(Y){it(o,o.return,Y)}}if(o===n){ge=null;break}if(s=o.sibling,s!==null){s.return=o.return,ge=s;break}ge=o.return}}function sm(n){for(;ge!==null;){var o=ge;if(o===n){ge=null;break}var s=o.sibling;if(s!==null){s.return=o.return,ge=s;break}ge=o.return}}function am(n){for(;ge!==null;){var o=ge;try{switch(o.tag){case 0:case 11:case 15:var s=o.return;try{hs(4,o)}catch(L){it(o,s,L)}break;case 1:var c=o.stateNode;if(typeof c.componentDidMount=="function"){var g=o.return;try{c.componentDidMount()}catch(L){it(o,g,L)}}var y=o.return;try{ic(o)}catch(L){it(o,y,L)}break;case 5:var b=o.return;try{ic(o)}catch(L){it(o,b,L)}}}catch(L){it(o,o.return,L)}if(o===n){ge=null;break}var P=o.sibling;if(P!==null){P.return=o.return,ge=P;break}ge=o.return}}var wk=Math.ceil,ms=F.ReactCurrentDispatcher,ac=F.ReactCurrentOwner,xn=F.ReactCurrentBatchConfig,Be=0,xt=null,at=null,jt=0,rn=0,Ao=pr(0),ht=0,Bi=null,Ur=0,gs=0,uc=0,Ui=null,Wt=null,cc=0,Lo=1/0,tr=null,xs=!1,dc=null,vr=null,ys=!1,wr=null,vs=0,Vi=0,fc=null,ws=-1,ks=0;function Mt(){return(Be&6)!==0?lt():ws!==-1?ws:ws=lt()}function kr(n){return(n.mode&1)===0?1:(Be&2)!==0&&jt!==0?jt&-jt:rk.transition!==null?(ks===0&&(ks=tp()),ks):(n=We,n!==0||(n=window.event,n=n===void 0?16:cp(n.type)),n)}function $n(n,o,s,c){if(50<Vi)throw Vi=0,fc=null,Error(r(185));pi(n,s,c),((Be&2)===0||n!==xt)&&(n===xt&&((Be&2)===0&&(gs|=s),ht===4&&br(n,jt)),qt(n,c),s===1&&Be===0&&(o.mode&1)===0&&(Lo=lt()+500,Kl&&mr()))}function qt(n,o){var s=n.callbackNode;rw(n,o);var c=Il(n,n===xt?jt:0);if(c===0)s!==null&&Xf(s),n.callbackNode=null,n.callbackPriority=0;else if(o=c&-c,n.callbackPriority!==o){if(s!=null&&Xf(s),o===1)n.tag===0?nk(cm.bind(null,n)):Kp(cm.bind(null,n)),Xw(function(){(Be&6)===0&&mr()}),s=null;else{switch(np(c)){case 1:s=Wa;break;case 4:s=Zf;break;case 16:s=jl;break;case 536870912:s=ep;break;default:s=jl}s=ym(s,um.bind(null,n))}n.callbackPriority=o,n.callbackNode=s}}function um(n,o){if(ws=-1,ks=0,(Be&6)!==0)throw Error(r(327));var s=n.callbackNode;if(zo()&&n.callbackNode!==s)return null;var c=Il(n,n===xt?jt:0);if(c===0)return null;if((c&30)!==0||(c&n.expiredLanes)!==0||o)o=bs(n,c);else{o=c;var g=Be;Be|=2;var y=fm();(xt!==n||jt!==o)&&(tr=null,Lo=lt()+500,Hr(n,o));do try{Sk();break}catch(P){dm(n,P)}while(!0);Iu(),ms.current=y,Be=g,at!==null?o=0:(xt=null,jt=0,o=ht)}if(o!==0){if(o===2&&(g=qa(n),g!==0&&(c=g,o=pc(n,g))),o===1)throw s=Bi,Hr(n,0),br(n,c),qt(n,lt()),s;if(o===6)br(n,c);else{if(g=n.current.alternate,(c&30)===0&&!kk(g)&&(o=bs(n,c),o===2&&(y=qa(n),y!==0&&(c=y,o=pc(n,y))),o===1))throw s=Bi,Hr(n,0),br(n,c),qt(n,lt()),s;switch(n.finishedWork=g,n.finishedLanes=c,o){case 0:case 1:throw Error(r(345));case 2:Wr(n,Wt,tr);break;case 3:if(br(n,c),(c&130023424)===c&&(o=cc+500-lt(),10<o)){if(Il(n,0)!==0)break;if(g=n.suspendedLanes,(g&c)!==c){Mt(),n.pingedLanes|=n.suspendedLanes&g;break}n.timeoutHandle=vu(Wr.bind(null,n,Wt,tr),o);break}Wr(n,Wt,tr);break;case 4:if(br(n,c),(c&4194240)===c)break;for(o=n.eventTimes,g=-1;0<c;){var b=31-bn(c);y=1<<b,b=o[b],b>g&&(g=b),c&=~y}if(c=g,c=lt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*wk(c/1960))-c,10<c){n.timeoutHandle=vu(Wr.bind(null,n,Wt,tr),c);break}Wr(n,Wt,tr);break;case 5:Wr(n,Wt,tr);break;default:throw Error(r(329))}}}return qt(n,lt()),n.callbackNode===s?um.bind(null,n):null}function pc(n,o){var s=Ui;return n.current.memoizedState.isDehydrated&&(Hr(n,o).flags|=256),n=bs(n,o),n!==2&&(o=Wt,Wt=s,o!==null&&hc(o)),n}function hc(n){Wt===null?Wt=n:Wt.push.apply(Wt,n)}function kk(n){for(var o=n;;){if(o.flags&16384){var s=o.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var c=0;c<s.length;c++){var g=s[c],y=g.getSnapshot;g=g.value;try{if(!Sn(y(),g))return!1}catch{return!1}}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function br(n,o){for(o&=~uc,o&=~gs,n.suspendedLanes|=o,n.pingedLanes&=~o,n=n.expirationTimes;0<o;){var s=31-bn(o),c=1<<s;n[s]=-1,o&=~c}}function cm(n){if((Be&6)!==0)throw Error(r(327));zo();var o=Il(n,0);if((o&1)===0)return qt(n,lt()),null;var s=bs(n,o);if(n.tag!==0&&s===2){var c=qa(n);c!==0&&(o=c,s=pc(n,c))}if(s===1)throw s=Bi,Hr(n,0),br(n,o),qt(n,lt()),s;if(s===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=o,Wr(n,Wt,tr),qt(n,lt()),null}function mc(n,o){var s=Be;Be|=1;try{return n(o)}finally{Be=s,Be===0&&(Lo=lt()+500,Kl&&mr())}}function Vr(n){wr!==null&&wr.tag===0&&(Be&6)===0&&zo();var o=Be;Be|=1;var s=xn.transition,c=We;try{if(xn.transition=null,We=1,n)return n()}finally{We=c,xn.transition=s,Be=o,(Be&6)===0&&mr()}}function gc(){rn=Ao.current,Ze(Ao)}function Hr(n,o){n.finishedWork=null,n.finishedLanes=0;var s=n.timeoutHandle;if(s!==-1&&(n.timeoutHandle=-1,Yw(s)),at!==null)for(s=at.return;s!==null;){var c=s;switch(Eu(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Gl();break;case 3:Io(),Ze(Ut),Ze(It),Ou();break;case 5:Fu(c);break;case 4:Io();break;case 13:Ze(rt);break;case 19:Ze(rt);break;case 10:Pu(c.type._context);break;case 22:case 23:gc()}s=s.return}if(xt=n,at=n=Sr(n.current,null),jt=rn=o,ht=0,Bi=null,uc=gs=Ur=0,Wt=Ui=null,Mr!==null){for(o=0;o<Mr.length;o++)if(s=Mr[o],c=s.interleaved,c!==null){s.interleaved=null;var g=c.next,y=s.pending;if(y!==null){var b=y.next;y.next=g,c.next=b}s.pending=c}Mr=null}return n}function dm(n,o){do{var s=at;try{if(Iu(),is.current=us,ls){for(var c=ot.memoizedState;c!==null;){var g=c.queue;g!==null&&(g.pending=null),c=c.next}ls=!1}if(Br=0,gt=pt=ot=null,zi=!1,Fi=0,ac.current=null,s===null||s.return===null){ht=1,Bi=o,at=null;break}e:{var y=n,b=s.return,P=s,L=o;if(o=jt,P.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var V=L,ee=P,oe=ee.tag;if((ee.mode&1)===0&&(oe===0||oe===11||oe===15)){var Y=ee.alternate;Y?(ee.updateQueue=Y.updateQueue,ee.memoizedState=Y.memoizedState,ee.lanes=Y.lanes):(ee.updateQueue=null,ee.memoizedState=null)}var me=Fh(b);if(me!==null){me.flags&=-257,_h(me,b,P,y,o),me.mode&1&&zh(y,V,o),o=me,L=V;var xe=o.updateQueue;if(xe===null){var we=new Set;we.add(L),o.updateQueue=we}else xe.add(L);break e}else{if((o&1)===0){zh(y,V,o),xc();break e}L=Error(r(426))}}else if(tt&&P.mode&1){var st=Fh(b);if(st!==null){(st.flags&65536)===0&&(st.flags|=256),_h(st,b,P,y,o),$u(Po(L,P));break e}}y=L=Po(L,P),ht!==4&&(ht=2),Ui===null?Ui=[y]:Ui.push(y),y=b;do{switch(y.tag){case 3:y.flags|=65536,o&=-o,y.lanes|=o;var D=Ah(y,L,o);lh(y,D);break e;case 1:P=L;var _=y.type,B=y.stateNode;if((y.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(vr===null||!vr.has(B)))){y.flags|=65536,o&=-o,y.lanes|=o;var ue=Lh(y,P,o);lh(y,ue);break e}}y=y.return}while(y!==null)}hm(s)}catch(Se){o=Se,at===s&&s!==null&&(at=s=s.return);continue}break}while(!0)}function fm(){var n=ms.current;return ms.current=us,n===null?us:n}function xc(){(ht===0||ht===3||ht===2)&&(ht=4),xt===null||(Ur&268435455)===0&&(gs&268435455)===0||br(xt,jt)}function bs(n,o){var s=Be;Be|=2;var c=fm();(xt!==n||jt!==o)&&(tr=null,Hr(n,o));do try{bk();break}catch(g){dm(n,g)}while(!0);if(Iu(),Be=s,ms.current=c,at!==null)throw Error(r(261));return xt=null,jt=0,ht}function bk(){for(;at!==null;)pm(at)}function Sk(){for(;at!==null&&!J1();)pm(at)}function pm(n){var o=xm(n.alternate,n,rn);n.memoizedProps=n.pendingProps,o===null?hm(n):at=o,ac.current=null}function hm(n){var o=n;do{var s=o.alternate;if(n=o.return,(o.flags&32768)===0){if(s=mk(s,o,rn),s!==null){at=s;return}}else{if(s=gk(s,o),s!==null){s.flags&=32767,at=s;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{ht=6,at=null;return}}if(o=o.sibling,o!==null){at=o;return}at=o=n}while(o!==null);ht===0&&(ht=5)}function Wr(n,o,s){var c=We,g=xn.transition;try{xn.transition=null,We=1,Ck(n,o,s,c)}finally{xn.transition=g,We=c}return null}function Ck(n,o,s,c){do zo();while(wr!==null);if((Be&6)!==0)throw Error(r(327));s=n.finishedWork;var g=n.finishedLanes;if(s===null)return null;if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var y=s.lanes|s.childLanes;if(ow(n,y),n===xt&&(at=xt=null,jt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ys||(ys=!0,ym(jl,function(){return zo(),null})),y=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||y){y=xn.transition,xn.transition=null;var b=We;We=1;var P=Be;Be|=4,ac.current=null,yk(n,s),om(s,n),Hw(xu),Al=!!gu,xu=gu=null,n.current=s,vk(s),K1(),Be=P,We=b,xn.transition=y}else n.current=s;if(ys&&(ys=!1,wr=n,vs=g),y=n.pendingLanes,y===0&&(vr=null),X1(s.stateNode),qt(n,lt()),o!==null)for(c=n.onRecoverableError,s=0;s<o.length;s++)g=o[s],c(g.value,{componentStack:g.stack,digest:g.digest});if(xs)throw xs=!1,n=dc,dc=null,n;return(vs&1)!==0&&n.tag!==0&&zo(),y=n.pendingLanes,(y&1)!==0?n===fc?Vi++:(Vi=0,fc=n):Vi=0,mr(),null}function zo(){if(wr!==null){var n=np(vs),o=xn.transition,s=We;try{if(xn.transition=null,We=16>n?16:n,wr===null)var c=!1;else{if(n=wr,wr=null,vs=0,(Be&6)!==0)throw Error(r(331));var g=Be;for(Be|=4,ge=n.current;ge!==null;){var y=ge,b=y.child;if((ge.flags&16)!==0){var P=y.deletions;if(P!==null){for(var L=0;L<P.length;L++){var V=P[L];for(ge=V;ge!==null;){var ee=ge;switch(ee.tag){case 0:case 11:case 15:Di(8,ee,y)}var oe=ee.child;if(oe!==null)oe.return=ee,ge=oe;else for(;ge!==null;){ee=ge;var Y=ee.sibling,me=ee.return;if(Zh(ee),ee===V){ge=null;break}if(Y!==null){Y.return=me,ge=Y;break}ge=me}}}var xe=y.alternate;if(xe!==null){var we=xe.child;if(we!==null){xe.child=null;do{var st=we.sibling;we.sibling=null,we=st}while(we!==null)}}ge=y}}if((y.subtreeFlags&2064)!==0&&b!==null)b.return=y,ge=b;else e:for(;ge!==null;){if(y=ge,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:Di(9,y,y.return)}var D=y.sibling;if(D!==null){D.return=y.return,ge=D;break e}ge=y.return}}var _=n.current;for(ge=_;ge!==null;){b=ge;var B=b.child;if((b.subtreeFlags&2064)!==0&&B!==null)B.return=b,ge=B;else e:for(b=_;ge!==null;){if(P=ge,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:hs(9,P)}}catch(Se){it(P,P.return,Se)}if(P===b){ge=null;break e}var ue=P.sibling;if(ue!==null){ue.return=P.return,ge=ue;break e}ge=P.return}}if(Be=g,mr(),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(Tl,n)}catch{}c=!0}return c}finally{We=s,xn.transition=o}}return!1}function mm(n,o,s){o=Po(s,o),o=Ah(n,o,1),n=xr(n,o,1),o=Mt(),n!==null&&(pi(n,1,o),qt(n,o))}function it(n,o,s){if(n.tag===3)mm(n,n,s);else for(;o!==null;){if(o.tag===3){mm(o,n,s);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(vr===null||!vr.has(c))){n=Po(s,n),n=Lh(o,n,1),o=xr(o,n,1),n=Mt(),o!==null&&(pi(o,1,n),qt(o,n));break}}o=o.return}}function Ek(n,o,s){var c=n.pingCache;c!==null&&c.delete(o),o=Mt(),n.pingedLanes|=n.suspendedLanes&s,xt===n&&(jt&s)===s&&(ht===4||ht===3&&(jt&130023424)===jt&&500>lt()-cc?Hr(n,0):uc|=s),qt(n,o)}function gm(n,o){o===0&&((n.mode&1)===0?o=1:(o=Rl,Rl<<=1,(Rl&130023424)===0&&(Rl=4194304)));var s=Mt();n=Xn(n,o),n!==null&&(pi(n,o,s),qt(n,s))}function jk(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),gm(n,s)}function Tk(n,o){var s=0;switch(n.tag){case 13:var c=n.stateNode,g=n.memoizedState;g!==null&&(s=g.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(o),gm(n,s)}var xm;xm=function(n,o,s){if(n!==null)if(n.memoizedProps!==o.pendingProps||Ut.current)Ht=!0;else{if((n.lanes&s)===0&&(o.flags&128)===0)return Ht=!1,hk(n,o,s);Ht=(n.flags&131072)!==0}else Ht=!1,tt&&(o.flags&1048576)!==0&&Qp(o,Yl,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;fs(n,o),n=o.pendingProps;var g=So(o,It.current);Ro(o,s),g=Bu(null,o,c,n,g,s);var y=Uu();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Vt(c)?(y=!0,Jl(o)):y=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Lu(o),g.updater=cs,o.stateNode=g,g._reactInternals=o,Ju(o,c,n,s),o=Xu(null,o,c,!0,y,s)):(o.tag=0,tt&&y&&Cu(o),Ot(null,o,g,s),o=o.child),o;case 16:c=o.elementType;e:{switch(fs(n,o),n=o.pendingProps,g=c._init,c=g(c._payload),o.type=c,g=o.tag=Rk(c),n=En(c,n),g){case 0:o=Yu(null,o,c,n,s);break e;case 1:o=Vh(null,o,c,n,s);break e;case 11:o=Oh(null,o,c,n,s);break e;case 14:o=Mh(null,o,c,En(c.type,n),s);break e}throw Error(r(306,c,""))}return o;case 0:return c=o.type,g=o.pendingProps,g=o.elementType===c?g:En(c,g),Yu(n,o,c,g,s);case 1:return c=o.type,g=o.pendingProps,g=o.elementType===c?g:En(c,g),Vh(n,o,c,g,s);case 3:e:{if(Hh(o),n===null)throw Error(r(387));c=o.pendingProps,y=o.memoizedState,g=y.element,ih(n,o),rs(o,c,null,s);var b=o.memoizedState;if(c=b.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},o.updateQueue.baseState=y,o.memoizedState=y,o.flags&256){g=Po(Error(r(423)),o),o=Wh(n,o,c,s,g);break e}else if(c!==g){g=Po(Error(r(424)),o),o=Wh(n,o,c,s,g);break e}else for(nn=fr(o.stateNode.containerInfo.firstChild),tn=o,tt=!0,Cn=null,s=rh(o,null,c,s),o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(jo(),c===g){o=er(n,o,s);break e}Ot(n,o,c,s)}o=o.child}return o;case 5:return ah(o),n===null&&Tu(o),c=o.type,g=o.pendingProps,y=n!==null?n.memoizedProps:null,b=g.children,yu(c,g)?b=null:y!==null&&yu(c,y)&&(o.flags|=32),Uh(n,o),Ot(n,o,b,s),o.child;case 6:return n===null&&Tu(o),null;case 13:return qh(n,o,s);case 4:return zu(o,o.stateNode.containerInfo),c=o.pendingProps,n===null?o.child=To(o,null,c,s):Ot(n,o,c,s),o.child;case 11:return c=o.type,g=o.pendingProps,g=o.elementType===c?g:En(c,g),Oh(n,o,c,g,s);case 7:return Ot(n,o,o.pendingProps,s),o.child;case 8:return Ot(n,o,o.pendingProps.children,s),o.child;case 12:return Ot(n,o,o.pendingProps.children,s),o.child;case 10:e:{if(c=o.type._context,g=o.pendingProps,y=o.memoizedProps,b=g.value,Ke(es,c._currentValue),c._currentValue=b,y!==null)if(Sn(y.value,b)){if(y.children===g.children&&!Ut.current){o=er(n,o,s);break e}}else for(y=o.child,y!==null&&(y.return=o);y!==null;){var P=y.dependencies;if(P!==null){b=y.child;for(var L=P.firstContext;L!==null;){if(L.context===c){if(y.tag===1){L=Zn(-1,s&-s),L.tag=2;var V=y.updateQueue;if(V!==null){V=V.shared;var ee=V.pending;ee===null?L.next=L:(L.next=ee.next,ee.next=L),V.pending=L}}y.lanes|=s,L=y.alternate,L!==null&&(L.lanes|=s),Nu(y.return,s,o),P.lanes|=s;break}L=L.next}}else if(y.tag===10)b=y.type===o.type?null:y.child;else if(y.tag===18){if(b=y.return,b===null)throw Error(r(341));b.lanes|=s,P=b.alternate,P!==null&&(P.lanes|=s),Nu(b,s,o),b=y.sibling}else b=y.child;if(b!==null)b.return=y;else for(b=y;b!==null;){if(b===o){b=null;break}if(y=b.sibling,y!==null){y.return=b.return,b=y;break}b=b.return}y=b}Ot(n,o,g.children,s),o=o.child}return o;case 9:return g=o.type,c=o.pendingProps.children,Ro(o,s),g=mn(g),c=c(g),o.flags|=1,Ot(n,o,c,s),o.child;case 14:return c=o.type,g=En(c,o.pendingProps),g=En(c.type,g),Mh(n,o,c,g,s);case 15:return Dh(n,o,o.type,o.pendingProps,s);case 17:return c=o.type,g=o.pendingProps,g=o.elementType===c?g:En(c,g),fs(n,o),o.tag=1,Vt(c)?(n=!0,Jl(o)):n=!1,Ro(o,s),Ph(o,c,g),Ju(o,c,g,s),Xu(null,o,c,!0,n,s);case 19:return Jh(n,o,s);case 22:return Bh(n,o,s)}throw Error(r(156,o.tag))};function ym(n,o){return Yf(n,o)}function $k(n,o,s,c){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(n,o,s,c){return new $k(n,o,s,c)}function yc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Rk(n){if(typeof n=="function")return yc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===le)return 11;if(n===U)return 14}return 2}function Sr(n,o){var s=n.alternate;return s===null?(s=yn(n.tag,o,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=o,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,o=n.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function Ss(n,o,s,c,g,y){var b=2;if(c=n,typeof n=="function")yc(n)&&(b=1);else if(typeof n=="string")b=5;else e:switch(n){case H:return qr(s.children,g,y,o);case K:b=8,g|=8;break;case ne:return n=yn(12,s,o,g|2),n.elementType=ne,n.lanes=y,n;case X:return n=yn(13,s,o,g),n.elementType=X,n.lanes=y,n;case re:return n=yn(19,s,o,g),n.elementType=re,n.lanes=y,n;case ae:return Cs(s,g,y,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case M:b=10;break e;case Z:b=9;break e;case le:b=11;break e;case U:b=14;break e;case pe:b=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return o=yn(b,s,o,g),o.elementType=n,o.type=c,o.lanes=y,o}function qr(n,o,s,c){return n=yn(7,n,c,o),n.lanes=s,n}function Cs(n,o,s,c){return n=yn(22,n,c,o),n.elementType=ae,n.lanes=s,n.stateNode={isHidden:!1},n}function vc(n,o,s){return n=yn(6,n,null,o),n.lanes=s,n}function wc(n,o,s){return o=yn(4,n.children!==null?n.children:[],n.key,o),o.lanes=s,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function Ik(n,o,s,c,g){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ga(0),this.expirationTimes=Ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ga(0),this.identifierPrefix=c,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function kc(n,o,s,c,g,y,b,P,L){return n=new Ik(n,o,s,P,L),o===1?(o=1,y===!0&&(o|=8)):o=0,y=yn(3,null,null,o),n.current=y,y.stateNode=n,y.memoizedState={element:c,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lu(y),n}function Pk(n,o,s){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:N,key:c==null?null:""+c,children:n,containerInfo:o,implementation:s}}function vm(n){if(!n)return hr;n=n._reactInternals;e:{if(Lr(n)!==n||n.tag!==1)throw Error(r(170));var o=n;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Vt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(r(171))}if(n.tag===1){var s=n.type;if(Vt(s))return Gp(n,s,o)}return o}function wm(n,o,s,c,g,y,b,P,L){return n=kc(s,c,!0,n,g,y,b,P,L),n.context=vm(null),s=n.current,c=Mt(),g=kr(s),y=Zn(c,g),y.callback=o??null,xr(s,y,g),n.current.lanes=g,pi(n,g,c),qt(n,c),n}function Es(n,o,s,c){var g=o.current,y=Mt(),b=kr(g);return s=vm(s),o.context===null?o.context=s:o.pendingContext=s,o=Zn(y,b),o.payload={element:n},c=c===void 0?null:c,c!==null&&(o.callback=c),n=xr(g,o,b),n!==null&&($n(n,g,b,y),ns(n,g,b)),b}function js(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function km(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<o?s:o}}function bc(n,o){km(n,o),(n=n.alternate)&&km(n,o)}function Nk(){return null}var bm=typeof reportError=="function"?reportError:function(n){console.error(n)};function Sc(n){this._internalRoot=n}Ts.prototype.render=Sc.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(r(409));Es(n,o,null,null)},Ts.prototype.unmount=Sc.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;Vr(function(){Es(null,n,null,null)}),o[Jn]=null}};function Ts(n){this._internalRoot=n}Ts.prototype.unstable_scheduleHydration=function(n){if(n){var o=ip();n={blockedOn:null,target:n,priority:o};for(var s=0;s<ur.length&&o!==0&&o<ur[s].priority;s++);ur.splice(s,0,n),s===0&&ap(n)}};function Cc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function $s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Sm(){}function Ak(n,o,s,c,g){if(g){if(typeof c=="function"){var y=c;c=function(){var V=js(b);y.call(V)}}var b=wm(o,c,n,0,null,!1,!1,"",Sm);return n._reactRootContainer=b,n[Jn]=b.current,Ti(n.nodeType===8?n.parentNode:n),Vr(),b}for(;g=n.lastChild;)n.removeChild(g);if(typeof c=="function"){var P=c;c=function(){var V=js(L);P.call(V)}}var L=kc(n,0,!1,null,null,!1,!1,"",Sm);return n._reactRootContainer=L,n[Jn]=L.current,Ti(n.nodeType===8?n.parentNode:n),Vr(function(){Es(o,L,s,c)}),L}function Rs(n,o,s,c,g){var y=s._reactRootContainer;if(y){var b=y;if(typeof g=="function"){var P=g;g=function(){var L=js(b);P.call(L)}}Es(o,b,n,g)}else b=Ak(s,o,n,g,c);return js(b)}rp=function(n){switch(n.tag){case 3:var o=n.stateNode;if(o.current.memoizedState.isDehydrated){var s=fi(o.pendingLanes);s!==0&&(Ja(o,s|1),qt(o,lt()),(Be&6)===0&&(Lo=lt()+500,mr()))}break;case 13:Vr(function(){var c=Xn(n,1);if(c!==null){var g=Mt();$n(c,n,1,g)}}),bc(n,1)}},Ka=function(n){if(n.tag===13){var o=Xn(n,134217728);if(o!==null){var s=Mt();$n(o,n,134217728,s)}bc(n,134217728)}},op=function(n){if(n.tag===13){var o=kr(n),s=Xn(n,o);if(s!==null){var c=Mt();$n(s,n,o,c)}bc(n,o)}},ip=function(){return We},lp=function(n,o){var s=We;try{return We=n,o()}finally{We=s}},Ba=function(n,o,s){switch(o){case"input":if(qn(n,s),o=s.name,s.type==="radio"&&o!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<s.length;o++){var c=s[o];if(c!==n&&c.form===n.form){var g=ql(c);if(!g)throw Error(r(90));Ie(c),qn(c,g)}}}break;case"textarea":mt(n,s);break;case"select":o=s.value,o!=null&&_t(n,!!s.multiple,o,!1)}},Hf=mc,Wf=Vr;var Lk={usingClientEntryPoint:!1,Events:[Ii,ko,ql,Uf,Vf,mc]},Hi={findFiberByHostInstance:zr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zk={bundleType:Hi.bundleType,version:Hi.version,rendererPackageName:Hi.rendererPackageName,rendererConfig:Hi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:F.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Kf(n),n===null?null:n.stateNode},findFiberByHostInstance:Hi.findFiberByHostInstance||Nk,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 Is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Is.isDisabled&&Is.supportsFiber)try{Tl=Is.inject(zk),zn=Is}catch{}}return Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lk,Gt.createPortal=function(n,o){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cc(o))throw Error(r(200));return Pk(n,o,null,s)},Gt.createRoot=function(n,o){if(!Cc(n))throw Error(r(299));var s=!1,c="",g=bm;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=kc(n,1,!1,null,null,s,!1,c,g),n[Jn]=o.current,Ti(n.nodeType===8?n.parentNode:n),new Sc(o)},Gt.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=Kf(o),n=n===null?null:n.stateNode,n},Gt.flushSync=function(n){return Vr(n)},Gt.hydrate=function(n,o,s){if(!$s(o))throw Error(r(200));return Rs(null,n,o,!0,s)},Gt.hydrateRoot=function(n,o,s){if(!Cc(n))throw Error(r(405));var c=s!=null&&s.hydratedSources||null,g=!1,y="",b=bm;if(s!=null&&(s.unstable_strictMode===!0&&(g=!0),s.identifierPrefix!==void 0&&(y=s.identifierPrefix),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),o=wm(o,null,n,1,s??null,g,!1,y,b),n[Jn]=o.current,Ti(n),c)for(n=0;n<c.length;n++)s=c[n],g=s._getVersion,g=g(s._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[s,g]:o.mutableSourceEagerHydrationData.push(s,g);return new Ts(o)},Gt.render=function(n,o,s){if(!$s(o))throw Error(r(200));return Rs(null,n,o,!1,s)},Gt.unmountComponentAtNode=function(n){if(!$s(n))throw Error(r(40));return n._reactRootContainer?(Vr(function(){Rs(null,null,n,!1,function(){n._reactRootContainer=null,n[Jn]=null})}),!0):!1},Gt.unstable_batchedUpdates=mc,Gt.unstable_renderSubtreeIntoContainer=function(n,o,s,c){if(!$s(s))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return Rs(n,o,s,!1,c)},Gt.version="18.3.1-next-f1338f8080-20240426",Gt}var Rm;function Vk(){if(Rm)return jc.exports;Rm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jc.exports=Uk(),jc.exports}var Im;function Hk(){if(Im)return Ps;Im=1;var e=Vk();return Ps.createRoot=e.createRoot,Ps.hydrateRoot=e.hydrateRoot,Ps}var Wk=Hk(),Rc={exports:{}},Wi={};/**
33
- * @license React
34
- * react-jsx-runtime.production.min.js
35
- *
36
- * Copyright (c) Facebook, Inc. and its affiliates.
37
- *
38
- * This source code is licensed under the MIT license found in the
39
- * LICENSE file in the root directory of this source tree.
40
- */var Pm;function qk(){if(Pm)return Wi;Pm=1;var e=Vd(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(d,f,p){var x,m={},v=null,w=null;p!==void 0&&(v=""+p),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(w=f.ref);for(x in f)i.call(f,x)&&!a.hasOwnProperty(x)&&(m[x]=f[x]);if(d&&d.defaultProps)for(x in f=d.defaultProps,f)m[x]===void 0&&(m[x]=f[x]);return{$$typeof:t,type:d,key:v,ref:w,props:m,_owner:l.current}}return Wi.Fragment=r,Wi.jsx=u,Wi.jsxs=u,Wi}var Nm;function Gk(){return Nm||(Nm=1,Rc.exports=qk()),Rc.exports}var h=Gk(),kt=function(){return kt=Object.assign||function(t){for(var r,i=1,l=arguments.length;i<l;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},kt.apply(this,arguments)};function qo(e,t,r){if(r||arguments.length===2)for(var i=0,l=t.length,a;i<l;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var et="-ms-",il="-moz-",He="-webkit-",_x="comm",wa="rule",Hd="decl",Jk="@import",Ox="@keyframes",Kk="@layer",Mx=Math.abs,Wd=String.fromCharCode,ld=Object.assign;function Qk(e,t){return vt(e,0)^45?(((t<<2^vt(e,0))<<2^vt(e,1))<<2^vt(e,2))<<2^vt(e,3):0}function Dx(e){return e.trim()}function nr(e,t){return(e=t.exec(e))?e[0]:e}function Ae(e,t,r){return e.replace(t,r)}function Ws(e,t,r){return e.indexOf(t,r)}function vt(e,t){return e.charCodeAt(t)|0}function Go(e,t,r){return e.slice(t,r)}function Vn(e){return e.length}function Bx(e){return e.length}function rl(e,t){return t.push(e),e}function Yk(e,t){return e.map(t).join("")}function Am(e,t){return e.filter(function(r){return!nr(r,t)})}var ka=1,Jo=1,Ux=0,wn=0,ct=0,ei="";function ba(e,t,r,i,l,a,u,d){return{value:e,root:t,parent:r,type:i,props:l,children:a,line:ka,column:Jo,length:u,return:"",siblings:d}}function Tr(e,t){return ld(ba("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Fo(e){for(;e.root;)e=Tr(e.root,{children:[e]});rl(e,e.siblings)}function Xk(){return ct}function Zk(){return ct=wn>0?vt(ei,--wn):0,Jo--,ct===10&&(Jo=1,ka--),ct}function In(){return ct=wn<Ux?vt(ei,wn++):0,Jo++,ct===10&&(Jo=1,ka++),ct}function Xr(){return vt(ei,wn)}function qs(){return wn}function Sa(e,t){return Go(ei,e,t)}function sd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eb(e){return ka=Jo=1,Ux=Vn(ei=e),wn=0,[]}function tb(e){return ei="",e}function Ic(e){return Dx(Sa(wn-1,ad(e===91?e+2:e===40?e+1:e)))}function nb(e){for(;(ct=Xr())&&ct<33;)In();return sd(e)>2||sd(ct)>3?"":" "}function rb(e,t){for(;--t&&In()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return Sa(e,qs()+(t<6&&Xr()==32&&In()==32))}function ad(e){for(;In();)switch(ct){case e:return wn;case 34:case 39:e!==34&&e!==39&&ad(ct);break;case 40:e===41&&ad(e);break;case 92:In();break}return wn}function ob(e,t){for(;In()&&e+ct!==57;)if(e+ct===84&&Xr()===47)break;return"/*"+Sa(t,wn-1)+"*"+Wd(e===47?e:In())}function ib(e){for(;!sd(Xr());)In();return Sa(e,wn)}function lb(e){return tb(Gs("",null,null,null,[""],e=eb(e),0,[0],e))}function Gs(e,t,r,i,l,a,u,d,f){for(var p=0,x=0,m=u,v=0,w=0,k=0,S=1,j=1,E=1,I=0,A="",F=l,O=a,N=i,H=A;j;)switch(k=I,I=In()){case 40:if(k!=108&&vt(H,m-1)==58){Ws(H+=Ae(Ic(I),"&","&\f"),"&\f",Mx(p?d[p-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:H+=Ic(I);break;case 9:case 10:case 13:case 32:H+=nb(k);break;case 92:H+=rb(qs()-1,7);continue;case 47:switch(Xr()){case 42:case 47:rl(sb(ob(In(),qs()),t,r,f),f);break;default:H+="/"}break;case 123*S:d[p++]=Vn(H)*E;case 125*S:case 59:case 0:switch(I){case 0:case 125:j=0;case 59+x:E==-1&&(H=Ae(H,/\f/g,"")),w>0&&Vn(H)-m&&rl(w>32?zm(H+";",i,r,m-1,f):zm(Ae(H," ","")+";",i,r,m-2,f),f);break;case 59:H+=";";default:if(rl(N=Lm(H,t,r,p,x,l,d,A,F=[],O=[],m,a),a),I===123)if(x===0)Gs(H,t,N,N,F,a,m,d,O);else switch(v===99&&vt(H,3)===110?100:v){case 100:case 108:case 109:case 115:Gs(e,N,N,i&&rl(Lm(e,N,N,0,0,l,d,A,l,F=[],m,O),O),l,O,m,d,i?F:O);break;default:Gs(H,N,N,N,[""],O,0,d,O)}}p=x=w=0,S=E=1,A=H="",m=u;break;case 58:m=1+Vn(H),w=k;default:if(S<1){if(I==123)--S;else if(I==125&&S++==0&&Zk()==125)continue}switch(H+=Wd(I),I*S){case 38:E=x>0?1:(H+="\f",-1);break;case 44:d[p++]=(Vn(H)-1)*E,E=1;break;case 64:Xr()===45&&(H+=Ic(In())),v=Xr(),x=m=Vn(A=H+=ib(qs())),I++;break;case 45:k===45&&Vn(H)==2&&(S=0)}}return a}function Lm(e,t,r,i,l,a,u,d,f,p,x,m){for(var v=l-1,w=l===0?a:[""],k=Bx(w),S=0,j=0,E=0;S<i;++S)for(var I=0,A=Go(e,v+1,v=Mx(j=u[S])),F=e;I<k;++I)(F=Dx(j>0?w[I]+" "+A:Ae(A,/&\f/g,w[I])))&&(f[E++]=F);return ba(e,t,r,l===0?wa:d,f,p,x,m)}function sb(e,t,r,i){return ba(e,t,r,_x,Wd(Xk()),Go(e,2,-2),0,i)}function zm(e,t,r,i,l){return ba(e,t,r,Hd,Go(e,0,i),Go(e,i+1,-1),i,l)}function Vx(e,t,r){switch(Qk(e,t)){case 5103:return He+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return He+e+e;case 4789:return il+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return He+e+il+e+et+e+e;case 5936:switch(vt(e,t+11)){case 114:return He+e+et+Ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return He+e+et+Ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return He+e+et+Ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return He+e+et+e+e;case 6165:return He+e+et+"flex-"+e+e;case 5187:return He+e+Ae(e,/(\w+).+(:[^]+)/,He+"box-$1$2"+et+"flex-$1$2")+e;case 5443:return He+e+et+"flex-item-"+Ae(e,/flex-|-self/g,"")+(nr(e,/flex-|baseline/)?"":et+"grid-row-"+Ae(e,/flex-|-self/g,""))+e;case 4675:return He+e+et+"flex-line-pack"+Ae(e,/align-content|flex-|-self/g,"")+e;case 5548:return He+e+et+Ae(e,"shrink","negative")+e;case 5292:return He+e+et+Ae(e,"basis","preferred-size")+e;case 6060:return He+"box-"+Ae(e,"-grow","")+He+e+et+Ae(e,"grow","positive")+e;case 4554:return He+Ae(e,/([^-])(transform)/g,"$1"+He+"$2")+e;case 6187:return Ae(Ae(Ae(e,/(zoom-|grab)/,He+"$1"),/(image-set)/,He+"$1"),e,"")+e;case 5495:case 3959:return Ae(e,/(image-set\([^]*)/,He+"$1$`$1");case 4968:return Ae(Ae(e,/(.+:)(flex-)?(.*)/,He+"box-pack:$3"+et+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+He+e+e;case 4200:if(!nr(e,/flex-|baseline/))return et+"grid-column-align"+Go(e,t)+e;break;case 2592:case 3360:return et+Ae(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(i,l){return t=l,nr(i.props,/grid-\w+-end/)})?~Ws(e+(r=r[t].value),"span",0)?e:et+Ae(e,"-start","")+e+et+"grid-row-span:"+(~Ws(r,"span",0)?nr(r,/\d+/):+nr(r,/\d+/)-+nr(e,/\d+/))+";":et+Ae(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(i){return nr(i.props,/grid-\w+-start/)})?e:et+Ae(Ae(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ae(e,/(.+)-inline(.+)/,He+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vn(e)-1-t>6)switch(vt(e,t+1)){case 109:if(vt(e,t+4)!==45)break;case 102:return Ae(e,/(.+:)(.+)-([^]+)/,"$1"+He+"$2-$3$1"+il+(vt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ws(e,"stretch",0)?Vx(Ae(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Ae(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(i,l,a,u,d,f,p){return et+l+":"+a+p+(u?et+l+"-span:"+(d?f:+f-+a)+p:"")+e});case 4949:if(vt(e,t+6)===121)return Ae(e,":",":"+He)+e;break;case 6444:switch(vt(e,vt(e,14)===45?18:11)){case 120:return Ae(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+He+(vt(e,14)===45?"inline-":"")+"box$3$1"+He+"$2$3$1"+et+"$2box$3")+e;case 100:return Ae(e,":",":"+et)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ae(e,"scroll-","scroll-snap-")+e}return e}function ra(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function ab(e,t,r,i){switch(e.type){case Kk:if(e.children.length)break;case Jk:case Hd:return e.return=e.return||e.value;case _x:return"";case Ox:return e.return=e.value+"{"+ra(e.children,i)+"}";case wa:if(!Vn(e.value=e.props.join(",")))return""}return Vn(r=ra(e.children,i))?e.return=e.value+"{"+r+"}":""}function ub(e){var t=Bx(e);return function(r,i,l,a){for(var u="",d=0;d<t;d++)u+=e[d](r,i,l,a)||"";return u}}function cb(e){return function(t){t.root||(t=t.return)&&e(t)}}function db(e,t,r,i){if(e.length>-1&&!e.return)switch(e.type){case Hd:e.return=Vx(e.value,e.length,r);return;case Ox:return ra([Tr(e,{value:Ae(e.value,"@","@"+He)})],i);case wa:if(e.length)return Yk(r=e.props,function(l){switch(nr(l,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Fo(Tr(e,{props:[Ae(l,/:(read-\w+)/,":"+il+"$1")]})),Fo(Tr(e,{props:[l]})),ld(e,{props:Am(r,i)});break;case"::placeholder":Fo(Tr(e,{props:[Ae(l,/:(plac\w+)/,":"+He+"input-$1")]})),Fo(Tr(e,{props:[Ae(l,/:(plac\w+)/,":"+il+"$1")]})),Fo(Tr(e,{props:[Ae(l,/:(plac\w+)/,et+"input-$1")]})),Fo(Tr(e,{props:[l]})),ld(e,{props:Am(r,i)});break}return""})}}var fb={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ln={},Ko=typeof process<"u"&&ln!==void 0&&(ln.REACT_APP_SC_ATTR||ln.SC_ATTR)||"data-styled",Hx="active",Wx="data-styled-version",Ca="6.1.13",qd=`/*!sc*/
41
- `,oa=typeof window<"u"&&"HTMLElement"in window,pb=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&ln!==void 0&&ln.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&ln.REACT_APP_SC_DISABLE_SPEEDY!==""?ln.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&ln.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&ln!==void 0&&ln.SC_DISABLE_SPEEDY!==void 0&&ln.SC_DISABLE_SPEEDY!==""&&ln.SC_DISABLE_SPEEDY!=="false"&&ln.SC_DISABLE_SPEEDY),hb={},Ea=Object.freeze([]),Qo=Object.freeze({});function qx(e,t,r){return r===void 0&&(r=Qo),e.theme!==r.theme&&e.theme||t||r.theme}var Gx=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),mb=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,gb=/(^-|-$)/g;function Fm(e){return e.replace(mb,"-").replace(gb,"")}var xb=/(a)(d)/gi,Ns=52,_m=function(e){return String.fromCharCode(e+(e>25?39:97))};function ud(e){var t,r="";for(t=Math.abs(e);t>Ns;t=t/Ns|0)r=_m(t%Ns)+r;return(_m(t%Ns)+r).replace(xb,"$1-$2")}var Pc,Jx=5381,Bo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Kx=function(e){return Bo(Jx,e)};function Gd(e){return ud(Kx(e)>>>0)}function yb(e){return e.displayName||e.name||"Component"}function Nc(e){return typeof e=="string"&&!0}var Qx=typeof Symbol=="function"&&Symbol.for,Yx=Qx?Symbol.for("react.memo"):60115,vb=Qx?Symbol.for("react.forward_ref"):60112,wb={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},kb={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Xx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},bb=((Pc={})[vb]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Pc[Yx]=Xx,Pc);function Om(e){return("type"in(t=e)&&t.type.$$typeof)===Yx?Xx:"$$typeof"in e?bb[e.$$typeof]:wb;var t}var Sb=Object.defineProperty,Cb=Object.getOwnPropertyNames,Mm=Object.getOwnPropertySymbols,Eb=Object.getOwnPropertyDescriptor,jb=Object.getPrototypeOf,Dm=Object.prototype;function Zx(e,t,r){if(typeof t!="string"){if(Dm){var i=jb(t);i&&i!==Dm&&Zx(e,i,r)}var l=Cb(t);Mm&&(l=l.concat(Mm(t)));for(var a=Om(e),u=Om(t),d=0;d<l.length;++d){var f=l[d];if(!(f in kb||r&&r[f]||u&&f in u||a&&f in a)){var p=Eb(t,f);try{Sb(e,f,p)}catch{}}}}return e}function ro(e){return typeof e=="function"}function Jd(e){return typeof e=="object"&&"styledComponentId"in e}function Qr(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ia(e,t){if(e.length===0)return"";for(var r=e[0],i=1;i<e.length;i++)r+=e[i];return r}function ul(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function cd(e,t,r){if(r===void 0&&(r=!1),!r&&!ul(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)e[i]=cd(e[i],t[i]);else if(ul(t))for(var i in t)e[i]=cd(e[i],t[i]);return e}function Kd(e,t){Object.defineProperty(e,"toString",{value:t})}function Rr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var Tb=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,i=0;i<t;i++)r+=this.groupSizes[i];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var i=this.groupSizes,l=i.length,a=l;t>=a;)if((a<<=1)<0)throw Rr(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(var u=l;u<a;u++)this.groupSizes[u]=0}for(var d=this.indexOfGroup(t+1),f=(u=0,r.length);u<f;u++)this.tag.insertRule(d,r[u])&&(this.groupSizes[t]++,d++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],i=this.indexOfGroup(t),l=i+r;this.groupSizes[t]=0;for(var a=i;a<l;a++)this.tag.deleteRule(i)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var i=this.groupSizes[t],l=this.indexOfGroup(t),a=l+i,u=l;u<a;u++)r+="".concat(this.tag.getRule(u)).concat(qd);return r},e}(),Js=new Map,la=new Map,Ks=1,As=function(e){if(Js.has(e))return Js.get(e);for(;la.has(Ks);)Ks++;var t=Ks++;return Js.set(e,t),la.set(t,e),t},$b=function(e,t){Ks=t+1,Js.set(e,t),la.set(t,e)},Rb="style[".concat(Ko,"][").concat(Wx,'="').concat(Ca,'"]'),Ib=new RegExp("^".concat(Ko,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Pb=function(e,t,r){for(var i,l=r.split(","),a=0,u=l.length;a<u;a++)(i=l[a])&&e.registerName(t,i)},Nb=function(e,t){for(var r,i=((r=t.textContent)!==null&&r!==void 0?r:"").split(qd),l=[],a=0,u=i.length;a<u;a++){var d=i[a].trim();if(d){var f=d.match(Ib);if(f){var p=0|parseInt(f[1],10),x=f[2];p!==0&&($b(x,p),Pb(e,x,f[3]),e.getTag().insertRules(p,l)),l.length=0}else l.push(d)}}},Bm=function(e){for(var t=document.querySelectorAll(Rb),r=0,i=t.length;r<i;r++){var l=t[r];l&&l.getAttribute(Ko)!==Hx&&(Nb(e,l),l.parentNode&&l.parentNode.removeChild(l))}};function Ab(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var ey=function(e){var t=document.head,r=e||t,i=document.createElement("style"),l=function(d){var f=Array.from(d.querySelectorAll("style[".concat(Ko,"]")));return f[f.length-1]}(r),a=l!==void 0?l.nextSibling:null;i.setAttribute(Ko,Hx),i.setAttribute(Wx,Ca);var u=Ab();return u&&i.setAttribute("nonce",u),r.insertBefore(i,a),i},Lb=function(){function e(t){this.element=ey(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(r){if(r.sheet)return r.sheet;for(var i=document.styleSheets,l=0,a=i.length;l<a;l++){var u=i[l];if(u.ownerNode===r)return u}throw Rr(17)}(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e}(),zb=function(){function e(t){this.element=ey(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var i=document.createTextNode(r);return this.element.insertBefore(i,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),Fb=function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),Um=oa,_b={isServer:!oa,useCSSOMInjection:!pb},sa=function(){function e(t,r,i){t===void 0&&(t=Qo),r===void 0&&(r={});var l=this;this.options=kt(kt({},_b),t),this.gs=r,this.names=new Map(i),this.server=!!t.isServer,!this.server&&oa&&Um&&(Um=!1,Bm(this)),Kd(this,function(){return function(a){for(var u=a.getTag(),d=u.length,f="",p=function(m){var v=function(E){return la.get(E)}(m);if(v===void 0)return"continue";var w=a.names.get(v),k=u.getGroup(m);if(w===void 0||!w.size||k.length===0)return"continue";var S="".concat(Ko,".g").concat(m,'[id="').concat(v,'"]'),j="";w!==void 0&&w.forEach(function(E){E.length>0&&(j+="".concat(E,","))}),f+="".concat(k).concat(S,'{content:"').concat(j,'"}').concat(qd)},x=0;x<d;x++)p(x);return f}(l)})}return e.registerId=function(t){return As(t)},e.prototype.rehydrate=function(){!this.server&&oa&&Bm(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(kt(kt({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(r){var i=r.useCSSOMInjection,l=r.target;return r.isServer?new Fb(l):i?new Lb(l):new zb(l)}(this.options),new Tb(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(As(t),this.names.has(t))this.names.get(t).add(r);else{var i=new Set;i.add(r),this.names.set(t,i)}},e.prototype.insertRules=function(t,r,i){this.registerName(t,r),this.getTag().insertRules(As(t),i)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(As(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Ob=/&/g,Mb=/^\s*\/\/.*$/gm;function ty(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(i){return"".concat(t," ").concat(i)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=ty(r.children,t)),r})}function Db(e){var t,r,i,l=Qo,a=l.options,u=a===void 0?Qo:a,d=l.plugins,f=d===void 0?Ea:d,p=function(v,w,k){return k.startsWith(r)&&k.endsWith(r)&&k.replaceAll(r,"").length>0?".".concat(t):v},x=f.slice();x.push(function(v){v.type===wa&&v.value.includes("&")&&(v.props[0]=v.props[0].replace(Ob,r).replace(i,p))}),u.prefix&&x.push(db),x.push(ab);var m=function(v,w,k,S){w===void 0&&(w=""),k===void 0&&(k=""),S===void 0&&(S="&"),t=S,r=w,i=new RegExp("\\".concat(r,"\\b"),"g");var j=v.replace(Mb,""),E=lb(k||w?"".concat(k," ").concat(w," { ").concat(j," }"):j);u.namespace&&(E=ty(E,u.namespace));var I=[];return ra(E,ub(x.concat(cb(function(A){return I.push(A)})))),I};return m.hash=f.length?f.reduce(function(v,w){return w.name||Rr(15),Bo(v,w.name)},Jx).toString():"",m}var Bb=new sa,dd=Db(),ny=Tt.createContext({shouldForwardProp:void 0,styleSheet:Bb,stylis:dd});ny.Consumer;Tt.createContext(void 0);function fd(){return $.useContext(ny)}var ry=function(){function e(t,r){var i=this;this.inject=function(l,a){a===void 0&&(a=dd);var u=i.name+a.hash;l.hasNameForId(i.id,u)||l.insertRules(i.id,u,a(i.rules,u,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Kd(this,function(){throw Rr(12,String(i.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=dd),this.name+t.hash},e}(),Ub=function(e){return e>="A"&&e<="Z"};function Vm(e){for(var t="",r=0;r<e.length;r++){var i=e[r];if(r===1&&i==="-"&&e[0]==="-")return e;Ub(i)?t+="-"+i.toLowerCase():t+=i}return t.startsWith("ms-")?"-"+t:t}var oy=function(e){return e==null||e===!1||e===""},iy=function(e){var t,r,i=[];for(var l in e){var a=e[l];e.hasOwnProperty(l)&&!oy(a)&&(Array.isArray(a)&&a.isCss||ro(a)?i.push("".concat(Vm(l),":"),a,";"):ul(a)?i.push.apply(i,qo(qo(["".concat(l," {")],iy(a),!1),["}"],!1)):i.push("".concat(Vm(l),": ").concat((t=l,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in fb||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return i};function $r(e,t,r,i){if(oy(e))return[];if(Jd(e))return[".".concat(e.styledComponentId)];if(ro(e)){if(!ro(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var l=e(t);return $r(l,t,r,i)}var a;return e instanceof ry?r?(e.inject(r,i),[e.getName(i)]):[e]:ul(e)?iy(e):Array.isArray(e)?Array.prototype.concat.apply(Ea,e.map(function(u){return $r(u,t,r,i)})):[e.toString()]}function ly(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(ro(r)&&!Jd(r))return!1}return!0}var Vb=Kx(Ca),Hb=function(){function e(t,r,i){this.rules=t,this.staticRulesId="",this.isStatic=(i===void 0||i.isStatic)&&ly(t),this.componentId=r,this.baseHash=Bo(Vb,r),this.baseStyle=i,sa.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,i){var l=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,i):"";if(this.isStatic&&!i.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))l=Qr(l,this.staticRulesId);else{var a=ia($r(this.rules,t,r,i)),u=ud(Bo(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,u)){var d=i(a,".".concat(u),void 0,this.componentId);r.insertRules(this.componentId,u,d)}l=Qr(l,u),this.staticRulesId=u}else{for(var f=Bo(this.baseHash,i.hash),p="",x=0;x<this.rules.length;x++){var m=this.rules[x];if(typeof m=="string")p+=m;else if(m){var v=ia($r(m,t,r,i));f=Bo(f,v+x),p+=v}}if(p){var w=ud(f>>>0);r.hasNameForId(this.componentId,w)||r.insertRules(this.componentId,w,i(p,".".concat(w),void 0,this.componentId)),l=Qr(l,w)}}return l},e}(),Yo=Tt.createContext(void 0);Yo.Consumer;function Wb(){var e=$.useContext(Yo);if(!e)throw Rr(18);return e}function Hm(e){var t=Tt.useContext(Yo),r=$.useMemo(function(){return function(i,l){if(!i)throw Rr(14);if(ro(i)){var a=i(l);return a}if(Array.isArray(i)||typeof i!="object")throw Rr(8);return l?kt(kt({},l),i):i}(e.theme,t)},[e.theme,t]);return e.children?Tt.createElement(Yo.Provider,{value:r},e.children):null}var Ac={};function qb(e,t,r){var i=Jd(e),l=e,a=!Nc(e),u=t.attrs,d=u===void 0?Ea:u,f=t.componentId,p=f===void 0?function(F,O){var N=typeof F!="string"?"sc":Fm(F);Ac[N]=(Ac[N]||0)+1;var H="".concat(N,"-").concat(Gd(Ca+N+Ac[N]));return O?"".concat(O,"-").concat(H):H}(t.displayName,t.parentComponentId):f,x=t.displayName,m=x===void 0?function(F){return Nc(F)?"styled.".concat(F):"Styled(".concat(yb(F),")")}(e):x,v=t.displayName&&t.componentId?"".concat(Fm(t.displayName),"-").concat(t.componentId):t.componentId||p,w=i&&l.attrs?l.attrs.concat(d).filter(Boolean):d,k=t.shouldForwardProp;if(i&&l.shouldForwardProp){var S=l.shouldForwardProp;if(t.shouldForwardProp){var j=t.shouldForwardProp;k=function(F,O){return S(F,O)&&j(F,O)}}else k=S}var E=new Hb(r,v,i?l.componentStyle:void 0);function I(F,O){return function(N,H,K){var ne=N.attrs,M=N.componentStyle,Z=N.defaultProps,le=N.foldedComponentIds,X=N.styledComponentId,re=N.target,U=Tt.useContext(Yo),pe=fd(),ae=N.shouldForwardProp||pe.shouldForwardProp,Q=qx(H,U,Z)||Qo,de=function(ye,ke,he){for(var fe,se=kt(kt({},ke),{className:void 0,theme:he}),ve=0;ve<ye.length;ve+=1){var Le=ro(fe=ye[ve])?fe(se):fe;for(var Ie in Le)se[Ie]=Ie==="className"?Qr(se[Ie],Le[Ie]):Ie==="style"?kt(kt({},se[Ie]),Le[Ie]):Le[Ie]}return ke.className&&(se.className=Qr(se.className,ke.className)),se}(ne,H,Q),T=de.as||re,z={};for(var q in de)de[q]===void 0||q[0]==="$"||q==="as"||q==="theme"&&de.theme===Q||(q==="forwardedAs"?z.as=de.forwardedAs:ae&&!ae(q,T)||(z[q]=de[q]));var R=function(ye,ke){var he=fd(),fe=ye.generateAndInjectStyles(ke,he.styleSheet,he.stylis);return fe}(M,de),ce=Qr(le,X);return R&&(ce+=" "+R),de.className&&(ce+=" "+de.className),z[Nc(T)&&!Gx.has(T)?"class":"className"]=ce,z.ref=K,$.createElement(T,z)}(A,F,O)}I.displayName=m;var A=Tt.forwardRef(I);return A.attrs=w,A.componentStyle=E,A.displayName=m,A.shouldForwardProp=k,A.foldedComponentIds=i?Qr(l.foldedComponentIds,l.styledComponentId):"",A.styledComponentId=v,A.target=i?l.target:e,Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(F){this._foldedDefaultProps=i?function(O){for(var N=[],H=1;H<arguments.length;H++)N[H-1]=arguments[H];for(var K=0,ne=N;K<ne.length;K++)cd(O,ne[K],!0);return O}({},l.defaultProps,F):F}}),Kd(A,function(){return".".concat(A.styledComponentId)}),a&&Zx(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),A}function Wm(e,t){for(var r=[e[0]],i=0,l=t.length;i<l;i+=1)r.push(t[i],e[i+1]);return r}var qm=function(e){return Object.assign(e,{isCss:!0})};function wt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(ro(e)||ul(e))return qm($r(Wm(Ea,qo([e],t,!0))));var i=e;return t.length===0&&i.length===1&&typeof i[0]=="string"?$r(i):qm($r(Wm(i,t)))}function pd(e,t,r){if(r===void 0&&(r=Qo),!t)throw Rr(1,t);var i=function(l){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];return e(t,r,wt.apply(void 0,qo([l],a,!1)))};return i.attrs=function(l){return pd(e,t,kt(kt({},r),{attrs:Array.prototype.concat(r.attrs,l).filter(Boolean)}))},i.withConfig=function(l){return pd(e,t,kt(kt({},r),l))},i}var sy=function(e){return pd(qb,e)},C=sy;Gx.forEach(function(e){C[e]=sy(e)});var Gb=function(){function e(t,r){this.rules=t,this.componentId=r,this.isStatic=ly(t),sa.registerId(this.componentId+1)}return e.prototype.createStyles=function(t,r,i,l){var a=l(ia($r(this.rules,r,i,l)),""),u=this.componentId+t;i.insertRules(u,u,a)},e.prototype.removeStyles=function(t,r){r.clearRules(this.componentId+t)},e.prototype.renderStyles=function(t,r,i,l){t>2&&sa.registerId(this.componentId+t),this.removeStyles(t,i),this.createStyles(t,r,i,l)},e}();function Jb(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=wt.apply(void 0,qo([e],t,!1)),l="sc-global-".concat(Gd(JSON.stringify(i))),a=new Gb(i,l),u=function(f){var p=fd(),x=Tt.useContext(Yo),m=Tt.useRef(p.styleSheet.allocateGSInstance(l)).current;return p.styleSheet.server&&d(m,f,p.styleSheet,x,p.stylis),Tt.useLayoutEffect(function(){if(!p.styleSheet.server)return d(m,f,p.styleSheet,x,p.stylis),function(){return a.removeStyles(m,p.styleSheet)}},[m,f,p.styleSheet,x,p.stylis]),null};function d(f,p,x,m,v){if(a.isStatic)a.renderStyles(f,hb,x,v);else{var w=kt(kt({},p),{theme:qx(p,m,u.defaultProps)});a.renderStyles(f,w,x,v)}}return Tt.memo(u)}function ti(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=ia(wt.apply(void 0,qo([e],t,!1))),l=Gd(i);return new ry(l,i)}const Kb="/assets/logo-BGHkG1-J.png",Qb="/assets/logo-dark-KAsU1C78.png",Gm={name:"light",colors:{background:"#ffffffaa",overlayBackground:"#ffffffdd",pageBackground:"#ffffff",backgroundSecondary:"#f6f8fa",text:"#333333",textSecondary:"#6a737d",primary:"#0056b3",primaryHover:"#004494",error:"#d32f2f",errorHover:"#b71c1c",warning:"#f57c00",info:"#0288d1",secondary:"#616161",secondaryHover:"#424242",border:"#e1e4e8",buttonBg:"#e0e0e0",buttonText:"#333333",buttonHoverBg:"#bdbdbd",inputBg:"#ffffff",inputBorder:"#bdbdbd",inputText:"#333333",codeBackground:"#f5f5f5",codeText:"#24292e",systemMessageBackground:"#e3f2fd",systemMessageText:"#0d47a1",systemMessageBorder:"#bbdefb",systemMessageTimestamp:"#1565c0",disabled:"#9e9e9e",userMessageBackground:"#e8f5e9",userMessageText:"#1b5e20",userMessageTimestamp:"#2e7d32",menuBackdrop:"rgba(0, 0, 0, 0.5)",menuBackground:"#ffffff",menuHover:"#f6f8fa",menuBorder:"#e1e4e8",menuShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",diffAddedText:"rgba(0, 128, 0, 0.7)",diffRemovedText:"rgba(255, 0, 0, 0.7)"},backgroundImage:Kb,zIndex:{modal:1e3,menuBackdrop:998,menu:999},transitions:{menuFade:"0.2s ease",menuSlide:"0.2s ease",menuHover:"0.2s ease"}},Jm={name:"dark",colors:{background:"#00000055",overlayBackground:"#000000cc",pageBackground:"#1e1e1e",backgroundSecondary:"#2d333b",text:"#d4d4d4",textSecondary:"#8b949e",primary:"#58a6ff",primaryHover:"#79b8ff",secondary:"#8b949e",error:"#f44336",errorHover:"#d32f2f",secondaryHover:"#9aa3ad",warning:"#ffa726",info:"#29b6f6",border:"#30363d",buttonBg:"#21262d",buttonText:"#c9d1d9",buttonHoverBg:"#30363d",inputBg:"#0d1117",inputBorder:"#30363d",inputText:"#c9d1d9",codeBackground:"#161b22",codeText:"#c9d1d9",systemMessageBackground:"#1c2128",systemMessageText:"#8b949e",systemMessageBorder:"#30363d",systemMessageTimestamp:"#6e7681",disabled:"#41464b",userMessageBackground:"#1c4a7d",userMessageText:"#e6f3ff",userMessageTimestamp:"#a8c7f0",menuBackdrop:"rgba(0, 0, 0, 0.7)",menuBackground:"#1e1e1e",menuHover:"#2d333b",menuBorder:"#30363d",menuShadow:"0 4px 12px rgba(0, 0, 0, 0.3)",diffAddedText:"rgba(0, 255, 0, 0.7)",diffRemovedText:"rgba(255, 0, 0, 0.7)"},backgroundImage:Qb,zIndex:{modal:1e3,menuBackdrop:998,menu:999},transitions:{menuFade:"0.2s ease",menuSlide:"0.2s ease",menuHover:"0.2s ease"}},Yb=({usage:e})=>{const[t,r]=$.useState("total"),i=m=>{r(m.target.value)},l=e.usageMetrics[t],a=e.usageMetrics[t].cost||0,u=qi(a.toFixed(2)),d=qi(l.rpm),f=qi(l.rpd),p=qi(Km(l.tpm)),x=qi(Km(l.tpd));return h.jsx(Zb,{children:h.jsxs(eS,{children:[h.jsx(tS,{onChange:i,value:t,children:Object.keys(e.usageMetrics).map(m=>h.jsx("option",{value:m,children:m},m))}),h.jsxs(Gi,{children:[h.jsx(Ji,{children:"Cost:"}),h.jsxs(Ki,{children:["$",u]},u)]}),h.jsxs(Gi,{children:[h.jsx(Ji,{children:"RPM:"}),h.jsx(Ki,{children:d},d)]}),h.jsxs(Gi,{children:[h.jsx(Ji,{children:"RPD:"}),h.jsx(Ki,{children:f},f)]}),h.jsxs(Gi,{children:[h.jsx(Ji,{children:"TPM:"}),h.jsx(Ki,{children:p},p)]}),h.jsxs(Gi,{children:[h.jsx(Ji,{children:"TPD:"}),h.jsx(Ki,{children:x},x)]})]})})},Km=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(0)+"K":e.toString(),qi=e=>{const[t,r]=$.useState(e),i=$.useRef(e);return $.useEffect(()=>{e!==i.current&&(r(e),i.current=e)},[e]),t},Xb=ti`
42
- 0% {
43
- transform: scale(1);
44
- opacity: 1;
45
- }
46
- 50% {
47
- transform: scale(1.2);
48
- opacity: 0.7;
49
- }
50
- 100% {
51
- transform: scale(1);
52
- opacity: 1;
53
- }
54
- `,Zb=C.div`
55
- background-color: ${({theme:e})=>e.colors.background};
56
- border-radius: 4px;
57
- padding: 4px 4px;
58
- box-shadow:
59
- 0 1px 3px rgba(0, 0, 0, 0.12),
60
- 0 1px 2px rgba(0, 0, 0, 0.24);
61
- `,eS=C.div`
62
- display: flex;
63
- flex-wrap: wrap;
64
- gap: 8px;
65
- align-items: center;
66
- `,tS=C.select`
67
- padding: 2px 4px;
68
- border-radius: 4px;
69
- border: 1px solid ${({theme:e})=>e.colors.border};
70
- background-color: ${({theme:e})=>e.colors.background};
71
- color: ${({theme:e})=>e.colors.text};
72
- font-size: 0.9em;
73
- `,Gi=C.div`
74
- display: flex;
75
- flex-direction: column;
76
- align-items: center;
77
- margin-left: 8px;
78
- `,Ji=C.span`
79
- font-size: 0.8em;
80
- color: ${({theme:e})=>e.colors.textSecondary};
81
- `,Ki=C.span`
82
- font-size: 0.9em;
83
- font-weight: bold;
84
- color: ${({theme:e})=>e.colors.text};
85
- animation: ${Xb} 0.5s ease-in-out;
86
- `;function ay(e,t){return function(){return e.apply(t,arguments)}}const{toString:nS}=Object.prototype,{getPrototypeOf:Qd}=Object,{iterator:ja,toStringTag:uy}=Symbol,Ta=(e=>t=>{const r=nS.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Nn=e=>(e=e.toLowerCase(),t=>Ta(t)===e),$a=e=>t=>typeof t===e,{isArray:ni}=Array,Xo=$a("undefined");function hl(e){return e!==null&&!Xo(e)&&e.constructor!==null&&!Xo(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const cy=Nn("ArrayBuffer");function rS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&cy(e.buffer),t}const oS=$a("string"),Kt=$a("function"),dy=$a("number"),ml=e=>e!==null&&typeof e=="object",iS=e=>e===!0||e===!1,Qs=e=>{if(Ta(e)!=="object")return!1;const t=Qd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(uy in e)&&!(ja in e)},lS=e=>{if(!ml(e)||hl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},sS=Nn("Date"),aS=Nn("File"),uS=Nn("Blob"),cS=Nn("FileList"),dS=e=>ml(e)&&Kt(e.pipe),fS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=Ta(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},pS=Nn("URLSearchParams"),[hS,mS,gS,xS]=["ReadableStream","Request","Response","Headers"].map(Nn),yS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gl(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,l;if(typeof e!="object"&&(e=[e]),ni(e))for(i=0,l=e.length;i<l;i++)t.call(null,e[i],i,e);else{if(hl(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let d;for(i=0;i<u;i++)d=a[i],t.call(null,e[d],d,e)}}function fy(e,t){if(hl(e))return null;t=t.toLowerCase();const r=Object.keys(e);let i=r.length,l;for(;i-- >0;)if(l=r[i],t===l.toLowerCase())return l;return null}const Yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,py=e=>!Xo(e)&&e!==Yr;function hd(){const{caseless:e,skipUndefined:t}=py(this)&&this||{},r={},i=(l,a)=>{const u=e&&fy(r,a)||a;Qs(r[u])&&Qs(l)?r[u]=hd(r[u],l):Qs(l)?r[u]=hd({},l):ni(l)?r[u]=l.slice():(!t||!Xo(l))&&(r[u]=l)};for(let l=0,a=arguments.length;l<a;l++)arguments[l]&&gl(arguments[l],i);return r}const vS=(e,t,r,{allOwnKeys:i}={})=>(gl(t,(l,a)=>{r&&Kt(l)?e[a]=ay(l,r):e[a]=l},{allOwnKeys:i}),e),wS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kS=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},bS=(e,t,r,i)=>{let l,a,u;const d={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),a=l.length;a-- >0;)u=l[a],(!i||i(u,e,t))&&!d[u]&&(t[u]=e[u],d[u]=!0);e=r!==!1&&Qd(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},SS=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},CS=e=>{if(!e)return null;if(ni(e))return e;let t=e.length;if(!dy(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},ES=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Qd(Uint8Array)),jS=(e,t)=>{const i=(e&&e[ja]).call(e);let l;for(;(l=i.next())&&!l.done;){const a=l.value;t.call(e,a[0],a[1])}},TS=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},$S=Nn("HTMLFormElement"),RS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,l){return i.toUpperCase()+l}),Qm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),IS=Nn("RegExp"),hy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};gl(r,(l,a)=>{let u;(u=t(l,a,e))!==!1&&(i[a]=u||l)}),Object.defineProperties(e,i)},PS=e=>{hy(e,(t,r)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(Kt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},NS=(e,t)=>{const r={},i=l=>{l.forEach(a=>{r[a]=!0})};return ni(e)?i(e):i(String(e).split(t)),r},AS=()=>{},LS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zS(e){return!!(e&&Kt(e.append)&&e[uy]==="FormData"&&e[ja])}const FS=e=>{const t=new Array(10),r=(i,l)=>{if(ml(i)){if(t.indexOf(i)>=0)return;if(hl(i))return i;if(!("toJSON"in i)){t[l]=i;const a=ni(i)?[]:{};return gl(i,(u,d)=>{const f=r(u,l+1);!Xo(f)&&(a[d]=f)}),t[l]=void 0,a}}return i};return r(e,0)},_S=Nn("AsyncFunction"),OS=e=>e&&(ml(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),my=((e,t)=>e?setImmediate:t?((r,i)=>(Yr.addEventListener("message",({source:l,data:a})=>{l===Yr&&a===r&&i.length&&i.shift()()},!1),l=>{i.push(l),Yr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Kt(Yr.postMessage)),MS=typeof queueMicrotask<"u"?queueMicrotask.bind(Yr):typeof process<"u"&&process.nextTick||my,DS=e=>e!=null&&Kt(e[ja]),W={isArray:ni,isArrayBuffer:cy,isBuffer:hl,isFormData:fS,isArrayBufferView:rS,isString:oS,isNumber:dy,isBoolean:iS,isObject:ml,isPlainObject:Qs,isEmptyObject:lS,isReadableStream:hS,isRequest:mS,isResponse:gS,isHeaders:xS,isUndefined:Xo,isDate:sS,isFile:aS,isBlob:uS,isRegExp:IS,isFunction:Kt,isStream:dS,isURLSearchParams:pS,isTypedArray:ES,isFileList:cS,forEach:gl,merge:hd,extend:vS,trim:yS,stripBOM:wS,inherits:kS,toFlatObject:bS,kindOf:Ta,kindOfTest:Nn,endsWith:SS,toArray:CS,forEachEntry:jS,matchAll:TS,isHTMLForm:$S,hasOwnProperty:Qm,hasOwnProp:Qm,reduceDescriptors:hy,freezeMethods:PS,toObjectSet:NS,toCamelCase:RS,noop:AS,toFiniteNumber:LS,findKey:fy,global:Yr,isContextDefined:py,isSpecCompliantForm:zS,toJSONObject:FS,isAsyncFn:_S,isThenable:OS,setImmediate:my,asap:MS,isIterable:DS};function Re(e,t,r,i,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),l&&(this.response=l,this.status=l.status?l.status:null)}W.inherits(Re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.status}}});const gy=Re.prototype,xy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xy[e]={value:e}});Object.defineProperties(Re,xy);Object.defineProperty(gy,"isAxiosError",{value:!0});Re.from=(e,t,r,i,l,a)=>{const u=Object.create(gy);W.toFlatObject(e,u,function(x){return x!==Error.prototype},p=>p!=="isAxiosError");const d=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return Re.call(u,d,f,r,i,l),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",a&&Object.assign(u,a),u};const BS=null;function md(e){return W.isPlainObject(e)||W.isArray(e)}function yy(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function Ym(e,t,r){return e?e.concat(t).map(function(l,a){return l=yy(l),!r&&a?"["+l+"]":l}).join(r?".":""):t}function US(e){return W.isArray(e)&&!e.some(md)}const VS=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Ra(e,t,r){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=W.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,j){return!W.isUndefined(j[S])});const i=r.metaTokens,l=r.visitor||x,a=r.dots,u=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(l))throw new TypeError("visitor must be a function");function p(k){if(k===null)return"";if(W.isDate(k))return k.toISOString();if(W.isBoolean(k))return k.toString();if(!f&&W.isBlob(k))throw new Re("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(k)||W.isTypedArray(k)?f&&typeof Blob=="function"?new Blob([k]):Buffer.from(k):k}function x(k,S,j){let E=k;if(k&&!j&&typeof k=="object"){if(W.endsWith(S,"{}"))S=i?S:S.slice(0,-2),k=JSON.stringify(k);else if(W.isArray(k)&&US(k)||(W.isFileList(k)||W.endsWith(S,"[]"))&&(E=W.toArray(k)))return S=yy(S),E.forEach(function(A,F){!(W.isUndefined(A)||A===null)&&t.append(u===!0?Ym([S],F,a):u===null?S:S+"[]",p(A))}),!1}return md(k)?!0:(t.append(Ym(j,S,a),p(k)),!1)}const m=[],v=Object.assign(VS,{defaultVisitor:x,convertValue:p,isVisitable:md});function w(k,S){if(!W.isUndefined(k)){if(m.indexOf(k)!==-1)throw Error("Circular reference detected in "+S.join("."));m.push(k),W.forEach(k,function(E,I){(!(W.isUndefined(E)||E===null)&&l.call(t,E,W.isString(I)?I.trim():I,S,v))===!0&&w(E,S?S.concat(I):[I])}),m.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Xm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Yd(e,t){this._pairs=[],e&&Ra(e,this,t)}const vy=Yd.prototype;vy.append=function(t,r){this._pairs.push([t,r])};vy.toString=function(t){const r=t?function(i){return t.call(this,i,Xm)}:Xm;return this._pairs.map(function(l){return r(l[0])+"="+r(l[1])},"").join("&")};function HS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function wy(e,t,r){if(!t)return e;const i=r&&r.encode||HS;W.isFunction(r)&&(r={serialize:r});const l=r&&r.serialize;let a;if(l?a=l(t,r):a=W.isURLSearchParams(t)?t.toString():new Yd(t,r).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Zm{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(i){i!==null&&t(i)})}}const ky={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},WS=typeof URLSearchParams<"u"?URLSearchParams:Yd,qS=typeof FormData<"u"?FormData:null,GS=typeof Blob<"u"?Blob:null,JS={isBrowser:!0,classes:{URLSearchParams:WS,FormData:qS,Blob:GS},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",gd=typeof navigator=="object"&&navigator||void 0,KS=Xd&&(!gd||["ReactNative","NativeScript","NS"].indexOf(gd.product)<0),QS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",YS=Xd&&window.location.href||"http://localhost",XS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:KS,hasStandardBrowserWebWorkerEnv:QS,navigator:gd,origin:YS},Symbol.toStringTag,{value:"Module"})),Lt={...XS,...JS};function ZS(e,t){return Ra(e,new Lt.classes.URLSearchParams,{visitor:function(r,i,l,a){return Lt.isNode&&W.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function eC(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function tC(e){const t={},r=Object.keys(e);let i;const l=r.length;let a;for(i=0;i<l;i++)a=r[i],t[a]=e[a];return t}function by(e){function t(r,i,l,a){let u=r[a++];if(u==="__proto__")return!0;const d=Number.isFinite(+u),f=a>=r.length;return u=!u&&W.isArray(l)?l.length:u,f?(W.hasOwnProp(l,u)?l[u]=[l[u],i]:l[u]=i,!d):((!l[u]||!W.isObject(l[u]))&&(l[u]=[]),t(r,i,l[u],a)&&W.isArray(l[u])&&(l[u]=tC(l[u])),!d)}if(W.isFormData(e)&&W.isFunction(e.entries)){const r={};return W.forEachEntry(e,(i,l)=>{t(eC(i),l,r,0)}),r}return null}function nC(e,t,r){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const xl={transitional:ky,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const i=r.getContentType()||"",l=i.indexOf("application/json")>-1,a=W.isObject(t);if(a&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return l?JSON.stringify(by(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return ZS(t,this.formSerializer).toString();if((d=W.isFileList(t))||i.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ra(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||l?(r.setContentType("application/json",!1),nC(t)):t}],transformResponse:[function(t){const r=this.transitional||xl.transitional,i=r&&r.forcedJSONParsing,l=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(i&&!this.responseType||l)){const u=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(t,this.parseReviver)}catch(d){if(u)throw d.name==="SyntaxError"?Re.from(d,Re.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{xl.headers[e]={}});const rC=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oC=e=>{const t={};let r,i,l;return e&&e.split(`
87
- `).forEach(function(u){l=u.indexOf(":"),r=u.substring(0,l).trim().toLowerCase(),i=u.substring(l+1).trim(),!(!r||t[r]&&rC[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},eg=Symbol("internals");function Qi(e){return e&&String(e).trim().toLowerCase()}function Ys(e){return e===!1||e==null?e:W.isArray(e)?e.map(Ys):String(e)}function iC(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const lC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Lc(e,t,r,i,l){if(W.isFunction(i))return i.call(this,t,r);if(l&&(t=r),!!W.isString(t)){if(W.isString(i))return t.indexOf(i)!==-1;if(W.isRegExp(i))return i.test(t)}}function sC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function aC(e,t){const r=W.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(l,a,u){return this[i].call(this,t,l,a,u)},configurable:!0})})}let Qt=class{constructor(t){t&&this.set(t)}set(t,r,i){const l=this;function a(d,f,p){const x=Qi(f);if(!x)throw new Error("header name must be a non-empty string");const m=W.findKey(l,x);(!m||l[m]===void 0||p===!0||p===void 0&&l[m]!==!1)&&(l[m||f]=Ys(d))}const u=(d,f)=>W.forEach(d,(p,x)=>a(p,x,f));if(W.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(W.isString(t)&&(t=t.trim())&&!lC(t))u(oC(t),r);else if(W.isObject(t)&&W.isIterable(t)){let d={},f,p;for(const x of t){if(!W.isArray(x))throw TypeError("Object iterator must return a key-value pair");d[p=x[0]]=(f=d[p])?W.isArray(f)?[...f,x[1]]:[f,x[1]]:x[1]}u(d,r)}else t!=null&&a(r,t,i);return this}get(t,r){if(t=Qi(t),t){const i=W.findKey(this,t);if(i){const l=this[i];if(!r)return l;if(r===!0)return iC(l);if(W.isFunction(r))return r.call(this,l,i);if(W.isRegExp(r))return r.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Qi(t),t){const i=W.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Lc(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let l=!1;function a(u){if(u=Qi(u),u){const d=W.findKey(i,u);d&&(!r||Lc(i,i[d],d,r))&&(delete i[d],l=!0)}}return W.isArray(t)?t.forEach(a):a(t),l}clear(t){const r=Object.keys(this);let i=r.length,l=!1;for(;i--;){const a=r[i];(!t||Lc(this,this[a],a,t,!0))&&(delete this[a],l=!0)}return l}normalize(t){const r=this,i={};return W.forEach(this,(l,a)=>{const u=W.findKey(i,a);if(u){r[u]=Ys(l),delete r[a];return}const d=t?sC(a):String(a).trim();d!==a&&delete r[a],r[d]=Ys(l),i[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return W.forEach(this,(i,l)=>{i!=null&&i!==!1&&(r[l]=t&&W.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
88
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(l=>i.set(l)),i}static accessor(t){const i=(this[eg]=this[eg]={accessors:{}}).accessors,l=this.prototype;function a(u){const d=Qi(u);i[d]||(aC(l,u),i[d]=!0)}return W.isArray(t)?t.forEach(a):a(t),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(Qt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});W.freezeMethods(Qt);function zc(e,t){const r=this||xl,i=t||r,l=Qt.from(i.headers);let a=i.data;return W.forEach(e,function(d){a=d.call(r,a,l.normalize(),t?t.status:void 0)}),l.normalize(),a}function Sy(e){return!!(e&&e.__CANCEL__)}function ri(e,t,r){Re.call(this,e??"canceled",Re.ERR_CANCELED,t,r),this.name="CanceledError"}W.inherits(ri,Re,{__CANCEL__:!0});function Cy(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Re("Request failed with status code "+r.status,[Re.ERR_BAD_REQUEST,Re.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function uC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cC(e,t){e=e||10;const r=new Array(e),i=new Array(e);let l=0,a=0,u;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),x=i[a];u||(u=p),r[l]=f,i[l]=p;let m=a,v=0;for(;m!==l;)v+=r[m++],m=m%e;if(l=(l+1)%e,l===a&&(a=(a+1)%e),p-u<t)return;const w=x&&p-x;return w?Math.round(v*1e3/w):void 0}}function dC(e,t){let r=0,i=1e3/t,l,a;const u=(p,x=Date.now())=>{r=x,l=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const x=Date.now(),m=x-r;m>=i?u(p,x):(l=p,a||(a=setTimeout(()=>{a=null,u(l)},i-m)))},()=>l&&u(l)]}const aa=(e,t,r=3)=>{let i=0;const l=cC(50,250);return dC(a=>{const u=a.loaded,d=a.lengthComputable?a.total:void 0,f=u-i,p=l(f),x=u<=d;i=u;const m={loaded:u,total:d,progress:d?u/d:void 0,bytes:f,rate:p||void 0,estimated:p&&d&&x?(d-u)/p:void 0,event:a,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(m)},r)},tg=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},ng=e=>(...t)=>W.asap(()=>e(...t)),fC=Lt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Lt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,pC=Lt.hasStandardBrowserEnv?{write(e,t,r,i,l,a){const u=[e+"="+encodeURIComponent(t)];W.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),W.isString(i)&&u.push("path="+i),W.isString(l)&&u.push("domain="+l),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ey(e,t,r){let i=!hC(t);return e&&(i||r==!1)?mC(e,t):t}const rg=e=>e instanceof Qt?{...e}:e;function oo(e,t){t=t||{};const r={};function i(p,x,m,v){return W.isPlainObject(p)&&W.isPlainObject(x)?W.merge.call({caseless:v},p,x):W.isPlainObject(x)?W.merge({},x):W.isArray(x)?x.slice():x}function l(p,x,m,v){if(W.isUndefined(x)){if(!W.isUndefined(p))return i(void 0,p,m,v)}else return i(p,x,m,v)}function a(p,x){if(!W.isUndefined(x))return i(void 0,x)}function u(p,x){if(W.isUndefined(x)){if(!W.isUndefined(p))return i(void 0,p)}else return i(void 0,x)}function d(p,x,m){if(m in t)return i(p,x);if(m in e)return i(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(p,x,m)=>l(rg(p),rg(x),m,!0)};return W.forEach(Object.keys({...e,...t}),function(x){const m=f[x]||l,v=m(e[x],t[x],x);W.isUndefined(v)&&m!==d||(r[x]=v)}),r}const jy=e=>{const t=oo({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:l,xsrfCookieName:a,headers:u,auth:d}=t;if(t.headers=u=Qt.from(u),t.url=wy(Ey(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),W.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(W.isFunction(r.getHeaders)){const f=r.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([x,m])=>{p.includes(x.toLowerCase())&&u.set(x,m)})}}if(Lt.hasStandardBrowserEnv&&(i&&W.isFunction(i)&&(i=i(t)),i||i!==!1&&fC(t.url))){const f=l&&a&&pC.read(a);f&&u.set(l,f)}return t},gC=typeof XMLHttpRequest<"u",xC=gC&&function(e){return new Promise(function(r,i){const l=jy(e);let a=l.data;const u=Qt.from(l.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=l,x,m,v,w,k;function S(){w&&w(),k&&k(),l.cancelToken&&l.cancelToken.unsubscribe(x),l.signal&&l.signal.removeEventListener("abort",x)}let j=new XMLHttpRequest;j.open(l.method.toUpperCase(),l.url,!0),j.timeout=l.timeout;function E(){if(!j)return;const A=Qt.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),O={data:!d||d==="text"||d==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:A,config:e,request:j};Cy(function(H){r(H),S()},function(H){i(H),S()},O),j=null}"onloadend"in j?j.onloadend=E:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(E)},j.onabort=function(){j&&(i(new Re("Request aborted",Re.ECONNABORTED,e,j)),j=null)},j.onerror=function(F){const O=F&&F.message?F.message:"Network Error",N=new Re(O,Re.ERR_NETWORK,e,j);N.event=F||null,i(N),j=null},j.ontimeout=function(){let F=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const O=l.transitional||ky;l.timeoutErrorMessage&&(F=l.timeoutErrorMessage),i(new Re(F,O.clarifyTimeoutError?Re.ETIMEDOUT:Re.ECONNABORTED,e,j)),j=null},a===void 0&&u.setContentType(null),"setRequestHeader"in j&&W.forEach(u.toJSON(),function(F,O){j.setRequestHeader(O,F)}),W.isUndefined(l.withCredentials)||(j.withCredentials=!!l.withCredentials),d&&d!=="json"&&(j.responseType=l.responseType),p&&([v,k]=aa(p,!0),j.addEventListener("progress",v)),f&&j.upload&&([m,w]=aa(f),j.upload.addEventListener("progress",m),j.upload.addEventListener("loadend",w)),(l.cancelToken||l.signal)&&(x=A=>{j&&(i(!A||A.type?new ri(null,e,j):A),j.abort(),j=null)},l.cancelToken&&l.cancelToken.subscribe(x),l.signal&&(l.signal.aborted?x():l.signal.addEventListener("abort",x)));const I=uC(l.url);if(I&&Lt.protocols.indexOf(I)===-1){i(new Re("Unsupported protocol "+I+":",Re.ERR_BAD_REQUEST,e));return}j.send(a||null)})},yC=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,l;const a=function(p){if(!l){l=!0,d();const x=p instanceof Error?p:this.reason;i.abort(x instanceof Re?x:new ri(x instanceof Error?x.message:x))}};let u=t&&setTimeout(()=>{u=null,a(new Re(`timeout ${t} of ms exceeded`,Re.ETIMEDOUT))},t);const d=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),e=null)};e.forEach(p=>p.addEventListener("abort",a));const{signal:f}=i;return f.unsubscribe=()=>W.asap(d),f}},vC=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let i=0,l;for(;i<r;)l=i+t,yield e.slice(i,l),i=l},wC=async function*(e,t){for await(const r of kC(e))yield*vC(r,t)},kC=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:i}=await t.read();if(r)break;yield i}}finally{await t.cancel()}},og=(e,t,r,i)=>{const l=wC(e,t);let a=0,u,d=f=>{u||(u=!0,i&&i(f))};return new ReadableStream({async pull(f){try{const{done:p,value:x}=await l.next();if(p){d(),f.close();return}let m=x.byteLength;if(r){let v=a+=m;r(v)}f.enqueue(new Uint8Array(x))}catch(p){throw d(p),p}},cancel(f){return d(f),l.return()}},{highWaterMark:2})},ig=64*1024,{isFunction:Ls}=W,Ty=(({fetch:e,Request:t,Response:r})=>({fetch:e,Request:t,Response:r}))(W.global),{ReadableStream:lg,TextEncoder:sg}=W.global,ag=(e,...t)=>{try{return!!e(...t)}catch{return!1}},bC=e=>{const{fetch:t,Request:r,Response:i}=Object.assign({},Ty,e),l=Ls(t),a=Ls(r),u=Ls(i);if(!l)return!1;const d=l&&Ls(lg),f=l&&(typeof sg=="function"?(k=>S=>k.encode(S))(new sg):async k=>new Uint8Array(await new r(k).arrayBuffer())),p=a&&d&&ag(()=>{let k=!1;const S=new r(Lt.origin,{body:new lg,method:"POST",get duplex(){return k=!0,"half"}}).headers.has("Content-Type");return k&&!S}),x=u&&d&&ag(()=>W.isReadableStream(new i("").body)),m={stream:x&&(k=>k.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!m[k]&&(m[k]=(S,j)=>{let E=S&&S[k];if(E)return E.call(S);throw new Re(`Response type '${k}' is not supported`,Re.ERR_NOT_SUPPORT,j)})});const v=async k=>{if(k==null)return 0;if(W.isBlob(k))return k.size;if(W.isSpecCompliantForm(k))return(await new r(Lt.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(W.isArrayBufferView(k)||W.isArrayBuffer(k))return k.byteLength;if(W.isURLSearchParams(k)&&(k=k+""),W.isString(k))return(await f(k)).byteLength},w=async(k,S)=>{const j=W.toFiniteNumber(k.getContentLength());return j??v(S)};return async k=>{let{url:S,method:j,data:E,signal:I,cancelToken:A,timeout:F,onDownloadProgress:O,onUploadProgress:N,responseType:H,headers:K,withCredentials:ne="same-origin",fetchOptions:M}=jy(k);H=H?(H+"").toLowerCase():"text";let Z=yC([I,A&&A.toAbortSignal()],F),le=null;const X=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let re;try{if(N&&p&&j!=="get"&&j!=="head"&&(re=await w(K,E))!==0){let T=new r(S,{method:"POST",body:E,duplex:"half"}),z;if(W.isFormData(E)&&(z=T.headers.get("content-type"))&&K.setContentType(z),T.body){const[q,R]=tg(re,aa(ng(N)));E=og(T.body,ig,q,R)}}W.isString(ne)||(ne=ne?"include":"omit");const U=a&&"credentials"in r.prototype,pe={...M,signal:Z,method:j.toUpperCase(),headers:K.normalize().toJSON(),body:E,duplex:"half",credentials:U?ne:void 0};le=a&&new r(S,pe);let ae=await(a?t(le,M):t(S,pe));const Q=x&&(H==="stream"||H==="response");if(x&&(O||Q&&X)){const T={};["status","statusText","headers"].forEach(ce=>{T[ce]=ae[ce]});const z=W.toFiniteNumber(ae.headers.get("content-length")),[q,R]=O&&tg(z,aa(ng(O),!0))||[];ae=new i(og(ae.body,ig,q,()=>{R&&R(),X&&X()}),T)}H=H||"text";let de=await m[W.findKey(m,H)||"text"](ae,k);return!Q&&X&&X(),await new Promise((T,z)=>{Cy(T,z,{data:de,headers:Qt.from(ae.headers),status:ae.status,statusText:ae.statusText,config:k,request:le})})}catch(U){throw X&&X(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new Re("Network Error",Re.ERR_NETWORK,k,le),{cause:U.cause||U}):Re.from(U,U&&U.code,k,le)}}},SC=new Map,$y=e=>{let t=W.merge.call({skipUndefined:!0},Ty,e?e.env:null);const{fetch:r,Request:i,Response:l}=t,a=[i,l,r];let u=a.length,d=u,f,p,x=SC;for(;d--;)f=a[d],p=x.get(f),p===void 0&&x.set(f,p=d?new Map:bC(t)),x=p;return p};$y();const xd={http:BS,xhr:xC,fetch:{get:$y}};W.forEach(xd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ug=e=>`- ${e}`,CC=e=>W.isFunction(e)||e===null||e===!1,Ry={getAdapter:(e,t)=>{e=W.isArray(e)?e:[e];const{length:r}=e;let i,l;const a={};for(let u=0;u<r;u++){i=e[u];let d;if(l=i,!CC(i)&&(l=xd[(d=String(i)).toLowerCase()],l===void 0))throw new Re(`Unknown adapter '${d}'`);if(l&&(W.isFunction(l)||(l=l.get(t))))break;a[d||"#"+u]=l}if(!l){const u=Object.entries(a).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=r?u.length>1?`since :
89
- `+u.map(ug).join(`
90
- `):" "+ug(u[0]):"as no adapter specified";throw new Re("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return l},adapters:xd};function Fc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ri(null,e)}function cg(e){return Fc(e),e.headers=Qt.from(e.headers),e.data=zc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ry.getAdapter(e.adapter||xl.adapter,e)(e).then(function(i){return Fc(e),i.data=zc.call(e,e.transformResponse,i),i.headers=Qt.from(i.headers),i},function(i){return Sy(i)||(Fc(e),i&&i.response&&(i.response.data=zc.call(e,e.transformResponse,i.response),i.response.headers=Qt.from(i.response.headers))),Promise.reject(i)})}const Iy="1.12.0",Ia={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ia[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const dg={};Ia.transitional=function(t,r,i){function l(a,u){return"[Axios v"+Iy+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,d)=>{if(t===!1)throw new Re(l(u," has been removed"+(r?" in "+r:"")),Re.ERR_DEPRECATED);return r&&!dg[u]&&(dg[u]=!0,console.warn(l(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,d):!0}};Ia.spelling=function(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function EC(e,t,r){if(typeof e!="object")throw new Re("options must be an object",Re.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let l=i.length;for(;l-- >0;){const a=i[l],u=t[a];if(u){const d=e[a],f=d===void 0||u(d,a,e);if(f!==!0)throw new Re("option "+a+" must be "+f,Re.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Re("Unknown option "+a,Re.ERR_BAD_OPTION)}}const Xs={assertOptions:EC,validators:Ia},Dn=Xs.validators;let Zr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Zm,response:new Zm}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const a=l.stack?l.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
91
- `+a):i.stack=a}catch{}}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=oo(this.defaults,r);const{transitional:i,paramsSerializer:l,headers:a}=r;i!==void 0&&Xs.assertOptions(i,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),l!=null&&(W.isFunction(l)?r.paramsSerializer={serialize:l}:Xs.assertOptions(l,{encode:Dn.function,serialize:Dn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Xs.assertOptions(r,{baseUrl:Dn.spelling("baseURL"),withXsrfToken:Dn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&W.merge(a.common,a[r.method]);a&&W.forEach(["delete","get","head","post","put","patch","common"],k=>{delete a[k]}),r.headers=Qt.concat(u,a);const d=[];let f=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(f=f&&S.synchronous,d.unshift(S.fulfilled,S.rejected))});const p=[];this.interceptors.response.forEach(function(S){p.push(S.fulfilled,S.rejected)});let x,m=0,v;if(!f){const k=[cg.bind(this),void 0];for(k.unshift(...d),k.push(...p),v=k.length,x=Promise.resolve(r);m<v;)x=x.then(k[m++],k[m++]);return x}v=d.length;let w=r;for(m=0;m<v;){const k=d[m++],S=d[m++];try{w=k(w)}catch(j){S.call(this,j);break}}try{x=cg.call(this,w)}catch(k){return Promise.reject(k)}for(m=0,v=p.length;m<v;)x=x.then(p[m++],p[m++]);return x}getUri(t){t=oo(this.defaults,t);const r=Ey(t.baseURL,t.url,t.allowAbsoluteUrls);return wy(r,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Zr.prototype[t]=function(r,i){return this.request(oo(i||{},{method:t,url:r,data:(i||{}).data}))}});W.forEach(["post","put","patch"],function(t){function r(i){return function(a,u,d){return this.request(oo(d||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Zr.prototype[t]=r(),Zr.prototype[t+"Form"]=r(!0)});let jC=class Py{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const i=this;this.promise.then(l=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](l);i._listeners=null}),this.promise.then=l=>{let a;const u=new Promise(d=>{i.subscribe(d),a=d}).then(l);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,d){i.reason||(i.reason=new ri(a,u,d),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Py(function(l){t=l}),cancel:t}}};function TC(e){return function(r){return e.apply(null,r)}}function $C(e){return W.isObject(e)&&e.isAxiosError===!0}const yd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yd).forEach(([e,t])=>{yd[t]=e});function Ny(e){const t=new Zr(e),r=ay(Zr.prototype.request,t);return W.extend(r,Zr.prototype,t,{allOwnKeys:!0}),W.extend(r,t,null,{allOwnKeys:!0}),r.create=function(l){return Ny(oo(e,l))},r}const nt=Ny(xl);nt.Axios=Zr;nt.CanceledError=ri;nt.CancelToken=jC;nt.isCancel=Sy;nt.VERSION=Iy;nt.toFormData=Ra;nt.AxiosError=Re;nt.Cancel=nt.CanceledError;nt.all=function(t){return Promise.all(t)};nt.spread=TC;nt.isAxiosError=$C;nt.mergeConfig=oo;nt.AxiosHeaders=Qt;nt.formToJSON=e=>by(W.isHTMLForm(e)?new FormData(e):e);nt.getAdapter=Ry.getAdapter;nt.HttpStatusCode=yd;nt.default=nt;const{Axios:iz,AxiosError:lz,CanceledError:sz,isCancel:az,CancelToken:uz,VERSION:cz,all:dz,Cancel:fz,isAxiosError:pz,spread:hz,toFormData:mz,AxiosHeaders:gz,HttpStatusCode:xz,formToJSON:yz,getAdapter:vz,mergeConfig:wz}=nt,RC="/api",Ve=nt.create({baseURL:RC,headers:{"Content-Type":"application/json"}}),IC=async()=>{try{const t=await(await fetch("/")).text();return new DOMParser().parseFromString(t,"text/html").body.getAttribute("data-security-token")}catch(e){return console.error("Error fetching security token:",e),null}};Ve.interceptors.request.use(e=>{var r;const t=(r=document.querySelector("body[data-security-token]"))==null?void 0:r.getAttribute("data-security-token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));Ve.interceptors.response.use(e=>e,async e=>{var r;const t=e.config;if(e.response&&e.response.status===401&&!t._retry){t._retry=!0;const i=await IC();if(i)return t.headers.Authorization=`Bearer ${i}`,(r=document.querySelector("body[data-security-token]"))==null||r.setAttribute("data-security-token",i),Ve(t)}return Promise.reject(e)});const Zd=async(e,t,r)=>{try{if(!e||t===void 0&&r===void 0)throw new Error("Invalid message ID, content or data");if((await Ve.post("/edit-message",{messageId:e,newContent:t,newData:r})).status!==200)throw new Error("Failed to edit message")}catch(i){throw nt.isAxiosError(i)?i.response?new Error(i.response.data.error||"Failed to edit message"):i.request?new Error("No response received from server"):new Error(`Error setting up request: ${i.message}`):i instanceof Error?i:new Error("An unexpected error occurred while editing the message")}},fg=async()=>(await Ve.get("/content")).data.content,PC=async(e,t,r)=>{const i=new FormData;i.append("prompt",e),i.append("options",JSON.stringify(t)),r&&r.length>0&&r.forEach(l=>{i.append("images",l)});try{await Ve.post("/execute-codegen",i,{headers:{"Content-Type":"multipart/form-data"}})}catch(l){throw nt.isAxiosError(l)?l.response?new Error(`Server error: ${l.response.data.message||"Unknown error"}`):l.request?new Error("No response received from server"):new Error(`Error setting up request: ${l.message}`):new Error("An unexpected error occurred")}},Ay=async(e,t,r,i)=>{try{if(!e||typeof e!="string")throw new Error("Prompt must be a string");if(typeof t!="number"||t<0||t>2)throw new Error("Temperature must be a number between 0 and 2");if(!["default","cheap","reasoning","lite"].includes(r))throw new Error("Model type must be one of: default, cheap, reasoning");return(await Ve.post("/generate-content",{prompt:e,temperature:t,modelType:r,options:i})).data.result}catch(l){if(nt.isAxiosError(l))if(l.response){const a=l.response.data.error||"Unknown server error";throw new Error(`Content generation failed: ${a}`)}else throw l.request?new Error("No response received from server during content generation"):new Error(`Request setup failed: ${l.message}`);throw l instanceof Error?l:new Error("An unexpected error occurred during content generation")}},vd=async()=>(await Ve.get("/execution-status")).data.status,NC=async()=>{await Ve.post("/interrupt-execution")},Ly=async()=>await Ve.post("/interrupt-execution",{scope:"container-command"}),AC=async()=>{await Ve.post("/pause-execution")},LC=async()=>{await Ve.post("/resume-execution")},wd=async()=>(await Ve.get("/current-question")).data.question,zC=async(e,t,r,i,l,a,u)=>{const d=new FormData;d.append("questionId",e),d.append("answer",t),r!==void 0&&d.append("confirmed",String(r)),i&&d.append("options",JSON.stringify(i)),l&&l.length>0&&l.forEach(f=>{d.append("images",f)}),a&&d.append("selectedActionType",a),u&&d.append("structuredResponse",JSON.stringify(u)),await Ve.post("/answer-question",d,{headers:{"Content-Type":"multipart/form-data"}})},pg=async()=>(await Ve.get("/usage")).data,FC=async()=>(await Ve.get("/default-codegen-options")).data.options,_C=async()=>(await Ve.get("/rcconfig")).data.rcConfig,OC=async(e,t)=>{await Ve.post(`/app-context/${e}`,{value:t})},MC=async e=>{await Ve.delete(`/delete-iteration/${e}`)},ef=async()=>(await Ve.get("/available-ai-services")).data.services,DC=async()=>(await Ve.get("/action-type-options")).data.options,zy=async()=>{try{return(await Ve.get("/service-configurations")).data.configurations}catch{throw new Error("Failed to fetch service configurations")}},BC=async e=>{await Ve.post("/service-configuration",e)},UC=async()=>(await Ve.get("/context-files")).data.files,VC=async e=>(await Ve.post("/context-files/remove",{filePaths:e})).data,HC=async()=>(await Ve.get("/all-project-files")).data.files,WC=async e=>(await Ve.post("/context-files/add",{filePaths:e})).data,qC=async()=>(await Ve.post("/context-optimization")).data,GC=async()=>(await Ve.get("/context-preview")).data,JC=async()=>(await Ve.post("/compress-context")).data;Ve.interceptors.response.use(e=>e,e=>(console.error("API request failed:",e),e.response?(console.error("Error data:",e.response.data),console.error("Error status:",e.response.status),console.error("Error headers:",e.response.headers)):e.request?console.error("No response received:",e.request):console.error("Error message:",e.message),Promise.reject(e)));function yl(e,t){const r=new CustomEvent(e,{bubbles:!0,detail:t});document.dispatchEvent(r)}function vl(e,t){$.useEffect(()=>{const r=i=>{t(i.detail)};return document.addEventListener(e,r,!1),()=>{document.removeEventListener(e,r,!1)}},[e,t])}function KC(e,t){if(!(t!=null&&t.modelOverrides))return e;const r=[];return t.modelOverrides.default&&r.push(t.modelOverrides.default),t.modelOverrides.cheap&&r.push(t.modelOverrides.cheap),r.length>0?`${e} (${r.join("/")})`:e}function Fy(){const[e,t]=$.useState([]),[r,i]=$.useState(null);return $.useEffect(()=>{(async()=>{try{const a=await ef();t(a)}catch(a){console.error("Error fetching AI services:",a),i("Failed to fetch available AI services.")}})()},[]),[e,r]}function _y(){const[e,t]=$.useState({services:[],isLoading:!0,error:null});return $.useEffect(()=>{(async()=>{try{const[i,l]=await Promise.all([ef(),zy()]),a=i.map(u=>({service:u,config:l[u],displayName:KC(u,l[u])}));t({services:a,isLoading:!1,error:null})}catch(i){console.error("Error fetching services with configurations:",i),t(l=>({...l,isLoading:!1,error:"Failed to fetch service configurations."}))}})()},[]),e}const rr=C.button`
92
- background-color: transparent;
93
- color: ${({theme:e})=>e.colors.text};
94
- border: none;
95
- border-radius: 50%;
96
- width: 40px;
97
- height: 40px;
98
- font-size: 20px;
99
- cursor: pointer;
100
- display: flex;
101
- align-items: center;
102
- justify-content: center;
103
- transition: background-color 0.3s;
104
-
105
- &:hover {
106
- background-color: ${({theme:e})=>e.colors.buttonHoverBg};
107
- }
108
-
109
- &:focus {
110
- outline: none;
111
- box-shadow: 0 0 0 2px ${({theme:e})=>e.colors.primary};
112
- }
113
- `;function Oy(){yl("openContentGenerationModel")}function QC(){return h.jsx(rr,{onClick:Oy,"aria-label":"Content generation modal",children:"✨"})}const YC=({currentService:e})=>{const[t,r]=$.useState(""),[i,l]=$.useState(e),[a,u]=$.useState(.7),[d,f]=$.useState("default"),[p,x]=$.useState(),[m,v]=$.useState(!1),[w,k]=$.useState(null),[S,j]=$.useState(null),[E,I]=$.useState(!1),A=()=>I(!1),[F]=Fy(),{services:O,isLoading:N}=_y();if(vl("openContentGenerationModel",()=>I(!0)),$.useEffect(()=>{var ne;const K=(ne=O.find(M=>M.service===i))==null?void 0:ne.config;K!=null&&K.modelOverrides?x(K.modelOverrides[d]):x(void 0)},[i,d,O]),!E)return null;const H=async K=>{K.preventDefault(),v(!0),k(null),j(null);try{const ne=await Ay(t,a,d,{aiService:i,askQuestion:!1});j(ne)}catch(ne){k(ne instanceof Error?ne.message:"An unexpected error occurred")}finally{v(!1)}};return h.jsx(XC,{onClick:K=>K.target===K.currentTarget&&A(),children:h.jsxs(ZC,{children:[h.jsx(eE,{onClick:A,children:"×"}),h.jsx("h2",{children:"Generate Content"}),h.jsxs(tE,{onSubmit:H,children:[h.jsxs(zs,{children:["Prompt",h.jsx(nE,{value:t,onChange:K=>r(K.target.value),placeholder:"Enter your prompt here...",required:!0})]}),h.jsxs(zs,{children:["AI Service",h.jsx(hg,{value:i,onChange:K=>l(K.target.value),disabled:N,children:F.map(K=>h.jsx("option",{value:K,children:K},K))})]}),h.jsxs(zs,{children:["Temperature (",a,")",h.jsxs(rE,{children:[h.jsx(oE,{type:"range",min:"0",max:"2",step:"0.1",value:a,onChange:K=>u(Number(K.target.value))}),h.jsx(iE,{children:a})]})]}),h.jsxs(zs,{children:["Model Type ",p?`(${p})`:"",h.jsxs(hg,{value:d,onChange:K=>f(K.target.value),children:[h.jsx("option",{value:"default",children:"Default"}),h.jsx("option",{value:"cheap",children:"Cheap"}),h.jsx("option",{value:"lite",children:"Lite"}),h.jsx("option",{value:"reasoning",children:"Reasoning"})]})]}),h.jsx(lE,{type:"submit",disabled:m||!t,children:m?"Generating...":"Generate"})]}),w&&h.jsx(aE,{children:w}),S&&h.jsx(sE,{children:S.map((K,ne)=>h.jsxs("div",{children:[h.jsx("strong",{children:K.name}),h.jsx("pre",{children:JSON.stringify(K,null,2)})]},ne))})]})})},XC=C.div`
114
- position: fixed;
115
- top: 0;
116
- left: 0;
117
- right: 0;
118
- bottom: 0;
119
- background-color: rgba(0, 0, 0, 0.5);
120
- display: flex;
121
- justify-content: center;
122
- align-items: center;
123
- z-index: 1000;
124
- `,ZC=C.div`
125
- background: ${({theme:e})=>e.colors.background};
126
- padding: 2rem;
127
- border-radius: 8px;
128
- width: 90%;
129
- max-width: 800px;
130
- max-height: 90vh;
131
- overflow-y: auto;
132
- position: relative;
133
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
134
- `,eE=C.button`
135
- position: absolute;
136
- top: 1rem;
137
- right: 1rem;
138
- background: none;
139
- border: none;
140
- font-size: 1.5rem;
141
- cursor: pointer;
142
- color: ${({theme:e})=>e.colors.text};
143
- &:hover {
144
- opacity: 0.8;
145
- }
146
- `,tE=C.form`
147
- display: flex;
148
- flex-direction: column;
149
- gap: 1rem;
150
- `,zs=C.label`
151
- display: flex;
152
- flex-direction: column;
153
- gap: 0.5rem;
154
- color: ${({theme:e})=>e.colors.text};
155
- `,nE=C.textarea`
156
- padding: 0.5rem;
157
- border: 1px solid ${({theme:e})=>e.colors.border};
158
- border-radius: 4px;
159
- background: ${({theme:e})=>e.colors.background};
160
- color: ${({theme:e})=>e.colors.text};
161
- min-height: 100px;
162
- resize: vertical;
163
- `,hg=C.select`
164
- padding: 0.5rem;
165
- border: 1px solid ${({theme:e})=>e.colors.border};
166
- border-radius: 4px;
167
- background: ${({theme:e})=>e.colors.background};
168
- color: ${({theme:e})=>e.colors.text};
169
- `,rE=C.div`
170
- display: flex;
171
- align-items: center;
172
- gap: 1rem;
173
- `,oE=C.input`
174
- flex: 1;
175
- `,iE=C.span`
176
- min-width: 3rem;
177
- text-align: right;
178
- `,lE=C.button`
179
- padding: 0.5rem 1rem;
180
- background: ${({theme:e})=>e.colors.primary};
181
- color: white;
182
- border: none;
183
- border-radius: 4px;
184
- cursor: pointer;
185
- &:hover {
186
- opacity: 0.9;
187
- }
188
- &:disabled {
189
- opacity: 0.5;
190
- cursor: not-allowed;
191
- }
192
- `,sE=C.div`
193
- margin-top: 1rem;
194
- padding: 1rem;
195
- border: 1px solid ${({theme:e})=>e.colors.border};
196
- border-radius: 4px;
197
- background: ${({theme:e})=>e.colors.backgroundSecondary};
198
- white-space: pre-wrap;
199
-
200
- pre {
201
- white-space: pre-wrap;
202
- }
203
- `,aE=C.div`
204
- color: ${({theme:e})=>e.colors.error};
205
- margin-top: 1rem;
206
- padding: 0.5rem;
207
- border: 1px solid ${({theme:e})=>e.colors.error};
208
- border-radius: 4px;
209
- `;function My(){yl("openHealthCheckModal")}function uE(){return h.jsx(rr,{onClick:My,"aria-label":"Health check modal",children:"🏥"})}async function cE(){const e=(await ef()).map(t=>[t,{status:void 0,lastChecked:new Date().toISOString()}]);return{services:Object.fromEntries(e),timestamp:new Date().toISOString()}}async function dE(e){var t,r;try{const[i]=await Ay("say: hello",.7,!0,{aiService:e,askQuestion:!1});return(r=(t=i==null?void 0:i.args)==null?void 0:t.message)!=null&&r.toLowerCase().includes("hello")?"success":void 0}catch{return"error"}}const fE=()=>{const[e,t]=$.useState(!1),[r,i]=$.useState(!1),[l,a]=$.useState(null),[u,d]=$.useState(null),[f,p]=$.useState(null);vl("openHealthCheckModal",()=>t(!0));const x=()=>t(!1),m=async()=>{i(!0),a(null);try{const k=await cE();d(k),p(new Date);for(const[S,j]of Object.entries(k.services)){const E=Date.now(),I=await dE(S);j.status=I,j.responseTime=Date.now()-E,j.lastChecked=new Date().toISOString(),d(k),p(new Date)}}catch(k){a(k instanceof Error?k.message:"An unexpected error occurred")}finally{i(!1)}};if($.useEffect(()=>{e&&m()},[e]),!e)return null;const v=k=>{switch(k){case"success":return"✅";case"error":return"❌";case"not_configured":return"⚠️";default:return"❓"}},w=k=>{switch(k){case"success":return"success";case"error":return"error";case"not_configured":return"warning";default:return"default"}};return h.jsx(pE,{onClick:k=>k.target===k.currentTarget&&x(),children:h.jsxs(hE,{children:[h.jsx(gE,{onClick:x,children:"×"}),h.jsxs(mE,{children:[h.jsx("h2",{children:"AI Services Health Check"}),h.jsx(xE,{onClick:m,disabled:r,children:r?"Checking...":"🔄 Refresh"})]}),l&&h.jsx(TE,{children:l}),h.jsx(yE,{children:u&&Object.entries(u.services).map(([k,S])=>h.jsxs(vE,{children:[h.jsxs(wE,{children:[h.jsx(kE,{children:k}),h.jsx(bE,{children:v(S.status)})]}),h.jsxs(SE,{color:w(S.status),children:[h.jsxs("div",{children:["Status: ",S.status]}),S.responseTime&&h.jsxs("div",{children:["Response time: ",S.responseTime,"ms"]}),S.error&&h.jsx(CE,{children:S.error}),h.jsxs(EE,{children:["Last checked: ",new Date(S.lastChecked).toLocaleTimeString()]})]})]},k))}),f&&h.jsxs(jE,{children:["Last updated: ",f.toLocaleTimeString()]}),r&&h.jsx($E,{children:"Checking AI Services..."})]})})},pE=C.div`
210
- position: fixed;
211
- top: 0;
212
- left: 0;
213
- right: 0;
214
- bottom: 0;
215
- background-color: rgba(0, 0, 0, 0.5);
216
- display: flex;
217
- justify-content: center;
218
- align-items: center;
219
- z-index: 1000;
220
- `,hE=C.div`
221
- background: ${({theme:e})=>e.colors.background};
222
- padding: 2rem;
223
- border-radius: 8px;
224
- width: 90%;
225
- max-width: 800px;
226
- max-height: 90vh;
227
- overflow-y: auto;
228
- position: relative;
229
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
230
- `,mE=C.div`
231
- display: flex;
232
- justify-content: space-between;
233
- align-items: center;
234
- margin-bottom: 2rem;
235
-
236
- h2 {
237
- margin: 0;
238
- }
239
- `,gE=C.button`
240
- position: absolute;
241
- top: 1rem;
242
- right: 1rem;
243
- background: none;
244
- border: none;
245
- font-size: 1.5rem;
246
- cursor: pointer;
247
- color: ${({theme:e})=>e.colors.text};
248
- &:hover {
249
- opacity: 0.8;
250
- }
251
- `,xE=C.button`
252
- padding: 0.5rem 1rem;
253
- background: ${({theme:e})=>e.colors.primary};
254
- color: white;
255
- border: none;
256
- border-radius: 4px;
257
- cursor: pointer;
258
- &:hover {
259
- opacity: 0.9;
260
- }
261
- &:disabled {
262
- opacity: 0.5;
263
- cursor: not-allowed;
264
- }
265
- `,yE=C.div`
266
- display: grid;
267
- grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
268
- gap: 1rem;
269
- margin-bottom: 1rem;
270
- `,vE=C.div`
271
- border: 1px solid ${({theme:e})=>e.colors.border};
272
- border-radius: 4px;
273
- padding: 1rem;
274
- background: ${({theme:e})=>e.colors.backgroundSecondary};
275
- `,wE=C.div`
276
- display: flex;
277
- justify-content: space-between;
278
- align-items: center;
279
- margin-bottom: 0.5rem;
280
- `,kE=C.h3`
281
- margin: 0;
282
- font-size: 1.1rem;
283
- `,bE=C.span`
284
- font-size: 1.2rem;
285
- `,SE=C.div`
286
- color: ${({theme:e,color:t})=>{switch(t){case"success":return e.colors.success;case"error":return e.colors.error;case"warning":return e.colors.warning;default:return e.colors.text}}};
287
- font-size: 0.9rem;
288
- `,CE=C.div`
289
- color: ${({theme:e})=>e.colors.error};
290
- margin-top: 0.5rem;
291
- `,EE=C.div`
292
- color: ${({theme:e})=>e.colors.textSecondary};
293
- font-size: 0.8rem;
294
- margin-top: 0.5rem;
295
- `,jE=C.div`
296
- text-align: right;
297
- color: ${({theme:e})=>e.colors.textSecondary};
298
- font-size: 0.8rem;
299
- margin-top: 1rem;
300
- `,TE=C.div`
301
- color: ${({theme:e})=>e.colors.error};
302
- margin-bottom: 1rem;
303
- padding: 0.5rem;
304
- border: 1px solid ${({theme:e})=>e.colors.error};
305
- border-radius: 4px;
306
- `,$E=C.div`
307
- position: absolute;
308
- top: 0;
309
- left: 0;
310
- right: 0;
311
- bottom: 0;
312
- background: rgba(0, 0, 0, 0.3);
313
- display: flex;
314
- justify-content: center;
315
- align-items: center;
316
- border-radius: 8px;
317
- color: white;
318
- font-size: 1.2rem;
319
- `,Dy=C.div`
320
- position: fixed;
321
- top: 0;
322
- left: 0;
323
- right: 0;
324
- bottom: 0;
325
- background-color: rgba(0, 0, 0, 0.5);
326
- display: flex;
327
- justify-content: center;
328
- align-items: center;
329
- z-index: 1000;
330
- `,By=C.div`
331
- background: ${({theme:e})=>e.colors.background};
332
- padding: 2rem;
333
- border-radius: 8px;
334
- width: 90%;
335
- max-width: 800px;
336
- max-height: 90vh;
337
- overflow-y: auto;
338
- position: relative;
339
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
340
- `,Uy=C.div`
341
- display: flex;
342
- justify-content: space-between;
343
- align-items: center;
344
- margin-bottom: 2rem;
345
-
346
- h2 {
347
- margin: 0;
348
- }
349
- `,Vy=C.button`
350
- position: absolute;
351
- top: 1rem;
352
- right: 1rem;
353
- background: none;
354
- border: none;
355
- font-size: 1.5rem;
356
- cursor: pointer;
357
- color: ${({theme:e})=>e.colors.text};
358
- &:hover {
359
- opacity: 0.8;
360
- }
361
- `,RE=C.div`
362
- display: grid;
363
- grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
364
- gap: 1rem;
365
- margin-bottom: 1rem;
366
- `,IE=C.div`
367
- border: 1px solid ${({theme:e})=>e.colors.border};
368
- border-radius: 4px;
369
- background: ${({theme:e})=>e.colors.backgroundSecondary};
370
- transition: box-shadow 0.2s ease;
371
-
372
- &:hover {
373
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
374
- }
375
- `,PE=C.div`
376
- cursor: pointer;
377
- padding: 1rem;
378
- user-select: none;
379
- display: flex;
380
- justify-content: space-between;
381
- align-items: center;
382
- width: 100%;
383
- background: none;
384
- border: none;
385
- color: ${({theme:e})=>e.colors.text};
386
- transition: background-color 0.2s ease;
387
-
388
- &:hover {
389
- background-color: ${({theme:e})=>`${e.colors.border}20`};
390
- }
391
- `,NE=C.div`
392
- display: flex;
393
- align-items: center;
394
- gap: 0.5rem;
395
- `,AE=C.h3`
396
- margin: 0;
397
- font-size: 1.1rem;
398
- `,LE=C.span`
399
- display: inline-block;
400
- transition: transform 0.2s ease;
401
- transform: rotate(${({$isCollapsed:e})=>e?"0deg":"180deg"});
402
- font-size: 0.8rem;
403
- `,zE=C.div`
404
- overflow: hidden;
405
- transition: height 0.3s ease;
406
- height: ${({$isCollapsed:e})=>e?"0":"auto"};
407
- padding: ${({$isCollapsed:e})=>e?"0 1rem":"0 1rem 1rem"};
408
- opacity: ${({$isCollapsed:e})=>e?"0":"1"};
409
- transition: all 0.3s ease;
410
- `,FE=C.form`
411
- display: flex;
412
- flex-direction: column;
413
- gap: 1rem;
414
- `,sn=C.div`
415
- display: flex;
416
- flex-direction: column;
417
- gap: 0.5rem;
418
- `,an=C.label`
419
- font-size: 0.9rem;
420
- color: ${({theme:e})=>e.colors.text};
421
- `,Gr=C.input`
422
- padding: 0.5rem;
423
- border: 1px solid ${({theme:e})=>e.colors.border};
424
- border-radius: 4px;
425
- background: ${({theme:e})=>e.colors.background};
426
- color: ${({theme:e})=>e.colors.text};
427
- font-size: 0.9rem;
428
-
429
- &:focus {
430
- outline: none;
431
- border-color: ${({theme:e})=>e.colors.primary};
432
- }
433
- `,_E=C.button`
434
- padding: 0.5rem 1rem;
435
- background: ${({theme:e})=>e.colors.primary};
436
- color: white;
437
- border: none;
438
- border-radius: 4px;
439
- cursor: pointer;
440
- font-size: 0.9rem;
441
-
442
- &:hover {
443
- opacity: 0.9;
444
- }
445
-
446
- &:disabled {
447
- opacity: 0.5;
448
- cursor: not-allowed;
449
- }
450
- `,OE=C.div`
451
- color: ${({theme:e})=>e.colors.error};
452
- margin-bottom: 1rem;
453
- padding: 0.5rem;
454
- border: 1px solid ${({theme:e})=>e.colors.error};
455
- border-radius: 4px;
456
- `,ME=C.div`
457
- color: ${({theme:e})=>e.colors.success};
458
- margin-bottom: 1rem;
459
- padding: 0.5rem;
460
- border: 1px solid ${({theme:e})=>e.colors.success};
461
- border-radius: 4px;
462
- `,DE=C.div`
463
- color: ${({theme:e})=>e.colors.error};
464
- `,BE=C.div`
465
- position: absolute;
466
- top: 0;
467
- left: 0;
468
- right: 0;
469
- bottom: 0;
470
- background: rgba(0, 0, 0, 0.3);
471
- display: flex;
472
- justify-content: center;
473
- align-items: center;
474
- border-radius: 8px;
475
- color: white;
476
- font-size: 1.2rem;
477
- `,Er=e=>e==="vertex-ai",UE=e=>e==="openai"||e==="local-llm",VE=({serviceType:e,config:t,onUpdate:r,isLoading:i,isExpanded:l,onCardClick:a})=>{var le,X,re;const[u,d]=$.useState(""),[f,p]=$.useState(!!(t!=null&&t.hasApiKey)),[x,m]=$.useState(((le=t==null?void 0:t.modelOverrides)==null?void 0:le.default)||""),[v,w]=$.useState(((X=t==null?void 0:t.modelOverrides)==null?void 0:X.cheap)||""),[k,S]=$.useState(((re=t==null?void 0:t.modelOverrides)==null?void 0:re.lite)||""),[j,E]=$.useState((t==null?void 0:t.googleCloudProjectId)||""),[I,A]=$.useState((t==null?void 0:t.googleCloudRegion)||""),[F,O]=$.useState((t==null?void 0:t.openaiBaseUrl)||""),[N,H]=$.useState(null);$.useEffect(()=>{var U,pe,ae;p(!!(t!=null&&t.hasApiKey)),m(((U=t==null?void 0:t.modelOverrides)==null?void 0:U.default)||""),w(((pe=t==null?void 0:t.modelOverrides)==null?void 0:pe.cheap)||""),S(((ae=t==null?void 0:t.modelOverrides)==null?void 0:ae.lite)||""),E((t==null?void 0:t.googleCloudProjectId)||""),A((t==null?void 0:t.googleCloudRegion)||""),O((t==null?void 0:t.openaiBaseUrl)||"")},[t]);const K=()=>{if(Er(e)){if(!j)return H("GCP Project ID is required for Vertex AI services"),!1;if(Er(e)&&!I)return H("GCP Region is required for Vertex AI services"),!1}else if(!f&&!u)return H("API Key is required"),!1;return H(null),!0},ne=U=>{if(U.preventDefault(),!K())return;const pe={modelOverrides:{default:x||void 0,cheap:v||void 0,lite:k||void 0}};Er(e)?(pe.googleCloudProjectId=j,pe.googleCloudRegion=I):(pe.apiKey=u||void 0,pe.openaiBaseUrl=F||void 0),r(pe)},M=$.useCallback(()=>{a&&a(e)},[a,e]),Z=U=>{(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),M())};return h.jsxs(IE,{children:[h.jsxs(PE,{onClick:M,onKeyDown:Z,role:"button",tabIndex:0,"aria-expanded":!!l,"aria-controls":`config-content-${e}`,children:[h.jsxs(NE,{children:[h.jsx(AE,{children:e}),!Er(e)&&f&&h.jsx("span",{title:"API Key is set",children:"🔑"}),Er(e)&&j&&h.jsx("span",{title:"GCP Project ID is set",children:"🌐"})]}),h.jsx(LE,{$isCollapsed:!l,children:"▼"})]}),h.jsx(zE,{$isCollapsed:!l,id:`config-content-${e}`,"aria-hidden":!l,children:h.jsxs(FE,{onSubmit:ne,children:[!Er(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`apiKey-${e}`,children:"API Key"}),h.jsx(Gr,{id:`apiKey-${e}`,type:"password",value:u,onChange:U=>d(U.target.value),placeholder:f?"API key is set":"Enter API key","aria-label":`API Key for ${e}`})]}),UE(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`baseUrl-${e}`,children:"Base URL"}),h.jsx(Gr,{id:`baseUrl-${e}`,type:"text",value:F,onChange:U=>O(U.target.value),placeholder:"Enter base URL","aria-label":`Base URL for ${e}`})]}),Er(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`projectId-${e}`,children:"GCP Project ID"}),h.jsx(Gr,{id:`projectId-${e}`,type:"text",value:j,onChange:U=>E(U.target.value),placeholder:"Enter GCP Project ID","aria-label":`GCP Project ID for ${e}`,required:!0})]}),Er(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`region-${e}`,children:"GCP Region"}),h.jsx(Gr,{id:`region-${e}`,type:"text",value:I,onChange:U=>A(U.target.value),placeholder:"Enter GCP Region","aria-label":`GCP Region for ${e}`,required:!0})]}),h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`defaultModel-${e}`,children:"Default Model"}),h.jsx(Gr,{id:`defaultModel-${e}`,type:"text",value:x,onChange:U=>m(U.target.value),placeholder:"Enter model name","aria-label":`Default Model for ${e}`})]}),h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`cheapModel-${e}`,children:"Cheap Model"}),h.jsx(Gr,{id:`cheapModel-${e}`,type:"text",value:v,onChange:U=>w(U.target.value),placeholder:"Enter model name","aria-label":`Cheap Model for ${e}`})]}),h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`liteModel-${e}`,children:"Lite Model"}),h.jsx(Gr,{id:`liteModel-${e}`,type:"text",value:k,onChange:U=>S(U.target.value),placeholder:"Enter model name","aria-label":`Lite Model for ${e}`})]}),N&&h.jsx(DE,{role:"alert","aria-live":"polite",children:N}),h.jsx(_E,{type:"submit",disabled:i,"aria-busy":i,children:i?"Updating...":"Update Configuration"})]})})]})};function Hy(){yl("openServiceConfigurationModal")}function HE(){return h.jsx(rr,{onClick:Hy,"aria-label":"Open service configuration",children:"⚙️"})}const Wy=e=>e==="vertex-ai",WE=e=>e==="openai"||e==="local-llm",qE=(e,t)=>{var i,l,a;const r=["Configuration updated successfully for "+e];return Wy(e)?(t.googleCloudProjectId&&r.push(`GCP Project ID: ${t.googleCloudProjectId}`),t.googleCloudRegion&&r.push(`GCP Region: ${t.googleCloudRegion}`)):t.apiKey&&r.push("API key has been updated"),(i=t.modelOverrides)!=null&&i.default&&r.push(`Default model: ${t.modelOverrides.default}`),(l=t.modelOverrides)!=null&&l.cheap&&r.push(`Cheap model: ${t.modelOverrides.cheap}`),(a=t.modelOverrides)!=null&&a.lite&&r.push(`Lite model: ${t.modelOverrides.lite}`),WE(e)&&"openaiBaseUrl"in t&&r.push(`OpenAI base URL: ${t.openaiBaseUrl}`),r.join(`
478
- `)},GE=(e,t)=>{if(Wy(e)){if(!t.googleCloudProjectId)return`GCP Project ID is required for ${e}`;if(e==="vertex-ai"&&!t.googleCloudRegion)return"GCP Region is required for Vertex AI"}return null},JE=()=>{const[e,t]=$.useState(!1),[r,i]=$.useState(!1),[l,a]=$.useState(null),[u,d]=$.useState(null),[f,p]=$.useState(),[x]=Fy();vl("openServiceConfigurationModal",()=>t(!0));const m=()=>{t(!1),a(null),d(null)};$.useEffect(()=>{e&&v()},[e]);const v=async()=>{i(!0),a(null);try{const E=await zy();p(E)}catch(E){a(E instanceof Error?E.message:"Failed to fetch configurations")}finally{i(!1)}},w=async(E,I)=>{i(!0),a(null),d(null);const A=GE(E,I);if(A){a(A),i(!1);return}try{await BC({serviceType:E,config:I}),await v(),d(qE(E,I))}catch(F){let O="Failed to update configuration";F instanceof Error&&(O=F.message,F.message.includes("auth")?O=`Authentication error for ${E}: ${F.message}`:F.message.includes("permission")&&(O=`Permission error for ${E}: ${F.message}`)),a(O)}finally{i(!1)}},[k,S]=$.useState(null),j=$.useCallback(E=>{S(I=>I===E?null:E)},[S]);return e?h.jsx(Dy,{onClick:E=>E.target===E.currentTarget&&m(),role:"dialog","aria-modal":"true","aria-labelledby":"service-config-title",children:h.jsxs(By,{children:[h.jsx(Vy,{onClick:m,"aria-label":"Close configuration modal",children:"×"}),h.jsx(Uy,{children:h.jsx("h2",{id:"service-config-title",children:"AI Services Configuration"})}),l&&h.jsx(OE,{role:"alert","aria-live":"polite",children:l}),u&&h.jsx(ME,{role:"status","aria-live":"polite",children:u.split(`
479
- `).map((E,I)=>h.jsx("div",{children:E},I))}),h.jsx(RE,{children:f?x.map(E=>h.jsx(VE,{serviceType:E,config:f[E],onUpdate:I=>w(E,I),isLoading:r,isExpanded:k===E,onCardClick:j},E)):h.jsx("div",{"aria-live":"polite",children:"Loading configurations..."})}),r&&h.jsx(BE,{role:"status","aria-live":"polite",children:"Updating configurations..."})]})}):null},qy=ti`
480
- from {
481
- opacity: 0;
482
- }
483
- to {
484
- opacity: 1;
485
- }
486
- `,KE=ti`
487
- from {
488
- transform: translateX(100%);
489
- }
490
- to {
491
- transform: translateX(0);
492
- }
493
- `,QE=C.button`
494
- background: none;
495
- border: none;
496
- font-size: 1.5rem;
497
- cursor: pointer;
498
- padding: 8px;
499
- color: ${({theme:e})=>e.colors.text};
500
- transition: color 0.2s ease;
501
- display: flex;
502
- align-items: center;
503
- justify-content: center;
504
-
505
- &:hover {
506
- color: ${({theme:e})=>e.colors.primary};
507
- }
508
-
509
- &:focus {
510
- outline: 2px solid ${({theme:e})=>e.colors.primary};
511
- outline-offset: 2px;
512
- border-radius: 4px;
513
- }
514
- `,YE=C.div`
515
- position: fixed;
516
- top: 0;
517
- left: 0;
518
- right: 0;
519
- bottom: 0;
520
- background-color: rgba(0, 0, 0, 0.5);
521
- z-index: 998;
522
- display: ${({isOpen:e})=>e?"block":"none"};
523
- animation: ${qy} 0.2s ease;
524
- `,XE=C.div`
525
- position: absolute;
526
- ${({position:e})=>e?wt`
527
- top: ${e.top??"auto"};
528
- right: ${e.right??"auto"};
529
- left: ${e.left??"auto"};
530
- bottom: ${e.bottom??"auto"};
531
- `:wt`
532
- top: 100%;
533
- right: 0;
534
- `}
535
- background-color: ${({theme:e})=>e.colors.pageBackground};
536
- border-radius: 8px;
537
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
538
- padding: 8px 0;
539
- min-width: 200px;
540
- z-index: 999;
541
- opacity: ${({isOpen:e})=>e?1:0};
542
- visibility: ${({isOpen:e})=>e?"visible":"hidden"};
543
- transform-origin: top right;
544
- animation: ${({isOpen:e})=>e?wt`
545
- ${KE} 0.2s ease,
546
- ${qy} 0.2s ease
547
- `:"none"};
548
-
549
- @media (max-width: 576px) {
550
- position: fixed;
551
- top: 0;
552
- right: 0;
553
- bottom: 0;
554
- min-width: 250px;
555
- border-radius: 0;
556
- border-top-left-radius: 8px;
557
- border-bottom-left-radius: 8px;
558
- transform-origin: center right;
559
- }
560
- `,ZE=C.div`
561
- padding: 12px 16px;
562
- cursor: pointer;
563
- transition: background-color 0.2s ease;
564
- display: flex;
565
- align-items: center;
566
- gap: 8px;
567
- color: ${({theme:e})=>e.colors.text};
568
-
569
- &:hover {
570
- background-color: ${({theme:e})=>e.colors.backgroundSecondary};
571
- }
572
-
573
- &:focus-within {
574
- background-color: ${({theme:e})=>e.colors.backgroundSecondary};
575
- outline: 2px solid ${({theme:e})=>e.colors.primary};
576
- outline-offset: -2px;
577
- }
578
- `,ej=C.div`
579
- position: relative;
580
- display: inline-block;
581
- `,tj=({menuItems:e,isOpen:t,onToggle:r,className:i,buttonAriaLabel:l="Toggle menu",menuAriaLabel:a="Navigation menu",position:u})=>{const d=$.useRef(null),f=$.useRef(null),p=$.useRef(null);$.useEffect(()=>{const v=k=>{var S;t&&d.current&&!d.current.contains(k.target)&&!((S=p.current)!=null&&S.contains(k.target))&&r()},w=k=>{var S;t&&k.key==="Escape"&&(r(),(S=p.current)==null||S.focus())};return document.addEventListener("mousedown",v),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("keydown",w)}},[t,r]),$.useEffect(()=>{var v;t&&((v=f.current)==null||v.focus())},[t]);const x=v=>{var S,j;if(!t)return;const w=Array.from(((S=d.current)==null?void 0:S.querySelectorAll('[role="menuitem"]'))||[]),k=w.indexOf(document.activeElement);switch(v.key){case"ArrowDown":v.preventDefault(),k<w.length-1?w[k+1].focus():w[0].focus();break;case"ArrowUp":v.preventDefault(),k>0?w[k-1].focus():w[w.length-1].focus();break;case"Home":v.preventDefault(),w[0].focus();break;case"End":v.preventDefault(),w[w.length-1].focus();break;case"Enter":case" ":v.preventDefault(),k>=0&&(e[k].onClick(),r(),(j=p.current)==null||j.focus());break}},m=v=>{var w;v(),r(),(w=p.current)==null||w.focus()};return h.jsxs(ej,{className:i,children:[h.jsx(QE,{onClick:r,"aria-expanded":t,"aria-haspopup":"true","aria-controls":"menu-items","aria-label":l,ref:p,children:"☰"}),h.jsx(YE,{isOpen:t,onClick:r}),h.jsx(XE,{isOpen:t,position:u,ref:d,role:"menu","aria-label":a,id:"menu-items",onKeyDown:x,children:e.map((v,w)=>h.jsxs(ZE,{onClick:()=>m(v.onClick),role:"menuitem",tabIndex:t?0:-1,ref:w===0?f:null,"aria-label":v.ariaLabel,children:[v.content," ",v.ariaLabel]},v.key||w))})]})};function Gy(){yl("openRcConfigModal")}const nj=({rcConfig:e})=>{const[t,r]=$.useState(!1);vl("openRcConfigModal",()=>r(!0));const i=()=>{r(!1)};return!t||!e?null:h.jsx(Dy,{onClick:l=>l.target===l.currentTarget&&i(),role:"dialog","aria-modal":"true","aria-labelledby":"rc-config-title",children:h.jsxs(By,{children:[h.jsx(Vy,{onClick:i,"aria-label":"Close RC configuration modal",children:"×"}),h.jsx(Uy,{children:h.jsx("h2",{id:"rc-config-title",children:"RC Configuration"})}),h.jsxs(rj,{children:[h.jsxs(sn,{children:[h.jsx(an,{children:"Root Directory"}),h.jsx(_o,{children:e.rootDir})]}),e.lintCommand&&h.jsxs(sn,{children:[h.jsx(an,{children:"Lint Command"}),h.jsx(_o,{children:e.lintCommand})]}),e.extensions&&e.extensions.length>0&&h.jsxs(sn,{children:[h.jsx(an,{children:"Extensions"}),h.jsx(_o,{children:e.extensions.join(", ")})]}),e.ignorePaths&&e.ignorePaths.length>0&&h.jsxs(sn,{children:[h.jsx(an,{children:"Ignore Paths"}),h.jsx(_o,{children:e.ignorePaths.join(", ")})]}),e.importantContext&&h.jsxs(sn,{children:[h.jsx(an,{children:"Important Context"}),h.jsx(_o,{children:e.importantContext.files?`Files: ${e.importantContext.files.join(", ")}`:"None"})]}),e.modelOverrides&&h.jsxs(sn,{children:[h.jsx(an,{children:"Model Overrides"}),h.jsx(_o,{children:h.jsx("pre",{children:JSON.stringify(e.modelOverrides,null,2)})})]})]})]})})},rj=C.div`
582
- display: flex;
583
- flex-direction: column;
584
- gap: 1rem;
585
- margin-top: 1rem;
586
- `,_o=C.div`
587
- color: ${({theme:e})=>e.colors.text};
588
- font-family: monospace;
589
- background-color: ${({theme:e})=>e.colors.backgroundSecondary};
590
- padding: 0.5rem;
591
- border-radius: 4px;
592
- overflow-x: auto;
593
-
594
- pre {
595
- margin: 0;
596
- white-space: pre-wrap;
597
- }
598
- `,oj=()=>h.jsx(rr,{onClick:Gy,children:"ℹ️"}),ij=C.div`
599
- position: fixed;
600
- top: 0;
601
- left: 0;
602
- right: 0;
603
- bottom: 0;
604
- background-color: rgba(0, 0, 0, 0.5);
605
- display: flex;
606
- justify-content: center;
607
- align-items: center;
608
- z-index: 1000;
609
- `,lj=C.div`
610
- background: ${({theme:e})=>e.colors.background};
611
- padding: 2rem;
612
- border-radius: 8px;
613
- width: 90%;
614
- max-width: 800px;
615
- max-height: 90vh;
616
- overflow-y: auto;
617
- position: relative;
618
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
619
- `,sj=C.div`
620
- display: flex;
621
- justify-content: space-between;
622
- align-items: center;
623
- margin-bottom: 2rem;
624
-
625
- h2 {
626
- margin: 0;
627
- }
628
- `,aj=C.button`
629
- position: absolute;
630
- top: 1rem;
631
- right: 1rem;
632
- background: none;
633
- border: none;
634
- font-size: 1.5rem;
635
- cursor: pointer;
636
- color: ${({theme:e})=>e.colors.text};
637
- &:hover {
638
- opacity: 0.8;
639
- }
640
- `,uj=C.div`
641
- display: flex;
642
- flex-direction: column;
643
- gap: 1rem;
644
- margin-bottom: 1rem;
645
- `,cj=C.div`
646
- color: ${({theme:e})=>e.colors.error};
647
- margin-bottom: 1rem;
648
- padding: 0.5rem;
649
- border: 1px solid ${({theme:e})=>e.colors.error};
650
- border-radius: 4px;
651
- `,dj=C.div`
652
- color: ${({theme:e})=>e.colors.success};
653
- margin-bottom: 1rem;
654
- padding: 0.5rem;
655
- border: 1px solid ${({theme:e})=>e.colors.success};
656
- border-radius: 4px;
657
- `,fj=C.div`
658
- position: absolute;
659
- top: 0;
660
- left: 0;
661
- right: 0;
662
- bottom: 0;
663
- background: rgba(0, 0, 0, 0.3);
664
- display: flex;
665
- justify-content: center;
666
- align-items: center;
667
- border-radius: 8px;
668
- color: white;
669
- font-size: 1.2rem;
670
- `,ua=({value:e,onChange:t,disabled:r})=>{const{services:i,isLoading:l,error:a}=_y(),u=d=>{t(d.target.value)};return h.jsxs(pj,{children:[h.jsxs(hj,{id:"aiService",value:e,onChange:u,disabled:r||l||a!==null,children:[h.jsx("option",{value:"",children:"Select AI Service"}),i.map(({service:d,displayName:f})=>h.jsx("option",{value:d,children:f},d))]}),l&&h.jsx(mj,{children:"Loading services..."}),a&&h.jsx(gj,{children:a})]})},pj=C.div`
671
- display: flex;
672
- flex-direction: column;
673
- gap: 4px;
674
- `,hj=C.select`
675
- padding: 8px;
676
- border: 1px solid ${({theme:e})=>e.colors.border};
677
- border-radius: 4px;
678
- background-color: ${({theme:e})=>e.colors.inputBg};
679
- color: ${({theme:e})=>e.colors.inputText};
680
- font-size: 14px;
681
- max-width: 200px; /* Ensure enough space for longer options */
682
-
683
- &:disabled {
684
- background-color: ${({theme:e})=>e.colors.disabled};
685
- cursor: not-allowed;
686
- }
687
-
688
- option {
689
- padding: 4px;
690
- background-color: ${({theme:e})=>e.colors.inputBg};
691
- color: ${({theme:e})=>e.colors.inputText};
692
- }
693
- `,mj=C.div`
694
- color: ${({theme:e})=>e.colors.text};
695
- font-size: 14px;
696
- font-style: italic;
697
- `,gj=C.div`
698
- color: ${({theme:e})=>e.colors.error};
699
- font-size: 14px;
700
- `;function Jy(){yl("openGenaicodeConfigModal")}function xj(){return h.jsx(rr,{onClick:Jy,"aria-label":"Open Genaicode configuration",children:"🐺"})}const yj=({options:e,onOptionsChange:t})=>{const[r,i]=$.useState(!1),[l,a]=$.useState(!1),[u,d]=$.useState(null),[f,p]=$.useState(null);vl("openGenaicodeConfigModal",()=>i(!0));const x=()=>{i(!1),d(null),p(null)},m=async S=>{a(!0),d(null),p(null);try{t(S),p("Configuration updated successfully")}catch{d("Failed to update configuration")}finally{a(!1)}},v=S=>{const{name:j,value:E,type:I}=S.target,A=I==="checkbox"?S.target.checked:E;m({...e,[j]:A})},w=S=>{m({...e,aiService:S})},k=S=>{const j=S.target.value.split(",").map(E=>E.trim());m({...e,ignorePatterns:j})};return r?h.jsx(ij,{onClick:S=>S.target===S.currentTarget&&x(),role:"dialog","aria-modal":"true","aria-labelledby":"genaicode-config-title",children:h.jsxs(lj,{children:[h.jsx(aj,{onClick:x,"aria-label":"Close configuration modal",children:"×"}),h.jsx(sj,{children:h.jsx("h2",{id:"genaicode-config-title",children:"Genaicode Configuration"})}),u&&h.jsx(cj,{role:"alert","aria-live":"polite",children:u}),f&&h.jsx(dj,{role:"status","aria-live":"polite",children:f}),h.jsxs(uj,{children:[h.jsxs(Yi,{children:[h.jsx(Bn,{htmlFor:"aiService",children:"Default AI Service:"}),h.jsx(ua,{value:e.aiService,onChange:w,disabled:l})]}),h.jsxs(Yi,{children:[h.jsx(Bn,{htmlFor:"contentMask",children:"Content Mask:"}),h.jsx(mg,{type:"text",id:"contentMask",name:"contentMask",value:e.contentMask||"",onChange:v,disabled:l})]}),h.jsxs(Yi,{children:[h.jsx(Bn,{htmlFor:"ignorePatterns",children:"Ignore Patterns:"}),h.jsx(mg,{type:"text",id:"ignorePatterns",name:"ignorePatterns",value:e.ignorePatterns?e.ignorePatterns.join(", "):"",onChange:k,disabled:l}),h.jsx("small",{children:"Comma-separated list of patterns"})]}),h.jsxs(Yi,{children:[h.jsx(Bn,{children:"File Operations:"}),h.jsxs(Bn,{htmlFor:"allowFileCreate",children:[h.jsx("input",{type:"checkbox",id:"allowFileCreate",name:"allowFileCreate",checked:e.allowFileCreate!==!1,onChange:v,disabled:l}),"Allow File Create"]}),h.jsxs(Bn,{htmlFor:"allowFileDelete",children:[h.jsx("input",{type:"checkbox",id:"allowFileDelete",name:"allowFileDelete",checked:e.allowFileDelete!==!1,onChange:v,disabled:l}),"Allow File Delete"]}),h.jsxs(Bn,{htmlFor:"allowDirectoryCreate",children:[h.jsx("input",{type:"checkbox",id:"allowDirectoryCreate",name:"allowDirectoryCreate",checked:e.allowDirectoryCreate!==!1,onChange:v,disabled:l}),"Allow Directory Create"]}),h.jsxs(Bn,{htmlFor:"allowFileMove",children:[h.jsx("input",{type:"checkbox",id:"allowFileMove",name:"allowFileMove",checked:e.allowFileMove!==!1,onChange:v,disabled:l}),"Allow File Move"]})]}),h.jsxs(Yi,{children:[h.jsx(Bn,{children:"Notification Settings:"}),h.jsxs(Bn,{htmlFor:"muteNotifications",children:[h.jsx("input",{type:"checkbox",id:"muteNotifications",name:"muteNotifications",checked:e.muteNotifications===!0,onChange:v,disabled:l}),"Mute Sound Notifications"]})]})]}),l&&h.jsx(fj,{role:"status","aria-live":"polite",children:"Updating configuration..."})]})}):null},Yi=C.div`
701
- margin-bottom: 16px;
702
- `,Bn=C.label`
703
- display: block;
704
- margin-bottom: 4px;
705
- color: ${e=>e.theme.colors.text};
706
- `,mg=C.input`
707
- width: 100%;
708
- padding: 8px;
709
- border: 1px solid ${e=>e.theme.colors.border};
710
- border-radius: 4px;
711
- background-color: ${e=>e.theme.colors.inputBg};
712
- color: ${e=>e.theme.colors.inputText};
713
-
714
- &:disabled {
715
- background-color: ${e=>e.theme.colors.disabled};
716
- cursor: not-allowed;
717
- }
718
- `,vj="0.15.0",Ky=()=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM13.96 12.29L11.21 15.83L9.25 13.47L6.5 17H17.5L13.96 12.29Z",fill:"currentColor"})}),wj=()=>h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M10 3H8C6.89543 3 6 3.89543 6 5V7M10 21H8C6.89543 21 6 20.1046 6 19V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M14 3H16C17.1046 3 18 3.89543 18 5V7M14 21H16C17.1046 21 18 20.1046 18 19V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("rect",{x:"6",y:"10",width:"12",height:"4",rx:"1",stroke:"currentColor",strokeWidth:"2"}),h.jsx("path",{d:"M12 7V10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M12 14V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),kj=500,Fs=5e3,oi=$.createContext({messages:[],executionStatus:"idle",currentQuestion:null,suggestions:[],currentPrompt:"",theme:"dark",usage:void 0,codegenOptions:void 0,rcConfig:null,lastFinishedExecutionId:null,initialDataLoaded:!1,conversationGraphState:null,isGraphVisualiserOpen:!1,terminalEvents:{},isTerminalOpen:!1,isContextManagerOpen:!1,isCompressionModalOpen:!1,setMessages:()=>{},setExecutionStatus:()=>{},setCurrentQuestion:()=>{},setSuggestions:()=>{},setCurrentPrompt:()=>{},toggleTheme:()=>{},setCodegenOptions:()=>{},setLastFinishedExecutionId:()=>{},startPolling:()=>{},stopPolling:()=>{},handlePauseExecution:async()=>{},handleResumeExecution:async()=>{},setConversationGraphState:()=>{},toggleGraphVisualiser:()=>{},toggleTerminal:()=>{},toggleContextManager:()=>{},toggleCompressionModal:()=>{},clearTerminalEvents:()=>{},updateMessage:()=>{}}),bj=({children:e})=>{const[t,r]=$.useState([]),[i,l]=$.useState("idle"),[a,u]=$.useState(null),[d,f]=$.useState([]),[p,x]=$.useState(""),[m,v]=$.useState("dark"),[w,k]=$.useState(),[S,j]=$.useState(void 0),[E,I]=$.useState(null),[A,F]=$.useState(null),O=$.useRef(!1),[N,H]=$.useState(!1),K=$.useRef(null),[ne,M]=$.useState(null),[Z,le]=$.useState(!1),[X,re]=$.useState({}),[U,pe]=$.useState(!1),[ae,Q]=$.useState(!1),[de,T]=$.useState(!1),[z,q]=$.useState(!0),R=$.useCallback(()=>{v(Fe=>Fe==="light"?"dark":"light")},[]),ce=$.useCallback(Fe=>{j(Fe)},[]),ye=$.useCallback(()=>{le(Fe=>!Fe)},[]),ke=$.useCallback(()=>{pe(Fe=>!Fe)},[]),he=$.useCallback(()=>{Q(Fe=>!Fe)},[]),fe=$.useCallback(()=>{T(Fe=>!Fe)},[]),se=$.useCallback(()=>{q(Fe=>!Fe)},[]),ve=$.useCallback(Fe=>{re(dt=>({...dt,[Fe]:[]}))},[]),Le=$.useCallback((Fe,dt)=>{r(_t=>_t.map(ft=>ft.id===Fe?{...ft,...dt}:ft))},[]),Ie=$.useCallback(async()=>{try{const[Fe,dt,_t,ft,De,mt]=await Promise.all([vd(),wd(),fg(),pg(),FC(),_C()]);l(Fe),u(dt);const Rt=[],G={};for(const te of _t)if(te.message&&Rt.push({...te.message,timestamp:new Date(te.message.timestamp),data:te.data}),te.terminalEvent){const{iterationId:be}=te.terminalEvent;G[be]||(G[be]=[]),G[be].push({...te.terminalEvent,timestamp:new Date(te.terminalEvent.timestamp).toString()})}for(const te in G)G[te].length>Fs&&(G[te]=G[te].slice(-Fs));r(Rt),re(G),k(ft),j(De),I(mt),H(!0)}catch(Fe){console.error("Failed to fetch initial data:",Fe),H(!1)}},[]);$.useEffect(()=>{Ie()},[Ie]);const Ge=$.useCallback(async()=>{try{const[Fe,dt,_t,ft]=await Promise.all([vd(),wd(),fg(),pg()]);l(De=>De!==Fe?Fe:De),u(De=>(De==null?void 0:De.id)!==(dt==null?void 0:dt.id)?dt:De),r(De=>{const mt=_t.filter(Rt=>!!Rt.message).map(Rt=>({...Rt.message,timestamp:new Date(Rt.message.timestamp),data:Rt.data}));return De.length!==mt.length||De.length>0&&mt.length>0&&De[De.length-1].id!==mt[mt.length-1].id?mt:De}),re(De=>{const mt={};let Rt=!1;for(const be of _t)if(be.terminalEvent){const{iterationId:Te}=be.terminalEvent;mt[Te]||(mt[Te]=[]),mt[Te].push({...be.terminalEvent,timestamp:new Date(be.terminalEvent.timestamp).toString()})}const G=new Set([...Object.keys(De),...Object.keys(mt)]),te={...De};for(const be of G){const Te=De[be]||[],Pe=mt[be]||[];(Te.length!==Pe.length||Pe.length>0&&Te.length>0&&Te[Te.length-1].id!==Pe[Pe.length-1].id)&&(Rt=!0,te[be]=Pe.length>Fs?Pe.slice(-Fs):Pe)}return Rt?te:De}),k(De=>(De==null?void 0:De.usageMetrics.total.cost)!==(ft==null?void 0:ft.usageMetrics.total.cost)||(De==null?void 0:De.usageMetrics.total.tpd)!==(ft==null?void 0:ft.usageMetrics.total.tpd)?ft:De)}catch(Fe){console.error("Failed to poll data:",Fe)}K.current&&clearTimeout(K.current),O.current&&(K.current=setTimeout(Ge,kj))},[]),$t=$.useCallback(()=>{O.current||(console.log("Starting polling..."),O.current=!0,K.current&&clearTimeout(K.current),requestAnimationFrame(()=>{Ge()}))},[Ge]),bt=$.useCallback(()=>{O.current&&(console.log("Stopping polling..."),O.current=!1,K.current&&(clearTimeout(K.current),K.current=null))},[]);$.useEffect(()=>(N&&$t(),()=>{bt()}),[N,$t,bt]);const Bt=$.useCallback(async()=>{try{await AC(),l("paused")}catch(Fe){console.error("Failed to pause execution:",Fe)}},[]),qn=$.useCallback(async()=>{try{await LC(),l("executing")}catch(Fe){console.error("Failed to resume execution:",Fe)}},[]),co=$.useMemo(()=>({messages:t,executionStatus:i,currentQuestion:a,suggestions:d,currentPrompt:p,theme:m,usage:w,codegenOptions:S,rcConfig:E,lastFinishedExecutionId:A,initialDataLoaded:N,conversationGraphState:ne,isGraphVisualiserOpen:Z,terminalEvents:X,isTerminalOpen:U,isContextManagerOpen:ae,isCompressionModalOpen:de,autoScrollTerminal:z,setMessages:r,setExecutionStatus:l,setCurrentQuestion:u,setSuggestions:f,setCurrentPrompt:x,toggleTheme:R,setCodegenOptions:ce,setLastFinishedExecutionId:F,startPolling:$t,stopPolling:bt,handlePauseExecution:Bt,handleResumeExecution:qn,setConversationGraphState:M,toggleGraphVisualiser:ye,toggleTerminal:ke,toggleContextManager:he,toggleCompressionModal:fe,toggleAutoScrollTerminal:se,setAutoScrollTerminal:q,clearTerminalEvents:ve,updateMessage:Le}),[t,i,a,d,p,m,w,S,E,A,N,ne,Z,X,U,ae,de,z,R,ce,$t,bt,Bt,qn,ye,ke,he,fe,se,ve,Le]);return h.jsx(oi.Provider,{value:co,children:e})},cn=()=>{const e=Tt.useContext(oi);if(!e)throw new Error("useChatState must be used within a ChatStateProvider");return e},Sj=ti`
719
- 0% {
720
- transform: scale(1);
721
- box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); // Use theme primary color ideally
722
- }
723
- 70% {
724
- transform: scale(1.05);
725
- box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
726
- }
727
- 100% {
728
- transform: scale(1);
729
- box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
730
- }
731
- `,Cj=C.div`
732
- position: absolute; // Positioned relative to MainContent
733
- bottom: 40px;
734
- right: 30px;
735
- z-index: 1000; // Ensure it's above other content like scrollbars
736
- `,Ej=C(rr)`
737
- width: 50px; // Increased size
738
- height: 50px; // Increased size
739
- background-color: ${({theme:e})=>e.colors.primary};
740
- color: ${({theme:e})=>e.colors.buttonText||"#ffffff"}; // Ensure icon is visible
741
- border: none;
742
- animation: ${Sj} 2s infinite;
743
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
744
-
745
- &:hover {
746
- background-color: ${({theme:e})=>e.colors.primaryHover};
747
- animation-play-state: paused; // Pause animation on hover
748
- }
749
-
750
- // Style when the visualiser panel is open (isActive prop)
751
- ${({isActive:e,theme:t})=>e&&wt`
752
- background-color: ${t.colors.buttonHoverBg}; // Existing active style
753
- border: 1px solid ${t.colors.primary};
754
- animation: none; // Turn off animation when visualiser is open
755
- `}
756
- `,jj=()=>{const{toggleGraphVisualiser:e,isGraphVisualiserOpen:t,conversationGraphState:r}=cn();return r!=null&&r.isActive?h.jsx(Cj,{children:h.jsx(Ej,{onClick:e,"aria-label":"Toggle Conversation Graph",title:"Toggle Conversation Graph",isActive:t,children:h.jsx(wj,{})})}):null},gg=C.div`
757
- position: fixed;
758
- top: 0;
759
- left: 0;
760
- right: 0;
761
- bottom: 0;
762
- background-color: ${e=>e.theme.colors.menuBackdrop};
763
- display: flex;
764
- justify-content: center;
765
- align-items: center;
766
- z-index: ${e=>e.theme.zIndex.modal};
767
- `,xg=C.div`
768
- background-color: ${e=>e.theme.colors.pageBackground};
769
- border-radius: 8px;
770
- width: 90%;
771
- max-width: 800px;
772
- max-height: 90vh;
773
- display: flex;
774
- flex-direction: column;
775
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
776
- border: 1px solid ${e=>e.theme.colors.border};
777
- color: ${e=>e.theme.colors.text};
778
- `,yg=C.div`
779
- padding: 16px 20px;
780
- border-bottom: 1px solid ${e=>e.theme.colors.border};
781
- display: flex;
782
- justify-content: space-between;
783
- align-items: center;
784
-
785
- h2 {
786
- margin: 0;
787
- font-size: 1.2rem;
788
- color: ${e=>e.theme.colors.text};
789
- }
790
- `,vg=C.button`
791
- background: none;
792
- border: none;
793
- font-size: 1.5rem;
794
- cursor: pointer;
795
- color: ${e=>e.theme.colors.textSecondary};
796
- padding: 0;
797
- line-height: 1;
798
-
799
- &:hover {
800
- color: ${e=>e.theme.colors.text};
801
- }
802
- `,wg=C.div`
803
- padding: 20px;
804
- overflow-y: auto;
805
- flex-grow: 1;
806
- display: flex;
807
- flex-direction: column;
808
- gap: 16px;
809
- `,Tj=C.div`
810
- border: 1px solid ${e=>e.theme.colors.border};
811
- border-radius: 4px;
812
- padding: 10px;
813
- background-color: ${e=>e.theme.colors.inputBg};
814
- max-height: 60vh;
815
- overflow-y: auto;
816
- `,$j=C.div`
817
- display: flex;
818
- align-items: center;
819
- padding: 4px 0;
820
- gap: 8px;
821
- font-family: monospace;
822
- font-size: 0.9rem;
823
-
824
- &:hover {
825
- background-color: ${e=>e.theme.colors.menuHover};
826
- }
827
- `,Rj=C.div`
828
- width: ${e=>e.level*20}px;
829
- flex-shrink: 0;
830
- `,kg=C.input.attrs({type:"checkbox"})`
831
- cursor: pointer;
832
- margin: 0;
833
- width: 16px;
834
- height: 16px;
835
- `,Ij=C.span`
836
- cursor: pointer;
837
- color: ${e=>e.type==="folder"?e.theme.colors.primary:e.theme.colors.text};
838
- font-weight: ${e=>e.type==="folder"?"bold":"normal"};
839
- flex-grow: 1;
840
- white-space: nowrap;
841
- overflow: hidden;
842
- text-overflow: ellipsis;
843
- `,bg=C.div`
844
- display: flex;
845
- justify-content: flex-end;
846
- gap: 12px;
847
- padding-top: 16px;
848
- border-top: 1px solid ${e=>e.theme.colors.border};
849
- `,Jr=C.button`
850
- padding: 8px 16px;
851
- border-radius: 4px;
852
- border: 1px solid ${e=>e.theme.colors.border};
853
- cursor: pointer;
854
- font-size: 0.9rem;
855
- transition: background-color 0.2s;
856
-
857
- ${e=>{switch(e.variant){case"primary":return`
858
- background-color: ${e.theme.colors.primary};
859
- color: white;
860
- border-color: ${e.theme.colors.primary};
861
- &:hover { background-color: ${e.theme.colors.primaryHover}; }
862
- `;case"danger":return`
863
- background-color: ${e.theme.colors.error};
864
- color: white;
865
- border-color: ${e.theme.colors.error};
866
- &:hover { background-color: ${e.theme.colors.errorHover}; }
867
- `;default:return`
868
- background-color: ${e.theme.colors.buttonBg};
869
- color: ${e.theme.colors.buttonText};
870
- &:hover { background-color: ${e.theme.colors.buttonHoverBg}; }
871
- `}}}
872
-
873
- &:disabled {
874
- opacity: 0.6;
875
- cursor: not-allowed;
876
- background-color: ${e=>e.theme.colors.disabled};
877
- border-color: ${e=>e.theme.colors.disabled};
878
- color: ${e=>e.theme.colors.textSecondary};
879
- }
880
- `,Sg=C.div`
881
- text-align: center;
882
- padding: 40px;
883
- color: ${e=>e.theme.colors.textSecondary};
884
- font-style: italic;
885
- `,Pj=C.div`
886
- display: flex;
887
- gap: 20px;
888
- font-size: 0.85rem;
889
- color: ${e=>e.theme.colors.textSecondary};
890
- margin-bottom: 8px;
891
- font-weight: 500;
892
- `,Nj=C.span`
893
- display: inline-flex;
894
- align-items: center;
895
- font-size: 0.8rem;
896
- margin-left: 8px;
897
- font-weight: 500;
898
- color: ${e=>{switch(e.category){case"small":return e.theme.colors.success||"#4CAF50";case"medium":return e.theme.colors.warning||"#FFA726";case"large":return e.theme.colors.error||"#EF5350";default:return e.theme.colors.textSecondary}}};
899
- `,Aj=C.div`
900
- position: absolute;
901
- top: -4px;
902
- right: -4px;
903
- min-width: 20px;
904
- height: 20px;
905
- border-radius: 10px;
906
- font-size: 0.65rem;
907
- font-weight: bold;
908
- display: flex;
909
- align-items: center;
910
- justify-content: center;
911
- padding: 2px 4px;
912
- color: white;
913
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
914
- background-color: ${e=>{switch(e.category){case"small":return e.theme.colors.success||"#4CAF50";case"medium":return e.theme.colors.warning||"#FFA726";case"large":return e.theme.colors.error||"#EF5350";default:return e.theme.colors.textSecondary}}};
915
- `;C.div`
916
- display: flex;
917
- flex-direction: column;
918
- gap: 4px;
919
- font-size: 0.85rem;
920
- `;const Lj=C.input`
921
- width: 100%;
922
- padding: 10px;
923
- border: 1px solid ${e=>e.theme.colors.border};
924
- border-radius: 4px;
925
- background-color: ${e=>e.theme.colors.inputBg};
926
- color: ${e=>e.theme.colors.text};
927
- margin-bottom: 12px;
928
- font-size: 0.95rem;
929
-
930
- &:focus {
931
- outline: none;
932
- border-color: ${e=>e.theme.colors.primary};
933
- }
934
- `,zj=C.span`
935
- cursor: pointer;
936
- display: inline-flex;
937
- width: 16px;
938
- color: ${e=>e.theme.colors.textSecondary};
939
- &:hover {
940
- color: ${e=>e.theme.colors.text};
941
- }
942
- `,Fj=C.div`
943
- display: flex;
944
- align-items: center;
945
- gap: 4px;
946
- flex-grow: 1;
947
- overflow: hidden;
948
- `,_j=C.span`
949
- font-size: 0.7rem;
950
- padding: 2px 6px;
951
- border-radius: 3px;
952
- background-color: ${e=>e.theme.colors.success||"#4CAF50"};
953
- color: white;
954
- font-weight: 500;
955
- margin-left: 8px;
956
- `,Oj=C.div`
957
- display: flex;
958
- align-items: center;
959
- gap: 12px;
960
- margin-bottom: 12px;
961
- `,Mj=C.label`
962
- display: flex;
963
- align-items: center;
964
- gap: 6px;
965
- font-size: 0.9rem;
966
- cursor: pointer;
967
- color: ${e=>e.theme.colors.text};
968
- user-select: none;
969
- `,Dj=C.div`
970
- color: ${e=>e.theme.colors.error};
971
- padding: 10px;
972
- margin-bottom: 10px;
973
- border: 1px solid ${e=>e.theme.colors.error};
974
- border-radius: 4px;
975
- background-color: rgba(255, 0, 0, 0.1);
976
- `,Bj=C.div`
977
- color: ${e=>e.theme.colors.success||"#4CAF50"};
978
- padding: 10px;
979
- margin-bottom: 10px;
980
- border: 1px solid ${e=>e.theme.colors.success||"#4CAF50"};
981
- border-radius: 4px;
982
- background-color: rgba(0, 255, 0, 0.1);
983
- `,Uj=C.div`
984
- display: flex;
985
- flex-direction: column;
986
- align-items: center;
987
- justify-content: center;
988
- padding: 20px;
989
- text-align: center;
990
- gap: 20px;
991
- height: 100%;
992
- `;function ca(e){return e<1e3?`${e} tokens`:e<1e6?`${(e/1e3).toFixed(1)}K tokens`:`${(e/1e6).toFixed(1)}M tokens`}function Qy(e){return e<1e4?"small":e<1e5?"medium":"large"}function Yy(e,t){if(e.type==="file"){const r=t[e.path]||0;e.tokenCount=r,e.aggregatedTokenCount=r}else if(e.children){let r=0;for(const i of e.children)Yy(i,t),r+=i.aggregatedTokenCount||0;e.aggregatedTokenCount=r}else e.aggregatedTokenCount=0;e.formattedSize=ca(e.aggregatedTokenCount||0)}function Vj(e,t){var f;const r={children:[]},i=[...e].sort(),l=i.map(p=>p.split("/").filter(x=>x.length>0));let a=[];if(l.length>0){a=[...l[0]],a.pop();for(let p=1;p<l.length;p++){const x=l[p];let m=0;for(;m<a.length&&m<x.length-1&&x[m]===a[m];)m++;if(a=a.slice(0,m),a.length===0)break}}const u=a.length>0?"/"+a.join("/"):"";for(let p=0;p<i.length;p++){const m=l[p].slice(a.length);let v=r,w=u;for(let k=0;k<m.length;k++){const S=m[k],j=k===m.length-1;w+="/"+S;let E=(f=v.children)==null?void 0:f.find(I=>I.name===S);E||(E={name:S,path:w,type:j?"file":"folder",children:j?void 0:[],checked:!1,indeterminate:!1,collapsed:!1,visible:!0,inContext:!1},v.children=v.children||[],v.children.push(E)),v=E}}const d=r.children||[];if(t)for(const p of d)Yy(p,t);return{nodes:d,rootPath:u}}function Hj(e){e.type==="folder"&&(e.collapsed=!e.collapsed)}function Zs(e,t,r=!1){const i=t.toLowerCase();for(const l of e){const a=!t||l.name.toLowerCase().includes(i),u=!r||l.type==="file"&&!!l.inContext;if(l.children){Zs(l.children,t,r);const d=l.children.some(f=>f.visible);r?l.visible=d:l.visible=a||d}else l.visible=a&&u}}function ea(e,t){let r=!1;for(const i of e)i.type==="file"?i.visible&&(r=!0):i.children&&(ea(i.children)&&(i.collapsed=!1,r=!0),i.visible&&(r=!0));return r}function Xy(e,t){if(e.visible!==!1&&(e.checked=t,e.indeterminate=!1,e.children))for(const r of e.children)Xy(r,t)}function Zy(e){if(!e.children||e.children.length===0)return;let t=!0,r=!1,i=!1,l=0;for(const a of e.children)a.type==="folder"&&Zy(a),a.visible!==!1&&(l++,a.checked||(t=!1),a.checked&&(r=!0),a.indeterminate&&(i=!0));l>0&&(e.checked=t,e.indeterminate=!t&&(r||i))}function _s(e){const t=[];function r(i){if(i.type==="file"&&i.checked&&t.push(i.path),i.children)for(const l of i.children)r(l)}for(const i of e)r(i);return t}function ev(e){for(const t of e)t.children&&(ev(t.children),t.containsContext=t.children.some(r=>r.inContext||r.containsContext))}function tv(e){e.sort((t,r)=>{const i=t.inContext||t.containsContext,l=r.inContext||r.containsContext;return i!==l?i?-1:1:t.type!==r.type?t.type==="folder"?-1:1:t.name.localeCompare(r.name)});for(const t of e)t.children&&tv(t.children)}const Wj=()=>{const{isContextManagerOpen:e,toggleContextManager:t}=cn(),[r,i]=$.useState([]),[l,a]=$.useState(!1),[u,d]=$.useState(0),[,f]=$.useState(0),[p,x]=$.useState(0),[m,v]=$.useState(0),[w,k]=$.useState(0),[S,j]=$.useState("Loading..."),[E,I]=$.useState(""),[A,F]=$.useState(!0),[,O]=$.useState([]),[N,H]=$.useState(""),[K,ne]=$.useState(null),[M,Z]=$.useState(null),[le,X]=$.useState(null),re=$.useCallback(async()=>{a(!0),j("Fetching files..."),ne(null),Z(null);try{const[he,fe]=await Promise.all([UC(),HC()]);O(fe),x(fe.length),v(he.length),f(he.length),j("Processing files...");const se={},ve=new Set;let Le=0;for(const bt of he)se[bt.path]=bt.tokenCount,ve.add(bt.path),Le+=bt.tokenCount;k(Le);const{nodes:Ie,rootPath:Ge}=Vj(fe,se);H(Ge);const $t=bt=>{for(const Bt of bt)Bt.type==="file"?Bt.inContext=ve.has(Bt.path):Bt.children&&$t(Bt.children)};$t(Ie),ev(Ie),tv(Ie),Zs(Ie,E,A),(E||A)&&ea(Ie,E),i(Ie),d(0)}catch(he){console.error("Failed to fetch context files:",he),ne("Failed to fetch context files. Please try again.")}finally{a(!1)}},[E,A]);$.useEffect(()=>{e&&re()},[e,re]);const U=()=>{I(""),F(!0),ne(null),Z(null),X(null),t()},pe=he=>{const fe=he.target.value;I(fe);const se=[...r];Zs(se,fe,A),(fe||A)&&ea(se),i(se)},ae=he=>{const fe=he.target.checked;F(fe);const se=[...r];Zs(se,E,fe),(E||fe)&&ea(se),i(se)},Q=he=>{Hj(he),i([...r])},de=he=>{const fe=!he.checked;Xy(he,fe);const se=Ie=>{for(const Ge of Ie)Ge.children&&(se(Ge.children),Zy(Ge))},ve=[...r];se(ve),i(ve);const Le=_s(ve);d(Le.length)},T=async()=>{const he=_s(r),fe=[],se=(ve,Le)=>{for(const Ie of ve){if(Ie.path===Le)return Ie;if(Ie.children){const Ge=se(Ie.children,Le);if(Ge)return Ge}}};for(const ve of he){const Le=se(r,ve);Le&&!Le.inContext&&fe.push(ve)}fe.length!==0&&X({message:`Are you sure you want to add ${fe.length} file${fe.length>1?"s":""} to the context?`,onConfirm:async()=>{X(null),a(!0),j("Adding files..."),ne(null),Z(null);try{const ve=await WC(fe);console.log("Context addition result:",ve),Z(`Successfully added ${ve.added} file${ve.added>1?"s":""} to context.`),await re()}catch(ve){console.error("Failed to add context files:",ve),ne("Failed to add files. Check console for details.")}finally{a(!1)}},onCancel:()=>{X(null)}})},z=async()=>{const he=_s(r),fe=[],se=(ve,Le)=>{for(const Ie of ve){if(Ie.path===Le)return Ie;if(Ie.children){const Ge=se(Ie.children,Le);if(Ge)return Ge}}};for(const ve of he){const Le=se(r,ve);Le&&Le.inContext&&fe.push(ve)}fe.length!==0&&X({message:`Are you sure you want to remove ${fe.length} file${fe.length>1?"s":""} from the context?`,onConfirm:async()=>{X(null),a(!0),j("Removing files..."),ne(null),Z(null);try{const ve=await VC(fe);console.log("Context removal result:",ve),Z(`Successfully removed ${ve.removed} file${ve.removed>1?"s":""} from context.`),await re()}catch(ve){console.error("Failed to remove context files:",ve),ne("Failed to remove files. Check console for details.")}finally{a(!1)}},onCancel:()=>{X(null)}})},q=async()=>{X({message:"This will analyze your context and remove files that are less relevant. Continue?",onConfirm:async()=>{X(null),a(!0),j("Optimizing context..."),ne(null),Z(null);try{(await qC()).success?(Z("Context optimization complete."),await re()):ne("Context optimization failed. Please try again.")}catch(he){console.error("Failed to optimize context:",he),ne("Failed to optimize context. Check console for details.")}finally{a(!1)}},onCancel:()=>{X(null)}})},R=(he,fe=0)=>he.map(se=>se.visible===!1?null:h.jsxs(Tt.Fragment,{children:[h.jsxs($j,{children:[h.jsx(Rj,{level:fe}),se.type==="folder"?h.jsx(zj,{onClick:()=>Q(se),children:se.collapsed?"▶":"▼"}):h.jsx("span",{style:{width:"16px",display:"inline-block"}}),h.jsx(kg,{checked:se.checked||!1,ref:ve=>{ve&&(ve.indeterminate=se.indeterminate||!1)},onChange:()=>de(se)}),h.jsxs(Fj,{onClick:()=>se.type==="folder"?Q(se):de(se),children:[h.jsxs(Ij,{type:se.type,title:se.path,children:[se.type==="folder"?"📁 ":"📄 ",se.name]}),se.type==="file"&&se.inContext&&!A&&h.jsx(_j,{children:"In Context"}),se.aggregatedTokenCount!==void 0&&se.aggregatedTokenCount>0&&h.jsxs(Nj,{category:Qy(se.aggregatedTokenCount),children:["(",se.formattedSize,")"]})]})]}),se.children&&!se.collapsed&&R(se.children,fe+1)]},se.path)),ce=()=>{const he=_s(r);let fe=0,se=0;const ve=(Le,Ie)=>{for(const Ge of Le){if(Ge.path===Ie)return Ge;if(Ge.children){const $t=ve(Ge.children,Ie);if($t)return $t}}};for(const Le of he){const Ie=ve(r,Le);Ie&&(Ie.inContext?fe++:se++)}return{inContextCount:fe,notInContextCount:se}},{inContextCount:ye,notInContextCount:ke}=ce();return e?le?h.jsx(gg,{onClick:()=>X(null),children:h.jsxs(xg,{onClick:he=>he.stopPropagation(),style:{maxWidth:"500px"},children:[h.jsxs(yg,{children:[h.jsx("h2",{children:"Confirm Action"}),h.jsx(vg,{onClick:()=>X(null),children:"×"})]}),h.jsx(wg,{children:h.jsxs(Uj,{children:[h.jsx("p",{children:le.message}),h.jsxs(bg,{children:[h.jsx(Jr,{onClick:le.onCancel,children:"Cancel"}),h.jsx(Jr,{variant:"primary",onClick:le.onConfirm,children:"Confirm"})]})]})})]})}):h.jsx(gg,{onClick:U,children:h.jsxs(xg,{onClick:he=>he.stopPropagation(),children:[h.jsxs(yg,{children:[h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[h.jsx("h2",{children:"Manage Context Files"}),N&&h.jsx("span",{style:{fontSize:"0.8rem",opacity:.7,fontFamily:"monospace"},children:N})]}),h.jsx(vg,{onClick:U,children:"×"})]}),h.jsxs(wg,{children:[K&&h.jsx(Dj,{children:K}),M&&h.jsx(Bj,{children:M}),h.jsxs(Pj,{children:[h.jsxs("span",{children:["Total Project Files: ",p]}),h.jsxs("span",{children:["In Context: ",m]}),h.jsxs("span",{children:["Selected: ",u]}),w>0&&h.jsxs("span",{children:["Total Context Size: ",ca(w)]})]}),h.jsx(Lj,{placeholder:"Search files...",value:E,onChange:pe,autoFocus:!0}),h.jsx(Oj,{children:h.jsxs(Mj,{children:[h.jsx(kg,{checked:A,onChange:ae}),"Show only in context"]})}),h.jsx(Tj,{children:l?h.jsx(Sg,{children:S}):r.length>0?R(r):h.jsx(Sg,{children:"No files found."})}),h.jsxs(bg,{children:[h.jsx(Jr,{onClick:re,disabled:l,children:"Refresh"}),h.jsx(Jr,{onClick:q,disabled:l,title:"Optimize Context (Remove less relevant files)",children:"Optimize..."}),h.jsx(Jr,{variant:"primary",onClick:T,disabled:l||ke===0,children:"Add Selected"}),h.jsx(Jr,{variant:"danger",onClick:z,disabled:l||ye===0,children:"Remove Selected"}),h.jsx(Jr,{onClick:U,children:"Close"})]})]})]})}):null},qj=C.span`
993
- position: relative;
994
- display: inline-flex;
995
- align-items: center;
996
- justify-content: center;
997
- `,nv=()=>h.jsx(qj,{children:h.jsx("span",{role:"img","aria-label":"Context Manager",children:"📂"})});var Hn=(e=>(e.USER="user",e.ASSISTANT="assistant",e.SYSTEM="system",e))(Hn||{}),tf=(e=>(e.CONVERSATION_SUMMARY="conversation-summary",e.MESSAGE_EDITABLE="editable",e))(tf||{});const kd=e=>e>=1e3?`Context size: ${(e/1e3).toFixed(1)}K tokens`:`Context size: ${e} tokens`,Cg=e=>e>=1e3?`${(e/1e3).toFixed(1)}K`:`${e}`,Gj=e=>{var r;const t=e.filter(i=>{var l;return[Hn.ASSISTANT,Hn.SYSTEM].includes(i.type)&&typeof((l=i.data)==null?void 0:l.contextSize)=="number"});if(t.length!==0)return(r=t[t.length-1].data)==null?void 0:r.contextSize},Jj=e=>{var r;const t=e.filter(i=>{var l;return i.type===Hn.SYSTEM&&typeof((l=i.data)==null?void 0:l.filesContextSize)=="number"});if(t.length!==0)return(r=t[t.length-1].data)==null?void 0:r.filesContextSize},nf=e=>{const t=Gj(e),r=Jj(e),i=t!==void 0?kd(t):"Context size N/A",l=r!==void 0?kd(r):"Files context N/A",[a,u]=$.useState(null),[d,f]=$.useState(null),[p,x]=$.useState(!1),[m,v]=$.useState(null),w=$.useCallback(async()=>{x(!0),v(null);try{const k=await fetch("/api/prompt",{method:"GET"});if(!k.ok)throw new Error(`Failed to fetch prompt context: ${k.status} ${k.statusText}`);const S=await k.json();u(S.promptItems??[]),f(typeof S.totalTokens=="number"?S.totalTokens:0)}catch(k){const S=k instanceof Error?k.message:"Unknown error fetching prompt context";v(S),u([]),f(0)}finally{x(!1)}},[]);return{contextSize:t,filesOnlyContextSize:r,formattedSize:i,formattedFilesSize:l,promptItems:a,totalTokens:d,loading:p,error:m,refreshPromptContext:w}},Kj=C.div`
998
- position: absolute;
999
- bottom: 100px;
1000
- right: 30px;
1001
- z-index: 1000;
1002
- `,Qj=C.div`
1003
- position: relative;
1004
- display: inline-block;
1005
- `,Yj=C(rr)`
1006
- width: 50px;
1007
- height: 50px;
1008
- background-color: ${({theme:e})=>e.colors.primary};
1009
- color: ${({theme:e})=>e.colors.buttonText||"#ffffff"};
1010
- border: none;
1011
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
1012
-
1013
- &:hover {
1014
- background-color: ${({theme:e})=>e.colors.primaryHover};
1015
- }
1016
-
1017
- ${({isActive:e,theme:t})=>e&&wt`
1018
- background-color: ${t.colors.buttonHoverBg};
1019
- border: 1px solid ${t.colors.primary};
1020
- `}
1021
- `,Xj=()=>{const{toggleContextManager:e,isContextManagerOpen:t,messages:r,executionStatus:i}=cn(),{filesOnlyContextSize:l}=nf(r),a=l?Qy(l):"small",u=l?ca(l).split(" ")[0]:"N/A";return i==="idle"?null:h.jsx(Kj,{children:h.jsxs(Qj,{children:[h.jsx(Yj,{onClick:e,"aria-label":"Toggle Context Manager",title:"Toggle Context Manager",isActive:t,children:h.jsx(nv,{})}),l!==void 0&&h.jsx(Aj,{category:a,title:`Context size: ${ca(l)}`,children:u})]})})},Zj=C.div`
1022
- position: fixed;
1023
- top: 0;
1024
- left: 0;
1025
- right: 0;
1026
- bottom: 0;
1027
- background-color: rgba(0, 0, 0, 0.7);
1028
- display: flex;
1029
- justify-content: center;
1030
- align-items: center;
1031
- z-index: 1000;
1032
- `,e2=C.div`
1033
- background-color: ${({theme:e})=>e.colors.background};
1034
- color: ${({theme:e})=>e.colors.text};
1035
- border-radius: 8px;
1036
- width: 90%;
1037
- max-width: 800px;
1038
- max-height: 90vh;
1039
- display: flex;
1040
- flex-direction: column;
1041
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1042
- border: 1px solid ${({theme:e})=>e.colors.border};
1043
- `,t2=C.div`
1044
- padding: 16px 24px;
1045
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
1046
- display: flex;
1047
- justify-content: space-between;
1048
- align-items: center;
1049
-
1050
- h2 {
1051
- margin: 0;
1052
- font-size: 1.25rem;
1053
- color: ${({theme:e})=>e.colors.primary};
1054
- }
1055
- `,n2=C.button`
1056
- background: none;
1057
- border: none;
1058
- color: ${({theme:e})=>e.colors.text};
1059
- font-size: 1.5rem;
1060
- cursor: pointer;
1061
- padding: 0;
1062
- line-height: 1;
1063
-
1064
- &:hover {
1065
- color: ${({theme:e})=>e.colors.primary};
1066
- }
1067
- `,r2=C.div`
1068
- padding: 24px;
1069
- overflow-y: auto;
1070
- flex-grow: 1;
1071
- display: flex;
1072
- flex-direction: column;
1073
- gap: 20px;
1074
- `,o2=C.div`
1075
- display: flex;
1076
- justify-content: flex-end;
1077
- gap: 12px;
1078
- margin-top: 20px;
1079
- padding-top: 20px;
1080
- border-top: 1px solid ${({theme:e})=>e.colors.border};
1081
- `,Eg=C.button`
1082
- padding: 8px 16px;
1083
- border-radius: 4px;
1084
- font-weight: 500;
1085
- cursor: pointer;
1086
- transition: all 0.2s;
1087
- border: 1px solid transparent;
1088
-
1089
- ${({variant:e,theme:t})=>{switch(e){case"primary":return`
1090
- background-color: ${t.colors.primary};
1091
- color: white;
1092
- &:hover { background-color: ${t.colors.primaryHover||t.colors.primary}; opacity: 0.9; }
1093
- &:disabled { background-color: ${t.colors.border}; cursor: not-allowed; }
1094
- `;case"danger":return`
1095
- background-color: ${t.colors.error||"#dc3545"};
1096
- color: white;
1097
- &:hover { opacity: 0.9; }
1098
- `;default:return`
1099
- background-color: transparent;
1100
- border-color: ${t.colors.border};
1101
- color: ${t.colors.text};
1102
- &:hover { background-color: ${t.colors.backgroundAlt}; }
1103
- `}}}
1104
- `,i2=C.div`
1105
- background-color: ${({theme:e})=>e.colors.backgroundAlt};
1106
- border-radius: 6px;
1107
- padding: 16px;
1108
- border: 1px solid ${({theme:e})=>e.colors.border};
1109
- `,l2=C.h3`
1110
- margin: 0 0 12px 0;
1111
- font-size: 1rem;
1112
- color: ${({theme:e})=>e.colors.text};
1113
- display: flex;
1114
- justify-content: space-between;
1115
- align-items: center;
1116
- `,s2=C.div`
1117
- display: grid;
1118
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
1119
- gap: 16px;
1120
- margin-bottom: 16px;
1121
- `,jg=C.div`
1122
- display: flex;
1123
- flex-direction: column;
1124
- gap: 4px;
1125
-
1126
- span.label {
1127
- font-size: 0.8rem;
1128
- color: ${({theme:e})=>e.colors.textSecondary||"#888"};
1129
- }
1130
-
1131
- span.value {
1132
- font-size: 1.1rem;
1133
- font-weight: 600;
1134
- color: ${({theme:e})=>e.colors.text};
1135
- }
1136
- `,a2=C.div`
1137
- display: flex;
1138
- flex-direction: column;
1139
- gap: 8px;
1140
- max-height: 300px;
1141
- overflow-y: auto;
1142
- padding-right: 8px;
1143
-
1144
- &::-webkit-scrollbar {
1145
- width: 6px;
1146
- }
1147
-
1148
- &::-webkit-scrollbar-track {
1149
- background: ${({theme:e})=>e.colors.background};
1150
- }
1151
-
1152
- &::-webkit-scrollbar-thumb {
1153
- background: ${({theme:e})=>e.colors.border};
1154
- border-radius: 3px;
1155
- }
1156
- `,u2=C.div`
1157
- display: flex;
1158
- flex-direction: column;
1159
- padding: 8px 12px;
1160
- background-color: ${({theme:e})=>e.colors.background};
1161
- border-left: 3px solid
1162
- ${({type:e,theme:t})=>e==="systemPrompt"?t.colors.warning||"#f0ad4e":e==="user"?t.colors.success||"#5cb85c":t.colors.primary};
1163
- border-radius: 4px;
1164
- font-size: 0.9rem;
1165
- cursor: help;
1166
- transition: background-color 0.2s;
1167
-
1168
- &:hover {
1169
- background-color: ${({theme:e})=>e.colors.backgroundAlt};
1170
- }
1171
- `,c2=C.div`
1172
- display: flex;
1173
- justify-content: space-between;
1174
- align-items: center;
1175
- margin-bottom: 4px;
1176
- `,d2=C.span`
1177
- font-weight: 600;
1178
- text-transform: capitalize;
1179
- min-width: 100px;
1180
- `,f2=C.span`
1181
- font-family: monospace;
1182
- font-size: 0.8rem;
1183
- opacity: 0.7;
1184
- min-width: 60px;
1185
- text-align: right;
1186
- `,p2=C.div`
1187
- font-size: 0.85rem;
1188
- opacity: 0.8;
1189
- white-space: nowrap;
1190
- overflow: hidden;
1191
- text-overflow: ellipsis;
1192
- max-width: 100%;
1193
- `,h2=C.div`
1194
- height: 4px;
1195
- background-color: ${({theme:e})=>e.colors.border};
1196
- border-radius: 2px;
1197
- overflow: hidden;
1198
- margin-top: 20px;
1199
-
1200
- &::after {
1201
- content: '';
1202
- display: block;
1203
- height: 100%;
1204
- width: ${({progress:e})=>e}%;
1205
- background-color: ${({theme:e})=>e.colors.primary};
1206
- transition: width 0.3s ease;
1207
- }
1208
- `,m2=C.div`
1209
- padding: 12px;
1210
- border-radius: 4px;
1211
- margin-top: 16px;
1212
- background-color: ${({type:e,theme:t})=>e==="success"?t.colors.successBg||"rgba(92, 184, 92, 0.1)":t.colors.errorBg||"rgba(220, 53, 69, 0.1)"};
1213
- color: ${({type:e,theme:t})=>e==="success"?t.colors.success||"#5cb85c":t.colors.error||"#dc3545"};
1214
- border: 1px solid
1215
- ${({type:e,theme:t})=>e==="success"?t.colors.success||"#5cb85c":t.colors.error||"#dc3545"};
1216
- `,g2=()=>{const{isCompressionModalOpen:e,toggleCompressionModal:t}=cn(),[r,i]=$.useState(!1),[l,a]=$.useState(null),[u,d]=$.useState([]),[f,p]=$.useState(0),x=$.useCallback(async()=>{i(!0);try{const v=await GC();d(v.preview),p(v.totalTokens)}catch(v){console.error("Failed to get context preview:",v)}finally{i(!1)}},[]);$.useEffect(()=>{e&&(x(),a(null))},[e,x]);const m=async()=>{i(!0),a(null);try{const v=await JC();a({success:!0,message:`Compression successful! Reduced context by ${v.savedTokens||"unknown"} tokens.`}),x()}catch(v){a({success:!1,message:v instanceof Error?v.message:"Compression failed"})}finally{i(!1)}};return e?h.jsx(Zj,{onClick:t,children:h.jsxs(e2,{onClick:v=>v.stopPropagation(),children:[h.jsxs(t2,{children:[h.jsx("h2",{children:"Context Compression Tool"}),h.jsx(n2,{onClick:t,children:"×"})]}),h.jsxs(r2,{children:[h.jsx("p",{children:"This tool analyzes the current conversation context and compresses it to save tokens while preserving essential information. It will summarize past interactions and remove redundant data."}),h.jsxs(i2,{children:[h.jsxs(l2,{children:["Context Preview",h.jsx("span",{style:{fontSize:"0.8rem",fontWeight:"normal",opacity:.7},children:"(Actual breakdown)"})]}),h.jsxs(s2,{children:[h.jsxs(jg,{children:[h.jsx("span",{className:"label",children:"Total Items"}),h.jsx("span",{className:"value",children:u.length})]}),h.jsxs(jg,{children:[h.jsx("span",{className:"label",children:"Total Tokens"}),h.jsx("span",{className:"value",children:f.toLocaleString()})]})]}),h.jsx(a2,{children:u.map((v,w)=>h.jsxs(u2,{type:v.type,title:v.summary,children:[h.jsxs(c2,{children:[h.jsx(d2,{children:v.type==="systemPrompt"?"System":v.type}),h.jsxs(f2,{children:[v.tokenCount,"t"]})]}),h.jsx(p2,{children:v.summary})]},w))})]}),r&&h.jsx(h2,{progress:100,className:"animate-pulse"}),l&&h.jsx(m2,{type:l.success?"success":"error",children:l.message}),h.jsxs(o2,{children:[h.jsx(Eg,{onClick:t,disabled:r,children:"Close"}),h.jsx(Eg,{variant:"primary",onClick:m,disabled:r,children:r?"Compressing...":"Compress Context"})]})]})]})}):null},x2=C.button`
1217
- position: absolute;
1218
- bottom: 160px; /* Positioned above the context manager button (which is at ~90px) */
1219
- right: 30px;
1220
- width: 48px;
1221
- height: 48px;
1222
- border-radius: 50%;
1223
- background-color: ${({theme:e})=>e.colors.background};
1224
- border: 1px solid ${({theme:e})=>e.colors.border};
1225
- color: ${({theme:e})=>e.colors.text};
1226
- display: flex;
1227
- justify-content: center;
1228
- align-items: center;
1229
- cursor: pointer;
1230
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1231
- z-index: 95;
1232
- font-size: 1.5rem;
1233
- transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
1234
-
1235
- &:hover {
1236
- transform: scale(1.1);
1237
- background-color: ${({theme:e})=>e.colors.primary};
1238
- color: white;
1239
- border-color: ${({theme:e})=>e.colors.primary};
1240
- box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
1241
- }
1242
-
1243
- &:active {
1244
- transform: scale(0.95);
1245
- }
1246
-
1247
- @media (max-width: 768px) {
1248
- bottom: 140px;
1249
- right: 16px;
1250
- width: 42px;
1251
- height: 42px;
1252
- font-size: 1.2rem;
1253
- }
1254
- `,y2=C.div`
1255
- position: absolute;
1256
- top: -8px;
1257
- right: -8px;
1258
- background-color: ${({theme:e})=>e.colors.primary};
1259
- color: white;
1260
- border-radius: 12px;
1261
- min-width: 32px;
1262
- height: 24px;
1263
- padding: 0 8px;
1264
- font-size: 11px;
1265
- font-weight: 600;
1266
- line-height: 24px;
1267
- text-align: center;
1268
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
1269
- pointer-events: none;
1270
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
1271
- letter-spacing: 0.3px;
1272
-
1273
- @media (max-width: 768px) {
1274
- font-size: 10px;
1275
- min-width: 28px;
1276
- height: 20px;
1277
- line-height: 20px;
1278
- padding: 0 6px;
1279
- }
1280
- `,v2=()=>{const{toggleCompressionModal:e,messages:t,executionStatus:r}=cn(),{contextSize:i}=nf(t);return r==="idle"?null:h.jsxs(x2,{onClick:e,title:`Compress Context${i?` (${Cg(i)} tokens)`:""}`,"aria-label":"Open Context Compression Tool",children:["📉",i!==void 0&&i>0&&h.jsx(y2,{children:Cg(i)})]})},w2="https://github.com/gtanczyk/genaicode/issues",k2=({themeToggle:e,chatInterface:t,inputArea:r,usage:i,toggleTheme:l})=>{const[a,u]=$.useState(!1),{toggleContextManager:d}=cn(),f=[{content:h.jsx(HE,{}),ariaLabel:"Service Configuration",key:"service-config",onClick:Hy},{content:h.jsx(uE,{}),ariaLabel:"Health Check",key:"health-check",onClick:My},{content:h.jsx(QC,{}),ariaLabel:"Content Generation",key:"content-gen",onClick:Oy},{content:h.jsx(nv,{}),ariaLabel:"Manage Context",key:"manage-context",onClick:d},{content:h.jsx(xj,{}),ariaLabel:"Genaicode Config",key:"genaicode-config",onClick:Jy},{content:e,ariaLabel:"Theme Toggle",key:"theme-toggle",onClick:l},{content:h.jsx(oj,{}),ariaLabel:"Information",key:"info",onClick:Gy},{content:h.jsx(rr,{children:"🐛"}),ariaLabel:"Report Bug",key:"report-bug",onClick:()=>window.open(w2,"_blank","noopener,noreferrer")}];return h.jsxs(b2,{children:[h.jsxs(S2,{children:[h.jsx(C2,{children:h.jsxs(E2,{children:[h.jsx(j2,{children:"GenAIcode"}),h.jsxs(T2,{children:["v",vj]})]})}),h.jsxs($2,{children:[h.jsx(R2,{children:h.jsx(Yb,{usage:i})}),h.jsx(I2,{children:h.jsx(tj,{menuItems:f,isOpen:a,onToggle:()=>u(!a),buttonAriaLabel:"Toggle navigation menu",menuAriaLabel:"Navigation menu",position:{top:"100%",right:0}})})]})]}),h.jsxs(P2,{children:[h.jsx(N2,{children:t}),h.jsx(A2,{children:r}),h.jsx(jj,{}),h.jsx(v2,{}),h.jsx(Xj,{}),h.jsx(Wj,{}),h.jsx(g2,{})]})]})},b2=C.div`
1281
- display: flex;
1282
- flex-direction: column;
1283
- height: 100vh;
1284
- max-width: 1200px;
1285
- margin: 0 auto;
1286
- padding: 0 10px;
1287
- `,S2=C.header`
1288
- position: relative;
1289
- display: flex;
1290
- justify-content: space-between;
1291
- align-items: center;
1292
- padding: 10px 0;
1293
- flex-wrap: nowrap;
1294
- gap: 10px;
1295
- `,C2=C.div`
1296
- display: flex;
1297
- align-items: center;
1298
- gap: 10px;
1299
- `,E2=C.div`
1300
- position: relative;
1301
- `,j2=C.h1`
1302
- text-transform: uppercase;
1303
- font-family: 'Press Start 2P', system-ui;
1304
- color: ${({theme:e})=>e.colors.primary};
1305
- margin: 0;
1306
- font-size: clamp(0.6rem, 2.5vw, 1.5rem);
1307
- white-space: nowrap;
1308
- overflow: hidden;
1309
- text-overflow: ellipsis;
1310
- `,T2=C.span`
1311
- position: absolute;
1312
- bottom: 0;
1313
- right: 0;
1314
- font-size: 0.6rem;
1315
- color: ${({theme:e})=>e.colors.text};
1316
- background-color: ${({theme:e})=>e.colors.backgroundAlt};
1317
- padding: 2px 4px;
1318
- border-radius: 3px;
1319
- transform: translateY(100%);
1320
- white-space: nowrap;
1321
- `,$2=C.div`
1322
- display: flex;
1323
- align-items: center;
1324
- gap: 16px;
1325
- flex-wrap: nowrap;
1326
- flex-shrink: 0;
1327
-
1328
- @media (max-width: 576px) {
1329
- gap: 8px;
1330
- }
1331
- `,R2=C.div`
1332
- flex-shrink: 1;
1333
- min-width: 0;
1334
- `,I2=C.div`
1335
- display: flex;
1336
- align-items: center;
1337
-
1338
- @media (max-width: 576px) {
1339
- position: relative;
1340
- }
1341
- `,P2=C.main`
1342
- display: flex;
1343
- flex-direction: column;
1344
- flex-grow: 1;
1345
- min-height: 0;
1346
- position: relative;
1347
- z-index: 1;
1348
- `,N2=C.div`
1349
- flex-grow: 1;
1350
- overflow: hidden;
1351
- margin-bottom: 20px;
1352
- `,A2=C.div`
1353
- flex-shrink: 0;
1354
- `,L2=({codegenOptions:e})=>{const{setCurrentPrompt:t,setExecutionStatus:r,setCurrentQuestion:i,setCodegenOptions:l,handlePauseExecution:a,handleResumeExecution:u}=$.useContext(oi),d=async(w,k)=>{t(w),r("executing");try{if(await vd()==="executing"){console.warn("Execution is already executing"),r("executing");return}if(!e){console.error("Codegen options not available"),r("idle");return}await PC(w,e,k.length>0?k:void 0),l({...e,initialActionType:void 0}),r("executing")}catch(S){console.error("Failed to execute codegen:",S),r("idle")}},f=async(w,k,S,j,E,I)=>{const A=await wd();if(A)try{if(i(null),e){const F={...e,aiService:j??e.aiService};l(F),await zC(A.id,w,S,F,k,E,I)}else console.error("Codegen options not available for submitting answer")}catch(F){console.error("Failed to submit answer:",F),i(A)}},p=async()=>{try{i(null),await NC()}catch(w){console.error("Failed to interrupt execution:",w)}},x=$.useCallback(w=>{l(w)},[l]);return{handleExecute:d,handleQuestionSubmit:f,handleInterrupt:p,handleOptionsChange:x,handlePauseExecution:a,handleResumeExecution:u}};function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},J.apply(null,arguments)}function Oe(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var rv={},ov=$.createContext(rv),z2=(e,t)=>J({},e,t),F2=()=>$.useContext(ov),rf=$.createContext(()=>{});rf.displayName="JVR.DispatchShowTools";function _2(){return $.useReducer(z2,rv)}function iv(){return $.useContext(rf)}var lv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(ov.Provider,{value:t,children:h.jsx(rf.Provider,{value:r,children:i})})};lv.displayName="JVR.ShowTools";var sv={},av=$.createContext(sv),O2=(e,t)=>J({},e,t),Pa=()=>$.useContext(av),of=$.createContext(()=>{});of.displayName="JVR.DispatchExpands";function M2(){return $.useReducer(O2,sv)}function D2(){return $.useContext(of)}var uv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(av.Provider,{value:t,children:h.jsx(of.Provider,{value:r,children:i})})};uv.displayName="JVR.Expands";var cv={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},dv=$.createContext(cv),B2=(e,t)=>J({},e,t),Ye=()=>$.useContext(dv),lf=$.createContext(()=>{});lf.displayName="JVR.DispatchTypes";function U2(){return $.useReducer(B2,cv)}function V2(){return $.useContext(lf)}function fv(e){var{initial:t,dispatch:r,children:i}=e;return h.jsx(dv.Provider,{value:t,children:h.jsx(lf.Provider,{value:r,children:i})})}fv.displayName="JVR.Types";var H2=["style"];function pv(e){var{style:t}=e,r=Oe(e,H2),i=J({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},t);return h.jsx("svg",J({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:i},r,{children:h.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}pv.displayName="JVR.TriangleArrow";var hv={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:h.jsx(pv,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},mv=$.createContext(hv),W2=(e,t)=>J({},e,t),Yt=()=>$.useContext(mv),sf=$.createContext(()=>{});sf.displayName="JVR.DispatchSymbols";function q2(){return $.useReducer(W2,hv)}function G2(){return $.useContext(sf)}var gv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(mv.Provider,{value:t,children:h.jsx(sf.Provider,{value:r,children:i})})};gv.displayName="JVR.Symbols";var xv={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},yv=$.createContext(xv),J2=(e,t)=>J({},e,t),kn=()=>$.useContext(yv),af=$.createContext(()=>{});af.displayName="JVR.DispatchSection";function K2(){return $.useReducer(J2,xv)}function Q2(){return $.useContext(af)}var vv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(yv.Provider,{value:t,children:h.jsx(af.Provider,{value:r,children:i})})};vv.displayName="JVR.Section";var wv={objectSortKeys:!1,indentWidth:15},uf=$.createContext(wv);uf.displayName="JVR.Context";var kv=$.createContext(()=>{});kv.displayName="JVR.DispatchContext";function Y2(e,t){return J({},e,t)}var ao=()=>$.useContext(uf),bv=e=>{var{children:t,initialState:r,initialTypes:i}=e,[l,a]=$.useReducer(Y2,Object.assign({},wv,r)),[u,d]=_2(),[f,p]=M2(),[x,m]=U2(),[v,w]=q2(),[k,S]=K2();return $.useEffect(()=>a(J({},r)),[r]),h.jsx(uf.Provider,{value:l,children:h.jsx(kv.Provider,{value:a,children:h.jsx(lv,{initial:u,dispatch:d,children:h.jsx(uv,{initial:f,dispatch:p,children:h.jsx(fv,{initial:J({},x,i),dispatch:m,children:h.jsx(gv,{initial:v,dispatch:w,children:h.jsx(vv,{initial:k,dispatch:S,children:t})})})})})})})};bv.displayName="JVR.Provider";function X2(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Z2=["isNumber","value","parentValue","keyName","keys"],eT=["as","render"],tT=["as","render"],nT=["as","render"],rT=["as","style","render"],oT=["as","render"],iT=["as","render"],lT=["as","render"],sT=["as","render"],bd=e=>{var{Quote:t={}}=Yt(),{isNumber:r,value:i,parentValue:l,keyName:a,keys:u}=e,d=Oe(e,Z2);if(r)return null;var{as:f,render:p}=t,x=Oe(t,eT),m=f||"span",v=J({},d,x),w={value:i,parentValue:l,keyName:a,keys:u||(a?[a]:[])},k=p&&typeof p=="function"&&p(v,w);return k||h.jsx(m,J({},v))};bd.displayName="JVR.Quote";var cl=e=>{var{ValueQuote:t={}}=Yt(),r=J({},(X2(e),e)),{as:i,render:l}=t,a=Oe(t,tT),u=i||"span",d=J({},r,a),f=l&&typeof l=="function"&&l(d,{});return f||h.jsx(u,J({},d))};cl.displayName="JVR.ValueQuote";var Sv=e=>{var{value:t,parentValue:r,keyName:i,keys:l}=e,{Colon:a={}}=Yt(),{as:u,render:d}=a,f=Oe(a,nT),p=u||"span",x=d&&typeof d=="function"&&d(f,{value:t,parentValue:r,keyName:i,keys:l||(i?[i]:[])});return x||h.jsx(p,J({},f))};Sv.displayName="JVR.Colon";var Cv=e=>{var{Arrow:t={}}=Yt(),r=Pa(),{expandKey:i,style:l,value:a,parentValue:u,keyName:d,keys:f}=e,p=!!r[i],{as:x,style:m,render:v}=t,w=Oe(t,rT),k=x||"span",S=v&&typeof v=="function",j=J({},w,{"data-expanded":p,style:J({},m,l)}),E={value:a,parentValue:u,keyName:d,keys:f||(d?[d]:[])},I=S&&v(j,E);return I||h.jsx(k,J({},w,{style:J({},m,l)}))};Cv.displayName="JVR.Arrow";var Ev=e=>{var{isBrackets:t,value:r,parentValue:i,keyName:l,keys:a}=e,{BracketsLeft:u={},BraceLeft:d={}}=Yt(),f={value:r,parentValue:i,keyName:l,keys:a||(l?[l]:[])};if(t){var{as:p,render:x}=u,m=Oe(u,oT),v=p||"span",w=x&&typeof x=="function"&&x(m,f);return w||h.jsx(v,J({},m))}var{as:k,render:S}=d,j=Oe(d,iT),E=k||"span",I=S&&typeof S=="function"&&S(j,f);return I||h.jsx(E,J({},j))};Ev.displayName="JVR.BracketsOpen";var cf=e=>{var{isBrackets:t,isVisiable:r,value:i,parentValue:l,keyName:a,keys:u}=e,d={value:i,parentValue:l,keyName:a,keys:u||(a?[a]:[])};if(!r)return null;var{BracketsRight:f={},BraceRight:p={}}=Yt();if(t){var{as:x,render:m}=f,v=Oe(f,lT),w=x||"span",k=m&&typeof m=="function"&&m(v,d);return k||h.jsx(w,J({},v))}var{as:S,render:j}=p,E=Oe(p,sT),I=S||"span",A=j&&typeof j=="function"&&j(E,d);return A||h.jsx(I,J({},E))};cf.displayName="JVR.BracketsClose";var jv=e=>{var t,{value:r,expandKey:i,level:l,keys:a=[]}=e,u=Pa(),d=Array.isArray(r),{collapsed:f,shouldExpandNodeInitially:p}=ao(),x=r instanceof Set,m=typeof f=="boolean"?f:typeof f=="number"?l>f:!1,v=(t=u[i])!=null?t:m,w=Object.keys(r).length;if(u[i]===void 0&&p&&p(v,{value:r,keys:a,level:l})||v||w===0)return null;var k={paddingLeft:4};return h.jsx("div",{style:k,children:h.jsx(cf,{isBrackets:d||x,isVisiable:!0})})};jv.displayName="JVR.NestedClose";var aT=["as","render"],uT=["as","render"],cT=["as","render"],dT=["as","render"],fT=["as","render"],pT=["as","render"],hT=["as","render"],mT=["as","render"],gT=["as","render"],xT=["as","render"],yT=["as","render"],vT=["as","render"],wT=["as","render"],Sd=e=>{if(e===void 0)return"0n";if(typeof e=="string")try{e=BigInt(e)}catch{return"0n"}return e?e.toString()+"n":"0n"},Tv=e=>{var{value:t,keyName:r}=e,{Set:i={},displayDataTypes:l}=Ye(),a=t instanceof Set;if(!a||!l)return null;var{as:u,render:d}=i,f=Oe(i,aT),p=d&&typeof d=="function",x=p&&d(f,{type:"type",value:t,keyName:r});if(x)return x;var m=u||"span";return h.jsx(m,J({},f))};Tv.displayName="JVR.SetComp";var $v=e=>{var{value:t,keyName:r}=e,{Map:i={},displayDataTypes:l}=Ye(),a=t instanceof Map;if(!a||!l)return null;var{as:u,render:d}=i,f=Oe(i,uT),p=d&&typeof d=="function",x=p&&d(f,{type:"type",value:t,keyName:r});if(x)return x;var m=u||"span";return h.jsx(m,J({},f))};$v.displayName="JVR.MapComp";var An={opacity:.75,paddingRight:4},Rv=e=>{var{children:t="",keyName:r}=e,{Str:i={},displayDataTypes:l}=Ye(),{shortenTextAfterLength:a=30}=ao(),{as:u,render:d}=i,f=Oe(i,cT),p=t,[x,m]=$.useState(a&&p.length>a);$.useEffect(()=>m(a&&p.length>a),[a]);var v=u||"span",w=J({},An,i.style||{});a>0&&(f.style=J({},f.style,{cursor:p.length<=a?"initial":"pointer"}),p.length>a&&(f.onClick=()=>{m(!x)}));var k=x?p.slice(0,a)+"...":p,S=d&&typeof d=="function",j=S&&d(J({},f,{style:w}),{type:"type",value:t,keyName:r}),E=S&&d(J({},f,{children:k,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(j||h.jsx(v,J({},f,{style:w}))),E||h.jsxs($.Fragment,{children:[h.jsx(cl,{}),h.jsx(v,J({},f,{className:"w-rjv-value",children:k})),h.jsx(cl,{})]})]})};Rv.displayName="JVR.TypeString";var Iv=e=>{var{children:t,keyName:r}=e,{True:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,dT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Iv.displayName="JVR.TypeTrue";var Pv=e=>{var{children:t,keyName:r}=e,{False:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,fT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Pv.displayName="JVR.TypeFalse";var Nv=e=>{var{children:t,keyName:r}=e,{Float:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,pT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Nv.displayName="JVR.TypeFloat";var Av=e=>{var{children:t,keyName:r}=e,{Int:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,hT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Av.displayName="JVR.TypeInt";var Lv=e=>{var{children:t,keyName:r}=e,{Bigint:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,mT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:Sd(t==null?void 0:t.toString())}))]})};Lv.displayName="JVR.TypeFloat";var zv=e=>{var{children:t,keyName:r}=e,{Url:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,gT),f=a||"span",p=J({},An,i.style),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t==null?void 0:t.href,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsxs("a",J({href:t==null?void 0:t.href,target:"_blank"},d,{className:"w-rjv-value",children:[h.jsx(cl,{}),t==null?void 0:t.href,h.jsx(cl,{})]}))]})};zv.displayName="JVR.TypeUrl";var Fv=e=>{var{children:t,keyName:r}=e,{Date:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,xT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=t instanceof Date?t.toLocaleString():t,w=x&&u(J({},d,{children:v,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),w||h.jsx(f,J({},d,{className:"w-rjv-value",children:v}))]})};Fv.displayName="JVR.TypeDate";var _v=e=>{var{children:t,keyName:r}=e,{Undefined:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,yT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v]})};_v.displayName="JVR.TypeUndefined";var Ov=e=>{var{children:t,keyName:r}=e,{Null:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,vT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v]})};Ov.displayName="JVR.TypeNull";var Mv=e=>{var{children:t,keyName:r}=e,{Nan:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Oe(i,wT),f=a||"span",p=J({},An,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},d,{children:t==null?void 0:t.toString(),className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v]})};Mv.displayName="JVR.TypeNan";var kT=e=>Number(e)===e&&e%1!==0||isNaN(e),Dv=e=>{var{value:t,keyName:r}=e,i={keyName:r};return t instanceof URL?h.jsx(zv,J({},i,{children:t})):typeof t=="string"?h.jsx(Rv,J({},i,{children:t})):t===!0?h.jsx(Iv,J({},i,{children:t})):t===!1?h.jsx(Pv,J({},i,{children:t})):t===null?h.jsx(Ov,J({},i,{children:t})):t===void 0?h.jsx(_v,J({},i,{children:t})):t instanceof Date?h.jsx(Fv,J({},i,{children:t})):typeof t=="number"&&isNaN(t)?h.jsx(Mv,J({},i,{children:t})):typeof t=="number"&&kT(t)?h.jsx(Nv,J({},i,{children:t})):typeof t=="bigint"?h.jsx(Lv,J({},i,{children:t})):typeof t=="number"?h.jsx(Av,J({},i,{children:t})):null};Dv.displayName="JVR.Value";function Ir(e,t,r){var i=G2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});$.useEffect(()=>i({[r]:a}),[t])}function dn(e,t,r){var i=V2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});$.useEffect(()=>i({[r]:a}),[t])}function ii(e,t,r){var i=Q2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});$.useEffect(()=>i({[r]:a}),[t])}var bT=["as","render"],Bv=e=>{var{KeyName:t={}}=kn();return ii(t,e,"KeyName"),null};Bv.displayName="JVR.KeyName";var Uv=e=>{var{children:t,value:r,parentValue:i,keyName:l,keys:a}=e,u=typeof t=="number",d={color:u?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:f={}}=kn(),{as:p,render:x}=f,m=Oe(f,bT);m.style=J({},m.style,d);var v=p||"span",w=x&&typeof x=="function"&&x(J({},m,{children:t}),{value:r,parentValue:i,keyName:l,keys:a||(l?[l]:[])});return w||h.jsx(v,J({},m,{children:t}))};Uv.displayName="JVR.KeyNameComp";var ST=["children","value","parentValue","keyName","keys"],CT=["as","render","children"],Vv=e=>{var{Row:t={}}=kn();return ii(t,e,"Row"),null};Vv.displayName="JVR.Row";var Hv=e=>{var{children:t,value:r,parentValue:i,keyName:l,keys:a}=e,u=Oe(e,ST),{Row:d={}}=kn(),{as:f,render:p}=d,x=Oe(d,CT),m=f||"div",v=p&&typeof p=="function"&&p(J({},u,x,{children:t}),{value:r,keyName:l,parentValue:i,keys:a});return v||h.jsx(m,J({},u,x,{children:t}))};Hv.displayName="JVR.RowComp";function ET(e){var t=$.useRef();return $.useEffect(()=>{t.current=e}),t.current}function jT(e){var{value:t,highlightUpdates:r,highlightContainer:i}=e,l=ET(t),a=$.useMemo(()=>{if(!r||l===void 0)return!1;if(typeof t!=typeof l)return!0;if(typeof t=="number")return isNaN(t)&&isNaN(l)?!1:t!==l;if(Array.isArray(t)!==Array.isArray(l))return!0;if(typeof t=="object"||typeof t=="function")return!1;if(t!==l)return!0},[r,t]);$.useEffect(()=>{i&&i.current&&a&&"animate"in i.current&&i.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[a,t,i])}var TT=["keyName","value","parentValue","expandKey","keys"],$T=["as","render"],df=e=>{var{keyName:t,value:r,parentValue:i,expandKey:l,keys:a}=e,u=Oe(e,TT),{onCopied:d,enableClipboard:f}=ao(),p=F2(),x=p[l],[m,v]=$.useState(!1),{Copied:w={}}=kn();if(f===!1||!x)return null;var k=O=>{O.stopPropagation();var N="";typeof r=="number"&&r===1/0?N="Infinity":typeof r=="number"&&isNaN(r)?N="NaN":typeof r=="bigint"?N=Sd(r):r instanceof Date?N=r.toLocaleString():N=JSON.stringify(r,(K,ne)=>typeof ne=="bigint"?Sd(ne):ne,2),d&&d(N,r),v(!0);var H=navigator.clipboard||{writeText(K){return new Promise((ne,M)=>{var Z=document.createElement("textarea");Z.style.position="absolute",Z.style.opacity="0",Z.style.left="-99999999px",Z.value=K,document.body.appendChild(Z),Z.select(),document.execCommand("copy")?ne():M(),Z.remove()})}};H.writeText(N).then(()=>{var K=setTimeout(()=>{v(!1),clearTimeout(K)},3e3)}).catch(K=>{})},S={style:{display:"inline-flex"},fill:m?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:k},{render:j}=w,E=Oe(w,$T),I=J({},E,u,S,{style:J({},E.style,u.style,S.style)}),A=j&&typeof j=="function",F=A&&j(J({},I,{"data-copied":m}),{value:r,keyName:t,keys:a,parentValue:i});return F||(m?h.jsx("svg",J({viewBox:"0 0 32 36"},I,{children:h.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):h.jsx("svg",J({viewBox:"0 0 32 36"},I,{children:h.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};df.displayName="JVR.Copied";function Wv(){var e=$.useRef(null);return e.current===null&&(e.current="custom-id-"+Math.random().toString(36).substr(2,9)),e.current}var qv=e=>{var t,{value:r,expandKey:i="",level:l,keys:a=[]}=e,u=Pa(),{objectSortKeys:d,indentWidth:f,collapsed:p,shouldExpandNodeInitially:x}=ao(),m=Array.isArray(r),v=typeof p=="boolean"?p:typeof p=="number"?l>p:!1,w=(t=u[i])!=null?t:v;if(u[i]===void 0&&x&&x(w,{value:r,keys:a,level:l})||w)return null;var k=m?Object.entries(r).map(j=>[Number(j[0]),j[1]]):Object.entries(r);d&&(k=d===!0?k.sort((j,E)=>{var[I]=j,[A]=E;return typeof I=="string"&&typeof A=="string"?I.localeCompare(A):0}):k.sort((j,E)=>{var[I,A]=j,[F,O]=E;return typeof I=="string"&&typeof F=="string"?d(I,F,A,O):0}));var S={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:f,marginLeft:6};return h.jsx("div",{className:"w-rjv-wrap",style:S,children:k.map((j,E)=>{var[I,A]=j;return h.jsx(Gv,{parentValue:r,keyName:I,keys:[...a,I],value:A,level:l},E)})})};qv.displayName="JVR.KeyValues";var ff=e=>{var{keyName:t,parentValue:r,keys:i,value:l}=e,{highlightUpdates:a}=ao(),u=typeof t=="number",d=$.useRef(null);jT({value:l,highlightUpdates:a,highlightContainer:d});var f={keyName:t,value:l,keys:i,parentValue:r};return h.jsxs($.Fragment,{children:[h.jsxs("span",{ref:d,children:[h.jsx(bd,J({isNumber:u,"data-placement":"left"},f)),h.jsx(Uv,J({},f,{children:t})),h.jsx(bd,J({isNumber:u,"data-placement":"right"},f))]}),h.jsx(Sv,J({},f))]})};ff.displayName="JVR.KayName";var Gv=e=>{var{keyName:t,value:r,parentValue:i,level:l=0,keys:a=[]}=e,u=iv(),d=Wv(),f=Array.isArray(r),p=r instanceof Set,x=r instanceof Map,m=r instanceof Date,v=r instanceof URL,w=r&&typeof r=="object"&&!f&&!p&&!x&&!m&&!v,k=w||f||p||x;if(k){var S=p?Array.from(r):x?Object.fromEntries(r):r;return h.jsx(pf,{keyName:t,value:S,parentValue:i,initialValue:r,keys:a,level:l+1})}var j={onMouseEnter:()=>u({[d]:!0}),onMouseLeave:()=>u({[d]:!1})};return h.jsxs(Hv,J({className:"w-rjv-line",value:r,keyName:t,keys:a,parentValue:i},j,{children:[h.jsx(ff,{keyName:t,value:r,keys:a,parentValue:i}),h.jsx(Dv,{keyName:t,value:r}),h.jsx(df,{keyName:t,value:r,keys:a,parentValue:i,expandKey:d})]}))};Gv.displayName="JVR.KeyValuesItem";var RT=["value","keyName"],IT=["as","render"],Jv=e=>{var{CountInfoExtra:t={}}=kn();return ii(t,e,"CountInfoExtra"),null};Jv.displayName="JVR.CountInfoExtra";var Kv=e=>{var{value:t={},keyName:r}=e,i=Oe(e,RT),{CountInfoExtra:l={}}=kn(),{as:a,render:u}=l,d=Oe(l,IT);if(!u&&!d.children)return null;var f=a||"span",p=u&&typeof u=="function",x=J({},d,i),m=p&&u(x,{value:t,keyName:r});return m||h.jsx(f,J({},x))};Kv.displayName="JVR.CountInfoExtraComps";var PT=["value","keyName"],NT=["as","render"],Qv=e=>{var{CountInfo:t={}}=kn();return ii(t,e,"CountInfo"),null};Qv.displayName="JVR.CountInfo";var Yv=e=>{var{value:t={},keyName:r}=e,i=Oe(e,PT),{displayObjectSize:l}=ao(),{CountInfo:a={}}=kn();if(!l)return null;var{as:u,render:d}=a,f=Oe(a,NT),p=u||"span";f.style=J({},f.style,e.style);var x=Object.keys(t).length;f.children||(f.children=x+" item"+(x===1?"":"s"));var m=J({},f,i),v=d&&typeof d=="function",w=v&&d(J({},m,{"data-length":x}),{value:t,keyName:r});return w||h.jsx(p,J({},m))};Yv.displayName="JVR.CountInfoComp";var AT=["as","render"],Xv=e=>{var{Ellipsis:t={}}=kn();return ii(t,e,"Ellipsis"),null};Xv.displayName="JVR.Ellipsis";var Zv=e=>{var{isExpanded:t,value:r,keyName:i}=e,{Ellipsis:l={}}=kn(),{as:a,render:u}=l,d=Oe(l,AT),f=a||"span",p=u&&typeof u=="function"&&u(J({},d,{"data-expanded":t}),{value:r,keyName:i});return p||(!t||typeof r=="object"&&Object.keys(r).length==0?null:h.jsx(f,J({},d)))};Zv.displayName="JVR.EllipsisComp";var e0=e=>{var t,{keyName:r,expandKey:i,keys:l=[],initialValue:a,value:u,parentValue:d,level:f}=e,p=Pa(),x=D2(),{onExpand:m,collapsed:v,shouldExpandNodeInitially:w}=ao(),k=Array.isArray(u),S=u instanceof Set,j=typeof v=="boolean"?v:typeof v=="number"?f>v:!1,E=typeof u=="object",I=(t=p[i])!=null?t:j,A=w&&w(I,{value:u,keys:l,level:f});p[i]===void 0&&A!==void 0&&(I=A);var F=()=>{var Z={expand:!I,value:u,keyid:i,keyName:r};m&&m(Z),x({[i]:Z.expand})},O={display:"inline-flex",alignItems:"center"},N={transform:"rotate("+(I?"-90":"0")+"deg)",transition:"all 0.3s"},H=Object.keys(u).length,K=H!==0&&(k||S||E),ne={style:O};K&&(ne.onClick=F);var M={keyName:r,value:u,keys:l,parentValue:d};return h.jsxs("span",J({},ne,{children:[K&&h.jsx(Cv,J({style:N,expandKey:i},M)),(r||typeof r=="number")&&h.jsx(ff,J({},M)),h.jsx(Tv,{value:a,keyName:r}),h.jsx($v,{value:a,keyName:r}),h.jsx(Ev,J({isBrackets:k||S},M)),h.jsx(Zv,{keyName:r,value:u,isExpanded:I}),h.jsx(cf,J({isVisiable:I||!K,isBrackets:k||S},M)),h.jsx(Yv,{value:u,keyName:r}),h.jsx(Kv,{value:u,keyName:r}),h.jsx(df,{keyName:r,value:u,expandKey:i,parentValue:d,keys:l})]}))};e0.displayName="JVR.NestedOpen";var LT=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],pf=$.forwardRef((e,t)=>{var{className:r="",parentValue:i,level:l=1,value:a,initialValue:u,keys:d,keyName:f}=e,p=Oe(e,LT),x=iv(),m=Wv(),v=[r,"w-rjv-inner"].filter(Boolean).join(" "),w={onMouseEnter:()=>x({[m]:!0}),onMouseLeave:()=>x({[m]:!1})};return h.jsxs("div",J({className:v,ref:t},p,w,{children:[h.jsx(e0,{expandKey:m,value:a,level:l,keys:d,parentValue:i,keyName:f,initialValue:u}),h.jsx(qv,{expandKey:m,value:a,level:l,keys:d,parentValue:i,keyName:f}),h.jsx(jv,{expandKey:m,value:a,level:l,keys:d})]}))});pf.displayName="JVR.Container";var t0=e=>{var{BraceLeft:t={}}=Yt();return Ir(t,e,"BraceLeft"),null};t0.displayName="JVR.BraceLeft";var n0=e=>{var{BraceRight:t={}}=Yt();return Ir(t,e,"BraceRight"),null};n0.displayName="JVR.BraceRight";var r0=e=>{var{BracketsLeft:t={}}=Yt();return Ir(t,e,"BracketsLeft"),null};r0.displayName="JVR.BracketsLeft";var o0=e=>{var{BracketsRight:t={}}=Yt();return Ir(t,e,"BracketsRight"),null};o0.displayName="JVR.BracketsRight";var i0=e=>{var{Arrow:t={}}=Yt();return Ir(t,e,"Arrow"),null};i0.displayName="JVR.Arrow";var l0=e=>{var{Colon:t={}}=Yt();return Ir(t,e,"Colon"),null};l0.displayName="JVR.Colon";var s0=e=>{var{Quote:t={}}=Yt();return Ir(t,e,"Quote"),null};s0.displayName="JVR.Quote";var a0=e=>{var{ValueQuote:t={}}=Yt();return Ir(t,e,"ValueQuote"),null};a0.displayName="JVR.ValueQuote";var u0=e=>{var{Bigint:t={}}=Ye();return dn(t,e,"Bigint"),null};u0.displayName="JVR.Bigint";var c0=e=>{var{Date:t={}}=Ye();return dn(t,e,"Date"),null};c0.displayName="JVR.Date";var d0=e=>{var{False:t={}}=Ye();return dn(t,e,"False"),null};d0.displayName="JVR.False";var f0=e=>{var{Float:t={}}=Ye();return dn(t,e,"Float"),null};f0.displayName="JVR.Float";var p0=e=>{var{Int:t={}}=Ye();return dn(t,e,"Int"),null};p0.displayName="JVR.Int";var h0=e=>{var{Map:t={}}=Ye();return dn(t,e,"Map"),null};h0.displayName="JVR.Map";var m0=e=>{var{Nan:t={}}=Ye();return dn(t,e,"Nan"),null};m0.displayName="JVR.Nan";var g0=e=>{var{Null:t={}}=Ye();return dn(t,e,"Null"),null};g0.displayName="JVR.Null";var x0=e=>{var{Set:t={}}=Ye();return dn(t,e,"Set"),null};x0.displayName="JVR.Set";var y0=e=>{var{Str:t={}}=Ye();return dn(t,e,"Str"),null};y0.displayName="JVR.StringText";var v0=e=>{var{True:t={}}=Ye();return dn(t,e,"True"),null};v0.displayName="JVR.True";var w0=e=>{var{Undefined:t={}}=Ye();return dn(t,e,"Undefined"),null};w0.displayName="JVR.Undefined";var k0=e=>{var{Url:t={}}=Ye();return dn(t,e,"Url"),null};k0.displayName="JVR.Url";var b0=e=>{var{Copied:t={}}=kn();return ii(t,e,"Copied"),null};b0.displayName="JVR.Copied";var zT=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],qe=$.forwardRef((e,t)=>{var{className:r="",style:i,value:l,children:a,collapsed:u,shouldExpandNodeInitially:d,indentWidth:f=15,displayObjectSize:p=!0,shortenTextAfterLength:x=30,highlightUpdates:m=!0,enableClipboard:v=!0,displayDataTypes:w=!0,objectSortKeys:k=!1,onExpand:S,onCopied:j}=e,E=Oe(e,zT),I=J({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},i),A=["w-json-view-container","w-rjv",r].filter(Boolean).join(" ");return h.jsxs(bv,{initialState:{value:l,objectSortKeys:k,indentWidth:f,shouldExpandNodeInitially:d,displayObjectSize:p,collapsed:u,enableClipboard:v,shortenTextAfterLength:x,highlightUpdates:m,onCopied:j,onExpand:S},initialTypes:{displayDataTypes:w},children:[h.jsx(pf,J({value:l},E,{ref:t,className:A,style:I})),a]})});qe.Bigint=u0;qe.Date=c0;qe.False=d0;qe.Float=f0;qe.Int=p0;qe.Map=h0;qe.Nan=m0;qe.Null=g0;qe.Set=x0;qe.String=y0;qe.True=v0;qe.Undefined=w0;qe.Url=k0;qe.ValueQuote=a0;qe.Arrow=i0;qe.Colon=l0;qe.Quote=s0;qe.Ellipsis=Xv;qe.BraceLeft=t0;qe.BraceRight=n0;qe.BracketsLeft=r0;qe.BracketsRight=o0;qe.Copied=b0;qe.CountInfo=Qv;qe.CountInfoExtra=Jv;qe.KeyName=Bv;qe.Row=Vv;qe.displayName="JVR.JsonView";var FT={"--w-rjv-font-family":"monospace","--w-rjv-color":"#0184a6","--w-rjv-key-string":"#0184a6","--w-rjv-background-color":"#202020","--w-rjv-line-color":"#323232","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#656565","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#0184a6","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#1896b6","--w-rjv-brackets-color":"#1896b6","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#649bd8","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#076678","--w-rjv-type-undefined-color":"#586e75"},_T={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};const OT=C.pre`
1355
- margin-top: 8px;
1356
- padding: 8px;
1357
- background-color: ${e=>e.theme.colors.codeBackground};
1358
- border-radius: 4px;
1359
- font-size: 0.9em;
1360
- overflow-x: auto;
1361
- white-space: pre-wrap;
1362
- word-wrap: break-word;
1363
-
1364
- .w-json-view-container {
1365
- background: none !important;
1366
- }
1367
- `,S0=({data:e})=>{const t=Wb();return h.jsx(OT,{children:typeof e=="object"?h.jsx(qe,{value:e,shortenTextAfterLength:0,style:t.name==="dark"?FT:_T}):JSON.stringify(e,null,2)})};function MT(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const DT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UT={};function Tg(e,t){return(UT.jsx?BT:DT).test(e)}const VT=/[ \t\n\f\r]/g;function HT(e){return typeof e=="object"?e.type==="text"?$g(e.value):!1:$g(e)}function $g(e){return e.replace(VT,"")===""}class wl{constructor(t,r,i){this.normal=r,this.property=t,i&&(this.space=i)}}wl.prototype.normal={};wl.prototype.property={};wl.prototype.space=void 0;function C0(e,t){const r={},i={};for(const l of e)Object.assign(r,l.property),Object.assign(i,l.normal);return new wl(r,i,t)}function Cd(e){return e.toLowerCase()}class Xt{constructor(t,r){this.attribute=r,this.property=t}}Xt.prototype.attribute="";Xt.prototype.booleanish=!1;Xt.prototype.boolean=!1;Xt.prototype.commaOrSpaceSeparated=!1;Xt.prototype.commaSeparated=!1;Xt.prototype.defined=!1;Xt.prototype.mustUseProperty=!1;Xt.prototype.number=!1;Xt.prototype.overloadedBoolean=!1;Xt.prototype.property="";Xt.prototype.spaceSeparated=!1;Xt.prototype.space=void 0;let WT=0;const Ne=uo(),ut=uo(),Ed=uo(),ie=uo(),Qe=uo(),Uo=uo(),on=uo();function uo(){return 2**++WT}const jd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:ut,commaOrSpaceSeparated:on,commaSeparated:Uo,number:ie,overloadedBoolean:Ed,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),_c=Object.keys(jd);class hf extends Xt{constructor(t,r,i,l){let a=-1;if(super(t,r),Rg(this,"space",l),typeof i=="number")for(;++a<_c.length;){const u=_c[a];Rg(this,_c[a],(i&jd[u])===jd[u])}}}hf.prototype.defined=!0;function Rg(e,t,r){r&&(e[t]=r)}function li(e){const t={},r={};for(const[i,l]of Object.entries(e.properties)){const a=new hf(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,r[Cd(i)]=i,r[Cd(a.attribute)]=i}return new wl(t,r,e.space)}const E0=li({properties:{ariaActiveDescendant:null,ariaAtomic:ut,ariaAutoComplete:null,ariaBusy:ut,ariaChecked:ut,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:ut,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:ut,ariaFlowTo:Qe,ariaGrabbed:ut,ariaHasPopup:null,ariaHidden:ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:ie,ariaLive:null,ariaModal:ut,ariaMultiLine:ut,ariaMultiSelectable:ut,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:ut,ariaReadOnly:ut,ariaRelevant:null,ariaRequired:ut,ariaRoleDescription:Qe,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:ut,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function j0(e,t){return t in e?e[t]:t}function T0(e,t){return j0(e,t.toLowerCase())}const qT=li({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Uo,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:Qe,autoFocus:Ne,autoPlay:Ne,blocking:Qe,capture:null,charSet:null,checked:Ne,cite:null,className:Qe,cols:ie,colSpan:null,content:null,contentEditable:ut,controls:Ne,controlsList:Qe,coords:ie|Uo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:Ed,draggable:ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:Qe,height:ie,hidden:Ed,high:ie,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Ne,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ne,optimum:ie,pattern:null,ping:Qe,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:Qe,required:Ne,reversed:Ne,rows:ie,rowSpan:ie,sandbox:Qe,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:ut,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:ut,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:T0}),GT=li({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:on,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:Qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uo,g2:Uo,glyphName:Uo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:j0}),$0=li({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),R0=li({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:T0}),I0=li({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JT={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},KT=/[A-Z]/g,Ig=/-[a-z]/g,QT=/^data[-\w.:]+$/i;function YT(e,t){const r=Cd(t);let i=t,l=Xt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&QT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ig,ZT);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ig.test(a)){let u=a.replace(KT,XT);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}l=hf}return new l(i,t)}function XT(e){return"-"+e.toLowerCase()}function ZT(e){return e.charAt(1).toUpperCase()}const e$=C0([E0,qT,$0,R0,I0],"html"),mf=C0([E0,GT,$0,R0,I0],"svg");function t$(e){return e.join(" ").trim()}var Oo={},Oc,Pg;function n$(){if(Pg)return Oc;Pg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
1368
- `,p="/",x="*",m="",v="comment",w="declaration";Oc=function(S,j){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];j=j||{};var E=1,I=1;function A(X){var re=X.match(t);re&&(E+=re.length);var U=X.lastIndexOf(f);I=~U?X.length-U:I+X.length}function F(){var X={line:E,column:I};return function(re){return re.position=new O(X),K(),re}}function O(X){this.start=X,this.end={line:E,column:I},this.source=j.source}O.prototype.content=S;function N(X){var re=new Error(j.source+":"+E+":"+I+": "+X);if(re.reason=X,re.filename=j.source,re.line=E,re.column=I,re.source=S,!j.silent)throw re}function H(X){var re=X.exec(S);if(re){var U=re[0];return A(U),S=S.slice(U.length),re}}function K(){H(r)}function ne(X){var re;for(X=X||[];re=M();)re!==!1&&X.push(re);return X}function M(){var X=F();if(!(p!=S.charAt(0)||x!=S.charAt(1))){for(var re=2;m!=S.charAt(re)&&(x!=S.charAt(re)||p!=S.charAt(re+1));)++re;if(re+=2,m===S.charAt(re-1))return N("End of comment missing");var U=S.slice(2,re-2);return I+=2,A(U),S=S.slice(re),I+=2,X({type:v,comment:U})}}function Z(){var X=F(),re=H(i);if(re){if(M(),!H(l))return N("property missing ':'");var U=H(a),pe=X({type:w,property:k(re[0].replace(e,m)),value:U?k(U[0].replace(e,m)):m});return H(u),pe}}function le(){var X=[];ne(X);for(var re;re=Z();)re!==!1&&(X.push(re),ne(X));return X}return K(),le()};function k(S){return S?S.replace(d,m):m}return Oc}var Ng;function r$(){if(Ng)return Oo;Ng=1;var e=Oo&&Oo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=r;var t=e(n$());function r(i,l){var a=null;if(!i||typeof i!="string")return a;var u=(0,t.default)(i),d=typeof l=="function";return u.forEach(function(f){if(f.type==="declaration"){var p=f.property,x=f.value;d?l(p,x,f):x&&(a=a||{},a[p]=x)}}),a}return Oo}var Xi={},Ag;function o$(){if(Ag)return Xi;Ag=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(p){return!p||r.test(p)||e.test(p)},u=function(p,x){return x.toUpperCase()},d=function(p,x){return"".concat(x,"-")},f=function(p,x){return x===void 0&&(x={}),a(p)?p:(p=p.toLowerCase(),x.reactCompat?p=p.replace(l,d):p=p.replace(i,d),p.replace(t,u))};return Xi.camelCase=f,Xi}var Zi,Lg;function i$(){if(Lg)return Zi;Lg=1;var e=Zi&&Zi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(r$()),r=o$();function i(l,a){var u={};return!l||typeof l!="string"||(0,t.default)(l,function(d,f){d&&f&&(u[(0,r.camelCase)(d,a)]=f)}),u}return i.default=i,Zi=i,Zi}var l$=i$();const s$=Ud(l$),P0=N0("end"),gf=N0("start");function N0(e){return t;function t(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function a$(e){const t=gf(e),r=P0(e);if(t&&r)return{start:t,end:r}}function ll(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zg(e.position):"start"in e||"end"in e?zg(e):"line"in e||"column"in e?Td(e):""}function Td(e){return Fg(e&&e.line)+":"+Fg(e&&e.column)}function zg(e){return Td(e&&e.start)+"-"+Td(e&&e.end)}function Fg(e){return e&&typeof e=="number"?e:1}class Ft extends Error{constructor(t,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let l="",a={},u=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?l=t:!a.cause&&t&&(u=!0,l=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const d=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file,this.message=l,this.line=d?d.line:void 0,this.name=ll(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ft.prototype.file="";Ft.prototype.name="";Ft.prototype.reason="";Ft.prototype.message="";Ft.prototype.stack="";Ft.prototype.column=void 0;Ft.prototype.line=void 0;Ft.prototype.ancestors=void 0;Ft.prototype.cause=void 0;Ft.prototype.fatal=void 0;Ft.prototype.place=void 0;Ft.prototype.ruleId=void 0;Ft.prototype.source=void 0;const xf={}.hasOwnProperty,u$=new Map,c$=/[A-Z]/g,d$=new Set(["table","tbody","thead","tfoot","tr"]),f$=new Set(["td","th"]),A0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function p$(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=k$(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=w$(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?mf:e$,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=L0(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function L0(e,t,r){if(t.type==="element")return h$(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return m$(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return x$(e,t,r);if(t.type==="mdxjsEsm")return g$(e,t);if(t.type==="root")return y$(e,t,r);if(t.type==="text")return v$(e,t)}function h$(e,t,r){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=mf,e.schema=l),e.ancestors.push(t);const a=F0(e,t.tagName,!1),u=b$(e,t);let d=vf(e,t);return d$.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!HT(f):!0})),z0(e,u,a,t),yf(u,d),e.ancestors.pop(),e.schema=i,e.create(t,a,u,r)}function m$(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}dl(e,t.position)}function g$(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);dl(e,t.position)}function x$(e,t,r){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=mf,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:F0(e,t.name,!0),u=S$(e,t),d=vf(e,t);return z0(e,u,a,t),yf(u,d),e.ancestors.pop(),e.schema=i,e.create(t,a,u,r)}function y$(e,t,r){const i={};return yf(i,vf(e,t)),e.create(t,e.Fragment,i,r)}function v$(e,t){return t.value}function z0(e,t,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=i)}function yf(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function w$(e,t,r){return i;function i(l,a,u,d){const p=Array.isArray(u.children)?r:t;return d?p(a,u,d):p(a,u)}}function k$(e,t){return r;function r(i,l,a,u){const d=Array.isArray(a.children),f=gf(i);return t(l,a,u,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function b$(e,t){const r={};let i,l;for(l in t.properties)if(l!=="children"&&xf.call(t.properties,l)){const a=C$(e,l,t.properties[l]);if(a){const[u,d]=a;e.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&f$.has(t.tagName)?i=d:r[u]=d}}if(i){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function S$(e,t){const r={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const u=a.expression;u.type;const d=u.properties[0];d.type,Object.assign(r,e.evaluater.evaluateExpression(d.argument))}else dl(e,t.position);else{const l=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,a=e.evaluater.evaluateExpression(d.expression)}else dl(e,t.position);else a=i.value===null?!0:i.value;r[l]=a}return r}function vf(e,t){const r=[];let i=-1;const l=e.passKeys?new Map:u$;for(;++i<t.children.length;){const a=t.children[i];let u;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const p=l.get(f)||0;u=f+"-"+p,l.set(f,p+1)}}const d=L0(e,a,u);d!==void 0&&r.push(d)}return r}function C$(e,t,r){const i=YT(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?MT(r):t$(r)),i.property==="style"){let l=typeof r=="object"?r:E$(e,String(r));return e.stylePropertyNameCase==="css"&&(l=j$(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?JT[i.property]||i.property:i.attribute,r]}}function E$(e,t){try{return s$(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new Ft("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=A0+"#cannot-parse-style-attribute",l}}function F0(e,t,r){let i;if(!r)i={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let a=-1,u;for(;++a<l.length;){const d=Tg(l[a])?{type:"Identifier",name:l[a]}:{type:"Literal",value:l[a]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(a&&d.type==="Literal"),optional:!1}:d}i=u}else i=Tg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return xf.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);dl(e)}function dl(e,t){const r=new Ft("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=A0+"#cannot-handle-mdx-estrees-without-createevaluater",r}function j$(e){const t={};let r;for(r in e)xf.call(e,r)&&(t[T$(r)]=e[r]);return t}function T$(e){let t=e.replace(c$,$$);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function $$(e){return"-"+e.toLowerCase()}const Mc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},R$={};function wf(e,t){const r=R$,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return _0(e,i,l)}function _0(e,t,r){if(I$(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _g(e.children,t,r)}return Array.isArray(e)?_g(e,t,r):""}function _g(e,t,r){const i=[];let l=-1;for(;++l<e.length;)i[l]=_0(e[l],t,r);return i.join("")}function I$(e){return!!(e&&typeof e=="object")}const Og=document.createElement("i");function kf(e){const t="&"+e+";";Og.innerHTML=t;const r=Og.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function un(e,t,r,i){const l=e.length;let a=0,u;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,i.length<1e4)u=Array.from(i),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);a<i.length;)u=i.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function vn(e,t){return e.length>0?(un(e,e.length,0,t),e):t}const Mg={}.hasOwnProperty;function O0(e){const t={};let r=-1;for(;++r<e.length;)P$(t,e[r]);return t}function P$(e,t){let r;for(r in t){const l=(Mg.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let u;if(a)for(u in a){Mg.call(l,u)||(l[u]=[]);const d=a[u];N$(l[u],Array.isArray(d)?d:d?[d]:[])}}}function N$(e,t){let r=-1;const i=[];for(;++r<t.length;)(t[r].add==="after"?e:i).push(t[r]);un(e,0,0,i)}function M0(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Pn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dt=Pr(/[A-Za-z]/),zt=Pr(/[\dA-Za-z]/),A$=Pr(/[#-'*+\--9=?A-Z^-~]/);function da(e){return e!==null&&(e<32||e===127)}const $d=Pr(/\d/),L$=Pr(/[\dA-Fa-f]/),z$=Pr(/[!-/:-@[-`{-~]/);function je(e){return e!==null&&e<-2}function Je(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const Na=Pr(new RegExp("\\p{P}|\\p{S}","u")),io=Pr(/\s/);function Pr(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function si(e){const t=[];let r=-1,i=0,l=0;for(;++r<e.length;){const a=e.charCodeAt(r);let u="";if(a===37&&zt(e.charCodeAt(r+1))&&zt(e.charCodeAt(r+2)))l=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const d=e.charCodeAt(r+1);a<56320&&d>56319&&d<57344?(u=String.fromCharCode(a,d),l=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(i,r),encodeURIComponent(u)),i=r+l+1,u=""),l&&(r+=l,l=0)}return t.join("")+e.slice(i)}function Me(e,t,r,i){const l=i?i-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(f){return _e(f)?(e.enter(r),d(f)):t(f)}function d(f){return _e(f)&&a++<l?(e.consume(f),d):(e.exit(r),t(f))}}const F$={tokenize:_$};function _$(e){const t=e.attempt(this.parser.constructs.contentInitial,i,l);let r;return t;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Me(e,t,"linePrefix")}function l(d){return e.enter("paragraph"),a(d)}function a(d){const f=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=f),r=f,u(d)}function u(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return je(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),u)}}const O$={tokenize:M$},Dg={tokenize:D$};function M$(e){const t=this,r=[];let i=0,l,a,u;return d;function d(A){if(i<r.length){const F=r[i];return t.containerState=F[1],e.attempt(F[0].continuation,f,p)(A)}return p(A)}function f(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&I();const F=t.events.length;let O=F,N;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){N=t.events[O][1].end;break}E(i);let H=F;for(;H<t.events.length;)t.events[H][1].end={...N},H++;return un(t.events,O+1,0,t.events.slice(F)),t.events.length=H,p(A)}return d(A)}function p(A){if(i===r.length){if(!l)return v(A);if(l.currentConstruct&&l.currentConstruct.concrete)return k(A);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dg,x,m)(A)}function x(A){return l&&I(),E(i),v(A)}function m(A){return t.parser.lazy[t.now().line]=i!==r.length,u=t.now().offset,k(A)}function v(A){return t.containerState={},e.attempt(Dg,w,k)(A)}function w(A){return i++,r.push([t.currentConstruct,t.containerState]),v(A)}function k(A){if(A===null){l&&I(),E(0),e.consume(A);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:a}),S(A)}function S(A){if(A===null){j(e.exit("chunkFlow"),!0),E(0),e.consume(A);return}return je(A)?(e.consume(A),j(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(A),S)}function j(A,F){const O=t.sliceStream(A);if(F&&O.push(null),A.previous=a,a&&(a.next=A),a=A,l.defineSkip(A.start),l.write(O),t.parser.lazy[A.start.line]){let N=l.events.length;for(;N--;)if(l.events[N][1].start.offset<u&&(!l.events[N][1].end||l.events[N][1].end.offset>u))return;const H=t.events.length;let K=H,ne,M;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(ne){M=t.events[K][1].end;break}ne=!0}for(E(i),N=H;N<t.events.length;)t.events[N][1].end={...M},N++;un(t.events,K+1,0,t.events.slice(H)),t.events.length=N}}function E(A){let F=r.length;for(;F-- >A;){const O=r[F];t.containerState=O[1],O[0].exit.call(t,e)}r.length=A}function I(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function D$(e,t,r){return Me(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zo(e){if(e===null||Je(e)||io(e))return 1;if(Na(e))return 2}function Aa(e,t,r){const i=[];let l=-1;for(;++l<e.length;){const a=e[l].resolveAll;a&&!i.includes(a)&&(t=a(t,r),i.push(a))}return t}const Rd={name:"attention",resolveAll:B$,tokenize:U$};function B$(e,t){let r=-1,i,l,a,u,d,f,p,x;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const m={...e[i][1].end},v={...e[r][1].start};Bg(m,-f),Bg(v,f),u={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:v},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},l={type:f>1?"strong":"emphasis",start:{...u.start},end:{...d.end}},e[i][1].end={...u.start},e[r][1].start={...d.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=vn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=vn(p,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",a,t]]),p=vn(p,Aa(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),p=vn(p,[["exit",a,t],["enter",d,t],["exit",d,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(x=2,p=vn(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):x=0,un(e,i-1,r-i+3,p),r=i+p.length-x-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function U$(e,t){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=Zo(i);let a;return u;function u(f){return a=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===a)return e.consume(f),d;const p=e.exit("attentionSequence"),x=Zo(f),m=!x||x===2&&l||r.includes(f),v=!l||l===2&&x||r.includes(i);return p._open=!!(a===42?m:m&&(l||!v)),p._close=!!(a===42?v:v&&(x||!m)),t(f)}}function Bg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const V$={name:"autolink",tokenize:H$};function H$(e,t,r){let i=0;return l;function l(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(w){return Dt(w)?(e.consume(w),u):w===64?r(w):p(w)}function u(w){return w===43||w===45||w===46||zt(w)?(i=1,d(w)):p(w)}function d(w){return w===58?(e.consume(w),i=0,f):(w===43||w===45||w===46||zt(w))&&i++<32?(e.consume(w),d):(i=0,p(w))}function f(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||da(w)?r(w):(e.consume(w),f)}function p(w){return w===64?(e.consume(w),x):A$(w)?(e.consume(w),p):r(w)}function x(w){return zt(w)?m(w):r(w)}function m(w){return w===46?(e.consume(w),i=0,x):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):v(w)}function v(w){if((w===45||zt(w))&&i++<63){const k=w===45?v:m;return e.consume(w),k}return r(w)}}const kl={partial:!0,tokenize:W$};function W$(e,t,r){return i;function i(a){return _e(a)?Me(e,l,"linePrefix")(a):l(a)}function l(a){return a===null||je(a)?t(a):r(a)}}const D0={continuation:{tokenize:G$},exit:J$,name:"blockQuote",tokenize:q$};function q$(e,t,r){const i=this;return l;function l(u){if(u===62){const d=i.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return r(u)}function a(u){return _e(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function G$(e,t,r){const i=this;return l;function l(u){return _e(u)?Me(e,a,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(D0,t,r)(u)}}function J$(e){e.exit("blockQuote")}const B0={name:"characterEscape",tokenize:K$};function K$(e,t,r){return i;function i(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),l}function l(a){return z$(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const U0={name:"characterReference",tokenize:Q$};function Q$(e,t,r){const i=this;let l=0,a,u;return d;function d(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,u=zt,x(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=L$,x):(e.enter("characterReferenceValue"),a=7,u=$d,x(m))}function x(m){if(m===59&&l){const v=e.exit("characterReferenceValue");return u===zt&&!kf(i.sliceSerialize(v))?r(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&l++<a?(e.consume(m),x):r(m)}}const Ug={partial:!0,tokenize:X$},Vg={concrete:!0,name:"codeFenced",tokenize:Y$};function Y$(e,t,r){const i=this,l={partial:!0,tokenize:O};let a=0,u=0,d;return f;function f(N){return p(N)}function p(N){const H=i.events[i.events.length-1];return a=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,d=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),x(N)}function x(N){return N===d?(u++,e.consume(N),x):u<3?r(N):(e.exit("codeFencedFenceSequence"),_e(N)?Me(e,m,"whitespace")(N):m(N))}function m(N){return N===null||je(N)?(e.exit("codeFencedFence"),i.interrupt?t(N):e.check(Ug,S,F)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===null||je(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):_e(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,w,"whitespace")(N)):N===96&&N===d?r(N):(e.consume(N),v)}function w(N){return N===null||je(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(N))}function k(N){return N===null||je(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===d?r(N):(e.consume(N),k)}function S(N){return e.attempt(l,F,j)(N)}function j(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),E}function E(N){return a>0&&_e(N)?Me(e,I,"linePrefix",a+1)(N):I(N)}function I(N){return N===null||je(N)?e.check(Ug,S,F)(N):(e.enter("codeFlowValue"),A(N))}function A(N){return N===null||je(N)?(e.exit("codeFlowValue"),I(N)):(e.consume(N),A)}function F(N){return e.exit("codeFenced"),t(N)}function O(N,H,K){let ne=0;return M;function M(U){return N.enter("lineEnding"),N.consume(U),N.exit("lineEnding"),Z}function Z(U){return N.enter("codeFencedFence"),_e(U)?Me(N,le,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):le(U)}function le(U){return U===d?(N.enter("codeFencedFenceSequence"),X(U)):K(U)}function X(U){return U===d?(ne++,N.consume(U),X):ne>=u?(N.exit("codeFencedFenceSequence"),_e(U)?Me(N,re,"whitespace")(U):re(U)):K(U)}function re(U){return U===null||je(U)?(N.exit("codeFencedFence"),H(U)):K(U)}}}function X$(e,t,r){const i=this;return l;function l(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return i.parser.lazy[i.now().line]?r(u):t(u)}}const Dc={name:"codeIndented",tokenize:eR},Z$={partial:!0,tokenize:tR};function eR(e,t,r){const i=this;return l;function l(p){return e.enter("codeIndented"),Me(e,a,"linePrefix",5)(p)}function a(p){const x=i.events[i.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?u(p):r(p)}function u(p){return p===null?f(p):je(p)?e.attempt(Z$,u,f)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||je(p)?(e.exit("codeFlowValue"),u(p)):(e.consume(p),d)}function f(p){return e.exit("codeIndented"),t(p)}}function tR(e,t,r){const i=this;return l;function l(u){return i.parser.lazy[i.now().line]?r(u):je(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):Me(e,a,"linePrefix",5)(u)}function a(u){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):je(u)?l(u):r(u)}}const nR={name:"codeText",previous:oR,resolve:rR,tokenize:iR};function rR(e){let t=e.length-4,r=3,i,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=r;++i<t;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(i=r-1,t++;++i<=t;)l===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(l=i):(i===t||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),t-=i-l-2,i=l+2),l=void 0);return e}function oR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iR(e,t,r){let i=0,l,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),d(m)}function d(m){return m===96?(e.consume(m),i++,d):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?r(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(a=e.enter("codeTextSequence"),l=0,x(m)):je(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||je(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),p)}function x(m){return m===96?(e.consume(m),l++,x):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",p(m))}}class lR{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,r,i){const l=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&el(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),el(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),el(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);el(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);el(this.left,r.reverse())}}}function el(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function V0(e){const t={};let r=-1,i,l,a,u,d,f,p;const x=new lR(e);for(;++r<x.length;){for(;r in t;)r=t[r];if(i=x.get(r),r&&i[1].type==="chunkFlow"&&x.get(r-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,sR(x,r)),r=t[r],p=!0);else if(i[1]._container){for(a=r,l=void 0;a--;)if(u=x.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(x.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(i[1].end={...x.get(l)[1].start},d=x.slice(l,r),d.unshift(i),x.splice(l,r-l+1,d))}}return un(e,0,Number.POSITIVE_INFINITY,x.slice(0)),!p}function sR(e,t){const r=e.get(t)[1],i=e.get(t)[2];let l=t-1;const a=[];let u=r._tokenizer;u||(u=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,f=[],p={};let x,m,v=-1,w=r,k=0,S=0;const j=[S];for(;w;){for(;e.get(++l)[1]!==w;);a.push(l),w._tokenizer||(x=i.sliceStream(w),w.next||x.push(null),m&&u.defineSkip(w.start),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(x),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=w,w=w.next}for(w=r;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(S=v+1,j.push(S),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(u.events=[],w?(w._tokenizer=void 0,w.previous=void 0):j.pop(),v=j.length;v--;){const E=d.slice(j[v],j[v+1]),I=a.pop();f.push([I,I+E.length-1]),e.splice(I,2,E)}for(f.reverse(),v=-1;++v<f.length;)p[k+f[v][0]]=k+f[v][1],k+=f[v][1]-f[v][0]-1;return p}const aR={resolve:cR,tokenize:dR},uR={partial:!0,tokenize:fR};function cR(e){return V0(e),e}function dR(e,t){let r;return i;function i(d){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(d)}function l(d){return d===null?a(d):je(d)?e.check(uR,u,a)(d):(e.consume(d),l)}function a(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function u(d){return e.consume(d),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function fR(e,t,r){const i=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Me(e,a,"linePrefix")}function a(u){if(u===null||je(u))return r(u);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):e.interrupt(i.parser.constructs.flow,r,t)(u)}}function H0(e,t,r,i,l,a,u,d,f){const p=f||Number.POSITIVE_INFINITY;let x=0;return m;function m(E){return E===60?(e.enter(i),e.enter(l),e.enter(a),e.consume(E),e.exit(a),v):E===null||E===32||E===41||da(E)?r(E):(e.enter(i),e.enter(u),e.enter(d),e.enter("chunkString",{contentType:"string"}),S(E))}function v(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(l),e.exit(i),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),w(E))}function w(E){return E===62?(e.exit("chunkString"),e.exit(d),v(E)):E===null||E===60||je(E)?r(E):(e.consume(E),E===92?k:w)}function k(E){return E===60||E===62||E===92?(e.consume(E),w):w(E)}function S(E){return!x&&(E===null||E===41||Je(E))?(e.exit("chunkString"),e.exit(d),e.exit(u),e.exit(i),t(E)):x<p&&E===40?(e.consume(E),x++,S):E===41?(e.consume(E),x--,S):E===null||E===32||E===40||da(E)?r(E):(e.consume(E),E===92?j:S)}function j(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function W0(e,t,r,i,l,a){const u=this;let d=0,f;return p;function p(w){return e.enter(i),e.enter(l),e.consume(w),e.exit(l),e.enter(a),x}function x(w){return d>999||w===null||w===91||w===93&&!f||w===94&&!d&&"_hiddenFootnoteSupport"in u.parser.constructs?r(w):w===93?(e.exit(a),e.enter(l),e.consume(w),e.exit(l),e.exit(i),t):je(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||w===91||w===93||je(w)||d++>999?(e.exit("chunkString"),x(w)):(e.consume(w),f||(f=!_e(w)),w===92?v:m)}function v(w){return w===91||w===92||w===93?(e.consume(w),d++,m):m(w)}}function q0(e,t,r,i,l,a){let u;return d;function d(v){return v===34||v===39||v===40?(e.enter(i),e.enter(l),e.consume(v),e.exit(l),u=v===40?41:v,f):r(v)}function f(v){return v===u?(e.enter(l),e.consume(v),e.exit(l),e.exit(i),t):(e.enter(a),p(v))}function p(v){return v===u?(e.exit(a),f(u)):v===null?r(v):je(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Me(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===u||v===null||je(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?m:x)}function m(v){return v===u||v===92?(e.consume(v),x):x(v)}}function sl(e,t){let r;return i;function i(l){return je(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,i):_e(l)?Me(e,i,r?"linePrefix":"lineSuffix")(l):t(l)}}const pR={name:"definition",tokenize:mR},hR={partial:!0,tokenize:gR};function mR(e,t,r){const i=this;let l;return a;function a(w){return e.enter("definition"),u(w)}function u(w){return W0.call(i,e,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function d(w){return l=Pn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),f):r(w)}function f(w){return Je(w)?sl(e,p)(w):p(w)}function p(w){return H0(e,x,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function x(w){return e.attempt(hR,m,m)(w)}function m(w){return _e(w)?Me(e,v,"whitespace")(w):v(w)}function v(w){return w===null||je(w)?(e.exit("definition"),i.parser.defined.push(l),t(w)):r(w)}}function gR(e,t,r){return i;function i(d){return Je(d)?sl(e,l)(d):r(d)}function l(d){return q0(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return _e(d)?Me(e,u,"whitespace")(d):u(d)}function u(d){return d===null||je(d)?t(d):r(d)}}const xR={name:"hardBreakEscape",tokenize:yR};function yR(e,t,r){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),l}function l(a){return je(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const vR={name:"headingAtx",resolve:wR,tokenize:kR};function wR(e,t){let r=e.length-2,i=3,l,a;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},a={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},un(e,i,r-i+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function kR(e,t,r){let i=0;return l;function l(x){return e.enter("atxHeading"),a(x)}function a(x){return e.enter("atxHeadingSequence"),u(x)}function u(x){return x===35&&i++<6?(e.consume(x),u):x===null||Je(x)?(e.exit("atxHeadingSequence"),d(x)):r(x)}function d(x){return x===35?(e.enter("atxHeadingSequence"),f(x)):x===null||je(x)?(e.exit("atxHeading"),t(x)):_e(x)?Me(e,d,"whitespace")(x):(e.enter("atxHeadingText"),p(x))}function f(x){return x===35?(e.consume(x),f):(e.exit("atxHeadingSequence"),d(x))}function p(x){return x===null||x===35||Je(x)?(e.exit("atxHeadingText"),d(x)):(e.consume(x),p)}}const bR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Hg=["pre","script","style","textarea"],SR={concrete:!0,name:"htmlFlow",resolveTo:jR,tokenize:TR},CR={partial:!0,tokenize:RR},ER={partial:!0,tokenize:$R};function jR(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function TR(e,t,r){const i=this;let l,a,u,d,f;return p;function p(R){return x(R)}function x(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),v):R===47?(e.consume(R),a=!0,S):R===63?(e.consume(R),l=3,i.interrupt?t:T):Dt(R)?(e.consume(R),u=String.fromCharCode(R),j):r(R)}function v(R){return R===45?(e.consume(R),l=2,w):R===91?(e.consume(R),l=5,d=0,k):Dt(R)?(e.consume(R),l=4,i.interrupt?t:T):r(R)}function w(R){return R===45?(e.consume(R),i.interrupt?t:T):r(R)}function k(R){const ce="CDATA[";return R===ce.charCodeAt(d++)?(e.consume(R),d===ce.length?i.interrupt?t:le:k):r(R)}function S(R){return Dt(R)?(e.consume(R),u=String.fromCharCode(R),j):r(R)}function j(R){if(R===null||R===47||R===62||Je(R)){const ce=R===47,ye=u.toLowerCase();return!ce&&!a&&Hg.includes(ye)?(l=1,i.interrupt?t(R):le(R)):bR.includes(u.toLowerCase())?(l=6,ce?(e.consume(R),E):i.interrupt?t(R):le(R)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(R):a?I(R):A(R))}return R===45||zt(R)?(e.consume(R),u+=String.fromCharCode(R),j):r(R)}function E(R){return R===62?(e.consume(R),i.interrupt?t:le):r(R)}function I(R){return _e(R)?(e.consume(R),I):M(R)}function A(R){return R===47?(e.consume(R),M):R===58||R===95||Dt(R)?(e.consume(R),F):_e(R)?(e.consume(R),A):M(R)}function F(R){return R===45||R===46||R===58||R===95||zt(R)?(e.consume(R),F):O(R)}function O(R){return R===61?(e.consume(R),N):_e(R)?(e.consume(R),O):A(R)}function N(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),f=R,H):_e(R)?(e.consume(R),N):K(R)}function H(R){return R===f?(e.consume(R),f=null,ne):R===null||je(R)?r(R):(e.consume(R),H)}function K(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Je(R)?O(R):(e.consume(R),K)}function ne(R){return R===47||R===62||_e(R)?A(R):r(R)}function M(R){return R===62?(e.consume(R),Z):r(R)}function Z(R){return R===null||je(R)?le(R):_e(R)?(e.consume(R),Z):r(R)}function le(R){return R===45&&l===2?(e.consume(R),pe):R===60&&l===1?(e.consume(R),ae):R===62&&l===4?(e.consume(R),z):R===63&&l===3?(e.consume(R),T):R===93&&l===5?(e.consume(R),de):je(R)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(CR,q,X)(R)):R===null||je(R)?(e.exit("htmlFlowData"),X(R)):(e.consume(R),le)}function X(R){return e.check(ER,re,q)(R)}function re(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),U}function U(R){return R===null||je(R)?X(R):(e.enter("htmlFlowData"),le(R))}function pe(R){return R===45?(e.consume(R),T):le(R)}function ae(R){return R===47?(e.consume(R),u="",Q):le(R)}function Q(R){if(R===62){const ce=u.toLowerCase();return Hg.includes(ce)?(e.consume(R),z):le(R)}return Dt(R)&&u.length<8?(e.consume(R),u+=String.fromCharCode(R),Q):le(R)}function de(R){return R===93?(e.consume(R),T):le(R)}function T(R){return R===62?(e.consume(R),z):R===45&&l===2?(e.consume(R),T):le(R)}function z(R){return R===null||je(R)?(e.exit("htmlFlowData"),q(R)):(e.consume(R),z)}function q(R){return e.exit("htmlFlow"),t(R)}}function $R(e,t,r){const i=this;return l;function l(u){return je(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):r(u)}function a(u){return i.parser.lazy[i.now().line]?r(u):t(u)}}function RR(e,t,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(kl,t,r)}}const IR={name:"htmlText",tokenize:PR};function PR(e,t,r){const i=this;let l,a,u;return d;function d(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),O):T===63?(e.consume(T),A):Dt(T)?(e.consume(T),K):r(T)}function p(T){return T===45?(e.consume(T),x):T===91?(e.consume(T),a=0,k):Dt(T)?(e.consume(T),I):r(T)}function x(T){return T===45?(e.consume(T),w):r(T)}function m(T){return T===null?r(T):T===45?(e.consume(T),v):je(T)?(u=m,ae(T)):(e.consume(T),m)}function v(T){return T===45?(e.consume(T),w):m(T)}function w(T){return T===62?pe(T):T===45?v(T):m(T)}function k(T){const z="CDATA[";return T===z.charCodeAt(a++)?(e.consume(T),a===z.length?S:k):r(T)}function S(T){return T===null?r(T):T===93?(e.consume(T),j):je(T)?(u=S,ae(T)):(e.consume(T),S)}function j(T){return T===93?(e.consume(T),E):S(T)}function E(T){return T===62?pe(T):T===93?(e.consume(T),E):S(T)}function I(T){return T===null||T===62?pe(T):je(T)?(u=I,ae(T)):(e.consume(T),I)}function A(T){return T===null?r(T):T===63?(e.consume(T),F):je(T)?(u=A,ae(T)):(e.consume(T),A)}function F(T){return T===62?pe(T):A(T)}function O(T){return Dt(T)?(e.consume(T),N):r(T)}function N(T){return T===45||zt(T)?(e.consume(T),N):H(T)}function H(T){return je(T)?(u=H,ae(T)):_e(T)?(e.consume(T),H):pe(T)}function K(T){return T===45||zt(T)?(e.consume(T),K):T===47||T===62||Je(T)?ne(T):r(T)}function ne(T){return T===47?(e.consume(T),pe):T===58||T===95||Dt(T)?(e.consume(T),M):je(T)?(u=ne,ae(T)):_e(T)?(e.consume(T),ne):pe(T)}function M(T){return T===45||T===46||T===58||T===95||zt(T)?(e.consume(T),M):Z(T)}function Z(T){return T===61?(e.consume(T),le):je(T)?(u=Z,ae(T)):_e(T)?(e.consume(T),Z):ne(T)}function le(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),l=T,X):je(T)?(u=le,ae(T)):_e(T)?(e.consume(T),le):(e.consume(T),re)}function X(T){return T===l?(e.consume(T),l=void 0,U):T===null?r(T):je(T)?(u=X,ae(T)):(e.consume(T),X)}function re(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Je(T)?ne(T):(e.consume(T),re)}function U(T){return T===47||T===62||Je(T)?ne(T):r(T)}function pe(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function ae(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return _e(T)?Me(e,de,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):de(T)}function de(T){return e.enter("htmlTextData"),u(T)}}const bf={name:"labelEnd",resolveAll:zR,resolveTo:FR,tokenize:_R},NR={tokenize:OR},AR={tokenize:MR},LR={tokenize:DR};function zR(e){let t=-1;const r=[];for(;++t<e.length;){const i=e[t][1];if(r.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",t+=l}}return e.length!==r.length&&un(e,0,e.length,r),e}function FR(e,t){let r=e.length,i=0,l,a,u,d;for(;r--;)if(l=e[r][1],a){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(a=r,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(u=r);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[a][1].start},end:{...e[u][1].end}},x={type:"labelText",start:{...e[a+i+2][1].end},end:{...e[u-2][1].start}};return d=[["enter",f,t],["enter",p,t]],d=vn(d,e.slice(a+1,a+i+3)),d=vn(d,[["enter",x,t]]),d=vn(d,Aa(t.parser.constructs.insideSpan.null,e.slice(a+i+4,u-3),t)),d=vn(d,[["exit",x,t],e[u-2],e[u-1],["exit",p,t]]),d=vn(d,e.slice(u+1)),d=vn(d,[["exit",f,t]]),un(e,a,e.length,d),e}function _R(e,t,r){const i=this;let l=i.events.length,a,u;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){a=i.events[l][1];break}return d;function d(v){return a?a._inactive?m(v):(u=i.parser.defined.includes(Pn(i.sliceSerialize({start:a.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):r(v)}function f(v){return v===40?e.attempt(NR,x,u?x:m)(v):v===91?e.attempt(AR,x,u?p:m)(v):u?x(v):m(v)}function p(v){return e.attempt(LR,x,m)(v)}function x(v){return t(v)}function m(v){return a._balanced=!0,r(v)}}function OR(e,t,r){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),l}function l(m){return Je(m)?sl(e,a)(m):a(m)}function a(m){return m===41?x(m):H0(e,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return Je(m)?sl(e,f)(m):x(m)}function d(m){return r(m)}function f(m){return m===34||m===39||m===40?q0(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):x(m)}function p(m){return Je(m)?sl(e,x)(m):x(m)}function x(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):r(m)}}function MR(e,t,r){const i=this;return l;function l(d){return W0.call(i,e,a,u,"reference","referenceMarker","referenceString")(d)}function a(d){return i.parser.defined.includes(Pn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):r(d)}function u(d){return r(d)}}function DR(e,t,r){return i;function i(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),l}function l(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const BR={name:"labelStartImage",resolveAll:bf.resolveAll,tokenize:UR};function UR(e,t,r){const i=this;return l;function l(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),a}function a(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),u):r(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):t(d)}}const VR={name:"labelStartLink",resolveAll:bf.resolveAll,tokenize:HR};function HR(e,t,r){const i=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):t(u)}}const Bc={name:"lineEnding",tokenize:WR};function WR(e,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const ta={name:"thematicBreak",tokenize:qR};function qR(e,t,r){let i=0,l;return a;function a(p){return e.enter("thematicBreak"),u(p)}function u(p){return l=p,d(p)}function d(p){return p===l?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||je(p))?(e.exit("thematicBreak"),t(p)):r(p)}function f(p){return p===l?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),_e(p)?Me(e,d,"whitespace")(p):d(p))}}const Jt={continuation:{tokenize:QR},exit:XR,name:"list",tokenize:KR},GR={partial:!0,tokenize:ZR},JR={partial:!0,tokenize:YR};function KR(e,t,r){const i=this,l=i.events[i.events.length-1];let a=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return d;function d(w){const k=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:$d(w)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(ta,r,p)(w):p(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(w)}return r(w)}function f(w){return $d(w)&&++u<10?(e.consume(w),f):(!i.interrupt||u<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),p(w)):r(w)}function p(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(kl,i.interrupt?r:x,e.attempt(GR,v,m))}function x(w){return i.containerState.initialBlankLine=!0,a++,v(w)}function m(w){return _e(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),v):r(w)}function v(w){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function QR(e,t,r){const i=this;return i.containerState._closeFlow=void 0,e.check(kl,l,a);function l(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Me(e,t,"listItemIndent",i.containerState.size+1)(d)}function a(d){return i.containerState.furtherBlankLines||!_e(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(JR,t,u)(d))}function u(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,Me(e,e.attempt(Jt,t,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function YR(e,t,r){const i=this;return Me(e,l,"listItemIndent",i.containerState.size+1);function l(a){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?t(a):r(a)}}function XR(e){e.exit(this.containerState.type)}function ZR(e,t,r){const i=this;return Me(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(a){const u=i.events[i.events.length-1];return!_e(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const Wg={name:"setextUnderline",resolveTo:eI,tokenize:tI};function eI(e,t){let r=e.length,i,l,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const u={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(e.splice(l,0,["enter",u,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=u,e.push(["exit",u,t]),e}function tI(e,t,r){const i=this;let l;return a;function a(p){let x=i.events.length,m;for(;x--;)if(i.events[x][1].type!=="lineEnding"&&i.events[x][1].type!=="linePrefix"&&i.events[x][1].type!=="content"){m=i.events[x][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),l=p,u(p)):r(p)}function u(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===l?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),_e(p)?Me(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||je(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}const nI={tokenize:rI};function rI(e){const t=this,r=e.attempt(kl,i,e.attempt(this.parser.constructs.flowInitial,l,Me(e,e.attempt(this.parser.constructs.flow,l,e.attempt(aR,l)),"linePrefix")));return r;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const oI={resolveAll:J0()},iI=G0("string"),lI=G0("text");function G0(e){return{resolveAll:J0(e==="text"?sI:void 0),tokenize:t};function t(r){const i=this,l=this.parser.constructs[e],a=r.attempt(l,u,d);return u;function u(x){return p(x)?a(x):d(x)}function d(x){if(x===null){r.consume(x);return}return r.enter("data"),r.consume(x),f}function f(x){return p(x)?(r.exit("data"),a(x)):(r.consume(x),f)}function p(x){if(x===null)return!0;const m=l[x];let v=-1;if(m)for(;++v<m.length;){const w=m[v];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function J0(e){return t;function t(r,i){let l=-1,a;for(;++l<=r.length;)a===void 0?r[l]&&r[l][1].type==="data"&&(a=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==a+2&&(r[a][1].end=r[l-1][1].end,r.splice(a+2,l-a-2),l=a+2),a=void 0);return e?e(r,i):r}}function sI(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=t.sliceStream(i);let a=l.length,u=-1,d=0,f;for(;a--;){const p=l[a];if(typeof p=="string"){for(u=p.length;p.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-1}else if(p===-2)f=!0,d++;else if(p!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(d=0),d){const p={type:r===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:i.start._bufferIndex+u,_index:i.start._index+a,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}const aI={42:Jt,43:Jt,45:Jt,48:Jt,49:Jt,50:Jt,51:Jt,52:Jt,53:Jt,54:Jt,55:Jt,56:Jt,57:Jt,62:D0},uI={91:pR},cI={[-2]:Dc,[-1]:Dc,32:Dc},dI={35:vR,42:ta,45:[Wg,ta],60:SR,61:Wg,95:ta,96:Vg,126:Vg},fI={38:U0,92:B0},pI={[-5]:Bc,[-4]:Bc,[-3]:Bc,33:BR,38:U0,42:Rd,60:[V$,IR],91:VR,92:[xR,B0],93:bf,95:Rd,96:nR},hI={null:[Rd,oI]},mI={null:[42,95]},gI={null:[]},xI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:mI,contentInitial:uI,disable:gI,document:aI,flow:dI,flowInitial:cI,insideSpan:hI,string:fI,text:pI},Symbol.toStringTag,{value:"Module"}));function yI(e,t,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},a=[];let u=[],d=[];const f={attempt:H(O),check:H(N),consume:I,enter:A,exit:F,interrupt:H(N,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:v,sliceStream:w,write:m};let x=t.tokenize.call(p,f);return t.resolveAll&&a.push(t),p;function m(Z){return u=vn(u,Z),j(),u[u.length-1]!==null?[]:(K(t,0),p.events=Aa(a,p.events,p),p.events)}function v(Z,le){return wI(w(Z),le)}function w(Z){return vI(u,Z)}function k(){const{_bufferIndex:Z,_index:le,line:X,column:re,offset:U}=i;return{_bufferIndex:Z,_index:le,line:X,column:re,offset:U}}function S(Z){l[Z.line]=Z.column,M()}function j(){let Z;for(;i._index<u.length;){const le=u[i._index];if(typeof le=="string")for(Z=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===Z&&i._bufferIndex<le.length;)E(le.charCodeAt(i._bufferIndex));else E(le)}}function E(Z){x=x(Z)}function I(Z){je(Z)?(i.line++,i.column=1,i.offset+=Z===-3?2:1,M()):Z!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=Z}function A(Z,le){const X=le||{};return X.type=Z,X.start=k(),p.events.push(["enter",X,p]),d.push(X),X}function F(Z){const le=d.pop();return le.end=k(),p.events.push(["exit",le,p]),le}function O(Z,le){K(Z,le.from)}function N(Z,le){le.restore()}function H(Z,le){return X;function X(re,U,pe){let ae,Q,de,T;return Array.isArray(re)?q(re):"tokenize"in re?q([re]):z(re);function z(ke){return he;function he(fe){const se=fe!==null&&ke[fe],ve=fe!==null&&ke.null,Le=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return q(Le)(fe)}}function q(ke){return ae=ke,Q=0,ke.length===0?pe:R(ke[Q])}function R(ke){return he;function he(fe){return T=ne(),de=ke,ke.partial||(p.currentConstruct=ke),ke.name&&p.parser.constructs.disable.null.includes(ke.name)?ye():ke.tokenize.call(le?Object.assign(Object.create(p),le):p,f,ce,ye)(fe)}}function ce(ke){return Z(de,T),U}function ye(ke){return T.restore(),++Q<ae.length?R(ae[Q]):pe}}}function K(Z,le){Z.resolveAll&&!a.includes(Z)&&a.push(Z),Z.resolve&&un(p.events,le,p.events.length-le,Z.resolve(p.events.slice(le),p)),Z.resolveTo&&(p.events=Z.resolveTo(p.events,p))}function ne(){const Z=k(),le=p.previous,X=p.currentConstruct,re=p.events.length,U=Array.from(d);return{from:re,restore:pe};function pe(){i=Z,p.previous=le,p.currentConstruct=X,p.events.length=re,d=U,M()}}function M(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function vI(e,t){const r=t.start._index,i=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;let u;if(r===l)u=[e[r].slice(i,a)];else{if(u=e.slice(r,l),i>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(i):u.shift()}a>0&&u.push(e[l].slice(0,a))}return u}function wI(e,t){let r=-1;const i=[];let l;for(;++r<e.length;){const a=e[r];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
1369
- `;break}case-3:{u=`\r
1370
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&l)continue;u=" ";break}default:u=String.fromCharCode(a)}l=a===-2,i.push(u)}return i.join("")}function kI(e){const i={constructs:O0([xI,...(e||{}).extensions||[]]),content:l(F$),defined:[],document:l(O$),flow:l(nI),lazy:{},string:l(iI),text:l(lI)};return i;function l(a){return u;function u(d){return yI(i,a,d)}}}function bI(e){for(;!V0(e););return e}const qg=/[\0\t\n\r]/g;function SI(){let e=1,t="",r=!0,i;return l;function l(a,u,d){const f=[];let p,x,m,v,w;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",r&&(a.charCodeAt(0)===65279&&m++,r=void 0);m<a.length;){if(qg.lastIndex=m,p=qg.exec(a),v=p&&p.index!==void 0?p.index:a.length,w=a.charCodeAt(v),!p){t=a.slice(m);break}if(w===10&&m===v&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<v&&(f.push(a.slice(m,v)),e+=v-m),w){case 0:{f.push(65533),e++;break}case 9:{for(x=Math.ceil(e/4)*4,f.push(-2);e++<x;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=v+1}return d&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const CI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EI(e){return e.replace(CI,jI)}function jI(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),a=l===120||l===88;return M0(r.slice(a?2:1),a?16:10)}return kf(r)||e}const K0={}.hasOwnProperty;function TI(e,t,r){return typeof t!="string"&&(r=t,t=void 0),$I(r)(bI(kI(r).document().write(SI()(e,t,!0))))}function $I(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Fe),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:a(bt),blockQuote:a(ve),characterEscape:ne,characterReference:ne,codeFenced:a(Le),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Le,u),codeText:a(Ie,u),codeTextData:ne,data:ne,codeFlowValue:ne,definition:a(Ge),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a($t),hardBreakEscape:a(Bt),hardBreakTrailing:a(Bt),htmlFlow:a(qn,u),htmlFlowData:ne,htmlText:a(qn,u),htmlTextData:ne,image:a(co),label:u,link:a(Fe),listItem:a(_t),listItemValue:v,listOrdered:a(dt,m),listUnordered:a(dt),paragraph:a(ft),reference:R,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(bt),strong:a(De),thematicBreak:a(Rt)},exit:{atxHeading:f(),atxHeadingSequence:O,autolink:f(),autolinkEmail:se,autolinkProtocol:fe,blockQuote:f(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:ke,characterReference:he,codeFenced:f(j),codeFencedFence:S,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:M,codeIndented:f(E),codeText:f(U),codeTextData:M,data:M,definition:f(),definitionDestinationString:F,definitionLabelString:I,definitionTitleString:A,emphasis:f(),hardBreakEscape:f(le),hardBreakTrailing:f(le),htmlFlow:f(X),htmlFlowData:M,htmlText:f(re),htmlTextData:M,image:f(ae),label:de,labelText:Q,lineEnding:Z,link:f(pe),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ce,resourceDestinationString:T,resourceTitleString:z,resource:q,setextHeading:f(K),setextHeadingLineSequence:H,setextHeadingText:N,strong:f(),thematicBreak:f()}};Q0(t,(e||{}).mdastExtensions||[]);const r={};return i;function i(G){let te={type:"root",children:[]};const be={stack:[te],tokenStack:[],config:t,enter:d,exit:p,buffer:u,resume:x,data:r},Te=[];let Pe=-1;for(;++Pe<G.length;)if(G[Pe][1].type==="listOrdered"||G[Pe][1].type==="listUnordered")if(G[Pe][0]==="enter")Te.push(Pe);else{const St=Te.pop();Pe=l(G,St,Pe)}for(Pe=-1;++Pe<G.length;){const St=t[G[Pe][0]];K0.call(St,G[Pe][1].type)&&St[G[Pe][1].type].call(Object.assign({sliceSerialize:G[Pe][2].sliceSerialize},be),G[Pe][1])}if(be.tokenStack.length>0){const St=be.tokenStack[be.tokenStack.length-1];(St[1]||Gg).call(be,void 0,St[0])}for(te.position={start:jr(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:jr(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)te=t.transforms[Pe](te)||te;return te}function l(G,te,be){let Te=te-1,Pe=-1,St=!1,Gn,fn,ir,Ar;for(;++Te<=be;){const Ct=G[Te];switch(Ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ct[0]==="enter"?Pe++:Pe--,Ar=void 0;break}case"lineEndingBlank":{Ct[0]==="enter"&&(Gn&&!Ar&&!Pe&&!ir&&(ir=Te),Ar=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ar=void 0}if(!Pe&&Ct[0]==="enter"&&Ct[1].type==="listItemPrefix"||Pe===-1&&Ct[0]==="exit"&&(Ct[1].type==="listUnordered"||Ct[1].type==="listOrdered")){if(Gn){let Ln=Te;for(fn=void 0;Ln--;){const Zt=G[Ln];if(Zt[1].type==="lineEnding"||Zt[1].type==="lineEndingBlank"){if(Zt[0]==="exit")continue;fn&&(G[fn][1].type="lineEndingBlank",St=!0),Zt[1].type="lineEnding",fn=Ln}else if(!(Zt[1].type==="linePrefix"||Zt[1].type==="blockQuotePrefix"||Zt[1].type==="blockQuotePrefixWhitespace"||Zt[1].type==="blockQuoteMarker"||Zt[1].type==="listItemIndent"))break}ir&&(!fn||ir<fn)&&(Gn._spread=!0),Gn.end=Object.assign({},fn?G[fn][1].start:Ct[1].end),G.splice(fn||Te,0,["exit",Gn,Ct[2]]),Te++,be++}if(Ct[1].type==="listItemPrefix"){const Ln={type:"listItem",_spread:!1,start:Object.assign({},Ct[1].start),end:void 0};Gn=Ln,G.splice(Te,0,["enter",Ln,Ct[2]]),Te++,be++,ir=void 0,Ar=!0}}}return G[te][1]._spread=St,be}function a(G,te){return be;function be(Te){d.call(this,G(Te),Te),te&&te.call(this,Te)}}function u(){this.stack.push({type:"fragment",children:[]})}function d(G,te,be){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([te,be||void 0]),G.position={start:jr(te.start),end:void 0}}function f(G){return te;function te(be){G&&G.call(this,be),p.call(this,be)}}function p(G,te){const be=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==G.type&&(te?te.call(this,G,Te[0]):(Te[1]||Gg).call(this,G,Te[0]));else throw new Error("Cannot close `"+G.type+"` ("+ll({start:G.start,end:G.end})+"): it’s not open");be.position.end=jr(G.end)}function x(){return wf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(G){if(this.data.expectingFirstListItemValue){const te=this.stack[this.stack.length-2];te.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function w(){const G=this.resume(),te=this.stack[this.stack.length-1];te.lang=G}function k(){const G=this.resume(),te=this.stack[this.stack.length-1];te.meta=G}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const G=this.resume(),te=this.stack[this.stack.length-1];te.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const G=this.resume(),te=this.stack[this.stack.length-1];te.value=G.replace(/(\r?\n|\r)$/g,"")}function I(G){const te=this.resume(),be=this.stack[this.stack.length-1];be.label=te,be.identifier=Pn(this.sliceSerialize(G)).toLowerCase()}function A(){const G=this.resume(),te=this.stack[this.stack.length-1];te.title=G}function F(){const G=this.resume(),te=this.stack[this.stack.length-1];te.url=G}function O(G){const te=this.stack[this.stack.length-1];if(!te.depth){const be=this.sliceSerialize(G).length;te.depth=be}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function H(G){const te=this.stack[this.stack.length-1];te.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(G){const be=this.stack[this.stack.length-1].children;let Te=be[be.length-1];(!Te||Te.type!=="text")&&(Te=mt(),Te.position={start:jr(G.start),end:void 0},be.push(Te)),this.stack.push(Te)}function M(G){const te=this.stack.pop();te.value+=this.sliceSerialize(G),te.position.end=jr(G.end)}function Z(G){const te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=te.children[te.children.length-1];be.position.end=jr(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(te.type)&&(ne.call(this,G),M.call(this,G))}function le(){this.data.atHardBreak=!0}function X(){const G=this.resume(),te=this.stack[this.stack.length-1];te.value=G}function re(){const G=this.resume(),te=this.stack[this.stack.length-1];te.value=G}function U(){const G=this.resume(),te=this.stack[this.stack.length-1];te.value=G}function pe(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=te,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function ae(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=te,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function Q(G){const te=this.sliceSerialize(G),be=this.stack[this.stack.length-2];be.label=EI(te),be.identifier=Pn(te).toLowerCase()}function de(){const G=this.stack[this.stack.length-1],te=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Te=G.children;be.children=Te}else be.alt=te}function T(){const G=this.resume(),te=this.stack[this.stack.length-1];te.url=G}function z(){const G=this.resume(),te=this.stack[this.stack.length-1];te.title=G}function q(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function ce(G){const te=this.resume(),be=this.stack[this.stack.length-1];be.label=te,be.identifier=Pn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function ye(G){this.data.characterReferenceType=G.type}function ke(G){const te=this.sliceSerialize(G),be=this.data.characterReferenceType;let Te;be?(Te=M0(te,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=kf(te);const Pe=this.stack[this.stack.length-1];Pe.value+=Te}function he(G){const te=this.stack.pop();te.position.end=jr(G.end)}function fe(G){M.call(this,G);const te=this.stack[this.stack.length-1];te.url=this.sliceSerialize(G)}function se(G){M.call(this,G);const te=this.stack[this.stack.length-1];te.url="mailto:"+this.sliceSerialize(G)}function ve(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function Ie(){return{type:"inlineCode",value:""}}function Ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $t(){return{type:"emphasis",children:[]}}function bt(){return{type:"heading",depth:0,children:[]}}function Bt(){return{type:"break"}}function qn(){return{type:"html",value:""}}function co(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function dt(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function _t(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function ft(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function mt(){return{type:"text",value:""}}function Rt(){return{type:"thematicBreak"}}}function jr(e){return{line:e.line,column:e.column,offset:e.offset}}function Q0(e,t){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?Q0(e,i):RI(e,i)}}function RI(e,t){let r;for(r in t)if(K0.call(t,r))switch(r){case"canContainEols":{const i=t[r];i&&e[r].push(...i);break}case"transforms":{const i=t[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=t[r];i&&Object.assign(e[r],i);break}}}function Gg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ll({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ll({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ll({start:t.start,end:t.end})+") is still open")}function II(e){const t=this;t.parser=r;function r(i){return TI(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function PI(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function NI(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
1371
- `}]}function AI(e,t){const r=t.value?t.value+`
1372
- `:"",i={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(i.className=["language-"+l[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function LI(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zI(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FI(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=si(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let u,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),u=e.footnoteOrder.length):u=a+1,d+=1,e.footnoteCounts.set(i,d);const f={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function _I(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function OI(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Y0(e,t){const r=t.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const l=e.all(t),a=l[0];a&&a.type==="text"?a.value="["+a.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=i:l.push({type:"text",value:i}),l}function MI(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return Y0(e,t);const l={src:si(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,a),e.applyData(t,a)}function DI(e,t){const r={src:si(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function BI(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,i),e.applyData(t,i)}function UI(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return Y0(e,t);const l={href:si(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function VI(e,t){const r={href:si(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function HI(e,t,r){const i=e.all(t),l=r?WI(r):X0(t),a={},u=[];if(typeof t.checked=="boolean"){const x=i[0];let m;x&&x.type==="element"&&x.tagName==="p"?m=x:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const x=i[d];(l||d!==0||x.type!=="element"||x.tagName!=="p")&&u.push({type:"text",value:`
1373
- `}),x.type==="element"&&x.tagName==="p"&&!l?u.push(...x.children):u.push(x)}const f=i[i.length-1];f&&(l||f.type!=="element"||f.tagName!=="p")&&u.push({type:"text",value:`
1374
- `});const p={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,p),e.applyData(t,p)}function WI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let i=-1;for(;!t&&++i<r.length;)t=X0(r[i])}return t}function X0(e){const t=e.spread;return t??e.children.length>1}function qI(e,t){const r={},i=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<i.length;){const u=i[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function GI(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function JI(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function KI(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QI(e,t){const r=e.all(t),i=r.shift(),l=[];if(i){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],u),l.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},d=gf(t.children[1]),f=P0(t.children[t.children.length-1]);d&&f&&(u.position={start:d,end:f}),l.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,a),e.applyData(t,a)}function YI(e,t,r){const i=r?r.children:void 0,a=(i?i.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,d=u?u.length:t.children.length;let f=-1;const p=[];for(;++f<d;){const m=t.children[f],v={},w=u?u[f]:void 0;w&&(v.align=w);let k={type:"element",tagName:a,properties:v,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),p.push(k)}const x={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,x),e.applyData(t,x)}function XI(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Jg=9,Kg=32;function ZI(e){const t=String(e),r=/\r?\n|\r/g;let i=r.exec(t),l=0;const a=[];for(;i;)a.push(Qg(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=r.exec(t);return a.push(Qg(t.slice(l),l>0,!1)),a.join("")}function Qg(e,t,r){let i=0,l=e.length;if(t){let a=e.codePointAt(i);for(;a===Jg||a===Kg;)i++,a=e.codePointAt(i)}if(r){let a=e.codePointAt(l-1);for(;a===Jg||a===Kg;)l--,a=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function e4(e,t){const r={type:"text",value:ZI(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function t4(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const n4={blockquote:PI,break:NI,code:AI,delete:LI,emphasis:zI,footnoteReference:FI,heading:_I,html:OI,imageReference:MI,image:DI,inlineCode:BI,linkReference:UI,link:VI,listItem:HI,list:qI,paragraph:GI,root:JI,strong:KI,table:QI,tableCell:XI,tableRow:YI,text:e4,thematicBreak:t4,toml:Os,yaml:Os,definition:Os,footnoteDefinition:Os};function Os(){}const Z0=-1,La=0,fa=1,pa=2,Sf=3,Cf=4,Ef=5,jf=6,e1=7,t1=8,Yg=typeof self=="object"?self:globalThis,r4=(e,t)=>{const r=(l,a)=>(e.set(a,l),l),i=l=>{if(e.has(l))return e.get(l);const[a,u]=t[l];switch(a){case La:case Z0:return r(u,l);case fa:{const d=r([],l);for(const f of u)d.push(i(f));return d}case pa:{const d=r({},l);for(const[f,p]of u)d[i(f)]=i(p);return d}case Sf:return r(new Date(u),l);case Cf:{const{source:d,flags:f}=u;return r(new RegExp(d,f),l)}case Ef:{const d=r(new Map,l);for(const[f,p]of u)d.set(i(f),i(p));return d}case jf:{const d=r(new Set,l);for(const f of u)d.add(i(f));return d}case e1:{const{name:d,message:f}=u;return r(new Yg[d](f),l)}case t1:return r(BigInt(u),l);case"BigInt":return r(Object(BigInt(u)),l)}return r(new Yg[a](u),l)};return i},Xg=e=>r4(new Map,e)(0),Mo="",{toString:o4}={},{keys:i4}=Object,tl=e=>{const t=typeof e;if(t!=="object"||!e)return[La,t];const r=o4.call(e).slice(8,-1);switch(r){case"Array":return[fa,Mo];case"Object":return[pa,Mo];case"Date":return[Sf,Mo];case"RegExp":return[Cf,Mo];case"Map":return[Ef,Mo];case"Set":return[jf,Mo]}return r.includes("Array")?[fa,r]:r.includes("Error")?[e1,r]:[pa,r]},Ms=([e,t])=>e===La&&(t==="function"||t==="symbol"),l4=(e,t,r,i)=>{const l=(u,d)=>{const f=i.push(u)-1;return r.set(d,f),f},a=u=>{if(r.has(u))return r.get(u);let[d,f]=tl(u);switch(d){case La:{let x=u;switch(f){case"bigint":d=t1,x=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);x=null;break;case"undefined":return l([Z0],u)}return l([d,x],u)}case fa:{if(f)return l([f,[...u]],u);const x=[],m=l([d,x],u);for(const v of u)x.push(a(v));return m}case pa:{if(f)switch(f){case"BigInt":return l([f,u.toString()],u);case"Boolean":case"Number":case"String":return l([f,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const x=[],m=l([d,x],u);for(const v of i4(u))(e||!Ms(tl(u[v])))&&x.push([a(v),a(u[v])]);return m}case Sf:return l([d,u.toISOString()],u);case Cf:{const{source:x,flags:m}=u;return l([d,{source:x,flags:m}],u)}case Ef:{const x=[],m=l([d,x],u);for(const[v,w]of u)(e||!(Ms(tl(v))||Ms(tl(w))))&&x.push([a(v),a(w)]);return m}case jf:{const x=[],m=l([d,x],u);for(const v of u)(e||!Ms(tl(v)))&&x.push(a(v));return m}}const{message:p}=u;return l([d,{name:f,message:p}],u)};return a},Zg=(e,{json:t,lossy:r}={})=>{const i=[];return l4(!(t||r),!!t,new Map,i)(e),i},ha=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xg(Zg(e,t)):structuredClone(e):(e,t)=>Xg(Zg(e,t));function s4(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function a4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function u4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||s4,i=e.options.footnoteBackLabel||a4,l=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const x=e.all(p),m=String(p.identifier).toUpperCase(),v=si(m.toLowerCase());let w=0;const k=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++w<=S;){k.length>0&&k.push({type:"text",value:" "});let I=typeof r=="string"?r:r(f,w);typeof I=="string"&&(I={type:"text",value:I}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,w),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const j=x[x.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const I=j.children[j.children.length-1];I&&I.type==="text"?I.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...k)}else x.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(x,!0)};e.patch(p,E),d.push(E)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ha(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
1375
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
1376
- `}]}}const za=function(e){if(e==null)return p4;if(typeof e=="function")return Fa(e);if(typeof e=="object")return Array.isArray(e)?c4(e):d4(e);if(typeof e=="string")return f4(e);throw new Error("Expected function, string, or object as test")};function c4(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=za(e[r]);return Fa(i);function i(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function d4(e){const t=e;return Fa(r);function r(i){const l=i;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function f4(e){return Fa(t);function t(r){return r&&r.type===e}}function Fa(e){return t;function t(r,i,l){return!!(h4(r)&&e.call(this,r,typeof i=="number"?i:void 0,l||void 0))}}function p4(){return!0}function h4(e){return e!==null&&typeof e=="object"&&"type"in e}const n1=[],m4=!0,Id=!1,g4="skip";function r1(e,t,r,i){let l;typeof t=="function"&&typeof r!="function"?(i=r,r=t):l=t;const a=za(l),u=i?-1:1;d(e,void 0,[])();function d(f,p,x){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const w=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(w?"<"+w+">":""))+")"})}return v;function v(){let w=n1,k,S,j;if((!t||a(f,p,x[x.length-1]||void 0))&&(w=x4(r(f,x)),w[0]===Id))return w;if("children"in f&&f.children){const E=f;if(E.children&&w[0]!==g4)for(S=(i?E.children.length:-1)+u,j=x.concat(E);S>-1&&S<E.children.length;){const I=E.children[S];if(k=d(I,S,j)(),k[0]===Id)return k;S=typeof k[1]=="number"?k[1]:S+u}}return w}}}function x4(e){return Array.isArray(e)?e:typeof e=="number"?[m4,e]:e==null?n1:[e]}function Tf(e,t,r,i){let l,a,u;typeof t=="function"?(a=void 0,u=t,l=r):(a=t,u=r,l=i),r1(e,a,d,l);function d(f,p){const x=p[p.length-1],m=x?x.children.indexOf(f):void 0;return u(f,m,x)}}const Pd={}.hasOwnProperty,y4={};function v4(e,t){const r=t||y4,i=new Map,l=new Map,a=new Map,u={...n4,...r.handlers},d={all:p,applyData:k4,definitionById:i,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:u,one:f,options:r,patch:w4,wrap:S4};return Tf(e,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const m=x.type==="definition"?i:l,v=String(x.identifier).toUpperCase();m.has(v)||m.set(v,x)}}),d;function f(x,m){const v=x.type,w=d.handlers[v];if(Pd.call(d.handlers,v)&&w)return w(d,x,m);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in x){const{children:S,...j}=x,E=ha(j);return E.children=d.all(x),E}return ha(x)}return(d.options.unknownHandler||b4)(d,x,m)}function p(x){const m=[];if("children"in x){const v=x.children;let w=-1;for(;++w<v.length;){const k=d.one(v[w],x);if(k){if(w&&v[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=ex(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=ex(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function w4(e,t){e.position&&(t.position=a$(e))}function k4(e,t){let r=t;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,a=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const u="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:u}}r.type==="element"&&a&&Object.assign(r.properties,ha(a)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function b4(e,t){const r=t.data||{},i="value"in t&&!(Pd.call(r,"hProperties")||Pd.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function S4(e,t){const r=[];let i=-1;for(t&&r.push({type:"text",value:`
1377
- `});++i<e.length;)i&&r.push({type:"text",value:`
1378
- `}),r.push(e[i]);return t&&e.length>0&&r.push({type:"text",value:`
1379
- `}),r}function ex(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function tx(e,t){const r=v4(e,t),i=r.one(e,void 0),l=u4(r),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&a.children.push({type:"text",value:`
1380
- `},l),a}function C4(e,t){return e&&"run"in e?async function(r,i){const l=tx(r,{file:i,...t});await e.run(l,i)}:function(r,i){return tx(r,{file:i,...e||t})}}function nx(e){if(e)throw e}var Uc,rx;function E4(){if(rx)return Uc;rx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var x=e.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!x&&!m)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},u=function(p,x){r&&x.name==="__proto__"?r(p,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):p[x.name]=x.newValue},d=function(p,x){if(x==="__proto__")if(e.call(p,x)){if(i)return i(p,x).value}else return;return p[x]};return Uc=function f(){var p,x,m,v,w,k,S=arguments[0],j=1,E=arguments.length,I=!1;for(typeof S=="boolean"&&(I=S,S=arguments[1]||{},j=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});j<E;++j)if(p=arguments[j],p!=null)for(x in p)m=d(S,x),v=d(p,x),S!==v&&(I&&v&&(a(v)||(w=l(v)))?(w?(w=!1,k=m&&l(m)?m:[]):k=m&&a(m)?m:{},u(S,{name:x,newValue:f(I,k,v)})):typeof v<"u"&&u(S,{name:x,newValue:v}));return S},Uc}var j4=E4();const Vc=Ud(j4);function Nd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function T4(){const e=[],t={run:r,use:i};return t;function r(...l){let a=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...l);function d(f,...p){const x=e[++a];let m=-1;if(f){u(f);return}for(;++m<l.length;)(p[m]===null||p[m]===void 0)&&(p[m]=l[m]);l=p,x?$4(x,d)(...p):u(null,...p)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function $4(e,t){let r;return i;function i(...u){const d=e.length>u.length;let f;d&&u.push(l);try{f=e.apply(this,u)}catch(p){const x=p;if(d&&r)throw x;return l(x)}d||(f&&f.then&&typeof f.then=="function"?f.then(a,l):f instanceof Error?l(f):a(f))}function l(u,...d){r||(r=!0,t(u,...d))}function a(u){l(null,u)}}const Un={basename:R4,dirname:I4,extname:P4,join:N4,sep:"/"};function R4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bl(e);let r=0,i=-1,l=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else i<0&&(a=!0,i=l+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let u=-1,d=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else u<0&&(a=!0,u=l+1),d>-1&&(e.codePointAt(l)===t.codePointAt(d--)?d<0&&(i=l):(d=-1,i=u));return r===i?i=u:i<0&&(i=e.length),e.slice(r,i)}function I4(e){if(bl(e),e.length===0)return".";let t=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){t=r;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function P4(e){bl(e);let t=e.length,r=-1,i=0,l=-1,a=0,u;for(;t--;){const d=e.codePointAt(t);if(d===47){if(u){i=t+1;break}continue}r<0&&(u=!0,r=t+1),d===46?l<0?l=t:a!==1&&(a=1):l>-1&&(a=-1)}return l<0||r<0||a===0||a===1&&l===r-1&&l===i+1?"":e.slice(l,r)}function N4(...e){let t=-1,r;for(;++t<e.length;)bl(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":A4(r)}function A4(e){bl(e);const t=e.codePointAt(0)===47;let r=L4(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function L4(e,t){let r="",i=0,l=-1,a=0,u=-1,d,f;for(;++u<=e.length;){if(u<e.length)d=e.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(l===u-1||a===1))if(l!==u-1&&a===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(f=r.lastIndexOf("/"),f!==r.length-1){f<0?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf("/")),l=u,a=0;continue}}else if(r.length>0){r="",i=0,l=u,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(l+1,u):r=e.slice(l+1,u),i=u-l-1;l=u,a=0}else d===46&&a>-1?a++:a=-1}return r}function bl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const z4={cwd:F4};function F4(){return"/"}function Ad(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _4(e){if(typeof e=="string")e=new URL(e);else if(!Ad(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return O4(e)}function O4(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const i=t.codePointAt(r+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Hc=["history","path","basename","stem","extname","dirname"];class o1{constructor(t){let r;t?Ad(t)?r={path:t}:typeof t=="string"||M4(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":z4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Hc.length;){const a=Hc[i];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let l;for(l in r)Hc.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Un.basename(this.path):void 0}set basename(t){qc(t,"basename"),Wc(t,"basename"),this.path=Un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Un.dirname(this.path):void 0}set dirname(t){ox(this.basename,"dirname"),this.path=Un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Un.extname(this.path):void 0}set extname(t){if(Wc(t,"extname"),ox(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ad(t)&&(t=_4(t)),qc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Un.basename(this.path,this.extname):void 0}set stem(t){qc(t,"stem"),Wc(t,"stem"),this.path=Un.join(this.dirname||"",t+(this.extname||""))}fail(t,r,i){const l=this.message(t,r,i);throw l.fatal=!0,l}info(t,r,i){const l=this.message(t,r,i);return l.fatal=void 0,l}message(t,r,i){const l=new Ft(t,r,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Wc(e,t){if(e&&e.includes(Un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Un.sep+"`")}function qc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ox(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function M4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const D4=function(e){const i=this.constructor.prototype,l=i[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,i),a},B4={}.hasOwnProperty;class $f extends D4{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=T4()}copy(){const t=new $f;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];t.use(...i)}return t.data(Vc(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Kc("data",this.frozen),this.namespace[t]=r,this):B4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=r.call(t,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Ds(t),i=this.parser||this.Parser;return Gc("parse",i),i(String(r),r)}process(t,r){const i=this;return this.freeze(),Gc("process",this.parser||this.Parser),Jc("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(a,u){const d=Ds(t),f=i.parse(d);i.run(f,d,function(x,m,v){if(x||!m||!v)return p(x);const w=m,k=i.stringify(w,v);H4(k)?v.value=k:v.result=k,p(x,v)});function p(x,m){x||!m?u(x):a?a(m):r(void 0,m)}}}processSync(t){let r=!1,i;return this.freeze(),Gc("processSync",this.parser||this.Parser),Jc("processSync",this.compiler||this.Compiler),this.process(t,l),lx("processSync","process",r),i;function l(a,u){r=!0,nx(a),i=u}}run(t,r,i){ix(t),this.freeze();const l=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?a(void 0,i):new Promise(a);function a(u,d){const f=Ds(r);l.run(t,f,p);function p(x,m,v){const w=m||t;x?d(x):u?u(w):i(void 0,w,v)}}}runSync(t,r){let i=!1,l;return this.run(t,r,a),lx("runSync","run",i),l;function a(u,d){nx(u),l=d,i=!0}}stringify(t,r){this.freeze();const i=Ds(r),l=this.compiler||this.Compiler;return Jc("stringify",l),ix(t),l(t,i)}use(t,...r){const i=this.attachers,l=this.namespace;if(Kc("use",this.frozen),t!=null)if(typeof t=="function")f(t,r);else if(typeof t=="object")Array.isArray(t)?d(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[x,...m]=p;f(x,m)}else u(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function u(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(p.plugins),p.settings&&(l.settings=Vc(!0,l.settings,p.settings))}function d(p){let x=-1;if(p!=null)if(Array.isArray(p))for(;++x<p.length;){const m=p[x];a(m)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,x){let m=-1,v=-1;for(;++m<i.length;)if(i[m][0]===p){v=m;break}if(v===-1)i.push([p,...x]);else if(x.length>0){let[w,...k]=x;const S=i[v][1];Nd(S)&&Nd(w)&&(w=Vc(!0,S,w)),i[v]=[p,w,...k]}}}}const U4=new $f().freeze();function Gc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ix(e){if(!Nd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function lx(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ds(e){return V4(e)?e:new o1(e)}function V4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function H4(e){return typeof e=="string"||W4(e)}function W4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const q4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sx=[],ax={allowDangerousHtml:!0},G4=/^(https?|ircs?|mailto|xmpp)$/i,J4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function lo(e){const t=K4(e),r=Q4(e);return Y4(t.runSync(t.parse(r),r),e)}function K4(e){const t=e.rehypePlugins||sx,r=e.remarkPlugins||sx,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ax}:ax;return U4().use(II).use(r).use(C4,i).use(t)}function Q4(e){const t=e.children||"",r=new o1;return typeof t=="string"&&(r.value=t),r}function Y4(e,t){const r=t.allowedElements,i=t.allowElement,l=t.components,a=t.disallowedElements,u=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||X4;for(const x of J4)Object.hasOwn(t,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+q4+x.id,void 0);return Tf(e,p),p$(e,{Fragment:h.Fragment,components:l,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(x,m,v){if(x.type==="raw"&&v&&typeof m=="number")return u?v.children.splice(m,1):v.children[m]={type:"text",value:x.value},m;if(x.type==="element"){let w;for(w in Mc)if(Object.hasOwn(Mc,w)&&Object.hasOwn(x.properties,w)){const k=x.properties[w],S=Mc[w];(S===null||S.includes(x.tagName))&&(x.properties[w]=f(String(k||""),w,x))}}if(x.type==="element"){let w=r?!r.includes(x.tagName):a?a.includes(x.tagName):!1;if(!w&&i&&typeof m=="number"&&(w=!i(x,m,v)),w&&v&&typeof m=="number")return d&&x.children?v.children.splice(m,1,...x.children):v.children.splice(m,1),m}}}function X4(e){const t=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||i!==-1&&t>i||G4.test(e.slice(0,t))?e:""}function ux(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,l=r.indexOf(t);for(;l!==-1;)i++,l=r.indexOf(t,l+t.length);return i}function Z4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eP(e,t,r){const l=za((r||{}).ignore||[]),a=tP(t);let u=-1;for(;++u<a.length;)r1(e,"text",d);function d(p,x){let m=-1,v;for(;++m<x.length;){const w=x[m],k=v?v.children:void 0;if(l(w,k?k.indexOf(w):void 0,v))return;v=w}if(v)return f(p,x)}function f(p,x){const m=x[x.length-1],v=a[u][0],w=a[u][1];let k=0;const j=m.children.indexOf(p);let E=!1,I=[];v.lastIndex=0;let A=v.exec(p.value);for(;A;){const F=A.index,O={index:A.index,input:A.input,stack:[...x,p]};let N=w(...A,O);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?v.lastIndex=F+1:(k!==F&&I.push({type:"text",value:p.value.slice(k,F)}),Array.isArray(N)?I.push(...N):N&&I.push(N),k=F+A[0].length,E=!0),!v.global)break;A=v.exec(p.value)}return E?(k<p.value.length&&I.push({type:"text",value:p.value.slice(k)}),m.children.splice(j,1,...I)):I=[p],j+I.length}}function tP(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const l=r[i];t.push([nP(l[0]),rP(l[1])])}return t}function nP(e){return typeof e=="string"?new RegExp(Z4(e),"g"):e}function rP(e){return typeof e=="function"?e:function(){return e}}const Qc="phrasing",Yc=["autolink","link","image","label"];function oP(){return{transforms:[dP],enter:{literalAutolink:lP,literalAutolinkEmail:Xc,literalAutolinkHttp:Xc,literalAutolinkWww:Xc},exit:{literalAutolink:cP,literalAutolinkEmail:uP,literalAutolinkHttp:sP,literalAutolinkWww:aP}}}function iP(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qc,notInConstruct:Yc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qc,notInConstruct:Yc},{character:":",before:"[ps]",after:"\\/",inConstruct:Qc,notInConstruct:Yc}]}}function lP(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xc(e){this.config.enter.autolinkProtocol.call(this,e)}function sP(e){this.config.exit.autolinkProtocol.call(this,e)}function aP(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function uP(e){this.config.exit.autolinkEmail.call(this,e)}function cP(e){this.exit(e)}function dP(e){eP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fP],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),pP]],{ignore:["link","linkReference"]})}function fP(e,t,r,i,l){let a="";if(!i1(l)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!hP(r)))return!1;const u=mP(r+i);if(!u[0])return!1;const d={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[d,{type:"text",value:u[1]}]:d}function pP(e,t,r,i){return!i1(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function hP(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function mP(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],i=r.indexOf(")");const l=ux(e,"(");let a=ux(e,")");for(;i!==-1&&l>a;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),a++;return[e,r]}function i1(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||io(r)||Na(r))&&(!t||r!==47)}l1.peek=CP;function gP(){this.buffer()}function xP(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yP(){this.buffer()}function vP(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wP(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function kP(e){this.exit(e)}function bP(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function SP(e){this.exit(e)}function CP(){return"["}function l1(e,t,r,i){const l=r.createTracker(i);let a=l.move("[^");const u=r.enter("footnoteReference"),d=r.enter("reference");return a+=l.move(r.safe(r.associationId(e),{after:"]",before:a})),d(),u(),a+=l.move("]"),a}function EP(){return{enter:{gfmFootnoteCallString:gP,gfmFootnoteCall:xP,gfmFootnoteDefinitionLabelString:yP,gfmFootnoteDefinition:vP},exit:{gfmFootnoteCallString:wP,gfmFootnoteCall:kP,gfmFootnoteDefinitionLabelString:bP,gfmFootnoteDefinition:SP}}}function jP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:l1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,l,a,u){const d=a.createTracker(u);let f=d.move("[^");const p=a.enter("footnoteDefinition"),x=a.enter("label");return f+=d.move(a.safe(a.associationId(i),{before:f,after:"]"})),x(),f+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),f+=d.move((t?`
1381
- `:" ")+a.indentLines(a.containerFlow(i,d.current()),t?s1:TP))),p(),f}}function TP(e,t,r){return t===0?e:s1(e,t,r)}function s1(e,t,r){return(r?"":" ")+e}const $P=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];a1.peek=AP;function RP(){return{canContainEols:["delete"],enter:{strikethrough:PP},exit:{strikethrough:NP}}}function IP(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$P}],handlers:{delete:a1}}}function PP(e){this.enter({type:"delete",children:[]},e)}function NP(e){this.exit(e)}function a1(e,t,r,i){const l=r.createTracker(i),a=r.enter("strikethrough");let u=l.move("~~");return u+=r.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),a(),u}function AP(){return"~"}function LP(e){return e.length}function zP(e,t){const r=t||{},i=(r.align||[]).concat(),l=r.stringLength||LP,a=[],u=[],d=[],f=[];let p=0,x=-1;for(;++x<e.length;){const S=[],j=[];let E=-1;for(e[x].length>p&&(p=e[x].length);++E<e[x].length;){const I=FP(e[x][E]);if(r.alignDelimiters!==!1){const A=l(I);j[E]=A,(f[E]===void 0||A>f[E])&&(f[E]=A)}S.push(I)}u[x]=S,d[x]=j}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<p;)a[m]=cx(i[m]);else{const S=cx(i);for(;++m<p;)a[m]=S}m=-1;const v=[],w=[];for(;++m<p;){const S=a[m];let j="",E="";S===99?(j=":",E=":"):S===108?j=":":S===114&&(E=":");let I=r.alignDelimiters===!1?1:Math.max(1,f[m]-j.length-E.length);const A=j+"-".repeat(I)+E;r.alignDelimiters!==!1&&(I=j.length+I+E.length,I>f[m]&&(f[m]=I),w[m]=I),v[m]=A}u.splice(1,0,v),d.splice(1,0,w),x=-1;const k=[];for(;++x<u.length;){const S=u[x],j=d[x];m=-1;const E=[];for(;++m<p;){const I=S[m]||"";let A="",F="";if(r.alignDelimiters!==!1){const O=f[m]-(j[m]||0),N=a[m];N===114?A=" ".repeat(O):N===99?O%2?(A=" ".repeat(O/2+.5),F=" ".repeat(O/2-.5)):(A=" ".repeat(O/2),F=A):F=" ".repeat(O)}r.delimiterStart!==!1&&!m&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&I==="")&&(r.delimiterStart!==!1||m)&&E.push(" "),r.alignDelimiters!==!1&&E.push(A),E.push(I),r.alignDelimiters!==!1&&E.push(F),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||m!==p-1)&&E.push("|")}k.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return k.join(`
1382
- `)}function FP(e){return e==null?"":String(e)}function cx(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function _P(e,t,r,i){const l=r.enter("blockquote"),a=r.createTracker(i);a.move("> "),a.shift(2);const u=r.indentLines(r.containerFlow(e,a.current()),OP);return l(),u}function OP(e,t,r){return">"+(r?"":" ")+e}function MP(e,t){return dx(e,t.inConstruct,!0)&&!dx(e,t.notInConstruct,!1)}function dx(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function fx(e,t,r,i){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
1383
- `&&MP(r.stack,r.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
1384
- `}function DP(e,t){const r=String(e);let i=r.indexOf(t),l=i,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===l?++a>u&&(u=a):a=1,l=i+t.length,i=r.indexOf(t,l);return u}function BP(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function UP(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function VP(e,t,r,i){const l=UP(r),a=e.value||"",u=l==="`"?"GraveAccent":"Tilde";if(BP(e,r)){const m=r.enter("codeIndented"),v=r.indentLines(a,HP);return m(),v}const d=r.createTracker(i),f=l.repeat(Math.max(DP(a,l)+1,3)),p=r.enter("codeFenced");let x=d.move(f);if(e.lang){const m=r.enter(`codeFencedLang${u}`);x+=d.move(r.safe(e.lang,{before:x,after:" ",encode:["`"],...d.current()})),m()}if(e.lang&&e.meta){const m=r.enter(`codeFencedMeta${u}`);x+=d.move(" "),x+=d.move(r.safe(e.meta,{before:x,after:`
1385
- `,encode:["`"],...d.current()})),m()}return x+=d.move(`
1386
- `),a&&(x+=d.move(a+`
1387
- `)),x+=d.move(f),p(),x}function HP(e,t,r){return(r?"":" ")+e}function Rf(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function WP(e,t,r,i){const l=Rf(r),a=l==='"'?"Quote":"Apostrophe",u=r.enter("definition");let d=r.enter("label");const f=r.createTracker(i);let p=f.move("[");return p+=f.move(r.safe(r.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(r.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=r.enter("destinationRaw"),p+=f.move(r.safe(e.url,{before:p,after:e.title?" ":`
1388
- `,...f.current()}))),d(),e.title&&(d=r.enter(`title${a}`),p+=f.move(" "+l),p+=f.move(r.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),d()),u(),p}function qP(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function fl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ma(e,t,r){const i=Zo(e),l=Zo(t);return i===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}u1.peek=GP;function u1(e,t,r,i){const l=qP(r),a=r.enter("emphasis"),u=r.createTracker(i),d=u.move(l);let f=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const p=f.charCodeAt(0),x=ma(i.before.charCodeAt(i.before.length-1),p,l);x.inside&&(f=fl(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=ma(i.after.charCodeAt(0),m,l);v.inside&&(f=f.slice(0,-1)+fl(m));const w=u.move(l);return a(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},d+f+w}function GP(e,t,r){return r.options.emphasis||"*"}function JP(e,t){let r=!1;return Tf(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,Id}),!!((!e.depth||e.depth<3)&&wf(e)&&(t.options.setext||r))}function KP(e,t,r,i){const l=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(i);if(JP(e,r)){const x=r.enter("headingSetext"),m=r.enter("phrasing"),v=r.containerPhrasing(e,{...a.current(),before:`
1389
- `,after:`
1390
- `});return m(),x(),v+`
1391
- `+(l===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
1392
- `))+1))}const u="#".repeat(l),d=r.enter("headingAtx"),f=r.enter("phrasing");a.move(u+" ");let p=r.containerPhrasing(e,{before:"# ",after:`
1393
- `,...a.current()});return/^[\t ]/.test(p)&&(p=fl(p.charCodeAt(0))+p.slice(1)),p=p?u+" "+p:u,r.options.closeAtx&&(p+=" "+u),f(),d(),p}c1.peek=QP;function c1(e){return e.value||""}function QP(){return"<"}d1.peek=YP;function d1(e,t,r,i){const l=Rf(r),a=l==='"'?"Quote":"Apostrophe",u=r.enter("image");let d=r.enter("label");const f=r.createTracker(i);let p=f.move("![");return p+=f.move(r.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(r.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=r.enter("destinationRaw"),p+=f.move(r.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=r.enter(`title${a}`),p+=f.move(" "+l),p+=f.move(r.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),d()),p+=f.move(")"),u(),p}function YP(){return"!"}f1.peek=XP;function f1(e,t,r,i){const l=e.referenceType,a=r.enter("imageReference");let u=r.enter("label");const d=r.createTracker(i);let f=d.move("![");const p=r.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),u();const x=r.stack;r.stack=[],u=r.enter("reference");const m=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=x,a(),l==="full"||!p||p!==m?f+=d.move(m+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function XP(){return"!"}p1.peek=ZP;function p1(e,t,r){let i=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<r.unsafe.length;){const u=r.unsafe[a],d=r.compilePattern(u);let f;if(u.atBreak)for(;f=d.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return l+i+l}function ZP(){return"`"}function h1(e,t){const r=wf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}m1.peek=eN;function m1(e,t,r,i){const l=Rf(r),a=l==='"'?"Quote":"Apostrophe",u=r.createTracker(i);let d,f;if(h1(e,r)){const x=r.stack;r.stack=[],d=r.enter("autolink");let m=u.move("<");return m+=u.move(r.containerPhrasing(e,{before:m,after:">",...u.current()})),m+=u.move(">"),d(),r.stack=x,m}d=r.enter("link"),f=r.enter("label");let p=u.move("[");return p+=u.move(r.containerPhrasing(e,{before:p,after:"](",...u.current()})),p+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(r.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(f=r.enter("destinationRaw"),p+=u.move(r.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),f(),e.title&&(f=r.enter(`title${a}`),p+=u.move(" "+l),p+=u.move(r.safe(e.title,{before:p,after:l,...u.current()})),p+=u.move(l),f()),p+=u.move(")"),d(),p}function eN(e,t,r){return h1(e,r)?"<":"["}g1.peek=tN;function g1(e,t,r,i){const l=e.referenceType,a=r.enter("linkReference");let u=r.enter("label");const d=r.createTracker(i);let f=d.move("[");const p=r.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),u();const x=r.stack;r.stack=[],u=r.enter("reference");const m=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=x,a(),l==="full"||!p||p!==m?f+=d.move(m+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function tN(){return"["}function If(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nN(e){const t=If(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function rN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function x1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function oN(e,t,r,i){const l=r.enter("list"),a=r.bulletCurrent;let u=e.ordered?rN(r):If(r);const d=e.ordered?u==="."?")":".":nN(r);let f=t&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const x=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&x&&(!x.children||!x.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(f=!0),x1(r)===u&&x){let m=-1;for(;++m<e.children.length;){const v=e.children[m];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(u=d),r.bulletCurrent=u;const p=r.containerFlow(e,i);return r.bulletLastUsed=u,r.bulletCurrent=a,l(),p}function iN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function lN(e,t,r,i){const l=iN(r);let a=r.bulletCurrent||If(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const d=r.createTracker(i);d.move(a+" ".repeat(u-a.length)),d.shift(u);const f=r.enter("listItem"),p=r.indentLines(r.containerFlow(e,d.current()),x);return f(),p;function x(m,v,w){return v?(w?"":" ".repeat(u))+m:(w?a:a+" ".repeat(u-a.length))+m}}function sN(e,t,r,i){const l=r.enter("paragraph"),a=r.enter("phrasing"),u=r.containerPhrasing(e,i);return a(),l(),u}const aN=za(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uN(e,t,r,i){return(e.children.some(function(u){return aN(u)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function cN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}y1.peek=dN;function y1(e,t,r,i){const l=cN(r),a=r.enter("strong"),u=r.createTracker(i),d=u.move(l+l);let f=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const p=f.charCodeAt(0),x=ma(i.before.charCodeAt(i.before.length-1),p,l);x.inside&&(f=fl(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=ma(i.after.charCodeAt(0),m,l);v.inside&&(f=f.slice(0,-1)+fl(m));const w=u.move(l+l);return a(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},d+f+w}function dN(e,t,r){return r.options.strong||"*"}function fN(e,t,r,i){return r.safe(e.value,i)}function pN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function hN(e,t,r){const i=(x1(r)+(r.options.ruleSpaces?" ":"")).repeat(pN(r));return r.options.ruleSpaces?i.slice(0,-1):i}const v1={blockquote:_P,break:fx,code:VP,definition:WP,emphasis:u1,hardBreak:fx,heading:KP,html:c1,image:d1,imageReference:f1,inlineCode:p1,link:m1,linkReference:g1,list:oN,listItem:lN,paragraph:sN,root:uN,strong:y1,text:fN,thematicBreak:hN};function mN(){return{enter:{table:gN,tableData:px,tableHeader:px,tableRow:yN},exit:{codeText:vN,table:xN,tableData:Zc,tableHeader:Zc,tableRow:Zc}}}function gN(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function xN(e){this.exit(e),this.data.inTable=void 0}function yN(e){this.enter({type:"tableRow",children:[]},e)}function Zc(e){this.exit(e)}function px(e){this.enter({type:"tableCell",children:[]},e)}function vN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,wN));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function wN(e,t){return t==="|"?t:e}function kN(e){const t=e||{},r=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
1394
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:u,tableCell:f,tableRow:d}};function u(w,k,S,j){return p(x(w,S,j),w.align)}function d(w,k,S,j){const E=m(w,S,j),I=p([E]);return I.slice(0,I.indexOf(`
1395
- `))}function f(w,k,S,j){const E=S.enter("tableCell"),I=S.enter("phrasing"),A=S.containerPhrasing(w,{...j,before:a,after:a});return I(),E(),A}function p(w,k){return zP(w,{align:k,alignDelimiters:i,padding:r,stringLength:l})}function x(w,k,S){const j=w.children;let E=-1;const I=[],A=k.enter("table");for(;++E<j.length;)I[E]=m(j[E],k,S);return A(),I}function m(w,k,S){const j=w.children;let E=-1;const I=[],A=k.enter("tableRow");for(;++E<j.length;)I[E]=f(j[E],w,k,S);return A(),I}function v(w,k,S){let j=v1.inlineCode(w,k,S);return S.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function bN(){return{exit:{taskListCheckValueChecked:hx,taskListCheckValueUnchecked:hx,paragraph:CN}}}function SN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:EN}}}function hx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function CN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const l=t.children;let a=-1,u;for(;++a<l.length;){const d=l[a];if(d.type==="paragraph"){u=d;break}}u===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function EN(e,t,r,i){const l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",d=r.createTracker(i);a&&d.move(u);let f=v1.listItem(e,t,r,{...i,...d.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(x){return x+u}}function jN(){return[oP(),EP(),RP(),mN(),bN()]}function TN(e){return{extensions:[iP(),jP(e),IP(),kN(e),SN()]}}const $N={tokenize:LN,partial:!0},w1={tokenize:zN,partial:!0},k1={tokenize:FN,partial:!0},b1={tokenize:_N,partial:!0},RN={tokenize:ON,partial:!0},S1={name:"wwwAutolink",tokenize:NN,previous:E1},C1={name:"protocolAutolink",tokenize:AN,previous:j1},or={name:"emailAutolink",tokenize:PN,previous:T1},Wn={};function IN(){return{text:Wn}}let Kr=48;for(;Kr<123;)Wn[Kr]=or,Kr++,Kr===58?Kr=65:Kr===91&&(Kr=97);Wn[43]=or;Wn[45]=or;Wn[46]=or;Wn[95]=or;Wn[72]=[or,C1];Wn[104]=[or,C1];Wn[87]=[or,S1];Wn[119]=[or,S1];function PN(e,t,r){const i=this;let l,a;return u;function u(m){return!Ld(m)||!T1.call(i,i.previous)||Pf(i.events)?r(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(m))}function d(m){return Ld(m)?(e.consume(m),d):m===64?(e.consume(m),f):r(m)}function f(m){return m===46?e.check(RN,x,p)(m):m===45||m===95||zt(m)?(a=!0,e.consume(m),f):x(m)}function p(m){return e.consume(m),l=!0,f}function x(m){return a&&l&&Dt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):r(m)}}function NN(e,t,r){const i=this;return l;function l(u){return u!==87&&u!==119||!E1.call(i,i.previous)||Pf(i.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($N,e.attempt(w1,e.attempt(k1,a),r),r)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function AN(e,t,r){const i=this;let l="",a=!1;return u;function u(m){return(m===72||m===104)&&j1.call(i,i.previous)&&!Pf(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(m),e.consume(m),d):r(m)}function d(m){if(Dt(m)&&l.length<5)return l+=String.fromCodePoint(m),e.consume(m),d;if(m===58){const v=l.toLowerCase();if(v==="http"||v==="https")return e.consume(m),f}return r(m)}function f(m){return m===47?(e.consume(m),a?p:(a=!0,f)):r(m)}function p(m){return m===null||da(m)||Je(m)||io(m)||Na(m)?r(m):e.attempt(w1,e.attempt(k1,x),r)(m)}function x(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function LN(e,t,r){let i=0;return l;function l(u){return(u===87||u===119)&&i<3?(i++,e.consume(u),l):u===46&&i===3?(e.consume(u),a):r(u)}function a(u){return u===null?r(u):t(u)}}function zN(e,t,r){let i,l,a;return u;function u(p){return p===46||p===95?e.check(b1,f,d)(p):p===null||Je(p)||io(p)||p!==45&&Na(p)?f(p):(a=!0,e.consume(p),u)}function d(p){return p===95?i=!0:(l=i,i=void 0),e.consume(p),u}function f(p){return l||i||!a?r(p):t(p)}}function FN(e,t){let r=0,i=0;return l;function l(u){return u===40?(r++,e.consume(u),l):u===41&&i<r?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(b1,t,a)(u):u===null||Je(u)||io(u)?t(u):(e.consume(u),l)}function a(u){return u===41&&i++,e.consume(u),l}}function _N(e,t,r){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),a):d===93?(e.consume(d),l):d===60||d===null||Je(d)||io(d)?t(d):r(d)}function l(d){return d===null||d===40||d===91||Je(d)||io(d)?t(d):i(d)}function a(d){return Dt(d)?u(d):r(d)}function u(d){return d===59?(e.consume(d),i):Dt(d)?(e.consume(d),u):r(d)}}function ON(e,t,r){return i;function i(a){return e.consume(a),l}function l(a){return zt(a)?r(a):t(a)}}function E1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Je(e)}function j1(e){return!Dt(e)}function T1(e){return!(e===47||Ld(e))}function Ld(e){return e===43||e===45||e===46||e===95||zt(e)}function Pf(e){let t=e.length,r=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const MN={tokenize:GN,partial:!0};function DN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:HN,continuation:{tokenize:WN},exit:qN}},text:{91:{name:"gfmFootnoteCall",tokenize:VN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BN,resolveTo:UN}}}}function BN(e,t,r){const i=this;let l=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;l--;){const f=i.events[l][1];if(f.type==="labelImage"){u=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!u||!u._balanced)return r(f);const p=Pn(i.sliceSerialize({start:u.end,end:i.now()}));return p.codePointAt(0)!==94||!a.includes(p.slice(1))?r(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function UN(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},d=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...d),e}function VN(e,t,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,u;return d;function d(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?r(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(m){if(a>999||m===93&&!u||m===null||m===91||Je(m))return r(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return l.includes(Pn(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(m)}return Je(m)||(u=!0),a++,e.consume(m),m===92?x:p}function x(m){return m===91||m===92||m===93?(e.consume(m),a++,p):p(m)}}function HN(e,t,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,u=0,d;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",x):r(k)}function x(k){if(u>999||k===93&&!d||k===null||k===91||Je(k))return r(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Pn(i.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Je(k)||(d=!0),u++,e.consume(k),k===92?m:x}function m(k){return k===91||k===92||k===93?(e.consume(k),u++,x):x(k)}function v(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),l.includes(a)||l.push(a),Me(e,w,"gfmFootnoteDefinitionWhitespace")):r(k)}function w(k){return t(k)}}function WN(e,t,r){return e.check(kl,t,e.attempt(MN,t,r))}function qN(e){e.exit("gfmFootnoteDefinition")}function GN(e,t,r){const i=this;return Me(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):r(a)}}function JN(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:l};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(u,d){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let p=f;for(;p--;)if(u[p][0]==="exit"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[p][1].end.offset-u[p][1].start.offset){u[f][1].type="strikethroughSequence",u[p][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},u[p][1].start),end:Object.assign({},u[f][1].end)},m={type:"strikethroughText",start:Object.assign({},u[p][1].end),end:Object.assign({},u[f][1].start)},v=[["enter",x,d],["enter",u[p][1],d],["exit",u[p][1],d],["enter",m,d]],w=d.parser.constructs.insideSpan.null;w&&un(v,v.length,0,Aa(w,u.slice(p+1,f),d)),un(v,v.length,0,[["exit",m,d],["enter",u[f][1],d],["exit",u[f][1],d],["exit",x,d]]),un(u,p-1,f-p+3,v),f=p+v.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function a(u,d,f){const p=this.previous,x=this.events;let m=0;return v;function v(k){return p===126&&x[x.length-1][1].type!=="characterEscape"?f(k):(u.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const S=Zo(p);if(k===126)return m>1?f(k):(u.consume(k),m++,w);if(m<2&&!r)return f(k);const j=u.exit("strikethroughSequenceTemporary"),E=Zo(k);return j._open=!E||E===2&&!!S,j._close=!S||S===2&&!!E,d(k)}}}class KN{constructor(){this.map=[]}add(t,r,i){QN(this,t,r,i)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let l=i.pop();for(;l;){for(const a of l)t.push(a);l=i.pop()}this.map.length=0}}function QN(e,t,r,i){let l=0;if(!(r===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...i);return}l+=1}e.map.push([t,r,i])}}function YN(e,t){let r=!1;const i=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return i}function XN(){return{flow:{null:{name:"table",tokenize:ZN,resolveAll:eA}}}}function ZN(e,t,r){const i=this;let l=0,a=0,u;return d;function d(M){let Z=i.events.length-1;for(;Z>-1;){const re=i.events[Z][1].type;if(re==="lineEnding"||re==="linePrefix")Z--;else break}const le=Z>-1?i.events[Z][1].type:null,X=le==="tableHead"||le==="tableRow"?N:f;return X===N&&i.parser.lazy[i.now().line]?r(M):X(M)}function f(M){return e.enter("tableHead"),e.enter("tableRow"),p(M)}function p(M){return M===124||(u=!0,a+=1),x(M)}function x(M){return M===null?r(M):je(M)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),w):r(M):_e(M)?Me(e,x,"whitespace")(M):(a+=1,u&&(u=!1,l+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),u=!0,x):(e.enter("data"),m(M)))}function m(M){return M===null||M===124||Je(M)?(e.exit("data"),x(M)):(e.consume(M),M===92?v:m)}function v(M){return M===92||M===124?(e.consume(M),m):m(M)}function w(M){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(M):(e.enter("tableDelimiterRow"),u=!1,_e(M)?Me(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):k(M))}function k(M){return M===45||M===58?j(M):M===124?(u=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),S):O(M)}function S(M){return _e(M)?Me(e,j,"whitespace")(M):j(M)}function j(M){return M===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),E):M===45?(a+=1,E(M)):M===null||je(M)?F(M):O(M)}function E(M){return M===45?(e.enter("tableDelimiterFiller"),I(M)):O(M)}function I(M){return M===45?(e.consume(M),I):M===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(M))}function A(M){return _e(M)?Me(e,F,"whitespace")(M):F(M)}function F(M){return M===124?k(M):M===null||je(M)?!u||l!==a?O(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):O(M)}function O(M){return r(M)}function N(M){return e.enter("tableRow"),H(M)}function H(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),H):M===null||je(M)?(e.exit("tableRow"),t(M)):_e(M)?Me(e,H,"whitespace")(M):(e.enter("data"),K(M))}function K(M){return M===null||M===124||Je(M)?(e.exit("data"),H(M)):(e.consume(M),M===92?ne:K)}function ne(M){return M===92||M===124?(e.consume(M),K):K(M)}}function eA(e,t){let r=-1,i=!0,l=0,a=[0,0,0,0],u=[0,0,0,0],d=!1,f=0,p,x,m;const v=new KN;for(;++r<e.length;){const w=e[r],k=w[1];w[0]==="enter"?k.type==="tableHead"?(d=!1,f!==0&&(mx(v,t,f,p,x),x=void 0,f=0),p={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(r,0,[["enter",p,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,m=void 0,a=[0,0,0,0],u=[0,r+1,0,0],d&&(d=!1,x={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(r,0,[["enter",x,t]])),l=k.type==="tableDelimiterRow"?2:x?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Bs(v,t,a,l,void 0,m),a=[0,0,0,0]),u[2]=r)):k.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(u[0]=u[1],m=Bs(v,t,a,l,void 0,m)),a=u,u=[a[1],r,0,0])):k.type==="tableHead"?(d=!0,f=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=r,a[1]!==0?(u[0]=u[1],m=Bs(v,t,a,l,r,m)):u[1]!==0&&(m=Bs(v,t,u,l,r,m)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(u[3]=r)}for(f!==0&&mx(v,t,f,p,x),v.consume(t.events),r=-1;++r<t.events.length;){const w=t.events[r];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=YN(t.events,r))}return e}function Bs(e,t,r,i,l,a){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(a.end=Object.assign({},Do(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const f=Do(t.events,r[1]);if(a={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const p=Do(t.events,r[2]),x=Do(t.events,r[3]),m={type:d,start:Object.assign({},p),end:Object.assign({},x)};if(e.add(r[2],0,[["enter",m,t]]),i!==2){const v=t.events[r[2]],w=t.events[r[3]];if(v[1].end=Object.assign({},w[1].end),v[1].type="chunkText",v[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,S=r[3]-r[2]-1;e.add(k,S,[])}}e.add(r[3]+1,0,[["exit",m,t]])}return l!==void 0&&(a.end=Object.assign({},Do(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function mx(e,t,r,i,l){const a=[],u=Do(t.events,r);l&&(l.end=Object.assign({},u),a.push(["exit",l,t])),i.end=Object.assign({},u),a.push(["exit",i,t]),e.add(r+1,0,a)}function Do(e,t){const r=e[t],i=r[0]==="enter"?"start":"end";return r[1][i]}const tA={name:"tasklistCheck",tokenize:rA};function nA(){return{text:{91:tA}}}function rA(e,t,r){const i=this;return l;function l(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Je(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):r(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):r(f)}function d(f){return je(f)?t(f):_e(f)?e.check({tokenize:oA},t,r)(f):r(f)}}function oA(e,t,r){return Me(e,i,"whitespace");function i(l){return l===null?r(l):t(l)}}function iA(e){return O0([IN(),DN(),JN(e),XN(),nA()])}const lA={};function so(e){const t=this,r=e||lA,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(iA(r)),a.push(jN()),u.push(TN(r))}const ai=C.div`
1396
- display: flex;
1397
- &[data-type='user'] {
1398
- justify-content: flex-end;
1399
- }
1400
-
1401
- &[data-type='assistant'] {
1402
- justify-content: flex-start;
1403
- }
1404
- `,$1=C.div`
1405
- color: ${e=>e.theme.colors.text};
1406
- border-radius: 12px;
1407
- padding: 8px 12px;
1408
- max-width: 70%;
1409
- background-color: ${e=>e.theme.colors.backgroundSecondary};
1410
-
1411
- ${ai}[data-type='user'] & {
1412
- background-color: ${e=>e.theme.colors.userMessageBackground};
1413
- color: ${e=>e.theme.colors.userMessageText};
1414
- }
1415
-
1416
- /* Add subtle transition for edit mode */
1417
- transition: box-shadow 0.2s ease-in-out;
1418
-
1419
- &[data-edit-mode='true'] {
1420
- box-shadow: 0 0 0 2px ${e=>e.theme.colors.primary};
1421
- }
1422
- `,sA=C.div`
1423
- font-weight: bold;
1424
- margin-bottom: 4px;
1425
- display: flex;
1426
- justify-content: space-between;
1427
- align-items: center;
1428
- `,R1=C.div`
1429
- word-wrap: break-word;
1430
- font-family: inherit;
1431
- margin: 0;
1432
-
1433
- > *:first-child {
1434
- margin-top: 0;
1435
- }
1436
-
1437
- > *:last-child {
1438
- margin-bottom: 0;
1439
- }
1440
-
1441
- p {
1442
- margin: 8px 0;
1443
- }
1444
-
1445
- ul,
1446
- ol {
1447
- padding-left: 20px;
1448
- margin: 8px 0;
1449
- }
1450
-
1451
- li {
1452
- margin-bottom: 4px;
1453
- }
1454
-
1455
- pre {
1456
- background-color: ${e=>e.theme.colors.codeBackground};
1457
- padding: 10px;
1458
- border-radius: 4px;
1459
- font-family: 'Courier New', Courier, monospace;
1460
- white-space: pre-wrap;
1461
- word-wrap: break-word;
1462
- margin: 8px 0;
1463
- }
1464
-
1465
- code {
1466
- font-family: 'Courier New', Courier, monospace;
1467
- background-color: ${e=>e.theme.colors.codeBackground};
1468
- padding: 2px 4px;
1469
- border-radius: 3px;
1470
- font-size: 0.9em;
1471
- }
1472
-
1473
- pre > code {
1474
- background-color: transparent;
1475
- padding: 0;
1476
- border-radius: 0;
1477
- font-size: inherit;
1478
- }
1479
-
1480
- blockquote {
1481
- border-left: 4px solid ${e=>e.theme.colors.border};
1482
- padding-left: 10px;
1483
- margin: 8px 0;
1484
- color: ${e=>e.theme.colors.textSecondary};
1485
- }
1486
- `,Vo=C.textarea`
1487
- width: 100%;
1488
- min-height: 100px;
1489
- padding: 8px;
1490
- border: none;
1491
- border-radius: 4px;
1492
- background-color: ${e=>e.theme.colors.background};
1493
- color: ${e=>e.theme.colors.text};
1494
- font-family: inherit;
1495
- font-size: inherit;
1496
- resize: vertical;
1497
- margin: 4px 0;
1498
- field-sizing: content;
1499
- box-sizing: border-box;
1500
-
1501
- &:focus {
1502
- outline: none;
1503
- box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary};
1504
- }
1505
-
1506
- ${ai}[data-type='user'] & {
1507
- background-color: ${e=>e.theme.colors.userMessageBackground};
1508
- color: ${e=>e.theme.colors.userMessageText};
1509
- }
1510
- `,aA=C.div`
1511
- display: flex;
1512
- justify-content: space-between;
1513
- align-items: center;
1514
- margin-top: 4px;
1515
- gap: 8px;
1516
-
1517
- > div {
1518
- display: flex;
1519
- align-items: center;
1520
- gap: 8px;
1521
- }
1522
- `,uA=C.div`
1523
- font-size: 0.8em;
1524
- color: ${e=>e.theme.colors.textSecondary};
1525
-
1526
- ${ai}[data-type='user'] & {
1527
- color: ${e=>e.theme.colors.userMessageTimestamp};
1528
- }
1529
- `,cA=C.span`
1530
- font-size: 0.8em;
1531
- color: ${e=>e.theme.colors.primary};
1532
- cursor: pointer;
1533
- text-decoration: underline;
1534
-
1535
- &:hover {
1536
- color: ${e=>e.theme.colors.primaryHover};
1537
- }
1538
- `,Nf=C.div`
1539
- display: flex;
1540
- gap: 8px;
1541
- margin-top: 8px;
1542
- `,Af=C.button`
1543
- padding: 4px 8px;
1544
- border: none;
1545
- border-radius: 4px;
1546
- cursor: pointer;
1547
- font-size: 0.8em;
1548
- transition: background-color 0.2s ease-in-out;
1549
-
1550
- &:disabled {
1551
- opacity: 0.5;
1552
- cursor: not-allowed;
1553
- }
1554
- `,Lf=C(Af)`
1555
- background-color: transparent;
1556
- color: ${e=>e.theme.colors.primary};
1557
-
1558
- &:hover:not(:disabled) {
1559
- background-color: ${e=>e.theme.colors.primaryHover}20;
1560
- }
1561
-
1562
- ${ai}[data-type='user'] & {
1563
- color: ${e=>e.theme.colors.userMessageText};
1564
- &:hover:not(:disabled) {
1565
- background-color: ${e=>e.theme.colors.userMessageText}20;
1566
- }
1567
- }
1568
- `,zf=C(Af)`
1569
- background-color: ${e=>e.theme.colors.primary};
1570
- color: ${e=>e.theme.colors.buttonText};
1571
-
1572
- &:hover:not(:disabled) {
1573
- background-color: ${e=>e.theme.colors.primaryHover};
1574
- }
1575
- `,Ff=C(Af)`
1576
- background-color: transparent;
1577
- color: ${e=>e.theme.colors.error};
1578
-
1579
- &:hover:not(:disabled) {
1580
- background-color: ${e=>e.theme.colors.error}20;
1581
- }
1582
- `,_f=C.div`
1583
- width: 16px;
1584
- height: 16px;
1585
- border: 2px solid ${e=>e.theme.colors.primary};
1586
- border-top-color: transparent;
1587
- border-radius: 50%;
1588
- animation: spin 1s linear infinite;
1589
- margin: 0 8px;
1590
-
1591
- @keyframes spin {
1592
- to {
1593
- transform: rotate(360deg);
1594
- }
1595
- }
1596
- `;C.span`
1597
- font-size: 0.7em;
1598
- color: ${e=>e.theme.colors.textSecondary};
1599
- margin-left: 8px;
1600
- font-style: italic;
1601
- `;const dA=C.div`
1602
- margin: 12px 0;
1603
- border: 1px solid ${e=>e.theme.colors.border};
1604
- border-radius: 8px;
1605
- overflow: hidden;
1606
- `,fA=C.div`
1607
- background-color: ${e=>e.theme.colors.codeBackground};
1608
- padding: 8px 12px;
1609
- font-weight: 600;
1610
- font-size: 0.9em;
1611
- border-bottom: 1px solid ${e=>e.theme.colors.border};
1612
- color: ${e=>e.theme.colors.text};
1613
- `,pA=C.div`
1614
- background-color: ${e=>e.theme.colors.codeBackground};
1615
- padding: 12px;
1616
- overflow-x: auto;
1617
-
1618
- pre {
1619
- margin: 0;
1620
- font-family: 'Courier New', monospace;
1621
- font-size: 0.9em;
1622
- background-color: transparent;
1623
- padding: 0;
1624
- }
1625
- `,hA=C.div`
1626
- margin: 12px 0;
1627
- border: 1px solid
1628
- ${e=>e.outcome==="OUTCOME_OK"?e.theme.colors.success:e.theme.colors.error};
1629
- border-radius: 8px;
1630
- overflow: hidden;
1631
- `,mA=C.div`
1632
- padding: 8px 12px;
1633
- font-weight: 600;
1634
- font-size: 0.9em;
1635
- background-color: ${e=>e.theme.colors.backgroundSecondary};
1636
- `,gA=C(R1)`
1637
- padding: 12px;
1638
- background-color: ${e=>e.theme.colors.background};
1639
- max-height: 400px;
1640
- overflow-y: auto;
1641
- `,xA=C.span`
1642
- font-size: 12px;
1643
- color: ${e=>e.theme.colors.textSecondary};
1644
- white-space: nowrap;
1645
- `,I1=({messages:e,className:t})=>{if(!e||e.length===0)return null;const{formattedSize:r,totalTokens:i}=nf(e),l=typeof i=="number"?kd(i):r;return h.jsx(xA,{className:t,children:l})},P1=C.div`
1646
- font-weight: bold;
1647
- font-size: 0.9em;
1648
- color: ${e=>e.theme.colors.text};
1649
- `;C.div`
1650
- font-size: 0.8em;
1651
- color: ${e=>e.theme.colors.textSecondary};
1652
- margin: 4px 0;
1653
- `;C.div`
1654
- font-size: 0.8em;
1655
- color: ${e=>e.theme.colors.textSecondary};
1656
- margin: 4px 0;
1657
- `;C.div`
1658
- display: inline-block;
1659
- padding: 2px 4px;
1660
- border-radius: 4px;
1661
- font-size: 0.8em;
1662
- font-weight: bold;
1663
- color: ${e=>e.theme.colors.text};
1664
- background-color: ${e=>e.variant==="updateFile"?e.theme.colors.primary:e.variant==="createFile"?e.theme.colors.success:(e.variant==="patchFile",e.theme.colors.warning)};
1665
- `;C.div`
1666
- display: flex;
1667
- gap: 8px;
1668
- `;C.button`
1669
- padding: 4px 8px;
1670
- border: 1px solid ${e=>e.theme.colors.border};
1671
- border-radius: 4px;
1672
- background-color: ${e=>e.theme.colors.background};
1673
- cursor: pointer;
1674
- font-size: 0.8em;
1675
- color: ${e=>e.theme.colors.text};
1676
-
1677
- &:hover {
1678
- background-color: ${e=>e.theme.colors.backgroundHover};
1679
- }
1680
- `;C.div`
1681
- margin: 16px 0;
1682
- `;C.div`
1683
- padding: 8px;
1684
- border: 1px solid ${e=>e.theme.colors.border};
1685
- border-radius: 4px;
1686
- background-color: ${e=>e.theme.colors.background};
1687
- font-size: 0.9em;
1688
- line-height: 1.5;
1689
-
1690
- > *:first-child {
1691
- margin-top: 0;
1692
- }
1693
-
1694
- > *:last-child {
1695
- margin-bottom: 0;
1696
- }
1697
-
1698
- p {
1699
- margin: 8px 0;
1700
- }
1701
-
1702
- ul,
1703
- ol {
1704
- padding-left: 20px;
1705
- margin: 8px 0;
1706
- }
1707
-
1708
- li {
1709
- margin-bottom: 4px;
1710
- }
1711
-
1712
- pre {
1713
- background-color: ${e=>e.theme.colors.codeBackground};
1714
- padding: 10px;
1715
- border-radius: 4px;
1716
- font-family: 'Courier New', Courier, monospace;
1717
- white-space: pre-wrap;
1718
- word-wrap: break-word;
1719
- margin: 8px 0;
1720
- }
1721
-
1722
- code {
1723
- font-family: 'Courier New', Courier, monospace;
1724
- background-color: ${e=>e.theme.colors.codeBackground};
1725
- padding: 2px 4px;
1726
- border-radius: 3px;
1727
- font-size: 0.9em;
1728
- }
1729
-
1730
- pre > code {
1731
- background-color: transparent;
1732
- padding: 0;
1733
- border-radius: 0;
1734
- font-size: inherit;
1735
- }
1736
-
1737
- blockquote {
1738
- border-left: 4px solid ${e=>e.theme.colors.border};
1739
- padding-left: 10px;
1740
- margin: 8px 0;
1741
- color: ${e=>e.theme.colors.textSecondary};
1742
- }
1743
- `;C.div`
1744
- margin: 16px 0;
1745
- `;function Nr(){}Nr.prototype={diff:function(t,r){var i,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=l.callback;typeof l=="function"&&(a=l,l={}),this.options=l;var u=this;function d(F){return a?(setTimeout(function(){a(void 0,F)},0),!0):F}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=t.length,x=1,m=f+p;l.maxEditLength&&(m=Math.min(m,l.maxEditLength));var v=(i=l.timeout)!==null&&i!==void 0?i:1/0,w=Date.now()+v,k=[{oldPos:-1,lastComponent:void 0}],S=this.extractCommon(k[0],r,t,0);if(k[0].oldPos+1>=p&&S+1>=f)return d([{value:this.join(r),count:r.length}]);var j=-1/0,E=1/0;function I(){for(var F=Math.max(j,-x);F<=Math.min(E,x);F+=2){var O=void 0,N=k[F-1],H=k[F+1];N&&(k[F-1]=void 0);var K=!1;if(H){var ne=H.oldPos-F;K=H&&0<=ne&&ne<f}var M=N&&N.oldPos+1<p;if(!K&&!M){k[F]=void 0;continue}if(!M||K&&N.oldPos+1<H.oldPos?O=u.addToPath(H,!0,void 0,0):O=u.addToPath(N,void 0,!0,1),S=u.extractCommon(O,r,t,F),O.oldPos+1>=p&&S+1>=f)return d(yA(u,O.lastComponent,r,t,u.useLongestToken));k[F]=O,O.oldPos+1>=p&&(E=Math.min(E,F-1)),S+1>=f&&(j=Math.max(j,F+1))}x++}if(a)(function F(){setTimeout(function(){if(x>m||Date.now()>w)return a();I()||F()},0)})();else for(;x<=m&&Date.now()<=w;){var A=I();if(A)return A}},addToPath:function(t,r,i,l){var a=t.lastComponent;return a&&a.added===r&&a.removed===i?{oldPos:t.oldPos+l,lastComponent:{count:a.count+1,added:r,removed:i,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+l,lastComponent:{count:1,added:r,removed:i,previousComponent:a}}},extractCommon:function(t,r,i,l){for(var a=r.length,u=i.length,d=t.oldPos,f=d-l,p=0;f+1<a&&d+1<u&&this.equals(r[f+1],i[d+1]);)f++,d++,p++;return p&&(t.lastComponent={count:p,previousComponent:t.lastComponent}),t.oldPos=d,f},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],i=0;i<t.length;i++)t[i]&&r.push(t[i]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function yA(e,t,r,i,l){for(var a=[],u;t;)a.push(t),u=t.previousComponent,delete t.previousComponent,t=u;a.reverse();for(var d=0,f=a.length,p=0,x=0;d<f;d++){var m=a[d];if(m.removed){if(m.value=e.join(i.slice(x,x+m.count)),x+=m.count,d&&a[d-1].added){var w=a[d-1];a[d-1]=a[d],a[d]=w}}else{if(!m.added&&l){var v=r.slice(p,p+m.count);v=v.map(function(S,j){var E=i[x+j];return E.length>S.length?E:S}),m.value=e.join(v)}else m.value=e.join(r.slice(p,p+m.count));p+=m.count,m.added||(x+=m.count)}}var k=a[f-1];return f>1&&typeof k.value=="string"&&(k.added||k.removed)&&e.equals("",k.value)&&(a[f-2].value+=k.value,a.pop()),a}var gx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,xx=/\S/,N1=new Nr;N1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!xx.test(e)&&!xx.test(t)};N1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&gx.test(t[r])&&gx.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var Of=new Nr;Of.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
1746
- `));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var i=0;i<r.length;i++){var l=r[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=l:(this.options.ignoreWhitespace&&(l=l.trim()),t.push(l))}return t};function vA(e,t,r){return Of.diff(e,t,r)}var wA=new Nr;wA.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var kA=new Nr;kA.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function na(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?na=function(t){return typeof t}:na=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}var bA=Object.prototype.toString,pl=new Nr;pl.useLongestToken=!0;pl.tokenize=Of.tokenize;pl.castInput=function(e){var t=this.options,r=t.undefinedReplacement,i=t.stringifyReplacer,l=i===void 0?function(a,u){return typeof u>"u"?r:u}:i;return typeof e=="string"?e:JSON.stringify(zd(e,null,null,l),l," ")};pl.equals=function(e,t){return Nr.prototype.equals.call(pl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function zd(e,t,r,i,l){t=t||[],r=r||[],i&&(e=i(l,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return r[a];var u;if(bA.call(e)==="[object Array]"){for(t.push(e),u=new Array(e.length),r.push(u),a=0;a<e.length;a+=1)u[a]=zd(e[a],t,r,i,l);return t.pop(),r.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),na(e)==="object"&&e!==null){t.push(e),u={},r.push(u);var d=[],f;for(f in e)e.hasOwnProperty(f)&&d.push(f);for(d.sort(),a=0;a<d.length;a+=1)f=d[a],u[f]=zd(e[f],t,r,i,f);t.pop(),r.pop()}else u=e;return u}var Fd=new Nr;Fd.tokenize=function(e){return e.slice()};Fd.join=Fd.removeEmpty=function(e){return e};const nl=({content:e})=>{const[t,r]=$.useState(null),i=async()=>{try{await navigator.clipboard.writeText(e),r("success"),setTimeout(()=>r(null),2e3)}catch{r("error"),setTimeout(()=>r(null),2e3)}};return h.jsxs(A1,{onClick:i,status:t,children:[t===null&&h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[h.jsx("path",{d:"M4 4v8h8V4H4zm1 1h6v6H5V5z"}),h.jsx("path",{d:"M3 3v9h9V3H3zm1 1h7v7H4V4z"})]}),t==="success"&&h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:h.jsx("path",{d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z"})}),t==="error"&&h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:h.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm0 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM6.5 11a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0zm.75-6.5h1.5v4.5h-1.5V4.5z"})})]})},A1=C.button`
1747
- padding: 4px;
1748
- border: 1px solid ${e=>e.theme.colors.border};
1749
- border-radius: 4px;
1750
- background-color: ${e=>{switch(e.status){case"success":return e.theme.colors.diffAdded;case"error":return e.theme.colors.diffRemoved;default:return e.theme.colors.background}}};
1751
- color: ${e=>{switch(e.status){case"success":return e.theme.colors.diffAddedText;case"error":return e.theme.colors.diffRemovedText;default:return e.theme.colors.text}}};
1752
- cursor: pointer;
1753
- transition: background-color 0.2s ease-in-out;
1754
- display: flex;
1755
- align-items: center;
1756
- justify-content: center;
1757
- width: 24px;
1758
- height: 24px;
1759
-
1760
- &:hover {
1761
- background-color: ${e=>e.theme.colors.backgroundHover};
1762
- }
1763
-
1764
- svg {
1765
- width: 16px;
1766
- height: 16px;
1767
- }
1768
- `,SA=({oldContent:e,newContent:t})=>{const[r,i]=$.useState("unified"),l=vA(e??"",t),a=()=>h.jsxs(jA,{children:[h.jsx(nl,{content:t}),l.map((p,x)=>h.jsx(ed,{added:p.added,removed:p.removed,children:p.value},x))]}),u=()=>h.jsxs(TA,{children:[h.jsxs(yx,{children:[e&&h.jsx(nl,{content:e}),l.filter(p=>!p.added).map((p,x)=>h.jsx(ed,{removed:p.removed,children:p.value},x))]}),h.jsxs(yx,{children:[h.jsx(nl,{content:t}),l.filter(p=>!p.removed).map((p,x)=>h.jsx(ed,{added:p.added,children:p.value},x))]})]}),d=()=>h.jsxs(vx,{children:[e&&h.jsx(nl,{content:e}),h.jsx(wx,{children:e})]}),f=()=>h.jsxs(vx,{children:[h.jsx(nl,{content:t}),h.jsx(wx,{children:t})]});return h.jsxs(CA,{children:[h.jsxs(EA,{children:[h.jsx(Us,{active:r==="unified",onClick:()=>i("unified"),children:"Unified"}),h.jsx(Us,{active:r==="sideBySide",onClick:()=>i("sideBySide"),children:"Side by Side"}),h.jsx(Us,{active:r==="old",onClick:()=>i("old"),children:"Old Content"}),h.jsx(Us,{active:r==="new",onClick:()=>i("new"),children:"New Content"})]}),r==="unified"&&a(),r==="sideBySide"&&u(),r==="old"&&d(),r==="new"&&f()]})},CA=C.div`
1769
- margin: 16px 0;
1770
- position: relative;
1771
-
1772
- ${A1} {
1773
- position: absolute;
1774
- right: 20px;
1775
- }
1776
- `,EA=C.div`
1777
- display: flex;
1778
- gap: 8px;
1779
- margin-bottom: 16px;
1780
- `,Us=C.button`
1781
- padding: 4px 8px;
1782
- border: 1px solid ${e=>e.theme.colors.border};
1783
- border-radius: 4px;
1784
- background-color: ${e=>e.active?e.theme.colors.primary:e.theme.colors.background};
1785
- color: ${e=>e.active?e.theme.colors.textOnPrimary:e.theme.colors.text};
1786
- cursor: pointer;
1787
- font-size: 0.8em;
1788
-
1789
- &:hover {
1790
- background-color: ${e=>e.theme.colors.primaryHover};
1791
- }
1792
- `,jA=C.div`
1793
- margin: 16px 0;
1794
- padding: 8px;
1795
- border: 1px solid ${e=>e.theme.colors.border};
1796
- border-radius: 4px;
1797
- background-color: ${e=>e.theme.colors.background};
1798
- max-height: 400px;
1799
- overflow-y: auto;
1800
- `,TA=C.div`
1801
- display: grid;
1802
- grid-template-columns: 1fr 1fr;
1803
- gap: 16px;
1804
- margin: 16px 0;
1805
- `,yx=C.div`
1806
- position: relative;
1807
- padding: 8px;
1808
- border: 1px solid ${e=>e.theme.colors.border};
1809
- border-radius: 4px;
1810
- background-color: ${e=>e.theme.colors.background};
1811
- max-height: 400px;
1812
- overflow-y: auto;
1813
- `,vx=C.div`
1814
- margin: 16px 0;
1815
- padding: 8px;
1816
- border: 1px solid ${e=>e.theme.colors.border};
1817
- border-radius: 4px;
1818
- background-color: ${e=>e.theme.colors.background};
1819
- max-height: 400px;
1820
- overflow-y: auto;
1821
- `,wx=C.div`
1822
- white-space: pre-wrap;
1823
- font-family: monospace;
1824
- font-size: 0.9em;
1825
- line-height: 1.5;
1826
- `,ed=C.div`
1827
- white-space: pre-wrap;
1828
- font-family: monospace;
1829
- font-size: 0.9em;
1830
- line-height: 1.5;
1831
- padding: 2px 4px;
1832
- margin: 2px 0;
1833
- background-color: ${e=>e.added?e.theme.colors.diffAdded:e.removed?e.theme.colors.diffRemoved:"transparent"};
1834
- color: ${e=>e.added?e.theme.colors.diffAddedText:e.removed?e.theme.colors.diffRemovedText:e.theme.colors.text};
1835
- `,Mf=C.div`
1836
- display: flex;
1837
- flex-direction: column;
1838
- gap: 12px;
1839
- width: 100%;
1840
- margin-top: 8px;
1841
- font-size: 0.95em;
1842
- `,eo=C.div`
1843
- border: 1px solid ${e=>e.theme.colors.border};
1844
- border-radius: 6px;
1845
- overflow: hidden;
1846
- background: ${e=>e.theme.colors.backgroundSecondary}11;
1847
- transition: all 0.2s ease;
1848
-
1849
- &:hover {
1850
- border-color: ${e=>e.theme.colors.primary}66;
1851
- }
1852
- `,to=C.div`
1853
- padding: 10px 12px;
1854
- background: ${e=>e.theme.colors.backgroundSecondary}22;
1855
- cursor: pointer;
1856
- user-select: none;
1857
- transition: background-color 0.2s ease;
1858
-
1859
- &:hover {
1860
- background: ${e=>e.theme.colors.backgroundSecondary}44;
1861
- }
1862
- `,no=C.div`
1863
- padding: 12px;
1864
- border-top: 1px solid ${e=>e.theme.colors.border};
1865
- animation: slideDown 0.2s ease;
1866
- color: ${e=>e.theme.colors.textSecondary};
1867
- font-size: 0.95em;
1868
-
1869
- > *:first-child {
1870
- margin-top: 0;
1871
- }
1872
-
1873
- > *:last-child {
1874
- margin-bottom: 0;
1875
- }
1876
-
1877
- p {
1878
- margin: 8px 0;
1879
- }
1880
-
1881
- ul,
1882
- ol {
1883
- padding-left: 20px;
1884
- margin: 8px 0;
1885
- }
1886
-
1887
- li {
1888
- margin-bottom: 4px;
1889
- }
1890
-
1891
- pre {
1892
- background-color: ${e=>e.theme.colors.codeBackground};
1893
- padding: 10px;
1894
- border-radius: 4px;
1895
- font-family: 'Courier New', Courier, monospace;
1896
- white-space: pre-wrap;
1897
- word-wrap: break-word;
1898
- margin: 8px 0;
1899
- }
1900
-
1901
- code {
1902
- font-family: 'Courier New', Courier, monospace;
1903
- background-color: ${e=>e.theme.colors.codeBackground};
1904
- padding: 2px 4px;
1905
- border-radius: 3px;
1906
- font-size: 0.9em;
1907
- }
1908
-
1909
- pre > code {
1910
- background-color: transparent;
1911
- padding: 0;
1912
- border-radius: 0;
1913
- font-size: inherit;
1914
- }
1915
-
1916
- blockquote {
1917
- border-left: 4px solid ${e=>e.theme.colors.border};
1918
- padding-left: 10px;
1919
- margin: 8px 0;
1920
- color: ${e=>e.theme.colors.textSecondary};
1921
- }
1922
-
1923
- @keyframes slideDown {
1924
- from {
1925
- opacity: 0;
1926
- transform: translateY(-10px);
1927
- }
1928
- to {
1929
- opacity: 1;
1930
- transform: translateY(0);
1931
- }
1932
- }
1933
- `,Ho=C.div`
1934
- display: flex;
1935
- align-items: center;
1936
- gap: 8px;
1937
- color: ${e=>e.theme.colors.primary};
1938
- font-weight: 500;
1939
-
1940
- ${e=>e.expanded&&wt`
1941
- margin-bottom: -1px;
1942
- `}
1943
- `,Wo=C.span`
1944
- display: inline-block;
1945
- width: 16px;
1946
- height: 16px;
1947
- line-height: 16px;
1948
- text-align: center;
1949
- font-size: 0.8em;
1950
- transition: transform 0.2s ease;
1951
- `,ga=C.div`
1952
- display: flex;
1953
- flex-direction: column;
1954
- gap: 12px;
1955
- `,xa=C.div`
1956
- padding: 10px;
1957
- border-radius: 4px;
1958
- background: ${e=>e.theme.colors.backgroundSecondary}22;
1959
- border: 1px solid ${e=>e.theme.colors.border};
1960
-
1961
- &:hover {
1962
- border-color: ${e=>e.theme.colors.primary}66;
1963
- }
1964
- `,$A=C.div`
1965
- color: ${e=>e.theme.colors.textSecondary};
1966
- font-size: 0.95em;
1967
- font-weight: 500;
1968
- margin-bottom: 6px;
1969
- margin-top: 8px;
1970
- `,_d=C.div`
1971
- font-family: monospace;
1972
- padding: 4px 8px;
1973
- padding-left: 0px;
1974
- background: ${e=>e.theme.colors.codeBackground};
1975
- border-radius: 3px;
1976
- color: ${e=>e.theme.colors.codeText};
1977
- word-break: break-all;
1978
- `,RA=C.div`
1979
- margin-top: 8px;
1980
- color: ${e=>e.theme.colors.textSecondary};
1981
- font-size: 0.95em;
1982
- line-height: 1.4;
1983
-
1984
- > *:first-child {
1985
- margin-top: 0;
1986
- }
1987
-
1988
- > *:last-child {
1989
- margin-bottom: 0;
1990
- }
1991
-
1992
- p {
1993
- margin: 8px 0;
1994
- }
1995
-
1996
- ul,
1997
- ol {
1998
- padding-left: 20px;
1999
- margin: 8px 0;
2000
- }
2001
-
2002
- li {
2003
- margin-bottom: 4px;
2004
- }
2005
-
2006
- pre {
2007
- background-color: ${e=>e.theme.colors.codeBackground};
2008
- padding: 10px;
2009
- border-radius: 4px;
2010
- font-family: 'Courier New', Courier, monospace;
2011
- white-space: pre-wrap;
2012
- word-wrap: break-word;
2013
- margin: 8px 0;
2014
- }
2015
-
2016
- code {
2017
- font-family: 'Courier New', Courier, monospace;
2018
- background-color: ${e=>e.theme.colors.codeBackground};
2019
- padding: 2px 4px;
2020
- border-radius: 3px;
2021
- font-size: 0.9em;
2022
- }
2023
-
2024
- pre > code {
2025
- background-color: transparent;
2026
- padding: 0;
2027
- border-radius: 0;
2028
- font-size: inherit;
2029
- }
2030
-
2031
- blockquote {
2032
- border-left: 4px solid ${e=>e.theme.colors.border};
2033
- padding-left: 10px;
2034
- margin: 8px 0;
2035
- color: ${e=>e.theme.colors.textSecondary};
2036
- }
2037
- `,IA=C.div`
2038
- font-size: 0.9em;
2039
- color: ${e=>e.theme.colors.textSecondary};
2040
- `,PA=C.div`
2041
- margin-top: 4px;
2042
- font-family: monospace;
2043
- color: ${e=>e.theme.colors.info};
2044
- `,Od=C.div`
2045
- display: inline-block;
2046
- margin-left: 8px;
2047
- padding: 2px 6px;
2048
- border-radius: 3px;
2049
- background: ${e=>e.theme.colors.backgroundSecondary}22;
2050
- border: 1px solid ${e=>e.theme.colors.border};
2051
- color: ${e=>e.theme.colors.textSecondary};
2052
- font-size: 0.85em;
2053
- cursor: pointer;
2054
- transition: all 0.2s ease;
2055
-
2056
- &:hover {
2057
- background: ${e=>e.theme.colors.backgroundSecondary}44;
2058
- border-color: ${e=>e.theme.colors.primary}66;
2059
- }
2060
- `,L1=C.div`
2061
- margin-top: 8px;
2062
- padding: 8px;
2063
- border-radius: 4px;
2064
- background: ${e=>e.theme.colors.backgroundSecondary}22;
2065
- border: 1px solid ${e=>e.theme.colors.border};
2066
- animation: slideDown 0.2s ease;
2067
- `;C.pre`
2068
- margin: 0;
2069
- padding: 12px;
2070
- background: ${e=>e.theme.colors.codeBackground};
2071
- border-radius: 4px;
2072
- color: ${e=>e.theme.colors.codeText};
2073
- font-family: monospace;
2074
- font-size: 0.9em;
2075
- line-height: 1.4;
2076
- overflow-x: auto;
2077
- white-space: pre-wrap;
2078
- word-wrap: break-word;
2079
- `;const NA=(e,t)=>{switch(e){case"createFile":return wt`
2080
- background: ${t.colors.info}22;
2081
- color: ${t.colors.info};
2082
- border-color: ${t.colors.info}44;
2083
- `;case"updateFile":return wt`
2084
- background: ${t.colors.primary}22;
2085
- color: ${t.colors.primary};
2086
- border-color: ${t.colors.primary}44;
2087
- `;case"deleteFile":return wt`
2088
- background: ${t.colors.error}22;
2089
- color: ${t.colors.error};
2090
- border-color: ${t.colors.error}44;
2091
- `;case"moveFile":return wt`
2092
- background: ${t.colors.warning}22;
2093
- color: ${t.colors.warning};
2094
- border-color: ${t.colors.warning}44;
2095
- `;case"temperature":return wt`
2096
- background: ${t.colors.success}22;
2097
- color: ${t.colors.success};
2098
- border-color: ${t.colors.success}44;
2099
- margin-left: auto;
2100
- `;case"cheap":return wt`
2101
- background: ${t.colors.secondary}22;
2102
- color: ${t.colors.secondary};
2103
- border-color: ${t.colors.secondary}44;
2104
- `;default:return wt`
2105
- background: ${t.colors.secondary}22;
2106
- color: ${t.colors.secondary};
2107
- border-color: ${t.colors.secondary}44;
2108
- `}},al=C.div`
2109
- display: inline-block;
2110
- padding: 2px 8px;
2111
- border-radius: 3px;
2112
- font-size: 0.85em;
2113
- font-weight: 500;
2114
- margin-bottom: 6px;
2115
- border: 1px solid;
2116
- ${e=>NA(e.variant,e.theme)}
2117
- `;C.div`
2118
- margin-top: 8px;
2119
- font-size: 0.9em;
2120
- color: ${e=>e.theme.colors.textSecondary};
2121
- `;const z1=C.div`
2122
- display: flex;
2123
- gap: 8px;
2124
- align-items: center;
2125
- flex-wrap: wrap;
2126
- `,AA=({data:{fileUpdates:e}})=>h.jsx("div",{children:e.map((t,r)=>h.jsx(Df,{data:{name:t.name,args:t.args}},r))}),Df=({data:{name:e,args:{filePath:t,explanation:r,oldContent:i,newContent:l}}})=>{const[a,u]=$.useState(!0),[d,f]=$.useState(!1);return h.jsxs(zA,{children:[h.jsxs(FA,{children:[h.jsx(al,{variant:e,children:e}),h.jsx(P1,{children:t}),h.jsxs(_A,{children:[h.jsx(bx,{onClick:()=>u(!a),children:a?"Hide Explanation":"Explanation"}),(i||l)&&h.jsx(bx,{onClick:()=>f(!d),children:d?"Hide Diff":"Show Diff"})]})]}),a&&r&&h.jsx(OA,{children:h.jsx(lo,{remarkPlugins:[so],children:r})}),d&&h.jsx(MA,{children:h.jsx(SA,{oldContent:i,newContent:l})})]})},LA=["updateFile","createFile","patchFile","createDirectory","deleteFile","moveFile","downloadFile","splitImage","resizeImage","imglyRemoveBackground"];function ya(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.name!="string"||!LA.includes(t.name)?!1:typeof t.args.filePath=="string"}function kx(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.fileUpdates)&&t.fileUpdates.every(ya)}const zA=C.div`
2127
- margin: 16px 0;
2128
- padding: 16px;
2129
- border: 1px solid ${e=>e.theme.colors.border};
2130
- border-radius: 8px;
2131
- background-color: ${e=>e.theme.colors.background};
2132
- `,FA=C.div`
2133
- display: flex;
2134
- gap: 8px;
2135
- align-items: center;
2136
- `,_A=C.div`
2137
- display: flex;
2138
- gap: 8px;
2139
- margin-left: auto;
2140
- `,bx=C.button`
2141
- padding: 4px 8px;
2142
- border: 1px solid ${e=>e.theme.colors.border};
2143
- border-radius: 4px;
2144
- background-color: ${e=>e.theme.colors.background};
2145
- cursor: pointer;
2146
- font-size: 0.8em;
2147
- color: ${e=>e.theme.colors.text};
2148
-
2149
- &:hover {
2150
- background-color: ${e=>e.theme.colors.backgroundHover};
2151
- }
2152
- `,OA=C.div`
2153
- margin-top: 8px;
2154
- padding: 8px;
2155
- border: 1px solid ${e=>e.theme.colors.border};
2156
- border-radius: 4px;
2157
- background-color: ${e=>e.theme.colors.background};
2158
- font-size: 0.9em;
2159
- line-height: 1.5;
2160
- `,MA=C.div`
2161
- margin: 16px 0;
2162
- `,DA=C.div`
2163
- display: grid;
2164
- grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
2165
- gap: 8px;
2166
- max-width: 800px;
2167
- margin: 8px 0;
2168
- `,BA=C.div`
2169
- position: relative;
2170
- width: 100%;
2171
- padding-bottom: 100%; /* Creates a square aspect ratio */
2172
- `,UA=C.img`
2173
- position: absolute;
2174
- top: 0;
2175
- left: 0;
2176
- width: 100%;
2177
- height: 100%;
2178
- object-fit: contain;
2179
- border-radius: 4px;
2180
- background-color: rgba(0, 0, 0, 0.05);
2181
- `,VA=({message:e,visibleDataIds:t,toggleDataVisibility:r})=>{var A;const{updateMessage:i}=cn(),[l,a]=$.useState(!1),[u,d]=$.useState(e.content),[f,p]=$.useState(!1),[x,m]=$.useState(null),v=$.useRef(null);$.useEffect(()=>{l&&v.current&&(v.current.focus(),v.current.selectionStart=v.current.value.length,v.current.selectionEnd=v.current.value.length)},[l]);const w=()=>{d(e.content),a(!0),m(null)},k=()=>{a(!1),d(e.content),m(null)},S=F=>F.trim()?F===e.content?(m("No changes made to the message"),!1):!0:(m("Message content cannot be empty"),!1),j=async()=>{if(S(u)){p(!0),m(null);try{await Zd(e.id,u),i(e.id,{content:u}),a(!1)}catch(F){m(F instanceof Error?F.message:"Failed to save changes")}finally{p(!1)}}},E=F=>{F.key==="Enter"&&F.ctrlKey?j():F.key==="Escape"&&k()},I=e.type!=="system"&&((A=e.flags)==null?void 0:A.includes(tf.MESSAGE_EDITABLE));return h.jsx(ai,{"data-type":e.type,children:h.jsxs($1,{"data-edit-mode":l,children:[h.jsxs(sA,{children:[h.jsx("div",{children:e.type==="user"?"You":"Assistant"}),I&&!l&&h.jsx(Lf,{onClick:w,title:"Edit message",children:"✎"})]}),l?h.jsxs(h.Fragment,{children:[h.jsx(Vo,{ref:v,value:u,onChange:F=>d(F.target.value),onKeyDown:E,placeholder:"Enter your message..."}),x&&h.jsx("div",{style:{color:"red",fontSize:"0.8em",marginTop:"4px"},children:x}),h.jsxs(Nf,{children:[h.jsx(zf,{onClick:j,disabled:f,children:f?h.jsx(_f,{}):"Save"}),h.jsx(Ff,{onClick:k,disabled:f,children:"Cancel"})]})]}):h.jsx(R1,{children:h.jsx(lo,{remarkPlugins:[so],children:e.content})}),e.executableCode&&h.jsxs(dA,{children:[h.jsxs(fA,{children:["Executable Code (",e.executableCode.language,")"]}),h.jsx(pA,{children:h.jsx("pre",{children:h.jsx("code",{children:e.executableCode.code})})})]}),e.codeExecutionResult&&h.jsxs(hA,{outcome:e.codeExecutionResult.outcome,children:[h.jsxs(mA,{children:["Execution Result: ",e.codeExecutionResult.outcome]}),h.jsxs(gA,{children:[h.jsx("pre",{children:e.codeExecutionResult.output}),e.codeExecutionResult.outputFiles&&e.codeExecutionResult.outputFiles.length>0&&h.jsxs("div",{style:{marginTop:"8px",fontSize:"0.9em"},children:[h.jsx("strong",{children:"Generated Files:"}),h.jsx("ul",{children:e.codeExecutionResult.outputFiles.map(F=>h.jsx("li",{children:F.filename},F.fileId))})]})]})]}),e.images&&e.images.length>0&&h.jsx(DA,{children:e.images.map((F,O)=>h.jsx(BA,{children:h.jsx(UA,{src:`data:${F.mediaType};base64,${F.base64url}`,alt:F.originalName||`Image ${O+1}`,title:F.originalName||`Image ${O+1}`})},O))}),h.jsxs(aA,{children:[h.jsx("div",{children:e.data?h.jsx(cA,{onClick:()=>r(e.id),children:t.has(e.id)?"Hide data":"Show data"}):null}),h.jsxs("div",{children:[e.timestamp&&e.type==="assistant"&&e.data&&"contextSize"in e.data&&h.jsx(I1,{messages:[e]}),h.jsx(uA,{children:e.timestamp.toLocaleString()})]})]}),t.has(e.id)&&e.data?h.jsx(h.Fragment,{children:ya(e.data)?h.jsx(Df,{data:e.data}):h.jsx(S0,{data:e.data})}):null]})})},Sx=C.div`
2182
- background-color: ${e=>e.theme.colors.systemMessageBackground};
2183
- color: ${e=>e.theme.colors.systemMessageText};
2184
- border: 1px solid ${e=>e.theme.colors.systemMessageBorder};
2185
- border-radius: 8px;
2186
- padding: 8px 12px;
2187
- margin: 8px 0;
2188
- font-style: italic;
2189
- font-size: 0.9em;
2190
- opacity: 0.8;
2191
- transition: margin 0.2s ease-in-out;
2192
-
2193
- /* Increase bottom margin when followed by a codegen view */
2194
- & + div {\n margin-top: 16px;
2195
- }\n
2196
- ${e=>e.isExecutionEnd&&`
2197
- border-bottom: 3px solid ${e.theme.colors.primary};
2198
- `}\n`,Cx=C.div`
2199
- cursor: pointer;
2200
- font-weight: bold;
2201
- margin-bottom: 8px;
2202
- display: flex;
2203
- align-items: center;
2204
- gap: 4px;
2205
-
2206
- &:hover {\n opacity: 0.8;
2207
- }\n`,HA=C.div`
2208
- white-space: pre-wrap;
2209
- word-wrap: break-word;
2210
- font-family: inherit;
2211
- margin: 0;
2212
-
2213
- /* Add spacing between content sections */
2214
- & > *:not(:last-child) {\n margin-bottom: 12px;
2215
- }\n`,WA=C.div`
2216
- margin-bottom: 8px;
2217
- position: relative;
2218
- padding-right: 150px; /* Space for timestamp and data link */
2219
-
2220
- &:last-child {\n margin-bottom: 0;
2221
- }\n`,qA=C.div`
2222
- font-size: 0.8em;
2223
- color: ${e=>e.theme.colors.systemMessageTimestamp};
2224
- position: absolute;
2225
- right: 60px;
2226
- top: 0;
2227
- `,GA=C.span`
2228
- font-size: 0.8em;
2229
- color: ${e=>e.theme.colors.primary};
2230
- cursor: pointer;
2231
- text-decoration: underline;
2232
- position: absolute;
2233
- right: 0;
2234
- top: 0;
2235
-
2236
- &:hover {\n color: ${e=>e.theme.colors.primaryHover};\n }\n`,JA=({messageId:e,data:t})=>{const{updateMessage:r}=cn(),[i,l]=$.useState({analysis:!0,changes:!0,files:!0}),[a,u]=$.useState({}),[d,f]=$.useState(!1),[p,x]=$.useState({...t.args}),[m,v]=$.useState(!1),[w,k]=$.useState(null),S=O=>{l(N=>({...N,[O]:!N[O]}))},j=O=>{u(N=>({...N,[O]:!N[O]}))},E=()=>{x({...t.args}),f(!0),k(null)},I=()=>{f(!1),x({...t.args}),k(null)},A=async()=>{v(!0),k(null);try{const O={...t,args:p};await Zd(e,void 0,O),r(e,{data:O}),f(!1)}catch(O){k(O instanceof Error?O.message:"Failed to save changes")}finally{v(!1)}},F=(O,N)=>{const H=[...p.affectedFiles];H[O]={...H[O],reason:N},x({...p,affectedFiles:H})};return h.jsxs(Mf,{children:[h.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"8px"},children:d?h.jsxs(Nf,{children:[h.jsx(zf,{onClick:A,disabled:m,children:m?h.jsx(_f,{}):"Save"}),h.jsx(Ff,{onClick:I,disabled:m,children:"Cancel"})]}):h.jsx(Lf,{onClick:E,title:"Edit planning",children:"✎ Edit"})}),w&&h.jsx("div",{style:{color:"red",fontSize:"0.8em",marginBottom:"8px"},children:w}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>S("analysis"),children:h.jsxs(Ho,{expanded:i.analysis,children:[h.jsx(Wo,{children:i.analysis?"▼":"▶"}),"Problem Analysis"]})}),i.analysis&&h.jsx(no,{children:d?h.jsx(Vo,{value:p.problemAnalysis,onChange:O=>x({...p,problemAnalysis:O.target.value}),placeholder:"Problem Analysis...",rows:5}):h.jsx(lo,{remarkPlugins:[so],children:t.args.problemAnalysis})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>S("changes"),children:h.jsxs(Ho,{expanded:i.changes,children:[h.jsx(Wo,{children:i.changes?"▼":"▶"}),"Implementation Plan"]})}),i.changes&&h.jsx(no,{children:d?h.jsx(Vo,{value:p.codeChanges,onChange:O=>x({...p,codeChanges:O.target.value}),placeholder:"Implementation Plan...",rows:10}):h.jsx(lo,{remarkPlugins:[so],children:t.args.codeChanges})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>S("files"),children:h.jsxs(Ho,{expanded:i.files,children:[h.jsx(Wo,{children:i.files?"▼":"▶"}),"Affected Files"]})}),i.files&&h.jsx(no,{children:h.jsx(ga,{children:(d?p.affectedFiles:t.args.affectedFiles).map((O,N)=>h.jsxs(xa,{children:[h.jsxs(_d,{children:[O.filePath,O.dependencies&&O.dependencies.length>0&&h.jsxs(Od,{onClick:()=>j(O.filePath),title:"Dependencies",children:["(",O.dependencies.length,")"]})]}),O.dependencies&&O.dependencies.length>0&&a[O.filePath]&&h.jsx(L1,{children:h.jsxs(IA,{children:["Dependencies:",O.dependencies.map((H,K)=>h.jsx(PA,{children:H},K))]})}),d?h.jsx(Vo,{value:O.reason,onChange:H=>F(N,H.target.value),placeholder:"Reason...",rows:2,style:{marginTop:"4px"}}):h.jsx($A,{children:O.reason})]},N))})})]})]})};function Ex(e){if(typeof e!="object"||e===null)return!1;const t=e;if(!t.args||typeof t.args!="object"||t.args===null)return!1;const r=t.args;return typeof r.problemAnalysis=="string"&&typeof r.codeChanges=="string"&&Array.isArray(r.affectedFiles)&&r.affectedFiles.every(i=>typeof i=="object"&&i!==null&&typeof i.reason=="string"&&typeof i.filePath=="string")}const KA=({messageId:e,data:t})=>{const{updateMessage:r}=cn(),[i,l]=$.useState({explanation:!0,updates:!0,context:!1}),[a,u]=$.useState(!1),[d,f]=$.useState({...t.args}),[p,x]=$.useState(!1),[m,v]=$.useState(null),w=I=>{l(A=>({...A,[I]:!A[I]}))},k=()=>{f({...t.args}),u(!0),v(null)},S=()=>{u(!1),f({...t.args}),v(null)},j=async()=>{x(!0),v(null);try{const I={...t,args:d};await Zd(e,"",I),r(e,{data:I}),u(!1)}catch(I){v(I instanceof Error?I.message:"Failed to save changes")}finally{x(!1)}},E=(I,A)=>{const F=[...d.fileUpdates];F[I]={...F[I],prompt:A},f({...d,fileUpdates:F})};return h.jsxs(Mf,{children:[h.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"8px"},children:a?h.jsxs(Nf,{children:[h.jsx(zf,{onClick:j,disabled:p,children:p?h.jsx(_f,{}):"Save"}),h.jsx(Ff,{onClick:S,disabled:p,children:"Cancel"})]}):h.jsx(Lf,{onClick:k,title:"Edit summary",children:"✎ Edit"})}),m&&h.jsx("div",{style:{color:"red",fontSize:"0.8em",marginBottom:"8px"},children:m}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>w("explanation"),children:h.jsxs(Ho,{expanded:i.explanation,children:[h.jsx(Wo,{children:i.explanation?"▼":"▶"}),"Explanation"]})}),i.explanation&&h.jsx(no,{children:a?h.jsx(Vo,{value:d.explanation,onChange:I=>f({...d,explanation:I.target.value}),placeholder:"Explanation...",rows:5}):h.jsx(lo,{remarkPlugins:[so],children:t.args.explanation})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>w("updates"),children:h.jsxs(Ho,{expanded:i.updates,children:[h.jsx(Wo,{children:i.updates?"▼":"▶"}),"File Updates (",t.args.fileUpdates.length,")"]})}),i.updates&&h.jsx(no,{children:h.jsx(ga,{children:(a?d.fileUpdates:t.args.fileUpdates).map((I,A)=>{var F;return h.jsxs(xa,{id:"file-update-"+I.id,children:[h.jsxs(z1,{children:[h.jsx(al,{variant:I.updateToolName,children:I.updateToolName}),h.jsx(_d,{children:I.filePath}),h.jsx(Od,{onClick:()=>w(I.id),children:I.id}),I.temperature&&h.jsx(al,{variant:"temperature",title:"Temperature",children:I.temperature}),I.cheap&&h.jsx(al,{variant:"cheap",title:"Use cheaper model",children:"Cheap"})]}),I.dependsOn&&i[I.id]&&h.jsxs(L1,{children:["Depends on:"," ","\\n ",(F=I.dependsOn)==null?void 0:F.map(O=>h.jsx(Od,{onClick:()=>{var N;return(N=document.getElementById("file-update-"+O))==null?void 0:N.scrollIntoView()},children:O},O))]}),a?h.jsx(Vo,{value:I.prompt,onChange:O=>E(A,O.target.value),placeholder:"Prompt...",rows:3,style:{marginTop:"8px"}}):h.jsx(RA,{title:"Prompt",children:h.jsx(lo,{remarkPlugins:[so],children:I.prompt})})]},A)})})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>w("context"),children:h.jsxs(Ho,{expanded:i.context,children:[h.jsx(Wo,{children:i.context?"▼":"▶"}),"Context Paths (",t.args.contextPaths.length,")"]})}),i.context&&h.jsx(no,{children:h.jsx(ga,{children:t.args.contextPaths.map((I,A)=>h.jsx(xa,{children:h.jsx(_d,{children:I})},A))})})]})]})};function jx(e){if(typeof e!="object"||e===null)return!1;const t=e;if(!t.args||typeof t.args!="object"||t.args===null)return!1;const r=t.args;return typeof r.explanation=="string"&&Array.isArray(r.fileUpdates)&&Array.isArray(r.contextPaths)&&r.fileUpdates.every(i=>typeof i=="object"&&i!==null&&typeof i.prompt=="string"&&typeof i.filePath=="string"&&typeof i.updateToolName=="string")}const QA=C(al)``;C.div`
2237
- margin-top: 8px;
2238
- padding: 12px;
2239
- border-radius: 4px;
2240
- background: ${e=>e.theme.colors.backgroundSecondary}22;
2241
- border: 1px solid ${e=>e.theme.colors.border};
2242
- animation: slideDown 0.2s ease;
2243
-
2244
- pre {
2245
- margin: 0;
2246
- padding: 0;
2247
- background: transparent;
2248
- font-family: 'Courier New', Courier, monospace;
2249
- font-size: 0.9em;
2250
- white-space: pre-wrap;
2251
- word-wrap: break-word;
2252
- color: ${e=>e.theme.colors.textSecondary};
2253
- }
2254
-
2255
- @keyframes slideDown {
2256
- from {
2257
- opacity: 0;
2258
- transform: translateY(-10px);
2259
- }
2260
- to {
2261
- opacity: 1;
2262
- transform: translateY(0);
2263
- }
2264
- }
2265
- `;function Tx(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.summary=="string"&&Array.isArray(t.actions)&&t.actions.every(r=>typeof r=="object"&&r!==null&&typeof r.name=="string"&&typeof r.filePath=="string")}const YA=({data:e})=>h.jsx(Mf,{children:h.jsxs(eo,{children:[h.jsxs(to,{children:["Inferred Actions (",e.actions.length,")"]}),h.jsxs(no,{children:[e.summary&&h.jsx(lo,{remarkPlugins:[so],children:e.summary}),h.jsx(ga,{children:e.actions.map((t,r)=>h.jsx(xa,{children:h.jsxs(z1,{children:[h.jsx(QA,{variant:t.name,children:t.name}),h.jsx(P1,{children:t.filePath})]})},r))})]})]})}),XA=({message:e,collapsedExecutions:t,toggleExecutionCollapse:r,visibleDataIds:i,toggleDataVisibility:l})=>t.has(e.id)?h.jsx(Sx,{isExecutionEnd:e.isExecutionEnd,children:h.jsxs(Cx,{onClick:()=>r(e.id),children:["▶ Execution ",e.id.split("_")[1]]})}):ZA(e.parts).map((u,d)=>u.parts.length>0?h.jsxs(Sx,{isExecutionEnd:e.isExecutionEnd,children:[h.jsxs(Cx,{onClick:()=>r(e.id),children:["▼ Execution ",e.id.split("_")[1]]}),h.jsx(HA,{children:u.parts.map(f=>h.jsxs(WA,{children:[f.content,h.jsx(qA,{children:f.timestamp.toLocaleString()}),f.data?h.jsx(GA,{onClick:()=>l(f.id),children:i.has(f.id)?"Hide data":"Show data"}):null,i.has(f.id)&&f.data?h.jsx(S0,{data:f.data}):null]},f.id))})]},`section-${d}`):u.codegenView?h.jsx(Tt.Fragment,{children:u.codegenView},`view-${d}`):null);function ZA(e){const t=[];let r=[];return t.push({parts:r}),e.forEach(i=>{if(r.push(i),Ex(i.data)||jx(i.data)||ya(i.data)||kx(i.data)||Tx(i.data)){const l=Ex(i.data)?h.jsx(JA,{messageId:i.id,data:i.data},`planning-${i.id}`):jx(i.data)?h.jsx(KA,{messageId:i.id,data:i.data},`summary-${i.id}`):ya(i.data)?h.jsx(Df,{data:i.data},`file-update-${i.id}`):kx(i.data)?h.jsx(AA,{data:i.data}):Tx(i.data)?h.jsx(YA,{data:i.data}):null;t.push({parts:[],codegenView:l}),r=[],t.push({parts:r})}}),t}const e5=C.div`
2266
- display: flex;
2267
- flex-direction: column;
2268
- height: 100%;
2269
- background-color: ${e=>e.theme.colors.background};
2270
- position: relative;
2271
- overflow: hidden;
2272
- `,t5=C.div`
2273
- display: flex;
2274
- flex-direction: column;
2275
- gap: 16px;
2276
- padding: 16px;
2277
- overflow-y: auto;
2278
- flex-grow: 1;
2279
- max-height: calc(100% - 60px); // Adjust this value based on the height of your UnreadMessagesNotification
2280
- margin-bottom: 60px; // This should match the height of UnreadMessagesNotification plus its bottom margin
2281
- `,n5=C.div`
2282
- display: flex;
2283
- flex-direction: column;
2284
- gap: 8px;
2285
- border: 1px solid ${e=>e.theme.colors.border};
2286
- border-radius: 8px;
2287
- margin-bottom: 24px;
2288
- `,r5=C.div`
2289
- font-size: 16px;
2290
- font-weight: bold;
2291
- color: ${e=>e.theme.colors.text};
2292
- background-color: ${e=>e.theme.colors.backgroundSecondary};
2293
- padding: 12px 16px;
2294
- border-bottom: 1px solid ${e=>e.theme.colors.border};
2295
- border-top-left-radius: 8px;
2296
- border-top-right-radius: 8px;
2297
- display: flex;
2298
- justify-content: space-between;
2299
- align-items: center;
2300
- cursor: pointer;
2301
- position: sticky;
2302
- top: -22px;
2303
- z-index: 10;
2304
-
2305
- /* Wrap title in a div to control its layout */
2306
- > .title-wrapper {
2307
- display: flex;
2308
- align-items: start;
2309
- flex-grow: 1;
2310
- overflow: hidden; /* Ensure long text doesn't overflow */
2311
- }
2312
-
2313
- > .title {
2314
- display: flex;
2315
- align-items: start;
2316
- white-space: nowrap; /* Prevent text wrapping */
2317
- overflow: hidden; /* Hide overflowing text */
2318
- text-overflow: ellipsis; /* Add ellipsis for overflow */
2319
- }
2320
-
2321
- /* Wrap meta in a div for consistent layout */
2322
- > .meta-wrapper {
2323
- display: flex;
2324
- align-items: center; /* Align meta content vertically */
2325
- flex-shrink: 0; /* Prevent meta from shrinking */
2326
- margin-left: auto; /* Push meta to the right */
2327
- }
2328
-
2329
- > .meta {
2330
- font-size: 12px;
2331
- font-weight: normal;
2332
- color: ${e=>e.theme.colors.textSecondary};
2333
- display: flex;
2334
- flex-direction: row;
2335
- align-items: center;
2336
- gap: 10px;
2337
- white-space: nowrap;
2338
- overflow: visible;
2339
- text-overflow: ellipsis;
2340
- }
2341
- `,o5=C.button`
2342
- display: flex;
2343
- justify-content: center;
2344
- align-items: center;
2345
- background-color: transparent;
2346
- border: none;
2347
- color: ${e=>e.theme.colors.textSecondary};
2348
- cursor: pointer;
2349
- font-size: 16px;
2350
- padding: 4px 8px;
2351
- border-radius: 4px;
2352
- margin-left: 8px;
2353
- z-index: 11;
2354
- position: relative;
2355
- min-width: 24px;
2356
- flex-shrink: 0; /* Prevent the button from shrinking */
2357
-
2358
- &:hover {
2359
- background-color: ${e=>e.theme.colors.backgroundSecondary};
2360
- color: ${e=>e.theme.colors.error};
2361
- }
2362
- `,i5=C.div`
2363
- display: ${e=>e.isCollapsed?"none":"flex"};
2364
- flex-direction: column;
2365
- gap: 8px;
2366
- padding: 16px;
2367
- `,l5=C.p`
2368
- font-size: 14px;
2369
- color: ${e=>e.theme.colors.textSecondary};
2370
- background-color: ${e=>e.theme.colors.backgroundTertiary};
2371
- padding: 8px;
2372
- border-radius: 4px;
2373
- margin: 0 0 16px 0;
2374
- `;C.div`
2375
- margin-bottom: 16px;
2376
-
2377
- &:last-child {
2378
- margin-bottom: 0;
2379
- }
2380
- `;const s5=C.span`
2381
- &:before {
2382
- content: '▼';
2383
- margin-right: 8px;
2384
- }
2385
- `,a5=C.span`
2386
- &:before {
2387
- content: '▶';
2388
- margin-right: 8px;
2389
- }
2390
- `;C.span`
2391
- color: ${e=>e.theme.colors.primary};
2392
- cursor: pointer;
2393
- margin-right: 8px;
2394
-
2395
- &:hover {
2396
- text-decoration: underline;
2397
- }
2398
- `;const u5=C.div`
2399
- // TODO
2400
- `;function c5(e){return $.useMemo(()=>{const t=[];let r=null,i=null,l=0;return e.sort((a,u)=>a.iterationId<u.iterationId?-1:1).forEach((a,u)=>{var d;(!r||a.iterationId!==r.iterationId)&&(r&&(r.timestampEnd=new Date(a.timestamp),t.push(r)),r={iterationId:a.iterationId,timestampStart:new Date(a.timestamp),timestampEnd:new Date(a.timestamp),conversationSummaries:[],messages:[]}),(d=a.flags)!=null&&d.includes(tf.CONVERSATION_SUMMARY)&&a.data&&(r.conversationSummaries.push(a.data),r.iterationTitle=a.data),a.type===Hn.SYSTEM?i?i.parts.push(a):(l++,i={...a,type:Hn.SYSTEM,parts:[a],id:`execution_${l}`,isExecutionEnd:u===e.length-1||e[u+1].type!==Hn.SYSTEM},r.messages.push(i)):(i&&(i.isExecutionEnd=!0),i=null,r.messages.push(a)),r.timestampEnd=new Date(a.timestamp)}),r&&t.push(r),t.sort((a,u)=>a.timestampStart.getTime()-u.timestampStart.getTime())},[e])}const d5=({onClick:e})=>h.jsxs(p5,{onClick:e,children:[h.jsx(h5,{children:"New messages"}),h.jsx(td,{}),h.jsx(td,{}),h.jsx(td,{})]}),f5=ti`
2401
- 0%, 80%, 100% {
2402
- transform: scale(0.8);
2403
- }
2404
- 40% {
2405
- transform: scale(1.2);
2406
- }
2407
- `,p5=C.div`
2408
- display: flex;
2409
- justify-content: center;
2410
- align-items: center;
2411
- padding: 10px;
2412
- background-color: ${e=>e.theme.colors.primary};
2413
- color: ${e=>e.theme.colors.text};
2414
- border-radius: 20px;
2415
- position: absolute;
2416
- bottom: 20px;
2417
- left: 50%;
2418
- transform: translateX(-50%);
2419
- cursor: pointer;
2420
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
2421
- transition: all 0.3s ease;
2422
- z-index: 10;
2423
-
2424
- &:hover {
2425
- background-color: ${e=>e.theme.colors.primaryHover};
2426
- }
2427
- `,h5=C.span`
2428
- margin-right: 10px;
2429
- font-weight: bold;
2430
- `,td=C.div`
2431
- width: 8px;
2432
- height: 8px;
2433
- background-color: ${e=>e.theme.colors.text};
2434
- border-radius: 50%;
2435
- margin: 0 2px;
2436
- animation: ${f5} 1.4s infinite ease-in-out both;
2437
-
2438
- &:nth-child(2) {
2439
- animation-delay: -0.32s;
2440
- }
2441
-
2442
- &:nth-child(3) {
2443
- animation-delay: -0.16s;
2444
- }
2445
- `,m5=C.div`
2446
- position: relative;
2447
- width: 100%;
2448
- `,g5=C.textarea`
2449
- width: 100%;
2450
- min-height: 60px;
2451
- resize: none;
2452
- padding: 8px;
2453
- border: 1px solid ${e=>e.theme.colors.border};
2454
- border-radius: 4px;
2455
- font-family: inherit;
2456
- font-size: 14px;
2457
- background-color: ${e=>e.theme.colors.inputBg};
2458
- color: ${e=>e.theme.colors.inputText};
2459
- box-sizing: border-box;
2460
- /* Allow vertical scrolling when content exceeds max height, keep horizontal hidden */
2461
- overflow-x: hidden;
2462
- overflow-y: auto;
2463
- -webkit-overflow-scrolling: touch;
2464
-
2465
- &:focus {
2466
- outline: none;
2467
- border-color: ${e=>e.theme.colors.primary};
2468
- }
2469
- `,F1=({value:e,onChange:t,onKeyDown:r,onPaste:i,onImagePaste:l,maxViewportHeight:a=.5,...u})=>{const d=$.useRef(null);$.useEffect(()=>{const x=d.current;if(!x)return;const m=()=>{x.style.height="auto";const w=x.scrollHeight,k=a*window.innerHeight,S=Math.min(w,k);x.style.height=`${S}px`,x.style.overflowY=w<=k?"hidden":"auto"};m();const v=()=>m();return window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[e,a]);const f=x=>{t(x.target.value)},p=x=>{var v;const m=(v=x.clipboardData)==null?void 0:v.items;if(m){for(let w=0;w<m.length;w++)if(m[w].type.indexOf("image")!==-1){x.preventDefault();const k=m[w].getAsFile();if(k){const S=new File([k],`pasted-image-${Date.now()}.png`,{type:"image/png"});l==null||l(S)}break}}i==null||i(x)};return h.jsx(m5,{children:h.jsx(g5,{ref:d,value:e,onChange:f,onKeyDown:r,onPaste:p,...u})})},x5=5*1024*1024,$x=["image/jpeg","image/png","image/gif","image/webp"],Rx=5,_1=({images:e,onImagesChange:t,error:r,setError:i,fileInputRef:l})=>{const a=d=>{const p=Array.from(d.target.files||[]).filter(x=>$x.includes(x.type)?x.size>x5?(i(`File too large: ${x.name}. Maximum size is 5MB.`),!1):!0:(i(`Invalid file type: ${x.name}. Allowed types are JPEG, PNG, GIF, and WebP.`),!1));if(p.length+e.length>Rx){i(`Too many images. Maximum ${Rx} images allowed.`);return}t([...e,...p]),i(null)},u=d=>{const f=e.filter((p,x)=>x!==d);t(f)};return h.jsxs(y5,{children:[r&&h.jsx(v5,{children:r}),h.jsx(w5,{children:e.map((d,f)=>h.jsxs(k5,{children:[h.jsx("img",{src:URL.createObjectURL(d),alt:`Uploaded ${f+1}`}),h.jsx(b5,{onClick:()=>u(f),children:"×"})]},f))}),h.jsx("input",{type:"file",ref:l,style:{display:"none"},onChange:a,accept:$x.join(","),multiple:!0})]})},y5=C.div`
2470
- margin-bottom: 8px;
2471
- `,v5=C.div`
2472
- color: ${e=>e.theme.colors.error};
2473
- font-size: 14px;
2474
- margin-bottom: 8px;
2475
- `,w5=C.div`
2476
- display: flex;
2477
- flex-wrap: wrap;
2478
- gap: 8px;
2479
- `,k5=C.div`
2480
- position: relative;
2481
- width: 60px;
2482
- height: 60px;
2483
-
2484
- img {
2485
- width: 100%;
2486
- height: 100%;
2487
- object-fit: cover;
2488
- border-radius: 4px;
2489
- }
2490
- `,b5=C.button`
2491
- position: absolute;
2492
- top: -8px;
2493
- right: -8px;
2494
- background-color: ${e=>e.theme.colors.error};
2495
- color: white;
2496
- border: none;
2497
- border-radius: 50%;
2498
- width: 20px;
2499
- height: 20px;
2500
- font-size: 14px;
2501
- line-height: 1;
2502
- cursor: pointer;
2503
- display: flex;
2504
- align-items: center;
2505
- justify-content: center;
2506
-
2507
- &:hover {
2508
- background-color: ${e=>e.theme.colors.errorHover};
2509
- }
2510
- `,S5={sendMessage:"Send Message ✉️",updateFile:"Update File 📝",createFile:"Create File 📄",confirmCodeGeneration:"Generate Code 🚀",runProjectCommand:"Run Command ⚙️",runBashCommand:"Run Bash Command 셸",searchCode:"Search Code 🔍",requestFilesContent:"Request Files 📂",endConversation:"End Conversation 👋",compoundAction:"Compound Action 🧱",runContainerTask:"Run Container Task 🐳",requestPermissions:"Request Permissions 🔒",performAnalysis:"Perform Analysis 🔬",contextOptimization:"Optimize Context ✨",genaicodeHelp:"GenAIcode Help ❓",conversationGraph:"Conversation Graph 📊",generateImage:"Generate Image 🎨",readExternalFiles:"Read External Files 📖",exploreExternalDirectories:"Explore External Dirs 🗺️",removeFilesFromContext:"Remove Files from Context 🗑️",requestGitContext:"Request Git Context 🐙",webSearch:"Web Search 🌐",codeGeneration:"Code Generation 💻",contextCompression:"Compress Context 📦",pullAppContext:"Pull App Context 🔽",pushAppContext:"Push App Context 🔼",requestFilesFragments:"Request Files Fragments 🧩",pullConsoleLogs:"Pull Console Logs 🖥️",structuredQuestion:"Structured Question ❓",codeExecution:"Code Execution ▶️"},C5=e=>S5[e]||e,Md=({value:e,onChange:t,disabled:r})=>{const[i,l]=$.useState([]),[a,u]=$.useState(!0),[d,f]=$.useState(null);$.useEffect(()=>{(async()=>{try{u(!0);const m=await DC();l(m),f(null)}catch(m){f("Failed to load action types."),console.error(m)}finally{u(!1)}})()},[]);const p=x=>{t(x.target.value)};return h.jsxs(E5,{children:[h.jsxs(j5,{id:"promptActionType",value:e||"",onChange:p,disabled:r||a||d!==null,children:[h.jsx("option",{value:"",children:"Auto mode"}),i.map(x=>h.jsx("option",{value:x,children:C5(x)},x))]}),a&&h.jsx(T5,{children:"Loading actions..."}),d&&h.jsx($5,{children:d})]})},E5=C.div`
2511
- display: flex;
2512
- flex-direction: column;
2513
- gap: 4px;
2514
- `,j5=C.select`
2515
- padding: 8px;
2516
- border: 1px solid ${({theme:e})=>e.colors.border};
2517
- border-radius: 4px;
2518
- background-color: ${({theme:e})=>e.colors.inputBg};
2519
- color: ${({theme:e})=>e.colors.inputText};
2520
- font-size: 14px;
2521
- max-width: 200px;
2522
-
2523
- &:disabled {
2524
- background-color: ${({theme:e})=>e.colors.disabled};
2525
- cursor: not-allowed;
2526
- }
2527
-
2528
- option {
2529
- padding: 4px;
2530
- background-color: ${({theme:e})=>e.colors.inputBg};
2531
- color: ${({theme:e})=>e.colors.inputText};
2532
- }
2533
- `,T5=C.div`
2534
- color: ${({theme:e})=>e.colors.text};
2535
- font-size: 14px;
2536
- font-style: italic;
2537
- `,$5=C.div`
2538
- color: ${({theme:e})=>e.colors.error};
2539
- font-size: 14px;
2540
- `,R5=C.form`
2541
- display: flex;
2542
- flex-direction: column;
2543
- gap: 16px;
2544
- padding: 24px;
2545
- border: 1px solid ${({theme:e})=>e.colors.border};
2546
- border-radius: 8px;
2547
- background-color: ${({theme:e})=>e.colors.background};
2548
- max-width: 70%;
2549
- width: 100%;
2550
- box-sizing: border-box;
2551
- margin-top: 10px;
2552
- margin-bottom: 10px;
2553
- `,I5=C.h3`
2554
- margin: 0 0 8px 0;
2555
- color: ${({theme:e})=>e.colors.text};
2556
- font-size: 1.5rem;
2557
- font-weight: 600;
2558
- `,P5=C.p`
2559
- margin: 0 0 16px 0;
2560
- color: ${({theme:e})=>e.colors.textSecondary};
2561
- font-size: 0.95rem;
2562
- line-height: 1.5;
2563
- `,_a=C.div`
2564
- display: flex;
2565
- flex-direction: column;
2566
- gap: 8px;
2567
- `,Oa=C.label`
2568
- font-weight: 600;
2569
- color: ${({theme:e})=>e.colors.text};
2570
- font-size: 0.95rem;
2571
- `,N5=C.input`
2572
- padding: 10px 12px;
2573
- border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2574
- border-radius: 4px;
2575
- background-color: ${({theme:e})=>e.colors.inputBg};
2576
- color: ${({theme:e})=>e.colors.inputText};
2577
- font-size: 0.95rem;
2578
- font-family: inherit;
2579
- transition:
2580
- border-color 0.2s ease,
2581
- box-shadow 0.2s ease;
2582
-
2583
- &:focus {
2584
- outline: none;
2585
- border-color: ${({theme:e})=>e.colors.primary};
2586
- box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
2587
- }
2588
-
2589
- &:disabled {
2590
- background-color: ${({theme:e})=>e.colors.backgroundSecondary};
2591
- color: ${({theme:e})=>e.colors.disabled};
2592
- cursor: not-allowed;
2593
- }
2594
- `,A5=C.textarea`
2595
- padding: 10px 12px;
2596
- border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2597
- border-radius: 4px;
2598
- background-color: ${({theme:e})=>e.colors.inputBg};
2599
- color: ${({theme:e})=>e.colors.inputText};
2600
- font-size: 0.95rem;
2601
- font-family: inherit;
2602
- resize: vertical;
2603
- min-height: 100px;
2604
- line-height: 1.5;
2605
- transition:
2606
- border-color 0.2s ease,
2607
- box-shadow 0.2s ease;
2608
-
2609
- &:focus {
2610
- outline: none;
2611
- border-color: ${({theme:e})=>e.colors.primary};
2612
- box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
2613
- }
2614
-
2615
- &:disabled {
2616
- background-color: ${({theme:e})=>e.colors.backgroundSecondary};
2617
- color: ${({theme:e})=>e.colors.disabled};
2618
- cursor: not-allowed;
2619
- }
2620
- `,L5=C.select`
2621
- padding: 10px 12px;
2622
- border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2623
- border-radius: 4px;
2624
- background-color: ${({theme:e})=>e.colors.inputBg};
2625
- color: ${({theme:e})=>e.colors.inputText};
2626
- font-size: 0.95rem;
2627
- font-family: inherit;
2628
- cursor: pointer;
2629
- transition:
2630
- border-color 0.2s ease,
2631
- box-shadow 0.2s ease;
2632
-
2633
- &:focus {
2634
- outline: none;
2635
- border-color: ${({theme:e})=>e.colors.primary};
2636
- box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
2637
- }
2638
-
2639
- &:disabled {
2640
- background-color: ${({theme:e})=>e.colors.backgroundSecondary};
2641
- color: ${({theme:e})=>e.colors.disabled};
2642
- cursor: not-allowed;
2643
- }
2644
- `,O1=C.div`
2645
- display: flex;
2646
- flex-direction: column;
2647
- gap: 10px;
2648
- `,M1=C.label`
2649
- display: flex;
2650
- align-items: center;
2651
- gap: 10px;
2652
- cursor: pointer;
2653
- color: ${({theme:e})=>e.colors.text};
2654
- font-size: 0.95rem;
2655
- transition: color 0.2s ease;
2656
-
2657
- &:hover {
2658
- color: ${({theme:e})=>e.colors.primary};
2659
- }
2660
-
2661
- input[type='checkbox'],
2662
- input[type='radio'] {
2663
- cursor: pointer;
2664
- width: 16px;
2665
- height: 16px;
2666
- }
2667
- `,z5=C.div`
2668
- display: flex;
2669
- justify-content: flex-end;
2670
- gap: 12px;
2671
- margin-top: 8px;
2672
- `,Ix=C.button`
2673
- padding: 10px 20px;
2674
- border: none;
2675
- border-radius: 4px;
2676
- font-size: 0.95rem;
2677
- font-weight: 500;
2678
- cursor: pointer;
2679
- transition:
2680
- background-color 0.2s ease,
2681
- transform 0.1s ease;
2682
- font-family: inherit;
2683
-
2684
- &:active {
2685
- transform: translateY(1px);
2686
- }
2687
-
2688
- &:disabled {
2689
- background-color: ${({theme:e})=>e.colors.disabled};
2690
- color: ${({theme:e})=>e.colors.textSecondary};
2691
- cursor: not-allowed;
2692
- opacity: 0.6;
2693
- }
2694
-
2695
- /* Default/Primary button */
2696
- background-color: ${({theme:e})=>e.colors.primary};
2697
- color: white;
2698
-
2699
- &:hover:not(:disabled) {
2700
- background-color: ${({theme:e})=>e.colors.primaryHover};
2701
- }
2702
-
2703
- /* Secondary button */
2704
- &[data-secondary='true'] {
2705
- background-color: ${({theme:e})=>e.colors.secondary};
2706
- color: white;
2707
-
2708
- &:hover:not(:disabled) {
2709
- background-color: ${({theme:e})=>e.colors.secondaryHover};
2710
- }
2711
- }
2712
-
2713
- /* Error/Cancel button */
2714
- &[data-error='true'] {
2715
- background-color: ${({theme:e})=>e.colors.error};
2716
- color: white;
2717
-
2718
- &:hover:not(:disabled) {
2719
- background-color: ${({theme:e})=>e.colors.errorHover};
2720
- }
2721
- }
2722
- `,Ma=C.p`
2723
- color: ${({theme:e})=>e.colors.error};
2724
- font-size: 0.85rem;
2725
- margin: 4px 0 0 0;
2726
- font-weight: 500;
2727
- `,F5=({field:e,value:t,onChange:r,error:i})=>{const{id:l,label:a,type:u,required:d,placeholder:f}=e,p=()=>{const x={id:l,name:l,value:t||"",onChange:m=>r(m.target.value),placeholder:f,required:d};switch(u){case"textarea":return h.jsx(A5,{...x,rows:4});case"number":case"email":case"text":default:return h.jsx(N5,{type:u,...x})}};return h.jsxs(_a,{children:[h.jsxs(Oa,{htmlFor:l,children:[a,d&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),p(),i&&h.jsx(Ma,{children:i})]})},_5=({field:e,value:t,onChange:r,error:i})=>{var a;const l=u=>{const d=t.includes(u)?t.filter(f=>f!==u):[...t,u];r(d)};return h.jsxs(_a,{children:[h.jsxs(Oa,{children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsx(O1,{children:(a=e.options)==null?void 0:a.map(u=>h.jsxs(M1,{children:[h.jsx("input",{type:"checkbox",value:u.value,checked:t.includes(u.value),onChange:()=>l(u.value)}),u.label]},u.value))}),i&&h.jsx(Ma,{children:i})]})},O5=({field:e,value:t,onChange:r,error:i})=>{var l;return h.jsxs(_a,{children:[h.jsxs(Oa,{children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsx(O1,{children:(l=e.options)==null?void 0:l.map(a=>h.jsxs(M1,{children:[h.jsx("input",{type:"radio",id:`${e.id}-${a.value}`,name:e.id,value:a.value,checked:t===a.value,onChange:()=>r(a.value)}),a.label]},a.value))}),i&&h.jsx(Ma,{children:i})]})},M5=({field:e,value:t,onChange:r,error:i})=>{var l;return h.jsxs(_a,{children:[h.jsxs(Oa,{htmlFor:e.id,children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsxs(L5,{id:e.id,value:t||"",onChange:a=>r(a.target.value),required:e.required,children:[e.placeholder&&h.jsx("option",{value:"",children:e.placeholder}),(l=e.options)==null?void 0:l.map(a=>h.jsx("option",{value:a.value,children:a.label},a.value))]}),i&&h.jsx(Ma,{children:i})]})},D5=({form:e,onSubmit:t,onCancel:r})=>{const[i,l]=$.useState(()=>{const m={};return e.fields.forEach(v=>{m[v.id]=v.defaultValue??""}),m}),[a,u]=$.useState({}),d=(m,v)=>{l(w=>({...w,[m]:v})),a[m]&&u(w=>{const k={...w};return delete k[m],k})},f=()=>{const m={};return e.fields.forEach(v=>{v.required&&(!i[v.id]||Array.isArray(i[v.id])&&i[v.id].length===0)&&(m[v.id]=`${v.label} is required.`)}),u(m),Object.keys(m).length===0},p=m=>{m.preventDefault(),f()&&t(i)},x=m=>{switch(m.type){case"checkbox":return h.jsx(_5,{field:m,value:i[m.id]||[],onChange:v=>d(m.id,v),error:a[m.id]},m.id);case"radio":return h.jsx(O5,{field:m,value:i[m.id]||"",onChange:v=>d(m.id,v),error:a[m.id]},m.id);case"select":return h.jsx(M5,{field:m,value:i[m.id]||"",onChange:v=>d(m.id,v),error:a[m.id]},m.id);case"text":case"textarea":case"number":case"email":default:return h.jsx(F5,{field:m,value:i[m.id]||"",onChange:v=>d(m.id,v),error:a[m.id]},m.id)}};return h.jsxs(R5,{onSubmit:p,children:[e.title&&h.jsx(I5,{children:e.title}),e.description&&h.jsx(P5,{children:e.description}),e.fields.map(x),h.jsxs(z5,{children:[h.jsx(Ix,{type:"submit",children:e.submitLabel||"Submit"}),e.cancelLabel&&h.jsx(Ix,{type:"button",onClick:r,"data-secondary":"true",children:e.cancelLabel})]})]})},Px=({onSubmit:e,onInterrupt:t,onPauseResume:r,question:i,codegenOptions:l,executionStatus:a})=>{var ae,Q,de,T,z,q,R;const[u,d]=$.useState(""),[f,p]=$.useState([]),[x,m]=$.useState(null),{suggestions:v}=$.useContext(oi)??{suggestions:[]},[w,k]=$.useState(null),[S,j]=$.useState(l.aiService),[E,I]=$.useState(void 0),[A,F]=$.useState(!1),O=$.useRef(null),N=$.useRef(null);$.useEffect(()=>{j(l.aiService)},[l.aiService]),$.useEffect(()=>{const ce=ye=>{O.current&&!O.current.contains(ye.target)&&F(!1)};return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[O]);const H=ce=>{p(ye=>[...ye,ce]),m(null)},K=async ce=>{if(ce.preventDefault(),(u.trim()||f.length>0)&&i)try{await e(u,f,void 0,S,E),d(""),p([]),k(null),m(null)}catch(ye){console.error("Error submitting answer:",ye),k("Failed to submit the answer. Please try again.")}},ne=async ce=>{try{await e(u,f,ce,S,E),d(""),p([]),k(null),m(null)}catch(ye){console.error("Error submitting confirmation:",ye),k("Failed to submit the confirmation. Please try again.")}},M=async ce=>{try{await e("",void 0,void 0,S,E,{submitted:!0,values:ce}),k(null)}catch(ye){console.error("Error submitting structured question:",ye),k("Failed to submit the form. Please try again.")}},Z=async()=>{try{await e("",void 0,void 0,S,E,{submitted:!1,values:{}}),k(null)}catch(ce){console.error("Error cancelling structured question:",ce),k("Failed to cancel the form. Please try again.")}},le=ce=>{d(ce),F(!1)},X=()=>{F(!A)},re=()=>{var ce;(ce=N.current)==null||ce.click()},U=a==="paused",pe=!(i!=null&&i.confirmation)||!i.confirmation.confirmLabel&&!i.confirmation.declineLabel&&!i.confirmation.secret;return i!=null&&i.structuredForm?h.jsxs(h.Fragment,{children:[h.jsx(D5,{form:i.structuredForm,onSubmit:M,onCancel:Z}),w&&h.jsx(Ax,{children:w})]}):h.jsxs(B5,{children:[i?h.jsxs(U5,{onSubmit:K,children:[h.jsx("p",{children:i.text}),(ae=i.confirmation)!=null&&ae.secret?h.jsx(V5,{type:"password",value:u,onChange:ce=>d(ce.target.value),placeholder:"Enter secret",autoFocus:!0}):((Q=i.confirmation)==null?void 0:Q.includeAnswer)!==!1&&h.jsxs(h.Fragment,{children:[h.jsx(F1,{value:u,onChange:d,placeholder:"Enter your answer here or select a suggestion",maxViewportHeight:.3,onImagePaste:H}),h.jsx(_1,{images:f,onImagesChange:p,error:x,setError:m,fileInputRef:N})]}),(de=i.confirmation)!=null&&de.secret?h.jsxs(Vs,{children:[h.jsx(Nx,{type:"submit",disabled:!u.trim(),children:"Submit"}),h.jsx(nd,{onClick:()=>ne(!1),"data-secondary":"true",children:"Decline"}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]}):pe?h.jsxs(Vs,{children:[h.jsx(Nx,{type:"submit",disabled:!u.trim()&&f.length===0,children:"Submit Answer"}),h.jsx(K5,{type:"button",onClick:re,title:"Upload Images",children:h.jsx(Ky,{})}),h.jsx(ua,{value:S,onChange:j,disabled:!1}),((T=i.confirmation)==null?void 0:T.promptActionType)&&h.jsx(Md,{value:E,onChange:I,disabled:!1}),v&&v.length>0&&h.jsxs(H5,{ref:O,children:[h.jsxs(W5,{type:"button",onClick:X,children:[v[0],v.length>1&&h.jsx(q5,{children:" ▼"})]}),A&&h.jsx(G5,{children:v.map((ce,ye)=>h.jsx(J5,{onClick:()=>le(ce),children:ce},ye))})]}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]}):h.jsxs(Vs,{children:[h.jsx(nd,{onClick:()=>ne(!0),children:(z=i.confirmation)==null?void 0:z.confirmLabel}),h.jsx(nd,{onClick:()=>ne(!1),"data-secondary":"true",children:(q=i.confirmation)==null?void 0:q.declineLabel}),h.jsx(ua,{value:S,onChange:j,disabled:!1}),((R=i.confirmation)==null?void 0:R.promptActionType)&&h.jsx(Md,{value:E,onChange:I,disabled:!1}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]})]}):h.jsxs(Vs,{children:[h.jsx(Q5,{onClick:r,isPaused:U,children:U?"Resume":"Pause"}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]}),w&&h.jsx(Ax,{children:w})]})},B5=C.div`
2728
- background-color: ${({theme:e})=>e.colors.background};
2729
- border: 1px solid ${({theme:e})=>e.colors.border};
2730
- border-radius: 8px;
2731
- padding: 15px;
2732
- margin-top: 10px;
2733
- margin-bottom: 10px;
2734
- max-width: 70%;
2735
- width: 100%;
2736
- box-sizing: border-box;
2737
- `,U5=C.form`
2738
- display: flex;
2739
- flex-direction: column;
2740
-
2741
- > p {
2742
- margin-top: 0;
2743
- }
2744
- `,V5=C.input`
2745
- width: 100%;
2746
- padding: 10px;
2747
- border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2748
- border-radius: 4px;
2749
- background-color: ${({theme:e})=>e.colors.inputBg};
2750
- color: ${({theme:e})=>e.colors.inputText};
2751
- font-family: inherit;
2752
- font-size: 14px;
2753
- box-sizing: border-box;
2754
- margin-bottom: 10px;
2755
- `,H5=C.div`
2756
- position: relative;
2757
- display: inline-block;
2758
- `,W5=C.button`
2759
- background-color: ${e=>e.theme.colors.backgroundSecondary};
2760
- color: ${e=>e.theme.colors.text};
2761
- border: 1px solid ${e=>e.theme.colors.border};
2762
- border-radius: 4px;
2763
- padding: 8px 12px;
2764
- font-size: 14px;
2765
- cursor: pointer;
2766
- transition: background-color 0.3s ease;
2767
- display: flex;
2768
- align-items: center;
2769
- white-space: nowrap;
2770
- overflow: hidden;
2771
- text-overflow: ellipsis;
2772
- max-width: 200px;
2773
-
2774
- &:hover {
2775
- background-color: ${e=>e.theme.colors.primary+"22"};
2776
- }
2777
- `,q5=C.span`
2778
- margin-left: 5px;
2779
- font-size: 0.8em;
2780
- `,G5=C.div`
2781
- position: absolute;
2782
- bottom: 100%;
2783
- left: 0;
2784
- background-color: ${({theme:e})=>e.colors.inputBg};
2785
- border: 1px solid ${({theme:e})=>e.colors.border};
2786
- border-radius: 4px;
2787
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
2788
- z-index: 1000;
2789
- max-width: 300px;
2790
- max-height: 200px;
2791
- overflow-y: auto;
2792
- margin-bottom: 5px;
2793
- `,J5=C.div`
2794
- padding: 8px 12px;
2795
- color: ${({theme:e})=>e.colors.inputText};
2796
- cursor: pointer;
2797
- white-space: nowrap;
2798
- overflow: hidden;
2799
- text-overflow: ellipsis;
2800
-
2801
- &:hover {
2802
- background-color: ${({theme:e})=>e.colors.primary+"22"};
2803
- }
2804
- `,Vs=C.div`
2805
- display: flex;
2806
- align-items: center;
2807
- justify-content: flex-start;
2808
- gap: 10px;
2809
- margin-top: 10px;
2810
- flex-wrap: wrap;
2811
- `,Sl=C.button`
2812
- color: #ffffff;
2813
- border: none;
2814
- border-radius: 4px;
2815
- padding: 8px 12px;
2816
- font-size: 14px;
2817
- cursor: pointer;
2818
- transition: background-color 0.3s ease;
2819
-
2820
- &:disabled {
2821
- background-color: ${({theme:e})=>e.colors.disabled};
2822
- cursor: not-allowed;
2823
- }
2824
- `,Nx=C(Sl)`
2825
- background-color: ${({theme:e})=>e.colors.primary};
2826
-
2827
- &:hover:not(:disabled) {
2828
- background-color: ${({theme:e})=>e.colors.primary}dd;
2829
- }
2830
- `,K5=C(Sl)`
2831
- background-color: ${({theme:e})=>e.colors.buttonBg}; /* Or choose another appropriate color */
2832
-
2833
- &:hover {
2834
- background-color: ${({theme:e})=>e.colors.buttonHoverBg}dd;
2835
- }
2836
- `,nd=C(Sl)`
2837
- background-color: ${({theme:e})=>e.colors.primary};
2838
- &:hover {
2839
- background-color: ${({theme:e})=>e.colors.primary}dd;
2840
- }
2841
-
2842
- &[data-secondary='true'] {
2843
- background-color: ${({theme:e})=>e.colors.secondary};
2844
- &:hover {
2845
- background-color: ${({theme:e})=>e.colors.secondary}dd;
2846
- }
2847
- }
2848
- `,Hs=C(Sl)`
2849
- background-color: ${({theme:e})=>e.colors.error};
2850
- margin-left: auto;
2851
-
2852
- &:hover {
2853
- background-color: ${({theme:e})=>e.colors.error}dd;
2854
- }
2855
- `,Q5=C(Sl)`
2856
- background-color: ${({theme:e,isPaused:t})=>t?e.colors.warning:e.colors.info};
2857
-
2858
- &:hover {
2859
- background-color: ${({theme:e,isPaused:t})=>t?e.colors.warning:e.colors.info}dd;
2860
- }
2861
- `,Ax=C.p`
2862
- color: ${({theme:e})=>e.colors.error};
2863
- font-weight: bold;
2864
- margin-top: 10px;
2865
- margin-bottom: 0;
2866
- `,Y5=({isVisible:e,onInterrupt:t,onPauseResume:r,executionStatus:i})=>e?h.jsxs(Z5,{children:[h.jsx(tL,{onClick:t,children:"Interrupt"}),h.jsxs(eL,{"data-execution-status":i,children:[h.jsx(rd,{}),h.jsx(rd,{}),h.jsx(rd,{})]}),h.jsx(D1,{onClick:r,children:i==="paused"?"Resume":"Pause"})]}):null,X5=ti`
2867
- 0%, 80%, 100% {
2868
- transform: scale(0);
2869
- }
2870
- 40% {
2871
- transform: scale(1.0);
2872
- }
2873
- `,Z5=C.div`
2874
- display: flex;
2875
- flex-direction: row;
2876
- align-items: center;
2877
- justify-content: center;
2878
- gap: 50px;
2879
- padding: 10px;
2880
- background-color: ${e=>e.theme.colors.background};
2881
- border-top: 1px solid ${e=>e.theme.colors.border};
2882
- `,eL=C.div`
2883
- display: flex;
2884
- align-items: center;
2885
- justify-content: center;
2886
- align-items: center;
2887
- margin-bottom: 10px;
2888
- `,rd=C.div`
2889
- width: 10px;
2890
- height: 10px;
2891
- background-color: ${e=>e.theme.colors.primary};
2892
- border-radius: 50%;
2893
- margin: 0 5px;
2894
-
2895
- [data-execution-status='executing'] & {
2896
- animation: ${X5} 1.4s infinite ease-in-out both;
2897
- }
2898
-
2899
- &:nth-child(1) {
2900
- animation-delay: -0.32s;
2901
- }
2902
-
2903
- &:nth-child(2) {
2904
- animation-delay: -0.16s;
2905
- }
2906
- `,D1=C.button`
2907
- padding: 8px 16px;
2908
- background-color: ${e=>e.theme.colors.primary};
2909
- color: #ffffff;
2910
- border: none;
2911
- border-radius: 4px;
2912
- cursor: pointer;
2913
- font-size: 14px;
2914
- font-weight: 600;
2915
- transition: background-color 0.3s, transform 0.1s;
2916
-
2917
- &:hover {
2918
- background-color: ${e=>e.theme.colors.primaryHover};
2919
- transform: translateY(-1px);
2920
- }
2921
-
2922
- &:active {
2923
- transform: translateY(0);
2924
- }
2925
- `,tL=C(D1)`
2926
- background-color: ${({theme:e})=>e.colors.error};
2927
-
2928
- &:hover {
2929
- background-color: ${({theme:e})=>e.colors.errorHover};
2930
- }
2931
- `,B1={info:"#3498db",warn:"#f39c12",error:"#e74c3c",success:"#2ecc71",debug:"#9b59b6"},nL=C.div`
2932
- position: fixed;
2933
- bottom: 70px;
2934
- right: 20px;
2935
- width: clamp(750px, 50vw, 750px);
2936
- height: 55vh;
2937
- background-color: ${({theme:e})=>e.colors.backgroundAlt||e.colors.overlayBackground};
2938
- border: 1px solid ${({theme:e})=>e.colors.border};
2939
- border-radius: 8px;
2940
- box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
2941
- z-index: 1001;
2942
- padding: 12px;
2943
- display: flex;
2944
- flex-direction: column;
2945
- font-family: 'Courier New', Courier, monospace;
2946
- `,rL=C.div`
2947
- display: flex;
2948
- align-items: center;
2949
- margin-bottom: 10px;
2950
- padding-bottom: 10px;
2951
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
2952
- color: ${({theme:e})=>e.colors.text};
2953
- gap: 16px;
2954
- flex-wrap: wrap;
2955
-
2956
- h4 {
2957
- margin: 0;
2958
- font-size: 1.1em;
2959
- }
2960
- `,oL=C.button`
2961
- background: none;
2962
- border: none;
2963
- color: ${({theme:e})=>e.colors.text};
2964
- font-size: 1.2rem;
2965
- cursor: pointer;
2966
- padding: 0;
2967
- line-height: 1;
2968
-
2969
- &:hover {
2970
- color: ${({theme:e})=>e.colors.primary};
2971
- }
2972
- `,iL=C.div`
2973
- display: flex;
2974
- align-items: center;
2975
- flex-wrap: wrap;
2976
- gap: 8px;
2977
- flex-grow: 1;
2978
- justify-content: flex-end;
2979
- `,lL=C.div`
2980
- display: flex;
2981
- gap: 5px;
2982
- `,Lx=C.button`
2983
- background-color: ${({active:e,theme:t})=>e?t.colors.primary:"transparent"};
2984
- color: ${({active:e,theme:t})=>e?"white":t.colors.text};
2985
- border: 1px solid ${({active:e,theme:t})=>e?t.colors.primary:t.colors.border};
2986
- border-radius: 6px;
2987
- padding: 6px 12px;
2988
- cursor: pointer;
2989
- font-size: 0.9rem;
2990
- font-weight: 500;
2991
- transition: all 0.2s ease-in-out;
2992
-
2993
- &:hover:not(:disabled) {
2994
- background-color: ${({theme:e})=>e.colors.secondary};
2995
- border-color: ${({theme:e})=>e.colors.secondary};
2996
- color: white;
2997
- }
2998
- margin-left: auto; /* Pushes it to the right */
2999
- `,od=C.button`
3000
- background-color: ${({active:e,theme:t})=>e?t.colors.primary:t.colors.secondary};
3001
- color: ${({active:e,theme:t})=>e?"white":t.colors.buttonText};
3002
- border: 1px solid ${({theme:e})=>e.colors.border};
3003
- border-radius: 6px;
3004
- padding: 6px 10px;
3005
- cursor: pointer;
3006
- font-size: 0.85rem;
3007
- transition: opacity 0.2s ease;
3008
-
3009
- &:hover {
3010
- opacity: 0.9;
3011
- }
3012
-
3013
- &:disabled {
3014
- opacity: 0.6;
3015
- cursor: not-allowed;
3016
- }
3017
-
3018
- &:focus-visible {
3019
- outline: 2px solid ${({theme:e})=>e.colors.primary};
3020
- outline-offset: 2px;
3021
- }
3022
- `,sL=C.div`
3023
- flex-grow: 1;
3024
- overflow-y: auto;
3025
- background-color: ${({theme:e})=>e.colors.inputBackground};
3026
- padding: 10px;
3027
- border-radius: 6px;
3028
- color: ${({theme:e})=>e.colors.text};
3029
- font-size: 0.9em;
3030
- white-space: pre-wrap;
3031
- word-wrap: break-word;
3032
-
3033
- &::-webkit-scrollbar {
3034
- width: 8px;
3035
- }
3036
- &::-webkit-scrollbar-track {
3037
- background: ${({theme:e})=>e.colors.background};
3038
- }
3039
- &::-webkit-scrollbar-thumb {
3040
- background-color: ${({theme:e})=>e.colors.border};
3041
- border-radius: 4px;
3042
- }
3043
- `,aL=C.div`
3044
- display: grid;
3045
- grid-template-columns: 80px 70px 90px 1fr;
3046
- align-items: start;
3047
- gap: 8px;
3048
- padding-bottom: 6px;
3049
- margin-bottom: 6px;
3050
- border-bottom: 1px dashed ${({theme:e})=>e.colors.border};
3051
- line-height: 1.4;
3052
-
3053
- .timestamp {
3054
- color: ${({theme:e})=>e.colors.textSecondary};
3055
- font-size: 0.8em;
3056
- white-space: nowrap;
3057
- }
3058
-
3059
- .source {
3060
- color: ${({theme:e})=>e.colors.textSecondary};
3061
- font-style: italic;
3062
- word-break: break-word;
3063
- }
3064
-
3065
- @media (max-width: 520px) {
3066
- grid-template-columns: 110px 1fr;
3067
- .source {
3068
- grid-column: 2;
3069
- }
3070
- }
3071
- `,uL=C.span`
3072
- background-color: ${({level:e})=>B1[e]||"#7f8c8d"};
3073
- color: white;
3074
- padding: 2px 6px;
3075
- border-radius: 4px;
3076
- font-size: 0.8em;
3077
- font-weight: bold;
3078
- text-transform: uppercase;
3079
- flex-shrink: 0;
3080
- justify-self: start;
3081
- `,cL=C.div`
3082
- word-wrap: break-word;
3083
- white-space: pre-wrap;
3084
- `,dL=C.button`
3085
- background: none;
3086
- border: none;
3087
- color: ${({theme:e})=>e.colors.primary};
3088
- cursor: pointer;
3089
- font-size: 0.8rem;
3090
- margin-left: 8px;
3091
- padding: 0;
3092
- text-decoration: underline;
3093
-
3094
- &:hover {
3095
- opacity: 0.8;
3096
- }
3097
- `,fL=C.div`
3098
- grid-column: 1 / -1;
3099
- background-color: ${({theme:e})=>e.colors.background};
3100
- border: 1px solid ${({theme:e})=>e.colors.border};
3101
- border-radius: 6px;
3102
- margin-top: 8px;
3103
- padding: 5px;
3104
- `,pL=C.pre`
3105
- margin: 0;
3106
- padding: 8px;
3107
- font-family: 'Courier New', Courier, monospace;
3108
- font-size: 0.9em;
3109
- white-space: pre-wrap;
3110
- word-wrap: break-word;
3111
- max-height: 220px;
3112
- overflow-y: auto;
3113
- background-color: ${({theme:e})=>e.colors.inputBackground};
3114
- border-radius: 3px;
3115
-
3116
- &::-webkit-scrollbar {
3117
- width: 8px;
3118
- }
3119
- &::-webkit-scrollbar-track {
3120
- background: ${({theme:e})=>e.colors.background};
3121
- }
3122
- &::-webkit-scrollbar-thumb {
3123
- background-color: ${({theme:e})=>e.colors.border};
3124
- border-radius: 4px;
3125
- }
3126
- `,hL=C(ai)`
3127
- align-items: center;
3128
- `,mL=C($1).attrs({as:"button"})`
3129
- display: flex;
3130
- align-items: center;
3131
- gap: 8px;
3132
- width: 100%;
3133
- cursor: pointer;
3134
- border: 1px solid transparent;
3135
- text-align: left;
3136
- &:hover {
3137
- border-color: ${({theme:e})=>e.colors.border};
3138
- }
3139
- position: relative;
3140
- outline: none;
3141
- ${({flashing:e})=>e&&wt`
3142
- @keyframes flash {
3143
- 0%,
3144
- 100% {
3145
- box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
3146
- }
3147
- 50% {
3148
- box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.35);
3149
- }
3150
- }
3151
- animation: flash 1.2s ease-in-out infinite;
3152
- `}
3153
- `,gL=C.span`
3154
- background-color: ${({level:e})=>B1[e]||"#7f8c8d"};
3155
- color: #fff;
3156
- padding: 2px 6px;
3157
- border-radius: 6px;
3158
- font-size: 0.75em;
3159
- text-transform: uppercase;
3160
- flex-shrink: 0;
3161
- `,xL=C.span`
3162
- flex: 1;
3163
- min-width: 0;
3164
- white-space: nowrap;
3165
- overflow: hidden;
3166
- text-overflow: ellipsis;
3167
- color: ${({theme:e})=>e.colors.text};
3168
- `,yL=C.span`
3169
- color: ${({theme:e})=>e.colors.textSecondary};
3170
- font-size: 0.75em;
3171
- flex-shrink: 0;
3172
- `,vL=C.span`
3173
- width: 8px;
3174
- height: 8px;
3175
- border-radius: 50%;
3176
- background-color: ${({theme:e})=>e.colors.error};
3177
- flex-shrink: 0;
3178
- `,wL=C.button`
3179
- background-color: ${({theme:e})=>e.colors.buttonBg};
3180
- color: ${({theme:e})=>e.colors.buttonText};
3181
- border: none;
3182
- border-radius: 50%;
3183
- width: 24px;
3184
- height: 24px;
3185
- font-size: 14px;
3186
- line-height: 24px;
3187
- text-align: center;
3188
- cursor: pointer;
3189
- margin-right: 8px;
3190
- flex-shrink: 0;
3191
- display: flex;
3192
- align-items: center;
3193
- justify-content: center;
3194
-
3195
- &:hover {
3196
- background-color: ${({theme:e})=>e.colors.buttonHoverBg};
3197
- }
3198
- `,kL=C(wL)`
3199
- background-color: ${({theme:e})=>e.colors.error||"#dc3545"};
3200
- color: white;
3201
-
3202
- &:hover {
3203
- background-color: ${({theme:e})=>e.colors.errorHover||"#c82333"};
3204
- }
3205
- `,bL=({iterationId:e})=>{const{terminalEvents:t,isTerminalOpen:r,toggleTerminal:i}=cn(),l=$.useRef({}),a=$.useMemo(()=>!e||!t[e]?[]:t[e],[e,t]),u=a[a.length-1];if($.useEffect(()=>{r&&e&&u&&(l.current[e]=u.id)},[r,e,u]),!e||a.length===0)return null;const d=!r&&u&&l.current[e]!==u.id,f=()=>{i(),e&&u&&(l.current[e]=u.id)},p=async x=>{x.stopPropagation();try{await Ly()}catch(m){console.error("Failed to interrupt command:",m),alert(`Failed to interrupt command: ${m instanceof Error?m.message:"Unknown error"}`)}};return h.jsxs(hL,{"data-type":"assistant",children:[h.jsx(kL,{onClick:p,title:"Interrupt current command",children:"⏹"}),u&&h.jsxs(mL,{flashing:d,onClick:f,"aria-label":`Toggle terminal. Last log: ${u.text}`,title:`Toggle terminal. Last log: ${u.text}`,children:[h.jsx(gL,{level:u.level,children:u.level}),h.jsxs(xL,{children:["Container log: ",u.text]}),h.jsx(yL,{children:new Date(u.timestamp).toLocaleTimeString()}),d&&h.jsx(vL,{"aria-hidden":"true"})]})]})},SL=({messages:e,currentQuestion:t,codegenOptions:r,onQuestionSubmit:i,onInterrupt:l,onPauseResume:a,executionStatus:u})=>{var re;const[d,f]=$.useState(()=>new Set),[p,x]=$.useState(()=>new Set),[m,v]=$.useState(()=>new Set),[w]=$.useState(null),k=$.useRef(null),S=$.useRef(null),[j,E]=$.useState(!1),[I,A]=$.useState(!0),[F,O]=$.useState(null),N=c5(e),H=u!=="idle"?(re=N[N.length-1])==null?void 0:re.iterationId:null,K=$.useCallback(()=>{if(!S.current)return!0;const{scrollTop:U,scrollHeight:pe,clientHeight:ae}=S.current;return Math.abs(pe-ae-U)<5||pe<=ae},[]);$.useEffect(()=>{const U=S.current;if(!U)return;const pe=()=>{const ae=K();A(ae),ae&&E(!1)};return U.addEventListener("scroll",pe),()=>U.removeEventListener("scroll",pe)},[K]),$.useEffect(()=>{I?le():e.length>0&&E(!0)},[N,I,e.length]),$.useEffect(()=>{const U=new Set(N.slice(0,-1).map(pe=>pe.iterationId));v(U)},[N.length]);const ne=U=>{f(pe=>{const ae=new Set(pe);return ae.has(U)?ae.delete(U):ae.add(U),ae})},M=U=>{x(pe=>{const ae=new Set(pe);return ae.has(U)?ae.delete(U):ae.add(U),ae})},Z=U=>{var pe;w&&((pe=e.find(ae=>ae.id===w))==null?void 0:pe.iterationId)===U||v(ae=>{const Q=new Set(ae);return Q.has(U)?Q.delete(U):Q.add(U),Q})},le=()=>{requestAnimationFrame(()=>{var U;(U=S.current)==null||U.scrollTo({top:S.current.scrollHeight,behavior:"smooth"})}),E(!1)},X=async U=>{if(F===U)try{await MC(U),O(null)}catch(pe){console.error("Failed to delete iteration:",pe)}else O(U)};return h.jsxs(e5,{children:[h.jsxs(t5,{ref:S,children:[N.map((U,pe)=>h.jsxs(n5,{children:[h.jsxs(r5,{children:[h.jsxs("div",{className:"title",onClick:()=>Z(U.iterationId),children:[m.has(U.iterationId)?h.jsx(a5,{}):h.jsx(s5,{}),h.jsx("span",{children:U.iterationTitle??`Iteration ${U.iterationId}`})]}),h.jsxs("span",{className:"meta",children:[U.timestampStart.toLocaleString()," - ",U.timestampEnd.toLocaleString(),h.jsx(I1,{messages:U.messages}),U.iterationId!==H&&h.jsx(o5,{onClick:()=>X(U.iterationId),title:F===U.iterationId?"Confirm deletion":"Delete iteration",children:F===U.iterationId?"🗑️ Confirm":"🗑️"})]})]}),h.jsxs(i5,{isCollapsed:m.has(U.iterationId),children:[U.conversationSummaries.length>0&&h.jsx(l5,{children:U.conversationSummaries.join(" ")}),U.messages.map((ae,Q)=>h.jsxs(Tt.Fragment,{children:[ae.type===Hn.SYSTEM?h.jsx(XA,{message:ae,collapsedExecutions:p,toggleExecutionCollapse:M,visibleDataIds:d,toggleDataVisibility:ne}):h.jsx(VA,{message:ae,visibleDataIds:d,toggleDataVisibility:ne}),u!=="idle"&&t&&pe===N.length-1&&Q===U.messages.length-1&&h.jsx(Px,{onSubmit:i,onInterrupt:l,onPauseResume:a,question:t,codegenOptions:r,executionStatus:u})]},ae.id)),pe===N.length-1&&h.jsx(u5,{children:h.jsx(bL,{iterationId:H})})]})]},U.iterationId)),u!=="idle"&&t&&N.length>0&&N[N.length-1].messages.length===0&&h.jsx(Px,{onSubmit:i,onInterrupt:l,onPauseResume:a,question:t,codegenOptions:r,executionStatus:u}),h.jsx("div",{ref:k})]}),j&&!I&&h.jsx(d5,{onClick:le}),h.jsx(Y5,{isVisible:u!=="idle"&&!t,onInterrupt:l,onPauseResume:a,executionStatus:u})]})},CL=({onSubmit:e,onUploadClick:t,onAiServiceChange:r,onInitialActionTypeChange:i,options:l,disabled:a})=>h.jsxs(jL,{children:[h.jsx(EL,{onClick:e,disabled:a,children:"Submit"}),h.jsx(U1,{onClick:t,title:"Upload Images",children:h.jsx(Ky,{})}),h.jsx(ua,{value:l.aiService,onChange:r}),h.jsx(Md,{value:l.initialActionType,onChange:u=>i(u||void 0)})]}),U1=C.button`
3206
- color: ${({theme:e})=>e.colors.buttonText};
3207
- background-color: ${({theme:e})=>e.colors.buttonBg};
3208
- border: none;
3209
- border-radius: 4px;
3210
- padding: 10px 15px;
3211
- font-size: 14px;
3212
- cursor: pointer;
3213
- transition: background-color 0.3s ease;
3214
-
3215
- &:hover {
3216
- background-color: ${({theme:e})=>e.colors.buttonHoverBg};
3217
- }
3218
-
3219
- &:disabled {
3220
- background-color: ${({theme:e})=>e.colors.disabled};
3221
- cursor: not-allowed;
3222
- }
3223
- `,EL=C(U1)`
3224
- background-color: ${({theme:e})=>e.colors.primary};
3225
- color: #ffffff;
3226
-
3227
- &:hover {
3228
- background-color: ${({theme:e})=>e.colors.primaryHover};
3229
- }
3230
-
3231
- &:disabled {
3232
- background-color: ${({theme:e})=>e.colors.disabled};
3233
- }
3234
- `,jL=C.div`
3235
- display: flex;
3236
- justify-content: flex-start;
3237
- margin-top: 10px;
3238
- gap: 10px;
3239
- `,TL=e=>{const{onSubmit:t,isExecuting:r,codegenOptions:i,onOptionsChange:l}=e,[a,u]=$.useState(""),[d,f]=$.useState([]),[p,x]=$.useState(null),m=$.useRef(null);if(r)return null;const v=()=>{(a.trim()||d.length>0)&&(t(a.trim(),d),u(""),f([]))},w=I=>{f(I)},k=()=>{var I;(I=m.current)==null||I.click()},S=I=>{const A=[...d,I];w(A)},j=I=>{l({...i,aiService:I})},E=I=>{l({...i,initialActionType:I})};return h.jsxs($L,{children:[h.jsx(RL,{children:h.jsx(F1,{value:a,onChange:u,placeholder:"Enter your input here",onImagePaste:S})}),h.jsx(_1,{images:d,onImagesChange:w,error:p,setError:x,fileInputRef:m}),h.jsx(CL,{onSubmit:v,onUploadClick:k,onAiServiceChange:j,onInitialActionTypeChange:E,options:i,disabled:!a.trim()&&d.length===0})]})},$L=C.div`
3240
- display: flex;
3241
- flex-direction: column;
3242
- background-color: ${e=>e.theme.colors.background};
3243
- border-top: 1px solid ${e=>e.theme.colors.border};
3244
- padding: 16px;
3245
- width: 100%;
3246
- box-sizing: border-box;
3247
- `,RL=C.div`
3248
- margin-bottom: 16px;
3249
- width: 100%;
3250
- `,IL=({theme:e,toggleTheme:t})=>h.jsx(rr,{onClick:t,"aria-label":`Switch to ${e==="light"?"dark":"light"} mode`,children:e==="light"?"🌙":"☀️"}),zx=Jb`
3251
- body {
3252
- color: ${({theme:e})=>e.colors.text};
3253
- font-family: Arial, sans-serif;
3254
- margin: 0;
3255
- padding: 0;
3256
- background-color: ${({theme:e})=>e.colors.pageBackground};
3257
- }
3258
-
3259
- body::before {
3260
- content: '';
3261
- position: fixed;
3262
- top: 0;
3263
- left: 0;
3264
- right: 0;
3265
- bottom: 0;
3266
- transition: all 0.3s ease;
3267
- opacity: 0.1;
3268
- background-image: url(${e=>e.theme.backgroundImage});
3269
- background-size: cover;
3270
- background-position: center;
3271
- background-repeat: no-repeat;
3272
- background-attachment: fixed;
3273
- z-index: -1;
3274
- }
3275
- `;var ol=(e=>(e.FOCUS="GENAICODE_FOCUS",e.BLUR="GENAICODE_BLUR",e.NEW_MESSAGES="GENAICODE_NEW_MESSAGES",e.RESET_NOTIFICATIONS="GENAICODE_RESET_NOTIFICATIONS",e))(ol||{});const PL=new URL("/assets/wolf-bark-Bl17CX4O.mp3",import.meta.url);class NL{constructor(){Rn(this,"context");Rn(this,"bufferCache",new Map);Rn(this,"initialized",!1);Rn(this,"currentSources",[]);const t=window.AudioContext||window.webkitAudioContext;this.context=new t,this.initSounds()}async initSounds(){if(!this.initialized)try{const t=await this.loadAudioBuffer(PL.href);this.bufferCache.set("bark",t),this.initialized=!0}catch(t){console.error("Failed to initialize sounds:",t)}}async loadAudioBuffer(t){const i=await(await fetch(t)).arrayBuffer();return await this.context.decodeAudioData(i)}async play(t,r=.5){this.initialized||await this.initSounds();const i=this.bufferCache.get(t);if(!i){console.warn(`Sound "${t}" not found in cache`);return}try{this.context.state==="suspended"&&await this.context.resume();const l=this.context.createBufferSource();l.buffer=i;const a=this.context.createGain();a.gain.value=Math.max(0,Math.min(1,r)),l.connect(a),a.connect(this.context.destination),l.start(0),this.currentSources.push(l)}catch(l){console.error(`Failed to play sound "${t}":`,l)}}async playBark(t=.5){return this.play("bark",t)}stop(){this.currentSources.forEach(t=>t.stop())}dispose(){this.context.close(),this.bufferCache.clear(),this.initialized=!1}}const id=new NL,AL=({currentQuestion:e,messages:t,muteNotifications:r=!1})=>{const i=$.useRef((e==null?void 0:e.id)??null),l=$.useRef(t.length),a=$.useRef(document.hasFocus()),u=$.useRef(document.title),[d,f]=$.useState(0),p=window!==window.parent;$.useEffect(()=>(u.current=document.title,()=>{document.title=u.current}),[]);const x=m=>{if(p&&window.parent){const v={...m,source:"genaicode",origin:window.location.origin};window.parent.postMessage(v,"*")}};return $.useEffect(()=>{const m=()=>{const v=document.hasFocus()&&document.visibilityState==="visible";a.current=v,p?x({type:v?ol.FOCUS:ol.BLUR,payload:{isFocused:v,timestamp:Date.now()}}):v&&(document.title=u.current),v&&(f(0),document.title=u.current,id.stop())};return window.addEventListener("focus",m),window.addEventListener("blur",m),document.addEventListener("visibilitychange",m,!1),p&&m(),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",m),document.removeEventListener("visibilitychange",m,!1)}},[]),$.useEffect(()=>{if(!p)return;const m=v=>{if(v.source===window.parent)try{const{type:w,source:k}=v.data;if(k!=="genaicode")return;switch(w){case ol.RESET_NOTIFICATIONS:f(0),id.stop();break}}catch(w){console.warn("Error handling notification message:",w)}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[]),$.useEffect(()=>{if(t.length>l.current){const m=t.length-l.current;if(p)x({type:ol.NEW_MESSAGES,payload:{count:m,timestamp:Date.now()}});else if(!a.current){const v=d+m;f(v);const w=v>99?"99+":v;document.title=`(${w}) ${u.current}`}}l.current=t.length},[t,d]),$.useEffect(()=>{e&&e.id!==i.current?(!a.current&&!r&&id.playBark(.5),i.current=e.id):e||(i.current=null)},[e,r]),null};async function LL(e){return[]}const zL=()=>{const e=cn();if(!e)return console.warn("SuggestionGenerator used outside of ChatStateProvider"),null;const{messages:t,executionStatus:r,currentQuestion:i,setSuggestions:l}=e;return $.useEffect(()=>{var f;if(!l)return;if(r!=="executing"||!i||i.confirmation){l([]);return}const a=t.length>0?(f=t[t.length-1])==null?void 0:f.iterationId:null;if(!a){l([]);return}t.filter(p=>p.iterationId===a).flatMap(p=>p.type===Hn.SYSTEM&&"parts"in p&&Array.isArray(p.parts)?p.parts:[p]).length>0?(console.log("Attempting to generate suggestions using conversation context in SuggestionGenerator..."),LL().then(p=>{p.length>0?(console.log("Suggestions generated by SuggestionGenerator:",p),l(p)):(console.log("No suggestions generated or generation failed in SuggestionGenerator."),l([]))}).catch(p=>{console.error("Error generating suggestions in SuggestionGenerator:",p),l([])})):l([])},[r,i,t,l]),null},FL=C.div`
3276
- position: fixed;
3277
- bottom: 70px; /* Adjust as needed to not overlap input area */
3278
- right: 20px;
3279
- width: 400px;
3280
- max-height: 50vh;
3281
- background-color: ${({theme:e})=>e.colors.backgroundAlt};
3282
- border: 1px solid ${({theme:e})=>e.colors.border};
3283
- border-radius: 8px;
3284
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3285
- z-index: 1000;
3286
- overflow: auto;
3287
- padding: 15px;
3288
- display: flex;
3289
- flex-direction: column;
3290
- `,_L=C.div`
3291
- display: flex;
3292
- justify-content: space-between;
3293
- align-items: center;
3294
- margin-bottom: 10px;
3295
- padding-bottom: 10px;
3296
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
3297
-
3298
- h3 {
3299
- margin: 0;
3300
- font-size: 1rem;
3301
- color: ${({theme:e})=>e.colors.text};
3302
- }
3303
- `,OL=C.button`
3304
- background: none;
3305
- border: none;
3306
- color: ${({theme:e})=>e.colors.text};
3307
- font-size: 1.2rem;
3308
- cursor: pointer;
3309
- padding: 0;
3310
- line-height: 1;
3311
-
3312
- &:hover {
3313
- color: ${({theme:e})=>e.colors.primary};
3314
- }
3315
- `,ML=C.div`
3316
- flex-grow: 1;
3317
- /* Basic layout for nodes and edges - consider using a graph library for actual rendering */
3318
- display: flex;
3319
- flex-direction: column;
3320
- gap: 10px;
3321
- `,DL=C.div`
3322
- background-color: ${({theme:e})=>e.colors.inputBg};
3323
- border: 1px solid ${({theme:e})=>e.colors.border};
3324
- border-radius: 4px;
3325
- padding: 8px 12px;
3326
- font-size: 0.9rem;
3327
- color: ${({theme:e})=>e.colors.inputText};
3328
-
3329
- ${({isActive:e,theme:t})=>e&&wt`
3330
- border-color: ${t.colors.primary};
3331
- box-shadow: 0 0 0 2px ${t.colors.primary}40;
3332
- font-weight: bold;
3333
- `}
3334
-
3335
- strong {
3336
- color: ${({theme:e})=>e.colors.primary};
3337
- }
3338
-
3339
- p {
3340
- margin: 5px 0 0 0;
3341
- font-size: 0.8rem;
3342
- color: ${({theme:e})=>e.colors.textSecondary};
3343
- }
3344
- `,BL=C.div`
3345
- font-size: 0.8rem;
3346
- color: ${({theme:e})=>e.colors.textSecondary};
3347
- padding-left: 15px;
3348
- position: relative;
3349
-
3350
- &::before {
3351
- content: '->';
3352
- position: absolute;
3353
- left: 0;
3354
- color: ${({theme:e})=>e.colors.primary};
3355
- }
3356
- `,UL=()=>{const{conversationGraphState:e,isGraphVisualiserOpen:t,toggleGraphVisualiser:r}=cn();if(!t||!(e!=null&&e.isActive))return null;const{nodes:i=[],edges:l=[],currentNodeId:a}=e;return h.jsxs(FL,{children:[h.jsxs(_L,{children:[h.jsx("h3",{children:"Conversation Flow"}),h.jsx(OL,{onClick:r,"aria-label":"Close visualiser",children:"×"})]}),h.jsxs(ML,{children:[h.jsx("h4",{children:"Nodes:"}),i.map(u=>h.jsxs(DL,{isActive:u.id===a,children:[h.jsxs("strong",{children:["ID: ",u.id]})," (",u.actionType,")",h.jsx("p",{children:u.instruction})]},u.id)),h.jsx("h4",{children:"Edges:"}),l.map((u,d)=>h.jsxs(BL,{children:[u.sourceNode," to ",u.targetNode,": ",u.instruction]},`${u.sourceNode}-${u.targetNode}-${d}`)),a&&h.jsxs("p",{children:[h.jsx("strong",{children:"Current Node:"})," ",a]})]})]})},VL=e=>{var t;for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.type===Hn.SYSTEM&&((t=i.data)!=null&&t.conversationGraphState))return i.data.conversationGraphState}return null},HL=()=>{const{messages:e,setConversationGraphState:t}=$.useContext(oi);return $.useEffect(()=>{const r=VL(e);t(i=>JSON.stringify(i)!==JSON.stringify(r)?r:i)},[e,t]),null};C.div`
3357
- position: fixed;
3358
- bottom: 70px; /* Adjust as needed to not overlap input area */
3359
- right: 20px;
3360
- width: 400px;
3361
- max-height: 50vh;
3362
- background-color: ${({theme:e})=>e.colors.backgroundSecondary};
3363
- border: 1px solid ${({theme:e})=>e.colors.border};
3364
- border-radius: 8px;
3365
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3366
- z-index: 1000;
3367
- overflow: auto;
3368
- padding: 15px;
3369
- display: flex;
3370
- flex-direction: column;
3371
- `;C.div`
3372
- display: flex;
3373
- justify-content: space-between;
3374
- align-items: center;
3375
- margin-bottom: 10px;
3376
- padding-bottom: 10px;
3377
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
3378
-
3379
- h3 {
3380
- margin: 0;
3381
- font-size: 1rem;
3382
- color: ${({theme:e})=>e.colors.text};
3383
- }
3384
- `;C.button`
3385
- background: none;
3386
- border: none;
3387
- color: ${({theme:e})=>e.colors.text};
3388
- font-size: 1.2rem;
3389
- cursor: pointer;
3390
- padding: 0;
3391
- line-height: 1;
3392
-
3393
- &:hover {
3394
- color: ${({theme:e})=>e.colors.primary};
3395
- }
3396
- `;const Fx=C.div`
3397
- flex-grow: 1;
3398
- display: flex;
3399
- flex-direction: column;
3400
- gap: 10px;
3401
- `,Dd={pending:e=>e.colors.textSecondary,"in-progress":e=>e.colors.info,completed:e=>e.colors.success,failed:e=>e.colors.error,skipped:e=>e.colors.warning},WL=C.div`
3402
- background-color: ${({theme:e})=>e.colors.inputBg};
3403
- border: 1px solid ${({theme:e})=>e.colors.border};
3404
- border-left: 4px solid ${({state:e,theme:t})=>Dd[e](t)};
3405
- border-radius: 4px;
3406
- padding: 8px 12px;
3407
- font-size: 0.9rem;
3408
- color: ${({theme:e})=>e.colors.inputText};
3409
- transition: border-color 0.3s ease;
3410
- display: flex;
3411
- align-items: center;
3412
-
3413
- strong {
3414
- color: ${({state:e,theme:t})=>Dd[e](t)};
3415
- }
3416
-
3417
- p {
3418
- margin: 5px 0 0 0;
3419
- font-size: 0.8rem;
3420
- color: ${({theme:e})=>e.colors.textSecondary};
3421
- }
3422
- `,qL=C.div`
3423
- font-weight: bold;
3424
- text-transform: capitalize;
3425
- color: ${({state:e,theme:t})=>Dd[e](t)};
3426
- margin-right: 10px;
3427
- flex-shrink: 0;
3428
- width: 80px; /* Align states */
3429
- `,GL=C.div`
3430
- display: flex;
3431
- flex-direction: column;
3432
- flex-grow: 1;
3433
-
3434
- small {
3435
- margin-top: 4px;
3436
- font-size: 0.8em;
3437
- color: ${({theme:e})=>e.colors.textSecondary};
3438
- }
3439
- `;C.div`
3440
- font-size: 0.8rem;
3441
- color: ${({theme:e})=>e.colors.textSecondary};
3442
- margin-top: 5px;
3443
- padding-left: 10px;
3444
- border-left: 2px solid ${({theme:e})=>e.colors.border};
3445
- `;const JL=({executionPlan:e,planUpdates:t})=>{if(!e||!e.length)return h.jsx(Fx,{children:"No execution plan available."});const r=JSON.parse(JSON.stringify(e));for(const i of t){const l=r.find(a=>a.id===i.id);l&&(l.statusUpdate=i.statusUpdate,l.state=i.state)}return h.jsx(Fx,{children:r.map(i=>h.jsxs(WL,{state:i.state??"pending",children:[h.jsx(qL,{state:i.state??"pending",children:i.state??"pending"}),h.jsxs(GL,{children:[h.jsxs("strong",{children:["ID: ",i.id]}),h.jsx("p",{children:i.description}),i.statusUpdate&&h.jsxs("small",{children:["Update: ",i.statusUpdate]})]})]},i.id))})},KL=5e3,QL=16,YL=({events:e,onClear:t})=>{const r=$.useRef(null),[i,l]=$.useState(!1),[a,u]=$.useState(new Set),[d,f]=$.useState("logs"),{toggleTerminal:p}=cn(),x=$.useRef(!0),{executionPlan:m,planUpdates:v}=$.useMemo(()=>{var A;const j=[...e].reverse().find(F=>{var O;return(O=F.data)==null?void 0:O.plan}),E=(A=j==null?void 0:j.data)==null?void 0:A.plan,I=e.filter(F=>{var O,N,H;return((O=F.data)==null?void 0:O.statusUpdate)&&((N=F.data)==null?void 0:N.id)&&((H=F.data)==null?void 0:H.state)}).map(F=>F.data);return{executionPlan:E,planUpdates:I}},[e]);$.useLayoutEffect(()=>{r.current&&d==="logs"&&x.current&&setTimeout(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},100)},[e,d]);const w=async()=>{try{await Ly()}catch(j){console.error("Failed to interrupt command:",j)}},k=e.length>KL?e.slice(-5e3):e,S=()=>{r.current&&(x.current=r.current.scrollHeight-r.current.scrollTop<=r.current.clientHeight+QL)};return h.jsxs(nL,{children:[h.jsxs(rL,{children:[h.jsx("h4",{children:"Container Task"}),h.jsxs(lL,{children:[h.jsx(Lx,{active:d==="logs",onClick:()=>f("logs"),children:"Logs"}),h.jsx(Lx,{active:d==="plan",onClick:()=>f("plan"),disabled:!m,children:"Execution Plan"})]}),h.jsxs(iL,{children:[d==="logs"&&h.jsxs(h.Fragment,{children:[h.jsx(od,{active:!1,onClick:t,"aria-label":"Clear terminal log",children:"Clear"}),h.jsx(od,{active:i,onClick:()=>l(!i),"aria-label":i?"Hide all payloads":"Show all payloads",children:"Payloads"})]}),h.jsx(od,{active:!1,onClick:w,"aria-label":"Interrupt current container command",children:"Interrupt"}),h.jsx(oL,{onClick:p,"aria-label":"Close terminal",children:"×"})]})]}),h.jsx(sL,{ref:r,onScroll:S,children:d==="logs"?k.map(j=>{const E=!!(j.data&&Object.keys(j.data).length>0),I=i||a.has(j.id);let A="";if(E)try{A=JSON.stringify(j.data,null,2)}catch{A=String(j.data)}return h.jsxs(Tt.Fragment,{children:[h.jsxs(aL,{children:[h.jsx("span",{className:"timestamp",children:new Date(j.timestamp).toLocaleTimeString()}),h.jsx(uL,{level:j.level,children:j.level}),h.jsxs("span",{className:"source",children:["[",j.source,"]"]}),h.jsxs(cL,{children:[j.text,E&&h.jsx(dL,{onClick:()=>{const F=new Set(a);I?F.delete(j.id):F.add(j.id),u(F)},children:I?"Hide payload":"Show payload"})]})]}),E&&I&&h.jsx(fL,{children:h.jsx(pL,{children:A})})]},j.id)}):h.jsx(JL,{executionPlan:m,planUpdates:v})})]})},va=class va{constructor(t=50,r){Rn(this,"buffer",[]);Rn(this,"maxBufferSize");Rn(this,"callback");Rn(this,"pendingBatch",[]);Rn(this,"flushScheduled",!1);this.maxBufferSize=t,this.callback=r,this._wrapConsoleMethods()}_wrapConsoleMethods(){["log","info","warn","error","debug","trace","assert"].forEach(r=>{const i=console[r];console[r]=(...l)=>{this._enqueue(r,l),i.apply(console,l)}})}_formatMessage(t){const r=t.map(l=>{if(typeof l=="string")return l;try{return JSON.stringify(l)}catch{return String(l)}}).join(" "),i=va.MAX_ENTRY_MESSAGE_LENGTH;return r.length>i?r.slice(0,i)+` … [${r.length-i} more chars]`:r}_enqueue(t,r){const i={timestamp:Date.now(),level:t,message:this._formatMessage(r),args:r};this.buffer.push(i),this.buffer.length>this.maxBufferSize&&this.buffer.splice(0,this.buffer.length-this.maxBufferSize),this.pendingBatch.push(i),this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this._flush()))}_flush(){if(this.pendingBatch.length===0){this.flushScheduled=!1;return}const t=this.pendingBatch;this.pendingBatch=[],this.flushScheduled=!1,this.callback(t).catch(r=>{console.warn.call(console,"ConsoleInterceptor: Failed to execute callback:",r)})}getBuffer(){return[...this.buffer]}clearBuffer(){this.buffer=[],this.pendingBatch=[],this.flushScheduled=!1}};Rn(va,"MAX_ENTRY_MESSAGE_LENGTH",2e3);let Bd=va;const XL=()=>{const{messages:e,executionStatus:t,currentQuestion:r,theme:i,usage:l,codegenOptions:a,rcConfig:u,toggleTheme:d,setCodegenOptions:f,handlePauseExecution:p,handleResumeExecution:x,isTerminalOpen:m,terminalEvents:v,clearTerminalEvents:w}=$.useContext(oi),{handleExecute:k,handleQuestionSubmit:S,handleInterrupt:j}=L2({codegenOptions:a}),E=t!=="idle"&&e.length>0?e[e.length-1].iterationId:null,I=E&&v[E]||[];$.useEffect(()=>{if(!(a!=null&&a.isDev))return;const O=50;new Bd(O,async N=>{try{await OC("__console_logs",N)}catch(H){console.warn("Failed to push console logs to app context:",H)}}),console.log("GenAIcode: Console log interception enabled in dev mode.")},[a==null?void 0:a.isDev]);const A=()=>{t==="paused"?x():p()};if(!l||!a)return h.jsxs(Hm,{theme:i==="light"?Gm:Jm,children:[h.jsx(zx,{}),h.jsx("div",{children:"Loading..."})," "]});const F=t!=="idle";return h.jsxs(Hm,{theme:i==="light"?Gm:Jm,children:[h.jsx(zx,{}),h.jsx(k2,{themeToggle:h.jsx(IL,{theme:i,toggleTheme:d}),toggleTheme:d,chatInterface:h.jsx(SL,{messages:e,currentQuestion:r,codegenOptions:a,onQuestionSubmit:S,onInterrupt:j,onPauseResume:A,executionStatus:t}),inputArea:!F&&h.jsx(TL,{onSubmit:k,isExecuting:F,onInterrupt:j,codegenOptions:a,onOptionsChange:f}),usage:l}),m&&E&&h.jsx(YL,{events:I,onClear:()=>w(E)}),h.jsx(YC,{currentService:a.aiService}),h.jsx(fE,{}),h.jsx(JE,{}),h.jsx(nj,{rcConfig:u}),h.jsx(yj,{options:a,onOptionsChange:f}),h.jsx(AL,{currentQuestion:r,messages:e}),h.jsx(UL,{}),h.jsx(HL,{})]})};function ZL(){return h.jsxs(bj,{children:[h.jsx(zL,{})," ",h.jsx(XL,{})," "]})}const ez=document.getElementById("root"),tz=Wk.createRoot(ez);tz.render(Tt.createElement(ZL,null));