convex-devtools 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli/{chunk-C34UOOQW.js → chunk-V3TQXD75.js} +192 -16
- package/dist/cli/chunk-V3TQXD75.js.map +1 -0
- package/dist/cli/index.js +3 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/server/index.js +1 -1
- package/dist/ui/assets/index-CfJtWlh3.css +1 -0
- package/dist/ui/assets/index-CmJMX4m3.js +62 -0
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/cli/chunk-C34UOOQW.js.map +0 -1
- package/dist/ui/assets/index-BWMqfNYw.css +0 -1
- package/dist/ui/assets/index-QzqOVpJc.js +0 -62
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function ba(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pa={exports:{}},Sl={},Ma={exports:{}},$={};/**
|
|
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 xr=Symbol.for("react.element"),ad=Symbol.for("react.portal"),ud=Symbol.for("react.fragment"),cd=Symbol.for("react.strict_mode"),dd=Symbol.for("react.profiler"),fd=Symbol.for("react.provider"),pd=Symbol.for("react.context"),hd=Symbol.for("react.forward_ref"),md=Symbol.for("react.suspense"),xd=Symbol.for("react.memo"),vd=Symbol.for("react.lazy"),mi=Symbol.iterator;function gd(e){return e===null||typeof e!="object"?null:(e=mi&&e[mi]||e["@@iterator"],typeof e=="function"?e:null)}var Oa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},za=Object.assign,Ia={};function Ln(e,t,n){this.props=e,this.context=t,this.refs=Ia,this.updater=n||Oa}Ln.prototype.isReactComponent={};Ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ra(){}Ra.prototype=Ln.prototype;function ms(e,t,n){this.props=e,this.context=t,this.refs=Ia,this.updater=n||Oa}var xs=ms.prototype=new Ra;xs.constructor=ms;za(xs,Ln.prototype);xs.isPureReactComponent=!0;var xi=Array.isArray,Da=Object.prototype.hasOwnProperty,vs={current:null},Fa={key:!0,ref:!0,__self:!0,__source:!0};function Aa(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Da.call(t,r)&&!Fa.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),f=0;f<a;f++)u[f]=arguments[f+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:xr,type:e,key:o,ref:i,props:l,_owner:vs.current}}function yd(e,t){return{$$typeof:xr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gs(e){return typeof e=="object"&&e!==null&&e.$$typeof===xr}function wd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vi=/\/+/g;function Vl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wd(""+e.key):t.toString(36)}function Br(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case xr:case ad:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+Vl(i,0):r,xi(l)?(n="",e!=null&&(n=e.replace(vi,"$&/")+"/"),Br(l,t,n,"",function(f){return f})):l!=null&&(gs(l)&&(l=yd(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(vi,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",xi(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+Vl(o,a);i+=Br(o,t,n,u,l)}else if(u=gd(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+Vl(o,a++),i+=Br(o,t,n,u,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Nr(e,t,n){if(e==null)return e;var r=[],l=0;return Br(e,r,"","",function(o){return t.call(n,o,l++)}),r}function kd(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ce={current:null},Hr={transition:null},jd={ReactCurrentDispatcher:Ce,ReactCurrentBatchConfig:Hr,ReactCurrentOwner:vs};function $a(){throw Error("act(...) is not supported in production builds of React.")}$.Children={map:Nr,forEach:function(e,t,n){Nr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Nr(e,function(){t++}),t},toArray:function(e){return Nr(e,function(t){return t})||[]},only:function(e){if(!gs(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$.Component=Ln;$.Fragment=ud;$.Profiler=dd;$.PureComponent=ms;$.StrictMode=cd;$.Suspense=md;$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jd;$.act=$a;$.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=za({},e.props),l=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=vs.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Da.call(t,u)&&!Fa.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var f=0;f<u;f++)a[f]=arguments[f+2];r.children=a}return{$$typeof:xr,type:e.type,key:l,ref:o,props:r,_owner:i}};$.createContext=function(e){return e={$$typeof:pd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:fd,_context:e},e.Consumer=e};$.createElement=Aa;$.createFactory=function(e){var t=Aa.bind(null,e);return t.type=e,t};$.createRef=function(){return{current:null}};$.forwardRef=function(e){return{$$typeof:hd,render:e}};$.isValidElement=gs;$.lazy=function(e){return{$$typeof:vd,_payload:{_status:-1,_result:e},_init:kd}};$.memo=function(e,t){return{$$typeof:xd,type:e,compare:t===void 0?null:t}};$.startTransition=function(e){var t=Hr.transition;Hr.transition={};try{e()}finally{Hr.transition=t}};$.unstable_act=$a;$.useCallback=function(e,t){return Ce.current.useCallback(e,t)};$.useContext=function(e){return Ce.current.useContext(e)};$.useDebugValue=function(){};$.useDeferredValue=function(e){return Ce.current.useDeferredValue(e)};$.useEffect=function(e,t){return Ce.current.useEffect(e,t)};$.useId=function(){return Ce.current.useId()};$.useImperativeHandle=function(e,t,n){return Ce.current.useImperativeHandle(e,t,n)};$.useInsertionEffect=function(e,t){return Ce.current.useInsertionEffect(e,t)};$.useLayoutEffect=function(e,t){return Ce.current.useLayoutEffect(e,t)};$.useMemo=function(e,t){return Ce.current.useMemo(e,t)};$.useReducer=function(e,t,n){return Ce.current.useReducer(e,t,n)};$.useRef=function(e){return Ce.current.useRef(e)};$.useState=function(e){return Ce.current.useState(e)};$.useSyncExternalStore=function(e,t,n){return Ce.current.useSyncExternalStore(e,t,n)};$.useTransition=function(){return Ce.current.useTransition()};$.version="18.3.1";Ma.exports=$;var b=Ma.exports;const Ba=ba(b);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Sd=b,Nd=Symbol.for("react.element"),Cd=Symbol.for("react.fragment"),Ed=Object.prototype.hasOwnProperty,Td=Sd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ld={key:!0,ref:!0,__self:!0,__source:!0};function Ha(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Ed.call(t,r)&&!Ld.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Nd,type:e,key:o,ref:i,props:l,_owner:Td.current}}Sl.Fragment=Cd;Sl.jsx=Ha;Sl.jsxs=Ha;Pa.exports=Sl;var s=Pa.exports,jo={},Wa={exports:{}},De={},Ua={exports:{}},Va={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(E,M){var C=E.length;E.push(M);e:for(;0<C;){var I=C-1>>>1,R=E[I];if(0<l(R,M))E[I]=M,E[C]=R,C=I;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var M=E[0],C=E.pop();if(C!==M){E[0]=C;e:for(var I=0,R=E.length,Y=R>>>1;I<Y;){var ue=2*(I+1)-1,Te=E[ue],Ae=ue+1,pe=E[Ae];if(0>l(Te,C))Ae<R&&0>l(pe,Te)?(E[I]=pe,E[Ae]=C,I=Ae):(E[I]=Te,E[ue]=C,I=ue);else if(Ae<R&&0>l(pe,C))E[I]=pe,E[Ae]=C,I=Ae;else break e}}return M}function l(E,M){var C=E.sortIndex-M.sortIndex;return C!==0?C:E.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],f=[],v=1,x=null,h=3,m=!1,g=!1,y=!1,j=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(E){for(var M=n(f);M!==null;){if(M.callback===null)r(f);else if(M.startTime<=E)r(f),M.sortIndex=M.expirationTime,t(u,M);else break;M=n(f)}}function w(E){if(y=!1,p(E),!g)if(n(u)!==null)g=!0,le(T);else{var M=n(f);M!==null&&ke(w,M.startTime-E)}}function T(E,M){g=!1,y&&(y=!1,d(O),O=-1),m=!0;var C=h;try{for(p(M),x=n(u);x!==null&&(!(x.expirationTime>M)||E&&!S());){var I=x.callback;if(typeof I=="function"){x.callback=null,h=x.priorityLevel;var R=I(x.expirationTime<=M);M=e.unstable_now(),typeof R=="function"?x.callback=R:x===n(u)&&r(u),p(M)}else r(u);x=n(u)}if(x!==null)var Y=!0;else{var ue=n(f);ue!==null&&ke(w,ue.startTime-M),Y=!1}return Y}finally{x=null,h=C,m=!1}}var L=!1,_=null,O=-1,A=5,D=-1;function S(){return!(e.unstable_now()-D<A)}function te(){if(_!==null){var E=e.unstable_now();D=E;var M=!0;try{M=_(!0,E)}finally{M?B():(L=!1,_=null)}}else L=!1}var B;if(typeof c=="function")B=function(){c(te)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,H=se.port2;se.port1.onmessage=te,B=function(){H.postMessage(null)}}else B=function(){j(te,0)};function le(E){_=E,L||(L=!0,B())}function ke(E,M){O=j(function(){E(e.unstable_now())},M)}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(E){E.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,le(T))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(E){switch(h){case 1:case 2:case 3:var M=3;break;default:M=h}var C=h;h=M;try{return E()}finally{h=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,M){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var C=h;h=E;try{return M()}finally{h=C}},e.unstable_scheduleCallback=function(E,M,C){var I=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?I+C:I):C=I,E){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=C+R,E={id:v++,callback:M,priorityLevel:E,startTime:C,expirationTime:R,sortIndex:-1},C>I?(E.sortIndex=C,t(f,E),n(u)===null&&E===n(f)&&(y?(d(O),O=-1):y=!0,ke(w,C-I))):(E.sortIndex=R,t(u,E),g||m||(g=!0,le(T))),E},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(E){var M=h;return function(){var C=h;h=M;try{return E.apply(this,arguments)}finally{h=C}}}})(Va);Ua.exports=Va;var _d=Ua.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var bd=b,Re=_d;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qa=new Set,Zn={};function Yt(e,t){wn(e,t),wn(e+"Capture",t)}function wn(e,t){for(Zn[e]=t,e=0;e<t.length;e++)Qa.add(t[e])}var ut=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),So=Object.prototype.hasOwnProperty,Pd=/^[: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]*$/,gi={},yi={};function Md(e){return So.call(yi,e)?!0:So.call(gi,e)?!1:Pd.test(e)?yi[e]=!0:(gi[e]=!0,!1)}function Od(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zd(e,t,n,r){if(t===null||typeof t>"u"||Od(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ee(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Ee(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Ee(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Ee(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Ee(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new Ee(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Ee(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Ee(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Ee(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var ys=/[\-:]([a-z])/g;function ws(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ys,ws);xe[t]=new Ee(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ys,ws);xe[t]=new Ee(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ys,ws);xe[t]=new Ee(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Ee(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Ee(e,1,!1,e.toLowerCase(),null,!0,!0)});function ks(e,t,n,r){var l=xe.hasOwnProperty(t)?xe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zd(t,n,l,r)&&(n=null),r||l===null?Md(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var pt=bd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cr=Symbol.for("react.element"),tn=Symbol.for("react.portal"),nn=Symbol.for("react.fragment"),js=Symbol.for("react.strict_mode"),No=Symbol.for("react.profiler"),Ja=Symbol.for("react.provider"),qa=Symbol.for("react.context"),Ss=Symbol.for("react.forward_ref"),Co=Symbol.for("react.suspense"),Eo=Symbol.for("react.suspense_list"),Ns=Symbol.for("react.memo"),mt=Symbol.for("react.lazy"),Ka=Symbol.for("react.offscreen"),wi=Symbol.iterator;function Mn(e){return e===null||typeof e!="object"?null:(e=wi&&e[wi]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,Ql;function $n(e){if(Ql===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ql=t&&t[1]||""}return`
|
|
34
|
-
`+Ql+e}var Jl=!1;function ql(e,t){if(!e||Jl)return"";Jl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var l=f.stack.split(`
|
|
35
|
-
`),o=r.stack.split(`
|
|
36
|
-
`),i=l.length-1,a=o.length-1;1<=i&&0<=a&&l[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(l[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||l[i]!==o[a]){var u=`
|
|
37
|
-
`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{Jl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$n(e):""}function Id(e){switch(e.tag){case 5:return $n(e.type);case 16:return $n("Lazy");case 13:return $n("Suspense");case 19:return $n("SuspenseList");case 0:case 2:case 15:return e=ql(e.type,!1),e;case 11:return e=ql(e.type.render,!1),e;case 1:return e=ql(e.type,!0),e;default:return""}}function To(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nn:return"Fragment";case tn:return"Portal";case No:return"Profiler";case js:return"StrictMode";case Co:return"Suspense";case Eo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qa:return(e.displayName||"Context")+".Consumer";case Ja:return(e._context.displayName||"Context")+".Provider";case Ss:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ns:return t=e.displayName||null,t!==null?t:To(e.type)||"Memo";case mt:t=e._payload,e=e._init;try{return To(e(t))}catch{}}return null}function Rd(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return To(t);case 8:return t===js?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ya(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dd(e){var t=Ya(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Er(e){e._valueTracker||(e._valueTracker=Dd(e))}function Ga(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ya(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Lo(e,t){var n=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ki(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_t(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xa(e,t){t=t.checked,t!=null&&ks(e,"checked",t,!1)}function _o(e,t){Xa(e,t);var n=_t(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bo(e,t.type,n):t.hasOwnProperty("defaultValue")&&bo(e,t.type,_t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ji(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bo(e,t,n){(t!=="number"||Zr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+_t(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Po(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Si(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if(Bn(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:_t(n)}}function Za(e,t){var n=_t(t.value),r=_t(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ni(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function eu(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Mo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?eu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tr,tu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tr=Tr||document.createElement("div"),Tr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function er(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Un={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},Fd=["Webkit","ms","Moz","O"];Object.keys(Un).forEach(function(e){Fd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Un[t]=Un[e]})});function nu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Un.hasOwnProperty(e)&&Un[e]?(""+t).trim():t+"px"}function ru(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=nu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Ad=ee({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 Oo(e,t){if(t){if(Ad[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function zo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Io=null;function Cs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ro=null,mn=null,xn=null;function Ci(e){if(e=yr(e)){if(typeof Ro!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Ll(t),Ro(e.stateNode,e.type,t))}}function lu(e){mn?xn?xn.push(e):xn=[e]:mn=e}function ou(){if(mn){var e=mn,t=xn;if(xn=mn=null,Ci(e),t)for(e=0;e<t.length;e++)Ci(t[e])}}function su(e,t){return e(t)}function iu(){}var Kl=!1;function au(e,t,n){if(Kl)return e(t,n);Kl=!0;try{return su(e,t,n)}finally{Kl=!1,(mn!==null||xn!==null)&&(iu(),ou())}}function tr(e,t){var n=e.stateNode;if(n===null)return null;var r=Ll(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(N(231,t,typeof n));return n}var Do=!1;if(ut)try{var On={};Object.defineProperty(On,"passive",{get:function(){Do=!0}}),window.addEventListener("test",On,On),window.removeEventListener("test",On,On)}catch{Do=!1}function $d(e,t,n,r,l,o,i,a,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(v){this.onError(v)}}var Vn=!1,el=null,tl=!1,Fo=null,Bd={onError:function(e){Vn=!0,el=e}};function Hd(e,t,n,r,l,o,i,a,u){Vn=!1,el=null,$d.apply(Bd,arguments)}function Wd(e,t,n,r,l,o,i,a,u){if(Hd.apply(this,arguments),Vn){if(Vn){var f=el;Vn=!1,el=null}else throw Error(N(198));tl||(tl=!0,Fo=f)}}function Gt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function uu(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ei(e){if(Gt(e)!==e)throw Error(N(188))}function Ud(e){var t=e.alternate;if(!t){if(t=Gt(e),t===null)throw Error(N(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return Ei(l),e;if(o===r)return Ei(l),t;o=o.sibling}throw Error(N(188))}if(n.return!==r.return)n=l,r=o;else{for(var i=!1,a=l.child;a;){if(a===n){i=!0,n=l,r=o;break}if(a===r){i=!0,r=l,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=l;break}if(a===r){i=!0,r=o,n=l;break}a=a.sibling}if(!i)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function cu(e){return e=Ud(e),e!==null?du(e):null}function du(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=du(e);if(t!==null)return t;e=e.sibling}return null}var fu=Re.unstable_scheduleCallback,Ti=Re.unstable_cancelCallback,Vd=Re.unstable_shouldYield,Qd=Re.unstable_requestPaint,re=Re.unstable_now,Jd=Re.unstable_getCurrentPriorityLevel,Es=Re.unstable_ImmediatePriority,pu=Re.unstable_UserBlockingPriority,nl=Re.unstable_NormalPriority,qd=Re.unstable_LowPriority,hu=Re.unstable_IdlePriority,Nl=null,nt=null;function Kd(e){if(nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Nl,e,void 0,(e.current.flags&128)===128)}catch{}}var Ye=Math.clz32?Math.clz32:Xd,Yd=Math.log,Gd=Math.LN2;function Xd(e){return e>>>=0,e===0?32:31-(Yd(e)/Gd|0)|0}var Lr=64,_r=4194304;function Hn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function rl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Hn(a):(o&=i,o!==0&&(r=Hn(o)))}else i=n&~l,i!==0?r=Hn(i):o!==0&&(r=Hn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ye(t),l=1<<n,r|=e[n],t&=~l;return r}function Zd(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ef(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Ye(o),a=1<<i,u=l[i];u===-1?(!(a&n)||a&r)&&(l[i]=Zd(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function Ao(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function mu(){var e=Lr;return Lr<<=1,!(Lr&4194240)&&(Lr=64),e}function Yl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ye(t),e[t]=n}function tf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Ye(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function Ts(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var Q=0;function xu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var vu,Ls,gu,yu,wu,$o=!1,br=[],kt=null,jt=null,St=null,nr=new Map,rr=new Map,vt=[],nf="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 Li(e,t){switch(e){case"focusin":case"focusout":kt=null;break;case"dragenter":case"dragleave":jt=null;break;case"mouseover":case"mouseout":St=null;break;case"pointerover":case"pointerout":nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rr.delete(t.pointerId)}}function zn(e,t,n,r,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},t!==null&&(t=yr(t),t!==null&&Ls(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function rf(e,t,n,r,l){switch(t){case"focusin":return kt=zn(kt,e,t,n,r,l),!0;case"dragenter":return jt=zn(jt,e,t,n,r,l),!0;case"mouseover":return St=zn(St,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return nr.set(o,zn(nr.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,rr.set(o,zn(rr.get(o)||null,e,t,n,r,l)),!0}return!1}function ku(e){var t=$t(e.target);if(t!==null){var n=Gt(t);if(n!==null){if(t=n.tag,t===13){if(t=uu(n),t!==null){e.blockedOn=t,wu(e.priority,function(){gu(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Io=r,n.target.dispatchEvent(r),Io=null}else return t=yr(n),t!==null&&Ls(t),e.blockedOn=n,!1;t.shift()}return!0}function _i(e,t,n){Wr(e)&&n.delete(t)}function lf(){$o=!1,kt!==null&&Wr(kt)&&(kt=null),jt!==null&&Wr(jt)&&(jt=null),St!==null&&Wr(St)&&(St=null),nr.forEach(_i),rr.forEach(_i)}function In(e,t){e.blockedOn===t&&(e.blockedOn=null,$o||($o=!0,Re.unstable_scheduleCallback(Re.unstable_NormalPriority,lf)))}function lr(e){function t(l){return In(l,e)}if(0<br.length){In(br[0],e);for(var n=1;n<br.length;n++){var r=br[n];r.blockedOn===e&&(r.blockedOn=null)}}for(kt!==null&&In(kt,e),jt!==null&&In(jt,e),St!==null&&In(St,e),nr.forEach(t),rr.forEach(t),n=0;n<vt.length;n++)r=vt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<vt.length&&(n=vt[0],n.blockedOn===null);)ku(n),n.blockedOn===null&&vt.shift()}var vn=pt.ReactCurrentBatchConfig,ll=!0;function of(e,t,n,r){var l=Q,o=vn.transition;vn.transition=null;try{Q=1,_s(e,t,n,r)}finally{Q=l,vn.transition=o}}function sf(e,t,n,r){var l=Q,o=vn.transition;vn.transition=null;try{Q=4,_s(e,t,n,r)}finally{Q=l,vn.transition=o}}function _s(e,t,n,r){if(ll){var l=Bo(e,t,n,r);if(l===null)so(e,t,r,ol,n),Li(e,r);else if(rf(l,e,t,n,r))r.stopPropagation();else if(Li(e,r),t&4&&-1<nf.indexOf(e)){for(;l!==null;){var o=yr(l);if(o!==null&&vu(o),o=Bo(e,t,n,r),o===null&&so(e,t,r,ol,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else so(e,t,r,null,n)}}var ol=null;function Bo(e,t,n,r){if(ol=null,e=Cs(r),e=$t(e),e!==null)if(t=Gt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=uu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ol=e,null}function ju(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Jd()){case Es:return 1;case pu:return 4;case nl:case qd:return 16;case hu:return 536870912;default:return 16}default:return 16}}var yt=null,bs=null,Ur=null;function Su(){if(Ur)return Ur;var e,t=bs,n=t.length,r,l="value"in yt?yt.value:yt.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===l[o-r];r++);return Ur=l.slice(e,1<r?1-r:void 0)}function Vr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Pr(){return!0}function bi(){return!1}function Fe(e){function t(n,r,l,o,i){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Pr:bi,this.isPropagationStopped=bi,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Pr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Pr)},persist:function(){},isPersistent:Pr}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ps=Fe(_n),gr=ee({},_n,{view:0,detail:0}),af=Fe(gr),Gl,Xl,Rn,Cl=ee({},gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ms,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Rn&&(Rn&&e.type==="mousemove"?(Gl=e.screenX-Rn.screenX,Xl=e.screenY-Rn.screenY):Xl=Gl=0,Rn=e),Gl)},movementY:function(e){return"movementY"in e?e.movementY:Xl}}),Pi=Fe(Cl),uf=ee({},Cl,{dataTransfer:0}),cf=Fe(uf),df=ee({},gr,{relatedTarget:0}),Zl=Fe(df),ff=ee({},_n,{animationName:0,elapsedTime:0,pseudoElement:0}),pf=Fe(ff),hf=ee({},_n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mf=Fe(hf),xf=ee({},_n,{data:0}),Mi=Fe(xf),vf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gf={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"},yf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yf[e])?!!t[e]:!1}function Ms(){return wf}var kf=ee({},gr,{key:function(e){if(e.key){var t=vf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ms,charCode:function(e){return e.type==="keypress"?Vr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jf=Fe(kf),Sf=ee({},Cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Oi=Fe(Sf),Nf=ee({},gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ms}),Cf=Fe(Nf),Ef=ee({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tf=Fe(Ef),Lf=ee({},Cl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_f=Fe(Lf),bf=[9,13,27,32],Os=ut&&"CompositionEvent"in window,Qn=null;ut&&"documentMode"in document&&(Qn=document.documentMode);var Pf=ut&&"TextEvent"in window&&!Qn,Nu=ut&&(!Os||Qn&&8<Qn&&11>=Qn),zi=" ",Ii=!1;function Cu(e,t){switch(e){case"keyup":return bf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rn=!1;function Mf(e,t){switch(e){case"compositionend":return Eu(t);case"keypress":return t.which!==32?null:(Ii=!0,zi);case"textInput":return e=t.data,e===zi&&Ii?null:e;default:return null}}function Of(e,t){if(rn)return e==="compositionend"||!Os&&Cu(e,t)?(e=Su(),Ur=bs=yt=null,rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nu&&t.locale!=="ko"?null:t.data;default:return null}}var zf={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 Ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zf[e.type]:t==="textarea"}function Tu(e,t,n,r){lu(r),t=sl(t,"onChange"),0<t.length&&(n=new Ps("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jn=null,or=null;function If(e){Fu(e,0)}function El(e){var t=sn(e);if(Ga(t))return e}function Rf(e,t){if(e==="change")return t}var Lu=!1;if(ut){var eo;if(ut){var to="oninput"in document;if(!to){var Di=document.createElement("div");Di.setAttribute("oninput","return;"),to=typeof Di.oninput=="function"}eo=to}else eo=!1;Lu=eo&&(!document.documentMode||9<document.documentMode)}function Fi(){Jn&&(Jn.detachEvent("onpropertychange",_u),or=Jn=null)}function _u(e){if(e.propertyName==="value"&&El(or)){var t=[];Tu(t,or,e,Cs(e)),au(If,t)}}function Df(e,t,n){e==="focusin"?(Fi(),Jn=t,or=n,Jn.attachEvent("onpropertychange",_u)):e==="focusout"&&Fi()}function Ff(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return El(or)}function Af(e,t){if(e==="click")return El(t)}function $f(e,t){if(e==="input"||e==="change")return El(t)}function Bf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xe=typeof Object.is=="function"?Object.is:Bf;function sr(e,t){if(Xe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!So.call(t,l)||!Xe(e[l],t[l]))return!1}return!0}function Ai(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $i(e,t){var n=Ai(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ai(n)}}function bu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pu(){for(var e=window,t=Zr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zr(e.document)}return t}function zs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Hf(e){var t=Pu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bu(n.ownerDocument.documentElement,n)){if(r!==null&&zs(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=$i(n,o);var i=$i(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Wf=ut&&"documentMode"in document&&11>=document.documentMode,ln=null,Ho=null,qn=null,Wo=!1;function Bi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wo||ln==null||ln!==Zr(r)||(r=ln,"selectionStart"in r&&zs(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qn&&sr(qn,r)||(qn=r,r=sl(Ho,"onSelect"),0<r.length&&(t=new Ps("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ln)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var on={animationend:Mr("Animation","AnimationEnd"),animationiteration:Mr("Animation","AnimationIteration"),animationstart:Mr("Animation","AnimationStart"),transitionend:Mr("Transition","TransitionEnd")},no={},Mu={};ut&&(Mu=document.createElement("div").style,"AnimationEvent"in window||(delete on.animationend.animation,delete on.animationiteration.animation,delete on.animationstart.animation),"TransitionEvent"in window||delete on.transitionend.transition);function Tl(e){if(no[e])return no[e];if(!on[e])return e;var t=on[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Mu)return no[e]=t[n];return e}var Ou=Tl("animationend"),zu=Tl("animationiteration"),Iu=Tl("animationstart"),Ru=Tl("transitionend"),Du=new Map,Hi="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 Mt(e,t){Du.set(e,t),Yt(t,[e])}for(var ro=0;ro<Hi.length;ro++){var lo=Hi[ro],Uf=lo.toLowerCase(),Vf=lo[0].toUpperCase()+lo.slice(1);Mt(Uf,"on"+Vf)}Mt(Ou,"onAnimationEnd");Mt(zu,"onAnimationIteration");Mt(Iu,"onAnimationStart");Mt("dblclick","onDoubleClick");Mt("focusin","onFocus");Mt("focusout","onBlur");Mt(Ru,"onTransitionEnd");wn("onMouseEnter",["mouseout","mouseover"]);wn("onMouseLeave",["mouseout","mouseover"]);wn("onPointerEnter",["pointerout","pointerover"]);wn("onPointerLeave",["pointerout","pointerover"]);Yt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Yt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Yt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Yt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Yt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Yt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wn="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(" "),Qf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wn));function Wi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Wd(r,t,void 0,e),e.currentTarget=null}function Fu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],u=a.instance,f=a.currentTarget;if(a=a.listener,u!==o&&l.isPropagationStopped())break e;Wi(l,a,f),o=u}else for(i=0;i<r.length;i++){if(a=r[i],u=a.instance,f=a.currentTarget,a=a.listener,u!==o&&l.isPropagationStopped())break e;Wi(l,a,f),o=u}}}if(tl)throw e=Fo,tl=!1,Fo=null,e}function q(e,t){var n=t[qo];n===void 0&&(n=t[qo]=new Set);var r=e+"__bubble";n.has(r)||(Au(t,e,2,!1),n.add(r))}function oo(e,t,n){var r=0;t&&(r|=4),Au(n,e,r,t)}var Or="_reactListening"+Math.random().toString(36).slice(2);function ir(e){if(!e[Or]){e[Or]=!0,Qa.forEach(function(n){n!=="selectionchange"&&(Qf.has(n)||oo(n,!1,e),oo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Or]||(t[Or]=!0,oo("selectionchange",!1,t))}}function Au(e,t,n,r){switch(ju(t)){case 1:var l=of;break;case 4:l=sf;break;default:l=_s}n=l.bind(null,t,n,e),l=void 0,!Do||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function so(e,t,n,r,l){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===l||a.nodeType===8&&a.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var u=i.tag;if((u===3||u===4)&&(u=i.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;i=i.return}for(;a!==null;){if(i=$t(a),i===null)return;if(u=i.tag,u===5||u===6){r=o=i;continue e}a=a.parentNode}}r=r.return}au(function(){var f=o,v=Cs(n),x=[];e:{var h=Du.get(e);if(h!==void 0){var m=Ps,g=e;switch(e){case"keypress":if(Vr(n)===0)break e;case"keydown":case"keyup":m=jf;break;case"focusin":g="focus",m=Zl;break;case"focusout":g="blur",m=Zl;break;case"beforeblur":case"afterblur":m=Zl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Pi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=cf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Cf;break;case Ou:case zu:case Iu:m=pf;break;case Ru:m=Tf;break;case"scroll":m=af;break;case"wheel":m=_f;break;case"copy":case"cut":case"paste":m=mf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Oi}var y=(t&4)!==0,j=!y&&e==="scroll",d=y?h!==null?h+"Capture":null:h;y=[];for(var c=f,p;c!==null;){p=c;var w=p.stateNode;if(p.tag===5&&w!==null&&(p=w,d!==null&&(w=tr(c,d),w!=null&&y.push(ar(c,w,p)))),j)break;c=c.return}0<y.length&&(h=new m(h,g,null,n,v),x.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==Io&&(g=n.relatedTarget||n.fromElement)&&($t(g)||g[ct]))break e;if((m||h)&&(h=v.window===v?v:(h=v.ownerDocument)?h.defaultView||h.parentWindow:window,m?(g=n.relatedTarget||n.toElement,m=f,g=g?$t(g):null,g!==null&&(j=Gt(g),g!==j||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=f),m!==g)){if(y=Pi,w="onMouseLeave",d="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(y=Oi,w="onPointerLeave",d="onPointerEnter",c="pointer"),j=m==null?h:sn(m),p=g==null?h:sn(g),h=new y(w,c+"leave",m,n,v),h.target=j,h.relatedTarget=p,w=null,$t(v)===f&&(y=new y(d,c+"enter",g,n,v),y.target=p,y.relatedTarget=j,w=y),j=w,m&&g)t:{for(y=m,d=g,c=0,p=y;p;p=Xt(p))c++;for(p=0,w=d;w;w=Xt(w))p++;for(;0<c-p;)y=Xt(y),c--;for(;0<p-c;)d=Xt(d),p--;for(;c--;){if(y===d||d!==null&&y===d.alternate)break t;y=Xt(y),d=Xt(d)}y=null}else y=null;m!==null&&Ui(x,h,m,y,!1),g!==null&&j!==null&&Ui(x,j,g,y,!0)}}e:{if(h=f?sn(f):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var T=Rf;else if(Ri(h))if(Lu)T=$f;else{T=Ff;var L=Df}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=Af);if(T&&(T=T(e,f))){Tu(x,T,n,v);break e}L&&L(e,h,f),e==="focusout"&&(L=h._wrapperState)&&L.controlled&&h.type==="number"&&bo(h,"number",h.value)}switch(L=f?sn(f):window,e){case"focusin":(Ri(L)||L.contentEditable==="true")&&(ln=L,Ho=f,qn=null);break;case"focusout":qn=Ho=ln=null;break;case"mousedown":Wo=!0;break;case"contextmenu":case"mouseup":case"dragend":Wo=!1,Bi(x,n,v);break;case"selectionchange":if(Wf)break;case"keydown":case"keyup":Bi(x,n,v)}var _;if(Os)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else rn?Cu(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(Nu&&n.locale!=="ko"&&(rn||O!=="onCompositionStart"?O==="onCompositionEnd"&&rn&&(_=Su()):(yt=v,bs="value"in yt?yt.value:yt.textContent,rn=!0)),L=sl(f,O),0<L.length&&(O=new Mi(O,e,null,n,v),x.push({event:O,listeners:L}),_?O.data=_:(_=Eu(n),_!==null&&(O.data=_)))),(_=Pf?Mf(e,n):Of(e,n))&&(f=sl(f,"onBeforeInput"),0<f.length&&(v=new Mi("onBeforeInput","beforeinput",null,n,v),x.push({event:v,listeners:f}),v.data=_))}Fu(x,t)})}function ar(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=tr(e,n),o!=null&&r.unshift(ar(e,o,l)),o=tr(e,t),o!=null&&r.push(ar(e,o,l))),e=e.return}return r}function Xt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ui(e,t,n,r,l){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,u=a.alternate,f=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&f!==null&&(a=f,l?(u=tr(n,o),u!=null&&i.unshift(ar(n,u,a))):l||(u=tr(n,o),u!=null&&i.push(ar(n,u,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Jf=/\r\n?/g,qf=/\u0000|\uFFFD/g;function Vi(e){return(typeof e=="string"?e:""+e).replace(Jf,`
|
|
38
|
-
`).replace(qf,"")}function zr(e,t,n){if(t=Vi(t),Vi(e)!==t&&n)throw Error(N(425))}function il(){}var Uo=null,Vo=null;function Qo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jo=typeof setTimeout=="function"?setTimeout:void 0,Kf=typeof clearTimeout=="function"?clearTimeout:void 0,Qi=typeof Promise=="function"?Promise:void 0,Yf=typeof queueMicrotask=="function"?queueMicrotask:typeof Qi<"u"?function(e){return Qi.resolve(null).then(e).catch(Gf)}:Jo;function Gf(e){setTimeout(function(){throw e})}function io(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),lr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);lr(t)}function Nt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ji(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var bn=Math.random().toString(36).slice(2),tt="__reactFiber$"+bn,ur="__reactProps$"+bn,ct="__reactContainer$"+bn,qo="__reactEvents$"+bn,Xf="__reactListeners$"+bn,Zf="__reactHandles$"+bn;function $t(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ji(e);e!==null;){if(n=e[tt])return n;e=Ji(e)}return t}e=n,n=e.parentNode}return null}function yr(e){return e=e[tt]||e[ct],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function Ll(e){return e[ur]||null}var Ko=[],an=-1;function Ot(e){return{current:e}}function K(e){0>an||(e.current=Ko[an],Ko[an]=null,an--)}function J(e,t){an++,Ko[an]=e.current,e.current=t}var bt={},we=Ot(bt),be=Ot(!1),Vt=bt;function kn(e,t){var n=e.type.contextTypes;if(!n)return bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Pe(e){return e=e.childContextTypes,e!=null}function al(){K(be),K(we)}function qi(e,t,n){if(we.current!==bt)throw Error(N(168));J(we,t),J(be,n)}function $u(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(N(108,Rd(e)||"Unknown",l));return ee({},n,r)}function ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bt,Vt=we.current,J(we,e),J(be,be.current),!0}function Ki(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=$u(e,t,Vt),r.__reactInternalMemoizedMergedChildContext=e,K(be),K(we),J(we,e)):K(be),J(be,n)}var ot=null,_l=!1,ao=!1;function Bu(e){ot===null?ot=[e]:ot.push(e)}function ep(e){_l=!0,Bu(e)}function zt(){if(!ao&&ot!==null){ao=!0;var e=0,t=Q;try{var n=ot;for(Q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ot=null,_l=!1}catch(l){throw ot!==null&&(ot=ot.slice(e+1)),fu(Es,zt),l}finally{Q=t,ao=!1}}return null}var un=[],cn=0,cl=null,dl=0,$e=[],Be=0,Qt=null,st=1,it="";function Ft(e,t){un[cn++]=dl,un[cn++]=cl,cl=e,dl=t}function Hu(e,t,n){$e[Be++]=st,$e[Be++]=it,$e[Be++]=Qt,Qt=e;var r=st;e=it;var l=32-Ye(r)-1;r&=~(1<<l),n+=1;var o=32-Ye(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,st=1<<32-Ye(t)+l|n<<l|r,it=o+e}else st=1<<o|n<<l|r,it=e}function Is(e){e.return!==null&&(Ft(e,1),Hu(e,1,0))}function Rs(e){for(;e===cl;)cl=un[--cn],un[cn]=null,dl=un[--cn],un[cn]=null;for(;e===Qt;)Qt=$e[--Be],$e[Be]=null,it=$e[--Be],$e[Be]=null,st=$e[--Be],$e[Be]=null}var Ie=null,ze=null,G=!1,Ke=null;function Wu(e,t){var n=He(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Yi(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ie=e,ze=Nt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ie=e,ze=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Qt!==null?{id:st,overflow:it}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=He(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ie=e,ze=null,!0):!1;default:return!1}}function Yo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Go(e){if(G){var t=ze;if(t){var n=t;if(!Yi(e,t)){if(Yo(e))throw Error(N(418));t=Nt(n.nextSibling);var r=Ie;t&&Yi(e,t)?Wu(r,n):(e.flags=e.flags&-4097|2,G=!1,Ie=e)}}else{if(Yo(e))throw Error(N(418));e.flags=e.flags&-4097|2,G=!1,Ie=e}}}function Gi(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ie=e}function Ir(e){if(e!==Ie)return!1;if(!G)return Gi(e),G=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Qo(e.type,e.memoizedProps)),t&&(t=ze)){if(Yo(e))throw Uu(),Error(N(418));for(;t;)Wu(e,t),t=Nt(t.nextSibling)}if(Gi(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ze=Nt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ze=null}}else ze=Ie?Nt(e.stateNode.nextSibling):null;return!0}function Uu(){for(var e=ze;e;)e=Nt(e.nextSibling)}function jn(){ze=Ie=null,G=!1}function Ds(e){Ke===null?Ke=[e]:Ke.push(e)}var tp=pt.ReactCurrentBatchConfig;function Dn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(N(309));var r=n.stateNode}if(!r)throw Error(N(147,e));var l=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=l.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,e))}return e}function Rr(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Xi(e){var t=e._init;return t(e._payload)}function Vu(e){function t(d,c){if(e){var p=d.deletions;p===null?(d.deletions=[c],d.flags|=16):p.push(c)}}function n(d,c){if(!e)return null;for(;c!==null;)t(d,c),c=c.sibling;return null}function r(d,c){for(d=new Map;c!==null;)c.key!==null?d.set(c.key,c):d.set(c.index,c),c=c.sibling;return d}function l(d,c){return d=Lt(d,c),d.index=0,d.sibling=null,d}function o(d,c,p){return d.index=p,e?(p=d.alternate,p!==null?(p=p.index,p<c?(d.flags|=2,c):p):(d.flags|=2,c)):(d.flags|=1048576,c)}function i(d){return e&&d.alternate===null&&(d.flags|=2),d}function a(d,c,p,w){return c===null||c.tag!==6?(c=xo(p,d.mode,w),c.return=d,c):(c=l(c,p),c.return=d,c)}function u(d,c,p,w){var T=p.type;return T===nn?v(d,c,p.props.children,w,p.key):c!==null&&(c.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===mt&&Xi(T)===c.type)?(w=l(c,p.props),w.ref=Dn(d,c,p),w.return=d,w):(w=Xr(p.type,p.key,p.props,null,d.mode,w),w.ref=Dn(d,c,p),w.return=d,w)}function f(d,c,p,w){return c===null||c.tag!==4||c.stateNode.containerInfo!==p.containerInfo||c.stateNode.implementation!==p.implementation?(c=vo(p,d.mode,w),c.return=d,c):(c=l(c,p.children||[]),c.return=d,c)}function v(d,c,p,w,T){return c===null||c.tag!==7?(c=Ut(p,d.mode,w,T),c.return=d,c):(c=l(c,p),c.return=d,c)}function x(d,c,p){if(typeof c=="string"&&c!==""||typeof c=="number")return c=xo(""+c,d.mode,p),c.return=d,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Cr:return p=Xr(c.type,c.key,c.props,null,d.mode,p),p.ref=Dn(d,null,c),p.return=d,p;case tn:return c=vo(c,d.mode,p),c.return=d,c;case mt:var w=c._init;return x(d,w(c._payload),p)}if(Bn(c)||Mn(c))return c=Ut(c,d.mode,p,null),c.return=d,c;Rr(d,c)}return null}function h(d,c,p,w){var T=c!==null?c.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return T!==null?null:a(d,c,""+p,w);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Cr:return p.key===T?u(d,c,p,w):null;case tn:return p.key===T?f(d,c,p,w):null;case mt:return T=p._init,h(d,c,T(p._payload),w)}if(Bn(p)||Mn(p))return T!==null?null:v(d,c,p,w,null);Rr(d,p)}return null}function m(d,c,p,w,T){if(typeof w=="string"&&w!==""||typeof w=="number")return d=d.get(p)||null,a(c,d,""+w,T);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Cr:return d=d.get(w.key===null?p:w.key)||null,u(c,d,w,T);case tn:return d=d.get(w.key===null?p:w.key)||null,f(c,d,w,T);case mt:var L=w._init;return m(d,c,p,L(w._payload),T)}if(Bn(w)||Mn(w))return d=d.get(p)||null,v(c,d,w,T,null);Rr(c,w)}return null}function g(d,c,p,w){for(var T=null,L=null,_=c,O=c=0,A=null;_!==null&&O<p.length;O++){_.index>O?(A=_,_=null):A=_.sibling;var D=h(d,_,p[O],w);if(D===null){_===null&&(_=A);break}e&&_&&D.alternate===null&&t(d,_),c=o(D,c,O),L===null?T=D:L.sibling=D,L=D,_=A}if(O===p.length)return n(d,_),G&&Ft(d,O),T;if(_===null){for(;O<p.length;O++)_=x(d,p[O],w),_!==null&&(c=o(_,c,O),L===null?T=_:L.sibling=_,L=_);return G&&Ft(d,O),T}for(_=r(d,_);O<p.length;O++)A=m(_,d,O,p[O],w),A!==null&&(e&&A.alternate!==null&&_.delete(A.key===null?O:A.key),c=o(A,c,O),L===null?T=A:L.sibling=A,L=A);return e&&_.forEach(function(S){return t(d,S)}),G&&Ft(d,O),T}function y(d,c,p,w){var T=Mn(p);if(typeof T!="function")throw Error(N(150));if(p=T.call(p),p==null)throw Error(N(151));for(var L=T=null,_=c,O=c=0,A=null,D=p.next();_!==null&&!D.done;O++,D=p.next()){_.index>O?(A=_,_=null):A=_.sibling;var S=h(d,_,D.value,w);if(S===null){_===null&&(_=A);break}e&&_&&S.alternate===null&&t(d,_),c=o(S,c,O),L===null?T=S:L.sibling=S,L=S,_=A}if(D.done)return n(d,_),G&&Ft(d,O),T;if(_===null){for(;!D.done;O++,D=p.next())D=x(d,D.value,w),D!==null&&(c=o(D,c,O),L===null?T=D:L.sibling=D,L=D);return G&&Ft(d,O),T}for(_=r(d,_);!D.done;O++,D=p.next())D=m(_,d,O,D.value,w),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?O:D.key),c=o(D,c,O),L===null?T=D:L.sibling=D,L=D);return e&&_.forEach(function(te){return t(d,te)}),G&&Ft(d,O),T}function j(d,c,p,w){if(typeof p=="object"&&p!==null&&p.type===nn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Cr:e:{for(var T=p.key,L=c;L!==null;){if(L.key===T){if(T=p.type,T===nn){if(L.tag===7){n(d,L.sibling),c=l(L,p.props.children),c.return=d,d=c;break e}}else if(L.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===mt&&Xi(T)===L.type){n(d,L.sibling),c=l(L,p.props),c.ref=Dn(d,L,p),c.return=d,d=c;break e}n(d,L);break}else t(d,L);L=L.sibling}p.type===nn?(c=Ut(p.props.children,d.mode,w,p.key),c.return=d,d=c):(w=Xr(p.type,p.key,p.props,null,d.mode,w),w.ref=Dn(d,c,p),w.return=d,d=w)}return i(d);case tn:e:{for(L=p.key;c!==null;){if(c.key===L)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(d,c.sibling),c=l(c,p.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=vo(p,d.mode,w),c.return=d,d=c}return i(d);case mt:return L=p._init,j(d,c,L(p._payload),w)}if(Bn(p))return g(d,c,p,w);if(Mn(p))return y(d,c,p,w);Rr(d,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(d,c.sibling),c=l(c,p),c.return=d,d=c):(n(d,c),c=xo(p,d.mode,w),c.return=d,d=c),i(d)):n(d,c)}return j}var Sn=Vu(!0),Qu=Vu(!1),fl=Ot(null),pl=null,dn=null,Fs=null;function As(){Fs=dn=pl=null}function $s(e){var t=fl.current;K(fl),e._currentValue=t}function Xo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gn(e,t){pl=e,Fs=dn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_e=!0),e.firstContext=null)}function Ue(e){var t=e._currentValue;if(Fs!==e)if(e={context:e,memoizedValue:t,next:null},dn===null){if(pl===null)throw Error(N(308));dn=e,pl.dependencies={lanes:0,firstContext:e}}else dn=dn.next=e;return t}var Bt=null;function Bs(e){Bt===null?Bt=[e]:Bt.push(e)}function Ju(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Bs(t)):(n.next=l.next,l.next=n),t.interleaved=n,dt(e,r)}function dt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xt=!1;function Hs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function at(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ct(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,dt(e,n)}return l=r.interleaved,l===null?(t.next=t,Bs(r)):(t.next=l.next,l.next=t),r.interleaved=t,dt(e,n)}function Qr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ts(e,n)}}function Zi(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hl(e,t,n,r){var l=e.updateQueue;xt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,f=u.next;u.next=null,i===null?o=f:i.next=f,i=u;var v=e.alternate;v!==null&&(v=v.updateQueue,a=v.lastBaseUpdate,a!==i&&(a===null?v.firstBaseUpdate=f:a.next=f,v.lastBaseUpdate=u))}if(o!==null){var x=l.baseState;i=0,v=f=u=null,a=o;do{var h=a.lane,m=a.eventTime;if((r&h)===h){v!==null&&(v=v.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,y=a;switch(h=t,m=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){x=g.call(m,x,h);break e}x=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,h=typeof g=="function"?g.call(m,x,h):g,h==null)break e;x=ee({},x,h);break e;case 2:xt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},v===null?(f=v=m,u=x):v=v.next=m,i|=h;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;h=a,a=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);if(v===null&&(u=x),l.baseState=u,l.firstBaseUpdate=f,l.lastBaseUpdate=v,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);qt|=i,e.lanes=i,e.memoizedState=x}}function ea(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(N(191,l));l.call(r)}}}var wr={},rt=Ot(wr),cr=Ot(wr),dr=Ot(wr);function Ht(e){if(e===wr)throw Error(N(174));return e}function Ws(e,t){switch(J(dr,t),J(cr,e),J(rt,wr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mo(t,e)}K(rt),J(rt,t)}function Nn(){K(rt),K(cr),K(dr)}function Ku(e){Ht(dr.current);var t=Ht(rt.current),n=Mo(t,e.type);t!==n&&(J(cr,e),J(rt,n))}function Us(e){cr.current===e&&(K(rt),K(cr))}var X=Ot(0);function ml(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uo=[];function Vs(){for(var e=0;e<uo.length;e++)uo[e]._workInProgressVersionPrimary=null;uo.length=0}var Jr=pt.ReactCurrentDispatcher,co=pt.ReactCurrentBatchConfig,Jt=0,Z=null,ie=null,de=null,xl=!1,Kn=!1,fr=0,np=0;function ve(){throw Error(N(321))}function Qs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xe(e[n],t[n]))return!1;return!0}function Js(e,t,n,r,l,o){if(Jt=o,Z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Jr.current=e===null||e.memoizedState===null?sp:ip,e=n(r,l),Kn){o=0;do{if(Kn=!1,fr=0,25<=o)throw Error(N(301));o+=1,de=ie=null,t.updateQueue=null,Jr.current=ap,e=n(r,l)}while(Kn)}if(Jr.current=vl,t=ie!==null&&ie.next!==null,Jt=0,de=ie=Z=null,xl=!1,t)throw Error(N(300));return e}function qs(){var e=fr!==0;return fr=0,e}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return de===null?Z.memoizedState=de=e:de=de.next=e,de}function Ve(){if(ie===null){var e=Z.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=de===null?Z.memoizedState:de.next;if(t!==null)de=t,ie=e;else{if(e===null)throw Error(N(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},de===null?Z.memoizedState=de=e:de=de.next=e}return de}function pr(e,t){return typeof t=="function"?t(e):t}function fo(e){var t=Ve(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=ie,l=r.baseQueue,o=n.pending;if(o!==null){if(l!==null){var i=l.next;l.next=o.next,o.next=i}r.baseQueue=l=o,n.pending=null}if(l!==null){o=l.next,r=r.baseState;var a=i=null,u=null,f=o;do{var v=f.lane;if((Jt&v)===v)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var x={lane:v,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(a=u=x,i=r):u=u.next=x,Z.lanes|=v,qt|=v}f=f.next}while(f!==null&&f!==o);u===null?i=r:u.next=a,Xe(r,t.memoizedState)||(_e=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do o=l.lane,Z.lanes|=o,qt|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function po(e){var t=Ve(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do o=e(o,i.action),i=i.next;while(i!==l);Xe(o,t.memoizedState)||(_e=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Yu(){}function Gu(e,t){var n=Z,r=Ve(),l=t(),o=!Xe(r.memoizedState,l);if(o&&(r.memoizedState=l,_e=!0),r=r.queue,Ks(ec.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||de!==null&&de.memoizedState.tag&1){if(n.flags|=2048,hr(9,Zu.bind(null,n,r,l,t),void 0,null),fe===null)throw Error(N(349));Jt&30||Xu(n,t,l)}return l}function Xu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Z.updateQueue,t===null?(t={lastEffect:null,stores:null},Z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zu(e,t,n,r){t.value=n,t.getSnapshot=r,tc(t)&&nc(e)}function ec(e,t,n){return n(function(){tc(t)&&nc(e)})}function tc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xe(e,n)}catch{return!0}}function nc(e){var t=dt(e,1);t!==null&&Ge(t,e,1,-1)}function ta(e){var t=et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pr,lastRenderedState:e},t.queue=e,e=e.dispatch=op.bind(null,Z,e),[t.memoizedState,e]}function hr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Z.updateQueue,t===null?(t={lastEffect:null,stores:null},Z.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function rc(){return Ve().memoizedState}function qr(e,t,n,r){var l=et();Z.flags|=e,l.memoizedState=hr(1|t,n,void 0,r===void 0?null:r)}function bl(e,t,n,r){var l=Ve();r=r===void 0?null:r;var o=void 0;if(ie!==null){var i=ie.memoizedState;if(o=i.destroy,r!==null&&Qs(r,i.deps)){l.memoizedState=hr(t,n,o,r);return}}Z.flags|=e,l.memoizedState=hr(1|t,n,o,r)}function na(e,t){return qr(8390656,8,e,t)}function Ks(e,t){return bl(2048,8,e,t)}function lc(e,t){return bl(4,2,e,t)}function oc(e,t){return bl(4,4,e,t)}function sc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ic(e,t,n){return n=n!=null?n.concat([e]):null,bl(4,4,sc.bind(null,t,e),n)}function Ys(){}function ac(e,t){var n=Ve();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Qs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function uc(e,t){var n=Ve();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Qs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cc(e,t,n){return Jt&21?(Xe(n,t)||(n=mu(),Z.lanes|=n,qt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,_e=!0),e.memoizedState=n)}function rp(e,t){var n=Q;Q=n!==0&&4>n?n:4,e(!0);var r=co.transition;co.transition={};try{e(!1),t()}finally{Q=n,co.transition=r}}function dc(){return Ve().memoizedState}function lp(e,t,n){var r=Tt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e))pc(t,n);else if(n=Ju(e,t,n,r),n!==null){var l=Ne();Ge(n,e,r,l),hc(n,t,r)}}function op(e,t,n){var r=Tt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))pc(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,Xe(a,i)){var u=t.interleaved;u===null?(l.next=l,Bs(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Ju(e,t,l,r),n!==null&&(l=Ne(),Ge(n,e,r,l),hc(n,t,r))}}function fc(e){var t=e.alternate;return e===Z||t!==null&&t===Z}function pc(e,t){Kn=xl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ts(e,n)}}var vl={readContext:Ue,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},sp={readContext:Ue,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:Ue,useEffect:na,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qr(4194308,4,sc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qr(4194308,4,e,t)},useInsertionEffect:function(e,t){return qr(4,2,e,t)},useMemo:function(e,t){var n=et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=lp.bind(null,Z,e),[r.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:ta,useDebugValue:Ys,useDeferredValue:function(e){return et().memoizedState=e},useTransition:function(){var e=ta(!1),t=e[0];return e=rp.bind(null,e[1]),et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Z,l=et();if(G){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),fe===null)throw Error(N(349));Jt&30||Xu(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,na(ec.bind(null,r,o,e),[e]),r.flags|=2048,hr(9,Zu.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=et(),t=fe.identifierPrefix;if(G){var n=it,r=st;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=np++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ip={readContext:Ue,useCallback:ac,useContext:Ue,useEffect:Ks,useImperativeHandle:ic,useInsertionEffect:lc,useLayoutEffect:oc,useMemo:uc,useReducer:fo,useRef:rc,useState:function(){return fo(pr)},useDebugValue:Ys,useDeferredValue:function(e){var t=Ve();return cc(t,ie.memoizedState,e)},useTransition:function(){var e=fo(pr)[0],t=Ve().memoizedState;return[e,t]},useMutableSource:Yu,useSyncExternalStore:Gu,useId:dc,unstable_isNewReconciler:!1},ap={readContext:Ue,useCallback:ac,useContext:Ue,useEffect:Ks,useImperativeHandle:ic,useInsertionEffect:lc,useLayoutEffect:oc,useMemo:uc,useReducer:po,useRef:rc,useState:function(){return po(pr)},useDebugValue:Ys,useDeferredValue:function(e){var t=Ve();return ie===null?t.memoizedState=e:cc(t,ie.memoizedState,e)},useTransition:function(){var e=po(pr)[0],t=Ve().memoizedState;return[e,t]},useMutableSource:Yu,useSyncExternalStore:Gu,useId:dc,unstable_isNewReconciler:!1};function Je(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Zo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Pl={isMounted:function(e){return(e=e._reactInternals)?Gt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ne(),l=Tt(e),o=at(r,l);o.payload=t,n!=null&&(o.callback=n),t=Ct(e,o,l),t!==null&&(Ge(t,e,l,r),Qr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ne(),l=Tt(e),o=at(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Ct(e,o,l),t!==null&&(Ge(t,e,l,r),Qr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ne(),r=Tt(e),l=at(n,r);l.tag=2,t!=null&&(l.callback=t),t=Ct(e,l,r),t!==null&&(Ge(t,e,r,n),Qr(t,e,r))}};function ra(e,t,n,r,l,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!sr(n,r)||!sr(l,o):!0}function mc(e,t,n){var r=!1,l=bt,o=t.contextType;return typeof o=="object"&&o!==null?o=Ue(o):(l=Pe(t)?Vt:we.current,r=t.contextTypes,o=(r=r!=null)?kn(e,l):bt),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Pl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function la(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Pl.enqueueReplaceState(t,t.state,null)}function es(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Hs(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=Ue(o):(o=Pe(t)?Vt:we.current,l.context=kn(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Zo(e,t,o,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Pl.enqueueReplaceState(l,l.state,null),hl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Cn(e,t){try{var n="",r=t;do n+=Id(r),r=r.return;while(r);var l=n}catch(o){l=`
|
|
39
|
-
Error generating stack: `+o.message+`
|
|
40
|
-
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function ho(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ts(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var up=typeof WeakMap=="function"?WeakMap:Map;function xc(e,t,n){n=at(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,ds=r),ts(e,t)},n}function vc(e,t,n){n=at(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ts(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ts(e,t),typeof r!="function"&&(Et===null?Et=new Set([this]):Et.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function oa(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new up;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Sp.bind(null,e,t,n),t.then(e,e))}function sa(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ia(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=at(-1,1),t.tag=2,Ct(n,t,1))),n.lanes|=1),e)}var cp=pt.ReactCurrentOwner,_e=!1;function Se(e,t,n,r){t.child=e===null?Qu(t,null,n,r):Sn(t,e.child,n,r)}function aa(e,t,n,r,l){n=n.render;var o=t.ref;return gn(t,l),r=Js(e,t,n,r,o,l),n=qs(),e!==null&&!_e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ft(e,t,l)):(G&&n&&Is(t),t.flags|=1,Se(e,t,r,l),t.child)}function ua(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!li(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,gc(e,t,o,r,l)):(e=Xr(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:sr,n(i,r)&&e.ref===t.ref)return ft(e,t,l)}return t.flags|=1,e=Lt(o,r),e.ref=t.ref,e.return=t,t.child=e}function gc(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(sr(o,r)&&e.ref===t.ref)if(_e=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(_e=!0);else return t.lanes=e.lanes,ft(e,t,l)}return ns(e,t,n,r,l)}function yc(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(pn,Oe),Oe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(pn,Oe),Oe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,J(pn,Oe),Oe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,J(pn,Oe),Oe|=r;return Se(e,t,l,n),t.child}function wc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ns(e,t,n,r,l){var o=Pe(n)?Vt:we.current;return o=kn(t,o),gn(t,l),n=Js(e,t,n,r,o,l),r=qs(),e!==null&&!_e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ft(e,t,l)):(G&&r&&Is(t),t.flags|=1,Se(e,t,n,l),t.child)}function ca(e,t,n,r,l){if(Pe(n)){var o=!0;ul(t)}else o=!1;if(gn(t,l),t.stateNode===null)Kr(e,t),mc(t,n,r),es(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var u=i.context,f=n.contextType;typeof f=="object"&&f!==null?f=Ue(f):(f=Pe(n)?Vt:we.current,f=kn(t,f));var v=n.getDerivedStateFromProps,x=typeof v=="function"||typeof i.getSnapshotBeforeUpdate=="function";x||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==f)&&la(t,i,r,f),xt=!1;var h=t.memoizedState;i.state=h,hl(t,r,i,l),u=t.memoizedState,a!==r||h!==u||be.current||xt?(typeof v=="function"&&(Zo(t,n,v,r),u=t.memoizedState),(a=xt||ra(t,n,a,r,h,u,f))?(x||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=f,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,qu(e,t),a=t.memoizedProps,f=t.type===t.elementType?a:Je(t.type,a),i.props=f,x=t.pendingProps,h=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=Ue(u):(u=Pe(n)?Vt:we.current,u=kn(t,u));var m=n.getDerivedStateFromProps;(v=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==x||h!==u)&&la(t,i,r,u),xt=!1,h=t.memoizedState,i.state=h,hl(t,r,i,l);var g=t.memoizedState;a!==x||h!==g||be.current||xt?(typeof m=="function"&&(Zo(t,n,m,r),g=t.memoizedState),(f=xt||ra(t,n,f,r,h,g,u)||!1)?(v||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,g,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,g,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),i.props=r,i.state=g,i.context=u,r=f):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return rs(e,t,n,r,o,l)}function rs(e,t,n,r,l,o){wc(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Ki(t,n,!1),ft(e,t,o);r=t.stateNode,cp.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Sn(t,e.child,null,o),t.child=Sn(t,null,a,o)):Se(e,t,a,o),t.memoizedState=r.state,l&&Ki(t,n,!0),t.child}function kc(e){var t=e.stateNode;t.pendingContext?qi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qi(e,t.context,!1),Ws(e,t.containerInfo)}function da(e,t,n,r,l){return jn(),Ds(l),t.flags|=256,Se(e,t,n,r),t.child}var ls={dehydrated:null,treeContext:null,retryLane:0};function os(e){return{baseLanes:e,cachePool:null,transitions:null}}function jc(e,t,n){var r=t.pendingProps,l=X.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),J(X,l&1),e===null)return Go(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=zl(i,r,0,null),e=Ut(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=os(n),t.memoizedState=ls,e):Gs(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return dp(e,t,i,r,a,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,a=l.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Lt(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?o=Lt(a,o):(o=Ut(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?os(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=ls,r}return o=e.child,e=o.sibling,r=Lt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gs(e,t){return t=zl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Dr(e,t,n,r){return r!==null&&Ds(r),Sn(t,e.child,null,n),e=Gs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dp(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=ho(Error(N(422))),Dr(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=zl({mode:"visible",children:r.children},l,0,null),o=Ut(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Sn(t,e.child,null,i),t.child.memoizedState=os(i),t.memoizedState=ls,o);if(!(t.mode&1))return Dr(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(N(419)),r=ho(o,r,void 0),Dr(e,t,i,r)}if(a=(i&e.childLanes)!==0,_e||a){if(r=fe,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,dt(e,l),Ge(r,e,l,-1))}return ri(),r=ho(Error(N(421))),Dr(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Np.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,ze=Nt(l.nextSibling),Ie=t,G=!0,Ke=null,e!==null&&($e[Be++]=st,$e[Be++]=it,$e[Be++]=Qt,st=e.id,it=e.overflow,Qt=t),t=Gs(t,r.children),t.flags|=4096,t)}function fa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xo(e.return,t,n)}function mo(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Sc(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Se(e,t,r.children,n),r=X.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fa(e,n,t);else if(e.tag===19)fa(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(J(X,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&ml(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),mo(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&ml(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}mo(t,!0,n,null,o);break;case"together":mo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Kr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=Lt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Lt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function fp(e,t,n){switch(t.tag){case 3:kc(t),jn();break;case 5:Ku(t);break;case 1:Pe(t.type)&&ul(t);break;case 4:Ws(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;J(fl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(J(X,X.current&1),t.flags|=128,null):n&t.child.childLanes?jc(e,t,n):(J(X,X.current&1),e=ft(e,t,n),e!==null?e.sibling:null);J(X,X.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Sc(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),J(X,X.current),r)break;return null;case 22:case 23:return t.lanes=0,yc(e,t,n)}return ft(e,t,n)}var Nc,ss,Cc,Ec;Nc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ss=function(){};Cc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Ht(rt.current);var o=null;switch(n){case"input":l=Lo(e,l),r=Lo(e,r),o=[];break;case"select":l=ee({},l,{value:void 0}),r=ee({},r,{value:void 0}),o=[];break;case"textarea":l=Po(e,l),r=Po(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=il)}Oo(n,r);var i;n=null;for(f in l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var a=l[f];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Zn.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var u=r[f];if(a=l!=null?l[f]:void 0,r.hasOwnProperty(f)&&u!==a&&(u!=null||a!=null))if(f==="style")if(a){for(i in a)!a.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&a[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(o||(o=[]),o.push(f,n)),n=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(Zn.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&q("scroll",e),o||a===u||(o=[])):(o=o||[]).push(f,u))}n&&(o=o||[]).push("style",n);var f=o;(t.updateQueue=f)&&(t.flags|=4)}};Ec=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fn(e,t){if(!G)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pp(e,t,n){var r=t.pendingProps;switch(Rs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(t),null;case 1:return Pe(t.type)&&al(),ge(t),null;case 3:return r=t.stateNode,Nn(),K(be),K(we),Vs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ir(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ke!==null&&(hs(Ke),Ke=null))),ss(e,t),ge(t),null;case 5:Us(t);var l=Ht(dr.current);if(n=t.type,e!==null&&t.stateNode!=null)Cc(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return ge(t),null}if(e=Ht(rt.current),Ir(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[tt]=t,r[ur]=o,e=(t.mode&1)!==0,n){case"dialog":q("cancel",r),q("close",r);break;case"iframe":case"object":case"embed":q("load",r);break;case"video":case"audio":for(l=0;l<Wn.length;l++)q(Wn[l],r);break;case"source":q("error",r);break;case"img":case"image":case"link":q("error",r),q("load",r);break;case"details":q("toggle",r);break;case"input":ki(r,o),q("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},q("invalid",r);break;case"textarea":Si(r,o),q("invalid",r)}Oo(n,o),l=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&zr(r.textContent,a,e),l=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&zr(r.textContent,a,e),l=["children",""+a]):Zn.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&q("scroll",r)}switch(n){case"input":Er(r),ji(r,o,!0);break;case"textarea":Er(r),Ni(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=il)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=eu(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[tt]=t,e[ur]=r,Nc(e,t,!1,!1),t.stateNode=e;e:{switch(i=zo(n,r),n){case"dialog":q("cancel",e),q("close",e),l=r;break;case"iframe":case"object":case"embed":q("load",e),l=r;break;case"video":case"audio":for(l=0;l<Wn.length;l++)q(Wn[l],e);l=r;break;case"source":q("error",e),l=r;break;case"img":case"image":case"link":q("error",e),q("load",e),l=r;break;case"details":q("toggle",e),l=r;break;case"input":ki(e,r),l=Lo(e,r),q("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=ee({},r,{value:void 0}),q("invalid",e);break;case"textarea":Si(e,r),l=Po(e,r),q("invalid",e);break;default:l=r}Oo(n,l),a=l;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?ru(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&tu(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&er(e,u):typeof u=="number"&&er(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Zn.hasOwnProperty(o)?u!=null&&o==="onScroll"&&q("scroll",e):u!=null&&ks(e,o,u,i))}switch(n){case"input":Er(e),ji(e,r,!1);break;case"textarea":Er(e),Ni(e);break;case"option":r.value!=null&&e.setAttribute("value",""+_t(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?hn(e,!!r.multiple,o,!1):r.defaultValue!=null&&hn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=il)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ge(t),null;case 6:if(e&&t.stateNode!=null)Ec(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Ht(dr.current),Ht(rt.current),Ir(t)){if(r=t.stateNode,n=t.memoizedProps,r[tt]=t,(o=r.nodeValue!==n)&&(e=Ie,e!==null))switch(e.tag){case 3:zr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&zr(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[tt]=t,t.stateNode=r}return ge(t),null;case 13:if(K(X),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(G&&ze!==null&&t.mode&1&&!(t.flags&128))Uu(),jn(),t.flags|=98560,o=!1;else if(o=Ir(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(N(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(N(317));o[tt]=t}else jn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ge(t),o=!1}else Ke!==null&&(hs(Ke),Ke=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||X.current&1?ae===0&&(ae=3):ri())),t.updateQueue!==null&&(t.flags|=4),ge(t),null);case 4:return Nn(),ss(e,t),e===null&&ir(t.stateNode.containerInfo),ge(t),null;case 10:return $s(t.type._context),ge(t),null;case 17:return Pe(t.type)&&al(),ge(t),null;case 19:if(K(X),o=t.memoizedState,o===null)return ge(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)Fn(o,!1);else{if(ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ml(e),i!==null){for(t.flags|=128,Fn(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return J(X,X.current&1|2),t.child}e=e.sibling}o.tail!==null&&re()>En&&(t.flags|=128,r=!0,Fn(o,!1),t.lanes=4194304)}else{if(!r)if(e=ml(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!G)return ge(t),null}else 2*re()-o.renderingStartTime>En&&n!==1073741824&&(t.flags|=128,r=!0,Fn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=re(),t.sibling=null,n=X.current,J(X,r?n&1|2:n&1),t):(ge(t),null);case 22:case 23:return ni(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Oe&1073741824&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function hp(e,t){switch(Rs(t),t.tag){case 1:return Pe(t.type)&&al(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nn(),K(be),K(we),Vs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Us(t),null;case 13:if(K(X),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(X),null;case 4:return Nn(),null;case 10:return $s(t.type._context),null;case 22:case 23:return ni(),null;case 24:return null;default:return null}}var Fr=!1,ye=!1,mp=typeof WeakSet=="function"?WeakSet:Set,P=null;function fn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ne(e,t,r)}else n.current=null}function is(e,t,n){try{n()}catch(r){ne(e,t,r)}}var pa=!1;function xp(e,t){if(Uo=ll,e=Pu(),zs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,f=0,v=0,x=e,h=null;t:for(;;){for(var m;x!==n||l!==0&&x.nodeType!==3||(a=i+l),x!==o||r!==0&&x.nodeType!==3||(u=i+r),x.nodeType===3&&(i+=x.nodeValue.length),(m=x.firstChild)!==null;)h=x,x=m;for(;;){if(x===e)break t;if(h===n&&++f===l&&(a=i),h===o&&++v===r&&(u=i),(m=x.nextSibling)!==null)break;x=h,h=x.parentNode}x=m}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vo={focusedElem:e,selectionRange:n},ll=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,j=g.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:Je(t.type,y),j);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(w){ne(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return g=pa,pa=!1,g}function Yn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&is(t,n,o)}l=l.next}while(l!==r)}}function Ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function as(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Tc(e){var t=e.alternate;t!==null&&(e.alternate=null,Tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tt],delete t[ur],delete t[qo],delete t[Xf],delete t[Zf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Lc(e){return e.tag===5||e.tag===3||e.tag===4}function ha(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function us(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=il));else if(r!==4&&(e=e.child,e!==null))for(us(e,t,n),e=e.sibling;e!==null;)us(e,t,n),e=e.sibling}function cs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cs(e,t,n),e=e.sibling;e!==null;)cs(e,t,n),e=e.sibling}var he=null,qe=!1;function ht(e,t,n){for(n=n.child;n!==null;)_c(e,t,n),n=n.sibling}function _c(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Nl,n)}catch{}switch(n.tag){case 5:ye||fn(n,t);case 6:var r=he,l=qe;he=null,ht(e,t,n),he=r,qe=l,he!==null&&(qe?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(qe?(e=he,n=n.stateNode,e.nodeType===8?io(e.parentNode,n):e.nodeType===1&&io(e,n),lr(e)):io(he,n.stateNode));break;case 4:r=he,l=qe,he=n.stateNode.containerInfo,qe=!0,ht(e,t,n),he=r,qe=l;break;case 0:case 11:case 14:case 15:if(!ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&is(n,t,i),l=l.next}while(l!==r)}ht(e,t,n);break;case 1:if(!ye&&(fn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ne(n,t,a)}ht(e,t,n);break;case 21:ht(e,t,n);break;case 22:n.mode&1?(ye=(r=ye)||n.memoizedState!==null,ht(e,t,n),ye=r):ht(e,t,n);break;default:ht(e,t,n)}}function ma(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mp),t.forEach(function(r){var l=Cp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Qe(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:he=a.stateNode,qe=!1;break e;case 3:he=a.stateNode.containerInfo,qe=!0;break e;case 4:he=a.stateNode.containerInfo,qe=!0;break e}a=a.return}if(he===null)throw Error(N(160));_c(o,i,l),he=null,qe=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(f){ne(l,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)bc(t,e),t=t.sibling}function bc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qe(t,e),Ze(e),r&4){try{Yn(3,e,e.return),Ml(3,e)}catch(y){ne(e,e.return,y)}try{Yn(5,e,e.return)}catch(y){ne(e,e.return,y)}}break;case 1:Qe(t,e),Ze(e),r&512&&n!==null&&fn(n,n.return);break;case 5:if(Qe(t,e),Ze(e),r&512&&n!==null&&fn(n,n.return),e.flags&32){var l=e.stateNode;try{er(l,"")}catch(y){ne(e,e.return,y)}}if(r&4&&(l=e.stateNode,l!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Xa(l,o),zo(a,i);var f=zo(a,o);for(i=0;i<u.length;i+=2){var v=u[i],x=u[i+1];v==="style"?ru(l,x):v==="dangerouslySetInnerHTML"?tu(l,x):v==="children"?er(l,x):ks(l,v,x,f)}switch(a){case"input":_o(l,o);break;case"textarea":Za(l,o);break;case"select":var h=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?hn(l,!!o.multiple,m,!1):h!==!!o.multiple&&(o.defaultValue!=null?hn(l,!!o.multiple,o.defaultValue,!0):hn(l,!!o.multiple,o.multiple?[]:"",!1))}l[ur]=o}catch(y){ne(e,e.return,y)}}break;case 6:if(Qe(t,e),Ze(e),r&4){if(e.stateNode===null)throw Error(N(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(y){ne(e,e.return,y)}}break;case 3:if(Qe(t,e),Ze(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{lr(t.containerInfo)}catch(y){ne(e,e.return,y)}break;case 4:Qe(t,e),Ze(e);break;case 13:Qe(t,e),Ze(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(ei=re())),r&4&&ma(e);break;case 22:if(v=n!==null&&n.memoizedState!==null,e.mode&1?(ye=(f=ye)||v,Qe(t,e),ye=f):Qe(t,e),Ze(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!v&&e.mode&1)for(P=e,v=e.child;v!==null;){for(x=P=v;P!==null;){switch(h=P,m=h.child,h.tag){case 0:case 11:case 14:case 15:Yn(4,h,h.return);break;case 1:fn(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(y){ne(r,n,y)}}break;case 5:fn(h,h.return);break;case 22:if(h.memoizedState!==null){va(x);continue}}m!==null?(m.return=h,P=m):va(x)}v=v.sibling}e:for(v=null,x=e;;){if(x.tag===5){if(v===null){v=x;try{l=x.stateNode,f?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=x.stateNode,u=x.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=nu("display",i))}catch(y){ne(e,e.return,y)}}}else if(x.tag===6){if(v===null)try{x.stateNode.nodeValue=f?"":x.memoizedProps}catch(y){ne(e,e.return,y)}}else if((x.tag!==22&&x.tag!==23||x.memoizedState===null||x===e)&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===e)break e;for(;x.sibling===null;){if(x.return===null||x.return===e)break e;v===x&&(v=null),x=x.return}v===x&&(v=null),x.sibling.return=x.return,x=x.sibling}}break;case 19:Qe(t,e),Ze(e),r&4&&ma(e);break;case 21:break;default:Qe(t,e),Ze(e)}}function Ze(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Lc(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(er(l,""),r.flags&=-33);var o=ha(e);cs(e,o,l);break;case 3:case 4:var i=r.stateNode.containerInfo,a=ha(e);us(e,a,i);break;default:throw Error(N(161))}}catch(u){ne(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vp(e,t,n){P=e,Pc(e)}function Pc(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var l=P,o=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||Fr;if(!i){var a=l.alternate,u=a!==null&&a.memoizedState!==null||ye;a=Fr;var f=ye;if(Fr=i,(ye=u)&&!f)for(P=l;P!==null;)i=P,u=i.child,i.tag===22&&i.memoizedState!==null?ga(l):u!==null?(u.return=i,P=u):ga(l);for(;o!==null;)P=o,Pc(o),o=o.sibling;P=l,Fr=a,ye=f}xa(e)}else l.subtreeFlags&8772&&o!==null?(o.return=l,P=o):xa(e)}}function xa(e){for(;P!==null;){var t=P;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ye||Ml(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ye)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Je(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ea(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ea(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var v=f.memoizedState;if(v!==null){var x=v.dehydrated;x!==null&&lr(x)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}ye||t.flags&512&&as(t)}catch(h){ne(t,t.return,h)}}if(t===e){P=null;break}if(n=t.sibling,n!==null){n.return=t.return,P=n;break}P=t.return}}function va(e){for(;P!==null;){var t=P;if(t===e){P=null;break}var n=t.sibling;if(n!==null){n.return=t.return,P=n;break}P=t.return}}function ga(e){for(;P!==null;){var t=P;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ml(4,t)}catch(u){ne(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){ne(t,l,u)}}var o=t.return;try{as(t)}catch(u){ne(t,o,u)}break;case 5:var i=t.return;try{as(t)}catch(u){ne(t,i,u)}}}catch(u){ne(t,t.return,u)}if(t===e){P=null;break}var a=t.sibling;if(a!==null){a.return=t.return,P=a;break}P=t.return}}var gp=Math.ceil,gl=pt.ReactCurrentDispatcher,Xs=pt.ReactCurrentOwner,We=pt.ReactCurrentBatchConfig,U=0,fe=null,oe=null,me=0,Oe=0,pn=Ot(0),ae=0,mr=null,qt=0,Ol=0,Zs=0,Gn=null,Le=null,ei=0,En=1/0,lt=null,yl=!1,ds=null,Et=null,Ar=!1,wt=null,wl=0,Xn=0,fs=null,Yr=-1,Gr=0;function Ne(){return U&6?re():Yr!==-1?Yr:Yr=re()}function Tt(e){return e.mode&1?U&2&&me!==0?me&-me:tp.transition!==null?(Gr===0&&(Gr=mu()),Gr):(e=Q,e!==0||(e=window.event,e=e===void 0?16:ju(e.type)),e):1}function Ge(e,t,n,r){if(50<Xn)throw Xn=0,fs=null,Error(N(185));vr(e,n,r),(!(U&2)||e!==fe)&&(e===fe&&(!(U&2)&&(Ol|=n),ae===4&>(e,me)),Me(e,r),n===1&&U===0&&!(t.mode&1)&&(En=re()+500,_l&&zt()))}function Me(e,t){var n=e.callbackNode;ef(e,t);var r=rl(e,e===fe?me:0);if(r===0)n!==null&&Ti(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ti(n),t===1)e.tag===0?ep(ya.bind(null,e)):Bu(ya.bind(null,e)),Yf(function(){!(U&6)&&zt()}),n=null;else{switch(xu(r)){case 1:n=Es;break;case 4:n=pu;break;case 16:n=nl;break;case 536870912:n=hu;break;default:n=nl}n=Ac(n,Mc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Mc(e,t){if(Yr=-1,Gr=0,U&6)throw Error(N(327));var n=e.callbackNode;if(yn()&&e.callbackNode!==n)return null;var r=rl(e,e===fe?me:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=kl(e,r);else{t=r;var l=U;U|=2;var o=zc();(fe!==e||me!==t)&&(lt=null,En=re()+500,Wt(e,t));do try{kp();break}catch(a){Oc(e,a)}while(!0);As(),gl.current=o,U=l,oe!==null?t=0:(fe=null,me=0,t=ae)}if(t!==0){if(t===2&&(l=Ao(e),l!==0&&(r=l,t=ps(e,l))),t===1)throw n=mr,Wt(e,0),gt(e,r),Me(e,re()),n;if(t===6)gt(e,r);else{if(l=e.current.alternate,!(r&30)&&!yp(l)&&(t=kl(e,r),t===2&&(o=Ao(e),o!==0&&(r=o,t=ps(e,o))),t===1))throw n=mr,Wt(e,0),gt(e,r),Me(e,re()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:At(e,Le,lt);break;case 3:if(gt(e,r),(r&130023424)===r&&(t=ei+500-re(),10<t)){if(rl(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){Ne(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Jo(At.bind(null,e,Le,lt),t);break}At(e,Le,lt);break;case 4:if(gt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-Ye(r);o=1<<i,i=t[i],i>l&&(l=i),r&=~o}if(r=l,r=re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gp(r/1960))-r,10<r){e.timeoutHandle=Jo(At.bind(null,e,Le,lt),r);break}At(e,Le,lt);break;case 5:At(e,Le,lt);break;default:throw Error(N(329))}}}return Me(e,re()),e.callbackNode===n?Mc.bind(null,e):null}function ps(e,t){var n=Gn;return e.current.memoizedState.isDehydrated&&(Wt(e,t).flags|=256),e=kl(e,t),e!==2&&(t=Le,Le=n,t!==null&&hs(t)),e}function hs(e){Le===null?Le=e:Le.push.apply(Le,e)}function yp(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],o=l.getSnapshot;l=l.value;try{if(!Xe(o(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gt(e,t){for(t&=~Zs,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ye(t),r=1<<n;e[n]=-1,t&=~r}}function ya(e){if(U&6)throw Error(N(327));yn();var t=rl(e,0);if(!(t&1))return Me(e,re()),null;var n=kl(e,t);if(e.tag!==0&&n===2){var r=Ao(e);r!==0&&(t=r,n=ps(e,r))}if(n===1)throw n=mr,Wt(e,0),gt(e,t),Me(e,re()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,At(e,Le,lt),Me(e,re()),null}function ti(e,t){var n=U;U|=1;try{return e(t)}finally{U=n,U===0&&(En=re()+500,_l&&zt())}}function Kt(e){wt!==null&&wt.tag===0&&!(U&6)&&yn();var t=U;U|=1;var n=We.transition,r=Q;try{if(We.transition=null,Q=1,e)return e()}finally{Q=r,We.transition=n,U=t,!(U&6)&&zt()}}function ni(){Oe=pn.current,K(pn)}function Wt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Kf(n)),oe!==null)for(n=oe.return;n!==null;){var r=n;switch(Rs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&al();break;case 3:Nn(),K(be),K(we),Vs();break;case 5:Us(r);break;case 4:Nn();break;case 13:K(X);break;case 19:K(X);break;case 10:$s(r.type._context);break;case 22:case 23:ni()}n=n.return}if(fe=e,oe=e=Lt(e.current,null),me=Oe=t,ae=0,mr=null,Zs=Ol=qt=0,Le=Gn=null,Bt!==null){for(t=0;t<Bt.length;t++)if(n=Bt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=l,r.next=i}n.pending=r}Bt=null}return e}function Oc(e,t){do{var n=oe;try{if(As(),Jr.current=vl,xl){for(var r=Z.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}xl=!1}if(Jt=0,de=ie=Z=null,Kn=!1,fr=0,Xs.current=null,n===null||n.return===null){ae=1,mr=t,oe=null;break}e:{var o=e,i=n.return,a=n,u=t;if(t=me,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,v=a,x=v.tag;if(!(v.mode&1)&&(x===0||x===11||x===15)){var h=v.alternate;h?(v.updateQueue=h.updateQueue,v.memoizedState=h.memoizedState,v.lanes=h.lanes):(v.updateQueue=null,v.memoizedState=null)}var m=sa(i);if(m!==null){m.flags&=-257,ia(m,i,a,o,t),m.mode&1&&oa(o,f,t),t=m,u=f;var g=t.updateQueue;if(g===null){var y=new Set;y.add(u),t.updateQueue=y}else g.add(u);break e}else{if(!(t&1)){oa(o,f,t),ri();break e}u=Error(N(426))}}else if(G&&a.mode&1){var j=sa(i);if(j!==null){!(j.flags&65536)&&(j.flags|=256),ia(j,i,a,o,t),Ds(Cn(u,a));break e}}o=u=Cn(u,a),ae!==4&&(ae=2),Gn===null?Gn=[o]:Gn.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var d=xc(o,u,t);Zi(o,d);break e;case 1:a=u;var c=o.type,p=o.stateNode;if(!(o.flags&128)&&(typeof c.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Et===null||!Et.has(p)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=vc(o,a,t);Zi(o,w);break e}}o=o.return}while(o!==null)}Rc(n)}catch(T){t=T,oe===n&&n!==null&&(oe=n=n.return);continue}break}while(!0)}function zc(){var e=gl.current;return gl.current=vl,e===null?vl:e}function ri(){(ae===0||ae===3||ae===2)&&(ae=4),fe===null||!(qt&268435455)&&!(Ol&268435455)||gt(fe,me)}function kl(e,t){var n=U;U|=2;var r=zc();(fe!==e||me!==t)&&(lt=null,Wt(e,t));do try{wp();break}catch(l){Oc(e,l)}while(!0);if(As(),U=n,gl.current=r,oe!==null)throw Error(N(261));return fe=null,me=0,ae}function wp(){for(;oe!==null;)Ic(oe)}function kp(){for(;oe!==null&&!Vd();)Ic(oe)}function Ic(e){var t=Fc(e.alternate,e,Oe);e.memoizedProps=e.pendingProps,t===null?Rc(e):oe=t,Xs.current=null}function Rc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=hp(n,t),n!==null){n.flags&=32767,oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ae=6,oe=null;return}}else if(n=pp(n,t,Oe),n!==null){oe=n;return}if(t=t.sibling,t!==null){oe=t;return}oe=t=e}while(t!==null);ae===0&&(ae=5)}function At(e,t,n){var r=Q,l=We.transition;try{We.transition=null,Q=1,jp(e,t,n,r)}finally{We.transition=l,Q=r}return null}function jp(e,t,n,r){do yn();while(wt!==null);if(U&6)throw Error(N(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(tf(e,o),e===fe&&(oe=fe=null,me=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ar||(Ar=!0,Ac(nl,function(){return yn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=We.transition,We.transition=null;var i=Q;Q=1;var a=U;U|=4,Xs.current=null,xp(e,n),bc(n,e),Hf(Vo),ll=!!Uo,Vo=Uo=null,e.current=n,vp(n),Qd(),U=a,Q=i,We.transition=o}else e.current=n;if(Ar&&(Ar=!1,wt=e,wl=l),o=e.pendingLanes,o===0&&(Et=null),Kd(n.stateNode),Me(e,re()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(yl)throw yl=!1,e=ds,ds=null,e;return wl&1&&e.tag!==0&&yn(),o=e.pendingLanes,o&1?e===fs?Xn++:(Xn=0,fs=e):Xn=0,zt(),null}function yn(){if(wt!==null){var e=xu(wl),t=We.transition,n=Q;try{if(We.transition=null,Q=16>e?16:e,wt===null)var r=!1;else{if(e=wt,wt=null,wl=0,U&6)throw Error(N(331));var l=U;for(U|=4,P=e.current;P!==null;){var o=P,i=o.child;if(P.flags&16){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var f=a[u];for(P=f;P!==null;){var v=P;switch(v.tag){case 0:case 11:case 15:Yn(8,v,o)}var x=v.child;if(x!==null)x.return=v,P=x;else for(;P!==null;){v=P;var h=v.sibling,m=v.return;if(Tc(v),v===f){P=null;break}if(h!==null){h.return=m,P=h;break}P=m}}}var g=o.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var j=y.sibling;y.sibling=null,y=j}while(y!==null)}}P=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,P=i;else e:for(;P!==null;){if(o=P,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Yn(9,o,o.return)}var d=o.sibling;if(d!==null){d.return=o.return,P=d;break e}P=o.return}}var c=e.current;for(P=c;P!==null;){i=P;var p=i.child;if(i.subtreeFlags&2064&&p!==null)p.return=i,P=p;else e:for(i=c;P!==null;){if(a=P,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ml(9,a)}}catch(T){ne(a,a.return,T)}if(a===i){P=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,P=w;break e}P=a.return}}if(U=l,zt(),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Nl,e)}catch{}r=!0}return r}finally{Q=n,We.transition=t}}return!1}function wa(e,t,n){t=Cn(n,t),t=xc(e,t,1),e=Ct(e,t,1),t=Ne(),e!==null&&(vr(e,1,t),Me(e,t))}function ne(e,t,n){if(e.tag===3)wa(e,e,n);else for(;t!==null;){if(t.tag===3){wa(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Et===null||!Et.has(r))){e=Cn(n,e),e=vc(t,e,1),t=Ct(t,e,1),e=Ne(),t!==null&&(vr(t,1,e),Me(t,e));break}}t=t.return}}function Sp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ne(),e.pingedLanes|=e.suspendedLanes&n,fe===e&&(me&n)===n&&(ae===4||ae===3&&(me&130023424)===me&&500>re()-ei?Wt(e,0):Zs|=n),Me(e,t)}function Dc(e,t){t===0&&(e.mode&1?(t=_r,_r<<=1,!(_r&130023424)&&(_r=4194304)):t=1);var n=Ne();e=dt(e,t),e!==null&&(vr(e,t,n),Me(e,n))}function Np(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dc(e,n)}function Cp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Dc(e,n)}var Fc;Fc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||be.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,fp(e,t,n);_e=!!(e.flags&131072)}else _e=!1,G&&t.flags&1048576&&Hu(t,dl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kr(e,t),e=t.pendingProps;var l=kn(t,we.current);gn(t,n),l=Js(null,t,r,e,l,n);var o=qs();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(o=!0,ul(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Hs(t),l.updater=Pl,t.stateNode=l,l._reactInternals=t,es(t,r,e,n),t=rs(null,t,r,!0,o,n)):(t.tag=0,G&&o&&Is(t),Se(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Tp(r),e=Je(r,e),l){case 0:t=ns(null,t,r,e,n);break e;case 1:t=ca(null,t,r,e,n);break e;case 11:t=aa(null,t,r,e,n);break e;case 14:t=ua(null,t,r,Je(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),ns(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),ca(e,t,r,l,n);case 3:e:{if(kc(t),e===null)throw Error(N(387));r=t.pendingProps,o=t.memoizedState,l=o.element,qu(e,t),hl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=Cn(Error(N(423)),t),t=da(e,t,r,n,l);break e}else if(r!==l){l=Cn(Error(N(424)),t),t=da(e,t,r,n,l);break e}else for(ze=Nt(t.stateNode.containerInfo.firstChild),Ie=t,G=!0,Ke=null,n=Qu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jn(),r===l){t=ft(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return Ku(t),e===null&&Go(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Qo(r,l)?i=null:o!==null&&Qo(r,o)&&(t.flags|=32),wc(e,t),Se(e,t,i,n),t.child;case 6:return e===null&&Go(t),null;case 13:return jc(e,t,n);case 4:return Ws(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),aa(e,t,r,l,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,J(fl,r._currentValue),r._currentValue=i,o!==null)if(Xe(o.value,i)){if(o.children===l.children&&!be.current){t=ft(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=at(-1,n&-n),u.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var v=f.pending;v===null?u.next=u:(u.next=v.next,v.next=u),f.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Xo(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(N(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Xo(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Se(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,gn(t,n),l=Ue(l),r=r(l),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,l=Je(r,t.pendingProps),l=Je(r.type,l),ua(e,t,r,l,n);case 15:return gc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Kr(e,t),t.tag=1,Pe(r)?(e=!0,ul(t)):e=!1,gn(t,n),mc(t,r,l),es(t,r,l,n),rs(null,t,r,!0,e,n);case 19:return Sc(e,t,n);case 22:return yc(e,t,n)}throw Error(N(156,t.tag))};function Ac(e,t){return fu(e,t)}function Ep(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function He(e,t,n,r){return new Ep(e,t,n,r)}function li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tp(e){if(typeof e=="function")return li(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ss)return 11;if(e===Ns)return 14}return 2}function Lt(e,t){var n=e.alternate;return n===null?(n=He(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xr(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")li(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case nn:return Ut(n.children,l,o,t);case js:i=8,l|=8;break;case No:return e=He(12,n,t,l|2),e.elementType=No,e.lanes=o,e;case Co:return e=He(13,n,t,l),e.elementType=Co,e.lanes=o,e;case Eo:return e=He(19,n,t,l),e.elementType=Eo,e.lanes=o,e;case Ka:return zl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ja:i=10;break e;case qa:i=9;break e;case Ss:i=11;break e;case Ns:i=14;break e;case mt:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=He(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Ut(e,t,n,r){return e=He(7,e,r,t),e.lanes=n,e}function zl(e,t,n,r){return e=He(22,e,r,t),e.elementType=Ka,e.lanes=n,e.stateNode={isHidden:!1},e}function xo(e,t,n){return e=He(6,e,null,t),e.lanes=n,e}function vo(e,t,n){return t=He(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yl(0),this.expirationTimes=Yl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function oi(e,t,n,r,l,o,i,a,u){return e=new Lp(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=He(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hs(o),e}function _p(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function $c(e){if(!e)return bt;e=e._reactInternals;e:{if(Gt(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(Pe(n))return $u(e,n,t)}return t}function Bc(e,t,n,r,l,o,i,a,u){return e=oi(n,r,!0,e,l,o,i,a,u),e.context=$c(null),n=e.current,r=Ne(),l=Tt(n),o=at(r,l),o.callback=t??null,Ct(n,o,l),e.current.lanes=l,vr(e,l,r),Me(e,r),e}function Il(e,t,n,r){var l=t.current,o=Ne(),i=Tt(l);return n=$c(n),t.context===null?t.context=n:t.pendingContext=n,t=at(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ct(l,t,i),e!==null&&(Ge(e,l,i,o),Qr(e,l,i)),i}function jl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ka(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function si(e,t){ka(e,t),(e=e.alternate)&&ka(e,t)}function bp(){return null}var Hc=typeof reportError=="function"?reportError:function(e){console.error(e)};function ii(e){this._internalRoot=e}Rl.prototype.render=ii.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));Il(e,t,null,null)};Rl.prototype.unmount=ii.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kt(function(){Il(null,e,null,null)}),t[ct]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=yu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<vt.length&&t!==0&&t<vt[n].priority;n++);vt.splice(n,0,e),n===0&&ku(e)}};function ai(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Dl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ja(){}function Pp(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var f=jl(i);o.call(f)}}var i=Bc(t,r,e,0,null,!1,!1,"",ja);return e._reactRootContainer=i,e[ct]=i.current,ir(e.nodeType===8?e.parentNode:e),Kt(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var a=r;r=function(){var f=jl(u);a.call(f)}}var u=oi(e,0,!1,null,null,!1,!1,"",ja);return e._reactRootContainer=u,e[ct]=u.current,ir(e.nodeType===8?e.parentNode:e),Kt(function(){Il(t,u,n,r)}),u}function Fl(e,t,n,r,l){var o=n._reactRootContainer;if(o){var i=o;if(typeof l=="function"){var a=l;l=function(){var u=jl(i);a.call(u)}}Il(t,i,e,l)}else i=Pp(n,t,e,l,r);return jl(i)}vu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Hn(t.pendingLanes);n!==0&&(Ts(t,n|1),Me(t,re()),!(U&6)&&(En=re()+500,zt()))}break;case 13:Kt(function(){var r=dt(e,1);if(r!==null){var l=Ne();Ge(r,e,1,l)}}),si(e,1)}};Ls=function(e){if(e.tag===13){var t=dt(e,134217728);if(t!==null){var n=Ne();Ge(t,e,134217728,n)}si(e,134217728)}};gu=function(e){if(e.tag===13){var t=Tt(e),n=dt(e,t);if(n!==null){var r=Ne();Ge(n,e,t,r)}si(e,t)}};yu=function(){return Q};wu=function(e,t){var n=Q;try{return Q=e,t()}finally{Q=n}};Ro=function(e,t,n){switch(t){case"input":if(_o(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Ll(r);if(!l)throw Error(N(90));Ga(r),_o(r,l)}}}break;case"textarea":Za(e,n);break;case"select":t=n.value,t!=null&&hn(e,!!n.multiple,t,!1)}};su=ti;iu=Kt;var Mp={usingClientEntryPoint:!1,Events:[yr,sn,Ll,lu,ou,ti]},An={findFiberByHostInstance:$t,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Op={bundleType:An.bundleType,version:An.version,rendererPackageName:An.rendererPackageName,rendererConfig:An.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=cu(e),e===null?null:e.stateNode},findFiberByHostInstance:An.findFiberByHostInstance||bp,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 $r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$r.isDisabled&&$r.supportsFiber)try{Nl=$r.inject(Op),nt=$r}catch{}}De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mp;De.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ai(t))throw Error(N(200));return _p(e,t,null,n)};De.createRoot=function(e,t){if(!ai(e))throw Error(N(299));var n=!1,r="",l=Hc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=oi(e,1,!1,null,null,n,!1,r,l),e[ct]=t.current,ir(e.nodeType===8?e.parentNode:e),new ii(t)};De.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=cu(t),e=e===null?null:e.stateNode,e};De.flushSync=function(e){return Kt(e)};De.hydrate=function(e,t,n){if(!Dl(t))throw Error(N(200));return Fl(null,e,t,!0,n)};De.hydrateRoot=function(e,t,n){if(!ai(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",i=Hc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Bc(t,null,e,1,n??null,l,!1,o,i),e[ct]=t.current,ir(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Rl(t)};De.render=function(e,t,n){if(!Dl(t))throw Error(N(200));return Fl(null,e,t,!1,n)};De.unmountComponentAtNode=function(e){if(!Dl(e))throw Error(N(40));return e._reactRootContainer?(Kt(function(){Fl(null,null,e,!1,function(){e._reactRootContainer=null,e[ct]=null})}),!0):!1};De.unstable_batchedUpdates=ti;De.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Dl(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return Fl(e,t,n,!1,r)};De.version="18.3.1-next-f1338f8080-20240426";function Wc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wc)}catch(e){console.error(e)}}Wc(),Wa.exports=De;var zp=Wa.exports,Sa=zp;jo.createRoot=Sa.createRoot,jo.hydrateRoot=Sa.hydrateRoot;function Ip({schema:e,selectedFunction:t,onSelectFunction:n}){const[r,l]=b.useState(new Set),[o,i]=b.useState(""),a=b.useRef(null);b.useEffect(()=>{if(t){const m=t.path.lastIndexOf(":"),y=(m>-1?t.path.substring(0,m):t.path).split("/"),j=[];for(let d=0;d<y.length;d++)j.push(y.slice(0,d+1).join("/"));j.length>0&&l(d=>{const c=new Set(d);return j.forEach(p=>c.add(p)),c}),setTimeout(()=>{var c;const d=(c=a.current)==null?void 0:c.querySelector(`[data-function-path="${t.path}"]`);d&&d.scrollIntoView({behavior:"smooth",block:"nearest"})},100)}},[t]);const u=m=>{l(g=>{const y=new Set(g);return y.has(m)?y.delete(m):y.add(m),y})},f=m=>{if(!o)return m;const g=o.toLowerCase();return m.map(y=>{const j=y.functions.filter(c=>c.name.toLowerCase().includes(g)||c.path.toLowerCase().includes(g)),d=f(y.children);return j.length>0||d.length>0?{...y,functions:j,children:d}:null}).filter(y=>y!==null)},v=(m,g=0)=>{const y=r.has(m.path)||o.length>0,j=m.functions.length>0||m.children.length>0;return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>u(m.path),className:"w-full flex items-center gap-2 px-3 py-1.5 hover:bg-convex-border text-left text-sm transition-colors",style:{paddingLeft:`${g*12+12}px`},children:[j&&s.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${y?"rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),s.jsx("svg",{className:"w-4 h-4 text-yellow-500",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})}),s.jsx("span",{className:"text-gray-300",children:m.name})]}),y&&s.jsxs(s.Fragment,{children:[m.functions.map(d=>x(d,g+1)),m.children.map(d=>v(d,g+1))]})]},m.path)},x=(m,g)=>{const y=(t==null?void 0:t.path)===m.path,j={query:"text-blue-400",mutation:"text-orange-400",action:"text-purple-400"},d={query:"bg-blue-900/30",mutation:"bg-orange-900/30",action:"bg-purple-900/30"};return s.jsxs("button",{"data-function-path":m.path,"data-selected":y,onClick:()=>n(m),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left text-sm transition-colors ${y?"bg-convex-accent/20 text-white":"hover:bg-convex-border text-gray-400"}`,style:{paddingLeft:`${g*12+12}px`},children:[s.jsx("span",{className:`text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded ${j[m.type]} ${d[m.type]}`,children:m.type.charAt(0).toUpperCase()}),s.jsx("span",{className:y?"text-white":"text-gray-300",children:m.name})]},m.path)},h=e?f(e.modules):[];return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx("div",{className:"px-3 h-14 border-b border-convex-border flex items-center",children:s.jsxs("div",{className:"relative w-full",children:[s.jsx("svg",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",placeholder:"Search functions...",value:o,onChange:m=>i(m.target.value),className:"w-full bg-convex-darker border border-convex-border rounded-lg pl-10 pr-3 py-1.5 text-sm focus:outline-none focus:border-convex-accent"})]})}),s.jsx("div",{ref:a,className:"flex-1 overflow-auto py-2",children:e?h.length===0?s.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 text-sm",children:"No functions found"}):h.map(m=>v(m)):s.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 text-sm",children:"Loading schema..."})}),s.jsx("div",{className:"p-3 border-t border-convex-border",children:s.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-blue-400 bg-blue-900/30 px-1 rounded",children:"Q"}),"Query"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-orange-400 bg-orange-900/30 px-1 rounded",children:"M"}),"Mutation"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-purple-400 bg-purple-900/30 px-1 rounded",children:"A"}),"Action"]})]})})]})}function Rp({schema:e,selectedTable:t,onSelectTable:n}){const[r,l]=b.useState(""),o=b.useMemo(()=>{if(!e)return[];if(!r.trim())return e.tables;const u=r.toLowerCase();return e.tables.filter(f=>f.name.toLowerCase().includes(u)?!0:f.fields.some(v=>v.name.toLowerCase().includes(u)))},[e,r]),i=u=>{const f=u.name===t;return s.jsxs("button",{onClick:()=>n(u.name),className:`w-full flex items-start justify-between gap-2 px-3 py-2 text-left text-sm transition-colors ${f?"bg-convex-accent/20 text-white":"hover:bg-convex-border text-gray-300"}`,children:[s.jsxs("div",{className:"flex items-start gap-2 min-w-0",children:[s.jsx("svg",{className:"w-4 h-4 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})}),s.jsx("span",{className:`leading-5 break-all whitespace-normal ${f?"text-white":"text-gray-300"}`,children:u.name})]}),s.jsxs("span",{className:"text-xs text-gray-500 flex-shrink-0 pt-0.5",children:[u.fields.length," fields"]})]},u.name)},a=e==null?void 0:e.tables.find(u=>u.name===t);return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx("div",{className:"px-3 h-14 border-b border-convex-border flex items-center",children:s.jsxs("div",{className:"relative w-full",children:[s.jsx("svg",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",placeholder:"Search tables or fields...",value:r,onChange:u=>l(u.target.value),className:"w-full bg-convex-darker border border-convex-border rounded-lg pl-10 pr-3 py-1.5 text-sm focus:outline-none focus:border-convex-accent"})]})}),s.jsx("div",{className:"flex-1 overflow-auto py-2",children:e?o.length===0?s.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 text-sm",children:"No tables found"}):o.map(u=>i(u)):s.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 text-sm",children:"Loading schema..."})}),a&&s.jsx("div",{className:"border-t border-convex-border"})]})}const Dp={},Na=e=>{let t;const n=new Set,r=(v,x)=>{const h=typeof v=="function"?v(t):v;if(!Object.is(h,t)){const m=t;t=x??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,m))}},l=()=>t,u={setState:r,getState:l,getInitialState:()=>f,subscribe:v=>(n.add(v),()=>n.delete(v)),destroy:()=>{(Dp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,l,u);return u},Fp=e=>e?Na(e):Na;var Uc={exports:{}},Vc={},Qc={exports:{}},Jc={};/**
|
|
41
|
-
* @license React
|
|
42
|
-
* use-sync-external-store-shim.production.js
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var Tn=b;function Ap(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $p=typeof Object.is=="function"?Object.is:Ap,Bp=Tn.useState,Hp=Tn.useEffect,Wp=Tn.useLayoutEffect,Up=Tn.useDebugValue;function Vp(e,t){var n=t(),r=Bp({inst:{value:n,getSnapshot:t}}),l=r[0].inst,o=r[1];return Wp(function(){l.value=n,l.getSnapshot=t,go(l)&&o({inst:l})},[e,n,t]),Hp(function(){return go(l)&&o({inst:l}),e(function(){go(l)&&o({inst:l})})},[e]),Up(n),n}function go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$p(e,n)}catch{return!0}}function Qp(e,t){return t()}var Jp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Qp:Vp;Jc.useSyncExternalStore=Tn.useSyncExternalStore!==void 0?Tn.useSyncExternalStore:Jp;Qc.exports=Jc;var qp=Qc.exports;/**
|
|
49
|
-
* @license React
|
|
50
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/var Al=b,Kp=qp;function Yp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gp=typeof Object.is=="function"?Object.is:Yp,Xp=Kp.useSyncExternalStore,Zp=Al.useRef,eh=Al.useEffect,th=Al.useMemo,nh=Al.useDebugValue;Vc.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var o=Zp(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=th(function(){function u(m){if(!f){if(f=!0,v=m,m=r(m),l!==void 0&&i.hasValue){var g=i.value;if(l(g,m))return x=g}return x=m}if(g=x,Gp(v,m))return g;var y=r(m);return l!==void 0&&l(g,y)?(v=m,g):(v=m,x=y)}var f=!1,v,x,h=n===void 0?null:n;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,n,r,l]);var a=Xp(e,o[0],o[1]);return eh(function(){i.hasValue=!0,i.value=a},[a]),nh(a),a};Uc.exports=Vc;var rh=Uc.exports;const lh=ba(rh),qc={},{useDebugValue:oh}=Ba,{useSyncExternalStoreWithSelector:sh}=lh;let Ca=!1;const ih=e=>e;function ah(e,t=ih,n){(qc?"production":void 0)!=="production"&&n&&!Ca&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Ca=!0);const r=sh(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return oh(r),r}const Ea=e=>{(qc?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Fp(e):e,n=(r,l)=>ah(t,r,l);return Object.assign(n,t),n},$l=e=>e?Ea(e):Ea,Kc="convex-devtools-drafts",Yc="convex-devtools-recent-tabs",uh=()=>{try{const e=localStorage.getItem(Kc);if(e)return JSON.parse(e)}catch{}return{}},Zt=e=>{try{localStorage.setItem(Kc,JSON.stringify(e))}catch{}},ch=()=>{try{const e=localStorage.getItem(Yc);if(e)return JSON.parse(e)}catch{}return[]},Ta=e=>{try{localStorage.setItem(Yc,JSON.stringify(e))}catch{}},Pt=$l((e,t)=>({selectedFunction:null,args:"{}",jwtToken:"",projectName:"",response:null,isLoading:!1,isArgsValid:!0,argsError:null,drafts:uh(),recentTabs:ch(),setSelectedFunction:n=>{const{selectedFunction:r,args:l,response:o}=t();if(r){const u={...t().drafts};u[r.path]={args:l,response:o},Zt(u),e({drafts:u})}const i=t().drafts,a=n?i[n.path]:null;if(a){e({selectedFunction:n,args:a.args,response:a.response,isArgsValid:!0,argsError:null});return}if(n&&Array.isArray(n.args)&&n.args.length>0){const u={};n.args.forEach(f=>{if(f.name==="paginationOpts"){u[f.name]={cursor:null,numItems:10};return}f.optional||(f.type.includes("[]")||f.type.toLowerCase().includes("array")?u[f.name]=[]:u[f.name]="")}),e({selectedFunction:n,args:JSON.stringify(u,null,2),response:null,isArgsValid:!0,argsError:null})}else e({selectedFunction:n,args:"{}",response:null,isArgsValid:!0,argsError:null})},setArgs:n=>{try{JSON.parse(n),e({args:n,isArgsValid:!0,argsError:null});const{selectedFunction:r,response:l,drafts:o}=t();if(r){const i={...o,[r.path]:{args:n,response:l}};Zt(i),e({drafts:i})}}catch(r){e({args:n,isArgsValid:!1,argsError:(r==null?void 0:r.message)||"Invalid JSON"})}},setJwtToken:n=>e({jwtToken:n}),setProjectName:n=>e({projectName:n}),invoke:async()=>{const{selectedFunction:n,args:r,jwtToken:l,addToRecentTabs:o}=t();if(n){o(n),e({isLoading:!0,response:null});try{let i={};try{i=JSON.parse(r)}catch{e({isLoading:!1,response:{success:!1,error:{message:"Invalid JSON in arguments"},timestamp:new Date().toISOString()}});return}const u=await(await fetch("/api/invoke",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({functionPath:n.path,functionType:n.type,args:i,jwtToken:l||void 0})})).json();e({response:u,isLoading:!1})}catch(i){e({isLoading:!1,response:{success:!1,error:{message:i.message||"Request failed"},timestamp:new Date().toISOString()}})}}},setResponse:n=>{e({response:n,isLoading:!1});const{selectedFunction:r,args:l,drafts:o}=t();if(r){const i={...o,[r.path]:{args:l,response:n}};Zt(i),e({drafts:i})}},clearResponse:()=>{e({response:null});const{selectedFunction:n,args:r,drafts:l}=t();if(n){const o={...l,[n.path]:{args:r,response:null}};Zt(o),e({drafts:o})}},saveDraft:()=>{const{selectedFunction:n,args:r,response:l,drafts:o}=t();if(n){const i={...o,[n.path]:{args:r,response:l}};Zt(i),e({drafts:i})}},loadFromSaved:(n,r,l)=>{const{selectedFunction:o,args:i,response:a}=t();if(o){const u={...t().drafts};u[o.path]={args:i,response:a},Zt(u),e({drafts:u})}e({selectedFunction:n,args:r,response:l,isArgsValid:!0,argsError:null})},addToRecentTabs:n=>{const{recentTabs:r}=t();if(r.some(o=>o.path===n.path))return;const l=[n,...r].slice(0,10);e({recentTabs:l}),Ta(l)},removeFromRecentTabs:n=>{const{recentTabs:r}=t(),l=r.filter(o=>o.path!==n);e({recentTabs:l}),Ta(l)}})),dh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let en=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=dh[n[e]&63];return t};const La="convex-devtools-data",yo="convex-devtools-jwt-token",kr=$l((e,t)=>({collections:[],subfolders:[],history:[],dataHistory:[],savedToken:"",createCollection:(n,r)=>{const l=en(),o={id:l,name:n,folder:r??null,requests:[],createdAt:new Date().toISOString()};return e(i=>({collections:[...i.collections,o]})),t().saveToStorage(),l},deleteCollection:n=>{e(r=>({collections:r.collections.filter(l=>l.id!==n)})),t().saveToStorage()},renameCollection:(n,r)=>{e(l=>({collections:l.collections.map(o=>o.id===n?{...o,name:r}:o)})),t().saveToStorage()},moveCollection:(n,r)=>{e(l=>({collections:l.collections.map(o=>o.id===n?{...o,folder:r}:o)})),t().saveToStorage()},createSubfolder:(n,r)=>{const l=en(),o={id:l,name:n,parentId:r??null,createdAt:new Date().toISOString()};return e(i=>({subfolders:[...i.subfolders,o]})),t().saveToStorage(),l},deleteSubfolder:n=>{e(r=>{const l=r.collections.map(o=>o.folder===n?{...o,folder:null}:o);return{subfolders:r.subfolders.filter(o=>o.id!==n),collections:l}}),t().saveToStorage()},renameSubfolder:(n,r)=>{e(l=>({subfolders:l.subfolders.map(o=>o.id===n?{...o,name:r}:o)})),t().saveToStorage()},saveRequest:(n,r,l,o)=>{const i={id:en(),name:r,...l,lastResponse:o,savedAt:new Date().toISOString()};e(a=>({collections:a.collections.map(u=>u.id===n?{...u,requests:[...u.requests,i]}:u)})),t().saveToStorage()},deleteRequest:(n,r)=>{e(l=>({collections:l.collections.map(o=>o.id===n?{...o,requests:o.requests.filter(i=>i.id!==r)}:o)})),t().saveToStorage()},updateRequest:(n,r,l)=>{e(o=>({collections:o.collections.map(i=>i.id===n?{...i,requests:i.requests.map(a=>a.id===r?{...a,...l}:a)}:i)})),t().saveToStorage()},renameRequest:(n,r,l)=>{e(o=>({collections:o.collections.map(i=>i.id===n?{...i,requests:i.requests.map(a=>a.id===r?{...a,name:l}:a)}:i)})),t().saveToStorage()},setSavedToken:n=>{e({savedToken:n});try{n?localStorage.setItem(yo,n):localStorage.removeItem(yo)}catch(r){console.error("Failed to save token to localStorage:",r)}},loadSavedToken:()=>{try{const n=localStorage.getItem(yo)||"";return e({savedToken:n}),n}catch(n){return console.error("Failed to load token from localStorage:",n),""}},addToHistory:n=>{const r={id:en(),...n};e(l=>({history:[r,...l.history].slice(0,100)})),t().saveToStorage()},deleteHistoryEntry:n=>{e(r=>({history:r.history.filter(l=>l.id!==n)})),t().saveToStorage()},clearHistory:()=>{e({history:[]}),t().saveToStorage()},addToDataHistory:n=>{const r={id:en(),...n};e(l=>({dataHistory:[r,...l.dataHistory].slice(0,100)})),t().saveToStorage()},deleteDataHistoryEntry:n=>{e(r=>({dataHistory:r.dataHistory.filter(l=>l.id!==n)})),t().saveToStorage()},clearDataHistory:()=>{e({dataHistory:[]}),t().saveToStorage()},loadFromStorage:async()=>{try{const n=await fetch("/api/persistence");if(n.ok){const r=await n.json();e({collections:Array.isArray(r.collections)?r.collections:[],subfolders:Array.isArray(r.subfolders)?r.subfolders:[],history:Array.isArray(r.history)?r.history:[],dataHistory:Array.isArray(r.dataHistory)?r.dataHistory:[]});return}}catch(n){console.error("Failed to load from server storage:",n)}try{const n=localStorage.getItem(La);if(n){const r=JSON.parse(n);e({collections:r.collections||[],subfolders:r.subfolders||[],history:r.history||[],dataHistory:r.dataHistory||[]})}}catch(n){console.error("Failed to load from local storage:",n)}},saveToStorage:async()=>{try{const{collections:n,subfolders:r,history:l,dataHistory:o}=t();if((await fetch("/api/persistence",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({collections:n,subfolders:r,history:l,dataHistory:o})})).ok)return}catch(n){console.error("Failed to save to server storage:",n)}try{const{collections:n,subfolders:r,history:l,dataHistory:o}=t();localStorage.setItem(La,JSON.stringify({collections:n,subfolders:r,history:l,dataHistory:o}))}catch(n){console.error("Failed to save to local storage:",n)}},exportData:()=>{const{collections:n}=t();return{version:"1.1.0",exportedAt:new Date().toISOString(),collections:n}},importData:n=>{if(n.version!=="1.1.0")throw new Error(`Unsupported export version: ${n.version}`);e(r=>{const l=new Set(r.collections.map(i=>i.id)),o=n.collections.filter(i=>!l.has(i.id));return{collections:[...r.collections,...o]}}),t().saveToStorage()}}));function fh(){const{selectedFunction:e,recentTabs:t,removeFromRecentTabs:n,setSelectedFunction:r,args:l,jwtToken:o,isLoading:i,projectName:a,setArgs:u,invoke:f,isArgsValid:v,argsError:x}=Pt(),{collections:h,saveRequest:m,addToHistory:g}=kr(),[y,j]=b.useState(!1),[d,c]=b.useState(""),[p,w]=b.useState(""),T=b.useRef(null);b.useEffect(()=>{!e&&t.length>0&&r(t[0])},[e,t,r]);const L=async()=>{try{const te=JSON.parse(l);u(JSON.stringify(te,null,2))}catch{}await f();const{response:S}=Pt.getState();e&&S&&g({projectName:a||void 0,functionPath:e.path,functionType:e.type,args:l,response:S,timestamp:new Date().toISOString()})},_=()=>{e&&c(e.path),j(!0)},O=()=>{!e||!d||!p||(m(p,d,{functionPath:e.path,functionType:e.type,args:l}),j(!1),c(""),w(""))},A=()=>{try{const S=JSON.parse(l);u(JSON.stringify(S,null,2))}catch{}},D={query:"text-blue-400 border-blue-400",mutation:"text-orange-400 border-orange-400",action:"text-purple-400 border-purple-400"};return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"h-12 flex items-center justify-between px-3 border-b border-convex-border",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:`text-[10px] font-mono font-semibold px-1.5 py-0.5 border rounded flex-shrink-0 ${D[e.type]}`,children:e.type.charAt(0).toUpperCase()}),s.jsx("span",{className:"font-mono text-sm truncate",children:e.path})]}):s.jsx("span",{className:"text-sm text-gray-500",children:"No function selected"}),o?s.jsx("span",{className:"flex-shrink-0 text-green-400 cursor-help",title:"Authenticated with JWT token",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})}):s.jsx("span",{className:"flex-shrink-0 text-gray-500 cursor-help",title:"No authentication - Click key icon in header to add JWT",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsx("button",{onClick:_,disabled:!e,className:"p-1.5 text-gray-400 hover:text-white hover:bg-convex-border rounded transition-colors",title:"Save to Collection",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 4H6a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V7.828a2 2 0 00-.586-1.414l-1.828-1.828A2 2 0 0016.172 4H16M8 4v4m0-4h4m0 0v4m0-4h4v4M8 8h8M8 12h8m-8 4h6"})})}),s.jsx("button",{onClick:L,disabled:!e||i||!v,className:`btn-compact font-medium text-sm transition-colors flex items-center gap-1.5 min-w-[70px] justify-center ${i?"bg-gray-600 cursor-not-allowed":"bg-convex-accent hover:bg-convex-accent-hover"}`,children:i?s.jsxs("svg",{className:"animate-spin w-3.5 h-3.5",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M8 5v14l11-7z"})}),"Run"]})})]})]}),s.jsx("div",{className:"h-14 flex items-center gap-2 px-2 py-1 bg-convex-darker border-b border-convex-border flex-shrink-0 overflow-x-auto scrollbar-hide",children:t.length===0?s.jsx("span",{className:"text-xs text-gray-500 px-2",children:"Recent tabs will appear here"}):t.map(S=>{const te=(e==null?void 0:e.path)===S.path,B=S.type==="query"?"text-blue-400":S.type==="mutation"?"text-orange-400":"text-purple-400";return s.jsxs("div",{className:`flex items-center gap-2 pl-3 pr-2 h-8 rounded-lg text-sm font-mono transition-colors border ${te?"bg-gray-300 dark:bg-convex-border text-gray-900 dark:text-white border-convex-border":"hover:bg-gray-200 dark:hover:bg-convex-border/50 text-gray-600 dark:text-gray-400 border-transparent"}`,title:S.path,children:[s.jsxs("button",{onClick:()=>r(S),className:"flex items-center gap-1 truncate max-w-[160px]",children:[s.jsx("span",{className:`font-semibold flex-shrink-0 ${B}`,children:S.type.charAt(0).toUpperCase()}),s.jsx("span",{className:"truncate",children:S.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),n(S.path)},className:"p-0.5 rounded hover:bg-convex-dark text-gray-500 hover:text-white transition-colors flex-shrink-0",title:"Close tab",children:s.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},S.path)})}),s.jsx("div",{className:"flex-1 flex overflow-hidden",children:e?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex-1 flex flex-col p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"text-sm text-gray-400",children:"Arguments (JSON)"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:A,className:"text-xs text-gray-500 hover:text-white transition-colors",children:"Format"}),s.jsx("div",{className:"text-xs",children:v?s.jsx("span",{className:"text-green-600 dark:text-green-400",children:"✓ Valid JSON"}):s.jsx("span",{className:"text-red-600 dark:text-red-400",title:x||"",children:"✗ Invalid JSON"})})]})]}),s.jsx("textarea",{ref:T,value:l,onChange:S=>u(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.metaKey||S.ctrlKey)&&L()},className:"flex-1 w-full bg-convex-darker border border-convex-border rounded-lg p-4 font-mono text-sm resize-none focus:outline-none focus:border-convex-accent",placeholder:"{}",spellCheck:!1}),s.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Press ⌘+Enter to run"})]}),e&&e.args.length>0&&s.jsxs("div",{className:"w-64 border-l border-convex-border flex flex-col overflow-hidden",children:[s.jsx("div",{className:"p-3 border-b border-convex-border",children:s.jsx("h3",{className:"text-sm font-semibold text-gray-300",children:"Arguments"})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:e.args.map(S=>{const te=(()=>{try{return JSON.parse(l)}catch{return{}}})(),B=S.name in te,se=()=>{try{const H=JSON.parse(l);B?delete H[S.name]:S.name==="paginationOpts"?H[S.name]={cursor:null,numItems:10}:S.type.includes("[]")||S.type.toLowerCase().includes("array")?H[S.name]=[]:S.type.toLowerCase().includes("number")?H[S.name]=0:S.type.toLowerCase().includes("boolean")?H[S.name]=!1:H[S.name]="",u(JSON.stringify(H,null,2))}catch{}};return s.jsx("div",{className:`p-2 rounded border ${B?"bg-convex-accent/10 border-convex-accent/50":"bg-convex-darker border-convex-border"} transition-colors`,children:s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-sm font-mono text-gray-300 truncate",children:S.name}),!S.optional&&s.jsx("span",{className:"text-xs text-red-400",children:"*"})]}),s.jsx("div",{className:"text-xs text-gray-500 mt-0.5 truncate",children:S.type}),S.description&&s.jsx("div",{className:"text-xs text-gray-400 mt-1",title:S.description,children:S.description.length>60?S.description.substring(0,60)+"...":S.description}),S.enumValues&&S.enumValues.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:S.enumValues.map(H=>s.jsx("span",{onClick:()=>{try{const le=JSON.parse(l);le[S.name]=H,u(JSON.stringify(le,null,2))}catch{}},className:"text-[10px] px-1.5 py-0.5 rounded bg-convex-border text-gray-300 hover:bg-convex-accent/30 cursor-pointer transition-colors",title:`Click to set ${S.name} to '${H}'`,children:H},H))})]}),s.jsx("button",{onClick:se,disabled:!S.optional&&B,className:`flex-shrink-0 p-1 rounded transition-colors ${!S.optional&&B?"text-gray-600 cursor-not-allowed":B?"text-red-400 hover:text-red-300 hover:bg-red-400/10":"text-green-400 hover:text-green-300 hover:bg-green-400/10"}`,title:!S.optional&&B?"Required argument":B?"Remove from request":"Add to request",children:B?s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 12H4"})}):s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})},S.name)})})]})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:s.jsxs("div",{className:"text-center",children:[s.jsx("svg",{className:"w-16 h-16 mx-auto mb-4 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),s.jsx("p",{children:"Select a function from the tree to get started"})]})})}),y&&e&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-convex-dark border border-convex-border rounded-lg p-6 w-96",children:[s.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Save to Collection"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"Name"}),s.jsx("input",{type:"text",value:d,onChange:S=>c(S.target.value),placeholder:"e.g., Get all products",className:"w-full bg-convex-darker border border-convex-border rounded px-3 py-2 text-sm focus:outline-none focus:border-convex-accent"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"Collection"}),h.length===0?s.jsx("p",{className:"text-sm text-gray-500",children:"No collections yet. Create one in the Collections sidebar."}):s.jsxs("select",{value:p,onChange:S=>w(S.target.value),className:"w-full bg-convex-darker border border-convex-border rounded px-3 py-2 text-sm focus:outline-none focus:border-convex-accent",children:[s.jsx("option",{value:"",children:"Select a collection"}),h.map(S=>s.jsx("option",{value:S.id,children:S.name},S.id))]})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[s.jsx("button",{onClick:()=>j(!1),className:"px-4 py-2 text-sm text-gray-400 hover:text-white transition-colors",children:"Cancel"}),s.jsx("button",{onClick:O,disabled:!d||!p,className:"px-4 py-2 text-sm bg-convex-accent hover:bg-convex-accent-hover rounded disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Save"})]})]})})]})}function ph(){var v,x,h,m;const{response:e,isLoading:t,selectedFunction:n}=Pt(),[r,l]=b.useState("");if(!n)return null;if(t)return s.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("svg",{className:"animate-spin w-5 h-5",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Executing..."]})});if(!e)return s.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:s.jsx("div",{className:"text-center",children:s.jsx("p",{children:"Response will appear here after running the function"})})});const o=g=>{try{return JSON.stringify(g,null,2)}catch{return String(g)}},i=g=>g.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,y=>{let j="json-number";return/^"/.test(y)?/:$/.test(y)?j="json-key":j="json-string":/true|false/.test(y)?j="json-boolean":/null/.test(y)&&(j="json-null"),`<span class="${j}">${y}</span>`}),a=(g,y)=>{if(!y.trim())return g;try{const j=y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d=new RegExp(`(${j})(?![^<]*>)`,"gi");return g.replace(d,'<mark class="bg-yellow-300 text-black rounded px-0.5">$1</mark>')}catch{return g}},u=async()=>{try{await navigator.clipboard.writeText(o(e.success?e.result:e.error))}catch(g){console.error("Failed to copy:",g)}},f=!e.success||e.success&&e.result&&typeof e.result=="object"&&((v=e.result)==null?void 0:v.status)==="error";return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-convex-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[f?s.jsxs("span",{className:"flex items-center gap-1.5 text-red-400 text-sm",children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Error"]}):s.jsxs("span",{className:"flex items-center gap-1.5 text-green-400 text-sm",children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Success"]}),e.duration!==void 0&&s.jsxs("span",{className:"text-sm text-gray-500",children:[e.duration,"ms"]}),s.jsx("span",{className:"text-sm text-gray-600",children:new Date(e.timestamp).toLocaleTimeString()})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"relative",children:[s.jsx("svg",{className:"absolute left-2 top-1/2 transform -translate-y-1/2 w-3.5 h-3.5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",placeholder:"Search...",value:r,onChange:g=>l(g.target.value),className:"w-40 bg-convex-darker border border-convex-border rounded-md pl-8 pr-2 py-1 text-xs focus:outline-none focus:border-convex-accent"})]}),s.jsx("button",{onClick:u,className:"p-2 text-gray-400 hover:text-white hover:bg-convex-border rounded transition-colors",title:"Copy to clipboard",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:e.success?s.jsx("pre",{className:"font-mono text-sm whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:a(i(o(e.result)),r)}}):s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"bg-red-900/20 border border-red-800 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-red-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-red-700 dark:text-red-300 font-medium",children:(x=e.error)==null?void 0:x.message}),((h=e.error)==null?void 0:h.code)&&s.jsxs("p",{className:"text-red-600 dark:text-red-400 text-sm mt-1",children:["Code: ",e.error.code]})]})]})}),((m=e.error)==null?void 0:m.data)!==void 0&&e.error.data!==null&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-400 mb-2",children:"Error Details:"}),s.jsx("pre",{className:"font-mono text-sm whitespace-pre-wrap break-words bg-convex-darker border border-convex-border rounded-lg p-4",dangerouslySetInnerHTML:{__html:i(o(e.error.data))}})]})]})})]})}const ui=$l((e,t)=>({schema:null,isConnected:!1,error:null,ws:null,connect:()=>{const{ws:n}=t();if(n)return;const l=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,o=new WebSocket(l);o.onopen=()=>{e({isConnected:!0,error:null})},o.onmessage=i=>{try{const a=JSON.parse(i.data);a.type==="schema"&&e({schema:a.data})}catch(a){console.error("Failed to parse WebSocket message:",a)}},o.onerror=()=>{e({error:"Connection error"})},o.onclose=()=>{e({isConnected:!1,ws:null}),setTimeout(()=>{t().connect()},2e3)},e({ws:o})},disconnect:()=>{const{ws:n}=t();n&&(n.close(),e({ws:null,isConnected:!1}))}})),hh=25,ci=[10,25,50,100],Gc="convex-devtools-columns",Xc="convex-devtools-page-size",Zc="convex-devtools-data-tabs",_a=e=>JSON.stringify({table:e||"",filters:[],order:"desc"},null,2),mh=()=>{try{const e=localStorage.getItem(Gc);if(e)return JSON.parse(e)}catch{}return{}},wo=e=>{try{localStorage.setItem(Gc,JSON.stringify(e))}catch{}},xh=()=>{try{const e=localStorage.getItem(Xc);if(e){const t=Number(e);if(ci.includes(t))return t}}catch{}return hh},vh=e=>{try{localStorage.setItem(Xc,String(e))}catch{}},gh=()=>{try{const e=localStorage.getItem(Zc);if(e)return JSON.parse(e)}catch{}return[]},ko=e=>{try{localStorage.setItem(Zc,JSON.stringify(e))}catch{}},Bl=$l((e,t)=>({selectedTable:null,queryText:_a(),response:null,isLoading:!1,isQueryValid:!0,queryError:null,helperInstalled:null,helperError:null,queryMode:"json",uiFilters:[],uiOrder:"desc",columnsByTable:mh(),pageSize:xh(),pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0,recentTabs:gh(),setSelectedTable:n=>{const{queryText:r}=t();if(!n){e({selectedTable:null});return}try{const l=JSON.parse(r||"{}");l.table=n,e({selectedTable:n,queryText:JSON.stringify(l,null,2),isQueryValid:!0,queryError:null,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0})}catch{e({selectedTable:n,queryText:_a(n),isQueryValid:!0,queryError:null,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0})}if(t().queryMode==="ui"){const{uiFilters:l,uiOrder:o}=t();e({queryText:JSON.stringify(Dt(n,l,o),null,2),isQueryValid:!0,queryError:null})}},setQueryText:n=>{try{JSON.parse(n),e({queryText:n,isQueryValid:!0,queryError:null,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0})}catch(r){e({queryText:n,isQueryValid:!1,queryError:(r==null?void 0:r.message)||"Invalid JSON"})}},setQueryMode:n=>{if(e({queryMode:n}),n==="ui"){const{selectedTable:r,uiFilters:l,uiOrder:o}=t();if(!r)return;const i=Dt(r,l,o);e({queryText:JSON.stringify(i,null,2),isQueryValid:!0,queryError:null})}},addUiFilter:()=>e(n=>{const r=[...n.uiFilters,{field:"",op:"eq",value:""}],l={uiFilters:r,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0};return n.queryMode==="ui"&&n.selectedTable?{...l,queryText:JSON.stringify(Dt(n.selectedTable,r,n.uiOrder),null,2),isQueryValid:!0,queryError:null}:l}),updateUiFilter:(n,r)=>e(l=>{const o=[...l.uiFilters];o[n]={...o[n],...r};const i={uiFilters:o,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0};return l.queryMode==="ui"&&l.selectedTable?{...i,queryText:JSON.stringify(Dt(l.selectedTable,o,l.uiOrder),null,2),isQueryValid:!0,queryError:null}:i}),removeUiFilter:n=>e(r=>{const l=r.uiFilters.filter((i,a)=>a!==n),o={uiFilters:l,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0};return r.queryMode==="ui"&&r.selectedTable?{...o,queryText:JSON.stringify(Dt(r.selectedTable,l,r.uiOrder),null,2),isQueryValid:!0,queryError:null}:o}),setUiFilters:n=>e(r=>{const l={uiFilters:n,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0};return r.queryMode==="ui"&&r.selectedTable?{...l,queryText:JSON.stringify(Dt(r.selectedTable,n,r.uiOrder),null,2),isQueryValid:!0,queryError:null}:l}),setUiOrder:n=>e(r=>{const l={uiOrder:n,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0};return r.queryMode==="ui"&&r.selectedTable?{...l,queryText:JSON.stringify(Dt(r.selectedTable,r.uiFilters,n),null,2),isQueryValid:!0,queryError:null}:l}),setColumnsForTable:(n,r)=>{const l={...t().columnsByTable,[n]:r};wo(l),e({columnsByTable:l})},toggleColumn:(n,r)=>{const l=t().columnsByTable[n]||[],i=l.includes(r)?l.filter(u=>u!==r):[...l,r],a={...t().columnsByTable,[n]:i};wo(a),e({columnsByTable:a})},clearColumns:n=>{const r={...t().columnsByTable,[n]:[]};wo(r),e({columnsByTable:r})},resetPagination:()=>e({pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0}),setPageSize:n=>{ci.includes(n)&&(vh(n),e({pageSize:n,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0}))},nextPage:()=>{const{nextCursor:n,pageCursor:r,cursorStack:l}=t();n&&e({pageCursor:n,cursorStack:[...l,r??null]})},prevPage:()=>{const{cursorStack:n}=t();if(n.length===0)return;const r=[...n],l=r.pop()??null;e({pageCursor:l,cursorStack:r})},setClientPageIndex:n=>e({clientPageIndex:n}),setResponse:n=>e({response:n}),addToRecentTabs:n=>{const{recentTabs:r}=t(),l=r.findIndex(i=>i.table===n.table&&i.queryText===n.queryText);if(l!==-1){const i=[...r],a=i.splice(l,1)[0],u=[{...a,...n,createdAt:a.createdAt},...i].slice(0,10);e({recentTabs:u}),ko(u);return}const o=[{id:en(),createdAt:new Date().toISOString(),...n},...r].slice(0,10);e({recentTabs:o}),ko(o)},removeFromRecentTabs:n=>{const r=t().recentTabs.filter(l=>l.id!==n);e({recentTabs:r}),ko(r)},checkHelper:async()=>{try{const r=await(await fetch("/api/devtools/status")).json();e({helperInstalled:!!r.installed,helperError:null})}catch(n){e({helperInstalled:!1,helperError:(n==null?void 0:n.message)||"Failed to check helper status"})}},installHelper:async()=>{e({helperError:null});try{const n=await fetch("/api/devtools/install",{method:"POST"}),r=await n.json();if(!n.ok||(r==null?void 0:r.installed)!==!0)throw new Error((r==null?void 0:r.error)||"Failed to install helper");e({helperInstalled:!0,helperError:null})}catch(n){e({helperInstalled:!1,helperError:(n==null?void 0:n.message)||"Failed to install helper"})}},runQuery:async n=>{const{queryText:r,isQueryValid:l,pageSize:o,pageCursor:i,queryMode:a,selectedTable:u,uiFilters:f,uiOrder:v}=t();if(a==="json"&&!l)return;let x={};if(a==="json")try{x=JSON.parse(r)}catch(h){e({response:{success:!1,error:{message:(h==null?void 0:h.message)||"Invalid JSON in query"},timestamp:new Date().toISOString()},isLoading:!1});return}else{if(!u){e({response:{success:!1,error:{message:"Select a table in the schema explorer"},timestamp:new Date().toISOString()},isLoading:!1});return}const h=f.filter(m=>m.field&&m.op&&m.value!=="").map(m=>({field:m.field,op:m.op,value:ed(m.value)}));x={table:u,filters:h,order:v}}e({isLoading:!0});try{const m=x&&typeof x=="object"&&"pagination"in x?x.pagination:void 0,g=await fetch("/api/devtools/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...x,pagination:{cursor:(m==null?void 0:m.cursor)??i??null,numItems:(m==null?void 0:m.numItems)??o},jwtToken:n||void 0})}),j={...await g.json()};if("success"in j||(j.success=g.ok),typeof j.error=="string"?j.error={message:j.error}:j.error&&typeof j.error=="object"&&!j.error.message&&(j.error={message:JSON.stringify(j.error)}),j!=null&&j.result&&typeof j.result=="object"&&"status"in j.result&&j.result.status==="success"&&"value"in j.result){const w=j.result.value;if(w&&typeof w=="object"&&"page"in w?j.result=w.page:j.result=w,w&&typeof w=="object"&&"continueCursor"in w){const T=w.continueCursor??null,L=!!w.isDone;j.pageInfo={cursor:T,hasNextPage:!L}}}else j!=null&&j.result&&typeof j.result=="object"&&"page"in j.result&&(j.result=j.result.page);const d=j==null?void 0:j.pageInfo;e({response:j,isLoading:!1,nextCursor:(d==null?void 0:d.cursor)??null,hasNextPage:(d==null?void 0:d.hasNextPage)??!1});const c=a==="json"?String(x.table||""):u||"";c&&t().addToRecentTabs({table:c,queryMode:a,queryText:r,uiFilters:a==="ui"?f:void 0,uiOrder:a==="ui"?v:void 0,response:j});const p=a==="json"?String(x.table||""):u||"";p&&kr.getState().addToDataHistory({projectName:void 0,table:p,queryMode:a,queryText:r,uiFilters:a==="ui"?f:void 0,uiOrder:a==="ui"?v:void 0,response:j,timestamp:new Date().toISOString()})}catch(h){e({isLoading:!1,response:{success:!1,error:{message:(h==null?void 0:h.message)||"Request failed"},timestamp:new Date().toISOString()},nextCursor:null,hasNextPage:!1})}},clearResponse:()=>e({response:null})})),ed=e=>{const t=e.trim();if(t==="")return"";if(t==="true")return!0;if(t==="false")return!1;if(t==="null")return null;if(!Number.isNaN(Number(t))&&t.match(/^-?\d+(\.\d+)?$/))return Number(t);if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch{return t}return t},Dt=(e,t,n)=>{const r=t.filter(l=>l.field&&l.op&&l.value!=="").map(l=>({field:l.field,op:l.op,value:ed(l.value)}));return{table:e,filters:r,order:n}};function yh(){const{schema:e}=ui(),{jwtToken:t}=Pt(),{selectedTable:n,queryText:r,isQueryValid:l,queryError:o,helperInstalled:i,helperError:a,queryMode:u,uiFilters:f,uiOrder:v,recentTabs:x,setSelectedTable:h,setQueryText:m,setQueryMode:g,addUiFilter:y,updateUiFilter:j,removeUiFilter:d,setUiFilters:c,setUiOrder:p,setResponse:w,removeFromRecentTabs:T,resetPagination:L,checkHelper:_,installHelper:O,runQuery:A}=Bl();b.useEffect(()=>{_()},[_]);const D=b.useMemo(()=>(e==null?void 0:e.tables)||[],[e]);b.useEffect(()=>{!n&&D.length>0&&h(D[0].name)},[n,h,D]);const S=b.useMemo(()=>{if(!e||!n)return[];const C=e.tables.find(Y=>Y.name===n),R=[...C?C.fields.map(Y=>Y.name):[]];return R.includes("_id")||R.unshift("_id"),R.includes("_creationTime")||R.unshift("_creationTime"),R},[e,n]),[te,B]=b.useState(!1),[se,H]=b.useState(368),[le,ke]=b.useState(!1);b.useEffect(()=>{if(!le)return;const C=R=>{const Y=Math.min(520,Math.max(260,window.innerWidth-R.clientX));H(Y)},I=()=>ke(!1);return window.addEventListener("mousemove",C),window.addEventListener("mouseup",I),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",I)}},[le]);const E=async()=>{await A(t||void 0)},M=C=>{g(C.queryMode),h(C.table),C.queryMode==="ui"?(p(C.uiOrder??"desc"),C.uiFilters?c(C.uiFilters):m(C.queryText)):m(C.queryText),w(C.response??null),L()};return s.jsxs("div",{className:"data-explorer-panel flex flex-col h-full",children:[s.jsxs("div",{className:"panel-tabs border-b border-convex-border justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("span",{className:"text-[10px] font-mono font-semibold px-1.5 py-0.5 border border-green-500 text-green-400 rounded flex-shrink-0 h-6 flex items-center",children:"DATA"}),s.jsx("span",{className:"font-mono text-sm truncate",children:"Data Explorer"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsx("button",{onClick:()=>B(C=>!C),className:"btn-compact border border-convex-border text-sm text-gray-300 hover:bg-convex-border",children:"Fields"}),s.jsxs("button",{onClick:E,disabled:!l||i===!1,className:`btn-compact font-medium text-sm transition-colors flex items-center gap-1.5 min-w-[70px] justify-center ${!l||i===!1?"bg-gray-600 cursor-not-allowed":"bg-convex-accent hover:bg-convex-accent-hover"}`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M8 5v14l11-7z"})}),"Run"]})]})]}),s.jsx("div",{className:"data-tabs-row px-3 bg-convex-darker border-b border-convex-border flex-shrink-0 overflow-x-auto scrollbar-hide",children:x.length===0?s.jsx("span",{className:"text-xs text-gray-500 px-2",children:"Recent queries will appear here"}):x.map(C=>{const I=n===C.table&&u===C.queryMode&&r===C.queryText;return s.jsxs("div",{className:`flex items-center gap-2 pl-3 pr-2 h-8 rounded-lg text-sm font-mono transition-colors border ${I?"bg-gray-300 dark:bg-convex-border text-gray-900 dark:text-white border-convex-border":"hover:bg-gray-200 dark:hover:bg-convex-border/50 text-gray-600 dark:text-gray-400 border-transparent"}`,title:`${C.table} (${C.queryMode})`,children:[s.jsxs("button",{onClick:()=>M(C),className:"flex items-center gap-2 truncate max-w-[200px]",children:[s.jsx("span",{className:"font-semibold text-green-400",children:"D"}),s.jsx("span",{className:"truncate",children:C.table}),s.jsx("span",{className:"text-[10px] text-gray-400 uppercase",children:C.queryMode})]}),s.jsx("button",{onClick:R=>{R.stopPropagation(),T(C.id)},className:"p-0.5 rounded hover:bg-convex-dark text-gray-500 hover:text-white transition-colors flex-shrink-0",title:"Close tab",children:s.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},C.id)})}),s.jsxs("div",{className:"flex-1 flex overflow-hidden relative",children:[s.jsxs("div",{className:"flex-1 flex flex-col p-3 gap-4 transition-all overflow-hidden",style:te?{paddingRight:se+16}:void 0,children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 flex-nowrap pr-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400 min-w-0",children:[s.jsx("span",{className:"text-gray-500",children:"Table"}),s.jsx("span",{className:"font-mono text-gray-200 truncate",children:n||"Select in Schema"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsx("button",{onClick:()=>g("ui"),className:`px-2 py-1 text-xs rounded ${u==="ui"?"bg-convex-accent text-white":"text-gray-400 hover:bg-convex-border"}`,children:"Builder"}),s.jsx("button",{onClick:()=>g("json"),className:`px-2 py-1 text-xs rounded ${u==="json"?"bg-convex-accent text-white":"text-gray-400 hover:bg-convex-border"}`,children:"JSON"})]})]}),s.jsxs("div",{className:"text-xs text-gray-500",children:["This runs a read-only helper query in your Convex project that maps to ",s.jsx("span",{className:"font-mono",children:"ctx.db.query()"}),"."]}),i===!1&&s.jsxs("div",{className:"bg-blue-900/20 border border-blue-800 rounded-lg p-3 text-sm text-blue-300 flex items-center justify-between gap-3",children:[s.jsx("div",{children:"Devtools query helper not found in your project. Install it to run schema queries."}),s.jsx("button",{onClick:()=>void O(),className:"px-3 py-1 rounded bg-convex-accent hover:bg-convex-accent-hover text-white text-xs",children:"Install Helper"})]}),a&&s.jsx("div",{className:"bg-red-900/20 border border-red-800 rounded-lg p-3 text-sm text-red-300",children:a}),u==="json"?s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"text-sm text-gray-400",children:"Query (JSON)"}),s.jsxs("div",{className:"relative group",children:[s.jsx("button",{className:"px-2 py-1 text-xs rounded border border-convex-border text-gray-400 hover:bg-convex-border",title:"Example",children:"Example"}),s.jsxs("div",{className:"absolute right-0 mt-2 w-80 bg-convex-darker border border-convex-border rounded-lg p-3 text-xs text-gray-500 opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition z-20",children:[s.jsx("div",{className:"text-gray-400 font-semibold mb-2",children:"Example"}),s.jsx("pre",{className:"whitespace-pre-wrap",children:`{
|
|
57
|
-
"table": "users",
|
|
58
|
-
"filters": [
|
|
59
|
-
{ "field": "email", "op": "eq", "value": "ada@lovelace.dev" }
|
|
60
|
-
],
|
|
61
|
-
"order": "desc"
|
|
62
|
-
}`})]})]}),!l&&o&&s.jsx("span",{className:"text-xs text-red-400",children:o})]}),s.jsx("textarea",{value:r,onChange:C=>m(C.target.value),className:"flex-1 w-full bg-convex-darker border border-convex-border rounded-lg p-3 font-mono text-sm focus:outline-none focus:border-convex-accent resize-none"})]}):s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("label",{className:"text-sm text-gray-400",children:"Order"}),s.jsxs("select",{className:"input-control",value:v,onChange:C=>p(C.target.value),children:[s.jsx("option",{value:"desc",children:"desc"}),s.jsx("option",{value:"asc",children:"asc"})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("label",{className:"text-sm text-gray-400",children:"Filters"}),s.jsx("button",{onClick:()=>y(),className:"px-2 py-1 rounded border border-convex-border text-gray-300 hover:bg-convex-border text-xs ml-auto",children:"Add filter"})]}),f.length===0?s.jsx("div",{className:"text-xs text-gray-500",children:"No filters yet."}):s.jsx("div",{className:"space-y-2 overflow-y-auto pr-3 pb-2 pt-2 flex-1 min-h-0",children:f.map((C,I)=>s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s.jsxs("select",{className:"input-control",value:C.field,onChange:R=>j(I,{field:R.target.value}),children:[s.jsx("option",{value:"",children:"Field"}),S.map(R=>s.jsx("option",{value:R,children:R},R))]}),s.jsxs("select",{className:"input-control",value:C.op,onChange:R=>j(I,{op:R.target.value}),children:[s.jsx("option",{value:"eq",children:"eq"}),s.jsx("option",{value:"neq",children:"neq"}),s.jsx("option",{value:"gt",children:"gt"}),s.jsx("option",{value:"gte",children:"gte"}),s.jsx("option",{value:"lt",children:"lt"}),s.jsx("option",{value:"lte",children:"lte"})]}),s.jsx("input",{type:"text",placeholder:"value",value:C.value,onChange:R=>j(I,{value:R.target.value}),className:"flex-1 input-control"}),s.jsx("button",{onClick:()=>d(I),className:"ml-auto h-9 w-9 rounded border border-convex-border text-gray-500 hover:text-gray-200 hover:bg-convex-border flex items-center justify-center",title:"Remove filter",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},`filter-${I}`))})]})]}),te&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"absolute top-0 h-full w-1 cursor-col-resize hover:bg-convex-border/40",style:{right:se},onMouseDown:()=>ke(!0)}),s.jsxs("div",{className:"fields-drawer absolute right-0 top-0 h-full border-l border-convex-border bg-convex-darker/90 backdrop-blur-sm",style:{width:se},children:[s.jsxs("div",{className:"h-12 flex items-center justify-between px-4 border-b border-convex-border",children:[s.jsx("div",{className:"text-sm text-gray-300 font-semibold truncate",title:n?`${n} fields`:"Fields",children:n?`${n} fields`:"Fields"}),s.jsxs("span",{className:"text-xs text-gray-500",children:[S.length," fields"]}),s.jsx("button",{onClick:()=>B(!1),className:"p-1.5 text-gray-400 hover:text-white hover:bg-convex-border rounded",title:"Close",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),s.jsxs("div",{className:"p-3 text-xs text-gray-500",children:[s.jsxs("div",{className:"grid grid-cols-[minmax(0,1.1fr)_minmax(0,1.9fr)] gap-x-3 gap-y-1 text-[11px] text-gray-400 pb-1 border-b border-convex-border",children:[s.jsx("span",{className:"uppercase tracking-wide text-gray-500",children:"Field"}),s.jsx("span",{className:"uppercase tracking-wide text-gray-500 text-right",children:"Type"})]}),s.jsx("div",{className:"max-h-[calc(100vh-220px)] overflow-auto pr-1",children:S.length===0?s.jsx("div",{className:"text-xs text-gray-500 py-2",children:"Select a table in the schema panel to view fields."}):S.map(C=>{var R;const I=(R=e==null?void 0:e.tables.find(Y=>Y.name===n))==null?void 0:R.fields.find(Y=>Y.name===C);return s.jsxs("div",{className:"grid grid-cols-[minmax(0,1.1fr)_minmax(0,1.9fr)] gap-x-3 items-center text-xs text-gray-400 py-1 border-b border-convex-border/50",children:[s.jsx("span",{className:"font-mono truncate",children:C}),s.jsx("span",{className:"text-gray-500 text-right truncate",children:I?`${I.optional?"optional":"required"} · ${I.type}`:""})]},`${n}.${C}`)})})]})]})]})]})]})}const td=({value:e})=>{const[t,n]=b.useState(!1);let r="",l="";try{r=JSON.stringify(e),l=JSON.stringify(e,null,2)}catch{r=String(e),l=r}return s.jsxs("span",{className:"relative inline-flex max-w-[240px]",tabIndex:0,onBlur:()=>n(!1),children:[s.jsxs("button",{type:"button",onClick:()=>n(o=>!o),className:"json-pill inline-flex items-center gap-1.5 px-2 py-0.5 rounded border text-xs font-mono truncate max-w-[240px]",title:"Click to expand",children:[s.jsx("span",{className:"json-pill-icon inline-flex items-center justify-center w-4 h-4 rounded text-[10px] leading-none",children:"+"}),r]}),t&&s.jsx("div",{className:"json-popover absolute z-20 mt-1 left-0 max-w-[320px] rounded-lg p-2 text-xs shadow-lg",children:s.jsx("pre",{className:"whitespace-pre-wrap break-words",children:l})})]})},wh=e=>e==null?s.jsx("span",{className:"text-gray-500",children:"—"}):typeof e=="string"||typeof e=="number"?s.jsx("span",{children:e}):typeof e=="boolean"?s.jsx("span",{children:e?"true":"false"}):s.jsx(td,{value:e});function kh({rows:e,columns:t,renderCell:n=wh}){return e.length===0?s.jsx("div",{className:"flex items-center justify-center h-40 text-gray-500 text-sm",children:"No results found"}):s.jsx("div",{className:"data-table overflow-auto border border-convex-border rounded-lg",children:s.jsxs("table",{className:"min-w-full text-sm",children:[s.jsx("thead",{className:"sticky top-0 bg-convex-darker",children:s.jsx("tr",{children:t.map(r=>s.jsx("th",{className:"text-left px-3 py-2 font-semibold text-gray-300 border-b border-convex-border whitespace-nowrap",children:r},r))})}),s.jsx("tbody",{children:e.map((r,l)=>{const o=r._id,i=o!=null?String(o):String(l);return s.jsx("tr",{className:"border-b border-convex-border hover:bg-convex-darker/60",children:t.map(a=>s.jsx("td",{className:"px-3 py-2 align-top whitespace-nowrap text-gray-200",children:n(r[a],a)},`${l}-${a}`))},i)})})]})})}function jh(){var Ae,pe,jr,It;const{schema:e}=ui(),{response:t,isLoading:n,selectedTable:r,columnsByTable:l,setColumnsForTable:o,toggleColumn:i,clearColumns:a,pageSize:u,setPageSize:f,hasNextPage:v,cursorStack:x,nextPage:h,prevPage:m,runQuery:g,clientPageIndex:y,setClientPageIndex:j}=Bl(),[d,c]=b.useState(""),[p,w]=b.useState("table"),[T,L]=b.useState(!1),[_,O]=b.useState("rows"),A=z=>{try{return JSON.stringify(z,null,2)}catch{return String(z)}},D=z=>z.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,W=>{let je="json-number";return/^"/.test(W)?/:$/.test(W)?je="json-key":je="json-string":/true|false/.test(W)?je="json-boolean":/null/.test(W)&&(je="json-null"),`<span class="${je}">${W}</span>`}),S=(z,W)=>{if(!W.trim())return z;try{const je=W.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Rt=new RegExp(`(${je})(?![^<]*>)`,"gi");return z.replace(Rt,'<mark class="bg-yellow-300 text-black rounded px-0.5">$1</mark>')}catch{return z}},te=async()=>{try{await navigator.clipboard.writeText(A(t!=null&&t.success?t==null?void 0:t.result:t==null?void 0:t.error))}catch(z){console.error("Failed to copy:",z)}},B=b.useMemo(()=>!t||!t.success?[]:Array.isArray(t.result)?t.result:t.result&&typeof t.result=="object"&&"page"in t.result&&Array.isArray(t.result.page)?t.result.page:[],[t]),se=b.useMemo(()=>{if(!e||!r)return[];const z=e.tables.find(W=>W.name===r);return z?z.fields.map(W=>W.name):[]},[e,r]),H=b.useMemo(()=>{const z=se.length>0?[...se]:[];if(z.length===0){const W=new Set;B.forEach(je=>{Object.keys(je).forEach(Rt=>W.add(Rt))}),z.push(...Array.from(W))}return z.includes("_id")||B.some(W=>"_id"in W)&&z.unshift("_id"),z.includes("_creationTime")||B.some(W=>"_creationTime"in W)&&z.unshift("_creationTime"),z},[se,B]),le=b.useMemo(()=>{if(!r)return H;const z=l[r];return z===void 0?H:z.filter(W=>H.includes(W))},[H,l,r]);b.useEffect(()=>{if(!r)return;l[r]===void 0&&H.length>0&&o(r,H)},[H,l,r,o]);const ke=b.useMemo(()=>{if(!t||!t.success)return[];if(!Array.isArray(t.result))return[];if(t!=null&&t.pageInfo)return B;const z=y*u,W=z+u;return B.slice(z,W)},[y,u,t,B]),E=b.useMemo(()=>{if(!d.trim())return ke;const z=d.toLowerCase();return ke.filter(W=>JSON.stringify(W).toLowerCase().includes(z))},[d,ke]),M=b.useMemo(()=>!t||t!=null&&t.pageInfo||!t.success||!Array.isArray(t.result)?1:Math.max(1,Math.ceil(B.length/u)),[u,t,B]),C=async()=>{if(t!=null&&t.pageInfo){h(),await g();return}y+1<M&&j(y+1)},I=async()=>{if(t!=null&&t.pageInfo){m(),await g();return}y>0&&j(y-1)},R=t!=null&&t.pageInfo?x.length>0:y>0,Y=t!=null&&t.pageInfo?v:y+1<M,ue=t!=null&&t.pageInfo?`${E.length} rows`:`${E.length} of ${B.length} rows`,Te=!(t!=null&&t.success)||(t==null?void 0:t.success)&&t.result&&typeof t.result=="object"&&((Ae=t.result)==null?void 0:Ae.status)==="error";return n&&!t?s.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("svg",{className:"animate-spin w-5 h-5",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Running query..."]})}):t?s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-convex-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Te?s.jsxs("span",{className:"flex items-center gap-1.5 text-red-400 text-sm",children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Error"]}):s.jsxs("span",{className:"flex items-center gap-1.5 text-green-400 text-sm",children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Success"]}),t.duration!==void 0&&s.jsxs("span",{className:"text-sm text-gray-500",children:[t.duration,"ms"]}),s.jsx("span",{className:"text-sm text-gray-600",children:t.timestamp&&!Number.isNaN(new Date(t.timestamp).getTime())?new Date(t.timestamp).toLocaleTimeString():"—"}),n&&s.jsx("span",{className:"text-xs text-gray-500 ml-2",children:"Loading…"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"relative",children:[s.jsx("svg",{className:"absolute left-2 top-1/2 transform -translate-y-1/2 w-3.5 h-3.5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",placeholder:"Search...",value:d,onChange:z=>c(z.target.value),className:"w-40 bg-convex-darker border border-convex-border rounded-md pl-8 pr-2 py-1 text-xs focus:outline-none focus:border-convex-accent"})]}),s.jsx("button",{onClick:te,className:"p-2 text-gray-400 hover:text-white hover:bg-convex-border rounded transition-colors",title:"Copy to clipboard",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),p==="json"&&s.jsx("button",{onClick:()=>O(_==="rows"?"full":"rows"),className:"px-2 py-1 text-xs rounded border border-convex-border text-gray-400 hover:text-white hover:bg-convex-border transition-colors",title:"Toggle full response metadata",children:_==="rows"?"Full response":"Rows only"}),s.jsx("button",{onClick:()=>w(p==="table"?"json":"table"),className:"px-2 py-1 text-xs rounded border border-convex-border text-gray-400 hover:text-white hover:bg-convex-border transition-colors",title:"Toggle table/json view",children:p==="table"?"JSON":"Table"})]})]}),!Te&&p==="table"&&s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-convex-border text-xs text-gray-400 gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{children:ue}),!t.pageInfo&&Array.isArray(t.result)&&s.jsx("span",{className:"text-yellow-400",children:"Using client-side pagination (helper not updated)"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Page size"}),s.jsx("select",{className:"bg-convex-darker border border-convex-border rounded px-2 py-1 text-xs",value:u,onChange:z=>f(Number(z.target.value)),children:ci.map(z=>s.jsx("option",{value:z,children:z},z))})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:I,disabled:!R,className:`px-2 py-1 rounded border text-xs ${R?"border-convex-border text-gray-300 hover:bg-convex-border":"border-convex-border/50 text-gray-600 cursor-not-allowed"}`,children:"Prev"}),s.jsx("button",{onClick:C,disabled:!Y,className:`px-2 py-1 rounded border text-xs ${Y?"border-convex-border text-gray-300 hover:bg-convex-border":"border-convex-border/50 text-gray-600 cursor-not-allowed"}`,children:"Next"})]})]}),s.jsx("button",{onClick:()=>L(!T),className:"px-2 py-1 rounded border border-convex-border text-gray-300 hover:bg-convex-border",children:"Columns"})]}),T&&!Te&&p==="table"&&s.jsxs("div",{className:"border-b border-convex-border px-3 py-3 text-xs text-gray-400",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"font-semibold text-gray-300",children:"Columns"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>r&&o(r,H),className:"px-2 py-1 rounded border border-convex-border text-gray-300 hover:bg-convex-border",children:"Select all"}),s.jsx("button",{onClick:()=>r&&a(r),className:"px-2 py-1 rounded border border-convex-border text-gray-300 hover:bg-convex-border",children:"Clear all"})]})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:H.map(z=>{const W=le.includes(z);return s.jsxs("label",{className:"flex items-center gap-2 px-2 py-1 rounded border border-convex-border text-gray-300 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:W,onChange:()=>r&&i(r,z)}),s.jsx("span",{className:"font-mono",children:z})]},z)})})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:t.success?p==="table"&&Array.isArray(t.result)?le.length===0?s.jsx("div",{className:"text-sm text-gray-500",children:"No columns selected. Use the Columns button to pick fields."}):s.jsx(kh,{rows:E,columns:le,renderCell:(z,W)=>{if(z==null)return s.jsx("span",{className:"text-gray-500",children:"—"});if(typeof z=="number"){const je=W.toLowerCase();if((W==="_creationTime"||je.endsWith("at")||je.includes("time"))&&z>1e12)return s.jsx("span",{children:new Date(z).toLocaleString()})}return typeof z=="string"||typeof z=="number"?s.jsx("span",{children:String(z)}):typeof z=="boolean"?s.jsx("span",{children:z?"true":"false"}):s.jsx(td,{value:z})}}):s.jsx("pre",{className:"font-mono text-sm whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:S(D(A(_==="rows"?t.result:{result:t.result,pageInfo:t.pageInfo})),d)}}):s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"bg-red-900/20 border border-red-800 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("svg",{className:"w-5 h-5 text-red-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-red-700 dark:text-red-300 font-medium",children:((pe=t.error)==null?void 0:pe.message)||(t.error?JSON.stringify(t.error):"Request failed")}),((jr=t.error)==null?void 0:jr.code)&&s.jsxs("p",{className:"text-red-600 dark:text-red-400 text-sm mt-1",children:["Code: ",t.error.code]})]})]})}),((It=t.error)==null?void 0:It.data)!==void 0&&t.error.data!==null&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-400 mb-2",children:"Error Details:"}),s.jsx("pre",{className:"font-mono text-sm whitespace-pre-wrap break-words bg-convex-darker border border-convex-border rounded-lg p-4",dangerouslySetInnerHTML:{__html:D(A(t.error.data))}})]})]})})]}):s.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:s.jsx("div",{className:"text-center",children:s.jsx("p",{children:"Query results will appear here after running"})})})}function Sh({onClose:e}){const{collections:t,history:n,dataHistory:r,createCollection:l,deleteCollection:o,renameCollection:i,deleteRequest:a,renameRequest:u,deleteHistoryEntry:f,saveRequest:v,clearHistory:x,deleteDataHistoryEntry:h,clearDataHistory:m,exportData:g,importData:y}=kr(),{setSelectedFunction:j,setArgs:d,setResponse:c}=Pt(),{setSelectedTable:p,setQueryMode:w,setQueryText:T,setUiFilters:L,setUiOrder:_,setResponse:O}=Bl(),[A,D]=b.useState("collections"),[S,te]=b.useState("functions"),[B,se]=b.useState(new Set),[H,le]=b.useState(""),[ke,E]=b.useState(!1),[M,C]=b.useState(null),[I,R]=b.useState(null),[Y,ue]=b.useState(""),[Te,Ae]=b.useState(""),[pe,jr]=b.useState(""),It=b.useRef(null),z=k=>{se(F=>{const V=new Set(F);return V.has(k)?V.delete(k):V.add(k),V})},W=()=>{if(!H.trim())return;const k=l(H.trim());se(F=>new Set(F).add(k)),le(""),E(!1)},je=k=>{Y.trim()&&(i(k,Y.trim()),C(null),ue(""))},Rt=()=>{!I||!Y.trim()||(u(I.collectionId,I.requestId,Y.trim()),R(null),ue(""))},nd=k=>{const F={name:k.functionPath.split(":").pop()||k.functionPath,path:k.functionPath,type:k.functionType,args:[]};Pt.getState().loadFromSaved(F,k.args,k.lastResponse||null)},rd=k=>{const F={name:k.functionPath.split(":").pop()||k.functionPath,path:k.functionPath,type:k.functionType,args:[]};j(F),c(k.response||null);try{const V=JSON.parse(k.args);d(JSON.stringify(V,null,2))}catch{d(k.args)}},ld=k=>{p(k.table),w(k.queryMode),k.uiFilters&&L(k.uiFilters),k.uiOrder&&_(k.uiOrder),T(k.queryText),O(k.response)},od=k=>{var ce;let F=(ce=t[0])==null?void 0:ce.id;F||(F=l("Saved from History"));const V=`${k.functionPath.split(":").pop()} - ${new Date(k.timestamp).toLocaleString()}`;v(F,V,{functionPath:k.functionPath,functionType:k.functionType,args:k.args},k.response)},sd=()=>{const k=g(),F=new Blob([JSON.stringify(k,null,2)],{type:"application/json"}),V=URL.createObjectURL(F),ce=document.createElement("a");ce.href=V,ce.download=`convex-devtools-export-${new Date().toISOString().split("T")[0]}.json`,ce.click(),URL.revokeObjectURL(V)},id=k=>{var ce;const F=(ce=k.target.files)==null?void 0:ce[0];if(!F)return;const V=new FileReader;V.onload=Sr=>{var Pn;try{const Ul=JSON.parse((Pn=Sr.target)==null?void 0:Pn.result);y(Ul)}catch(Ul){console.error("Failed to import:",Ul),alert("Invalid export file")}},V.readAsText(F),It.current&&(It.current.value="")},di=b.useMemo(()=>{if(!Te.trim())return{collections:t};const k=Te.toLowerCase();return{collections:t.map(V=>{const ce=V.requests.filter(Pn=>Pn.name.toLowerCase().includes(k)||Pn.functionPath.toLowerCase().includes(k)),Sr=V.name.toLowerCase().includes(k);return ce.length>0||Sr?{...V,requests:Sr?V.requests:ce}:null}).filter(Boolean)}},[t,Te]),Hl=b.useMemo(()=>{if(!pe.trim())return n;const k=pe.toLowerCase();return n.filter(F=>F.functionPath.toLowerCase().includes(k))},[n,pe]),Wl=b.useMemo(()=>{if(!pe.trim())return r;const k=pe.toLowerCase();return r.filter(F=>F.table.toLowerCase().includes(k)||F.queryText.toLowerCase().includes(k))},[r,pe]),fi={query:"text-blue-400",mutation:"text-orange-400",action:"text-purple-400"},pi=({className:k="w-3 h-3"})=>s.jsx("svg",{className:k,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),hi=({className:k="w-3 h-3"})=>s.jsx("svg",{className:k,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})});return s.jsxs("div",{className:"w-72 border-r border-convex-border flex flex-col bg-convex-darker overflow-hidden",children:[s.jsxs("div",{className:"panel-tabs border-b border-convex-border flex-shrink-0 justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>D("collections"),className:`panel-tab-btn font-medium transition-colors ${A==="collections"?"bg-gray-300 dark:bg-convex-border text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-convex-border/50"}`,children:"Collections"}),s.jsx("button",{onClick:()=>D("history"),className:`panel-tab-btn font-medium transition-colors ${A==="history"?"bg-gray-300 dark:bg-convex-border text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-convex-border/50"}`,children:"History"})]}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("button",{onClick:sd,className:"p-1.5 text-gray-400 hover:text-white hover:bg-convex-border rounded transition-colors",title:"Export Collections",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}),s.jsx("button",{onClick:()=>{var k;return(k=It.current)==null?void 0:k.click()},className:"p-1.5 text-gray-400 hover:text-white hover:bg-convex-border rounded transition-colors",title:"Import Collections",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})}),s.jsx("input",{ref:It,type:"file",accept:".json",onChange:id,className:"hidden"}),s.jsx("button",{onClick:e,className:"p-1.5 text-gray-400 hover:text-white hover:bg-convex-border rounded transition-colors",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),s.jsx("div",{className:"px-3 h-14 border-b border-convex-border flex-shrink-0 flex items-center",children:s.jsxs("div",{className:"relative w-full",children:[s.jsx("svg",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",value:A==="collections"?Te:pe,onChange:k=>A==="collections"?Ae(k.target.value):jr(k.target.value),placeholder:A==="collections"?"Search collections...":"Search history...",className:"w-full bg-convex-darker border border-convex-border rounded-lg pl-10 pr-3 py-1.5 text-sm focus:outline-none focus:border-convex-accent"})]})}),s.jsx("div",{className:"flex-1 overflow-auto",children:A==="collections"?s.jsxs("div",{className:"py-1",children:[ke?s.jsxs("div",{className:"px-2 py-1.5 flex items-center gap-2",children:[s.jsx("input",{type:"text",value:H,onChange:k=>le(k.target.value),onKeyDown:k=>{k.key==="Enter"&&W(),k.key==="Escape"&&(E(!1),le(""))},placeholder:"Collection name",autoFocus:!0,className:"flex-1 bg-convex-dark border border-convex-border rounded px-2 py-1 text-sm focus:outline-none focus:border-convex-accent"}),s.jsx("button",{onClick:W,className:"p-1 text-green-400 hover:text-green-300",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),s.jsx("button",{onClick:()=>{E(!1),le("")},className:"p-1 text-gray-400 hover:text-white",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s.jsxs("button",{onClick:()=>E(!0),className:"w-full px-3 py-1.5 flex items-center gap-2 text-sm text-gray-400 hover:text-white hover:bg-convex-border transition-colors",children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"New Collection"]}),di.collections.map(k=>s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center group",children:M===k.id?s.jsxs("div",{className:"flex-1 px-2 py-1 flex items-center gap-2",children:[s.jsx("input",{type:"text",value:Y,onChange:F=>ue(F.target.value),onKeyDown:F=>{F.key==="Enter"&&je(k.id),F.key==="Escape"&&(C(null),ue(""))},autoFocus:!0,className:"flex-1 bg-convex-dark border border-convex-border rounded px-2 py-1 text-sm focus:outline-none focus:border-convex-accent"}),s.jsx("button",{onClick:()=>je(k.id),className:"p-1 text-green-400 hover:text-green-300",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]}):s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>z(k.id),className:"flex-1 px-2 py-1.5 flex items-center gap-2 text-sm text-left hover:bg-convex-border rounded mx-1 transition-colors overflow-hidden",children:[s.jsx("svg",{className:`w-3.5 h-3.5 text-gray-500 transition-transform flex-shrink-0 ${B.has(k.id)?"rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),s.jsx("svg",{className:"w-4 h-4 text-convex-accent flex-shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})}),s.jsx("span",{className:"text-gray-300 truncate",children:k.name}),s.jsxs("span",{className:"text-xs text-gray-600 flex-shrink-0",children:["(",k.requests.length,")"]})]}),s.jsxs("div",{className:"pr-1 opacity-0 group-hover:opacity-100 flex items-center flex-shrink-0",children:[s.jsx("button",{onClick:()=>{C(k.id),ue(k.name)},className:"p-1 text-gray-500 hover:text-white",title:"Rename",children:s.jsx(hi,{})}),s.jsx("button",{onClick:()=>o(k.id),className:"p-1 text-gray-500 hover:text-red-400",title:"Delete",children:s.jsx(pi,{})})]})]})}),B.has(k.id)&&s.jsx("div",{className:"ml-5",children:k.requests.length===0?s.jsx("p",{className:"px-2 py-1 text-xs text-gray-600",children:"No saved requests"}):k.requests.map(F=>s.jsx("div",{className:"flex items-center group hover:bg-convex-border rounded mx-1 transition-colors",children:(I==null?void 0:I.collectionId)===k.id&&(I==null?void 0:I.requestId)===F.id?s.jsxs("div",{className:"flex-1 px-2 py-1 flex items-center gap-2",children:[s.jsx("input",{type:"text",value:Y,onChange:V=>ue(V.target.value),onKeyDown:V=>{V.key==="Enter"&&Rt(),V.key==="Escape"&&(R(null),ue(""))},autoFocus:!0,className:"flex-1 bg-convex-dark border border-convex-border rounded px-2 py-1 text-sm focus:outline-none focus:border-convex-accent"}),s.jsx("button",{onClick:()=>Rt(),className:"p-1 text-green-400 hover:text-green-300",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]}):s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>nd(F),className:"flex-1 px-2 py-1 flex items-center gap-2 text-sm text-left overflow-hidden",children:[s.jsx("span",{className:`text-xs font-mono flex-shrink-0 ${fi[F.functionType]}`,children:F.functionType.charAt(0).toUpperCase()}),s.jsx("span",{className:"text-gray-400 truncate",children:F.name})]}),s.jsxs("div",{className:"pr-1 opacity-0 group-hover:opacity-100 flex items-center flex-shrink-0",children:[s.jsx("button",{onClick:()=>{R({collectionId:k.id,requestId:F.id}),ue(F.name)},className:"p-1 text-gray-500 hover:text-white",title:"Rename",children:s.jsx(hi,{})}),s.jsx("button",{onClick:()=>a(k.id,F.id),className:"p-1 text-gray-500 hover:text-red-400",title:"Delete",children:s.jsx(pi,{})})]})]})},F.id))})]},k.id)),di.collections.length===0&&!ke&&s.jsx("p",{className:"px-4 py-8 text-center text-sm text-gray-600",children:Te?s.jsxs(s.Fragment,{children:['No results found for "',Te,'"']}):s.jsxs(s.Fragment,{children:["No collections yet.",s.jsx("br",{}),"Create one to save your requests."]})})]}):s.jsxs("div",{className:"py-2",children:[s.jsx("div",{className:"px-3 pb-2",children:s.jsxs("div",{className:"panel-tabs rounded-lg p-1 w-full",children:[s.jsx("button",{onClick:()=>te("functions"),className:`flex-1 panel-tab-btn font-medium transition-colors ${S==="functions"?"bg-gray-300 dark:bg-convex-border text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-convex-border/50"}`,children:"Functions"}),s.jsx("button",{onClick:()=>te("queries"),className:`flex-1 panel-tab-btn font-medium transition-colors ${S==="queries"?"bg-gray-300 dark:bg-convex-border text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-convex-border/50"}`,children:"Schema"})]})}),S==="functions"&&Hl.length>0&&s.jsxs("button",{onClick:x,className:"w-full px-3 py-1.5 flex items-center gap-2 text-sm text-gray-400 hover:text-red-400 hover:bg-convex-border transition-colors",children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Clear History"]}),S==="queries"&&Wl.length>0&&s.jsxs("button",{onClick:m,className:"w-full px-3 py-1.5 flex items-center gap-2 text-sm text-gray-400 hover:text-red-400 hover:bg-convex-border transition-colors",children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Clear History"]}),S==="functions"&&Hl.map(k=>{var V;const F=!k.response.success||k.response.success&&k.response.result&&typeof k.response.result=="object"&&((V=k.response.result)==null?void 0:V.status)==="error";return s.jsxs("button",{onClick:()=>rd(k),className:"w-full px-3 py-2 hover:bg-convex-border transition-colors text-left text-sm",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:`text-xs font-mono font-semibold px-1.5 py-0.5 rounded flex-shrink-0 ${fi[k.functionType]} ${k.functionType==="query"?"bg-blue-900/30":k.functionType==="mutation"?"bg-orange-900/30":"bg-purple-900/30"}`,children:k.functionType.charAt(0).toUpperCase()}),s.jsx("span",{className:"text-gray-300 font-mono text-sm break-all",children:k.functionPath})]}),s.jsxs("div",{className:"flex items-center justify-between mt-1.5 pl-6",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx("span",{children:new Date(k.timestamp).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}),F?s.jsx("svg",{className:"w-4 h-4 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}):s.jsx("svg",{className:"w-4 h-4 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{onClick:ce=>{ce.stopPropagation(),od(k)},className:"p-1 text-gray-500 hover:text-blue-500 dark:hover:text-convex-accent rounded hover:bg-gray-200 dark:hover:bg-convex-border cursor-pointer",title:"Save to collection",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"})})}),s.jsx("span",{onClick:ce=>{ce.stopPropagation(),f(k.id)},className:"p-1 text-gray-500 hover:text-red-500 dark:hover:text-red-400 rounded hover:bg-gray-200 dark:hover:bg-convex-border cursor-pointer",title:"Delete",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})]},k.id)}),S==="queries"&&Wl.map(k=>{var V;const F=!k.response.success||k.response.success&&k.response.result&&typeof k.response.result=="object"&&((V=k.response.result)==null?void 0:V.status)==="error";return s.jsxs("button",{onClick:()=>ld(k),className:"w-full px-3 py-2 hover:bg-convex-border transition-colors text-left",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-xs font-mono font-semibold px-1.5 py-0.5 rounded flex-shrink-0 text-green-400 bg-green-900/30",children:"D"}),s.jsx("span",{className:"text-gray-300 font-mono text-sm break-all",children:k.table})]}),s.jsxs("div",{className:"flex items-center justify-between mt-1.5 pl-6",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[s.jsx("span",{children:new Date(k.timestamp).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}),F?s.jsx("svg",{className:"w-4 h-4 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}):s.jsx("svg",{className:"w-4 h-4 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),s.jsx("div",{className:"flex items-center gap-1",children:s.jsx("span",{onClick:ce=>{ce.stopPropagation(),h(k.id)},className:"p-1 text-gray-500 hover:text-red-500 dark:hover:text-red-400 rounded hover:bg-gray-200 dark:hover:bg-convex-border cursor-pointer",title:"Delete",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})})]})]},k.id)}),S==="functions"&&Hl.length===0&&n.length>0&&s.jsxs("p",{className:"px-4 py-8 text-center text-sm text-gray-600",children:['No results found for "',pe,'"']}),S==="functions"&&n.length===0&&s.jsxs("p",{className:"px-4 py-8 text-center text-sm text-gray-600",children:["No history yet.",s.jsx("br",{}),"Run some functions to see them here."]}),S==="queries"&&Wl.length===0&&r.length>0&&s.jsxs("p",{className:"px-4 py-8 text-center text-sm text-gray-600",children:['No results found for "',pe,'"']}),S==="queries"&&r.length===0&&s.jsxs("p",{className:"px-4 py-8 text-center text-sm text-gray-600",children:["No query history yet.",s.jsx("br",{}),"Run some schema queries to see them here."]})]})})]})}function Nh({onClose:e}){const{jwtToken:t,setJwtToken:n}=Pt(),{setSavedToken:r}=kr(),[l,o]=b.useState(t),[i,a]=b.useState(null),[u,f]=b.useState(null),v=y=>{if(!y){a(null),f(null);return}try{const j=y.split(".");if(j.length!==3){f("Invalid JWT format (should have 3 parts separated by dots)"),a(null);return}const d=JSON.parse(atob(j[1]));a(d),f(null)}catch{f("Failed to decode JWT"),a(null)}},x=y=>{o(y),v(y)},h=()=>{const y=l.trim();n(y),r(y)},m=()=>{o(""),n(""),r(""),a(null),f(null)},g=i!=null&&i.exp?i.exp*1e3<Date.now():!1;return s.jsxs("div",{className:"auth-panel w-96 border-l border-convex-border flex flex-col bg-convex-darker",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-convex-border",children:[s.jsxs("h2",{className:"font-semibold flex items-center gap-2",children:[s.jsx("svg",{className:"w-5 h-5 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),"Authentication"]}),s.jsx("button",{onClick:e,className:"p-1 text-gray-400 hover:text-white transition-colors",children:s.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),s.jsxs("div",{className:"p-4 bg-blue-900/20 border-b border-convex-border",children:[s.jsx("p",{className:"text-xs text-blue-300",children:"Paste a JWT token from your auth provider (Clerk, Auth0, etc.) to authenticate requests as that user."}),s.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:[s.jsx("strong",{children:"How to get your token (Clerk):"}),s.jsx("br",{}),"• Open your app in the browser console",s.jsx("br",{}),"• Run:"," ",s.jsxs("code",{className:"bg-convex-dark px-1 rounded",children:["await window.Clerk?.session?.getToken(",'{ template: "convex" }',")"]}),s.jsx("br",{}),"• Paste the returned JWT here"]}),s.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["For Convex Auth: use the"," ",s.jsx("code",{className:"bg-convex-dark px-1 rounded",children:"__convexAuthJWT_*"})," ","value from cookies/localStorage."]})]}),s.jsxs("div",{className:"flex-1 p-4 space-y-4 overflow-auto",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-gray-400 mb-2",children:"JWT Token"}),s.jsx("textarea",{value:l,onChange:y=>x(y.target.value),placeholder:"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",rows:6,className:"w-full bg-convex-dark border border-convex-border rounded px-3 py-2 text-sm font-mono focus:outline-none focus:border-convex-accent resize-none",spellCheck:!1})]}),l&&s.jsx("div",{className:`p-3 rounded border ${u?"bg-red-900/20 border-red-800":g?"bg-yellow-900/20 border-yellow-800":"bg-green-900/20 border-green-800"}`,children:u?s.jsx("p",{className:"text-xs text-red-400",children:u}):g?s.jsx("p",{className:"text-xs text-yellow-400",children:"⚠️ Token is expired! Get a fresh one from your app."}):s.jsx("p",{className:"text-xs text-green-400",children:"✓ Valid JWT token"})}),i&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-gray-400 mb-2",children:"Decoded Payload"}),s.jsx("div",{className:"bg-convex-dark border border-convex-border rounded p-3 max-h-48 overflow-auto",children:s.jsx("pre",{className:"text-xs text-gray-300 font-mono whitespace-pre-wrap",children:JSON.stringify(i,null,2)})}),i.sub?s.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Subject:"," ",s.jsx("span",{className:"text-gray-300",children:String(i.sub)})]}):null,i.exp?s.jsxs("p",{className:"text-xs text-gray-500",children:["Expires:"," ",s.jsx("span",{className:g?"text-red-400":"text-gray-300",children:new Date(i.exp*1e3).toLocaleString()})]}):null]}),s.jsxs("div",{className:"pt-4 border-t border-convex-border",children:[s.jsx("label",{className:"block text-xs text-gray-400 mb-2",children:"Current Auth Status"}),s.jsx("div",{className:`p-3 rounded ${t?"bg-green-900/20":"bg-gray-800"}`,children:t?s.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-400",children:[s.jsx("span",{className:"w-2 h-2 bg-green-400 rounded-full"}),"Authenticated"]}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[s.jsx("span",{className:"w-2 h-2 bg-gray-500 rounded-full"}),"No authentication"]})})]})]}),s.jsxs("div",{className:"p-4 border-t border-convex-border space-y-2",children:[s.jsx("button",{onClick:h,disabled:!l||!!u,className:`w-full py-2 rounded text-sm font-medium transition-colors ${!l||u?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-green-600 hover:bg-green-700 text-white"}`,children:"Apply Token"}),s.jsx("button",{onClick:m,className:"w-full py-2 bg-convex-border hover:bg-gray-600 rounded text-sm transition-colors",children:"Clear (No Auth)"})]})]})}function Ch(){const[e,t]=b.useState(!1),[n,r]=b.useState(!0),[l,o]=b.useState("functions"),[i,a]=b.useState(360),[u,f]=b.useState(!1),[v,x]=b.useState(""),[h,m]=b.useState(""),[g,y]=b.useState(()=>typeof window<"u"&&localStorage.getItem("theme")||"system"),{connect:j,isConnected:d,schema:c,error:p}=ui(),{selectedFunction:w,setSelectedFunction:T,jwtToken:L,setJwtToken:_,setProjectName:O}=Pt(),{selectedTable:A,setSelectedTable:D}=Bl(),{loadFromStorage:S,loadSavedToken:te}=kr(),[B,se]=b.useState(()=>typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!0);b.useEffect(()=>{const E=window.matchMedia("(prefers-color-scheme: dark)"),M=C=>{se(C.matches)};return E.addEventListener("change",M),()=>E.removeEventListener("change",M)},[]),b.useEffect(()=>{if(!u)return;const E=C=>{const R=Math.min(640,Math.max(220,C.clientY-56));a(R)},M=()=>f(!1);return window.addEventListener("mousemove",E),window.addEventListener("mouseup",M),()=>{window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",M)}},[u]);const H=g==="system"?B?"dark":"light":g;b.useEffect(()=>{j(),S();const E=te();E&&!L&&_(E),fetch("/api/health").then(M=>M.json()).then(M=>{M.convexUrl&&x(M.convexUrl),M.projectName&&(m(M.projectName),O(M.projectName))}).catch(()=>{})},[j,S,te,_,L]),b.useEffect(()=>{w&&o("functions")},[w]),b.useEffect(()=>{const E=()=>{document.visibilityState==="visible"&&(console.log("[DevTools] Tab visible, reloading persistence..."),S())},M=()=>{console.log("[DevTools] Window focused, reloading persistence..."),S()};return document.addEventListener("visibilitychange",E),window.addEventListener("focus",M),()=>{document.removeEventListener("visibilitychange",E),window.removeEventListener("focus",M)}},[S]),b.useEffect(()=>{H==="light"?document.documentElement.classList.add("light"):document.documentElement.classList.remove("light");try{localStorage.setItem("theme",g)}catch{}},[H,g]);const le=v?new URL(v).hostname.replace(".convex.cloud",""):"",ke=v!=null&&v.includes("convex.cloud")?"Development (Cloud)":"Development (Local)";return s.jsxs("div",{className:"h-screen flex flex-col bg-convex-dark text-white",children:[s.jsxs("header",{className:"h-14 border-b border-convex-border flex items-center justify-between px-4 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-convex-accent rounded-lg flex items-center justify-center",children:s.jsx("span",{className:"text-white font-bold text-sm",children:"C"})}),s.jsx("h1",{className:"text-lg font-semibold",children:"Convex DevTools"}),s.jsx("span",{className:"text-xs px-2 py-0.5 bg-convex-border rounded text-gray-400",children:"v1.1.0"}),s.jsxs("span",{className:"ml-2 text-xs px-3 py-1 rounded-full border border-convex-border text-gray-300 bg-convex-darker flex items-center gap-2",children:[s.jsx("svg",{className:"w-4 h-4 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:s.jsx("circle",{cx:"12",cy:"12",r:"10",strokeWidth:"2"})}),h?`${h} • `:"",ke," • ",le||"loading..."]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[d?s.jsxs("span",{className:"flex items-center gap-2 text-sm text-green-400",children:[s.jsx("span",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),"Connected"]}):p?s.jsxs("span",{className:"flex items-center gap-2 text-sm text-red-400",children:[s.jsx("span",{className:"w-2 h-2 bg-red-400 rounded-full"}),p]}):s.jsxs("span",{className:"flex items-center gap-2 text-sm text-yellow-400",children:[s.jsx("span",{className:"w-2 h-2 bg-yellow-400 rounded-full animate-pulse"}),"Connecting..."]}),s.jsx("button",{onClick:()=>{y(g==="system"?"light":g==="light"?"dark":"system")},className:"p-2 rounded hover:bg-convex-border transition-colors text-gray-400",title:`Theme: ${g} (click to change)`,children:g==="system"?s.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:[s.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",strokeWidth:2}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 21h8M12 17v4"})]}):H==="light"?s.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"})}):s.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:[s.jsx("circle",{cx:"12",cy:"12",r:"5",strokeWidth:2}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]})}),s.jsx("button",{onClick:()=>r(!n),className:`p-2 rounded hover:bg-convex-border transition-colors ${n?"text-convex-accent":"text-gray-400"}`,title:"Toggle Collections",children:s.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),s.jsx("button",{onClick:()=>t(!e),className:`p-2 rounded hover:bg-convex-border transition-colors ${e?"text-convex-accent":L?"text-green-400":"text-gray-400"}`,title:L?"Authenticated (click to manage)":"Authentication",children:s.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})})]})]}),s.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[n&&s.jsx(Sh,{onClose:()=>r(!1)}),s.jsxs("div",{className:"w-72 border-r border-convex-border flex-shrink-0 overflow-auto flex flex-col",children:[s.jsxs("div",{className:"panel-tabs border-b border-convex-border",children:[s.jsx("button",{onClick:()=>o("functions"),className:`flex-1 panel-tab-btn transition-colors ${l==="functions"?"bg-convex-accent text-white":"text-gray-400 hover:bg-convex-border"}`,children:"Functions"}),s.jsx("button",{onClick:()=>o("data"),className:`flex-1 panel-tab-btn transition-colors ${l==="data"?"bg-convex-accent text-white":"text-gray-400 hover:bg-convex-border"}`,children:"Schema"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:l==="functions"?s.jsx(Ip,{schema:c,selectedFunction:w,onSelectFunction:T}):s.jsx(Rp,{schema:c,selectedTable:A,onSelectTable:D})})]}),s.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:l==="functions"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-1/2 border-b border-convex-border overflow-auto",children:s.jsx(fh,{})}),s.jsx("div",{className:"h-1/2 overflow-auto",children:s.jsx(ph,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"border-b border-convex-border overflow-auto",style:{height:i},children:s.jsx(yh,{})}),s.jsx("div",{className:"h-1.5 cursor-row-resize bg-transparent hover:bg-convex-border/40",onMouseDown:()=>f(!0)}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx(jh,{})})]})}),e&&s.jsx(Nh,{onClose:()=>t(!1)})]})]})}jo.createRoot(document.getElementById("root")).render(s.jsx(Ba.StrictMode,{children:s.jsx(Ch,{})}));
|