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
|
@@ -0,0 +1,62 @@
|
|
|
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 Ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xa={exports:{}},Ql={},Za={exports:{}},H={};/**
|
|
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 zr=Symbol.for("react.element"),Nd=Symbol.for("react.portal"),Cd=Symbol.for("react.fragment"),Ed=Symbol.for("react.strict_mode"),Td=Symbol.for("react.profiler"),bd=Symbol.for("react.provider"),Ld=Symbol.for("react.context"),_d=Symbol.for("react.forward_ref"),Pd=Symbol.for("react.suspense"),Md=Symbol.for("react.memo"),Od=Symbol.for("react.lazy"),zi=Symbol.iterator;function Id(e){return e===null||typeof e!="object"?null:(e=zi&&e[zi]||e["@@iterator"],typeof e=="function"?e:null)}var eu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tu=Object.assign,nu={};function Qn(e,t,n){this.props=e,this.context=t,this.refs=nu,this.updater=n||eu}Qn.prototype.isReactComponent={};Qn.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")};Qn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ru(){}ru.prototype=Qn.prototype;function zs(e,t,n){this.props=e,this.context=t,this.refs=nu,this.updater=n||eu}var Ds=zs.prototype=new ru;Ds.constructor=zs;tu(Ds,Qn.prototype);Ds.isPureReactComponent=!0;var Di=Array.isArray,lu=Object.prototype.hasOwnProperty,Fs={current:null},ou={key:!0,ref:!0,__self:!0,__source:!0};function su(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)lu.call(t,r)&&!ou.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),d=0;d<a;d++)u[d]=arguments[d+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:zr,type:e,key:o,ref:i,props:l,_owner:Fs.current}}function Rd(e,t){return{$$typeof:zr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function As(e){return typeof e=="object"&&e!==null&&e.$$typeof===zr}function zd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fi=/\/+/g;function fo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zd(""+e.key):t.toString(36)}function cl(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 zr:case Nd:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+fo(i,0):r,Di(l)?(n="",e!=null&&(n=e.replace(Fi,"$&/")+"/"),cl(l,t,n,"",function(d){return d})):l!=null&&(As(l)&&(l=Rd(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(Fi,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",Di(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+fo(o,a);i+=cl(o,t,n,u,l)}else if(u=Id(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+fo(o,a++),i+=cl(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 Jr(e,t,n){if(e==null)return e;var r=[],l=0;return cl(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Dd(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 be={current:null},dl={transition:null},Fd={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:dl,ReactCurrentOwner:Fs};function iu(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Jr,forEach:function(e,t,n){Jr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Jr(e,function(){t++}),t},toArray:function(e){return Jr(e,function(t){return t})||[]},only:function(e){if(!As(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=Qn;H.Fragment=Cd;H.Profiler=Td;H.PureComponent=zs;H.StrictMode=Ed;H.Suspense=Pd;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fd;H.act=iu;H.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=tu({},e.props),l=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Fs.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)lu.call(t,u)&&!ou.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 d=0;d<u;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:zr,type:e.type,key:l,ref:o,props:r,_owner:i}};H.createContext=function(e){return e={$$typeof:Ld,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:bd,_context:e},e.Consumer=e};H.createElement=su;H.createFactory=function(e){var t=su.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:_d,render:e}};H.isValidElement=As;H.lazy=function(e){return{$$typeof:Od,_payload:{_status:-1,_result:e},_init:Dd}};H.memo=function(e,t){return{$$typeof:Md,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=dl.transition;dl.transition={};try{e()}finally{dl.transition=t}};H.unstable_act=iu;H.useCallback=function(e,t){return be.current.useCallback(e,t)};H.useContext=function(e){return be.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return be.current.useDeferredValue(e)};H.useEffect=function(e,t){return be.current.useEffect(e,t)};H.useId=function(){return be.current.useId()};H.useImperativeHandle=function(e,t,n){return be.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return be.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return be.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return be.current.useMemo(e,t)};H.useReducer=function(e,t,n){return be.current.useReducer(e,t,n)};H.useRef=function(e){return be.current.useRef(e)};H.useState=function(e){return be.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return be.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return be.current.useTransition()};H.version="18.3.1";Za.exports=H;var E=Za.exports;const au=Ga(E);/**
|
|
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 Ad=E,Wd=Symbol.for("react.element"),$d=Symbol.for("react.fragment"),Ud=Object.prototype.hasOwnProperty,Hd=Ad.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bd={key:!0,ref:!0,__self:!0,__source:!0};function uu(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)Ud.call(t,r)&&!Bd.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:Wd,type:e,key:o,ref:i,props:l,_owner:Hd.current}}Ql.Fragment=$d;Ql.jsx=uu;Ql.jsxs=uu;Xa.exports=Ql;var s=Xa.exports,Ho={},cu={exports:{}},Be={},du={exports:{}},fu={};/**
|
|
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(C,O){var z=C.length;C.push(O);e:for(;0<z;){var $=z-1>>>1,K=C[$];if(0<l(K,O))C[$]=O,C[z]=K,z=$;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var O=C[0],z=C.pop();if(z!==O){C[0]=z;e:for(var $=0,K=C.length,R=K>>>1;$<R;){var B=2*($+1)-1,V=C[B],ue=B+1,de=C[ue];if(0>l(V,z))ue<K&&0>l(de,V)?(C[$]=de,C[ue]=z,$=ue):(C[$]=V,C[B]=z,$=B);else if(ue<K&&0>l(de,z))C[$]=de,C[ue]=z,$=ue;else break e}}return O}function l(C,O){var z=C.sortIndex-O.sortIndex;return z!==0?z:C.id-O.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=[],d=[],x=1,v=null,h=3,g=!1,y=!1,m=!1,P=typeof setTimeout=="function"?setTimeout:null,f=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(C){for(var O=n(d);O!==null;){if(O.callback===null)r(d);else if(O.startTime<=C)r(d),O.sortIndex=O.expirationTime,t(u,O);else break;O=n(d)}}function k(C){if(m=!1,p(C),!y)if(n(u)!==null)y=!0,X(T);else{var O=n(d);O!==null&&_e(k,O.startTime-C)}}function T(C,O){y=!1,m&&(m=!1,f(I),I=-1),g=!0;var z=h;try{for(p(O),v=n(u);v!==null&&(!(v.expirationTime>O)||C&&!S());){var $=v.callback;if(typeof $=="function"){v.callback=null,h=v.priorityLevel;var K=$(v.expirationTime<=O);O=e.unstable_now(),typeof K=="function"?v.callback=K:v===n(u)&&r(u),p(O)}else r(u);v=n(u)}if(v!==null)var R=!0;else{var B=n(d);B!==null&&_e(k,B.startTime-O),R=!1}return R}finally{v=null,h=z,g=!1}}var L=!1,_=null,I=-1,W=5,D=-1;function S(){return!(e.unstable_now()-D<W)}function q(){if(_!==null){var C=e.unstable_now();D=C;var O=!0;try{O=_(!0,C)}finally{O?G():(L=!1,_=null)}}else L=!1}var G;if(typeof c=="function")G=function(){c(q)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,J=ge.port2;ge.port1.onmessage=q,G=function(){J.postMessage(null)}}else G=function(){P(q,0)};function X(C){_=C,L||(L=!0,G())}function _e(C,O){I=P(function(){C(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,X(T))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var z=h;h=O;try{return C()}finally{h=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,O){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var z=h;h=C;try{return O()}finally{h=z}},e.unstable_scheduleCallback=function(C,O,z){var $=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?$+z:$):z=$,C){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=z+K,C={id:x++,callback:O,priorityLevel:C,startTime:z,expirationTime:K,sortIndex:-1},z>$?(C.sortIndex=z,t(d,C),n(u)===null&&C===n(d)&&(m?(f(I),I=-1):m=!0,_e(k,z-$))):(C.sortIndex=K,t(u,C),y||g||(y=!0,X(T))),C},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(C){var O=h;return function(){var z=h;h=O;try{return C.apply(this,arguments)}finally{h=z}}}})(fu);du.exports=fu;var Vd=du.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 Qd=E,He=Vd;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 pu=new Set,yr={};function cn(e,t){Fn(e,t),Fn(e+"Capture",t)}function Fn(e,t){for(yr[e]=t,e=0;e<t.length;e++)pu.add(t[e])}var yt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bo=Object.prototype.hasOwnProperty,Jd=/^[: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]*$/,Ai={},Wi={};function qd(e){return Bo.call(Wi,e)?!0:Bo.call(Ai,e)?!1:Jd.test(e)?Wi[e]=!0:(Ai[e]=!0,!1)}function Kd(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 Yd(e,t,n,r){if(t===null||typeof t>"u"||Kd(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 Le(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 ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Le(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Le(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Le(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Le(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){ke[e]=new Le(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Le(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Le(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Le(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Le(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ws=/[\-:]([a-z])/g;function $s(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(Ws,$s);ke[t]=new Le(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(Ws,$s);ke[t]=new Le(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(Ws,$s);ke[t]=new Le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Le(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Le(e,1,!1,e.toLowerCase(),null,!0,!0)});function Us(e,t,n,r){var l=ke.hasOwnProperty(t)?ke[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Yd(t,n,l,r)&&(n=null),r||l===null?qd(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 St=Qd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qr=Symbol.for("react.element"),wn=Symbol.for("react.portal"),kn=Symbol.for("react.fragment"),Hs=Symbol.for("react.strict_mode"),Vo=Symbol.for("react.profiler"),hu=Symbol.for("react.provider"),mu=Symbol.for("react.context"),Bs=Symbol.for("react.forward_ref"),Qo=Symbol.for("react.suspense"),Jo=Symbol.for("react.suspense_list"),Vs=Symbol.for("react.memo"),Tt=Symbol.for("react.lazy"),xu=Symbol.for("react.offscreen"),$i=Symbol.iterator;function Xn(e){return e===null||typeof e!="object"?null:(e=$i&&e[$i]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Object.assign,po;function sr(e){if(po===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);po=t&&t[1]||""}return`
|
|
34
|
+
`+po+e}var ho=!1;function mo(e,t){if(!e||ho)return"";ho=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var l=d.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{ho=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?sr(e):""}function Gd(e){switch(e.tag){case 5:return sr(e.type);case 16:return sr("Lazy");case 13:return sr("Suspense");case 19:return sr("SuspenseList");case 0:case 2:case 15:return e=mo(e.type,!1),e;case 11:return e=mo(e.type.render,!1),e;case 1:return e=mo(e.type,!0),e;default:return""}}function qo(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 kn:return"Fragment";case wn:return"Portal";case Vo:return"Profiler";case Hs:return"StrictMode";case Qo:return"Suspense";case Jo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mu:return(e.displayName||"Context")+".Consumer";case hu:return(e._context.displayName||"Context")+".Provider";case Bs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vs:return t=e.displayName||null,t!==null?t:qo(e.type)||"Memo";case Tt:t=e._payload,e=e._init;try{return qo(e(t))}catch{}}return null}function Xd(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 qo(t);case 8:return t===Hs?"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 vu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zd(e){var t=vu(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 Kr(e){e._valueTracker||(e._valueTracker=Zd(e))}function gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function jl(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 Ko(e,t){var n=t.checked;return ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ui(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 yu(e,t){t=t.checked,t!=null&&Us(e,"checked",t,!1)}function Yo(e,t){yu(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")?Go(e,t.type,n):t.hasOwnProperty("defaultValue")&&Go(e,t.type,$t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hi(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 Go(e,t,n){(t!=="number"||jl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ir=Array.isArray;function Mn(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 Xo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return ie({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bi(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(ir(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 wu(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 Vi(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ku(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 Zo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ku(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yr,ju=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(Yr=Yr||document.createElement("div"),Yr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cr={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},ef=["Webkit","ms","Moz","O"];Object.keys(cr).forEach(function(e){ef.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cr[t]=cr[e]})});function Su(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cr.hasOwnProperty(e)&&cr[e]?(""+t).trim():t+"px"}function Nu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Su(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var tf=ie({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 es(e,t){if(t){if(tf[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 ts(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 ns=null;function Qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rs=null,On=null,In=null;function Qi(e){if(e=Ar(e)){if(typeof rs!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Gl(t),rs(e.stateNode,e.type,t))}}function Cu(e){On?In?In.push(e):In=[e]:On=e}function Eu(){if(On){var e=On,t=In;if(In=On=null,Qi(e),t)for(e=0;e<t.length;e++)Qi(t[e])}}function Tu(e,t){return e(t)}function bu(){}var xo=!1;function Lu(e,t,n){if(xo)return e(t,n);xo=!0;try{return Tu(e,t,n)}finally{xo=!1,(On!==null||In!==null)&&(bu(),Eu())}}function kr(e,t){var n=e.stateNode;if(n===null)return null;var r=Gl(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 ls=!1;if(yt)try{var Zn={};Object.defineProperty(Zn,"passive",{get:function(){ls=!0}}),window.addEventListener("test",Zn,Zn),window.removeEventListener("test",Zn,Zn)}catch{ls=!1}function nf(e,t,n,r,l,o,i,a,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(x){this.onError(x)}}var dr=!1,Sl=null,Nl=!1,os=null,rf={onError:function(e){dr=!0,Sl=e}};function lf(e,t,n,r,l,o,i,a,u){dr=!1,Sl=null,nf.apply(rf,arguments)}function of(e,t,n,r,l,o,i,a,u){if(lf.apply(this,arguments),dr){if(dr){var d=Sl;dr=!1,Sl=null}else throw Error(N(198));Nl||(Nl=!0,os=d)}}function dn(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 _u(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 Ji(e){if(dn(e)!==e)throw Error(N(188))}function sf(e){var t=e.alternate;if(!t){if(t=dn(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 Ji(l),e;if(o===r)return Ji(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 Pu(e){return e=sf(e),e!==null?Mu(e):null}function Mu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Mu(e);if(t!==null)return t;e=e.sibling}return null}var Ou=He.unstable_scheduleCallback,qi=He.unstable_cancelCallback,af=He.unstable_shouldYield,uf=He.unstable_requestPaint,ce=He.unstable_now,cf=He.unstable_getCurrentPriorityLevel,Js=He.unstable_ImmediatePriority,Iu=He.unstable_UserBlockingPriority,Cl=He.unstable_NormalPriority,df=He.unstable_LowPriority,Ru=He.unstable_IdlePriority,Jl=null,ut=null;function ff(e){if(ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Jl,e,void 0,(e.current.flags&128)===128)}catch{}}var rt=Math.clz32?Math.clz32:mf,pf=Math.log,hf=Math.LN2;function mf(e){return e>>>=0,e===0?32:31-(pf(e)/hf|0)|0}var Gr=64,Xr=4194304;function ar(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 El(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=ar(a):(o&=i,o!==0&&(r=ar(o)))}else i=n&~l,i!==0?r=ar(i):o!==0&&(r=ar(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-rt(t),l=1<<n,r|=e[n],t&=~l;return r}function xf(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 vf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-rt(o),a=1<<i,u=l[i];u===-1?(!(a&n)||a&r)&&(l[i]=xf(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function ss(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function zu(){var e=Gr;return Gr<<=1,!(Gr&4194240)&&(Gr=64),e}function vo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Dr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rt(t),e[t]=n}function gf(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-rt(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function qs(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var Y=0;function Du(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Fu,Ks,Au,Wu,$u,is=!1,Zr=[],Ot=null,It=null,Rt=null,jr=new Map,Sr=new Map,Lt=[],yf="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 Ki(e,t){switch(e){case"focusin":case"focusout":Ot=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":jr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sr.delete(t.pointerId)}}function er(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=Ar(t),t!==null&&Ks(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function wf(e,t,n,r,l){switch(t){case"focusin":return Ot=er(Ot,e,t,n,r,l),!0;case"dragenter":return It=er(It,e,t,n,r,l),!0;case"mouseover":return Rt=er(Rt,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return jr.set(o,er(jr.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,Sr.set(o,er(Sr.get(o)||null,e,t,n,r,l)),!0}return!1}function Uu(e){var t=Xt(e.target);if(t!==null){var n=dn(t);if(n!==null){if(t=n.tag,t===13){if(t=_u(n),t!==null){e.blockedOn=t,$u(e.priority,function(){Au(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 fl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=as(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ns=r,n.target.dispatchEvent(r),ns=null}else return t=Ar(n),t!==null&&Ks(t),e.blockedOn=n,!1;t.shift()}return!0}function Yi(e,t,n){fl(e)&&n.delete(t)}function kf(){is=!1,Ot!==null&&fl(Ot)&&(Ot=null),It!==null&&fl(It)&&(It=null),Rt!==null&&fl(Rt)&&(Rt=null),jr.forEach(Yi),Sr.forEach(Yi)}function tr(e,t){e.blockedOn===t&&(e.blockedOn=null,is||(is=!0,He.unstable_scheduleCallback(He.unstable_NormalPriority,kf)))}function Nr(e){function t(l){return tr(l,e)}if(0<Zr.length){tr(Zr[0],e);for(var n=1;n<Zr.length;n++){var r=Zr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ot!==null&&tr(Ot,e),It!==null&&tr(It,e),Rt!==null&&tr(Rt,e),jr.forEach(t),Sr.forEach(t),n=0;n<Lt.length;n++)r=Lt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lt.length&&(n=Lt[0],n.blockedOn===null);)Uu(n),n.blockedOn===null&&Lt.shift()}var Rn=St.ReactCurrentBatchConfig,Tl=!0;function jf(e,t,n,r){var l=Y,o=Rn.transition;Rn.transition=null;try{Y=1,Ys(e,t,n,r)}finally{Y=l,Rn.transition=o}}function Sf(e,t,n,r){var l=Y,o=Rn.transition;Rn.transition=null;try{Y=4,Ys(e,t,n,r)}finally{Y=l,Rn.transition=o}}function Ys(e,t,n,r){if(Tl){var l=as(e,t,n,r);if(l===null)To(e,t,r,bl,n),Ki(e,r);else if(wf(l,e,t,n,r))r.stopPropagation();else if(Ki(e,r),t&4&&-1<yf.indexOf(e)){for(;l!==null;){var o=Ar(l);if(o!==null&&Fu(o),o=as(e,t,n,r),o===null&&To(e,t,r,bl,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else To(e,t,r,null,n)}}var bl=null;function as(e,t,n,r){if(bl=null,e=Qs(r),e=Xt(e),e!==null)if(t=dn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=_u(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 bl=e,null}function Hu(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(cf()){case Js:return 1;case Iu:return 4;case Cl:case df:return 16;case Ru:return 536870912;default:return 16}default:return 16}}var Pt=null,Gs=null,pl=null;function Bu(){if(pl)return pl;var e,t=Gs,n=t.length,r,l="value"in Pt?Pt.value:Pt.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 pl=l.slice(e,1<r?1-r:void 0)}function hl(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 el(){return!0}function Gi(){return!1}function Ve(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)?el:Gi,this.isPropagationStopped=Gi,this}return ie(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=el)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=el)},persist:function(){},isPersistent:el}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xs=Ve(Jn),Fr=ie({},Jn,{view:0,detail:0}),Nf=Ve(Fr),go,yo,nr,ql=ie({},Fr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zs,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!==nr&&(nr&&e.type==="mousemove"?(go=e.screenX-nr.screenX,yo=e.screenY-nr.screenY):yo=go=0,nr=e),go)},movementY:function(e){return"movementY"in e?e.movementY:yo}}),Xi=Ve(ql),Cf=ie({},ql,{dataTransfer:0}),Ef=Ve(Cf),Tf=ie({},Fr,{relatedTarget:0}),wo=Ve(Tf),bf=ie({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),Lf=Ve(bf),_f=ie({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pf=Ve(_f),Mf=ie({},Jn,{data:0}),Zi=Ve(Mf),Of={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},If={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"},Rf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rf[e])?!!t[e]:!1}function Zs(){return zf}var Df=ie({},Fr,{key:function(e){if(e.key){var t=Of[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?If[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zs,charCode:function(e){return e.type==="keypress"?hl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ff=Ve(Df),Af=ie({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ea=Ve(Af),Wf=ie({},Fr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zs}),$f=Ve(Wf),Uf=ie({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hf=Ve(Uf),Bf=ie({},ql,{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}),Vf=Ve(Bf),Qf=[9,13,27,32],ei=yt&&"CompositionEvent"in window,fr=null;yt&&"documentMode"in document&&(fr=document.documentMode);var Jf=yt&&"TextEvent"in window&&!fr,Vu=yt&&(!ei||fr&&8<fr&&11>=fr),ta=" ",na=!1;function Qu(e,t){switch(e){case"keyup":return Qf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ju(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jn=!1;function qf(e,t){switch(e){case"compositionend":return Ju(t);case"keypress":return t.which!==32?null:(na=!0,ta);case"textInput":return e=t.data,e===ta&&na?null:e;default:return null}}function Kf(e,t){if(jn)return e==="compositionend"||!ei&&Qu(e,t)?(e=Bu(),pl=Gs=Pt=null,jn=!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 Vu&&t.locale!=="ko"?null:t.data;default:return null}}var Yf={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 ra(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yf[e.type]:t==="textarea"}function qu(e,t,n,r){Cu(r),t=Ll(t,"onChange"),0<t.length&&(n=new Xs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var pr=null,Cr=null;function Gf(e){oc(e,0)}function Kl(e){var t=Cn(e);if(gu(t))return e}function Xf(e,t){if(e==="change")return t}var Ku=!1;if(yt){var ko;if(yt){var jo="oninput"in document;if(!jo){var la=document.createElement("div");la.setAttribute("oninput","return;"),jo=typeof la.oninput=="function"}ko=jo}else ko=!1;Ku=ko&&(!document.documentMode||9<document.documentMode)}function oa(){pr&&(pr.detachEvent("onpropertychange",Yu),Cr=pr=null)}function Yu(e){if(e.propertyName==="value"&&Kl(Cr)){var t=[];qu(t,Cr,e,Qs(e)),Lu(Gf,t)}}function Zf(e,t,n){e==="focusin"?(oa(),pr=t,Cr=n,pr.attachEvent("onpropertychange",Yu)):e==="focusout"&&oa()}function ep(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kl(Cr)}function tp(e,t){if(e==="click")return Kl(t)}function np(e,t){if(e==="input"||e==="change")return Kl(t)}function rp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:rp;function Er(e,t){if(ot(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(!Bo.call(t,l)||!ot(e[l],t[l]))return!1}return!0}function sa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ia(e,t){var n=sa(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=sa(n)}}function Gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xu(){for(var e=window,t=jl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=jl(e.document)}return t}function ti(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 lp(e){var t=Xu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gu(n.ownerDocument.documentElement,n)){if(r!==null&&ti(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=ia(n,o);var i=ia(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 op=yt&&"documentMode"in document&&11>=document.documentMode,Sn=null,us=null,hr=null,cs=!1;function aa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cs||Sn==null||Sn!==jl(r)||(r=Sn,"selectionStart"in r&&ti(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}),hr&&Er(hr,r)||(hr=r,r=Ll(us,"onSelect"),0<r.length&&(t=new Xs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Sn)))}function tl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Nn={animationend:tl("Animation","AnimationEnd"),animationiteration:tl("Animation","AnimationIteration"),animationstart:tl("Animation","AnimationStart"),transitionend:tl("Transition","TransitionEnd")},So={},Zu={};yt&&(Zu=document.createElement("div").style,"AnimationEvent"in window||(delete Nn.animationend.animation,delete Nn.animationiteration.animation,delete Nn.animationstart.animation),"TransitionEvent"in window||delete Nn.transitionend.transition);function Yl(e){if(So[e])return So[e];if(!Nn[e])return e;var t=Nn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zu)return So[e]=t[n];return e}var ec=Yl("animationend"),tc=Yl("animationiteration"),nc=Yl("animationstart"),rc=Yl("transitionend"),lc=new Map,ua="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 Ht(e,t){lc.set(e,t),cn(t,[e])}for(var No=0;No<ua.length;No++){var Co=ua[No],sp=Co.toLowerCase(),ip=Co[0].toUpperCase()+Co.slice(1);Ht(sp,"on"+ip)}Ht(ec,"onAnimationEnd");Ht(tc,"onAnimationIteration");Ht(nc,"onAnimationStart");Ht("dblclick","onDoubleClick");Ht("focusin","onFocus");Ht("focusout","onBlur");Ht(rc,"onTransitionEnd");Fn("onMouseEnter",["mouseout","mouseover"]);Fn("onMouseLeave",["mouseout","mouseover"]);Fn("onPointerEnter",["pointerout","pointerover"]);Fn("onPointerLeave",["pointerout","pointerover"]);cn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cn("onBeforeInput",["compositionend","keypress","textInput","paste"]);cn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ur="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(" "),ap=new Set("cancel close invalid load scroll toggle".split(" ").concat(ur));function ca(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,of(r,t,void 0,e),e.currentTarget=null}function oc(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,d=a.currentTarget;if(a=a.listener,u!==o&&l.isPropagationStopped())break e;ca(l,a,d),o=u}else for(i=0;i<r.length;i++){if(a=r[i],u=a.instance,d=a.currentTarget,a=a.listener,u!==o&&l.isPropagationStopped())break e;ca(l,a,d),o=u}}}if(Nl)throw e=os,Nl=!1,os=null,e}function ee(e,t){var n=t[ms];n===void 0&&(n=t[ms]=new Set);var r=e+"__bubble";n.has(r)||(sc(t,e,2,!1),n.add(r))}function Eo(e,t,n){var r=0;t&&(r|=4),sc(n,e,r,t)}var nl="_reactListening"+Math.random().toString(36).slice(2);function Tr(e){if(!e[nl]){e[nl]=!0,pu.forEach(function(n){n!=="selectionchange"&&(ap.has(n)||Eo(n,!1,e),Eo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[nl]||(t[nl]=!0,Eo("selectionchange",!1,t))}}function sc(e,t,n,r){switch(Hu(t)){case 1:var l=jf;break;case 4:l=Sf;break;default:l=Ys}n=l.bind(null,t,n,e),l=void 0,!ls||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 To(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=Xt(a),i===null)return;if(u=i.tag,u===5||u===6){r=o=i;continue e}a=a.parentNode}}r=r.return}Lu(function(){var d=o,x=Qs(n),v=[];e:{var h=lc.get(e);if(h!==void 0){var g=Xs,y=e;switch(e){case"keypress":if(hl(n)===0)break e;case"keydown":case"keyup":g=Ff;break;case"focusin":y="focus",g=wo;break;case"focusout":y="blur",g=wo;break;case"beforeblur":case"afterblur":g=wo;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":g=Xi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Ef;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=$f;break;case ec:case tc:case nc:g=Lf;break;case rc:g=Hf;break;case"scroll":g=Nf;break;case"wheel":g=Vf;break;case"copy":case"cut":case"paste":g=Pf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=ea}var m=(t&4)!==0,P=!m&&e==="scroll",f=m?h!==null?h+"Capture":null:h;m=[];for(var c=d,p;c!==null;){p=c;var k=p.stateNode;if(p.tag===5&&k!==null&&(p=k,f!==null&&(k=kr(c,f),k!=null&&m.push(br(c,k,p)))),P)break;c=c.return}0<m.length&&(h=new g(h,y,null,n,x),v.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&n!==ns&&(y=n.relatedTarget||n.fromElement)&&(Xt(y)||y[wt]))break e;if((g||h)&&(h=x.window===x?x:(h=x.ownerDocument)?h.defaultView||h.parentWindow:window,g?(y=n.relatedTarget||n.toElement,g=d,y=y?Xt(y):null,y!==null&&(P=dn(y),y!==P||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=d),g!==y)){if(m=Xi,k="onMouseLeave",f="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(m=ea,k="onPointerLeave",f="onPointerEnter",c="pointer"),P=g==null?h:Cn(g),p=y==null?h:Cn(y),h=new m(k,c+"leave",g,n,x),h.target=P,h.relatedTarget=p,k=null,Xt(x)===d&&(m=new m(f,c+"enter",y,n,x),m.target=p,m.relatedTarget=P,k=m),P=k,g&&y)t:{for(m=g,f=y,c=0,p=m;p;p=vn(p))c++;for(p=0,k=f;k;k=vn(k))p++;for(;0<c-p;)m=vn(m),c--;for(;0<p-c;)f=vn(f),p--;for(;c--;){if(m===f||f!==null&&m===f.alternate)break t;m=vn(m),f=vn(f)}m=null}else m=null;g!==null&&da(v,h,g,m,!1),y!==null&&P!==null&&da(v,P,y,m,!0)}}e:{if(h=d?Cn(d):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var T=Xf;else if(ra(h))if(Ku)T=np;else{T=ep;var L=Zf}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=tp);if(T&&(T=T(e,d))){qu(v,T,n,x);break e}L&&L(e,h,d),e==="focusout"&&(L=h._wrapperState)&&L.controlled&&h.type==="number"&&Go(h,"number",h.value)}switch(L=d?Cn(d):window,e){case"focusin":(ra(L)||L.contentEditable==="true")&&(Sn=L,us=d,hr=null);break;case"focusout":hr=us=Sn=null;break;case"mousedown":cs=!0;break;case"contextmenu":case"mouseup":case"dragend":cs=!1,aa(v,n,x);break;case"selectionchange":if(op)break;case"keydown":case"keyup":aa(v,n,x)}var _;if(ei)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else jn?Qu(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(Vu&&n.locale!=="ko"&&(jn||I!=="onCompositionStart"?I==="onCompositionEnd"&&jn&&(_=Bu()):(Pt=x,Gs="value"in Pt?Pt.value:Pt.textContent,jn=!0)),L=Ll(d,I),0<L.length&&(I=new Zi(I,e,null,n,x),v.push({event:I,listeners:L}),_?I.data=_:(_=Ju(n),_!==null&&(I.data=_)))),(_=Jf?qf(e,n):Kf(e,n))&&(d=Ll(d,"onBeforeInput"),0<d.length&&(x=new Zi("onBeforeInput","beforeinput",null,n,x),v.push({event:x,listeners:d}),x.data=_))}oc(v,t)})}function br(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ll(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=kr(e,n),o!=null&&r.unshift(br(e,o,l)),o=kr(e,t),o!=null&&r.push(br(e,o,l))),e=e.return}return r}function vn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function da(e,t,n,r,l){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,u=a.alternate,d=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&d!==null&&(a=d,l?(u=kr(n,o),u!=null&&i.unshift(br(n,u,a))):l||(u=kr(n,o),u!=null&&i.push(br(n,u,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var up=/\r\n?/g,cp=/\u0000|\uFFFD/g;function fa(e){return(typeof e=="string"?e:""+e).replace(up,`
|
|
38
|
+
`).replace(cp,"")}function rl(e,t,n){if(t=fa(t),fa(e)!==t&&n)throw Error(N(425))}function _l(){}var ds=null,fs=null;function ps(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 hs=typeof setTimeout=="function"?setTimeout:void 0,dp=typeof clearTimeout=="function"?clearTimeout:void 0,pa=typeof Promise=="function"?Promise:void 0,fp=typeof queueMicrotask=="function"?queueMicrotask:typeof pa<"u"?function(e){return pa.resolve(null).then(e).catch(pp)}:hs;function pp(e){setTimeout(function(){throw e})}function bo(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),Nr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Nr(t)}function zt(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 ha(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 qn=Math.random().toString(36).slice(2),at="__reactFiber$"+qn,Lr="__reactProps$"+qn,wt="__reactContainer$"+qn,ms="__reactEvents$"+qn,hp="__reactListeners$"+qn,mp="__reactHandles$"+qn;function Xt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ha(e);e!==null;){if(n=e[at])return n;e=ha(e)}return t}e=n,n=e.parentNode}return null}function Ar(e){return e=e[at]||e[wt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function Gl(e){return e[Lr]||null}var xs=[],En=-1;function Bt(e){return{current:e}}function te(e){0>En||(e.current=xs[En],xs[En]=null,En--)}function Z(e,t){En++,xs[En]=e.current,e.current=t}var Ut={},Ce=Bt(Ut),ze=Bt(!1),rn=Ut;function An(e,t){var n=e.type.contextTypes;if(!n)return Ut;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 De(e){return e=e.childContextTypes,e!=null}function Pl(){te(ze),te(Ce)}function ma(e,t,n){if(Ce.current!==Ut)throw Error(N(168));Z(Ce,t),Z(ze,n)}function ic(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,Xd(e)||"Unknown",l));return ie({},n,r)}function Ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,rn=Ce.current,Z(Ce,e),Z(ze,ze.current),!0}function xa(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=ic(e,t,rn),r.__reactInternalMemoizedMergedChildContext=e,te(ze),te(Ce),Z(Ce,e)):te(ze),Z(ze,n)}var mt=null,Xl=!1,Lo=!1;function ac(e){mt===null?mt=[e]:mt.push(e)}function xp(e){Xl=!0,ac(e)}function Vt(){if(!Lo&&mt!==null){Lo=!0;var e=0,t=Y;try{var n=mt;for(Y=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}mt=null,Xl=!1}catch(l){throw mt!==null&&(mt=mt.slice(e+1)),Ou(Js,Vt),l}finally{Y=t,Lo=!1}}return null}var Tn=[],bn=0,Ol=null,Il=0,Qe=[],Je=0,ln=null,xt=1,vt="";function Yt(e,t){Tn[bn++]=Il,Tn[bn++]=Ol,Ol=e,Il=t}function uc(e,t,n){Qe[Je++]=xt,Qe[Je++]=vt,Qe[Je++]=ln,ln=e;var r=xt;e=vt;var l=32-rt(r)-1;r&=~(1<<l),n+=1;var o=32-rt(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,xt=1<<32-rt(t)+l|n<<l|r,vt=o+e}else xt=1<<o|n<<l|r,vt=e}function ni(e){e.return!==null&&(Yt(e,1),uc(e,1,0))}function ri(e){for(;e===Ol;)Ol=Tn[--bn],Tn[bn]=null,Il=Tn[--bn],Tn[bn]=null;for(;e===ln;)ln=Qe[--Je],Qe[Je]=null,vt=Qe[--Je],Qe[Je]=null,xt=Qe[--Je],Qe[Je]=null}var Ue=null,$e=null,re=!1,nt=null;function cc(e,t){var n=qe(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 va(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,Ue=e,$e=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ue=e,$e=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ln!==null?{id:xt,overflow:vt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=qe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ue=e,$e=null,!0):!1;default:return!1}}function vs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function gs(e){if(re){var t=$e;if(t){var n=t;if(!va(e,t)){if(vs(e))throw Error(N(418));t=zt(n.nextSibling);var r=Ue;t&&va(e,t)?cc(r,n):(e.flags=e.flags&-4097|2,re=!1,Ue=e)}}else{if(vs(e))throw Error(N(418));e.flags=e.flags&-4097|2,re=!1,Ue=e}}}function ga(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ue=e}function ll(e){if(e!==Ue)return!1;if(!re)return ga(e),re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ps(e.type,e.memoizedProps)),t&&(t=$e)){if(vs(e))throw dc(),Error(N(418));for(;t;)cc(e,t),t=zt(t.nextSibling)}if(ga(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){$e=zt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$e=null}}else $e=Ue?zt(e.stateNode.nextSibling):null;return!0}function dc(){for(var e=$e;e;)e=zt(e.nextSibling)}function Wn(){$e=Ue=null,re=!1}function li(e){nt===null?nt=[e]:nt.push(e)}var vp=St.ReactCurrentBatchConfig;function rr(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 ol(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ya(e){var t=e._init;return t(e._payload)}function fc(e){function t(f,c){if(e){var p=f.deletions;p===null?(f.deletions=[c],f.flags|=16):p.push(c)}}function n(f,c){if(!e)return null;for(;c!==null;)t(f,c),c=c.sibling;return null}function r(f,c){for(f=new Map;c!==null;)c.key!==null?f.set(c.key,c):f.set(c.index,c),c=c.sibling;return f}function l(f,c){return f=Wt(f,c),f.index=0,f.sibling=null,f}function o(f,c,p){return f.index=p,e?(p=f.alternate,p!==null?(p=p.index,p<c?(f.flags|=2,c):p):(f.flags|=2,c)):(f.flags|=1048576,c)}function i(f){return e&&f.alternate===null&&(f.flags|=2),f}function a(f,c,p,k){return c===null||c.tag!==6?(c=zo(p,f.mode,k),c.return=f,c):(c=l(c,p),c.return=f,c)}function u(f,c,p,k){var T=p.type;return T===kn?x(f,c,p.props.children,k,p.key):c!==null&&(c.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Tt&&ya(T)===c.type)?(k=l(c,p.props),k.ref=rr(f,c,p),k.return=f,k):(k=kl(p.type,p.key,p.props,null,f.mode,k),k.ref=rr(f,c,p),k.return=f,k)}function d(f,c,p,k){return c===null||c.tag!==4||c.stateNode.containerInfo!==p.containerInfo||c.stateNode.implementation!==p.implementation?(c=Do(p,f.mode,k),c.return=f,c):(c=l(c,p.children||[]),c.return=f,c)}function x(f,c,p,k,T){return c===null||c.tag!==7?(c=nn(p,f.mode,k,T),c.return=f,c):(c=l(c,p),c.return=f,c)}function v(f,c,p){if(typeof c=="string"&&c!==""||typeof c=="number")return c=zo(""+c,f.mode,p),c.return=f,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case qr:return p=kl(c.type,c.key,c.props,null,f.mode,p),p.ref=rr(f,null,c),p.return=f,p;case wn:return c=Do(c,f.mode,p),c.return=f,c;case Tt:var k=c._init;return v(f,k(c._payload),p)}if(ir(c)||Xn(c))return c=nn(c,f.mode,p,null),c.return=f,c;ol(f,c)}return null}function h(f,c,p,k){var T=c!==null?c.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return T!==null?null:a(f,c,""+p,k);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case qr:return p.key===T?u(f,c,p,k):null;case wn:return p.key===T?d(f,c,p,k):null;case Tt:return T=p._init,h(f,c,T(p._payload),k)}if(ir(p)||Xn(p))return T!==null?null:x(f,c,p,k,null);ol(f,p)}return null}function g(f,c,p,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return f=f.get(p)||null,a(c,f,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case qr:return f=f.get(k.key===null?p:k.key)||null,u(c,f,k,T);case wn:return f=f.get(k.key===null?p:k.key)||null,d(c,f,k,T);case Tt:var L=k._init;return g(f,c,p,L(k._payload),T)}if(ir(k)||Xn(k))return f=f.get(p)||null,x(c,f,k,T,null);ol(c,k)}return null}function y(f,c,p,k){for(var T=null,L=null,_=c,I=c=0,W=null;_!==null&&I<p.length;I++){_.index>I?(W=_,_=null):W=_.sibling;var D=h(f,_,p[I],k);if(D===null){_===null&&(_=W);break}e&&_&&D.alternate===null&&t(f,_),c=o(D,c,I),L===null?T=D:L.sibling=D,L=D,_=W}if(I===p.length)return n(f,_),re&&Yt(f,I),T;if(_===null){for(;I<p.length;I++)_=v(f,p[I],k),_!==null&&(c=o(_,c,I),L===null?T=_:L.sibling=_,L=_);return re&&Yt(f,I),T}for(_=r(f,_);I<p.length;I++)W=g(_,f,I,p[I],k),W!==null&&(e&&W.alternate!==null&&_.delete(W.key===null?I:W.key),c=o(W,c,I),L===null?T=W:L.sibling=W,L=W);return e&&_.forEach(function(S){return t(f,S)}),re&&Yt(f,I),T}function m(f,c,p,k){var T=Xn(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,I=c=0,W=null,D=p.next();_!==null&&!D.done;I++,D=p.next()){_.index>I?(W=_,_=null):W=_.sibling;var S=h(f,_,D.value,k);if(S===null){_===null&&(_=W);break}e&&_&&S.alternate===null&&t(f,_),c=o(S,c,I),L===null?T=S:L.sibling=S,L=S,_=W}if(D.done)return n(f,_),re&&Yt(f,I),T;if(_===null){for(;!D.done;I++,D=p.next())D=v(f,D.value,k),D!==null&&(c=o(D,c,I),L===null?T=D:L.sibling=D,L=D);return re&&Yt(f,I),T}for(_=r(f,_);!D.done;I++,D=p.next())D=g(_,f,I,D.value,k),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?I:D.key),c=o(D,c,I),L===null?T=D:L.sibling=D,L=D);return e&&_.forEach(function(q){return t(f,q)}),re&&Yt(f,I),T}function P(f,c,p,k){if(typeof p=="object"&&p!==null&&p.type===kn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case qr:e:{for(var T=p.key,L=c;L!==null;){if(L.key===T){if(T=p.type,T===kn){if(L.tag===7){n(f,L.sibling),c=l(L,p.props.children),c.return=f,f=c;break e}}else if(L.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Tt&&ya(T)===L.type){n(f,L.sibling),c=l(L,p.props),c.ref=rr(f,L,p),c.return=f,f=c;break e}n(f,L);break}else t(f,L);L=L.sibling}p.type===kn?(c=nn(p.props.children,f.mode,k,p.key),c.return=f,f=c):(k=kl(p.type,p.key,p.props,null,f.mode,k),k.ref=rr(f,c,p),k.return=f,f=k)}return i(f);case wn: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(f,c.sibling),c=l(c,p.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=Do(p,f.mode,k),c.return=f,f=c}return i(f);case Tt:return L=p._init,P(f,c,L(p._payload),k)}if(ir(p))return y(f,c,p,k);if(Xn(p))return m(f,c,p,k);ol(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,p),c.return=f,f=c):(n(f,c),c=zo(p,f.mode,k),c.return=f,f=c),i(f)):n(f,c)}return P}var $n=fc(!0),pc=fc(!1),Rl=Bt(null),zl=null,Ln=null,oi=null;function si(){oi=Ln=zl=null}function ii(e){var t=Rl.current;te(Rl),e._currentValue=t}function ys(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 zn(e,t){zl=e,oi=Ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Re=!0),e.firstContext=null)}function Ye(e){var t=e._currentValue;if(oi!==e)if(e={context:e,memoizedValue:t,next:null},Ln===null){if(zl===null)throw Error(N(308));Ln=e,zl.dependencies={lanes:0,firstContext:e}}else Ln=Ln.next=e;return t}var Zt=null;function ai(e){Zt===null?Zt=[e]:Zt.push(e)}function hc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,ai(t)):(n.next=l.next,l.next=n),t.interleaved=n,kt(e,r)}function kt(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 bt=!1;function ui(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mc(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 gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Dt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,kt(e,n)}return l=r.interleaved,l===null?(t.next=t,ai(r)):(t.next=l.next,l.next=t),r.interleaved=t,kt(e,n)}function ml(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,qs(e,n)}}function wa(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 Dl(e,t,n,r){var l=e.updateQueue;bt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,d=u.next;u.next=null,i===null?o=d:i.next=d,i=u;var x=e.alternate;x!==null&&(x=x.updateQueue,a=x.lastBaseUpdate,a!==i&&(a===null?x.firstBaseUpdate=d:a.next=d,x.lastBaseUpdate=u))}if(o!==null){var v=l.baseState;i=0,x=d=u=null,a=o;do{var h=a.lane,g=a.eventTime;if((r&h)===h){x!==null&&(x=x.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,m=a;switch(h=t,g=n,m.tag){case 1:if(y=m.payload,typeof y=="function"){v=y.call(g,v,h);break e}v=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,h=typeof y=="function"?y.call(g,v,h):y,h==null)break e;v=ie({},v,h);break e;case 2:bt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},x===null?(d=x=g,u=v):x=x.next=g,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(x===null&&(u=v),l.baseState=u,l.firstBaseUpdate=d,l.lastBaseUpdate=x,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);sn|=i,e.lanes=i,e.memoizedState=v}}function ka(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={},ct=Bt(Wr),_r=Bt(Wr),Pr=Bt(Wr);function en(e){if(e===Wr)throw Error(N(174));return e}function ci(e,t){switch(Z(Pr,t),Z(_r,e),Z(ct,Wr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Zo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Zo(t,e)}te(ct),Z(ct,t)}function Un(){te(ct),te(_r),te(Pr)}function xc(e){en(Pr.current);var t=en(ct.current),n=Zo(t,e.type);t!==n&&(Z(_r,e),Z(ct,n))}function di(e){_r.current===e&&(te(ct),te(_r))}var oe=Bt(0);function Fl(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 _o=[];function fi(){for(var e=0;e<_o.length;e++)_o[e]._workInProgressVersionPrimary=null;_o.length=0}var xl=St.ReactCurrentDispatcher,Po=St.ReactCurrentBatchConfig,on=0,se=null,he=null,xe=null,Al=!1,mr=!1,Mr=0,gp=0;function je(){throw Error(N(321))}function pi(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ot(e[n],t[n]))return!1;return!0}function hi(e,t,n,r,l,o){if(on=o,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xl.current=e===null||e.memoizedState===null?jp:Sp,e=n(r,l),mr){o=0;do{if(mr=!1,Mr=0,25<=o)throw Error(N(301));o+=1,xe=he=null,t.updateQueue=null,xl.current=Np,e=n(r,l)}while(mr)}if(xl.current=Wl,t=he!==null&&he.next!==null,on=0,xe=he=se=null,Al=!1,t)throw Error(N(300));return e}function mi(){var e=Mr!==0;return Mr=0,e}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xe===null?se.memoizedState=xe=e:xe=xe.next=e,xe}function Ge(){if(he===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=he.next;var t=xe===null?se.memoizedState:xe.next;if(t!==null)xe=t,he=e;else{if(e===null)throw Error(N(310));he=e,e={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},xe===null?se.memoizedState=xe=e:xe=xe.next=e}return xe}function Or(e,t){return typeof t=="function"?t(e):t}function Mo(e){var t=Ge(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=he,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,d=o;do{var x=d.lane;if((on&x)===x)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var v={lane:x,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(a=u=v,i=r):u=u.next=v,se.lanes|=x,sn|=x}d=d.next}while(d!==null&&d!==o);u===null?i=r:u.next=a,ot(r,t.memoizedState)||(Re=!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,se.lanes|=o,sn|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Oo(e){var t=Ge(),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);ot(o,t.memoizedState)||(Re=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vc(){}function gc(e,t){var n=se,r=Ge(),l=t(),o=!ot(r.memoizedState,l);if(o&&(r.memoizedState=l,Re=!0),r=r.queue,xi(kc.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||xe!==null&&xe.memoizedState.tag&1){if(n.flags|=2048,Ir(9,wc.bind(null,n,r,l,t),void 0,null),ve===null)throw Error(N(349));on&30||yc(n,t,l)}return l}function yc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wc(e,t,n,r){t.value=n,t.getSnapshot=r,jc(t)&&Sc(e)}function kc(e,t,n){return n(function(){jc(t)&&Sc(e)})}function jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ot(e,n)}catch{return!0}}function Sc(e){var t=kt(e,1);t!==null&<(t,e,1,-1)}function ja(e){var t=it();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:e},t.queue=e,e=e.dispatch=kp.bind(null,se,e),[t.memoizedState,e]}function Ir(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.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 Nc(){return Ge().memoizedState}function vl(e,t,n,r){var l=it();se.flags|=e,l.memoizedState=Ir(1|t,n,void 0,r===void 0?null:r)}function Zl(e,t,n,r){var l=Ge();r=r===void 0?null:r;var o=void 0;if(he!==null){var i=he.memoizedState;if(o=i.destroy,r!==null&&pi(r,i.deps)){l.memoizedState=Ir(t,n,o,r);return}}se.flags|=e,l.memoizedState=Ir(1|t,n,o,r)}function Sa(e,t){return vl(8390656,8,e,t)}function xi(e,t){return Zl(2048,8,e,t)}function Cc(e,t){return Zl(4,2,e,t)}function Ec(e,t){return Zl(4,4,e,t)}function Tc(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 bc(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4,4,Tc.bind(null,t,e),n)}function vi(){}function Lc(e,t){var n=Ge();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _c(e,t){var n=Ge();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Pc(e,t,n){return on&21?(ot(n,t)||(n=zu(),se.lanes|=n,sn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Re=!0),e.memoizedState=n)}function yp(e,t){var n=Y;Y=n!==0&&4>n?n:4,e(!0);var r=Po.transition;Po.transition={};try{e(!1),t()}finally{Y=n,Po.transition=r}}function Mc(){return Ge().memoizedState}function wp(e,t,n){var r=At(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Oc(e))Ic(t,n);else if(n=hc(e,t,n,r),n!==null){var l=Te();lt(n,e,r,l),Rc(n,t,r)}}function kp(e,t,n){var r=At(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Oc(e))Ic(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,ot(a,i)){var u=t.interleaved;u===null?(l.next=l,ai(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=hc(e,t,l,r),n!==null&&(l=Te(),lt(n,e,r,l),Rc(n,t,r))}}function Oc(e){var t=e.alternate;return e===se||t!==null&&t===se}function Ic(e,t){mr=Al=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qs(e,n)}}var Wl={readContext:Ye,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},jp={readContext:Ye,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Ye,useEffect:Sa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vl(4194308,4,Tc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return vl(4,2,e,t)},useMemo:function(e,t){var n=it();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=it();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=wp.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:ja,useDebugValue:vi,useDeferredValue:function(e){return it().memoizedState=e},useTransition:function(){var e=ja(!1),t=e[0];return e=yp.bind(null,e[1]),it().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,l=it();if(re){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),ve===null)throw Error(N(349));on&30||yc(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Sa(kc.bind(null,r,o,e),[e]),r.flags|=2048,Ir(9,wc.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=it(),t=ve.identifierPrefix;if(re){var n=vt,r=xt;n=(r&~(1<<32-rt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Mr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=gp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Sp={readContext:Ye,useCallback:Lc,useContext:Ye,useEffect:xi,useImperativeHandle:bc,useInsertionEffect:Cc,useLayoutEffect:Ec,useMemo:_c,useReducer:Mo,useRef:Nc,useState:function(){return Mo(Or)},useDebugValue:vi,useDeferredValue:function(e){var t=Ge();return Pc(t,he.memoizedState,e)},useTransition:function(){var e=Mo(Or)[0],t=Ge().memoizedState;return[e,t]},useMutableSource:vc,useSyncExternalStore:gc,useId:Mc,unstable_isNewReconciler:!1},Np={readContext:Ye,useCallback:Lc,useContext:Ye,useEffect:xi,useImperativeHandle:bc,useInsertionEffect:Cc,useLayoutEffect:Ec,useMemo:_c,useReducer:Oo,useRef:Nc,useState:function(){return Oo(Or)},useDebugValue:vi,useDeferredValue:function(e){var t=Ge();return he===null?t.memoizedState=e:Pc(t,he.memoizedState,e)},useTransition:function(){var e=Oo(Or)[0],t=Ge().memoizedState;return[e,t]},useMutableSource:vc,useSyncExternalStore:gc,useId:Mc,unstable_isNewReconciler:!1};function et(e,t){if(e&&e.defaultProps){t=ie({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ie({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var eo={isMounted:function(e){return(e=e._reactInternals)?dn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Te(),l=At(e),o=gt(r,l);o.payload=t,n!=null&&(o.callback=n),t=Dt(e,o,l),t!==null&&(lt(t,e,l,r),ml(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Te(),l=At(e),o=gt(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Dt(e,o,l),t!==null&&(lt(t,e,l,r),ml(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Te(),r=At(e),l=gt(n,r);l.tag=2,t!=null&&(l.callback=t),t=Dt(e,l,r),t!==null&&(lt(t,e,r,n),ml(t,e,r))}};function Na(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?!Er(n,r)||!Er(l,o):!0}function zc(e,t,n){var r=!1,l=Ut,o=t.contextType;return typeof o=="object"&&o!==null?o=Ye(o):(l=De(t)?rn:Ce.current,r=t.contextTypes,o=(r=r!=null)?An(e,l):Ut),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=eo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ca(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&&eo.enqueueReplaceState(t,t.state,null)}function ks(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},ui(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=Ye(o):(o=De(t)?rn:Ce.current,l.context=An(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ws(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&&eo.enqueueReplaceState(l,l.state,null),Dl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Hn(e,t){try{var n="",r=t;do n+=Gd(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 Io(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function js(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Cp=typeof WeakMap=="function"?WeakMap:Map;function Dc(e,t,n){n=gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ul||(Ul=!0,Ms=r),js(e,t)},n}function Fc(e,t,n){n=gt(-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(){js(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){js(e,t),typeof r!="function"&&(Ft===null?Ft=new Set([this]):Ft.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Ea(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Cp;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=Ap.bind(null,e,t,n),t.then(e,e))}function Ta(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 ba(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=gt(-1,1),t.tag=2,Dt(n,t,1))),n.lanes|=1),e)}var Ep=St.ReactCurrentOwner,Re=!1;function Ee(e,t,n,r){t.child=e===null?pc(t,null,n,r):$n(t,e.child,n,r)}function La(e,t,n,r,l){n=n.render;var o=t.ref;return zn(t,l),r=hi(e,t,n,r,o,l),n=mi(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,jt(e,t,l)):(re&&n&&ni(t),t.flags|=1,Ee(e,t,r,l),t.child)}function _a(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Ci(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ac(e,t,o,r,l)):(e=kl(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:Er,n(i,r)&&e.ref===t.ref)return jt(e,t,l)}return t.flags|=1,e=Wt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Er(o,r)&&e.ref===t.ref)if(Re=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Re=!0);else return t.lanes=e.lanes,jt(e,t,l)}return Ss(e,t,n,r,l)}function Wc(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},Z(Pn,We),We|=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,Z(Pn,We),We|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Z(Pn,We),We|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Z(Pn,We),We|=r;return Ee(e,t,l,n),t.child}function $c(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,n,r,l){var o=De(n)?rn:Ce.current;return o=An(t,o),zn(t,l),n=hi(e,t,n,r,o,l),r=mi(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,jt(e,t,l)):(re&&r&&ni(t),t.flags|=1,Ee(e,t,n,l),t.child)}function Pa(e,t,n,r,l){if(De(n)){var o=!0;Ml(t)}else o=!1;if(zn(t,l),t.stateNode===null)gl(e,t),zc(t,n,r),ks(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var u=i.context,d=n.contextType;typeof d=="object"&&d!==null?d=Ye(d):(d=De(n)?rn:Ce.current,d=An(t,d));var x=n.getDerivedStateFromProps,v=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function";v||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==d)&&Ca(t,i,r,d),bt=!1;var h=t.memoizedState;i.state=h,Dl(t,r,i,l),u=t.memoizedState,a!==r||h!==u||ze.current||bt?(typeof x=="function"&&(ws(t,n,x,r),u=t.memoizedState),(a=bt||Na(t,n,a,r,h,u,d))?(v||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=d,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,mc(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:et(t.type,a),i.props=d,v=t.pendingProps,h=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=Ye(u):(u=De(n)?rn:Ce.current,u=An(t,u));var g=n.getDerivedStateFromProps;(x=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==v||h!==u)&&Ca(t,i,r,u),bt=!1,h=t.memoizedState,i.state=h,Dl(t,r,i,l);var y=t.memoizedState;a!==v||h!==y||ze.current||bt?(typeof g=="function"&&(ws(t,n,g,r),y=t.memoizedState),(d=bt||Na(t,n,d,r,h,y,u)||!1)?(x||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,y,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,y,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=y),i.props=r,i.state=y,i.context=u,r=d):(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 Ns(e,t,n,r,o,l)}function Ns(e,t,n,r,l,o){$c(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&xa(t,n,!1),jt(e,t,o);r=t.stateNode,Ep.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=$n(t,e.child,null,o),t.child=$n(t,null,a,o)):Ee(e,t,a,o),t.memoizedState=r.state,l&&xa(t,n,!0),t.child}function Uc(e){var t=e.stateNode;t.pendingContext?ma(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ma(e,t.context,!1),ci(e,t.containerInfo)}function Ma(e,t,n,r,l){return Wn(),li(l),t.flags|=256,Ee(e,t,n,r),t.child}var Cs={dehydrated:null,treeContext:null,retryLane:0};function Es(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hc(e,t,n){var r=t.pendingProps,l=oe.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),Z(oe,l&1),e===null)return gs(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=ro(i,r,0,null),e=nn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Es(n),t.memoizedState=Cs,e):gi(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return Tp(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=Wt(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?o=Wt(a,o):(o=nn(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?Es(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Cs,r}return o=e.child,e=o.sibling,r=Wt(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 gi(e,t){return t=ro({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function sl(e,t,n,r){return r!==null&&li(r),$n(t,e.child,null,n),e=gi(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tp(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Io(Error(N(422))),sl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=ro({mode:"visible",children:r.children},l,0,null),o=nn(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&$n(t,e.child,null,i),t.child.memoizedState=Es(i),t.memoizedState=Cs,o);if(!(t.mode&1))return sl(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=Io(o,r,void 0),sl(e,t,i,r)}if(a=(i&e.childLanes)!==0,Re||a){if(r=ve,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,kt(e,l),lt(r,e,l,-1))}return Ni(),r=Io(Error(N(421))),sl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Wp.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,$e=zt(l.nextSibling),Ue=t,re=!0,nt=null,e!==null&&(Qe[Je++]=xt,Qe[Je++]=vt,Qe[Je++]=ln,xt=e.id,vt=e.overflow,ln=t),t=gi(t,r.children),t.flags|=4096,t)}function Oa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ys(e.return,t,n)}function Ro(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 Bc(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Ee(e,t,r.children,n),r=oe.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&&Oa(e,n,t);else if(e.tag===19)Oa(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(Z(oe,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&&Fl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Ro(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&&Fl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Ro(t,!0,n,null,o);break;case"together":Ro(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sn|=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=Wt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bp(e,t,n){switch(t.tag){case 3:Uc(t),Wn();break;case 5:xc(t);break;case 1:De(t.type)&&Ml(t);break;case 4:ci(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;Z(Rl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Z(oe,oe.current&1),t.flags|=128,null):n&t.child.childLanes?Hc(e,t,n):(Z(oe,oe.current&1),e=jt(e,t,n),e!==null?e.sibling:null);Z(oe,oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Bc(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Z(oe,oe.current),r)break;return null;case 22:case 23:return t.lanes=0,Wc(e,t,n)}return jt(e,t,n)}var Vc,Ts,Qc,Jc;Vc=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}};Ts=function(){};Qc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,en(ct.current);var o=null;switch(n){case"input":l=Ko(e,l),r=Ko(e,r),o=[];break;case"select":l=ie({},l,{value:void 0}),r=ie({},r,{value:void 0}),o=[];break;case"textarea":l=Xo(e,l),r=Xo(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=_l)}es(n,r);var i;n=null;for(d in l)if(!r.hasOwnProperty(d)&&l.hasOwnProperty(d)&&l[d]!=null)if(d==="style"){var a=l[d];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(yr.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var u=r[d];if(a=l!=null?l[d]:void 0,r.hasOwnProperty(d)&&u!==a&&(u!=null||a!=null))if(d==="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(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(yr.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&ee("scroll",e),o||a===u||(o=[])):(o=o||[]).push(d,u))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};Jc=function(e,t,n,r){n!==r&&(t.flags|=4)};function lr(e,t){if(!re)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 Se(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 Lp(e,t,n){var r=t.pendingProps;switch(ri(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(t),null;case 1:return De(t.type)&&Pl(),Se(t),null;case 3:return r=t.stateNode,Un(),te(ze),te(Ce),fi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ll(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,nt!==null&&(Rs(nt),nt=null))),Ts(e,t),Se(t),null;case 5:di(t);var l=en(Pr.current);if(n=t.type,e!==null&&t.stateNode!=null)Qc(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 Se(t),null}if(e=en(ct.current),ll(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[at]=t,r[Lr]=o,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",r),ee("close",r);break;case"iframe":case"object":case"embed":ee("load",r);break;case"video":case"audio":for(l=0;l<ur.length;l++)ee(ur[l],r);break;case"source":ee("error",r);break;case"img":case"image":case"link":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"input":Ui(r,o),ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ee("invalid",r);break;case"textarea":Bi(r,o),ee("invalid",r)}es(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&&rl(r.textContent,a,e),l=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&rl(r.textContent,a,e),l=["children",""+a]):yr.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ee("scroll",r)}switch(n){case"input":Kr(r),Hi(r,o,!0);break;case"textarea":Kr(r),Vi(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=_l)}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=ku(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[at]=t,e[Lr]=r,Vc(e,t,!1,!1),t.stateNode=e;e:{switch(i=ts(n,r),n){case"dialog":ee("cancel",e),ee("close",e),l=r;break;case"iframe":case"object":case"embed":ee("load",e),l=r;break;case"video":case"audio":for(l=0;l<ur.length;l++)ee(ur[l],e);l=r;break;case"source":ee("error",e),l=r;break;case"img":case"image":case"link":ee("error",e),ee("load",e),l=r;break;case"details":ee("toggle",e),l=r;break;case"input":Ui(e,r),l=Ko(e,r),ee("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=ie({},r,{value:void 0}),ee("invalid",e);break;case"textarea":Bi(e,r),l=Xo(e,r),ee("invalid",e);break;default:l=r}es(n,l),a=l;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?Nu(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&ju(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&wr(e,u):typeof u=="number"&&wr(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(yr.hasOwnProperty(o)?u!=null&&o==="onScroll"&&ee("scroll",e):u!=null&&Us(e,o,u,i))}switch(n){case"input":Kr(e),Hi(e,r,!1);break;case"textarea":Kr(e),Vi(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?Mn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Mn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=_l)}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 Se(t),null;case 6:if(e&&t.stateNode!=null)Jc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=en(Pr.current),en(ct.current),ll(t)){if(r=t.stateNode,n=t.memoizedProps,r[at]=t,(o=r.nodeValue!==n)&&(e=Ue,e!==null))switch(e.tag){case 3:rl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[at]=t,t.stateNode=r}return Se(t),null;case 13:if(te(oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(re&&$e!==null&&t.mode&1&&!(t.flags&128))dc(),Wn(),t.flags|=98560,o=!1;else if(o=ll(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[at]=t}else Wn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Se(t),o=!1}else nt!==null&&(Rs(nt),nt=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||oe.current&1?me===0&&(me=3):Ni())),t.updateQueue!==null&&(t.flags|=4),Se(t),null);case 4:return Un(),Ts(e,t),e===null&&Tr(t.stateNode.containerInfo),Se(t),null;case 10:return ii(t.type._context),Se(t),null;case 17:return De(t.type)&&Pl(),Se(t),null;case 19:if(te(oe),o=t.memoizedState,o===null)return Se(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)lr(o,!1);else{if(me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Fl(e),i!==null){for(t.flags|=128,lr(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 Z(oe,oe.current&1|2),t.child}e=e.sibling}o.tail!==null&&ce()>Bn&&(t.flags|=128,r=!0,lr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Fl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!re)return Se(t),null}else 2*ce()-o.renderingStartTime>Bn&&n!==1073741824&&(t.flags|=128,r=!0,lr(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=ce(),t.sibling=null,n=oe.current,Z(oe,r?n&1|2:n&1),t):(Se(t),null);case 22:case 23:return Si(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?We&1073741824&&(Se(t),t.subtreeFlags&6&&(t.flags|=8192)):Se(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function _p(e,t){switch(ri(t),t.tag){case 1:return De(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(),te(ze),te(Ce),fi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return di(t),null;case 13:if(te(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));Wn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(oe),null;case 4:return Un(),null;case 10:return ii(t.type._context),null;case 22:case 23:return Si(),null;case 24:return null;default:return null}}var il=!1,Ne=!1,Pp=typeof WeakSet=="function"?WeakSet:Set,M=null;function _n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ae(e,t,r)}else n.current=null}function bs(e,t,n){try{n()}catch(r){ae(e,t,r)}}var Ia=!1;function Mp(e,t){if(ds=Tl,e=Xu(),ti(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,d=0,x=0,v=e,h=null;t:for(;;){for(var g;v!==n||l!==0&&v.nodeType!==3||(a=i+l),v!==o||r!==0&&v.nodeType!==3||(u=i+r),v.nodeType===3&&(i+=v.nodeValue.length),(g=v.firstChild)!==null;)h=v,v=g;for(;;){if(v===e)break t;if(h===n&&++d===l&&(a=i),h===o&&++x===r&&(u=i),(g=v.nextSibling)!==null)break;v=h,h=v.parentNode}v=g}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(fs={focusedElem:e,selectionRange:n},Tl=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,P=y.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?m:et(t.type,m),P);f.__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(k){ae(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return y=Ia,Ia=!1,y}function xr(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&&bs(t,n,o)}l=l.next}while(l!==r)}}function to(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 Ls(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 qc(e){var t=e.alternate;t!==null&&(e.alternate=null,qc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[at],delete t[Lr],delete t[ms],delete t[hp],delete t[mp])),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 Kc(e){return e.tag===5||e.tag===3||e.tag===4}function Ra(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(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 _s(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=_l));else if(r!==4&&(e=e.child,e!==null))for(_s(e,t,n),e=e.sibling;e!==null;)_s(e,t,n),e=e.sibling}function Ps(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(Ps(e,t,n),e=e.sibling;e!==null;)Ps(e,t,n),e=e.sibling}var ye=null,tt=!1;function Et(e,t,n){for(n=n.child;n!==null;)Yc(e,t,n),n=n.sibling}function Yc(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Jl,n)}catch{}switch(n.tag){case 5:Ne||_n(n,t);case 6:var r=ye,l=tt;ye=null,Et(e,t,n),ye=r,tt=l,ye!==null&&(tt?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(tt?(e=ye,n=n.stateNode,e.nodeType===8?bo(e.parentNode,n):e.nodeType===1&&bo(e,n),Nr(e)):bo(ye,n.stateNode));break;case 4:r=ye,l=tt,ye=n.stateNode.containerInfo,tt=!0,Et(e,t,n),ye=r,tt=l;break;case 0:case 11:case 14:case 15:if(!Ne&&(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)&&bs(n,t,i),l=l.next}while(l!==r)}Et(e,t,n);break;case 1:if(!Ne&&(_n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ae(n,t,a)}Et(e,t,n);break;case 21:Et(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,Et(e,t,n),Ne=r):Et(e,t,n);break;default:Et(e,t,n)}}function za(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Pp),t.forEach(function(r){var l=$p.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ze(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:ye=a.stateNode,tt=!1;break e;case 3:ye=a.stateNode.containerInfo,tt=!0;break e;case 4:ye=a.stateNode.containerInfo,tt=!0;break e}a=a.return}if(ye===null)throw Error(N(160));Yc(o,i,l),ye=null,tt=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(d){ae(l,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gc(t,e),t=t.sibling}function Gc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ze(t,e),st(e),r&4){try{xr(3,e,e.return),to(3,e)}catch(m){ae(e,e.return,m)}try{xr(5,e,e.return)}catch(m){ae(e,e.return,m)}}break;case 1:Ze(t,e),st(e),r&512&&n!==null&&_n(n,n.return);break;case 5:if(Ze(t,e),st(e),r&512&&n!==null&&_n(n,n.return),e.flags&32){var l=e.stateNode;try{wr(l,"")}catch(m){ae(e,e.return,m)}}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&&yu(l,o),ts(a,i);var d=ts(a,o);for(i=0;i<u.length;i+=2){var x=u[i],v=u[i+1];x==="style"?Nu(l,v):x==="dangerouslySetInnerHTML"?ju(l,v):x==="children"?wr(l,v):Us(l,x,v,d)}switch(a){case"input":Yo(l,o);break;case"textarea":wu(l,o);break;case"select":var h=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?Mn(l,!!o.multiple,g,!1):h!==!!o.multiple&&(o.defaultValue!=null?Mn(l,!!o.multiple,o.defaultValue,!0):Mn(l,!!o.multiple,o.multiple?[]:"",!1))}l[Lr]=o}catch(m){ae(e,e.return,m)}}break;case 6:if(Ze(t,e),st(e),r&4){if(e.stateNode===null)throw Error(N(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(m){ae(e,e.return,m)}}break;case 3:if(Ze(t,e),st(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Nr(t.containerInfo)}catch(m){ae(e,e.return,m)}break;case 4:Ze(t,e),st(e);break;case 13:Ze(t,e),st(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(ki=ce())),r&4&&za(e);break;case 22:if(x=n!==null&&n.memoizedState!==null,e.mode&1?(Ne=(d=Ne)||x,Ze(t,e),Ne=d):Ze(t,e),st(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!x&&e.mode&1)for(M=e,x=e.child;x!==null;){for(v=M=x;M!==null;){switch(h=M,g=h.child,h.tag){case 0:case 11:case 14:case 15:xr(4,h,h.return);break;case 1:_n(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(m){ae(r,n,m)}}break;case 5:_n(h,h.return);break;case 22:if(h.memoizedState!==null){Fa(v);continue}}g!==null?(g.return=h,M=g):Fa(v)}x=x.sibling}e:for(x=null,v=e;;){if(v.tag===5){if(x===null){x=v;try{l=v.stateNode,d?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=v.stateNode,u=v.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=Su("display",i))}catch(m){ae(e,e.return,m)}}}else if(v.tag===6){if(x===null)try{v.stateNode.nodeValue=d?"":v.memoizedProps}catch(m){ae(e,e.return,m)}}else if((v.tag!==22&&v.tag!==23||v.memoizedState===null||v===e)&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===e)break e;for(;v.sibling===null;){if(v.return===null||v.return===e)break e;x===v&&(x=null),v=v.return}x===v&&(x=null),v.sibling.return=v.return,v=v.sibling}}break;case 19:Ze(t,e),st(e),r&4&&za(e);break;case 21:break;default:Ze(t,e),st(e)}}function st(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Kc(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&&(wr(l,""),r.flags&=-33);var o=Ra(e);Ps(e,o,l);break;case 3:case 4:var i=r.stateNode.containerInfo,a=Ra(e);_s(e,a,i);break;default:throw Error(N(161))}}catch(u){ae(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Op(e,t,n){M=e,Xc(e)}function Xc(e,t,n){for(var r=(e.mode&1)!==0;M!==null;){var l=M,o=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||il;if(!i){var a=l.alternate,u=a!==null&&a.memoizedState!==null||Ne;a=il;var d=Ne;if(il=i,(Ne=u)&&!d)for(M=l;M!==null;)i=M,u=i.child,i.tag===22&&i.memoizedState!==null?Aa(l):u!==null?(u.return=i,M=u):Aa(l);for(;o!==null;)M=o,Xc(o),o=o.sibling;M=l,il=a,Ne=d}Da(e)}else l.subtreeFlags&8772&&o!==null?(o.return=l,M=o):Da(e)}}function Da(e){for(;M!==null;){var t=M;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ne||to(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ne)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:et(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ka(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}ka(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 d=t.alternate;if(d!==null){var x=d.memoizedState;if(x!==null){var v=x.dehydrated;v!==null&&Nr(v)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}Ne||t.flags&512&&Ls(t)}catch(h){ae(t,t.return,h)}}if(t===e){M=null;break}if(n=t.sibling,n!==null){n.return=t.return,M=n;break}M=t.return}}function Fa(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var n=t.sibling;if(n!==null){n.return=t.return,M=n;break}M=t.return}}function Aa(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{to(4,t)}catch(u){ae(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){ae(t,l,u)}}var o=t.return;try{Ls(t)}catch(u){ae(t,o,u)}break;case 5:var i=t.return;try{Ls(t)}catch(u){ae(t,i,u)}}}catch(u){ae(t,t.return,u)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var Ip=Math.ceil,$l=St.ReactCurrentDispatcher,yi=St.ReactCurrentOwner,Ke=St.ReactCurrentBatchConfig,Q=0,ve=null,fe=null,we=0,We=0,Pn=Bt(0),me=0,Rr=null,sn=0,no=0,wi=0,vr=null,Ie=null,ki=0,Bn=1/0,ht=null,Ul=!1,Ms=null,Ft=null,al=!1,Mt=null,Hl=0,gr=0,Os=null,yl=-1,wl=0;function Te(){return Q&6?ce():yl!==-1?yl:yl=ce()}function At(e){return e.mode&1?Q&2&&we!==0?we&-we:vp.transition!==null?(wl===0&&(wl=zu()),wl):(e=Y,e!==0||(e=window.event,e=e===void 0?16:Hu(e.type)),e):1}function lt(e,t,n,r){if(50<gr)throw gr=0,Os=null,Error(N(185));Dr(e,n,r),(!(Q&2)||e!==ve)&&(e===ve&&(!(Q&2)&&(no|=n),me===4&&_t(e,we)),Fe(e,r),n===1&&Q===0&&!(t.mode&1)&&(Bn=ce()+500,Xl&&Vt()))}function Fe(e,t){var n=e.callbackNode;vf(e,t);var r=El(e,e===ve?we:0);if(r===0)n!==null&&qi(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&qi(n),t===1)e.tag===0?xp(Wa.bind(null,e)):ac(Wa.bind(null,e)),fp(function(){!(Q&6)&&Vt()}),n=null;else{switch(Du(r)){case 1:n=Js;break;case 4:n=Iu;break;case 16:n=Cl;break;case 536870912:n=Ru;break;default:n=Cl}n=sd(n,Zc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Zc(e,t){if(yl=-1,wl=0,Q&6)throw Error(N(327));var n=e.callbackNode;if(Dn()&&e.callbackNode!==n)return null;var r=El(e,e===ve?we:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Bl(e,r);else{t=r;var l=Q;Q|=2;var o=td();(ve!==e||we!==t)&&(ht=null,Bn=ce()+500,tn(e,t));do try{Dp();break}catch(a){ed(e,a)}while(!0);si(),$l.current=o,Q=l,fe!==null?t=0:(ve=null,we=0,t=me)}if(t!==0){if(t===2&&(l=ss(e),l!==0&&(r=l,t=Is(e,l))),t===1)throw n=Rr,tn(e,0),_t(e,r),Fe(e,ce()),n;if(t===6)_t(e,r);else{if(l=e.current.alternate,!(r&30)&&!Rp(l)&&(t=Bl(e,r),t===2&&(o=ss(e),o!==0&&(r=o,t=Is(e,o))),t===1))throw n=Rr,tn(e,0),_t(e,r),Fe(e,ce()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:Gt(e,Ie,ht);break;case 3:if(_t(e,r),(r&130023424)===r&&(t=ki+500-ce(),10<t)){if(El(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){Te(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=hs(Gt.bind(null,e,Ie,ht),t);break}Gt(e,Ie,ht);break;case 4:if(_t(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-rt(r);o=1<<i,i=t[i],i>l&&(l=i),r&=~o}if(r=l,r=ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ip(r/1960))-r,10<r){e.timeoutHandle=hs(Gt.bind(null,e,Ie,ht),r);break}Gt(e,Ie,ht);break;case 5:Gt(e,Ie,ht);break;default:throw Error(N(329))}}}return Fe(e,ce()),e.callbackNode===n?Zc.bind(null,e):null}function Is(e,t){var n=vr;return e.current.memoizedState.isDehydrated&&(tn(e,t).flags|=256),e=Bl(e,t),e!==2&&(t=Ie,Ie=n,t!==null&&Rs(t)),e}function Rs(e){Ie===null?Ie=e:Ie.push.apply(Ie,e)}function Rp(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(!ot(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 _t(e,t){for(t&=~wi,t&=~no,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rt(t),r=1<<n;e[n]=-1,t&=~r}}function Wa(e){if(Q&6)throw Error(N(327));Dn();var t=El(e,0);if(!(t&1))return Fe(e,ce()),null;var n=Bl(e,t);if(e.tag!==0&&n===2){var r=ss(e);r!==0&&(t=r,n=Is(e,r))}if(n===1)throw n=Rr,tn(e,0),_t(e,t),Fe(e,ce()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gt(e,Ie,ht),Fe(e,ce()),null}function ji(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(Bn=ce()+500,Xl&&Vt())}}function an(e){Mt!==null&&Mt.tag===0&&!(Q&6)&&Dn();var t=Q;Q|=1;var n=Ke.transition,r=Y;try{if(Ke.transition=null,Y=1,e)return e()}finally{Y=r,Ke.transition=n,Q=t,!(Q&6)&&Vt()}}function Si(){We=Pn.current,te(Pn)}function tn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dp(n)),fe!==null)for(n=fe.return;n!==null;){var r=n;switch(ri(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pl();break;case 3:Un(),te(ze),te(Ce),fi();break;case 5:di(r);break;case 4:Un();break;case 13:te(oe);break;case 19:te(oe);break;case 10:ii(r.type._context);break;case 22:case 23:Si()}n=n.return}if(ve=e,fe=e=Wt(e.current,null),we=We=t,me=0,Rr=null,wi=no=sn=0,Ie=vr=null,Zt!==null){for(t=0;t<Zt.length;t++)if(n=Zt[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}Zt=null}return e}function ed(e,t){do{var n=fe;try{if(si(),xl.current=Wl,Al){for(var r=se.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Al=!1}if(on=0,xe=he=se=null,mr=!1,Mr=0,yi.current=null,n===null||n.return===null){me=1,Rr=t,fe=null;break}e:{var o=e,i=n.return,a=n,u=t;if(t=we,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,x=a,v=x.tag;if(!(x.mode&1)&&(v===0||v===11||v===15)){var h=x.alternate;h?(x.updateQueue=h.updateQueue,x.memoizedState=h.memoizedState,x.lanes=h.lanes):(x.updateQueue=null,x.memoizedState=null)}var g=Ta(i);if(g!==null){g.flags&=-257,ba(g,i,a,o,t),g.mode&1&&Ea(o,d,t),t=g,u=d;var y=t.updateQueue;if(y===null){var m=new Set;m.add(u),t.updateQueue=m}else y.add(u);break e}else{if(!(t&1)){Ea(o,d,t),Ni();break e}u=Error(N(426))}}else if(re&&a.mode&1){var P=Ta(i);if(P!==null){!(P.flags&65536)&&(P.flags|=256),ba(P,i,a,o,t),li(Hn(u,a));break e}}o=u=Hn(u,a),me!==4&&(me=2),vr===null?vr=[o]:vr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var f=Dc(o,u,t);wa(o,f);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"&&(Ft===null||!Ft.has(p)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=Fc(o,a,t);wa(o,k);break e}}o=o.return}while(o!==null)}rd(n)}catch(T){t=T,fe===n&&n!==null&&(fe=n=n.return);continue}break}while(!0)}function td(){var e=$l.current;return $l.current=Wl,e===null?Wl:e}function Ni(){(me===0||me===3||me===2)&&(me=4),ve===null||!(sn&268435455)&&!(no&268435455)||_t(ve,we)}function Bl(e,t){var n=Q;Q|=2;var r=td();(ve!==e||we!==t)&&(ht=null,tn(e,t));do try{zp();break}catch(l){ed(e,l)}while(!0);if(si(),Q=n,$l.current=r,fe!==null)throw Error(N(261));return ve=null,we=0,me}function zp(){for(;fe!==null;)nd(fe)}function Dp(){for(;fe!==null&&!af();)nd(fe)}function nd(e){var t=od(e.alternate,e,We);e.memoizedProps=e.pendingProps,t===null?rd(e):fe=t,yi.current=null}function rd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_p(n,t),n!==null){n.flags&=32767,fe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{me=6,fe=null;return}}else if(n=Lp(n,t,We),n!==null){fe=n;return}if(t=t.sibling,t!==null){fe=t;return}fe=t=e}while(t!==null);me===0&&(me=5)}function Gt(e,t,n){var r=Y,l=Ke.transition;try{Ke.transition=null,Y=1,Fp(e,t,n,r)}finally{Ke.transition=l,Y=r}return null}function Fp(e,t,n,r){do Dn();while(Mt!==null);if(Q&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(gf(e,o),e===ve&&(fe=ve=null,we=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||al||(al=!0,sd(Cl,function(){return Dn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ke.transition,Ke.transition=null;var i=Y;Y=1;var a=Q;Q|=4,yi.current=null,Mp(e,n),Gc(n,e),lp(fs),Tl=!!ds,fs=ds=null,e.current=n,Op(n),uf(),Q=a,Y=i,Ke.transition=o}else e.current=n;if(al&&(al=!1,Mt=e,Hl=l),o=e.pendingLanes,o===0&&(Ft=null),ff(n.stateNode),Fe(e,ce()),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(Ul)throw Ul=!1,e=Ms,Ms=null,e;return Hl&1&&e.tag!==0&&Dn(),o=e.pendingLanes,o&1?e===Os?gr++:(gr=0,Os=e):gr=0,Vt(),null}function Dn(){if(Mt!==null){var e=Du(Hl),t=Ke.transition,n=Y;try{if(Ke.transition=null,Y=16>e?16:e,Mt===null)var r=!1;else{if(e=Mt,Mt=null,Hl=0,Q&6)throw Error(N(331));var l=Q;for(Q|=4,M=e.current;M!==null;){var o=M,i=o.child;if(M.flags&16){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var d=a[u];for(M=d;M!==null;){var x=M;switch(x.tag){case 0:case 11:case 15:xr(8,x,o)}var v=x.child;if(v!==null)v.return=x,M=v;else for(;M!==null;){x=M;var h=x.sibling,g=x.return;if(qc(x),x===d){M=null;break}if(h!==null){h.return=g,M=h;break}M=g}}}var y=o.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var P=m.sibling;m.sibling=null,m=P}while(m!==null)}}M=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,M=i;else e:for(;M!==null;){if(o=M,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xr(9,o,o.return)}var f=o.sibling;if(f!==null){f.return=o.return,M=f;break e}M=o.return}}var c=e.current;for(M=c;M!==null;){i=M;var p=i.child;if(i.subtreeFlags&2064&&p!==null)p.return=i,M=p;else e:for(i=c;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:to(9,a)}}catch(T){ae(a,a.return,T)}if(a===i){M=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,M=k;break e}M=a.return}}if(Q=l,Vt(),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Jl,e)}catch{}r=!0}return r}finally{Y=n,Ke.transition=t}}return!1}function $a(e,t,n){t=Hn(n,t),t=Dc(e,t,1),e=Dt(e,t,1),t=Te(),e!==null&&(Dr(e,1,t),Fe(e,t))}function ae(e,t,n){if(e.tag===3)$a(e,e,n);else for(;t!==null;){if(t.tag===3){$a(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ft===null||!Ft.has(r))){e=Hn(n,e),e=Fc(t,e,1),t=Dt(t,e,1),e=Te(),t!==null&&(Dr(t,1,e),Fe(t,e));break}}t=t.return}}function Ap(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Te(),e.pingedLanes|=e.suspendedLanes&n,ve===e&&(we&n)===n&&(me===4||me===3&&(we&130023424)===we&&500>ce()-ki?tn(e,0):wi|=n),Fe(e,t)}function ld(e,t){t===0&&(e.mode&1?(t=Xr,Xr<<=1,!(Xr&130023424)&&(Xr=4194304)):t=1);var n=Te();e=kt(e,t),e!==null&&(Dr(e,t,n),Fe(e,n))}function Wp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ld(e,n)}function $p(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),ld(e,n)}var od;od=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ze.current)Re=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Re=!1,bp(e,t,n);Re=!!(e.flags&131072)}else Re=!1,re&&t.flags&1048576&&uc(t,Il,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;gl(e,t),e=t.pendingProps;var l=An(t,Ce.current);zn(t,n),l=hi(null,t,r,e,l,n);var o=mi();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,De(r)?(o=!0,Ml(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ui(t),l.updater=eo,t.stateNode=l,l._reactInternals=t,ks(t,r,e,n),t=Ns(null,t,r,!0,o,n)):(t.tag=0,re&&o&&ni(t),Ee(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(gl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Hp(r),e=et(r,e),l){case 0:t=Ss(null,t,r,e,n);break e;case 1:t=Pa(null,t,r,e,n);break e;case 11:t=La(null,t,r,e,n);break e;case 14:t=_a(null,t,r,et(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:et(r,l),Ss(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:et(r,l),Pa(e,t,r,l,n);case 3:e:{if(Uc(t),e===null)throw Error(N(387));r=t.pendingProps,o=t.memoizedState,l=o.element,mc(e,t),Dl(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=Hn(Error(N(423)),t),t=Ma(e,t,r,n,l);break e}else if(r!==l){l=Hn(Error(N(424)),t),t=Ma(e,t,r,n,l);break e}else for($e=zt(t.stateNode.containerInfo.firstChild),Ue=t,re=!0,nt=null,n=pc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wn(),r===l){t=jt(e,t,n);break e}Ee(e,t,r,n)}t=t.child}return t;case 5:return xc(t),e===null&&gs(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,ps(r,l)?i=null:o!==null&&ps(r,o)&&(t.flags|=32),$c(e,t),Ee(e,t,i,n),t.child;case 6:return e===null&&gs(t),null;case 13:return Hc(e,t,n);case 4:return ci(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$n(t,null,r,n):Ee(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:et(r,l),La(e,t,r,l,n);case 7:return Ee(e,t,t.pendingProps,n),t.child;case 8:return Ee(e,t,t.pendingProps.children,n),t.child;case 12:return Ee(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,Z(Rl,r._currentValue),r._currentValue=i,o!==null)if(ot(o.value,i)){if(o.children===l.children&&!ze.current){t=jt(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=gt(-1,n&-n),u.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var x=d.pending;x===null?u.next=u:(u.next=x.next,x.next=u),d.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),ys(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),ys(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}Ee(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,zn(t,n),l=Ye(l),r=r(l),t.flags|=1,Ee(e,t,r,n),t.child;case 14:return r=t.type,l=et(r,t.pendingProps),l=et(r.type,l),_a(e,t,r,l,n);case 15:return Ac(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:et(r,l),gl(e,t),t.tag=1,De(r)?(e=!0,Ml(t)):e=!1,zn(t,n),zc(t,r,l),ks(t,r,l,n),Ns(null,t,r,!0,e,n);case 19:return Bc(e,t,n);case 22:return Wc(e,t,n)}throw Error(N(156,t.tag))};function sd(e,t){return Ou(e,t)}function Up(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 qe(e,t,n,r){return new Up(e,t,n,r)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hp(e){if(typeof e=="function")return Ci(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bs)return 11;if(e===Vs)return 14}return 2}function Wt(e,t){var n=e.alternate;return n===null?(n=qe(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 kl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Ci(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case kn:return nn(n.children,l,o,t);case Hs:i=8,l|=8;break;case Vo:return e=qe(12,n,t,l|2),e.elementType=Vo,e.lanes=o,e;case Qo:return e=qe(13,n,t,l),e.elementType=Qo,e.lanes=o,e;case Jo:return e=qe(19,n,t,l),e.elementType=Jo,e.lanes=o,e;case xu:return ro(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hu:i=10;break e;case mu:i=9;break e;case Bs:i=11;break e;case Vs:i=14;break e;case Tt:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=qe(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function nn(e,t,n,r){return e=qe(7,e,r,t),e.lanes=n,e}function ro(e,t,n,r){return e=qe(22,e,r,t),e.elementType=xu,e.lanes=n,e.stateNode={isHidden:!1},e}function zo(e,t,n){return e=qe(6,e,null,t),e.lanes=n,e}function Do(e,t,n){return t=qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bp(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=vo(0),this.expirationTimes=vo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ei(e,t,n,r,l,o,i,a,u){return e=new Bp(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ui(o),e}function Vp(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function id(e){if(!e)return Ut;e=e._reactInternals;e:{if(dn(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(De(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(De(n))return ic(e,n,t)}return t}function ad(e,t,n,r,l,o,i,a,u){return e=Ei(n,r,!0,e,l,o,i,a,u),e.context=id(null),n=e.current,r=Te(),l=At(n),o=gt(r,l),o.callback=t??null,Dt(n,o,l),e.current.lanes=l,Dr(e,l,r),Fe(e,r),e}function lo(e,t,n,r){var l=t.current,o=Te(),i=At(l);return n=id(n),t.context===null?t.context=n:t.pendingContext=n,t=gt(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Dt(l,t,i),e!==null&&(lt(e,l,i,o),ml(e,l,i)),i}function Vl(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 Ua(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ti(e,t){Ua(e,t),(e=e.alternate)&&Ua(e,t)}function Qp(){return null}var ud=typeof reportError=="function"?reportError:function(e){console.error(e)};function bi(e){this._internalRoot=e}oo.prototype.render=bi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));lo(e,t,null,null)};oo.prototype.unmount=bi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;an(function(){lo(null,e,null,null)}),t[wt]=null}};function oo(e){this._internalRoot=e}oo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&t!==0&&t<Lt[n].priority;n++);Lt.splice(n,0,e),n===0&&Uu(e)}};function Li(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function so(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ha(){}function Jp(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var d=Vl(i);o.call(d)}}var i=ad(t,r,e,0,null,!1,!1,"",Ha);return e._reactRootContainer=i,e[wt]=i.current,Tr(e.nodeType===8?e.parentNode:e),an(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var a=r;r=function(){var d=Vl(u);a.call(d)}}var u=Ei(e,0,!1,null,null,!1,!1,"",Ha);return e._reactRootContainer=u,e[wt]=u.current,Tr(e.nodeType===8?e.parentNode:e),an(function(){lo(t,u,n,r)}),u}function io(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=Vl(i);a.call(u)}}lo(t,i,e,l)}else i=Jp(n,t,e,l,r);return Vl(i)}Fu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ar(t.pendingLanes);n!==0&&(qs(t,n|1),Fe(t,ce()),!(Q&6)&&(Bn=ce()+500,Vt()))}break;case 13:an(function(){var r=kt(e,1);if(r!==null){var l=Te();lt(r,e,1,l)}}),Ti(e,1)}};Ks=function(e){if(e.tag===13){var t=kt(e,134217728);if(t!==null){var n=Te();lt(t,e,134217728,n)}Ti(e,134217728)}};Au=function(e){if(e.tag===13){var t=At(e),n=kt(e,t);if(n!==null){var r=Te();lt(n,e,t,r)}Ti(e,t)}};Wu=function(){return Y};$u=function(e,t){var n=Y;try{return Y=e,t()}finally{Y=n}};rs=function(e,t,n){switch(t){case"input":if(Yo(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=Gl(r);if(!l)throw Error(N(90));gu(r),Yo(r,l)}}}break;case"textarea":wu(e,n);break;case"select":t=n.value,t!=null&&Mn(e,!!n.multiple,t,!1)}};Tu=ji;bu=an;var qp={usingClientEntryPoint:!1,Events:[Ar,Cn,Gl,Cu,Eu,ji]},or={findFiberByHostInstance:Xt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Kp={bundleType:or.bundleType,version:or.version,rendererPackageName:or.rendererPackageName,rendererConfig:or.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:St.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Pu(e),e===null?null:e.stateNode},findFiberByHostInstance:or.findFiberByHostInstance||Qp,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 ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ul.isDisabled&&ul.supportsFiber)try{Jl=ul.inject(Kp),ut=ul}catch{}}Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qp;Be.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Li(t))throw Error(N(200));return Vp(e,t,null,n)};Be.createRoot=function(e,t){if(!Li(e))throw Error(N(299));var n=!1,r="",l=ud;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Ei(e,1,!1,null,null,n,!1,r,l),e[wt]=t.current,Tr(e.nodeType===8?e.parentNode:e),new bi(t)};Be.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=Pu(t),e=e===null?null:e.stateNode,e};Be.flushSync=function(e){return an(e)};Be.hydrate=function(e,t,n){if(!so(t))throw Error(N(200));return io(null,e,t,!0,n)};Be.hydrateRoot=function(e,t,n){if(!Li(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",i=ud;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=ad(t,null,e,1,n??null,l,!1,o,i),e[wt]=t.current,Tr(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 oo(t)};Be.render=function(e,t,n){if(!so(t))throw Error(N(200));return io(null,e,t,!1,n)};Be.unmountComponentAtNode=function(e){if(!so(e))throw Error(N(40));return e._reactRootContainer?(an(function(){io(null,null,e,!1,function(){e._reactRootContainer=null,e[wt]=null})}),!0):!1};Be.unstable_batchedUpdates=ji;Be.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!so(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return io(e,t,n,!1,r)};Be.version="18.3.1-next-f1338f8080-20240426";function cd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cd)}catch(e){console.error(e)}}cd(),cu.exports=Be;var Yp=cu.exports,Ba=Yp;Ho.createRoot=Ba.createRoot,Ho.hydrateRoot=Ba.hydrateRoot;function Gp({schema:e,selectedFunction:t,onSelectFunction:n}){const[r,l]=E.useState(new Set),[o,i]=E.useState(""),a=E.useRef(null);E.useEffect(()=>{if(t){const g=t.path.lastIndexOf(":"),m=(g>-1?t.path.substring(0,g):t.path).split("/"),P=[];for(let f=0;f<m.length;f++)P.push(m.slice(0,f+1).join("/"));P.length>0&&l(f=>{const c=new Set(f);return P.forEach(p=>c.add(p)),c}),setTimeout(()=>{var c;const f=(c=a.current)==null?void 0:c.querySelector(`[data-function-path="${t.path}"]`);f&&f.scrollIntoView({behavior:"smooth",block:"nearest"})},100)}},[t]);const u=g=>{l(y=>{const m=new Set(y);return m.has(g)?m.delete(g):m.add(g),m})},d=g=>{if(!o)return g;const y=o.toLowerCase();return g.map(m=>{const P=m.functions.filter(c=>c.name.toLowerCase().includes(y)||c.path.toLowerCase().includes(y)),f=d(m.children);return P.length>0||f.length>0?{...m,functions:P,children:f}:null}).filter(m=>m!==null)},x=(g,y=0)=>{const m=r.has(g.path)||o.length>0,P=g.functions.length>0||g.children.length>0;return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>u(g.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:`${y*12+12}px`},children:[P&&s.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${m?"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:g.name})]}),m&&s.jsxs(s.Fragment,{children:[g.functions.map(f=>v(f,y+1)),g.children.map(f=>x(f,y+1))]})]},g.path)},v=(g,y)=>{const m=(t==null?void 0:t.path)===g.path,P={query:"text-blue-400",mutation:"text-orange-400",action:"text-purple-400"},f={query:"bg-blue-900/30",mutation:"bg-orange-900/30",action:"bg-purple-900/30"};return s.jsxs("button",{"data-function-path":g.path,"data-selected":m,onClick:()=>n(g),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left text-sm transition-colors ${m?"bg-convex-accent/20 text-white":"hover:bg-convex-border text-gray-400"}`,style:{paddingLeft:`${y*12+12}px`},children:[s.jsx("span",{className:`text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded ${P[g.type]} ${f[g.type]}`,children:g.type.charAt(0).toUpperCase()}),s.jsx("span",{className:m?"text-white":"text-gray-300",children:g.name})]},g.path)},h=e?d(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:g=>i(g.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(g=>x(g)):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 Xp({schema:e,selectedTable:t,onSelectTable:n}){const[r,l]=E.useState(""),o=E.useMemo(()=>{if(!e)return[];if(!r.trim())return e.tables;const u=r.toLowerCase();return e.tables.filter(d=>d.name.toLowerCase().includes(u)?!0:d.fields.some(x=>x.name.toLowerCase().includes(u)))},[e,r]),i=u=>{const d=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 ${d?"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 ${d?"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 Zp={},Va=e=>{let t;const n=new Set,r=(x,v)=>{const h=typeof x=="function"?x(t):x;if(!Object.is(h,t)){const g=t;t=v??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(y=>y(t,g))}},l=()=>t,u={setState:r,getState:l,getInitialState:()=>d,subscribe:x=>(n.add(x),()=>n.delete(x)),destroy:()=>{(Zp?"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()}},d=t=e(r,l,u);return u},eh=e=>e?Va(e):Va;var dd={exports:{}},fd={},pd={exports:{}},hd={};/**
|
|
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 Vn=E;function th(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nh=typeof Object.is=="function"?Object.is:th,rh=Vn.useState,lh=Vn.useEffect,oh=Vn.useLayoutEffect,sh=Vn.useDebugValue;function ih(e,t){var n=t(),r=rh({inst:{value:n,getSnapshot:t}}),l=r[0].inst,o=r[1];return oh(function(){l.value=n,l.getSnapshot=t,Fo(l)&&o({inst:l})},[e,n,t]),lh(function(){return Fo(l)&&o({inst:l}),e(function(){Fo(l)&&o({inst:l})})},[e]),sh(n),n}function Fo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nh(e,n)}catch{return!0}}function ah(e,t){return t()}var uh=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ah:ih;hd.useSyncExternalStore=Vn.useSyncExternalStore!==void 0?Vn.useSyncExternalStore:uh;pd.exports=hd;var ch=pd.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 ao=E,dh=ch;function fh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ph=typeof Object.is=="function"?Object.is:fh,hh=dh.useSyncExternalStore,mh=ao.useRef,xh=ao.useEffect,vh=ao.useMemo,gh=ao.useDebugValue;fd.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var o=mh(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=vh(function(){function u(g){if(!d){if(d=!0,x=g,g=r(g),l!==void 0&&i.hasValue){var y=i.value;if(l(y,g))return v=y}return v=g}if(y=v,ph(x,g))return y;var m=r(g);return l!==void 0&&l(y,m)?(x=g,y):(x=g,v=m)}var d=!1,x,v,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=hh(e,o[0],o[1]);return xh(function(){i.hasValue=!0,i.value=a},[a]),gh(a),a};dd.exports=fd;var yh=dd.exports;const wh=Ga(yh),md={},{useDebugValue:kh}=au,{useSyncExternalStoreWithSelector:jh}=wh;let Qa=!1;const Sh=e=>e;function Nh(e,t=Sh,n){(md?"production":void 0)!=="production"&&n&&!Qa&&(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"),Qa=!0);const r=jh(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return kh(r),r}const Ja=e=>{(md?"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"?eh(e):e,n=(r,l)=>Nh(t,r,l);return Object.assign(n,t),n},uo=e=>e?Ja(e):Ja,xd="convex-devtools-drafts",vd="convex-devtools-recent-tabs",Ch=()=>{try{const e=localStorage.getItem(xd);if(e)return JSON.parse(e)}catch{}return{}},gn=e=>{try{localStorage.setItem(xd,JSON.stringify(e))}catch{}},Eh=()=>{try{const e=localStorage.getItem(vd);if(e)return JSON.parse(e)}catch{}return[]},qa=e=>{try{localStorage.setItem(vd,JSON.stringify(e))}catch{}},un=uo((e,t)=>({selectedFunction:null,args:"{}",jwtToken:"",projectName:"",response:null,isLoading:!1,isArgsValid:!0,argsError:null,drafts:Ch(),recentTabs:Eh(),setSelectedFunction:n=>{const{selectedFunction:r,args:l,response:o}=t();if(r){const u={...t().drafts};u[r.path]={args:l,response:o},gn(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(d=>{if(d.name==="paginationOpts"){u[d.name]={cursor:null,numItems:10};return}d.optional||(d.type.includes("[]")||d.type.toLowerCase().includes("array")?u[d.name]=[]:u[d.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}};gn(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}};gn(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}};gn(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}};gn(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},gn(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}),qa(l)},removeFromRecentTabs:n=>{const{recentTabs:r}=t(),l=r.filter(o=>o.path!==n);e({recentTabs:l}),qa(l)}})),Th="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let yn=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Th[n[e]&63];return t};const Ka="convex-devtools-data",Ao="convex-devtools-jwt-token",$r=uo((e,t)=>({collections:[],subfolders:[],history:[],dataHistory:[],savedToken:"",createCollection:(n,r)=>{const l=yn(),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=yn(),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:yn(),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(Ao,n):localStorage.removeItem(Ao)}catch(r){console.error("Failed to save token to localStorage:",r)}},loadSavedToken:()=>{try{const n=localStorage.getItem(Ao)||"";return e({savedToken:n}),n}catch(n){return console.error("Failed to load token from localStorage:",n),""}},addToHistory:n=>{const r={id:yn(),...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:yn(),...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(Ka);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(Ka,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.1",exportedAt:new Date().toISOString(),collections:n}},importData:n=>{if(n.version!=="1.1.1")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 bh(){const{selectedFunction:e,recentTabs:t,removeFromRecentTabs:n,setSelectedFunction:r,args:l,jwtToken:o,isLoading:i,projectName:a,setArgs:u,invoke:d,isArgsValid:x,argsError:v}=un(),{collections:h,saveRequest:g,addToHistory:y}=$r(),[m,P]=E.useState(!1),[f,c]=E.useState(""),[p,k]=E.useState(""),T=E.useRef(null);E.useEffect(()=>{!e&&t.length>0&&r(t[0])},[e,t,r]);const L=async()=>{try{const q=JSON.parse(l);u(JSON.stringify(q,null,2))}catch{}await d();const{response:S}=un.getState();e&&S&&y({projectName:a||void 0,functionPath:e.path,functionType:e.type,args:l,response:S,timestamp:new Date().toISOString()})},_=()=>{e&&c(e.path),P(!0)},I=()=>{!e||!f||!p||(g(p,f,{functionPath:e.path,functionType:e.type,args:l}),P(!1),c(""),k(""))},W=()=>{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||!x,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 q=(e==null?void 0:e.path)===S.path,G=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 ${q?"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 ${G}`,children:S.type.charAt(0).toUpperCase()}),s.jsx("span",{className:"truncate",children:S.name})]}),s.jsx("button",{onClick:ge=>{ge.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:W,className:"text-xs text-gray-500 hover:text-white transition-colors",children:"Format"}),s.jsx("div",{className:"text-xs",children:x?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:v||"",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 q=(()=>{try{return JSON.parse(l)}catch{return{}}})(),G=S.name in q,ge=()=>{try{const J=JSON.parse(l);G?delete J[S.name]:S.name==="paginationOpts"?J[S.name]={cursor:null,numItems:10}:S.type.includes("[]")||S.type.toLowerCase().includes("array")?J[S.name]=[]:S.type.toLowerCase().includes("number")?J[S.name]=0:S.type.toLowerCase().includes("boolean")?J[S.name]=!1:J[S.name]="",u(JSON.stringify(J,null,2))}catch{}};return s.jsx("div",{className:`p-2 rounded border ${G?"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(J=>s.jsx("span",{onClick:()=>{try{const X=JSON.parse(l);X[S.name]=J,u(JSON.stringify(X,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 '${J}'`,children:J},J))})]}),s.jsx("button",{onClick:ge,disabled:!S.optional&&G,className:`flex-shrink-0 p-1 rounded transition-colors ${!S.optional&&G?"text-gray-600 cursor-not-allowed":G?"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&&G?"Required argument":G?"Remove from request":"Add to request",children:G?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"})]})})}),m&&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:f,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=>k(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:()=>P(!1),className:"px-4 py-2 text-sm text-gray-400 hover:text-white transition-colors",children:"Cancel"}),s.jsx("button",{onClick:I,disabled:!f||!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 Lh(){var x,v,h,g;const{response:e,isLoading:t,selectedFunction:n}=un(),[r,l]=E.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=y=>{try{return JSON.stringify(y,null,2)}catch{return String(y)}},i=y=>y.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,m=>{let P="json-number";return/^"/.test(m)?/:$/.test(m)?P="json-key":P="json-string":/true|false/.test(m)?P="json-boolean":/null/.test(m)&&(P="json-null"),`<span class="${P}">${m}</span>`}),a=(y,m)=>{if(!m.trim())return y;try{const P=m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),f=new RegExp(`(${P})(?![^<]*>)`,"gi");return y.replace(f,'<mark class="bg-yellow-300 text-black rounded px-0.5">$1</mark>')}catch{return y}},u=async()=>{try{await navigator.clipboard.writeText(o(e.success?e.result:e.error))}catch(y){console.error("Failed to copy:",y)}},d=!e.success||e.success&&e.result&&typeof e.result=="object"&&((x=e.result)==null?void 0:x.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:[d?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:y=>l(y.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:(v=e.error)==null?void 0:v.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]})]})]})}),((g=e.error)==null?void 0:g.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 _i=uo((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}))}})),_h=25,Pi=[10,25,50,100],gd="convex-devtools-columns",yd="convex-devtools-page-size",wd="convex-devtools-data-tabs",Ya=e=>JSON.stringify({table:e||"",filters:[],order:"desc"},null,2),Ph=()=>{try{const e=localStorage.getItem(gd);if(e)return JSON.parse(e)}catch{}return{}},Wo=e=>{try{localStorage.setItem(gd,JSON.stringify(e))}catch{}},Mh=()=>{try{const e=localStorage.getItem(yd);if(e){const t=Number(e);if(Pi.includes(t))return t}}catch{}return _h},Oh=e=>{try{localStorage.setItem(yd,String(e))}catch{}},Ih=()=>{try{const e=localStorage.getItem(wd);if(e)return JSON.parse(e)}catch{}return[]},$o=e=>{try{localStorage.setItem(wd,JSON.stringify(e))}catch{}},co=uo((e,t)=>({selectedTable:null,queryText:Ya(),response:null,isLoading:!1,isQueryValid:!0,queryError:null,helperInstalled:null,helperSupportsWrites:null,helperError:null,queryMode:"json",uiFilters:[],uiOrder:"desc",columnsByTable:Ph(),pageSize:Mh(),pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0,recentTabs:Ih(),insertText:JSON.stringify({},null,2),updateId:"",updateText:JSON.stringify({},null,2),isWriting:!1,writeResponse:null,setSelectedTable:n=>{const{queryText:r,selectedTable:l}=t();if(!n){e({selectedTable:null});return}if(l!==n){try{const o=JSON.parse(r||"{}");o.table=n,e({selectedTable:n,queryText:JSON.stringify(o,null,2),uiFilters:[],isQueryValid:!0,queryError:null,response:null,isLoading:!1,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0})}catch{e({selectedTable:n,queryText:Ya(n),uiFilters:[],isQueryValid:!0,queryError:null,response:null,isLoading:!1,pageCursor:null,nextCursor:null,hasNextPage:!1,cursorStack:[],clientPageIndex:0})}if(t().queryMode==="ui"){const{uiOrder:o}=t();e({queryText:JSON.stringify(Kt(n,[],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=Kt(r,l,o);e({queryText:JSON.stringify(i,null,2),isQueryValid:!0,queryError:null})}},setInsertText:n=>e({insertText:n}),setUpdateId:n=>e({updateId:n}),setUpdateText:n=>e({updateText:n}),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(Kt(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(Kt(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(Kt(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(Kt(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(Kt(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=>{Pi.includes(n)&&(Oh(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}),$o(u);return}const o=[{id:yn(),createdAt:new Date().toISOString(),...n},...r].slice(0,10);e({recentTabs:o}),$o(o)},removeFromRecentTabs:n=>{const r=t().recentTabs.filter(l=>l.id!==n);e({recentTabs:r}),$o(r)},checkHelper:async()=>{try{const r=await(await fetch("/api/devtools/status")).json();e({helperInstalled:!!r.installed,helperSupportsWrites:!!r.supportsWrites,helperError:null})}catch(n){e({helperInstalled:!1,helperSupportsWrites:!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,helperSupportsWrites:!0,helperError:null})}catch(n){e({helperInstalled:!1,helperSupportsWrites:!1,helperError:(n==null?void 0:n.message)||"Failed to install helper"})}},updateHelper:async()=>{e({helperError:null});try{const n=await fetch("/api/devtools/helper/update",{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 update helper");e({helperInstalled:!0,helperSupportsWrites:!0,helperError:null})}catch(n){e({helperInstalled:!1,helperSupportsWrites:!1,helperError:(n==null?void 0:n.message)||"Failed to update helper"})}},runQuery:async()=>{const{queryText:n,isQueryValid:r,pageSize:l,pageCursor:o,queryMode:i,selectedTable:a,uiFilters:u,uiOrder:d}=t();if(i==="json"&&!r)return;let x={};if(i==="json")try{x=JSON.parse(n)}catch(v){e({response:{success:!1,error:{message:(v==null?void 0:v.message)||"Invalid JSON in query"},timestamp:new Date().toISOString()},isLoading:!1});return}else{if(!a){e({response:{success:!1,error:{message:"Select a table in the schema explorer"},timestamp:new Date().toISOString()},isLoading:!1});return}const v=u.filter(h=>h.field&&h.op&&h.value!=="").map(h=>({field:h.field,op:h.op,value:kd(h.value)}));x={table:a,filters:v,order:d}}e({isLoading:!0});try{const h=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:(h==null?void 0:h.cursor)??o??null,numItems:(h==null?void 0:h.numItems)??l}})}),y=await g.json(),m=Uo(g.ok,y);if(m!=null&&m.result&&typeof m.result=="object"&&"status"in m.result&&m.result.status==="success"&&"value"in m.result){const p=m.result.value;if(p&&typeof p=="object"&&"page"in p?m.result=p.page:m.result=p,p&&typeof p=="object"&&"continueCursor"in p){const k=p.continueCursor??null,T=!!p.isDone;m.pageInfo={cursor:k,hasNextPage:!T}}}else m!=null&&m.result&&typeof m.result=="object"&&"page"in m.result&&(m.result=m.result.page);const P=m==null?void 0:m.pageInfo;e({response:m,isLoading:!1,nextCursor:(P==null?void 0:P.cursor)??null,hasNextPage:(P==null?void 0:P.hasNextPage)??!1});const f=i==="json"?String(x.table||""):a||"";f&&t().addToRecentTabs({table:f,queryMode:i,queryText:n,uiFilters:i==="ui"?u:void 0,uiOrder:i==="ui"?d:void 0,response:m});const c=i==="json"?String(x.table||""):a||"";c&&$r.getState().addToDataHistory({projectName:void 0,table:c,queryMode:i,queryText:n,uiFilters:i==="ui"?u:void 0,uiOrder:i==="ui"?d:void 0,response:m,timestamp:new Date().toISOString()})}catch(v){e({isLoading:!1,response:{success:!1,error:{message:(v==null?void 0:v.message)||"Request failed"},timestamp:new Date().toISOString()},nextCursor:null,hasNextPage:!1})}},runInsert:async()=>{const{selectedTable:n,insertText:r}=t();if(!n){e({writeResponse:{success:!1,error:{message:"Select a table in the schema explorer"},timestamp:new Date().toISOString()}});return}let l={};try{l=JSON.parse(r)}catch(o){e({writeResponse:{success:!1,error:{message:(o==null?void 0:o.message)||"Invalid JSON"},timestamp:new Date().toISOString()}});return}e({isWriting:!0});try{const o=await fetch("/api/devtools/insert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({table:n,data:l})}),i=await o.json(),a=Uo(o.ok,i);e({writeResponse:a,isWriting:!1})}catch(o){e({isWriting:!1,writeResponse:{success:!1,error:{message:(o==null?void 0:o.message)||"Request failed"},timestamp:new Date().toISOString()}})}},runUpdate:async()=>{const{updateId:n,updateText:r}=t();if(!n.trim()){e({writeResponse:{success:!1,error:{message:"Document id is required"},timestamp:new Date().toISOString()}});return}let l={};try{l=JSON.parse(r)}catch(o){e({writeResponse:{success:!1,error:{message:(o==null?void 0:o.message)||"Invalid JSON"},timestamp:new Date().toISOString()}});return}e({isWriting:!0});try{const o=await fetch("/api/devtools/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:n.trim(),data:l})}),i=await o.json(),a=Uo(o.ok,i);e({writeResponse:a,isWriting:!1})}catch(o){e({isWriting:!1,writeResponse:{success:!1,error:{message:(o==null?void 0:o.message)||"Request failed"},timestamp:new Date().toISOString()}})}},clearResponse:()=>e({response:null}),clearWriteResponse:()=>e({writeResponse:null})})),kd=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},Kt=(e,t,n)=>{const r=t.filter(l=>l.field&&l.op&&l.value!=="").map(l=>({field:l.field,op:l.op,value:kd(l.value)}));return{table:e,filters:r,order:n}},Uo=(e,t)=>{const n={...t};return"success"in n||(n.success=e),typeof n.error=="string"?n.error={message:n.error}:n.error&&typeof n.error=="object"&&!n.error.message&&(n.error={message:JSON.stringify(n.error)}),n};function Rh(){const{schema:e}=_i(),{selectedTable:t,queryText:n,isQueryValid:r,queryError:l,helperInstalled:o,helperSupportsWrites:i,helperError:a,queryMode:u,uiFilters:d,uiOrder:x,recentTabs:v,setSelectedTable:h,setQueryText:g,setQueryMode:y,addUiFilter:m,updateUiFilter:P,removeUiFilter:f,setUiFilters:c,setUiOrder:p,setResponse:k,removeFromRecentTabs:T,resetPagination:L,checkHelper:_,installHelper:I,updateHelper:W,runQuery:D}=co();E.useEffect(()=>{_()},[_]);const S=E.useMemo(()=>(e==null?void 0:e.tables)||[],[e]);E.useEffect(()=>{!t&&S.length>0&&h(S[0].name)},[t,h,S]);const q=E.useMemo(()=>{if(!e||!t)return[];const R=e.tables.find(ue=>ue.name===t),V=[...R?R.fields.map(ue=>ue.name):[]];return V.includes("_id")||V.unshift("_id"),V.includes("_creationTime")||V.unshift("_creationTime"),V},[e,t]),[G,ge]=E.useState(!1),[J,X]=E.useState(368),[_e,C]=E.useState(!1),O=u==="json",z=u==="ui";E.useEffect(()=>{if(!_e)return;const R=V=>{const ue=Math.min(520,Math.max(260,window.innerWidth-V.clientX));X(ue)},B=()=>C(!1);return window.addEventListener("mousemove",R),window.addEventListener("mouseup",B),()=>{window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",B)}},[_e]);const $=async()=>{await D()},K=R=>{y(R.queryMode),h(R.table),R.queryMode==="ui"?(p(R.uiOrder??"desc"),c(R.uiFilters??[]),R.uiFilters||g(R.queryText)):g(R.queryText),k(R.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.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s.jsxs("button",{onClick:$,disabled:!r||o===!1,className:`btn-compact font-medium text-sm transition-colors flex items-center gap-1.5 min-w-[70px] justify-center ${!r||o===!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:v.length===0?s.jsx("span",{className:"text-xs text-gray-500 px-2",children:"Recent queries will appear here"}):v.map(R=>{const B=t===R.table&&u===R.queryMode&&n===R.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 ${B?"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:`${R.table} (${R.queryMode})`,children:[s.jsxs("button",{onClick:()=>K(R),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:R.table}),s.jsx("span",{className:"text-[10px] text-gray-400 uppercase",children:R.queryMode})]}),s.jsx("button",{onClick:V=>{V.stopPropagation(),T(R.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"})})})]},R.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:G?{paddingRight:J+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:t||"Select in Schema"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsx("button",{onClick:()=>y("ui"),className:`px-2 py-1 text-xs rounded ${z?"bg-convex-accent text-white":"text-gray-400 hover:bg-convex-border"}`,children:"Builder"}),s.jsx("button",{onClick:()=>y("json"),className:`px-2 py-1 text-xs rounded ${O?"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()"}),"."]}),o===!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 helper not found in your project. Install it to run schema queries and writes."}),s.jsx("button",{onClick:()=>void I(),className:"px-3 py-1 rounded bg-convex-accent hover:bg-convex-accent-hover text-white text-xs",children:"Install Helper"})]}),o&&i===!1&&s.jsxs("div",{className:"bg-amber-900/20 border border-amber-800 rounded-lg p-3 text-sm text-amber-300 flex items-center justify-between gap-3",children:[s.jsx("div",{children:"Devtools helper needs an update to enable writes."}),s.jsx("button",{onClick:()=>void W(),className:"px-3 py-1 rounded bg-amber-500 hover:bg-amber-400 text-black text-xs",children:"Update 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 gap-3",children:[s.jsx("label",{className:"text-sm text-gray-400",children:"Query (JSON)"}),s.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[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
|
+
}`})]})]}),s.jsx("button",{onClick:()=>ge(R=>!R),className:"px-2 py-1 text-xs rounded border border-convex-border text-gray-400 hover:bg-convex-border",children:"Fields"})]}),!r&&l&&s.jsx("span",{className:"text-xs text-red-400",children:l})]}),s.jsx("textarea",{value:n,onChange:R=>g(R.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 justify-between gap-3",children:[s.jsx("label",{className:"text-sm text-gray-400",children:"Order"}),s.jsxs("select",{className:"input-control",value:x,onChange:R=>p(R.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:()=>m(),className:"px-2 py-1 rounded border border-convex-border text-gray-300 hover:bg-convex-border text-xs ml-auto",children:"Add filter"})]}),d.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:d.map((R,B)=>s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s.jsxs("select",{className:"input-control",value:R.field,onChange:V=>P(B,{field:V.target.value}),children:[s.jsx("option",{value:"",children:"Field"}),q.map(V=>s.jsx("option",{value:V,children:V},V))]}),s.jsxs("select",{className:"input-control",value:R.op,onChange:V=>P(B,{op:V.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:R.value,onChange:V=>P(B,{value:V.target.value}),className:"flex-1 input-control"}),s.jsx("button",{onClick:()=>f(B),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-${B}`))})]})]}),G&&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:J},onMouseDown:()=>C(!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:J},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:t?`${t} fields`:"Fields",children:t?`${t} fields`:"Fields"}),s.jsxs("span",{className:"text-xs text-gray-500",children:[q.length," fields"]}),s.jsx("button",{onClick:()=>ge(!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:q.length===0?s.jsx("div",{className:"text-xs text-gray-500 py-2",children:"Select a table in the schema panel to view fields."}):q.map(R=>{var V;const B=(V=e==null?void 0:e.tables.find(ue=>ue.name===t))==null?void 0:V.fields.find(ue=>ue.name===R);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:R}),s.jsx("span",{className:"text-gray-500 text-right truncate",children:B?`${B.optional?"optional":"required"} · ${B.type}`:""})]},`${t}.${R}`)})})]})]})]})]})]})}const jd=({value:e})=>{const[t,n]=E.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})})]})},zh=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(jd,{value:e});function Dh({rows:e,columns:t,renderCell:n=zh,renderRowActions:r,actionsHeader:l="",prependRow:o}){return e.length===0&&!o?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.jsxs("tr",{children:[t.map(i=>s.jsx("th",{className:"text-left px-3 py-2 font-semibold text-gray-300 border-b border-convex-border whitespace-nowrap",children:i},i)),r&&s.jsx("th",{className:"text-left px-3 py-2 font-semibold text-gray-300 border-b border-convex-border whitespace-nowrap",children:l})]})}),s.jsxs("tbody",{children:[o,e.map((i,a)=>{const u=i._id,d=u!=null?String(u):String(a);return s.jsxs("tr",{className:"border-b border-convex-border hover:bg-convex-darker/60",children:[t.map(x=>s.jsx("td",{className:"px-3 py-2 align-top whitespace-nowrap text-gray-200",children:n(i[x],x,i,a)},`${a}-${x}`)),r&&s.jsx("td",{className:"px-3 py-2 align-top whitespace-nowrap text-gray-200",children:r(i,a)})]},d)})]})]})})}function Fh(){var Mi,Oi,Ii,Ri;const{schema:e}=_i(),{response:t,isLoading:n,selectedTable:r,columnsByTable:l,setColumnsForTable:o,toggleColumn:i,clearColumns:a,pageSize:u,setPageSize:d,hasNextPage:x,cursorStack:v,nextPage:h,prevPage:g,runQuery:y,clientPageIndex:m,setClientPageIndex:P}=co(),[f,c]=E.useState(""),[p,k]=E.useState("table"),[T,L]=E.useState(!1),[_,I]=E.useState("rows"),[W,D]=E.useState({}),[S,q]=E.useState(null),[G,ge]=E.useState(null),[J,X]=E.useState(null),[_e,C]=E.useState(!1),[O,z]=E.useState({}),[$,K]=E.useState(!1),R=j=>{try{return JSON.stringify(j,null,2)}catch{return String(j)}},B=j=>j.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,b=>{let A="json-number";return/^"/.test(b)?/:$/.test(b)?A="json-key":A="json-string":/true|false/.test(b)?A="json-boolean":/null/.test(b)&&(A="json-null"),`<span class="${A}">${b}</span>`}),V=(j,b)=>{if(!b.trim())return j;try{const A=b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),le=new RegExp(`(${A})(?![^<]*>)`,"gi");return j.replace(le,'<mark class="bg-yellow-300 text-black rounded px-0.5">$1</mark>')}catch{return j}},ue=async()=>{try{await navigator.clipboard.writeText(R(t!=null&&t.success?t==null?void 0:t.result:t==null?void 0:t.error))}catch(j){console.error("Failed to copy:",j)}},de="block max-w-[320px] truncate",Nt=E.useMemo(()=>new Set(["_id","_creationTime"]),[]),dt=j=>{if(j==null)return"";if(typeof j=="string")return j;if(typeof j=="number"||typeof j=="boolean")return String(j);try{return JSON.stringify(j)}catch{return String(j)}},Ur=j=>{const b=j.trim();if(b==="")return"";if(b==="true")return!0;if(b==="false")return!1;if(b==="null")return null;if(b.match(/^-?\d+(\.\d+)?$/))return Number(b);if(b.startsWith("{")&&b.endsWith("}")||b.startsWith("[")&&b.endsWith("]")||b.startsWith('"')&&b.endsWith('"'))try{return JSON.parse(b)}catch{return j}return j},fn=(j,b)=>{const A=j._id;return A!=null?String(A):String(b)},Ae=E.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]),pn=E.useMemo(()=>{if(!e||!r)return[];const j=e.tables.find(b=>b.name===r);return j?j.fields.map(b=>b.name):[]},[e,r]),Xe=E.useMemo(()=>{const j=pn.length>0?[...pn]:[];if(j.length===0){const b=new Set;Ae.forEach(A=>{Object.keys(A).forEach(le=>b.add(le))}),j.push(...Array.from(b))}return j.includes("_id")||Ae.some(b=>"_id"in b)&&j.unshift("_id"),j.includes("_creationTime")||Ae.some(b=>"_creationTime"in b)&&j.unshift("_creationTime"),j},[pn,Ae]),ft=E.useMemo(()=>{if(!r)return Xe;const j=l[r];return j===void 0?Xe:j.filter(b=>Xe.includes(b))},[Xe,l,r]),Hr=E.useMemo(()=>ft.filter(j=>!Nt.has(j)),[Nt,ft]);E.useEffect(()=>{if(!r)return;l[r]===void 0&&Xe.length>0&&o(r,Xe)},[Xe,l,r,o]);const Kn=E.useMemo(()=>{if(!t||!t.success)return[];if(!Array.isArray(t.result))return[];if(t!=null&&t.pageInfo)return Ae;const j=m*u,b=j+u;return Ae.slice(j,b)},[m,u,t,Ae]),Qt=E.useMemo(()=>{if(!f.trim())return Kn;const j=f.toLowerCase();return Kn.filter(b=>JSON.stringify(b).toLowerCase().includes(j))},[f,Kn]),Br=E.useMemo(()=>!t||t!=null&&t.pageInfo||!t.success||!Array.isArray(t.result)?1:Math.max(1,Math.ceil(Ae.length/u)),[u,t,Ae]),Vr=async()=>{if(t!=null&&t.pageInfo){h(),await y();return}m+1<Br&&P(m+1)},Yn=async()=>{if(t!=null&&t.pageInfo){g(),await y();return}m>0&&P(m-1)},hn=t!=null&&t.pageInfo?v.length>0:m>0,Gn=t!=null&&t.pageInfo?x:m+1<Br,Qr=t!=null&&t.pageInfo?`${Qt.length} rows`:`${Qt.length} of ${Ae.length} rows`,mn=!(t!=null&&t.success)||(t==null?void 0:t.success)&&t.result&&typeof t.result=="object"&&((Mi=t.result)==null?void 0:Mi.status)==="error",w=j=>W[j]&&Object.keys(W[j]).length>0,F=E.useMemo(()=>Object.keys(W).filter(j=>w(j)),[W]),U=E.useMemo(()=>S&&w(S.rowId)?S.rowId:F[0]??null,[S,F]),ne=(j,b,A)=>{D(le=>{const pe={...le[j]||{},[b]:A};return{...le,[j]:pe}})},Ct=j=>{D(b=>{const A={...b};return delete A[j],A}),(S==null?void 0:S.rowId)===j&&q(null)},Jt=async(j,b)=>{var Pe;const A=fn(j,b),le=W[A];if(!le)return;if(!r){X("Select a table to save changes.");return}const pe={};for(const[Me,Oe]of Object.entries(le)){if(Nt.has(Me))continue;const pt=Ur(Oe),qt=j[Me];(typeof pt=="object"?JSON.stringify(pt)!==JSON.stringify(qt):!Object.is(pt,qt))&&(pe[Me]=pt)}if(Object.keys(pe).length===0){Ct(A);return}ge(A),X(null);try{const Me=await fetch("/api/devtools/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:A,data:pe})}),Oe=await Me.json();if(!Me.ok||(Oe==null?void 0:Oe.success)===!1){const pt=((Pe=Oe==null?void 0:Oe.error)==null?void 0:Pe.message)||(Oe==null?void 0:Oe.error)||"Failed to update row";X(pt)}else Ct(A),await y()}catch(Me){X((Me==null?void 0:Me.message)||"Failed to update row")}finally{ge(null)}},xn=async()=>{var b;if(!r){X("Select a table to insert into.");return}const j={};for(const[A,le]of Object.entries(O))Nt.has(A)||(j[A]=Ur(le));if(Object.keys(j).length===0){X("Add at least one field before inserting.");return}K(!0),X(null);try{const A=await fetch("/api/devtools/insert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({table:r,data:j})}),le=await A.json();if(!A.ok||(le==null?void 0:le.success)===!1){const pe=((b=le==null?void 0:le.error)==null?void 0:b.message)||(le==null?void 0:le.error)||"Failed to insert row";X(pe)}else z({}),C(!1),await y()}catch(A){X((A==null?void 0:A.message)||"Failed to insert row")}finally{K(!1)}};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:[mn?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:f,onChange:j=>c(j.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:ue,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:()=>I(_==="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:()=>k(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"})]})]}),!mn&&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:Qr}),!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:j=>d(Number(j.target.value)),children:Pi.map(j=>s.jsx("option",{value:j,children:j},j))})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:Yn,disabled:!hn,className:`px-2 py-1 rounded border text-xs ${hn?"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:Vr,disabled:!Gn,className:`px-2 py-1 rounded border text-xs ${Gn?"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:()=>{C(!0),X(null)},className:"px-2 py-1 rounded border text-xs border-convex-border text-gray-300 hover:bg-convex-border",children:"New row"}),_e&&s.jsxs("div",{className:"flex items-center gap-1 ml-1",children:[s.jsx("button",{onClick:xn,disabled:$||Hr.length===0,className:`px-2 py-1 rounded text-xs font-semibold ${$||Hr.length===0?"bg-gray-600 text-gray-300 cursor-not-allowed":"bg-green-500 text-black hover:bg-green-400"}`,children:$?"Saving...":"Save"}),s.jsx("button",{onClick:()=>{C(!1),z({})},className:"px-2 py-1 rounded text-xs border border-convex-border text-gray-300 hover:bg-convex-border",children:"Cancel"})]}),U&&s.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[s.jsx("button",{onClick:()=>{const j=Qt.findIndex((b,A)=>fn(b,A)===U);j!==-1&&Jt(Qt[j],j)},disabled:G===U,className:`px-2 py-1 rounded text-xs font-semibold ${G===U?"bg-gray-600 text-gray-300 cursor-not-allowed":"bg-amber-400 text-black hover:bg-amber-300"}`,children:G===U?"Saving...":"Save"}),s.jsx("button",{onClick:()=>Ct(U),className:"px-2 py-1 rounded text-xs border border-convex-border text-gray-300 hover:bg-convex-border",children:"Cancel"})]})]})]}),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&&!mn&&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,Xe),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:Xe.map(j=>{const b=ft.includes(j);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:b,onChange:()=>r&&i(r,j)}),s.jsx("span",{className:"font-mono",children:j})]},j)})})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:t.success?p==="table"&&Array.isArray(t.result)?ft.length===0?s.jsx("div",{className:"text-sm text-gray-500",children:"No columns selected. Use the Columns button to pick fields."}):s.jsx(Dh,{rows:Qt,columns:ft,prependRow:_e?s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:"border-b border-convex-border bg-convex-darker/60",children:[ft.map(j=>s.jsx("td",{className:"px-3 py-2 align-top whitespace-nowrap text-gray-200",children:Nt.has(j)?s.jsx("span",{className:"text-gray-500",children:"—"}):s.jsx("input",{type:"text",value:O[j]??"",onChange:b=>z(A=>({...A,[j]:b.target.value})),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),xn())},className:"bg-convex-dark border border-convex-border rounded px-2 py-1 text-xs w-full"})},`new-${j}`)),s.jsx("td",{className:"px-3 py-2 align-top whitespace-nowrap text-gray-500",children:"—"})]}),J&&s.jsx("tr",{className:"border-b border-convex-border bg-red-900/20",children:s.jsx("td",{colSpan:ft.length+1,className:"px-3 py-2 text-xs text-red-300",children:J})})]}):null,renderCell:(j,b,A,le)=>{var pt;const pe=fn(A,le),Pe=!Nt.has(b)&&A._id!==void 0&&A._id!==null,Me=(pt=W[pe])==null?void 0:pt[b],Oe=(S==null?void 0:S.rowId)===pe&&(S==null?void 0:S.column)===b;if(Pe&&(Oe||Me!==void 0))return s.jsx("input",{type:"text",value:Me!==void 0?Me:dt(j),onChange:qt=>ne(pe,b,qt.target.value),onBlur:()=>q(null),className:"bg-convex-dark border border-convex-border rounded px-2 py-1 text-xs w-full",autoFocus:Oe});if(j==null)return Pe?s.jsx("button",{type:"button",onClick:()=>{q({rowId:pe,column:b}),ne(pe,b,"")},className:`text-left w-full text-gray-500 ${de}`,children:"—"}):s.jsx("span",{className:"text-gray-500",children:"—"});if(typeof j=="number"){const qt=b.toLowerCase();if((b==="_creationTime"||qt.endsWith("at")||qt.includes("time"))&&j>1e12)return s.jsx("span",{children:new Date(j).toLocaleString()})}return typeof j=="string"||typeof j=="number"?s.jsx("button",{type:"button",onClick:()=>{Pe&&(q({rowId:pe,column:b}),ne(pe,b,dt(j)))},className:Pe?`text-left w-full ${de}`:`text-left ${de}`,title:String(j),children:String(j)}):typeof j=="boolean"?s.jsx("button",{type:"button",onClick:()=>{Pe&&(q({rowId:pe,column:b}),ne(pe,b,dt(j)))},className:Pe?`text-left w-full ${de}`:`text-left ${de}`,title:j?"true":"false",children:j?"true":"false"}):s.jsx("div",{role:Pe?"button":void 0,tabIndex:Pe?0:-1,onDoubleClick:()=>{Pe&&(q({rowId:pe,column:b}),ne(pe,b,dt(j)))},className:Pe?"text-left w-full max-w-[320px]":"text-left max-w-[320px]",title:Pe?"Double-click to edit":void 0,children:s.jsx(jd,{value:j})})}}):s.jsx("pre",{className:"font-mono text-sm whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:V(B(R(_==="rows"?t.result:{result:t.result,pageInfo:t.pageInfo})),f)}}):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:((Oi=t.error)==null?void 0:Oi.message)||(t.error?JSON.stringify(t.error):"Request failed")}),((Ii=t.error)==null?void 0:Ii.code)&&s.jsxs("p",{className:"text-red-600 dark:text-red-400 text-sm mt-1",children:["Code: ",t.error.code]})]})]})}),((Ri=t.error)==null?void 0:Ri.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:B(R(t.error.data))}})]})]})}),J&&p==="table"&&s.jsx("div",{className:"border-t border-convex-border px-3 py-2 text-xs text-red-300 bg-red-900/20",children:J})]}):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 Ah({onClose:e}){const{collections:t,history:n,dataHistory:r,createCollection:l,deleteCollection:o,renameCollection:i,deleteRequest:a,renameRequest:u,deleteHistoryEntry:d,saveRequest:x,clearHistory:v,deleteDataHistoryEntry:h,clearDataHistory:g,exportData:y,importData:m}=$r(),{setSelectedFunction:P,setArgs:f,setResponse:c}=un(),{setSelectedTable:p,setQueryMode:k,setQueryText:T,setUiFilters:L,setUiOrder:_,setResponse:I}=co(),[W,D]=E.useState("collections"),[S,q]=E.useState("functions"),[G,ge]=E.useState(new Set),[J,X]=E.useState(""),[_e,C]=E.useState(!1),[O,z]=E.useState(null),[$,K]=E.useState(null),[R,B]=E.useState(""),[V,ue]=E.useState(""),[de,Nt]=E.useState(""),dt=E.useRef(null),Ur=w=>{ge(F=>{const U=new Set(F);return U.has(w)?U.delete(w):U.add(w),U})},fn=()=>{if(!J.trim())return;const w=l(J.trim());ge(F=>new Set(F).add(w)),X(""),C(!1)},Ae=w=>{R.trim()&&(i(w,R.trim()),z(null),B(""))},pn=()=>{!$||!R.trim()||(u($.collectionId,$.requestId,R.trim()),K(null),B(""))},Xe=w=>{const F={name:w.functionPath.split(":").pop()||w.functionPath,path:w.functionPath,type:w.functionType,args:[]};un.getState().loadFromSaved(F,w.args,w.lastResponse||null)},ft=w=>{const F={name:w.functionPath.split(":").pop()||w.functionPath,path:w.functionPath,type:w.functionType,args:[]};P(F),c(w.response||null);try{const U=JSON.parse(w.args);f(JSON.stringify(U,null,2))}catch{f(w.args)}},Hr=w=>{p(w.table),k(w.queryMode),w.uiFilters&&L(w.uiFilters),w.uiOrder&&_(w.uiOrder),T(w.queryText),I(w.response)},Kn=w=>{var ne;let F=(ne=t[0])==null?void 0:ne.id;F||(F=l("Saved from History"));const U=`${w.functionPath.split(":").pop()} - ${new Date(w.timestamp).toLocaleString()}`;x(F,U,{functionPath:w.functionPath,functionType:w.functionType,args:w.args},w.response)},Qt=()=>{const w=y(),F=new Blob([JSON.stringify(w,null,2)],{type:"application/json"}),U=URL.createObjectURL(F),ne=document.createElement("a");ne.href=U,ne.download=`convex-devtools-export-${new Date().toISOString().split("T")[0]}.json`,ne.click(),URL.revokeObjectURL(U)},Br=w=>{var ne;const F=(ne=w.target.files)==null?void 0:ne[0];if(!F)return;const U=new FileReader;U.onload=Ct=>{var Jt;try{const xn=JSON.parse((Jt=Ct.target)==null?void 0:Jt.result);m(xn)}catch(xn){console.error("Failed to import:",xn),alert("Invalid export file")}},U.readAsText(F),dt.current&&(dt.current.value="")},Vr=E.useMemo(()=>{if(!V.trim())return{collections:t};const w=V.toLowerCase();return{collections:t.map(U=>{const ne=U.requests.filter(Jt=>Jt.name.toLowerCase().includes(w)||Jt.functionPath.toLowerCase().includes(w)),Ct=U.name.toLowerCase().includes(w);return ne.length>0||Ct?{...U,requests:Ct?U.requests:ne}:null}).filter(Boolean)}},[t,V]),Yn=E.useMemo(()=>{if(!de.trim())return n;const w=de.toLowerCase();return n.filter(F=>F.functionPath.toLowerCase().includes(w))},[n,de]),hn=E.useMemo(()=>{if(!de.trim())return r;const w=de.toLowerCase();return r.filter(F=>F.table.toLowerCase().includes(w)||F.queryText.toLowerCase().includes(w))},[r,de]),Gn={query:"text-blue-400",mutation:"text-orange-400",action:"text-purple-400"},Qr=({className:w="w-3 h-3"})=>s.jsx("svg",{className:w,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"})}),mn=({className:w="w-3 h-3"})=>s.jsx("svg",{className:w,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 ${W==="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 ${W==="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:Qt,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 w;return(w=dt.current)==null?void 0:w.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:dt,type:"file",accept:".json",onChange:Br,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:W==="collections"?V:de,onChange:w=>W==="collections"?ue(w.target.value):Nt(w.target.value),placeholder:W==="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:W==="collections"?s.jsxs("div",{className:"py-1",children:[_e?s.jsxs("div",{className:"px-2 py-1.5 flex items-center gap-2",children:[s.jsx("input",{type:"text",value:J,onChange:w=>X(w.target.value),onKeyDown:w=>{w.key==="Enter"&&fn(),w.key==="Escape"&&(C(!1),X(""))},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:fn,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:()=>{C(!1),X("")},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:()=>C(!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"]}),Vr.collections.map(w=>s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center group",children:O===w.id?s.jsxs("div",{className:"flex-1 px-2 py-1 flex items-center gap-2",children:[s.jsx("input",{type:"text",value:R,onChange:F=>B(F.target.value),onKeyDown:F=>{F.key==="Enter"&&Ae(w.id),F.key==="Escape"&&(z(null),B(""))},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:()=>Ae(w.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:()=>Ur(w.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 ${G.has(w.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:w.name}),s.jsxs("span",{className:"text-xs text-gray-600 flex-shrink-0",children:["(",w.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:()=>{z(w.id),B(w.name)},className:"p-1 text-gray-500 hover:text-white",title:"Rename",children:s.jsx(mn,{})}),s.jsx("button",{onClick:()=>o(w.id),className:"p-1 text-gray-500 hover:text-red-400",title:"Delete",children:s.jsx(Qr,{})})]})]})}),G.has(w.id)&&s.jsx("div",{className:"ml-5",children:w.requests.length===0?s.jsx("p",{className:"px-2 py-1 text-xs text-gray-600",children:"No saved requests"}):w.requests.map(F=>s.jsx("div",{className:"flex items-center group hover:bg-convex-border rounded mx-1 transition-colors",children:($==null?void 0:$.collectionId)===w.id&&($==null?void 0:$.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:R,onChange:U=>B(U.target.value),onKeyDown:U=>{U.key==="Enter"&&pn(),U.key==="Escape"&&(K(null),B(""))},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:()=>pn(),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:()=>Xe(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 ${Gn[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:()=>{K({collectionId:w.id,requestId:F.id}),B(F.name)},className:"p-1 text-gray-500 hover:text-white",title:"Rename",children:s.jsx(mn,{})}),s.jsx("button",{onClick:()=>a(w.id,F.id),className:"p-1 text-gray-500 hover:text-red-400",title:"Delete",children:s.jsx(Qr,{})})]})]})},F.id))})]},w.id)),Vr.collections.length===0&&!_e&&s.jsx("p",{className:"px-4 py-8 text-center text-sm text-gray-600",children:V?s.jsxs(s.Fragment,{children:['No results found for "',V,'"']}):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:()=>q("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:()=>q("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"&&Yn.length>0&&s.jsxs("button",{onClick:v,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"&&hn.length>0&&s.jsxs("button",{onClick:g,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"&&Yn.map(w=>{var U;const F=!w.response.success||w.response.success&&w.response.result&&typeof w.response.result=="object"&&((U=w.response.result)==null?void 0:U.status)==="error";return s.jsxs("button",{onClick:()=>ft(w),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 ${Gn[w.functionType]} ${w.functionType==="query"?"bg-blue-900/30":w.functionType==="mutation"?"bg-orange-900/30":"bg-purple-900/30"}`,children:w.functionType.charAt(0).toUpperCase()}),s.jsx("span",{className:"text-gray-300 font-mono text-sm break-all",children:w.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(w.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:ne=>{ne.stopPropagation(),Kn(w)},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:ne=>{ne.stopPropagation(),d(w.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"})})})]})]})]},w.id)}),S==="queries"&&hn.map(w=>{var U;const F=!w.response.success||w.response.success&&w.response.result&&typeof w.response.result=="object"&&((U=w.response.result)==null?void 0:U.status)==="error";return s.jsxs("button",{onClick:()=>Hr(w),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:w.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(w.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:ne=>{ne.stopPropagation(),h(w.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"})})})})]})]},w.id)}),S==="functions"&&Yn.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 "',de,'"']}),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"&&hn.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 "',de,'"']}),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 Wh({onClose:e}){const{jwtToken:t,setJwtToken:n}=un(),{setSavedToken:r}=$r(),[l,o]=E.useState(t),[i,a]=E.useState(null),[u,d]=E.useState(null),x=m=>{if(!m){a(null),d(null);return}try{const P=m.split(".");if(P.length!==3){d("Invalid JWT format (should have 3 parts separated by dots)"),a(null);return}const f=JSON.parse(atob(P[1]));a(f),d(null)}catch{d("Failed to decode JWT"),a(null)}},v=m=>{o(m),x(m)},h=()=>{const m=l.trim();n(m),r(m)},g=()=>{o(""),n(""),r(""),a(null),d(null)},y=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:m=>v(m.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":y?"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}):y?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:y?"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:g,className:"w-full py-2 bg-convex-border hover:bg-gray-600 rounded text-sm transition-colors",children:"Clear (No Auth)"})]})]})}function $h(){const[e,t]=E.useState(!1),[n,r]=E.useState(!0),[l,o]=E.useState("functions"),[i,a]=E.useState(360),[u,d]=E.useState(!1),[x,v]=E.useState(""),[h,g]=E.useState(""),[y,m]=E.useState(()=>typeof window<"u"&&localStorage.getItem("theme")||"system"),{connect:P,isConnected:f,schema:c,error:p}=_i(),{selectedFunction:k,setSelectedFunction:T,jwtToken:L,setJwtToken:_,setProjectName:I}=un(),{selectedTable:W,setSelectedTable:D}=co(),{loadFromStorage:S,loadSavedToken:q}=$r(),[G,ge]=E.useState(()=>typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!0);E.useEffect(()=>{const C=window.matchMedia("(prefers-color-scheme: dark)"),O=z=>{ge(z.matches)};return C.addEventListener("change",O),()=>C.removeEventListener("change",O)},[]),E.useEffect(()=>{if(!u)return;const C=z=>{const K=Math.min(640,Math.max(220,z.clientY-56));a(K)},O=()=>d(!1);return window.addEventListener("mousemove",C),window.addEventListener("mouseup",O),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",O)}},[u]);const J=y==="system"?G?"dark":"light":y;E.useEffect(()=>{P(),S();const C=q();C&&!L&&_(C),fetch("/api/health").then(O=>O.json()).then(O=>{O.convexUrl&&v(O.convexUrl),O.projectName&&(g(O.projectName),I(O.projectName))}).catch(()=>{})},[P,S,q,_,L]),E.useEffect(()=>{k&&o("functions")},[k]),E.useEffect(()=>{const C=()=>{document.visibilityState==="visible"&&(console.log("[DevTools] Tab visible, reloading persistence..."),S())},O=()=>{console.log("[DevTools] Window focused, reloading persistence..."),S()};return document.addEventListener("visibilitychange",C),window.addEventListener("focus",O),()=>{document.removeEventListener("visibilitychange",C),window.removeEventListener("focus",O)}},[S]),E.useEffect(()=>{J==="light"?document.documentElement.classList.add("light"):document.documentElement.classList.remove("light");try{localStorage.setItem("theme",y)}catch{}},[J,y]);const X=x?new URL(x).hostname.replace(".convex.cloud",""):"",_e=x!=null&&x.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.1"}),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} • `:"",_e," • ",X||"loading..."]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[f?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:()=>{m(y==="system"?"light":y==="light"?"dark":"system")},className:"p-2 rounded hover:bg-convex-border transition-colors text-gray-400",title:`Theme: ${y} (click to change)`,children:y==="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"})]}):J==="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(Ah,{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(Gp,{schema:c,selectedFunction:k,onSelectFunction:T}):s.jsx(Xp,{schema:c,selectedTable:W,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(bh,{})}),s.jsx("div",{className:"h-1/2 overflow-auto",children:s.jsx(Lh,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"border-b border-convex-border overflow-auto",style:{height:i},children:s.jsx(Rh,{})}),s.jsx("div",{className:"h-1.5 cursor-row-resize bg-transparent hover:bg-convex-border/40",onMouseDown:()=>d(!0)}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx(Fh,{})})]})}),e&&s.jsx(Wh,{onClose:()=>t(!1)})]})]})}Ho.createRoot(document.getElementById("root")).render(s.jsx(au.StrictMode,{children:s.jsx($h,{})}));
|