assuremind 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +13 -5
- package/README.md +89 -1
- package/dist/cli/index.js +2055 -410
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.mts +151 -12
- package/dist/index.d.ts +151 -12
- package/dist/index.js +49 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -2
- package/dist/index.mjs.map +1 -1
- package/docs/CLI-REFERENCE.md +104 -0
- package/docs/GETTING-STARTED.md +64 -3
- package/docs/STUDIO.md +186 -0
- package/package.json +1 -1
- package/ui/dist/assets/index-DTtYd1hD.js +837 -0
- package/ui/dist/assets/index-lOAh29q9.css +1 -0
- package/ui/dist/assuremind-logo.png +0 -0
- package/ui/dist/favicon.svg +8 -36
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-By2Hw5l2.css +0 -1
- package/ui/dist/assets/index-DaQ-JHje.js +0 -819
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
var Dm=e=>{throw TypeError(e)};var Dc=(e,t,s)=>t.has(e)||Dm("Cannot "+s);var k=(e,t,s)=>(Dc(e,t,"read from private field"),s?s.call(e):t.get(e)),te=(e,t,s)=>t.has(e)?Dm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),V=(e,t,s,r)=>(Dc(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),oe=(e,t,s)=>(Dc(e,t,"access private method"),s);var Cl=(e,t,s,r)=>({set _(a){V(e,t,a,s)},get _(){return k(e,t,r)}});function ab(e,t){for(var s=0;s<t.length;s++){const r=t[s];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();function ib(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gf={exports:{}},sc={},Qf={exports:{}},he={};/**
|
|
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 hl=Symbol.for("react.element"),lb=Symbol.for("react.portal"),ob=Symbol.for("react.fragment"),cb=Symbol.for("react.strict_mode"),db=Symbol.for("react.profiler"),ub=Symbol.for("react.provider"),xb=Symbol.for("react.context"),mb=Symbol.for("react.forward_ref"),hb=Symbol.for("react.suspense"),fb=Symbol.for("react.memo"),pb=Symbol.for("react.lazy"),Im=Symbol.iterator;function gb(e){return e===null||typeof e!="object"?null:(e=Im&&e[Im]||e["@@iterator"],typeof e=="function"?e:null)}var Yf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jf=Object.assign,Xf={};function Ka(e,t,s){this.props=e,this.context=t,this.refs=Xf,this.updater=s||Yf}Ka.prototype.isReactComponent={};Ka.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")};Ka.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zf(){}Zf.prototype=Ka.prototype;function mx(e,t,s){this.props=e,this.context=t,this.refs=Xf,this.updater=s||Yf}var hx=mx.prototype=new Zf;hx.constructor=mx;Jf(hx,Ka.prototype);hx.isPureReactComponent=!0;var Lm=Array.isArray,ep=Object.prototype.hasOwnProperty,fx={current:null},tp={key:!0,ref:!0,__self:!0,__source:!0};function np(e,t,s){var r,a={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)ep.call(t,r)&&!tp.hasOwnProperty(r)&&(a[r]=t[r]);var o=arguments.length-2;if(o===1)a.children=s;else if(1<o){for(var c=Array(o),d=0;d<o;d++)c[d]=arguments[d+2];a.children=c}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)a[r]===void 0&&(a[r]=o[r]);return{$$typeof:hl,type:e,key:i,ref:l,props:a,_owner:fx.current}}function yb(e,t){return{$$typeof:hl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function px(e){return typeof e=="object"&&e!==null&&e.$$typeof===hl}function bb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(s){return t[s]})}var Fm=/\/+/g;function Ic(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bb(""+e.key):t.toString(36)}function eo(e,t,s,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case hl:case lb:l=!0}}if(l)return l=e,a=a(l),e=r===""?"."+Ic(l,0):r,Lm(a)?(s="",e!=null&&(s=e.replace(Fm,"$&/")+"/"),eo(a,t,s,"",function(d){return d})):a!=null&&(px(a)&&(a=yb(a,s+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(Fm,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=r===""?".":r+":",Lm(e))for(var o=0;o<e.length;o++){i=e[o];var c=r+Ic(i,o);l+=eo(i,t,s,c,a)}else if(c=gb(e),typeof c=="function")for(e=c.call(e),o=0;!(i=e.next()).done;)i=i.value,c=r+Ic(i,o++),l+=eo(i,t,s,c,a);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function El(e,t,s){if(e==null)return e;var r=[],a=0;return eo(e,r,"","",function(i){return t.call(s,i,a++)}),r}function vb(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s)},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var bt={current:null},to={transition:null},jb={ReactCurrentDispatcher:bt,ReactCurrentBatchConfig:to,ReactCurrentOwner:fx};function sp(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:El,forEach:function(e,t,s){El(e,function(){t.apply(this,arguments)},s)},count:function(e){var t=0;return El(e,function(){t++}),t},toArray:function(e){return El(e,function(t){return t})||[]},only:function(e){if(!px(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=Ka;he.Fragment=ob;he.Profiler=db;he.PureComponent=mx;he.StrictMode=cb;he.Suspense=hb;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jb;he.act=sp;he.cloneElement=function(e,t,s){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Jf({},e.props),a=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=fx.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)ep.call(t,c)&&!tp.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=s;else if(1<c){o=Array(c);for(var d=0;d<c;d++)o[d]=arguments[d+2];r.children=o}return{$$typeof:hl,type:e.type,key:a,ref:i,props:r,_owner:l}};he.createContext=function(e){return e={$$typeof:xb,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ub,_context:e},e.Consumer=e};he.createElement=np;he.createFactory=function(e){var t=np.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:mb,render:e}};he.isValidElement=px;he.lazy=function(e){return{$$typeof:pb,_payload:{_status:-1,_result:e},_init:vb}};he.memo=function(e,t){return{$$typeof:fb,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=to.transition;to.transition={};try{e()}finally{to.transition=t}};he.unstable_act=sp;he.useCallback=function(e,t){return bt.current.useCallback(e,t)};he.useContext=function(e){return bt.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return bt.current.useDeferredValue(e)};he.useEffect=function(e,t){return bt.current.useEffect(e,t)};he.useId=function(){return bt.current.useId()};he.useImperativeHandle=function(e,t,s){return bt.current.useImperativeHandle(e,t,s)};he.useInsertionEffect=function(e,t){return bt.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return bt.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return bt.current.useMemo(e,t)};he.useReducer=function(e,t,s){return bt.current.useReducer(e,t,s)};he.useRef=function(e){return bt.current.useRef(e)};he.useState=function(e){return bt.current.useState(e)};he.useSyncExternalStore=function(e,t,s){return bt.current.useSyncExternalStore(e,t,s)};he.useTransition=function(){return bt.current.useTransition()};he.version="18.3.1";Qf.exports=he;var m=Qf.exports;const Nb=ib(m),wb=ab({__proto__:null,default:Nb},[m]);/**
|
|
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 kb=m,Sb=Symbol.for("react.element"),Cb=Symbol.for("react.fragment"),Eb=Object.prototype.hasOwnProperty,Pb=kb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zb={key:!0,ref:!0,__self:!0,__source:!0};function rp(e,t,s){var r,a={},i=null,l=null;s!==void 0&&(i=""+s),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Eb.call(t,r)&&!zb.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:Sb,type:e,key:i,ref:l,props:a,_owner:Pb.current}}sc.Fragment=Cb;sc.jsx=rp;sc.jsxs=rp;Gf.exports=sc;var n=Gf.exports,ap={exports:{}},Ht={},ip={exports:{}},lp={};/**
|
|
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(R,W){var M=R.length;R.push(W);e:for(;0<M;){var G=M-1>>>1,$=R[G];if(0<a($,W))R[G]=W,R[M]=$,M=G;else break e}}function s(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var W=R[0],M=R.pop();if(M!==W){R[0]=M;e:for(var G=0,$=R.length,se=$>>>1;G<se;){var H=2*(G+1)-1,fe=R[H],de=H+1,me=R[de];if(0>a(fe,M))de<$&&0>a(me,fe)?(R[G]=me,R[de]=M,G=de):(R[G]=fe,R[H]=M,G=H);else if(de<$&&0>a(me,M))R[G]=me,R[de]=M,G=de;else break e}}return W}function a(R,W){var M=R.sortIndex-W.sortIndex;return M!==0?M:R.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],d=[],x=1,f=null,g=3,b=!1,y=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(R){for(var W=s(d);W!==null;){if(W.callback===null)r(d);else if(W.startTime<=R)r(d),W.sortIndex=W.expirationTime,t(c,W);else break;W=s(d)}}function j(R){if(v=!1,p(R),!y)if(s(c)!==null)y=!0,Z(w);else{var W=s(d);W!==null&&ie(j,W.startTime-R)}}function w(R,W){y=!1,v&&(v=!1,h(P),P=-1),b=!0;var M=g;try{for(p(W),f=s(c);f!==null&&(!(f.expirationTime>W)||R&&!Q());){var G=f.callback;if(typeof G=="function"){f.callback=null,g=f.priorityLevel;var $=G(f.expirationTime<=W);W=e.unstable_now(),typeof $=="function"?f.callback=$:f===s(c)&&r(c),p(W)}else r(c);f=s(c)}if(f!==null)var se=!0;else{var H=s(d);H!==null&&ie(j,H.startTime-W),se=!1}return se}finally{f=null,g=M,b=!1}}var z=!1,C=null,P=-1,_=5,I=-1;function Q(){return!(e.unstable_now()-I<_)}function J(){if(C!==null){var R=e.unstable_now();I=R;var W=!0;try{W=C(!0,R)}finally{W?O():(z=!1,C=null)}}else z=!1}var O;if(typeof u=="function")O=function(){u(J)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,L=E.port2;E.port1.onmessage=J,O=function(){L.postMessage(null)}}else O=function(){N(J,0)};function Z(R){C=R,z||(z=!0,O())}function ie(R,W){P=N(function(){R(e.unstable_now())},W)}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(R){R.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,Z(w))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return s(c)},e.unstable_next=function(R){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var M=g;g=W;try{return R()}finally{g=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,W){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var M=g;g=R;try{return W()}finally{g=M}},e.unstable_scheduleCallback=function(R,W,M){var G=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?G+M:G):M=G,R){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=M+$,R={id:x++,callback:W,priorityLevel:R,startTime:M,expirationTime:$,sortIndex:-1},M>G?(R.sortIndex=M,t(d,R),s(c)===null&&R===s(d)&&(v?(h(P),P=-1):v=!0,ie(j,M-G))):(R.sortIndex=$,t(c,R),y||b||(y=!0,Z(w))),R},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(R){var W=g;return function(){var M=g;g=W;try{return R.apply(this,arguments)}finally{g=M}}}})(lp);ip.exports=lp;var Rb=ip.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 Mb=m,Bt=Rb;function B(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);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 op=new Set,Ai={};function Ir(e,t){Aa(e,t),Aa(e+"Capture",t)}function Aa(e,t){for(Ai[e]=t,e=0;e<t.length;e++)op.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ld=Object.prototype.hasOwnProperty,Tb=/^[: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]*$/,_m={},$m={};function Ob(e){return Ld.call($m,e)?!0:Ld.call(_m,e)?!1:Tb.test(e)?$m[e]=!0:(_m[e]=!0,!1)}function Ab(e,t,s,r){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Db(e,t,s,r){if(t===null||typeof t>"u"||Ab(e,t,s,r))return!0;if(r)return!1;if(s!==null)switch(s.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 vt(e,t,s,r,a,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rt[e]=new vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rt[t]=new vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rt[e]=new vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rt[e]=new vt(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){rt[e]=new vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rt[e]=new vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rt[e]=new vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rt[e]=new vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rt[e]=new vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var gx=/[\-:]([a-z])/g;function yx(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(gx,yx);rt[t]=new vt(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(gx,yx);rt[t]=new vt(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(gx,yx);rt[t]=new vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rt[e]=new vt(e,1,!1,e.toLowerCase(),null,!1,!1)});rt.xlinkHref=new vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rt[e]=new vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function bx(e,t,s,r){var a=rt.hasOwnProperty(t)?rt[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Db(t,s,a,r)&&(s=null),r||a===null?Ob(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):a.mustUseProperty?e[a.propertyName]=s===null?a.type===3?!1:"":s:(t=a.attributeName,r=a.attributeNamespace,s===null?e.removeAttribute(t):(a=a.type,s=a===3||a===4&&s===!0?"":""+s,r?e.setAttributeNS(r,t,s):e.setAttribute(t,s))))}var ns=Mb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pl=Symbol.for("react.element"),na=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),vx=Symbol.for("react.strict_mode"),Fd=Symbol.for("react.profiler"),cp=Symbol.for("react.provider"),dp=Symbol.for("react.context"),jx=Symbol.for("react.forward_ref"),_d=Symbol.for("react.suspense"),$d=Symbol.for("react.suspense_list"),Nx=Symbol.for("react.memo"),us=Symbol.for("react.lazy"),up=Symbol.for("react.offscreen"),Um=Symbol.iterator;function Za(e){return e===null||typeof e!="object"?null:(e=Um&&e[Um]||e["@@iterator"],typeof e=="function"?e:null)}var De=Object.assign,Lc;function gi(e){if(Lc===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Lc=t&&t[1]||""}return`
|
|
34
|
+
`+Lc+e}var Fc=!1;function _c(e,t){if(!e||Fc)return"";Fc=!0;var s=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 a=d.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),l=a.length-1,o=i.length-1;1<=l&&0<=o&&a[l]!==i[o];)o--;for(;1<=l&&0<=o;l--,o--)if(a[l]!==i[o]){if(l!==1||o!==1)do if(l--,o--,0>o||a[l]!==i[o]){var c=`
|
|
37
|
+
`+a[l].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=l&&0<=o);break}}}finally{Fc=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?gi(e):""}function Ib(e){switch(e.tag){case 5:return gi(e.type);case 16:return gi("Lazy");case 13:return gi("Suspense");case 19:return gi("SuspenseList");case 0:case 2:case 15:return e=_c(e.type,!1),e;case 11:return e=_c(e.type.render,!1),e;case 1:return e=_c(e.type,!0),e;default:return""}}function Ud(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 sa:return"Fragment";case na:return"Portal";case Fd:return"Profiler";case vx:return"StrictMode";case _d:return"Suspense";case $d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dp:return(e.displayName||"Context")+".Consumer";case cp:return(e._context.displayName||"Context")+".Provider";case jx:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nx:return t=e.displayName||null,t!==null?t:Ud(e.type)||"Memo";case us:t=e._payload,e=e._init;try{return Ud(e(t))}catch{}}return null}function Lb(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 Ud(t);case 8:return t===vx?"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 _s(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fb(e){var t=xp(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var a=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zl(e){e._valueTracker||(e._valueTracker=Fb(e))}function mp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),r="";return e&&(r=xp(e)?e.checked?"true":"false":e.value),e=r,e!==s?(t.setValue(e),!0):!1}function go(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 Bd(e,t){var s=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Bm(e,t){var s=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;s=_s(t.value!=null?t.value:s),e._wrapperState={initialChecked:r,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hp(e,t){t=t.checked,t!=null&&bx(e,"checked",t,!1)}function Hd(e,t){hp(e,t);var s=_s(t.value),r=t.type;if(s!=null)r==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?qd(e,t.type,s):t.hasOwnProperty("defaultValue")&&qd(e,t.type,_s(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hm(e,t,s){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,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function qd(e,t,s){(t!=="number"||go(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var yi=Array.isArray;function fa(e,t,s,r){if(e=e.options,t){t={};for(var a=0;a<s.length;a++)t["$"+s[a]]=!0;for(s=0;s<e.length;s++)a=t.hasOwnProperty("$"+e[s].value),e[s].selected!==a&&(e[s].selected=a),a&&r&&(e[s].defaultSelected=!0)}else{for(s=""+_s(s),t=null,a=0;a<e.length;a++){if(e[a].value===s){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Kd(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return De({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qm(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(B(92));if(yi(s)){if(1<s.length)throw Error(B(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:_s(s)}}function fp(e,t){var s=_s(t.value),r=_s(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),r!=null&&(e.defaultValue=""+r)}function Km(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function pp(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 Wd(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?pp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Rl,gp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,s,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Rl=Rl||document.createElement("div"),Rl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Rl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Di(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var Si={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},_b=["Webkit","ms","Moz","O"];Object.keys(Si).forEach(function(e){_b.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Si[t]=Si[e]})});function yp(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||Si.hasOwnProperty(e)&&Si[e]?(""+t).trim():t+"px"}function bp(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var r=s.indexOf("--")===0,a=yp(s,t[s],r);s==="float"&&(s="cssFloat"),r?e.setProperty(s,a):e[s]=a}}var $b=De({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 Vd(e,t){if(t){if($b[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function Gd(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 Qd=null;function wx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yd=null,pa=null,ga=null;function Wm(e){if(e=gl(e)){if(typeof Yd!="function")throw Error(B(280));var t=e.stateNode;t&&(t=oc(t),Yd(e.stateNode,e.type,t))}}function vp(e){pa?ga?ga.push(e):ga=[e]:pa=e}function jp(){if(pa){var e=pa,t=ga;if(ga=pa=null,Wm(e),t)for(e=0;e<t.length;e++)Wm(t[e])}}function Np(e,t){return e(t)}function wp(){}var $c=!1;function kp(e,t,s){if($c)return e(t,s);$c=!0;try{return Np(e,t,s)}finally{$c=!1,(pa!==null||ga!==null)&&(wp(),jp())}}function Ii(e,t){var s=e.stateNode;if(s===null)return null;var r=oc(s);if(r===null)return null;s=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(s&&typeof s!="function")throw Error(B(231,t,typeof s));return s}var Jd=!1;if(Yn)try{var ei={};Object.defineProperty(ei,"passive",{get:function(){Jd=!0}}),window.addEventListener("test",ei,ei),window.removeEventListener("test",ei,ei)}catch{Jd=!1}function Ub(e,t,s,r,a,i,l,o,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(s,d)}catch(x){this.onError(x)}}var Ci=!1,yo=null,bo=!1,Xd=null,Bb={onError:function(e){Ci=!0,yo=e}};function Hb(e,t,s,r,a,i,l,o,c){Ci=!1,yo=null,Ub.apply(Bb,arguments)}function qb(e,t,s,r,a,i,l,o,c){if(Hb.apply(this,arguments),Ci){if(Ci){var d=yo;Ci=!1,yo=null}else throw Error(B(198));bo||(bo=!0,Xd=d)}}function Lr(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function Sp(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 Vm(e){if(Lr(e)!==e)throw Error(B(188))}function Kb(e){var t=e.alternate;if(!t){if(t=Lr(e),t===null)throw Error(B(188));return t!==e?null:e}for(var s=e,r=t;;){var a=s.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){s=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===s)return Vm(a),e;if(i===r)return Vm(a),t;i=i.sibling}throw Error(B(188))}if(s.return!==r.return)s=a,r=i;else{for(var l=!1,o=a.child;o;){if(o===s){l=!0,s=a,r=i;break}if(o===r){l=!0,r=a,s=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===s){l=!0,s=i,r=a;break}if(o===r){l=!0,r=i,s=a;break}o=o.sibling}if(!l)throw Error(B(189))}}if(s.alternate!==r)throw Error(B(190))}if(s.tag!==3)throw Error(B(188));return s.stateNode.current===s?e:t}function Cp(e){return e=Kb(e),e!==null?Ep(e):null}function Ep(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ep(e);if(t!==null)return t;e=e.sibling}return null}var Pp=Bt.unstable_scheduleCallback,Gm=Bt.unstable_cancelCallback,Wb=Bt.unstable_shouldYield,Vb=Bt.unstable_requestPaint,$e=Bt.unstable_now,Gb=Bt.unstable_getCurrentPriorityLevel,kx=Bt.unstable_ImmediatePriority,zp=Bt.unstable_UserBlockingPriority,vo=Bt.unstable_NormalPriority,Qb=Bt.unstable_LowPriority,Rp=Bt.unstable_IdlePriority,rc=null,Sn=null;function Yb(e){if(Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(rc,e,void 0,(e.current.flags&128)===128)}catch{}}var mn=Math.clz32?Math.clz32:Zb,Jb=Math.log,Xb=Math.LN2;function Zb(e){return e>>>=0,e===0?32:31-(Jb(e)/Xb|0)|0}var Ml=64,Tl=4194304;function bi(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 jo(e,t){var s=e.pendingLanes;if(s===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,l=s&268435455;if(l!==0){var o=l&~a;o!==0?r=bi(o):(i&=l,i!==0&&(r=bi(i)))}else l=s&~a,l!==0?r=bi(l):i!==0&&(r=bi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(r&4&&(r|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)s=31-mn(t),a=1<<s,r|=e[s],t&=~a;return r}function e1(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 t1(e,t){for(var s=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-mn(i),o=1<<l,c=a[l];c===-1?(!(o&s)||o&r)&&(a[l]=e1(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}}function Zd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Mp(){var e=Ml;return Ml<<=1,!(Ml&4194240)&&(Ml=64),e}function Uc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function fl(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mn(t),e[t]=s}function n1(e,t){var s=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<s;){var a=31-mn(s),i=1<<a;t[a]=0,r[a]=-1,e[a]=-1,s&=~i}}function Sx(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var r=31-mn(s),a=1<<r;a&t|e[r]&t&&(e[r]|=t),s&=~a}}var we=0;function Tp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Op,Cx,Ap,Dp,Ip,eu=!1,Ol=[],zs=null,Rs=null,Ms=null,Li=new Map,Fi=new Map,hs=[],s1="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 Qm(e,t){switch(e){case"focusin":case"focusout":zs=null;break;case"dragenter":case"dragleave":Rs=null;break;case"mouseover":case"mouseout":Ms=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fi.delete(t.pointerId)}}function ti(e,t,s,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:s,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=gl(t),t!==null&&Cx(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function r1(e,t,s,r,a){switch(t){case"focusin":return zs=ti(zs,e,t,s,r,a),!0;case"dragenter":return Rs=ti(Rs,e,t,s,r,a),!0;case"mouseover":return Ms=ti(Ms,e,t,s,r,a),!0;case"pointerover":var i=a.pointerId;return Li.set(i,ti(Li.get(i)||null,e,t,s,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Fi.set(i,ti(Fi.get(i)||null,e,t,s,r,a)),!0}return!1}function Lp(e){var t=ir(e.target);if(t!==null){var s=Lr(t);if(s!==null){if(t=s.tag,t===13){if(t=Sp(s),t!==null){e.blockedOn=t,Ip(e.priority,function(){Ap(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function no(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=tu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var r=new s.constructor(s.type,s);Qd=r,s.target.dispatchEvent(r),Qd=null}else return t=gl(s),t!==null&&Cx(t),e.blockedOn=s,!1;t.shift()}return!0}function Ym(e,t,s){no(e)&&s.delete(t)}function a1(){eu=!1,zs!==null&&no(zs)&&(zs=null),Rs!==null&&no(Rs)&&(Rs=null),Ms!==null&&no(Ms)&&(Ms=null),Li.forEach(Ym),Fi.forEach(Ym)}function ni(e,t){e.blockedOn===t&&(e.blockedOn=null,eu||(eu=!0,Bt.unstable_scheduleCallback(Bt.unstable_NormalPriority,a1)))}function _i(e){function t(a){return ni(a,e)}if(0<Ol.length){ni(Ol[0],e);for(var s=1;s<Ol.length;s++){var r=Ol[s];r.blockedOn===e&&(r.blockedOn=null)}}for(zs!==null&&ni(zs,e),Rs!==null&&ni(Rs,e),Ms!==null&&ni(Ms,e),Li.forEach(t),Fi.forEach(t),s=0;s<hs.length;s++)r=hs[s],r.blockedOn===e&&(r.blockedOn=null);for(;0<hs.length&&(s=hs[0],s.blockedOn===null);)Lp(s),s.blockedOn===null&&hs.shift()}var ya=ns.ReactCurrentBatchConfig,No=!0;function i1(e,t,s,r){var a=we,i=ya.transition;ya.transition=null;try{we=1,Ex(e,t,s,r)}finally{we=a,ya.transition=i}}function l1(e,t,s,r){var a=we,i=ya.transition;ya.transition=null;try{we=4,Ex(e,t,s,r)}finally{we=a,ya.transition=i}}function Ex(e,t,s,r){if(No){var a=tu(e,t,s,r);if(a===null)Jc(e,t,r,wo,s),Qm(e,r);else if(r1(a,e,t,s,r))r.stopPropagation();else if(Qm(e,r),t&4&&-1<s1.indexOf(e)){for(;a!==null;){var i=gl(a);if(i!==null&&Op(i),i=tu(e,t,s,r),i===null&&Jc(e,t,r,wo,s),i===a)break;a=i}a!==null&&r.stopPropagation()}else Jc(e,t,r,null,s)}}var wo=null;function tu(e,t,s,r){if(wo=null,e=wx(r),e=ir(e),e!==null)if(t=Lr(e),t===null)e=null;else if(s=t.tag,s===13){if(e=Sp(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wo=e,null}function Fp(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(Gb()){case kx:return 1;case zp:return 4;case vo:case Qb:return 16;case Rp:return 536870912;default:return 16}default:return 16}}var Cs=null,Px=null,so=null;function _p(){if(so)return so;var e,t=Px,s=t.length,r,a="value"in Cs?Cs.value:Cs.textContent,i=a.length;for(e=0;e<s&&t[e]===a[e];e++);var l=s-e;for(r=1;r<=l&&t[s-r]===a[i-r];r++);return so=a.slice(e,1<r?1-r:void 0)}function ro(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 Al(){return!0}function Jm(){return!1}function qt(e){function t(s,r,a,i,l){this._reactName=s,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(s=e[o],this[o]=s?s(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Al:Jm,this.isPropagationStopped=Jm,this}return De(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Al)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Al)},persist:function(){},isPersistent:Al}),t}var Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zx=qt(Wa),pl=De({},Wa,{view:0,detail:0}),o1=qt(pl),Bc,Hc,si,ac=De({},pl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rx,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!==si&&(si&&e.type==="mousemove"?(Bc=e.screenX-si.screenX,Hc=e.screenY-si.screenY):Hc=Bc=0,si=e),Bc)},movementY:function(e){return"movementY"in e?e.movementY:Hc}}),Xm=qt(ac),c1=De({},ac,{dataTransfer:0}),d1=qt(c1),u1=De({},pl,{relatedTarget:0}),qc=qt(u1),x1=De({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),m1=qt(x1),h1=De({},Wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),f1=qt(h1),p1=De({},Wa,{data:0}),Zm=qt(p1),g1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y1={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"},b1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=b1[e])?!!t[e]:!1}function Rx(){return v1}var j1=De({},pl,{key:function(e){if(e.key){var t=g1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?y1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rx,charCode:function(e){return e.type==="keypress"?ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),N1=qt(j1),w1=De({},ac,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eh=qt(w1),k1=De({},pl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rx}),S1=qt(k1),C1=De({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),E1=qt(C1),P1=De({},ac,{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}),z1=qt(P1),R1=[9,13,27,32],Mx=Yn&&"CompositionEvent"in window,Ei=null;Yn&&"documentMode"in document&&(Ei=document.documentMode);var M1=Yn&&"TextEvent"in window&&!Ei,$p=Yn&&(!Mx||Ei&&8<Ei&&11>=Ei),th=" ",nh=!1;function Up(e,t){switch(e){case"keyup":return R1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ra=!1;function T1(e,t){switch(e){case"compositionend":return Bp(t);case"keypress":return t.which!==32?null:(nh=!0,th);case"textInput":return e=t.data,e===th&&nh?null:e;default:return null}}function O1(e,t){if(ra)return e==="compositionend"||!Mx&&Up(e,t)?(e=_p(),so=Px=Cs=null,ra=!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 $p&&t.locale!=="ko"?null:t.data;default:return null}}var A1={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 sh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!A1[e.type]:t==="textarea"}function Hp(e,t,s,r){vp(r),t=ko(t,"onChange"),0<t.length&&(s=new zx("onChange","change",null,s,r),e.push({event:s,listeners:t}))}var Pi=null,$i=null;function D1(e){e0(e,0)}function ic(e){var t=la(e);if(mp(t))return e}function I1(e,t){if(e==="change")return t}var qp=!1;if(Yn){var Kc;if(Yn){var Wc="oninput"in document;if(!Wc){var rh=document.createElement("div");rh.setAttribute("oninput","return;"),Wc=typeof rh.oninput=="function"}Kc=Wc}else Kc=!1;qp=Kc&&(!document.documentMode||9<document.documentMode)}function ah(){Pi&&(Pi.detachEvent("onpropertychange",Kp),$i=Pi=null)}function Kp(e){if(e.propertyName==="value"&&ic($i)){var t=[];Hp(t,$i,e,wx(e)),kp(D1,t)}}function L1(e,t,s){e==="focusin"?(ah(),Pi=t,$i=s,Pi.attachEvent("onpropertychange",Kp)):e==="focusout"&&ah()}function F1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ic($i)}function _1(e,t){if(e==="click")return ic(t)}function $1(e,t){if(e==="input"||e==="change")return ic(t)}function U1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:U1;function Ui(e,t){if(pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var a=s[r];if(!Ld.call(t,a)||!pn(e[a],t[a]))return!1}return!0}function ih(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lh(e,t){var s=ih(e);e=0;for(var r;s;){if(s.nodeType===3){if(r=e+s.textContent.length,e<=t&&r>=t)return{node:s,offset:t-e};e=r}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ih(s)}}function Wp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vp(){for(var e=window,t=go();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=go(e.document)}return t}function Tx(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 B1(e){var t=Vp(),s=e.focusedElem,r=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&Wp(s.ownerDocument.documentElement,s)){if(r!==null&&Tx(s)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=s.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!e.extend&&i>r&&(a=r,r=i,i=a),a=lh(s,i);var l=lh(s,r);a&&l&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var H1=Yn&&"documentMode"in document&&11>=document.documentMode,aa=null,nu=null,zi=null,su=!1;function oh(e,t,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;su||aa==null||aa!==go(r)||(r=aa,"selectionStart"in r&&Tx(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}),zi&&Ui(zi,r)||(zi=r,r=ko(nu,"onSelect"),0<r.length&&(t=new zx("onSelect","select",null,t,s),e.push({event:t,listeners:r}),t.target=aa)))}function Dl(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var ia={animationend:Dl("Animation","AnimationEnd"),animationiteration:Dl("Animation","AnimationIteration"),animationstart:Dl("Animation","AnimationStart"),transitionend:Dl("Transition","TransitionEnd")},Vc={},Gp={};Yn&&(Gp=document.createElement("div").style,"AnimationEvent"in window||(delete ia.animationend.animation,delete ia.animationiteration.animation,delete ia.animationstart.animation),"TransitionEvent"in window||delete ia.transitionend.transition);function lc(e){if(Vc[e])return Vc[e];if(!ia[e])return e;var t=ia[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Gp)return Vc[e]=t[s];return e}var Qp=lc("animationend"),Yp=lc("animationiteration"),Jp=lc("animationstart"),Xp=lc("transitionend"),Zp=new Map,ch="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 Bs(e,t){Zp.set(e,t),Ir(t,[e])}for(var Gc=0;Gc<ch.length;Gc++){var Qc=ch[Gc],q1=Qc.toLowerCase(),K1=Qc[0].toUpperCase()+Qc.slice(1);Bs(q1,"on"+K1)}Bs(Qp,"onAnimationEnd");Bs(Yp,"onAnimationIteration");Bs(Jp,"onAnimationStart");Bs("dblclick","onDoubleClick");Bs("focusin","onFocus");Bs("focusout","onBlur");Bs(Xp,"onTransitionEnd");Aa("onMouseEnter",["mouseout","mouseover"]);Aa("onMouseLeave",["mouseout","mouseover"]);Aa("onPointerEnter",["pointerout","pointerover"]);Aa("onPointerLeave",["pointerout","pointerover"]);Ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ir("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vi="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(" "),W1=new Set("cancel close invalid load scroll toggle".split(" ").concat(vi));function dh(e,t,s){var r=e.type||"unknown-event";e.currentTarget=s,qb(r,t,void 0,e),e.currentTarget=null}function e0(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var r=e[s],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],c=o.instance,d=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break e;dh(a,o,d),i=c}else for(l=0;l<r.length;l++){if(o=r[l],c=o.instance,d=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break e;dh(a,o,d),i=c}}}if(bo)throw e=Xd,bo=!1,Xd=null,e}function ze(e,t){var s=t[ou];s===void 0&&(s=t[ou]=new Set);var r=e+"__bubble";s.has(r)||(t0(t,e,2,!1),s.add(r))}function Yc(e,t,s){var r=0;t&&(r|=4),t0(s,e,r,t)}var Il="_reactListening"+Math.random().toString(36).slice(2);function Bi(e){if(!e[Il]){e[Il]=!0,op.forEach(function(s){s!=="selectionchange"&&(W1.has(s)||Yc(s,!1,e),Yc(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Il]||(t[Il]=!0,Yc("selectionchange",!1,t))}}function t0(e,t,s,r){switch(Fp(t)){case 1:var a=i1;break;case 4:a=l1;break;default:a=Ex}s=a.bind(null,t,s,e),a=void 0,!Jd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,s,{capture:!0,passive:a}):e.addEventListener(t,s,!0):a!==void 0?e.addEventListener(t,s,{passive:a}):e.addEventListener(t,s,!1)}function Jc(e,t,s,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(l===4)for(l=r.return;l!==null;){var c=l.tag;if((c===3||c===4)&&(c=l.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;l=l.return}for(;o!==null;){if(l=ir(o),l===null)return;if(c=l.tag,c===5||c===6){r=i=l;continue e}o=o.parentNode}}r=r.return}kp(function(){var d=i,x=wx(s),f=[];e:{var g=Zp.get(e);if(g!==void 0){var b=zx,y=e;switch(e){case"keypress":if(ro(s)===0)break e;case"keydown":case"keyup":b=N1;break;case"focusin":y="focus",b=qc;break;case"focusout":y="blur",b=qc;break;case"beforeblur":case"afterblur":b=qc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=Xm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=d1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=S1;break;case Qp:case Yp:case Jp:b=m1;break;case Xp:b=E1;break;case"scroll":b=o1;break;case"wheel":b=z1;break;case"copy":case"cut":case"paste":b=f1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=eh}var v=(t&4)!==0,N=!v&&e==="scroll",h=v?g!==null?g+"Capture":null:g;v=[];for(var u=d,p;u!==null;){p=u;var j=p.stateNode;if(p.tag===5&&j!==null&&(p=j,h!==null&&(j=Ii(u,h),j!=null&&v.push(Hi(u,j,p)))),N)break;u=u.return}0<v.length&&(g=new b(g,y,null,s,x),f.push({event:g,listeners:v}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",g&&s!==Qd&&(y=s.relatedTarget||s.fromElement)&&(ir(y)||y[Jn]))break e;if((b||g)&&(g=x.window===x?x:(g=x.ownerDocument)?g.defaultView||g.parentWindow:window,b?(y=s.relatedTarget||s.toElement,b=d,y=y?ir(y):null,y!==null&&(N=Lr(y),y!==N||y.tag!==5&&y.tag!==6)&&(y=null)):(b=null,y=d),b!==y)){if(v=Xm,j="onMouseLeave",h="onMouseEnter",u="mouse",(e==="pointerout"||e==="pointerover")&&(v=eh,j="onPointerLeave",h="onPointerEnter",u="pointer"),N=b==null?g:la(b),p=y==null?g:la(y),g=new v(j,u+"leave",b,s,x),g.target=N,g.relatedTarget=p,j=null,ir(x)===d&&(v=new v(h,u+"enter",y,s,x),v.target=p,v.relatedTarget=N,j=v),N=j,b&&y)t:{for(v=b,h=y,u=0,p=v;p;p=Vr(p))u++;for(p=0,j=h;j;j=Vr(j))p++;for(;0<u-p;)v=Vr(v),u--;for(;0<p-u;)h=Vr(h),p--;for(;u--;){if(v===h||h!==null&&v===h.alternate)break t;v=Vr(v),h=Vr(h)}v=null}else v=null;b!==null&&uh(f,g,b,v,!1),y!==null&&N!==null&&uh(f,N,y,v,!0)}}e:{if(g=d?la(d):window,b=g.nodeName&&g.nodeName.toLowerCase(),b==="select"||b==="input"&&g.type==="file")var w=I1;else if(sh(g))if(qp)w=$1;else{w=F1;var z=L1}else(b=g.nodeName)&&b.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(w=_1);if(w&&(w=w(e,d))){Hp(f,w,s,x);break e}z&&z(e,g,d),e==="focusout"&&(z=g._wrapperState)&&z.controlled&&g.type==="number"&&qd(g,"number",g.value)}switch(z=d?la(d):window,e){case"focusin":(sh(z)||z.contentEditable==="true")&&(aa=z,nu=d,zi=null);break;case"focusout":zi=nu=aa=null;break;case"mousedown":su=!0;break;case"contextmenu":case"mouseup":case"dragend":su=!1,oh(f,s,x);break;case"selectionchange":if(H1)break;case"keydown":case"keyup":oh(f,s,x)}var C;if(Mx)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else ra?Up(e,s)&&(P="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(P="onCompositionStart");P&&($p&&s.locale!=="ko"&&(ra||P!=="onCompositionStart"?P==="onCompositionEnd"&&ra&&(C=_p()):(Cs=x,Px="value"in Cs?Cs.value:Cs.textContent,ra=!0)),z=ko(d,P),0<z.length&&(P=new Zm(P,e,null,s,x),f.push({event:P,listeners:z}),C?P.data=C:(C=Bp(s),C!==null&&(P.data=C)))),(C=M1?T1(e,s):O1(e,s))&&(d=ko(d,"onBeforeInput"),0<d.length&&(x=new Zm("onBeforeInput","beforeinput",null,s,x),f.push({event:x,listeners:d}),x.data=C))}e0(f,t)})}function Hi(e,t,s){return{instance:e,listener:t,currentTarget:s}}function ko(e,t){for(var s=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Ii(e,s),i!=null&&r.unshift(Hi(e,i,a)),i=Ii(e,t),i!=null&&r.push(Hi(e,i,a))),e=e.return}return r}function Vr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uh(e,t,s,r,a){for(var i=t._reactName,l=[];s!==null&&s!==r;){var o=s,c=o.alternate,d=o.stateNode;if(c!==null&&c===r)break;o.tag===5&&d!==null&&(o=d,a?(c=Ii(s,i),c!=null&&l.unshift(Hi(s,c,o))):a||(c=Ii(s,i),c!=null&&l.push(Hi(s,c,o)))),s=s.return}l.length!==0&&e.push({event:t,listeners:l})}var V1=/\r\n?/g,G1=/\u0000|\uFFFD/g;function xh(e){return(typeof e=="string"?e:""+e).replace(V1,`
|
|
38
|
+
`).replace(G1,"")}function Ll(e,t,s){if(t=xh(t),xh(e)!==t&&s)throw Error(B(425))}function So(){}var ru=null,au=null;function iu(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 lu=typeof setTimeout=="function"?setTimeout:void 0,Q1=typeof clearTimeout=="function"?clearTimeout:void 0,mh=typeof Promise=="function"?Promise:void 0,Y1=typeof queueMicrotask=="function"?queueMicrotask:typeof mh<"u"?function(e){return mh.resolve(null).then(e).catch(J1)}:lu;function J1(e){setTimeout(function(){throw e})}function Xc(e,t){var s=t,r=0;do{var a=s.nextSibling;if(e.removeChild(s),a&&a.nodeType===8)if(s=a.data,s==="/$"){if(r===0){e.removeChild(a),_i(t);return}r--}else s!=="$"&&s!=="$?"&&s!=="$!"||r++;s=a}while(s);_i(t)}function Ts(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 hh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var Va=Math.random().toString(36).slice(2),wn="__reactFiber$"+Va,qi="__reactProps$"+Va,Jn="__reactContainer$"+Va,ou="__reactEvents$"+Va,X1="__reactListeners$"+Va,Z1="__reactHandles$"+Va;function ir(e){var t=e[wn];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Jn]||s[wn]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=hh(e);e!==null;){if(s=e[wn])return s;e=hh(e)}return t}e=s,s=e.parentNode}return null}function gl(e){return e=e[wn]||e[Jn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function la(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function oc(e){return e[qi]||null}var cu=[],oa=-1;function Hs(e){return{current:e}}function Re(e){0>oa||(e.current=cu[oa],cu[oa]=null,oa--)}function Ee(e,t){oa++,cu[oa]=e.current,e.current=t}var $s={},mt=Hs($s),Pt=Hs(!1),Sr=$s;function Da(e,t){var s=e.type.contextTypes;if(!s)return $s;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in s)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function zt(e){return e=e.childContextTypes,e!=null}function Co(){Re(Pt),Re(mt)}function fh(e,t,s){if(mt.current!==$s)throw Error(B(168));Ee(mt,t),Ee(Pt,s)}function n0(e,t,s){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return s;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(B(108,Lb(e)||"Unknown",a));return De({},s,r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$s,Sr=mt.current,Ee(mt,e),Ee(Pt,Pt.current),!0}function ph(e,t,s){var r=e.stateNode;if(!r)throw Error(B(169));s?(e=n0(e,t,Sr),r.__reactInternalMemoizedMergedChildContext=e,Re(Pt),Re(mt),Ee(mt,e)):Re(Pt),Ee(Pt,s)}var $n=null,cc=!1,Zc=!1;function s0(e){$n===null?$n=[e]:$n.push(e)}function ev(e){cc=!0,s0(e)}function qs(){if(!Zc&&$n!==null){Zc=!0;var e=0,t=we;try{var s=$n;for(we=1;e<s.length;e++){var r=s[e];do r=r(!0);while(r!==null)}$n=null,cc=!1}catch(a){throw $n!==null&&($n=$n.slice(e+1)),Pp(kx,qs),a}finally{we=t,Zc=!1}}return null}var ca=[],da=0,Po=null,zo=0,Gt=[],Qt=0,Cr=null,Wn=1,Vn="";function nr(e,t){ca[da++]=zo,ca[da++]=Po,Po=e,zo=t}function r0(e,t,s){Gt[Qt++]=Wn,Gt[Qt++]=Vn,Gt[Qt++]=Cr,Cr=e;var r=Wn;e=Vn;var a=32-mn(r)-1;r&=~(1<<a),s+=1;var i=32-mn(t)+a;if(30<i){var l=a-a%5;i=(r&(1<<l)-1).toString(32),r>>=l,a-=l,Wn=1<<32-mn(t)+a|s<<a|r,Vn=i+e}else Wn=1<<i|s<<a|r,Vn=e}function Ox(e){e.return!==null&&(nr(e,1),r0(e,1,0))}function Ax(e){for(;e===Po;)Po=ca[--da],ca[da]=null,zo=ca[--da],ca[da]=null;for(;e===Cr;)Cr=Gt[--Qt],Gt[Qt]=null,Vn=Gt[--Qt],Gt[Qt]=null,Wn=Gt[--Qt],Gt[Qt]=null}var Ut=null,$t=null,Me=!1,un=null;function a0(e,t){var s=Yt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function gh(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ut=e,$t=Ts(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,$t=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=Cr!==null?{id:Wn,overflow:Vn}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Yt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,Ut=e,$t=null,!0):!1;default:return!1}}function du(e){return(e.mode&1)!==0&&(e.flags&128)===0}function uu(e){if(Me){var t=$t;if(t){var s=t;if(!gh(e,t)){if(du(e))throw Error(B(418));t=Ts(s.nextSibling);var r=Ut;t&&gh(e,t)?a0(r,s):(e.flags=e.flags&-4097|2,Me=!1,Ut=e)}}else{if(du(e))throw Error(B(418));e.flags=e.flags&-4097|2,Me=!1,Ut=e}}}function yh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function Fl(e){if(e!==Ut)return!1;if(!Me)return yh(e),Me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!iu(e.type,e.memoizedProps)),t&&(t=$t)){if(du(e))throw i0(),Error(B(418));for(;t;)a0(e,t),t=Ts(t.nextSibling)}if(yh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){$t=Ts(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}$t=null}}else $t=Ut?Ts(e.stateNode.nextSibling):null;return!0}function i0(){for(var e=$t;e;)e=Ts(e.nextSibling)}function Ia(){$t=Ut=null,Me=!1}function Dx(e){un===null?un=[e]:un.push(e)}var tv=ns.ReactCurrentBatchConfig;function ri(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(B(309));var r=s.stateNode}if(!r)throw Error(B(147,e));var a=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var o=a.refs;l===null?delete o[i]:o[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(B(284));if(!s._owner)throw Error(B(290,e))}return e}function _l(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bh(e){var t=e._init;return t(e._payload)}function l0(e){function t(h,u){if(e){var p=h.deletions;p===null?(h.deletions=[u],h.flags|=16):p.push(u)}}function s(h,u){if(!e)return null;for(;u!==null;)t(h,u),u=u.sibling;return null}function r(h,u){for(h=new Map;u!==null;)u.key!==null?h.set(u.key,u):h.set(u.index,u),u=u.sibling;return h}function a(h,u){return h=Is(h,u),h.index=0,h.sibling=null,h}function i(h,u,p){return h.index=p,e?(p=h.alternate,p!==null?(p=p.index,p<u?(h.flags|=2,u):p):(h.flags|=2,u)):(h.flags|=1048576,u)}function l(h){return e&&h.alternate===null&&(h.flags|=2),h}function o(h,u,p,j){return u===null||u.tag!==6?(u=id(p,h.mode,j),u.return=h,u):(u=a(u,p),u.return=h,u)}function c(h,u,p,j){var w=p.type;return w===sa?x(h,u,p.props.children,j,p.key):u!==null&&(u.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===us&&bh(w)===u.type)?(j=a(u,p.props),j.ref=ri(h,u,p),j.return=h,j):(j=xo(p.type,p.key,p.props,null,h.mode,j),j.ref=ri(h,u,p),j.return=h,j)}function d(h,u,p,j){return u===null||u.tag!==4||u.stateNode.containerInfo!==p.containerInfo||u.stateNode.implementation!==p.implementation?(u=ld(p,h.mode,j),u.return=h,u):(u=a(u,p.children||[]),u.return=h,u)}function x(h,u,p,j,w){return u===null||u.tag!==7?(u=jr(p,h.mode,j,w),u.return=h,u):(u=a(u,p),u.return=h,u)}function f(h,u,p){if(typeof u=="string"&&u!==""||typeof u=="number")return u=id(""+u,h.mode,p),u.return=h,u;if(typeof u=="object"&&u!==null){switch(u.$$typeof){case Pl:return p=xo(u.type,u.key,u.props,null,h.mode,p),p.ref=ri(h,null,u),p.return=h,p;case na:return u=ld(u,h.mode,p),u.return=h,u;case us:var j=u._init;return f(h,j(u._payload),p)}if(yi(u)||Za(u))return u=jr(u,h.mode,p,null),u.return=h,u;_l(h,u)}return null}function g(h,u,p,j){var w=u!==null?u.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return w!==null?null:o(h,u,""+p,j);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Pl:return p.key===w?c(h,u,p,j):null;case na:return p.key===w?d(h,u,p,j):null;case us:return w=p._init,g(h,u,w(p._payload),j)}if(yi(p)||Za(p))return w!==null?null:x(h,u,p,j,null);_l(h,p)}return null}function b(h,u,p,j,w){if(typeof j=="string"&&j!==""||typeof j=="number")return h=h.get(p)||null,o(u,h,""+j,w);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Pl:return h=h.get(j.key===null?p:j.key)||null,c(u,h,j,w);case na:return h=h.get(j.key===null?p:j.key)||null,d(u,h,j,w);case us:var z=j._init;return b(h,u,p,z(j._payload),w)}if(yi(j)||Za(j))return h=h.get(p)||null,x(u,h,j,w,null);_l(u,j)}return null}function y(h,u,p,j){for(var w=null,z=null,C=u,P=u=0,_=null;C!==null&&P<p.length;P++){C.index>P?(_=C,C=null):_=C.sibling;var I=g(h,C,p[P],j);if(I===null){C===null&&(C=_);break}e&&C&&I.alternate===null&&t(h,C),u=i(I,u,P),z===null?w=I:z.sibling=I,z=I,C=_}if(P===p.length)return s(h,C),Me&&nr(h,P),w;if(C===null){for(;P<p.length;P++)C=f(h,p[P],j),C!==null&&(u=i(C,u,P),z===null?w=C:z.sibling=C,z=C);return Me&&nr(h,P),w}for(C=r(h,C);P<p.length;P++)_=b(C,h,P,p[P],j),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?P:_.key),u=i(_,u,P),z===null?w=_:z.sibling=_,z=_);return e&&C.forEach(function(Q){return t(h,Q)}),Me&&nr(h,P),w}function v(h,u,p,j){var w=Za(p);if(typeof w!="function")throw Error(B(150));if(p=w.call(p),p==null)throw Error(B(151));for(var z=w=null,C=u,P=u=0,_=null,I=p.next();C!==null&&!I.done;P++,I=p.next()){C.index>P?(_=C,C=null):_=C.sibling;var Q=g(h,C,I.value,j);if(Q===null){C===null&&(C=_);break}e&&C&&Q.alternate===null&&t(h,C),u=i(Q,u,P),z===null?w=Q:z.sibling=Q,z=Q,C=_}if(I.done)return s(h,C),Me&&nr(h,P),w;if(C===null){for(;!I.done;P++,I=p.next())I=f(h,I.value,j),I!==null&&(u=i(I,u,P),z===null?w=I:z.sibling=I,z=I);return Me&&nr(h,P),w}for(C=r(h,C);!I.done;P++,I=p.next())I=b(C,h,P,I.value,j),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?P:I.key),u=i(I,u,P),z===null?w=I:z.sibling=I,z=I);return e&&C.forEach(function(J){return t(h,J)}),Me&&nr(h,P),w}function N(h,u,p,j){if(typeof p=="object"&&p!==null&&p.type===sa&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Pl:e:{for(var w=p.key,z=u;z!==null;){if(z.key===w){if(w=p.type,w===sa){if(z.tag===7){s(h,z.sibling),u=a(z,p.props.children),u.return=h,h=u;break e}}else if(z.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===us&&bh(w)===z.type){s(h,z.sibling),u=a(z,p.props),u.ref=ri(h,z,p),u.return=h,h=u;break e}s(h,z);break}else t(h,z);z=z.sibling}p.type===sa?(u=jr(p.props.children,h.mode,j,p.key),u.return=h,h=u):(j=xo(p.type,p.key,p.props,null,h.mode,j),j.ref=ri(h,u,p),j.return=h,h=j)}return l(h);case na:e:{for(z=p.key;u!==null;){if(u.key===z)if(u.tag===4&&u.stateNode.containerInfo===p.containerInfo&&u.stateNode.implementation===p.implementation){s(h,u.sibling),u=a(u,p.children||[]),u.return=h,h=u;break e}else{s(h,u);break}else t(h,u);u=u.sibling}u=ld(p,h.mode,j),u.return=h,h=u}return l(h);case us:return z=p._init,N(h,u,z(p._payload),j)}if(yi(p))return y(h,u,p,j);if(Za(p))return v(h,u,p,j);_l(h,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,u!==null&&u.tag===6?(s(h,u.sibling),u=a(u,p),u.return=h,h=u):(s(h,u),u=id(p,h.mode,j),u.return=h,h=u),l(h)):s(h,u)}return N}var La=l0(!0),o0=l0(!1),Ro=Hs(null),Mo=null,ua=null,Ix=null;function Lx(){Ix=ua=Mo=null}function Fx(e){var t=Ro.current;Re(Ro),e._currentValue=t}function xu(e,t,s){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===s)break;e=e.return}}function ba(e,t){Mo=e,Ix=ua=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Et=!0),e.firstContext=null)}function Zt(e){var t=e._currentValue;if(Ix!==e)if(e={context:e,memoizedValue:t,next:null},ua===null){if(Mo===null)throw Error(B(308));ua=e,Mo.dependencies={lanes:0,firstContext:e}}else ua=ua.next=e;return t}var lr=null;function _x(e){lr===null?lr=[e]:lr.push(e)}function c0(e,t,s,r){var a=t.interleaved;return a===null?(s.next=s,_x(t)):(s.next=a.next,a.next=s),t.interleaved=s,Xn(e,r)}function Xn(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var xs=!1;function $x(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function d0(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 Gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Os(e,t,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Xn(e,s)}return a=r.interleaved,a===null?(t.next=t,_x(r)):(t.next=a.next,a.next=t),r.interleaved=t,Xn(e,s)}function ao(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,s|=r,t.lanes=s,Sx(e,s)}}function vh(e,t){var s=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var a=null,i=null;if(s=s.firstBaseUpdate,s!==null){do{var l={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};i===null?a=i=l:i=i.next=l,s=s.next}while(s!==null);i===null?a=i=t:i=i.next=t}else a=i=t;s={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function To(e,t,s,r){var a=e.updateQueue;xs=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,d=c.next;c.next=null,l===null?i=d:l.next=d,l=c;var x=e.alternate;x!==null&&(x=x.updateQueue,o=x.lastBaseUpdate,o!==l&&(o===null?x.firstBaseUpdate=d:o.next=d,x.lastBaseUpdate=c))}if(i!==null){var f=a.baseState;l=0,x=d=c=null,o=i;do{var g=o.lane,b=o.eventTime;if((r&g)===g){x!==null&&(x=x.next={eventTime:b,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,v=o;switch(g=t,b=s,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(b,f,g);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,g=typeof y=="function"?y.call(b,f,g):y,g==null)break e;f=De({},f,g);break e;case 2:xs=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,g=a.effects,g===null?a.effects=[o]:g.push(o))}else b={eventTime:b,lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},x===null?(d=x=b,c=f):x=x.next=b,l|=g;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;g=o,o=g.next,g.next=null,a.lastBaseUpdate=g,a.shared.pending=null}}while(!0);if(x===null&&(c=f),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=x,t=a.shared.interleaved,t!==null){a=t;do l|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Pr|=l,e.lanes=l,e.memoizedState=f}}function jh(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=s,typeof a!="function")throw Error(B(191,a));a.call(r)}}}var yl={},Cn=Hs(yl),Ki=Hs(yl),Wi=Hs(yl);function or(e){if(e===yl)throw Error(B(174));return e}function Ux(e,t){switch(Ee(Wi,t),Ee(Ki,e),Ee(Cn,yl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wd(t,e)}Re(Cn),Ee(Cn,t)}function Fa(){Re(Cn),Re(Ki),Re(Wi)}function u0(e){or(Wi.current);var t=or(Cn.current),s=Wd(t,e.type);t!==s&&(Ee(Ki,e),Ee(Cn,s))}function Bx(e){Ki.current===e&&(Re(Cn),Re(Ki))}var Oe=Hs(0);function Oo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.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 ed=[];function Hx(){for(var e=0;e<ed.length;e++)ed[e]._workInProgressVersionPrimary=null;ed.length=0}var io=ns.ReactCurrentDispatcher,td=ns.ReactCurrentBatchConfig,Er=0,Ae=null,Ve=null,Xe=null,Ao=!1,Ri=!1,Vi=0,nv=0;function ot(){throw Error(B(321))}function qx(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!pn(e[s],t[s]))return!1;return!0}function Kx(e,t,s,r,a,i){if(Er=i,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,io.current=e===null||e.memoizedState===null?iv:lv,e=s(r,a),Ri){i=0;do{if(Ri=!1,Vi=0,25<=i)throw Error(B(301));i+=1,Xe=Ve=null,t.updateQueue=null,io.current=ov,e=s(r,a)}while(Ri)}if(io.current=Do,t=Ve!==null&&Ve.next!==null,Er=0,Xe=Ve=Ae=null,Ao=!1,t)throw Error(B(300));return e}function Wx(){var e=Vi!==0;return Vi=0,e}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?Ae.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function en(){if(Ve===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=Xe===null?Ae.memoizedState:Xe.next;if(t!==null)Xe=t,Ve=e;else{if(e===null)throw Error(B(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},Xe===null?Ae.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function Gi(e,t){return typeof t=="function"?t(e):t}function nd(e){var t=en(),s=t.queue;if(s===null)throw Error(B(311));s.lastRenderedReducer=e;var r=Ve,a=r.baseQueue,i=s.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}r.baseQueue=a=i,s.pending=null}if(a!==null){i=a.next,r=r.baseState;var o=l=null,c=null,d=i;do{var x=d.lane;if((Er&x)===x)c!==null&&(c=c.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 f={lane:x,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(o=c=f,l=r):c=c.next=f,Ae.lanes|=x,Pr|=x}d=d.next}while(d!==null&&d!==i);c===null?l=r:c.next=o,pn(r,t.memoizedState)||(Et=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=c,s.lastRenderedState=r}if(e=s.interleaved,e!==null){a=e;do i=a.lane,Ae.lanes|=i,Pr|=i,a=a.next;while(a!==e)}else a===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function sd(e){var t=en(),s=t.queue;if(s===null)throw Error(B(311));s.lastRenderedReducer=e;var r=s.dispatch,a=s.pending,i=t.memoizedState;if(a!==null){s.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);pn(i,t.memoizedState)||(Et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),s.lastRenderedState=i}return[i,r]}function x0(){}function m0(e,t){var s=Ae,r=en(),a=t(),i=!pn(r.memoizedState,a);if(i&&(r.memoizedState=a,Et=!0),r=r.queue,Vx(p0.bind(null,s,r,e),[e]),r.getSnapshot!==t||i||Xe!==null&&Xe.memoizedState.tag&1){if(s.flags|=2048,Qi(9,f0.bind(null,s,r,a,t),void 0,null),Ze===null)throw Error(B(349));Er&30||h0(s,t,a)}return a}function h0(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function f0(e,t,s,r){t.value=s,t.getSnapshot=r,g0(t)&&y0(e)}function p0(e,t,s){return s(function(){g0(t)&&y0(e)})}function g0(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!pn(e,s)}catch{return!0}}function y0(e){var t=Xn(e,1);t!==null&&hn(t,e,1,-1)}function Nh(e){var t=bn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gi,lastRenderedState:e},t.queue=e,e=e.dispatch=av.bind(null,Ae,e),[t.memoizedState,e]}function Qi(e,t,s,r){return e={tag:e,create:t,destroy:s,deps:r,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(r=s.next,s.next=e,e.next=r,t.lastEffect=e)),e}function b0(){return en().memoizedState}function lo(e,t,s,r){var a=bn();Ae.flags|=e,a.memoizedState=Qi(1|t,s,void 0,r===void 0?null:r)}function dc(e,t,s,r){var a=en();r=r===void 0?null:r;var i=void 0;if(Ve!==null){var l=Ve.memoizedState;if(i=l.destroy,r!==null&&qx(r,l.deps)){a.memoizedState=Qi(t,s,i,r);return}}Ae.flags|=e,a.memoizedState=Qi(1|t,s,i,r)}function wh(e,t){return lo(8390656,8,e,t)}function Vx(e,t){return dc(2048,8,e,t)}function v0(e,t){return dc(4,2,e,t)}function j0(e,t){return dc(4,4,e,t)}function N0(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 w0(e,t,s){return s=s!=null?s.concat([e]):null,dc(4,4,N0.bind(null,t,e),s)}function Gx(){}function k0(e,t){var s=en();t=t===void 0?null:t;var r=s.memoizedState;return r!==null&&t!==null&&qx(t,r[1])?r[0]:(s.memoizedState=[e,t],e)}function S0(e,t){var s=en();t=t===void 0?null:t;var r=s.memoizedState;return r!==null&&t!==null&&qx(t,r[1])?r[0]:(e=e(),s.memoizedState=[e,t],e)}function C0(e,t,s){return Er&21?(pn(s,t)||(s=Mp(),Ae.lanes|=s,Pr|=s,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Et=!0),e.memoizedState=s)}function sv(e,t){var s=we;we=s!==0&&4>s?s:4,e(!0);var r=td.transition;td.transition={};try{e(!1),t()}finally{we=s,td.transition=r}}function E0(){return en().memoizedState}function rv(e,t,s){var r=Ds(e);if(s={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null},P0(e))z0(t,s);else if(s=c0(e,t,s,r),s!==null){var a=yt();hn(s,e,r,a),R0(s,t,r)}}function av(e,t,s){var r=Ds(e),a={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null};if(P0(e))z0(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,s);if(a.hasEagerState=!0,a.eagerState=o,pn(o,l)){var c=t.interleaved;c===null?(a.next=a,_x(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}s=c0(e,t,a,r),s!==null&&(a=yt(),hn(s,e,r,a),R0(s,t,r))}}function P0(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function z0(e,t){Ri=Ao=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function R0(e,t,s){if(s&4194240){var r=t.lanes;r&=e.pendingLanes,s|=r,t.lanes=s,Sx(e,s)}}var Do={readContext:Zt,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},iv={readContext:Zt,useCallback:function(e,t){return bn().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:wh,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,lo(4194308,4,N0.bind(null,t,e),s)},useLayoutEffect:function(e,t){return lo(4194308,4,e,t)},useInsertionEffect:function(e,t){return lo(4,2,e,t)},useMemo:function(e,t){var s=bn();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var r=bn();return t=s!==void 0?s(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=rv.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=bn();return e={current:e},t.memoizedState=e},useState:Nh,useDebugValue:Gx,useDeferredValue:function(e){return bn().memoizedState=e},useTransition:function(){var e=Nh(!1),t=e[0];return e=sv.bind(null,e[1]),bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var r=Ae,a=bn();if(Me){if(s===void 0)throw Error(B(407));s=s()}else{if(s=t(),Ze===null)throw Error(B(349));Er&30||h0(r,t,s)}a.memoizedState=s;var i={value:s,getSnapshot:t};return a.queue=i,wh(p0.bind(null,r,i,e),[e]),r.flags|=2048,Qi(9,f0.bind(null,r,i,s,t),void 0,null),s},useId:function(){var e=bn(),t=Ze.identifierPrefix;if(Me){var s=Vn,r=Wn;s=(r&~(1<<32-mn(r)-1)).toString(32)+s,t=":"+t+"R"+s,s=Vi++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=nv++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lv={readContext:Zt,useCallback:k0,useContext:Zt,useEffect:Vx,useImperativeHandle:w0,useInsertionEffect:v0,useLayoutEffect:j0,useMemo:S0,useReducer:nd,useRef:b0,useState:function(){return nd(Gi)},useDebugValue:Gx,useDeferredValue:function(e){var t=en();return C0(t,Ve.memoizedState,e)},useTransition:function(){var e=nd(Gi)[0],t=en().memoizedState;return[e,t]},useMutableSource:x0,useSyncExternalStore:m0,useId:E0,unstable_isNewReconciler:!1},ov={readContext:Zt,useCallback:k0,useContext:Zt,useEffect:Vx,useImperativeHandle:w0,useInsertionEffect:v0,useLayoutEffect:j0,useMemo:S0,useReducer:sd,useRef:b0,useState:function(){return sd(Gi)},useDebugValue:Gx,useDeferredValue:function(e){var t=en();return Ve===null?t.memoizedState=e:C0(t,Ve.memoizedState,e)},useTransition:function(){var e=sd(Gi)[0],t=en().memoizedState;return[e,t]},useMutableSource:x0,useSyncExternalStore:m0,useId:E0,unstable_isNewReconciler:!1};function on(e,t){if(e&&e.defaultProps){t=De({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function mu(e,t,s,r){t=e.memoizedState,s=s(r,t),s=s==null?t:De({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var uc={isMounted:function(e){return(e=e._reactInternals)?Lr(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var r=yt(),a=Ds(e),i=Gn(r,a);i.payload=t,s!=null&&(i.callback=s),t=Os(e,i,a),t!==null&&(hn(t,e,a,r),ao(t,e,a))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var r=yt(),a=Ds(e),i=Gn(r,a);i.tag=1,i.payload=t,s!=null&&(i.callback=s),t=Os(e,i,a),t!==null&&(hn(t,e,a,r),ao(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=yt(),r=Ds(e),a=Gn(s,r);a.tag=2,t!=null&&(a.callback=t),t=Os(e,a,r),t!==null&&(hn(t,e,r,s),ao(t,e,r))}};function kh(e,t,s,r,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!Ui(s,r)||!Ui(a,i):!0}function M0(e,t,s){var r=!1,a=$s,i=t.contextType;return typeof i=="object"&&i!==null?i=Zt(i):(a=zt(t)?Sr:mt.current,r=t.contextTypes,i=(r=r!=null)?Da(e,a):$s),t=new t(s,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function Sh(e,t,s,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,r),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function hu(e,t,s,r){var a=e.stateNode;a.props=s,a.state=e.memoizedState,a.refs={},$x(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Zt(i):(i=zt(t)?Sr:mt.current,a.context=Da(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(mu(e,t,i,s),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&uc.enqueueReplaceState(a,a.state,null),To(e,s,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function _a(e,t){try{var s="",r=t;do s+=Ib(r),r=r.return;while(r);var a=s}catch(i){a=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:a,digest:null}}function rd(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function fu(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var cv=typeof WeakMap=="function"?WeakMap:Map;function T0(e,t,s){s=Gn(-1,s),s.tag=3,s.payload={element:null};var r=t.value;return s.callback=function(){Lo||(Lo=!0,Su=r),fu(e,t)},s}function O0(e,t,s){s=Gn(-1,s),s.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;s.payload=function(){return r(a)},s.callback=function(){fu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(s.callback=function(){fu(e,t),typeof r!="function"&&(As===null?As=new Set([this]):As.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),s}function Ch(e,t,s){var r=e.pingCache;if(r===null){r=e.pingCache=new cv;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(s)||(a.add(s),e=wv.bind(null,e,t,s),t.then(e,e))}function Eh(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 Ph(e,t,s,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=Gn(-1,1),t.tag=2,Os(s,t,1))),s.lanes|=1),e)}var dv=ns.ReactCurrentOwner,Et=!1;function ft(e,t,s,r){t.child=e===null?o0(t,null,s,r):La(t,e.child,s,r)}function zh(e,t,s,r,a){s=s.render;var i=t.ref;return ba(t,a),r=Kx(e,t,s,r,i,a),s=Wx(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Zn(e,t,a)):(Me&&s&&Ox(t),t.flags|=1,ft(e,t,r,a),t.child)}function Rh(e,t,s,r,a){if(e===null){var i=s.type;return typeof i=="function"&&!nm(i)&&i.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=i,A0(e,t,i,r,a)):(e=xo(s.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var l=i.memoizedProps;if(s=s.compare,s=s!==null?s:Ui,s(l,r)&&e.ref===t.ref)return Zn(e,t,a)}return t.flags|=1,e=Is(i,r),e.ref=t.ref,e.return=t,t.child=e}function A0(e,t,s,r,a){if(e!==null){var i=e.memoizedProps;if(Ui(i,r)&&e.ref===t.ref)if(Et=!1,t.pendingProps=r=i,(e.lanes&a)!==0)e.flags&131072&&(Et=!0);else return t.lanes=e.lanes,Zn(e,t,a)}return pu(e,t,s,r,a)}function D0(e,t,s){var r=t.pendingProps,a=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ee(ma,Ft),Ft|=s;else{if(!(s&1073741824))return e=i!==null?i.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ee(ma,Ft),Ft|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:s,Ee(ma,Ft),Ft|=r}else i!==null?(r=i.baseLanes|s,t.memoizedState=null):r=s,Ee(ma,Ft),Ft|=r;return ft(e,t,a,s),t.child}function I0(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function pu(e,t,s,r,a){var i=zt(s)?Sr:mt.current;return i=Da(t,i),ba(t,a),s=Kx(e,t,s,r,i,a),r=Wx(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Zn(e,t,a)):(Me&&r&&Ox(t),t.flags|=1,ft(e,t,s,a),t.child)}function Mh(e,t,s,r,a){if(zt(s)){var i=!0;Eo(t)}else i=!1;if(ba(t,a),t.stateNode===null)oo(e,t),M0(t,s,r),hu(t,s,r,a),r=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var c=l.context,d=s.contextType;typeof d=="object"&&d!==null?d=Zt(d):(d=zt(s)?Sr:mt.current,d=Da(t,d));var x=s.getDerivedStateFromProps,f=typeof x=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==r||c!==d)&&Sh(t,l,r,d),xs=!1;var g=t.memoizedState;l.state=g,To(t,r,l,a),c=t.memoizedState,o!==r||g!==c||Pt.current||xs?(typeof x=="function"&&(mu(t,s,x,r),c=t.memoizedState),(o=xs||kh(t,s,o,r,g,c,d))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),l.props=r,l.state=c,l.context=d,r=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,d0(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:on(t.type,o),l.props=d,f=t.pendingProps,g=l.context,c=s.contextType,typeof c=="object"&&c!==null?c=Zt(c):(c=zt(s)?Sr:mt.current,c=Da(t,c));var b=s.getDerivedStateFromProps;(x=typeof b=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==f||g!==c)&&Sh(t,l,r,c),xs=!1,g=t.memoizedState,l.state=g,To(t,r,l,a);var y=t.memoizedState;o!==f||g!==y||Pt.current||xs?(typeof b=="function"&&(mu(t,s,b,r),y=t.memoizedState),(d=xs||kh(t,s,d,r,g,y,c)||!1)?(x||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,y,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,y,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),l.props=r,l.state=y,l.context=c,r=d):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return gu(e,t,s,r,i,a)}function gu(e,t,s,r,a,i){I0(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return a&&ph(t,s,!1),Zn(e,t,i);r=t.stateNode,dv.current=t;var o=l&&typeof s.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=La(t,e.child,null,i),t.child=La(t,null,o,i)):ft(e,t,o,i),t.memoizedState=r.state,a&&ph(t,s,!0),t.child}function L0(e){var t=e.stateNode;t.pendingContext?fh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fh(e,t.context,!1),Ux(e,t.containerInfo)}function Th(e,t,s,r,a){return Ia(),Dx(a),t.flags|=256,ft(e,t,s,r),t.child}var yu={dehydrated:null,treeContext:null,retryLane:0};function bu(e){return{baseLanes:e,cachePool:null,transitions:null}}function F0(e,t,s){var r=t.pendingProps,a=Oe.current,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Ee(Oe,a&1),e===null)return uu(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):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=hc(l,r,0,null),e=jr(e,r,s,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=bu(s),t.memoizedState=yu,e):Qx(t,l));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return uv(e,t,l,r,o,a,s);if(i){i=r.fallback,l=t.mode,a=e.child,o=a.sibling;var c={mode:"hidden",children:r.children};return!(l&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Is(a,c),r.subtreeFlags=a.subtreeFlags&14680064),o!==null?i=Is(o,i):(i=jr(i,l,s,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?bu(s):{baseLanes:l.baseLanes|s,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~s,t.memoizedState=yu,r}return i=e.child,e=i.sibling,r=Is(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=s),r.return=t,r.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=r,t.memoizedState=null,r}function Qx(e,t){return t=hc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $l(e,t,s,r){return r!==null&&Dx(r),La(t,e.child,null,s),e=Qx(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uv(e,t,s,r,a,i,l){if(s)return t.flags&256?(t.flags&=-257,r=rd(Error(B(422))),$l(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=hc({mode:"visible",children:r.children},a,0,null),i=jr(i,a,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&La(t,e.child,null,l),t.child.memoizedState=bu(l),t.memoizedState=yu,i);if(!(t.mode&1))return $l(e,t,l,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(B(419)),r=rd(i,r,void 0),$l(e,t,l,r)}if(o=(l&e.childLanes)!==0,Et||o){if(r=Ze,r!==null){switch(l&-l){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(r.suspendedLanes|l)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,Xn(e,a),hn(r,e,a,-1))}return tm(),r=rd(Error(B(421))),$l(e,t,l,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=kv.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,$t=Ts(a.nextSibling),Ut=t,Me=!0,un=null,e!==null&&(Gt[Qt++]=Wn,Gt[Qt++]=Vn,Gt[Qt++]=Cr,Wn=e.id,Vn=e.overflow,Cr=t),t=Qx(t,r.children),t.flags|=4096,t)}function Oh(e,t,s){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xu(e.return,t,s)}function ad(e,t,s,r,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=s,i.tailMode=a)}function _0(e,t,s){var r=t.pendingProps,a=r.revealOrder,i=r.tail;if(ft(e,t,r.children,s),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&&Oh(e,s,t);else if(e.tag===19)Oh(e,s,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(Ee(Oe,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(s=t.child,a=null;s!==null;)e=s.alternate,e!==null&&Oo(e)===null&&(a=s),s=s.sibling;s=a,s===null?(a=t.child,t.child=null):(a=s.sibling,s.sibling=null),ad(t,!1,a,s,i);break;case"backwards":for(s=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Oo(e)===null){t.child=a;break}e=a.sibling,a.sibling=s,s=a,a=e}ad(t,!0,s,null,i);break;case"together":ad(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zn(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,!(s&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,s=Is(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=Is(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function xv(e,t,s){switch(t.tag){case 3:L0(t),Ia();break;case 5:u0(t);break;case 1:zt(t.type)&&Eo(t);break;case 4:Ux(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Ee(Ro,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ee(Oe,Oe.current&1),t.flags|=128,null):s&t.child.childLanes?F0(e,t,s):(Ee(Oe,Oe.current&1),e=Zn(e,t,s),e!==null?e.sibling:null);Ee(Oe,Oe.current&1);break;case 19:if(r=(s&t.childLanes)!==0,e.flags&128){if(r)return _0(e,t,s);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ee(Oe,Oe.current),r)break;return null;case 22:case 23:return t.lanes=0,D0(e,t,s)}return Zn(e,t,s)}var $0,vu,U0,B0;$0=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}};vu=function(){};U0=function(e,t,s,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,or(Cn.current);var i=null;switch(s){case"input":a=Bd(e,a),r=Bd(e,r),i=[];break;case"select":a=De({},a,{value:void 0}),r=De({},r,{value:void 0}),i=[];break;case"textarea":a=Kd(e,a),r=Kd(e,r),i=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=So)}Vd(s,r);var l;s=null;for(d in a)if(!r.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var o=a[d];for(l in o)o.hasOwnProperty(l)&&(s||(s={}),s[l]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Ai.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in r){var c=r[d];if(o=a!=null?a[d]:void 0,r.hasOwnProperty(d)&&c!==o&&(c!=null||o!=null))if(d==="style")if(o){for(l in o)!o.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(s||(s={}),s[l]="");for(l in c)c.hasOwnProperty(l)&&o[l]!==c[l]&&(s||(s={}),s[l]=c[l])}else s||(i||(i=[]),i.push(d,s)),s=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(i=i||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Ai.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&ze("scroll",e),i||o===c||(i=[])):(i=i||[]).push(d,c))}s&&(i=i||[]).push("style",s);var d=i;(t.updateQueue=d)&&(t.flags|=4)}};B0=function(e,t,s,r){s!==r&&(t.flags|=4)};function ai(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var r=null;s!==null;)s.alternate!==null&&(r=s),s=s.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,r=0;if(t)for(var a=e.child;a!==null;)s|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)s|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=s,t}function mv(e,t,s){var r=t.pendingProps;switch(Ax(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return zt(t.type)&&Co(),ct(t),null;case 3:return r=t.stateNode,Fa(),Re(Pt),Re(mt),Hx(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,un!==null&&(Pu(un),un=null))),vu(e,t),ct(t),null;case 5:Bx(t);var a=or(Wi.current);if(s=t.type,e!==null&&t.stateNode!=null)U0(e,t,s,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return ct(t),null}if(e=or(Cn.current),Fl(t)){r=t.stateNode,s=t.type;var i=t.memoizedProps;switch(r[wn]=t,r[qi]=i,e=(t.mode&1)!==0,s){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(a=0;a<vi.length;a++)ze(vi[a],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":Bm(r,i),ze("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ze("invalid",r);break;case"textarea":qm(r,i),ze("invalid",r)}Vd(s,i),a=null;for(var l in i)if(i.hasOwnProperty(l)){var o=i[l];l==="children"?typeof o=="string"?r.textContent!==o&&(i.suppressHydrationWarning!==!0&&Ll(r.textContent,o,e),a=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Ll(r.textContent,o,e),a=["children",""+o]):Ai.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&ze("scroll",r)}switch(s){case"input":zl(r),Hm(r,i,!0);break;case"textarea":zl(r),Km(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=So)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=pp(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(s,{is:r.is}):(e=l.createElement(s),s==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,s),e[wn]=t,e[qi]=r,$0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Gd(s,r),s){case"dialog":ze("cancel",e),ze("close",e),a=r;break;case"iframe":case"object":case"embed":ze("load",e),a=r;break;case"video":case"audio":for(a=0;a<vi.length;a++)ze(vi[a],e);a=r;break;case"source":ze("error",e),a=r;break;case"img":case"image":case"link":ze("error",e),ze("load",e),a=r;break;case"details":ze("toggle",e),a=r;break;case"input":Bm(e,r),a=Bd(e,r),ze("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=De({},r,{value:void 0}),ze("invalid",e);break;case"textarea":qm(e,r),a=Kd(e,r),ze("invalid",e);break;default:a=r}Vd(s,a),o=a;for(i in o)if(o.hasOwnProperty(i)){var c=o[i];i==="style"?bp(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&gp(e,c)):i==="children"?typeof c=="string"?(s!=="textarea"||c!=="")&&Di(e,c):typeof c=="number"&&Di(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ai.hasOwnProperty(i)?c!=null&&i==="onScroll"&&ze("scroll",e):c!=null&&bx(e,i,c,l))}switch(s){case"input":zl(e),Hm(e,r,!1);break;case"textarea":zl(e),Km(e);break;case"option":r.value!=null&&e.setAttribute("value",""+_s(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?fa(e,!!r.multiple,i,!1):r.defaultValue!=null&&fa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=So)}switch(s){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 ct(t),null;case 6:if(e&&t.stateNode!=null)B0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(s=or(Wi.current),or(Cn.current),Fl(t)){if(r=t.stateNode,s=t.memoizedProps,r[wn]=t,(i=r.nodeValue!==s)&&(e=Ut,e!==null))switch(e.tag){case 3:Ll(r.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ll(r.nodeValue,s,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(s.nodeType===9?s:s.ownerDocument).createTextNode(r),r[wn]=t,t.stateNode=r}return ct(t),null;case 13:if(Re(Oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Me&&$t!==null&&t.mode&1&&!(t.flags&128))i0(),Ia(),t.flags|=98560,i=!1;else if(i=Fl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(B(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(B(317));i[wn]=t}else Ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ct(t),i=!1}else un!==null&&(Pu(un),un=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=s,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Oe.current&1?Ye===0&&(Ye=3):tm())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return Fa(),vu(e,t),e===null&&Bi(t.stateNode.containerInfo),ct(t),null;case 10:return Fx(t.type._context),ct(t),null;case 17:return zt(t.type)&&Co(),ct(t),null;case 19:if(Re(Oe),i=t.memoizedState,i===null)return ct(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)ai(i,!1);else{if(Ye!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Oo(e),l!==null){for(t.flags|=128,ai(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=s,s=t.child;s!==null;)i=s,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Ee(Oe,Oe.current&1|2),t.child}e=e.sibling}i.tail!==null&&$e()>$a&&(t.flags|=128,r=!0,ai(i,!1),t.lanes=4194304)}else{if(!r)if(e=Oo(l),e!==null){if(t.flags|=128,r=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),ai(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Me)return ct(t),null}else 2*$e()-i.renderingStartTime>$a&&s!==1073741824&&(t.flags|=128,r=!0,ai(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(s=i.last,s!==null?s.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=$e(),t.sibling=null,s=Oe.current,Ee(Oe,r?s&1|2:s&1),t):(ct(t),null);case 22:case 23:return em(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ft&1073741824&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function hv(e,t){switch(Ax(t),t.tag){case 1:return zt(t.type)&&Co(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fa(),Re(Pt),Re(mt),Hx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bx(t),null;case 13:if(Re(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));Ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(Oe),null;case 4:return Fa(),null;case 10:return Fx(t.type._context),null;case 22:case 23:return em(),null;case 24:return null;default:return null}}var Ul=!1,ut=!1,fv=typeof WeakSet=="function"?WeakSet:Set,Y=null;function xa(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(r){Le(e,t,r)}else s.current=null}function ju(e,t,s){try{s()}catch(r){Le(e,t,r)}}var Ah=!1;function pv(e,t){if(ru=No,e=Vp(),Tx(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{s.nodeType,i.nodeType}catch{s=null;break e}var l=0,o=-1,c=-1,d=0,x=0,f=e,g=null;t:for(;;){for(var b;f!==s||a!==0&&f.nodeType!==3||(o=l+a),f!==i||r!==0&&f.nodeType!==3||(c=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(b=f.firstChild)!==null;)g=f,f=b;for(;;){if(f===e)break t;if(g===s&&++d===a&&(o=l),g===i&&++x===r&&(c=l),(b=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=b}s=o===-1||c===-1?null:{start:o,end:c}}else s=null}s=s||{start:0,end:0}}else s=null;for(au={focusedElem:e,selectionRange:s},No=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;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 v=y.memoizedProps,N=y.memoizedState,h=t.stateNode,u=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:on(t.type,v),N);h.__reactInternalSnapshotBeforeUpdate=u}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(B(163))}}catch(j){Le(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return y=Ah,Ah=!1,y}function Mi(e,t,s){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&ju(t,s,i)}a=a.next}while(a!==r)}}function xc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var r=s.create;s.destroy=r()}s=s.next}while(s!==t)}}function Nu(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function H0(e){var t=e.alternate;t!==null&&(e.alternate=null,H0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[qi],delete t[ou],delete t[X1],delete t[Z1])),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 q0(e){return e.tag===5||e.tag===3||e.tag===4}function Dh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||q0(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 wu(e,t,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=So));else if(r!==4&&(e=e.child,e!==null))for(wu(e,t,s),e=e.sibling;e!==null;)wu(e,t,s),e=e.sibling}function ku(e,t,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ku(e,t,s),e=e.sibling;e!==null;)ku(e,t,s),e=e.sibling}var nt=null,dn=!1;function ls(e,t,s){for(s=s.child;s!==null;)K0(e,t,s),s=s.sibling}function K0(e,t,s){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(rc,s)}catch{}switch(s.tag){case 5:ut||xa(s,t);case 6:var r=nt,a=dn;nt=null,ls(e,t,s),nt=r,dn=a,nt!==null&&(dn?(e=nt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):nt.removeChild(s.stateNode));break;case 18:nt!==null&&(dn?(e=nt,s=s.stateNode,e.nodeType===8?Xc(e.parentNode,s):e.nodeType===1&&Xc(e,s),_i(e)):Xc(nt,s.stateNode));break;case 4:r=nt,a=dn,nt=s.stateNode.containerInfo,dn=!0,ls(e,t,s),nt=r,dn=a;break;case 0:case 11:case 14:case 15:if(!ut&&(r=s.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var i=a,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&ju(s,t,l),a=a.next}while(a!==r)}ls(e,t,s);break;case 1:if(!ut&&(xa(s,t),r=s.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=s.memoizedProps,r.state=s.memoizedState,r.componentWillUnmount()}catch(o){Le(s,t,o)}ls(e,t,s);break;case 21:ls(e,t,s);break;case 22:s.mode&1?(ut=(r=ut)||s.memoizedState!==null,ls(e,t,s),ut=r):ls(e,t,s);break;default:ls(e,t,s)}}function Ih(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new fv),t.forEach(function(r){var a=Sv.bind(null,e,r);s.has(r)||(s.add(r),r.then(a,a))})}}function an(e,t){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var a=s[r];try{var i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:nt=o.stateNode,dn=!1;break e;case 3:nt=o.stateNode.containerInfo,dn=!0;break e;case 4:nt=o.stateNode.containerInfo,dn=!0;break e}o=o.return}if(nt===null)throw Error(B(160));K0(i,l,a),nt=null,dn=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(d){Le(a,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)W0(t,e),t=t.sibling}function W0(e,t){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(an(t,e),yn(e),r&4){try{Mi(3,e,e.return),xc(3,e)}catch(v){Le(e,e.return,v)}try{Mi(5,e,e.return)}catch(v){Le(e,e.return,v)}}break;case 1:an(t,e),yn(e),r&512&&s!==null&&xa(s,s.return);break;case 5:if(an(t,e),yn(e),r&512&&s!==null&&xa(s,s.return),e.flags&32){var a=e.stateNode;try{Di(a,"")}catch(v){Le(e,e.return,v)}}if(r&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,l=s!==null?s.memoizedProps:i,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&hp(a,i),Gd(o,l);var d=Gd(o,i);for(l=0;l<c.length;l+=2){var x=c[l],f=c[l+1];x==="style"?bp(a,f):x==="dangerouslySetInnerHTML"?gp(a,f):x==="children"?Di(a,f):bx(a,x,f,d)}switch(o){case"input":Hd(a,i);break;case"textarea":fp(a,i);break;case"select":var g=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var b=i.value;b!=null?fa(a,!!i.multiple,b,!1):g!==!!i.multiple&&(i.defaultValue!=null?fa(a,!!i.multiple,i.defaultValue,!0):fa(a,!!i.multiple,i.multiple?[]:"",!1))}a[qi]=i}catch(v){Le(e,e.return,v)}}break;case 6:if(an(t,e),yn(e),r&4){if(e.stateNode===null)throw Error(B(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(v){Le(e,e.return,v)}}break;case 3:if(an(t,e),yn(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{_i(t.containerInfo)}catch(v){Le(e,e.return,v)}break;case 4:an(t,e),yn(e);break;case 13:an(t,e),yn(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(Xx=$e())),r&4&&Ih(e);break;case 22:if(x=s!==null&&s.memoizedState!==null,e.mode&1?(ut=(d=ut)||x,an(t,e),ut=d):an(t,e),yn(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!x&&e.mode&1)for(Y=e,x=e.child;x!==null;){for(f=Y=x;Y!==null;){switch(g=Y,b=g.child,g.tag){case 0:case 11:case 14:case 15:Mi(4,g,g.return);break;case 1:xa(g,g.return);var y=g.stateNode;if(typeof y.componentWillUnmount=="function"){r=g,s=g.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){Le(r,s,v)}}break;case 5:xa(g,g.return);break;case 22:if(g.memoizedState!==null){Fh(f);continue}}b!==null?(b.return=g,Y=b):Fh(f)}x=x.sibling}e:for(x=null,f=e;;){if(f.tag===5){if(x===null){x=f;try{a=f.stateNode,d?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=f.stateNode,c=f.memoizedProps.style,l=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=yp("display",l))}catch(v){Le(e,e.return,v)}}}else if(f.tag===6){if(x===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(v){Le(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;x===f&&(x=null),f=f.return}x===f&&(x=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:an(t,e),yn(e),r&4&&Ih(e);break;case 21:break;default:an(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(q0(s)){var r=s;break e}s=s.return}throw Error(B(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(Di(a,""),r.flags&=-33);var i=Dh(e);ku(e,i,a);break;case 3:case 4:var l=r.stateNode.containerInfo,o=Dh(e);wu(e,o,l);break;default:throw Error(B(161))}}catch(c){Le(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gv(e,t,s){Y=e,V0(e)}function V0(e,t,s){for(var r=(e.mode&1)!==0;Y!==null;){var a=Y,i=a.child;if(a.tag===22&&r){var l=a.memoizedState!==null||Ul;if(!l){var o=a.alternate,c=o!==null&&o.memoizedState!==null||ut;o=Ul;var d=ut;if(Ul=l,(ut=c)&&!d)for(Y=a;Y!==null;)l=Y,c=l.child,l.tag===22&&l.memoizedState!==null?_h(a):c!==null?(c.return=l,Y=c):_h(a);for(;i!==null;)Y=i,V0(i),i=i.sibling;Y=a,Ul=o,ut=d}Lh(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,Y=i):Lh(e)}}function Lh(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var s=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ut||xc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ut)if(s===null)r.componentDidMount();else{var a=t.elementType===t.type?s.memoizedProps:on(t.type,s.memoizedProps);r.componentDidUpdate(a,s.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&jh(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}jh(t,l,s)}break;case 5:var o=t.stateNode;if(s===null&&t.flags&4){s=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&s.focus();break;case"img":c.src&&(s.src=c.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 f=x.dehydrated;f!==null&&_i(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}ut||t.flags&512&&Nu(t)}catch(g){Le(t,t.return,g)}}if(t===e){Y=null;break}if(s=t.sibling,s!==null){s.return=t.return,Y=s;break}Y=t.return}}function Fh(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Y=s;break}Y=t.return}}function _h(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{xc(4,t)}catch(c){Le(t,s,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(c){Le(t,a,c)}}var i=t.return;try{Nu(t)}catch(c){Le(t,i,c)}break;case 5:var l=t.return;try{Nu(t)}catch(c){Le(t,l,c)}}}catch(c){Le(t,t.return,c)}if(t===e){Y=null;break}var o=t.sibling;if(o!==null){o.return=t.return,Y=o;break}Y=t.return}}var yv=Math.ceil,Io=ns.ReactCurrentDispatcher,Yx=ns.ReactCurrentOwner,Jt=ns.ReactCurrentBatchConfig,ye=0,Ze=null,He=null,st=0,Ft=0,ma=Hs(0),Ye=0,Yi=null,Pr=0,mc=0,Jx=0,Ti=null,Ct=null,Xx=0,$a=1/0,Fn=null,Lo=!1,Su=null,As=null,Bl=!1,Es=null,Fo=0,Oi=0,Cu=null,co=-1,uo=0;function yt(){return ye&6?$e():co!==-1?co:co=$e()}function Ds(e){return e.mode&1?ye&2&&st!==0?st&-st:tv.transition!==null?(uo===0&&(uo=Mp()),uo):(e=we,e!==0||(e=window.event,e=e===void 0?16:Fp(e.type)),e):1}function hn(e,t,s,r){if(50<Oi)throw Oi=0,Cu=null,Error(B(185));fl(e,s,r),(!(ye&2)||e!==Ze)&&(e===Ze&&(!(ye&2)&&(mc|=s),Ye===4&&fs(e,st)),Rt(e,r),s===1&&ye===0&&!(t.mode&1)&&($a=$e()+500,cc&&qs()))}function Rt(e,t){var s=e.callbackNode;t1(e,t);var r=jo(e,e===Ze?st:0);if(r===0)s!==null&&Gm(s),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(s!=null&&Gm(s),t===1)e.tag===0?ev($h.bind(null,e)):s0($h.bind(null,e)),Y1(function(){!(ye&6)&&qs()}),s=null;else{switch(Tp(r)){case 1:s=kx;break;case 4:s=zp;break;case 16:s=vo;break;case 536870912:s=Rp;break;default:s=vo}s=tg(s,G0.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function G0(e,t){if(co=-1,uo=0,ye&6)throw Error(B(327));var s=e.callbackNode;if(va()&&e.callbackNode!==s)return null;var r=jo(e,e===Ze?st:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_o(e,r);else{t=r;var a=ye;ye|=2;var i=Y0();(Ze!==e||st!==t)&&(Fn=null,$a=$e()+500,vr(e,t));do try{jv();break}catch(o){Q0(e,o)}while(!0);Lx(),Io.current=i,ye=a,He!==null?t=0:(Ze=null,st=0,t=Ye)}if(t!==0){if(t===2&&(a=Zd(e),a!==0&&(r=a,t=Eu(e,a))),t===1)throw s=Yi,vr(e,0),fs(e,r),Rt(e,$e()),s;if(t===6)fs(e,r);else{if(a=e.current.alternate,!(r&30)&&!bv(a)&&(t=_o(e,r),t===2&&(i=Zd(e),i!==0&&(r=i,t=Eu(e,i))),t===1))throw s=Yi,vr(e,0),fs(e,r),Rt(e,$e()),s;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:sr(e,Ct,Fn);break;case 3:if(fs(e,r),(r&130023424)===r&&(t=Xx+500-$e(),10<t)){if(jo(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){yt(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=lu(sr.bind(null,e,Ct,Fn),t);break}sr(e,Ct,Fn);break;case 4:if(fs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var l=31-mn(r);i=1<<l,l=t[l],l>a&&(a=l),r&=~i}if(r=a,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yv(r/1960))-r,10<r){e.timeoutHandle=lu(sr.bind(null,e,Ct,Fn),r);break}sr(e,Ct,Fn);break;case 5:sr(e,Ct,Fn);break;default:throw Error(B(329))}}}return Rt(e,$e()),e.callbackNode===s?G0.bind(null,e):null}function Eu(e,t){var s=Ti;return e.current.memoizedState.isDehydrated&&(vr(e,t).flags|=256),e=_o(e,t),e!==2&&(t=Ct,Ct=s,t!==null&&Pu(t)),e}function Pu(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function bv(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var r=0;r<s.length;r++){var a=s[r],i=a.getSnapshot;a=a.value;try{if(!pn(i(),a))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;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 fs(e,t){for(t&=~Jx,t&=~mc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-mn(t),r=1<<s;e[s]=-1,t&=~r}}function $h(e){if(ye&6)throw Error(B(327));va();var t=jo(e,0);if(!(t&1))return Rt(e,$e()),null;var s=_o(e,t);if(e.tag!==0&&s===2){var r=Zd(e);r!==0&&(t=r,s=Eu(e,r))}if(s===1)throw s=Yi,vr(e,0),fs(e,t),Rt(e,$e()),s;if(s===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,sr(e,Ct,Fn),Rt(e,$e()),null}function Zx(e,t){var s=ye;ye|=1;try{return e(t)}finally{ye=s,ye===0&&($a=$e()+500,cc&&qs())}}function zr(e){Es!==null&&Es.tag===0&&!(ye&6)&&va();var t=ye;ye|=1;var s=Jt.transition,r=we;try{if(Jt.transition=null,we=1,e)return e()}finally{we=r,Jt.transition=s,ye=t,!(ye&6)&&qs()}}function em(){Ft=ma.current,Re(ma)}function vr(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Q1(s)),He!==null)for(s=He.return;s!==null;){var r=s;switch(Ax(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Co();break;case 3:Fa(),Re(Pt),Re(mt),Hx();break;case 5:Bx(r);break;case 4:Fa();break;case 13:Re(Oe);break;case 19:Re(Oe);break;case 10:Fx(r.type._context);break;case 22:case 23:em()}s=s.return}if(Ze=e,He=e=Is(e.current,null),st=Ft=t,Ye=0,Yi=null,Jx=mc=Pr=0,Ct=Ti=null,lr!==null){for(t=0;t<lr.length;t++)if(s=lr[t],r=s.interleaved,r!==null){s.interleaved=null;var a=r.next,i=s.pending;if(i!==null){var l=i.next;i.next=a,r.next=l}s.pending=r}lr=null}return e}function Q0(e,t){do{var s=He;try{if(Lx(),io.current=Do,Ao){for(var r=Ae.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Ao=!1}if(Er=0,Xe=Ve=Ae=null,Ri=!1,Vi=0,Yx.current=null,s===null||s.return===null){Ye=1,Yi=t,He=null;break}e:{var i=e,l=s.return,o=s,c=t;if(t=st,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,x=o,f=x.tag;if(!(x.mode&1)&&(f===0||f===11||f===15)){var g=x.alternate;g?(x.updateQueue=g.updateQueue,x.memoizedState=g.memoizedState,x.lanes=g.lanes):(x.updateQueue=null,x.memoizedState=null)}var b=Eh(l);if(b!==null){b.flags&=-257,Ph(b,l,o,i,t),b.mode&1&&Ch(i,d,t),t=b,c=d;var y=t.updateQueue;if(y===null){var v=new Set;v.add(c),t.updateQueue=v}else y.add(c);break e}else{if(!(t&1)){Ch(i,d,t),tm();break e}c=Error(B(426))}}else if(Me&&o.mode&1){var N=Eh(l);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Ph(N,l,o,i,t),Dx(_a(c,o));break e}}i=c=_a(c,o),Ye!==4&&(Ye=2),Ti===null?Ti=[i]:Ti.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var h=T0(i,c,t);vh(i,h);break e;case 1:o=c;var u=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof u.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(As===null||!As.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=O0(i,o,t);vh(i,j);break e}}i=i.return}while(i!==null)}X0(s)}catch(w){t=w,He===s&&s!==null&&(He=s=s.return);continue}break}while(!0)}function Y0(){var e=Io.current;return Io.current=Do,e===null?Do:e}function tm(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),Ze===null||!(Pr&268435455)&&!(mc&268435455)||fs(Ze,st)}function _o(e,t){var s=ye;ye|=2;var r=Y0();(Ze!==e||st!==t)&&(Fn=null,vr(e,t));do try{vv();break}catch(a){Q0(e,a)}while(!0);if(Lx(),ye=s,Io.current=r,He!==null)throw Error(B(261));return Ze=null,st=0,Ye}function vv(){for(;He!==null;)J0(He)}function jv(){for(;He!==null&&!Wb();)J0(He)}function J0(e){var t=eg(e.alternate,e,Ft);e.memoizedProps=e.pendingProps,t===null?X0(e):He=t,Yx.current=null}function X0(e){var t=e;do{var s=t.alternate;if(e=t.return,t.flags&32768){if(s=hv(s,t),s!==null){s.flags&=32767,He=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ye=6,He=null;return}}else if(s=mv(s,t,Ft),s!==null){He=s;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);Ye===0&&(Ye=5)}function sr(e,t,s){var r=we,a=Jt.transition;try{Jt.transition=null,we=1,Nv(e,t,s,r)}finally{Jt.transition=a,we=r}return null}function Nv(e,t,s,r){do va();while(Es!==null);if(ye&6)throw Error(B(327));s=e.finishedWork;var a=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(B(177));e.callbackNode=null,e.callbackPriority=0;var i=s.lanes|s.childLanes;if(n1(e,i),e===Ze&&(He=Ze=null,st=0),!(s.subtreeFlags&2064)&&!(s.flags&2064)||Bl||(Bl=!0,tg(vo,function(){return va(),null})),i=(s.flags&15990)!==0,s.subtreeFlags&15990||i){i=Jt.transition,Jt.transition=null;var l=we;we=1;var o=ye;ye|=4,Yx.current=null,pv(e,s),W0(s,e),B1(au),No=!!ru,au=ru=null,e.current=s,gv(s),Vb(),ye=o,we=l,Jt.transition=i}else e.current=s;if(Bl&&(Bl=!1,Es=e,Fo=a),i=e.pendingLanes,i===0&&(As=null),Yb(s.stateNode),Rt(e,$e()),t!==null)for(r=e.onRecoverableError,s=0;s<t.length;s++)a=t[s],r(a.value,{componentStack:a.stack,digest:a.digest});if(Lo)throw Lo=!1,e=Su,Su=null,e;return Fo&1&&e.tag!==0&&va(),i=e.pendingLanes,i&1?e===Cu?Oi++:(Oi=0,Cu=e):Oi=0,qs(),null}function va(){if(Es!==null){var e=Tp(Fo),t=Jt.transition,s=we;try{if(Jt.transition=null,we=16>e?16:e,Es===null)var r=!1;else{if(e=Es,Es=null,Fo=0,ye&6)throw Error(B(331));var a=ye;for(ye|=4,Y=e.current;Y!==null;){var i=Y,l=i.child;if(Y.flags&16){var o=i.deletions;if(o!==null){for(var c=0;c<o.length;c++){var d=o[c];for(Y=d;Y!==null;){var x=Y;switch(x.tag){case 0:case 11:case 15:Mi(8,x,i)}var f=x.child;if(f!==null)f.return=x,Y=f;else for(;Y!==null;){x=Y;var g=x.sibling,b=x.return;if(H0(x),x===d){Y=null;break}if(g!==null){g.return=b,Y=g;break}Y=b}}}var y=i.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var N=v.sibling;v.sibling=null,v=N}while(v!==null)}}Y=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,Y=l;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Mi(9,i,i.return)}var h=i.sibling;if(h!==null){h.return=i.return,Y=h;break e}Y=i.return}}var u=e.current;for(Y=u;Y!==null;){l=Y;var p=l.child;if(l.subtreeFlags&2064&&p!==null)p.return=l,Y=p;else e:for(l=u;Y!==null;){if(o=Y,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:xc(9,o)}}catch(w){Le(o,o.return,w)}if(o===l){Y=null;break e}var j=o.sibling;if(j!==null){j.return=o.return,Y=j;break e}Y=o.return}}if(ye=a,qs(),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(rc,e)}catch{}r=!0}return r}finally{we=s,Jt.transition=t}}return!1}function Uh(e,t,s){t=_a(s,t),t=T0(e,t,1),e=Os(e,t,1),t=yt(),e!==null&&(fl(e,1,t),Rt(e,t))}function Le(e,t,s){if(e.tag===3)Uh(e,e,s);else for(;t!==null;){if(t.tag===3){Uh(t,e,s);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(As===null||!As.has(r))){e=_a(s,e),e=O0(t,e,1),t=Os(t,e,1),e=yt(),t!==null&&(fl(t,1,e),Rt(t,e));break}}t=t.return}}function wv(e,t,s){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&s,Ze===e&&(st&s)===s&&(Ye===4||Ye===3&&(st&130023424)===st&&500>$e()-Xx?vr(e,0):Jx|=s),Rt(e,t)}function Z0(e,t){t===0&&(e.mode&1?(t=Tl,Tl<<=1,!(Tl&130023424)&&(Tl=4194304)):t=1);var s=yt();e=Xn(e,t),e!==null&&(fl(e,t,s),Rt(e,s))}function kv(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Z0(e,s)}function Sv(e,t){var s=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(s=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(B(314))}r!==null&&r.delete(t),Z0(e,s)}var eg;eg=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pt.current)Et=!0;else{if(!(e.lanes&s)&&!(t.flags&128))return Et=!1,xv(e,t,s);Et=!!(e.flags&131072)}else Et=!1,Me&&t.flags&1048576&&r0(t,zo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oo(e,t),e=t.pendingProps;var a=Da(t,mt.current);ba(t,s),a=Kx(null,t,r,e,a,s);var i=Wx();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(i=!0,Eo(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,$x(t),a.updater=uc,t.stateNode=a,a._reactInternals=t,hu(t,r,e,s),t=gu(null,t,r,!0,i,s)):(t.tag=0,Me&&i&&Ox(t),ft(null,t,a,s),t=t.child),t;case 16:r=t.elementType;e:{switch(oo(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=Ev(r),e=on(r,e),a){case 0:t=pu(null,t,r,e,s);break e;case 1:t=Mh(null,t,r,e,s);break e;case 11:t=zh(null,t,r,e,s);break e;case 14:t=Rh(null,t,r,on(r.type,e),s);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:on(r,a),pu(e,t,r,a,s);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:on(r,a),Mh(e,t,r,a,s);case 3:e:{if(L0(t),e===null)throw Error(B(387));r=t.pendingProps,i=t.memoizedState,a=i.element,d0(e,t),To(t,r,null,s);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=_a(Error(B(423)),t),t=Th(e,t,r,s,a);break e}else if(r!==a){a=_a(Error(B(424)),t),t=Th(e,t,r,s,a);break e}else for($t=Ts(t.stateNode.containerInfo.firstChild),Ut=t,Me=!0,un=null,s=o0(t,null,r,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ia(),r===a){t=Zn(e,t,s);break e}ft(e,t,r,s)}t=t.child}return t;case 5:return u0(t),e===null&&uu(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,l=a.children,iu(r,a)?l=null:i!==null&&iu(r,i)&&(t.flags|=32),I0(e,t),ft(e,t,l,s),t.child;case 6:return e===null&&uu(t),null;case 13:return F0(e,t,s);case 4:return Ux(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,s):ft(e,t,r,s),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:on(r,a),zh(e,t,r,a,s);case 7:return ft(e,t,t.pendingProps,s),t.child;case 8:return ft(e,t,t.pendingProps.children,s),t.child;case 12:return ft(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,l=a.value,Ee(Ro,r._currentValue),r._currentValue=l,i!==null)if(pn(i.value,l)){if(i.children===a.children&&!Pt.current){t=Zn(e,t,s);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Gn(-1,s&-s),c.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var x=d.pending;x===null?c.next=c:(c.next=x.next,x.next=c),d.pending=c}}i.lanes|=s,c=i.alternate,c!==null&&(c.lanes|=s),xu(i.return,s,t),o.lanes|=s;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(B(341));l.lanes|=s,o=l.alternate,o!==null&&(o.lanes|=s),xu(l,s,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}ft(e,t,a.children,s),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,ba(t,s),a=Zt(a),r=r(a),t.flags|=1,ft(e,t,r,s),t.child;case 14:return r=t.type,a=on(r,t.pendingProps),a=on(r.type,a),Rh(e,t,r,a,s);case 15:return A0(e,t,t.type,t.pendingProps,s);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:on(r,a),oo(e,t),t.tag=1,zt(r)?(e=!0,Eo(t)):e=!1,ba(t,s),M0(t,r,a),hu(t,r,a,s),gu(null,t,r,!0,e,s);case 19:return _0(e,t,s);case 22:return D0(e,t,s)}throw Error(B(156,t.tag))};function tg(e,t){return Pp(e,t)}function Cv(e,t,s,r){this.tag=e,this.key=s,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 Yt(e,t,s,r){return new Cv(e,t,s,r)}function nm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ev(e){if(typeof e=="function")return nm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jx)return 11;if(e===Nx)return 14}return 2}function Is(e,t){var s=e.alternate;return s===null?(s=Yt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function xo(e,t,s,r,a,i){var l=2;if(r=e,typeof e=="function")nm(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case sa:return jr(s.children,a,i,t);case vx:l=8,a|=8;break;case Fd:return e=Yt(12,s,t,a|2),e.elementType=Fd,e.lanes=i,e;case _d:return e=Yt(13,s,t,a),e.elementType=_d,e.lanes=i,e;case $d:return e=Yt(19,s,t,a),e.elementType=$d,e.lanes=i,e;case up:return hc(s,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cp:l=10;break e;case dp:l=9;break e;case jx:l=11;break e;case Nx:l=14;break e;case us:l=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=Yt(l,s,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function jr(e,t,s,r){return e=Yt(7,e,r,t),e.lanes=s,e}function hc(e,t,s,r){return e=Yt(22,e,r,t),e.elementType=up,e.lanes=s,e.stateNode={isHidden:!1},e}function id(e,t,s){return e=Yt(6,e,null,t),e.lanes=s,e}function ld(e,t,s){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pv(e,t,s,r,a){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=Uc(0),this.expirationTimes=Uc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uc(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function sm(e,t,s,r,a,i,l,o,c){return e=new Pv(e,t,s,o,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Yt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},$x(i),e}function zv(e,t,s){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:na,key:r==null?null:""+r,children:e,containerInfo:t,implementation:s}}function ng(e){if(!e)return $s;e=e._reactInternals;e:{if(Lr(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var s=e.type;if(zt(s))return n0(e,s,t)}return t}function sg(e,t,s,r,a,i,l,o,c){return e=sm(s,r,!0,e,a,i,l,o,c),e.context=ng(null),s=e.current,r=yt(),a=Ds(s),i=Gn(r,a),i.callback=t??null,Os(s,i,a),e.current.lanes=a,fl(e,a,r),Rt(e,r),e}function fc(e,t,s,r){var a=t.current,i=yt(),l=Ds(a);return s=ng(s),t.context===null?t.context=s:t.pendingContext=s,t=Gn(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Os(a,t,l),e!==null&&(hn(e,a,l,i),ao(e,a,l)),l}function $o(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 Bh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function rm(e,t){Bh(e,t),(e=e.alternate)&&Bh(e,t)}function Rv(){return null}var rg=typeof reportError=="function"?reportError:function(e){console.error(e)};function am(e){this._internalRoot=e}pc.prototype.render=am.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));fc(e,t,null,null)};pc.prototype.unmount=am.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zr(function(){fc(null,e,null,null)}),t[Jn]=null}};function pc(e){this._internalRoot=e}pc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dp();e={blockedOn:null,target:e,priority:t};for(var s=0;s<hs.length&&t!==0&&t<hs[s].priority;s++);hs.splice(s,0,e),s===0&&Lp(e)}};function im(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Hh(){}function Mv(e,t,s,r,a){if(a){if(typeof r=="function"){var i=r;r=function(){var d=$o(l);i.call(d)}}var l=sg(t,r,e,0,null,!1,!1,"",Hh);return e._reactRootContainer=l,e[Jn]=l.current,Bi(e.nodeType===8?e.parentNode:e),zr(),l}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var o=r;r=function(){var d=$o(c);o.call(d)}}var c=sm(e,0,!1,null,null,!1,!1,"",Hh);return e._reactRootContainer=c,e[Jn]=c.current,Bi(e.nodeType===8?e.parentNode:e),zr(function(){fc(t,c,s,r)}),c}function yc(e,t,s,r,a){var i=s._reactRootContainer;if(i){var l=i;if(typeof a=="function"){var o=a;a=function(){var c=$o(l);o.call(c)}}fc(t,l,e,a)}else l=Mv(s,t,e,a,r);return $o(l)}Op=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=bi(t.pendingLanes);s!==0&&(Sx(t,s|1),Rt(t,$e()),!(ye&6)&&($a=$e()+500,qs()))}break;case 13:zr(function(){var r=Xn(e,1);if(r!==null){var a=yt();hn(r,e,1,a)}}),rm(e,1)}};Cx=function(e){if(e.tag===13){var t=Xn(e,134217728);if(t!==null){var s=yt();hn(t,e,134217728,s)}rm(e,134217728)}};Ap=function(e){if(e.tag===13){var t=Ds(e),s=Xn(e,t);if(s!==null){var r=yt();hn(s,e,t,r)}rm(e,t)}};Dp=function(){return we};Ip=function(e,t){var s=we;try{return we=e,t()}finally{we=s}};Yd=function(e,t,s){switch(t){case"input":if(Hd(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var r=s[t];if(r!==e&&r.form===e.form){var a=oc(r);if(!a)throw Error(B(90));mp(r),Hd(r,a)}}}break;case"textarea":fp(e,s);break;case"select":t=s.value,t!=null&&fa(e,!!s.multiple,t,!1)}};Np=Zx;wp=zr;var Tv={usingClientEntryPoint:!1,Events:[gl,la,oc,vp,jp,Zx]},ii={findFiberByHostInstance:ir,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ov={bundleType:ii.bundleType,version:ii.version,rendererPackageName:ii.rendererPackageName,rendererConfig:ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ns.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Cp(e),e===null?null:e.stateNode},findFiberByHostInstance:ii.findFiberByHostInstance||Rv,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 Hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hl.isDisabled&&Hl.supportsFiber)try{rc=Hl.inject(Ov),Sn=Hl}catch{}}Ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tv;Ht.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!im(t))throw Error(B(200));return zv(e,t,null,s)};Ht.createRoot=function(e,t){if(!im(e))throw Error(B(299));var s=!1,r="",a=rg;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=sm(e,1,!1,null,null,s,!1,r,a),e[Jn]=t.current,Bi(e.nodeType===8?e.parentNode:e),new am(t)};Ht.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(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=Cp(t),e=e===null?null:e.stateNode,e};Ht.flushSync=function(e){return zr(e)};Ht.hydrate=function(e,t,s){if(!gc(t))throw Error(B(200));return yc(null,e,t,!0,s)};Ht.hydrateRoot=function(e,t,s){if(!im(e))throw Error(B(405));var r=s!=null&&s.hydratedSources||null,a=!1,i="",l=rg;if(s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(i=s.identifierPrefix),s.onRecoverableError!==void 0&&(l=s.onRecoverableError)),t=sg(t,null,e,1,s??null,a,!1,i,l),e[Jn]=t.current,Bi(e),r)for(e=0;e<r.length;e++)s=r[e],a=s._getVersion,a=a(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,a]:t.mutableSourceEagerHydrationData.push(s,a);return new pc(t)};Ht.render=function(e,t,s){if(!gc(t))throw Error(B(200));return yc(null,e,t,!1,s)};Ht.unmountComponentAtNode=function(e){if(!gc(e))throw Error(B(40));return e._reactRootContainer?(zr(function(){yc(null,null,e,!1,function(){e._reactRootContainer=null,e[Jn]=null})}),!0):!1};Ht.unstable_batchedUpdates=Zx;Ht.unstable_renderSubtreeIntoContainer=function(e,t,s,r){if(!gc(s))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return yc(e,t,s,!1,r)};Ht.version="18.3.1-next-f1338f8080-20240426";function ag(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ag)}catch(e){console.error(e)}}ag(),ap.exports=Ht;var Av=ap.exports,ig,qh=Av;ig=qh.createRoot,qh.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ji.apply(this,arguments)}var Ps;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ps||(Ps={}));const Kh="popstate";function Dv(e){e===void 0&&(e={});function t(r,a){let{pathname:i,search:l,hash:o}=r.location;return zu("",{pathname:i,search:l,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function s(r,a){return typeof a=="string"?a:Uo(a)}return Lv(t,s,null,e)}function Fe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Iv(){return Math.random().toString(36).substr(2,8)}function Wh(e,t){return{usr:e.state,key:e.key,idx:t}}function zu(e,t,s,r){return s===void 0&&(s=null),Ji({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ga(t):t,{state:s,key:t&&t.key||r||Iv()})}function Uo(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ga(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Lv(e,t,s,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,o=Ps.Pop,c=null,d=x();d==null&&(d=0,l.replaceState(Ji({},l.state,{idx:d}),""));function x(){return(l.state||{idx:null}).idx}function f(){o=Ps.Pop;let N=x(),h=N==null?null:N-d;d=N,c&&c({action:o,location:v.location,delta:h})}function g(N,h){o=Ps.Push;let u=zu(v.location,N,h);d=x()+1;let p=Wh(u,d),j=v.createHref(u);try{l.pushState(p,"",j)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;a.location.assign(j)}i&&c&&c({action:o,location:v.location,delta:1})}function b(N,h){o=Ps.Replace;let u=zu(v.location,N,h);d=x();let p=Wh(u,d),j=v.createHref(u);l.replaceState(p,"",j),i&&c&&c({action:o,location:v.location,delta:0})}function y(N){let h=a.location.origin!=="null"?a.location.origin:a.location.href,u=typeof N=="string"?N:Uo(N);return u=u.replace(/ $/,"%20"),Fe(h,"No window.location.(origin|href) available to create URL for href: "+u),new URL(u,h)}let v={get action(){return o},get location(){return e(a,l)},listen(N){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(Kh,f),c=N,()=>{a.removeEventListener(Kh,f),c=null}},createHref(N){return t(a,N)},createURL:y,encodeLocation(N){let h=y(N);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:g,replace:b,go(N){return l.go(N)}};return v}var Vh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Vh||(Vh={}));function Fv(e,t,s){return s===void 0&&(s="/"),_v(e,t,s)}function _v(e,t,s,r){let a=typeof t=="string"?Ga(t):t,i=Ua(a.pathname||"/",s);if(i==null)return null;let l=lg(e);$v(l);let o=null;for(let c=0;o==null&&c<l.length;++c){let d=Jv(i);o=Qv(l[c],d)}return o}function lg(e,t,s,r){t===void 0&&(t=[]),s===void 0&&(s=[]),r===void 0&&(r="");let a=(i,l,o)=>{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};c.relativePath.startsWith("/")&&(Fe(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=Ls([r,c.relativePath]),x=s.concat(c);i.children&&i.children.length>0&&(Fe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),lg(i.children,t,x,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:Vv(d,i.index),routesMeta:x})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,l);else for(let c of og(i.path))a(i,l,c)}),t}function og(e){let t=e.split("/");if(t.length===0)return[];let[s,...r]=t,a=s.endsWith("?"),i=s.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let l=og(r.join("/")),o=[];return o.push(...l.map(c=>c===""?i:[i,c].join("/"))),a&&o.push(...l),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function $v(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:Gv(t.routesMeta.map(r=>r.childrenIndex),s.routesMeta.map(r=>r.childrenIndex)))}const Uv=/^:[\w-]+$/,Bv=3,Hv=2,qv=1,Kv=10,Wv=-2,Gh=e=>e==="*";function Vv(e,t){let s=e.split("/"),r=s.length;return s.some(Gh)&&(r+=Wv),t&&(r+=Hv),s.filter(a=>!Gh(a)).reduce((a,i)=>a+(Uv.test(i)?Bv:i===""?qv:Kv),r)}function Gv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Qv(e,t,s){let{routesMeta:r}=e,a={},i="/",l=[];for(let o=0;o<r.length;++o){let c=r[o],d=o===r.length-1,x=i==="/"?t:t.slice(i.length)||"/",f=Ru({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},x),g=c.route;if(!f)return null;Object.assign(a,f.params),l.push({params:a,pathname:Ls([i,f.pathname]),pathnameBase:nj(Ls([i,f.pathnameBase])),route:g}),f.pathnameBase!=="/"&&(i=Ls([i,f.pathnameBase]))}return l}function Ru(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,r]=Yv(e.path,e.caseSensitive,e.end),a=t.match(s);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((d,x,f)=>{let{paramName:g,isOptional:b}=x;if(g==="*"){let v=o[f]||"";l=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const y=o[f];return b&&!y?d[g]=void 0:d[g]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:l,pattern:e}}function Yv(e,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),lm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Jv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lm(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ua(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&r!=="/"?null:e.slice(s)||"/"}const Xv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zv=e=>Xv.test(e);function ej(e,t){t===void 0&&(t="/");let{pathname:s,search:r="",hash:a=""}=typeof e=="string"?Ga(e):e,i;if(s)if(Zv(s))i=s;else{if(s.includes("//")){let l=s;s=s.replace(/\/\/+/g,"/"),lm(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+s))}s.startsWith("/")?i=Qh(s.substring(1),"/"):i=Qh(s,t)}else i=t;return{pathname:i,search:sj(r),hash:rj(a)}}function Qh(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function od(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function tj(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function cg(e,t){let s=tj(e);return t?s.map((r,a)=>a===s.length-1?r.pathname:r.pathnameBase):s.map(r=>r.pathnameBase)}function dg(e,t,s,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Ga(e):(a=Ji({},e),Fe(!a.pathname||!a.pathname.includes("?"),od("?","pathname","search",a)),Fe(!a.pathname||!a.pathname.includes("#"),od("#","pathname","hash",a)),Fe(!a.search||!a.search.includes("#"),od("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=s;else{let f=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),f-=1;a.pathname=g.join("/")}o=f>=0?t[f]:"/"}let c=ej(a,o),d=l&&l!=="/"&&l.endsWith("/"),x=(i||l===".")&&s.endsWith("/");return!c.pathname.endsWith("/")&&(d||x)&&(c.pathname+="/"),c}const Ls=e=>e.join("/").replace(/\/\/+/g,"/"),nj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),sj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ug=["post","put","patch","delete"];new Set(ug);const ij=["get",...ug];new Set(ij);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function Xi(){return Xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Xi.apply(this,arguments)}const bc=m.createContext(null),xg=m.createContext(null),Ks=m.createContext(null),vc=m.createContext(null),Ws=m.createContext({outlet:null,matches:[],isDataRoute:!1}),mg=m.createContext(null);function lj(e,t){let{relative:s}=t===void 0?{}:t;bl()||Fe(!1);let{basename:r,navigator:a}=m.useContext(Ks),{hash:i,pathname:l,search:o}=jc(e,{relative:s}),c=l;return r!=="/"&&(c=l==="/"?r:Ls([r,l])),a.createHref({pathname:c,search:o,hash:i})}function bl(){return m.useContext(vc)!=null}function Vs(){return bl()||Fe(!1),m.useContext(vc).location}function hg(e){m.useContext(Ks).static||m.useLayoutEffect(e)}function zn(){let{isDataRoute:e}=m.useContext(Ws);return e?jj():oj()}function oj(){bl()||Fe(!1);let e=m.useContext(bc),{basename:t,future:s,navigator:r}=m.useContext(Ks),{matches:a}=m.useContext(Ws),{pathname:i}=Vs(),l=JSON.stringify(cg(a,s.v7_relativeSplatPath)),o=m.useRef(!1);return hg(()=>{o.current=!0}),m.useCallback(function(d,x){if(x===void 0&&(x={}),!o.current)return;if(typeof d=="number"){r.go(d);return}let f=dg(d,JSON.parse(l),i,x.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ls([t,f.pathname])),(x.replace?r.replace:r.push)(f,x.state,x)},[t,r,l,i,e])}function cj(){let{matches:e}=m.useContext(Ws),t=e[e.length-1];return t?t.params:{}}function jc(e,t){let{relative:s}=t===void 0?{}:t,{future:r}=m.useContext(Ks),{matches:a}=m.useContext(Ws),{pathname:i}=Vs(),l=JSON.stringify(cg(a,r.v7_relativeSplatPath));return m.useMemo(()=>dg(e,JSON.parse(l),i,s==="path"),[e,l,i,s])}function dj(e,t){return uj(e,t)}function uj(e,t,s,r){bl()||Fe(!1);let{navigator:a}=m.useContext(Ks),{matches:i}=m.useContext(Ws),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let c=l?l.pathnameBase:"/";l&&l.route;let d=Vs(),x;if(t){var f;let N=typeof t=="string"?Ga(t):t;c==="/"||(f=N.pathname)!=null&&f.startsWith(c)||Fe(!1),x=N}else x=d;let g=x.pathname||"/",b=g;if(c!=="/"){let N=c.replace(/^\//,"").split("/");b="/"+g.replace(/^\//,"").split("/").slice(N.length).join("/")}let y=Fv(e,{pathname:b}),v=pj(y&&y.map(N=>Object.assign({},N,{params:Object.assign({},o,N.params),pathname:Ls([c,a.encodeLocation?a.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?c:Ls([c,a.encodeLocation?a.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),i,s,r);return t&&v?m.createElement(vc.Provider,{value:{location:Xi({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:Ps.Pop}},v):v}function xj(){let e=vj(),t=aj(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),s?m.createElement("pre",{style:a},s):null,null)}const mj=m.createElement(xj,null);class hj extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?m.createElement(Ws.Provider,{value:this.props.routeContext},m.createElement(mg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fj(e){let{routeContext:t,match:s,children:r}=e,a=m.useContext(bc);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),m.createElement(Ws.Provider,{value:t},r)}function pj(e,t,s,r){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),r===void 0&&(r=null),e==null){var i;if(!s)return null;if(s.errors)e=s.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let l=e,o=(a=s)==null?void 0:a.errors;if(o!=null){let x=l.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);x>=0||Fe(!1),l=l.slice(0,Math.min(l.length,x+1))}let c=!1,d=-1;if(s&&r&&r.v7_partialHydration)for(let x=0;x<l.length;x++){let f=l[x];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(d=x),f.route.id){let{loaderData:g,errors:b}=s,y=f.route.loader&&g[f.route.id]===void 0&&(!b||b[f.route.id]===void 0);if(f.route.lazy||y){c=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}return l.reduceRight((x,f,g)=>{let b,y=!1,v=null,N=null;s&&(b=o&&f.route.id?o[f.route.id]:void 0,v=f.route.errorElement||mj,c&&(d<0&&g===0?(Nj("route-fallback"),y=!0,N=null):d===g&&(y=!0,N=f.route.hydrateFallbackElement||null)));let h=t.concat(l.slice(0,g+1)),u=()=>{let p;return b?p=v:y?p=N:f.route.Component?p=m.createElement(f.route.Component,null):f.route.element?p=f.route.element:p=x,m.createElement(fj,{match:f,routeContext:{outlet:x,matches:h,isDataRoute:s!=null},children:p})};return s&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?m.createElement(hj,{location:s.location,revalidation:s.revalidation,component:v,error:b,children:u(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):u()},null)}var fg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(fg||{}),pg=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(pg||{});function gj(e){let t=m.useContext(bc);return t||Fe(!1),t}function yj(e){let t=m.useContext(xg);return t||Fe(!1),t}function bj(e){let t=m.useContext(Ws);return t||Fe(!1),t}function gg(e){let t=bj(),s=t.matches[t.matches.length-1];return s.route.id||Fe(!1),s.route.id}function vj(){var e;let t=m.useContext(mg),s=yj(),r=gg();return t!==void 0?t:(e=s.errors)==null?void 0:e[r]}function jj(){let{router:e}=gj(fg.UseNavigateStable),t=gg(pg.UseNavigateStable),s=m.useRef(!1);return hg(()=>{s.current=!0}),m.useCallback(function(a,i){i===void 0&&(i={}),s.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Xi({fromRouteId:t},i)))},[e,t])}const Yh={};function Nj(e,t,s){Yh[e]||(Yh[e]=!0)}function wj(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function wt(e){Fe(!1)}function kj(e){let{basename:t="/",children:s=null,location:r,navigationType:a=Ps.Pop,navigator:i,static:l=!1,future:o}=e;bl()&&Fe(!1);let c=t.replace(/^\/*/,"/"),d=m.useMemo(()=>({basename:c,navigator:i,static:l,future:Xi({v7_relativeSplatPath:!1},o)}),[c,o,i,l]);typeof r=="string"&&(r=Ga(r));let{pathname:x="/",search:f="",hash:g="",state:b=null,key:y="default"}=r,v=m.useMemo(()=>{let N=Ua(x,c);return N==null?null:{location:{pathname:N,search:f,hash:g,state:b,key:y},navigationType:a}},[c,x,f,g,b,y,a]);return v==null?null:m.createElement(Ks.Provider,{value:d},m.createElement(vc.Provider,{children:s,value:v}))}function Sj(e){let{children:t,location:s}=e;return dj(Mu(t),s)}new Promise(()=>{});function Mu(e,t){t===void 0&&(t=[]);let s=[];return m.Children.forEach(e,(r,a)=>{if(!m.isValidElement(r))return;let i=[...t,a];if(r.type===m.Fragment){s.push.apply(s,Mu(r.props.children,i));return}r.type!==wt&&Fe(!1),!r.props.index||!r.props.children||Fe(!1);let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Mu(r.props.children,i)),s.push(l)}),s}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Bo.apply(this,arguments)}function yg(e,t){if(e==null)return{};var s={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(s[a]=e[a]);return s}function Cj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ej(e,t){return e.button===0&&(!t||t==="_self")&&!Cj(e)}const Pj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],zj=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Rj="6";try{window.__reactRouterVersion=Rj}catch{}const Mj=m.createContext({isTransitioning:!1}),Tj="startTransition",Jh=wb[Tj];function Oj(e){let{basename:t,children:s,future:r,window:a}=e,i=m.useRef();i.current==null&&(i.current=Dv({window:a,v5Compat:!0}));let l=i.current,[o,c]=m.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},x=m.useCallback(f=>{d&&Jh?Jh(()=>c(f)):c(f)},[c,d]);return m.useLayoutEffect(()=>l.listen(x),[l,x]),m.useEffect(()=>wj(r),[r]),m.createElement(kj,{basename:t,children:s,location:o.location,navigationType:o.action,navigator:l,future:r})}const Aj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Dj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ij=m.forwardRef(function(t,s){let{onClick:r,relative:a,reloadDocument:i,replace:l,state:o,target:c,to:d,preventScrollReset:x,viewTransition:f}=t,g=yg(t,Pj),{basename:b}=m.useContext(Ks),y,v=!1;if(typeof d=="string"&&Dj.test(d)&&(y=d,Aj))try{let p=new URL(window.location.href),j=d.startsWith("//")?new URL(p.protocol+d):new URL(d),w=Ua(j.pathname,b);j.origin===p.origin&&w!=null?d=w+j.search+j.hash:v=!0}catch{}let N=lj(d,{relative:a}),h=_j(d,{replace:l,state:o,target:c,preventScrollReset:x,relative:a,viewTransition:f});function u(p){r&&r(p),p.defaultPrevented||h(p)}return m.createElement("a",Bo({},g,{href:y||N,onClick:v||i?r:u,ref:s,target:c}))}),Lj=m.forwardRef(function(t,s){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:l=!1,style:o,to:c,viewTransition:d,children:x}=t,f=yg(t,zj),g=jc(c,{relative:f.relative}),b=Vs(),y=m.useContext(xg),{navigator:v,basename:N}=m.useContext(Ks),h=y!=null&&$j(g)&&d===!0,u=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,p=b.pathname,j=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(p=p.toLowerCase(),j=j?j.toLowerCase():null,u=u.toLowerCase()),j&&N&&(j=Ua(j,N)||j);const w=u!=="/"&&u.endsWith("/")?u.length-1:u.length;let z=p===u||!l&&p.startsWith(u)&&p.charAt(w)==="/",C=j!=null&&(j===u||!l&&j.startsWith(u)&&j.charAt(u.length)==="/"),P={isActive:z,isPending:C,isTransitioning:h},_=z?r:void 0,I;typeof i=="function"?I=i(P):I=[i,z?"active":null,C?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let Q=typeof o=="function"?o(P):o;return m.createElement(Ij,Bo({},f,{"aria-current":_,className:I,ref:s,style:Q,to:c,viewTransition:d}),typeof x=="function"?x(P):x)});var Tu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Tu||(Tu={}));var Xh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xh||(Xh={}));function Fj(e){let t=m.useContext(bc);return t||Fe(!1),t}function _j(e,t){let{target:s,replace:r,state:a,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,c=zn(),d=Vs(),x=jc(e,{relative:l});return m.useCallback(f=>{if(Ej(f,s)){f.preventDefault();let g=r!==void 0?r:Uo(d)===Uo(x);c(e,{replace:g,state:a,preventScrollReset:i,relative:l,viewTransition:o})}},[d,c,x,r,a,s,e,i,l,o])}function $j(e,t){t===void 0&&(t={});let s=m.useContext(Mj);s==null&&Fe(!1);let{basename:r}=Fj(Tu.useViewTransitionState),a=jc(e,{relative:t.relative});if(!s.isTransitioning)return!1;let i=Ua(s.currentLocation.pathname,r)||s.currentLocation.pathname,l=Ua(s.nextLocation.pathname,r)||s.nextLocation.pathname;return Ru(a.pathname,l)!=null||Ru(a.pathname,i)!=null}var Qa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ur,gs,Na,Lf,Uj=(Lf=class extends Qa{constructor(){super();te(this,ur);te(this,gs);te(this,Na);V(this,Na,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){k(this,gs)||this.setEventListener(k(this,Na))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,gs))==null||t.call(this),V(this,gs,void 0))}setEventListener(t){var s;V(this,Na,t),(s=k(this,gs))==null||s.call(this),V(this,gs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,ur)!==t&&(V(this,ur,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof k(this,ur)=="boolean"?k(this,ur):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ur=new WeakMap,gs=new WeakMap,Na=new WeakMap,Lf),om=new Uj,Bj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ys,xx,Ff,Hj=(Ff=class{constructor(){te(this,ys,Bj);te(this,xx,!1)}setTimeoutProvider(e){V(this,ys,e)}setTimeout(e,t){return k(this,ys).setTimeout(e,t)}clearTimeout(e){k(this,ys).clearTimeout(e)}setInterval(e,t){return k(this,ys).setInterval(e,t)}clearInterval(e){k(this,ys).clearInterval(e)}},ys=new WeakMap,xx=new WeakMap,Ff),cr=new Hj;function qj(e){setTimeout(e,0)}var Kj=typeof window>"u"||"Deno"in globalThis;function pt(){}function Wj(e,t){return typeof e=="function"?e(t):e}function Ou(e){return typeof e=="number"&&e>=0&&e!==1/0}function bg(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fs(e,t){return typeof e=="function"?e(t):e}function Vt(e,t){return typeof e=="function"?e(t):e}function Zh(e,t){const{type:s="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:o}=e;if(l){if(r){if(t.queryHash!==cm(l,t.options))return!1}else if(!Zi(t.queryKey,l))return!1}if(s!=="all"){const c=t.isActive();if(s==="active"&&!c||s==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function ef(e,t){const{exact:s,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(s){if(Rr(t.options.mutationKey)!==Rr(i))return!1}else if(!Zi(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function cm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Rr)(e)}function Rr(e){return JSON.stringify(e,(t,s)=>Au(s)?Object.keys(s).sort().reduce((r,a)=>(r[a]=s[a],r),{}):s)}function Zi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>Zi(e[s],t[s])):!1}var Vj=Object.prototype.hasOwnProperty;function vg(e,t,s=0){if(e===t)return e;if(s>500)return t;const r=tf(e)&&tf(t);if(!r&&!(Au(e)&&Au(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),o=l.length,c=r?new Array(o):{};let d=0;for(let x=0;x<o;x++){const f=r?x:l[x],g=e[f],b=t[f];if(g===b){c[f]=g,(r?x<i:Vj.call(e,f))&&d++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){c[f]=b;continue}const y=vg(g,b,s+1);c[f]=y,y===g&&d++}return i===o&&d===i?e:c}function Ho(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function tf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Au(e){if(!nf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!nf(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Gj(e){return new Promise(t=>{cr.setTimeout(t,e)})}function Du(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?vg(e,t):t}function Qj(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function Yj(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var dm=Symbol();function jg(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===dm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function um(e,t){return typeof e=="function"?e(...t):!!e}function Jj(e,t,s){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),e}var el=(()=>{let e=()=>Kj;return{isServer(){return e()},setIsServer(t){e=t}}})();function Iu(){let e,t;const s=new Promise((a,i)=>{e=a,t=i});s.status="pending",s.catch(()=>{});function r(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},s.reject=a=>{r({status:"rejected",reason:a}),t(a)},s}var Xj=qj;function Zj(){let e=[],t=0,s=o=>{o()},r=o=>{o()},a=Xj;const i=o=>{t?e.push(o):a(()=>{s(o)})},l=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(c=>{s(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||l()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var Ge=Zj(),wa,bs,ka,_f,eN=(_f=class extends Qa{constructor(){super();te(this,wa,!0);te(this,bs);te(this,ka);V(this,ka,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,bs)||this.setEventListener(k(this,ka))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,bs))==null||t.call(this),V(this,bs,void 0))}setEventListener(t){var s;V(this,ka,t),(s=k(this,bs))==null||s.call(this),V(this,bs,t(this.setOnline.bind(this)))}setOnline(t){k(this,wa)!==t&&(V(this,wa,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,wa)}},wa=new WeakMap,bs=new WeakMap,ka=new WeakMap,_f),qo=new eN;function tN(e){return Math.min(1e3*2**e,3e4)}function Ng(e){return(e??"online")==="online"?qo.isOnline():!0}var Lu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wg(e){let t=!1,s=0,r;const a=Iu(),i=()=>a.status!=="pending",l=v=>{var N;if(!i()){const h=new Lu(v);g(h),(N=e.onCancel)==null||N.call(e,h)}},o=()=>{t=!0},c=()=>{t=!1},d=()=>om.isFocused()&&(e.networkMode==="always"||qo.isOnline())&&e.canRun(),x=()=>Ng(e.networkMode)&&e.canRun(),f=v=>{i()||(r==null||r(),a.resolve(v))},g=v=>{i()||(r==null||r(),a.reject(v))},b=()=>new Promise(v=>{var N;r=h=>{(i()||d())&&v(h)},(N=e.onPause)==null||N.call(e)}).then(()=>{var v;r=void 0,i()||(v=e.onContinue)==null||v.call(e)}),y=()=>{if(i())return;let v;const N=s===0?e.initialPromise:void 0;try{v=N??e.fn()}catch(h){v=Promise.reject(h)}Promise.resolve(v).then(f).catch(h=>{var z;if(i())return;const u=e.retry??(el.isServer()?0:3),p=e.retryDelay??tN,j=typeof p=="function"?p(s,h):p,w=u===!0||typeof u=="number"&&s<u||typeof u=="function"&&u(s,h);if(t||!w){g(h);return}s++,(z=e.onFail)==null||z.call(e,s,h),Gj(j).then(()=>d()?void 0:b()).then(()=>{t?g(h):y()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:c,canStart:x,start:()=>(x()?y():b().then(y),a)}}var xr,$f,kg=($f=class{constructor(){te(this,xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ou(this.gcTime)&&V(this,xr,cr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(el.isServer()?1/0:5*60*1e3))}clearGcTimeout(){k(this,xr)&&(cr.clearTimeout(k(this,xr)),V(this,xr,void 0))}},xr=new WeakMap,$f),mr,Sa,Wt,hr,Je,cl,fr,_t,Sg,Ln,Uf,nN=(Uf=class extends kg{constructor(t){super();te(this,_t);te(this,mr);te(this,Sa);te(this,Wt);te(this,hr);te(this,Je);te(this,cl);te(this,fr);V(this,fr,!1),V(this,cl,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,hr,t.client),V(this,Wt,k(this,hr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,mr,rf(this.options)),this.state=t.state??k(this,mr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,Je))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,cl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=rf(this.options);s.data!==void 0&&(this.setState(sf(s.data,s.dataUpdatedAt)),V(this,mr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Wt).remove(this)}setData(t,s){const r=Du(this.state.data,t,this.options);return oe(this,_t,Ln).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t,s){oe(this,_t,Ln).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var r,a;const s=(r=k(this,Je))==null?void 0:r.promise;return(a=k(this,Je))==null||a.cancel(t),s?s.then(pt).catch(pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return k(this,mr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Fs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!bg(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=k(this,Je))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=k(this,Je))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(k(this,Je)&&(k(this,fr)||oe(this,_t,Sg).call(this)?k(this,Je).cancel({revert:!0}):k(this,Je).cancelRetry()),this.scheduleGc()),k(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||oe(this,_t,Ln).call(this,{type:"invalidate"})}async fetch(t,s){var c,d,x,f,g,b,y,v,N,h,u,p;if(this.state.fetchStatus!=="idle"&&((c=k(this,Je))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(k(this,Je))return k(this,Je).continueRetry(),k(this,Je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(w=>w.options.queryFn);j&&this.setOptions(j.options)}const r=new AbortController,a=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(V(this,fr,!0),r.signal)})},i=()=>{const j=jg(this.options,s),z=(()=>{const C={client:k(this,hr),queryKey:this.queryKey,meta:this.meta};return a(C),C})();return V(this,fr,!1),this.options.persister?this.options.persister(j,z,this):j(z)},o=(()=>{const j={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:k(this,hr),state:this.state,fetchFn:i};return a(j),j})();(d=this.options.behavior)==null||d.onFetch(o,this),V(this,Sa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=o.fetchOptions)==null?void 0:x.meta))&&oe(this,_t,Ln).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta}),V(this,Je,wg({initialPromise:s==null?void 0:s.initialPromise,fn:o.fetchFn,onCancel:j=>{j instanceof Lu&&j.revert&&this.setState({...k(this,Sa),fetchStatus:"idle"}),r.abort()},onFail:(j,w)=>{oe(this,_t,Ln).call(this,{type:"failed",failureCount:j,error:w})},onPause:()=>{oe(this,_t,Ln).call(this,{type:"pause"})},onContinue:()=>{oe(this,_t,Ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const j=await k(this,Je).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(b=(g=k(this,Wt).config).onSuccess)==null||b.call(g,j,this),(v=(y=k(this,Wt).config).onSettled)==null||v.call(y,j,this.state.error,this),j}catch(j){if(j instanceof Lu){if(j.silent)return k(this,Je).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw oe(this,_t,Ln).call(this,{type:"error",error:j}),(h=(N=k(this,Wt).config).onError)==null||h.call(N,j,this),(p=(u=k(this,Wt).config).onSettled)==null||p.call(u,this.state.data,j,this),j}finally{this.scheduleGc()}}},mr=new WeakMap,Sa=new WeakMap,Wt=new WeakMap,hr=new WeakMap,Je=new WeakMap,cl=new WeakMap,fr=new WeakMap,_t=new WeakSet,Sg=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ln=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Cg(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...sf(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return V(this,Sa,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),Ge.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Wt).notify({query:this,type:"updated",action:t})})},Uf);function Cg(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ng(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sf(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rf(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var kt,ge,dl,ht,pr,Ca,Un,vs,ul,Ea,Pa,gr,yr,js,za,je,ji,Fu,_u,$u,Uu,Bu,Hu,qu,Eg,Bf,sN=(Bf=class extends Qa{constructor(t,s){super();te(this,je);te(this,kt);te(this,ge);te(this,dl);te(this,ht);te(this,pr);te(this,Ca);te(this,Un);te(this,vs);te(this,ul);te(this,Ea);te(this,Pa);te(this,gr);te(this,yr);te(this,js);te(this,za,new Set);this.options=s,V(this,kt,t),V(this,vs,null),V(this,Un,Iu()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,ge).addObserver(this),af(k(this,ge),this.options)?oe(this,je,ji).call(this):this.updateResult(),oe(this,je,Uu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ku(k(this,ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ku(k(this,ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,oe(this,je,Bu).call(this),oe(this,je,Hu).call(this),k(this,ge).removeObserver(this)}setOptions(t){const s=this.options,r=k(this,ge);if(this.options=k(this,kt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vt(this.options.enabled,k(this,ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");oe(this,je,qu).call(this),k(this,ge).setOptions(this.options),s._defaulted&&!Ho(this.options,s)&&k(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,ge),observer:this});const a=this.hasListeners();a&&lf(k(this,ge),r,this.options,s)&&oe(this,je,ji).call(this),this.updateResult(),a&&(k(this,ge)!==r||Vt(this.options.enabled,k(this,ge))!==Vt(s.enabled,k(this,ge))||Fs(this.options.staleTime,k(this,ge))!==Fs(s.staleTime,k(this,ge)))&&oe(this,je,Fu).call(this);const i=oe(this,je,_u).call(this);a&&(k(this,ge)!==r||Vt(this.options.enabled,k(this,ge))!==Vt(s.enabled,k(this,ge))||i!==k(this,js))&&oe(this,je,$u).call(this,i)}getOptimisticResult(t){const s=k(this,kt).getQueryCache().build(k(this,kt),t),r=this.createResult(s,t);return aN(this,r)&&(V(this,ht,r),V(this,Ca,this.options),V(this,pr,k(this,ge).state)),r}getCurrentResult(){return k(this,ht)}trackResult(t,s){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,Un).status==="pending"&&k(this,Un).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){k(this,za).add(t)}getCurrentQuery(){return k(this,ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=k(this,kt).defaultQueryOptions(t),r=k(this,kt).getQueryCache().build(k(this,kt),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return oe(this,je,ji).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,ht)))}createResult(t,s){var _;const r=k(this,ge),a=this.options,i=k(this,ht),l=k(this,pr),o=k(this,Ca),d=t!==r?t.state:k(this,dl),{state:x}=t;let f={...x},g=!1,b;if(s._optimisticResults){const I=this.hasListeners(),Q=!I&&af(t,s),J=I&&lf(t,r,s,a);(Q||J)&&(f={...f,...Cg(x.data,t.options)}),s._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:y,errorUpdatedAt:v,status:N}=f;b=f.data;let h=!1;if(s.placeholderData!==void 0&&b===void 0&&N==="pending"){let I;i!=null&&i.isPlaceholderData&&s.placeholderData===(o==null?void 0:o.placeholderData)?(I=i.data,h=!0):I=typeof s.placeholderData=="function"?s.placeholderData((_=k(this,Pa))==null?void 0:_.state.data,k(this,Pa)):s.placeholderData,I!==void 0&&(N="success",b=Du(i==null?void 0:i.data,I,s),g=!0)}if(s.select&&b!==void 0&&!h)if(i&&b===(l==null?void 0:l.data)&&s.select===k(this,ul))b=k(this,Ea);else try{V(this,ul,s.select),b=s.select(b),b=Du(i==null?void 0:i.data,b,s),V(this,Ea,b),V(this,vs,null)}catch(I){V(this,vs,I)}k(this,vs)&&(y=k(this,vs),b=k(this,Ea),v=Date.now(),N="error");const u=f.fetchStatus==="fetching",p=N==="pending",j=N==="error",w=p&&u,z=b!==void 0,P={status:N,fetchStatus:f.fetchStatus,isPending:p,isSuccess:N==="success",isError:j,isInitialLoading:w,isLoading:w,data:b,dataUpdatedAt:f.dataUpdatedAt,error:y,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>d.dataUpdateCount||f.errorUpdateCount>d.errorUpdateCount,isFetching:u,isRefetching:u&&!p,isLoadingError:j&&!z,isPaused:f.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:j&&z,isStale:xm(t,s),refetch:this.refetch,promise:k(this,Un),isEnabled:Vt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=P.data!==void 0,Q=P.status==="error"&&!I,J=L=>{Q?L.reject(P.error):I&&L.resolve(P.data)},O=()=>{const L=V(this,Un,P.promise=Iu());J(L)},E=k(this,Un);switch(E.status){case"pending":t.queryHash===r.queryHash&&J(E);break;case"fulfilled":(Q||P.data!==E.value)&&O();break;case"rejected":(!Q||P.error!==E.reason)&&O();break}}return P}updateResult(){const t=k(this,ht),s=this.createResult(k(this,ge),this.options);if(V(this,pr,k(this,ge).state),V(this,Ca,this.options),k(this,pr).data!==void 0&&V(this,Pa,k(this,ge)),Ho(s,t))return;V(this,ht,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!k(this,za).size)return!0;const l=new Set(i??k(this,za));return this.options.throwOnError&&l.add("error"),Object.keys(k(this,ht)).some(o=>{const c=o;return k(this,ht)[c]!==t[c]&&l.has(c)})};oe(this,je,Eg).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&oe(this,je,Uu).call(this)}},kt=new WeakMap,ge=new WeakMap,dl=new WeakMap,ht=new WeakMap,pr=new WeakMap,Ca=new WeakMap,Un=new WeakMap,vs=new WeakMap,ul=new WeakMap,Ea=new WeakMap,Pa=new WeakMap,gr=new WeakMap,yr=new WeakMap,js=new WeakMap,za=new WeakMap,je=new WeakSet,ji=function(t){oe(this,je,qu).call(this);let s=k(this,ge).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(pt)),s},Fu=function(){oe(this,je,Bu).call(this);const t=Fs(this.options.staleTime,k(this,ge));if(el.isServer()||k(this,ht).isStale||!Ou(t))return;const r=bg(k(this,ht).dataUpdatedAt,t)+1;V(this,gr,cr.setTimeout(()=>{k(this,ht).isStale||this.updateResult()},r))},_u=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,ge)):this.options.refetchInterval)??!1},$u=function(t){oe(this,je,Hu).call(this),V(this,js,t),!(el.isServer()||Vt(this.options.enabled,k(this,ge))===!1||!Ou(k(this,js))||k(this,js)===0)&&V(this,yr,cr.setInterval(()=>{(this.options.refetchIntervalInBackground||om.isFocused())&&oe(this,je,ji).call(this)},k(this,js)))},Uu=function(){oe(this,je,Fu).call(this),oe(this,je,$u).call(this,oe(this,je,_u).call(this))},Bu=function(){k(this,gr)&&(cr.clearTimeout(k(this,gr)),V(this,gr,void 0))},Hu=function(){k(this,yr)&&(cr.clearInterval(k(this,yr)),V(this,yr,void 0))},qu=function(){const t=k(this,kt).getQueryCache().build(k(this,kt),this.options);if(t===k(this,ge))return;const s=k(this,ge);V(this,ge,t),V(this,dl,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Eg=function(t){Ge.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(k(this,ht))}),k(this,kt).getQueryCache().notify({query:k(this,ge),type:"observerResultsUpdated"})})},Bf);function rN(e,t){return Vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function af(e,t){return rN(e,t)||e.state.data!==void 0&&Ku(e,t,t.refetchOnMount)}function Ku(e,t,s){if(Vt(t.enabled,e)!==!1&&Fs(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&xm(e,t)}return!1}function lf(e,t,s,r){return(e!==t||Vt(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&xm(e,s)}function xm(e,t){return Vt(t.enabled,e)!==!1&&e.isStaleByTime(Fs(t.staleTime,e))}function aN(e,t){return!Ho(e.getCurrentResult(),t)}function of(e){return{onFetch:(t,s)=>{var x,f,g,b,y;const r=t.options,a=(g=(f=(x=t.fetchOptions)==null?void 0:x.meta)==null?void 0:f.fetchMore)==null?void 0:g.direction,i=((b=t.state.data)==null?void 0:b.pages)||[],l=((y=t.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const d=async()=>{let v=!1;const N=p=>{Jj(p,()=>t.signal,()=>v=!0)},h=jg(t.options,t.fetchOptions),u=async(p,j,w)=>{if(v)return Promise.reject();if(j==null&&p.pages.length)return Promise.resolve(p);const C=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:j,direction:w?"backward":"forward",meta:t.options.meta};return N(Q),Q})(),P=await h(C),{maxPages:_}=t.options,I=w?Yj:Qj;return{pages:I(p.pages,P,_),pageParams:I(p.pageParams,j,_)}};if(a&&i.length){const p=a==="backward",j=p?iN:cf,w={pages:i,pageParams:l},z=j(r,w);o=await u(w,z,p)}else{const p=e??i.length;do{const j=c===0?l[0]??r.initialPageParam:cf(r,o);if(c>0&&j==null)break;o=await u(o,j),c++}while(c<p)}return o};t.options.persister?t.fetchFn=()=>{var v,N;return(N=(v=t.options).persister)==null?void 0:N.call(v,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=d}}}function cf(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function iN(e,{pages:t,pageParams:s}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,s[0],s):void 0}var xl,vn,dt,br,jn,ds,Hf,lN=(Hf=class extends kg{constructor(t){super();te(this,jn);te(this,xl);te(this,vn);te(this,dt);te(this,br);V(this,xl,t.client),this.mutationId=t.mutationId,V(this,dt,t.mutationCache),V(this,vn,[]),this.state=t.state||Pg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,vn).includes(t)||(k(this,vn).push(t),this.clearGcTimeout(),k(this,dt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,vn,k(this,vn).filter(s=>s!==t)),this.scheduleGc(),k(this,dt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,vn).length||(this.state.status==="pending"?this.scheduleGc():k(this,dt).remove(this))}continue(){var t;return((t=k(this,br))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,o,c,d,x,f,g,b,y,v,N,h,u,p,j,w,z,C;const s=()=>{oe(this,jn,ds).call(this,{type:"continue"})},r={client:k(this,xl),meta:this.options.meta,mutationKey:this.options.mutationKey};V(this,br,wg({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,_)=>{oe(this,jn,ds).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{oe(this,jn,ds).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,dt).canRun(this)}));const a=this.state.status==="pending",i=!k(this,br).canStart();try{if(a)s();else{oe(this,jn,ds).call(this,{type:"pending",variables:t,isPaused:i}),k(this,dt).config.onMutate&&await k(this,dt).config.onMutate(t,this,r);const _=await((o=(l=this.options).onMutate)==null?void 0:o.call(l,t,r));_!==this.state.context&&oe(this,jn,ds).call(this,{type:"pending",context:_,variables:t,isPaused:i})}const P=await k(this,br).start();return await((d=(c=k(this,dt).config).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,this,r)),await((f=(x=this.options).onSuccess)==null?void 0:f.call(x,P,t,this.state.context,r)),await((b=(g=k(this,dt).config).onSettled)==null?void 0:b.call(g,P,null,this.state.variables,this.state.context,this,r)),await((v=(y=this.options).onSettled)==null?void 0:v.call(y,P,null,t,this.state.context,r)),oe(this,jn,ds).call(this,{type:"success",data:P}),P}catch(P){try{await((h=(N=k(this,dt).config).onError)==null?void 0:h.call(N,P,t,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((p=(u=this.options).onError)==null?void 0:p.call(u,P,t,this.state.context,r))}catch(_){Promise.reject(_)}try{await((w=(j=k(this,dt).config).onSettled)==null?void 0:w.call(j,void 0,P,this.state.variables,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((C=(z=this.options).onSettled)==null?void 0:C.call(z,void 0,P,t,this.state.context,r))}catch(_){Promise.reject(_)}throw oe(this,jn,ds).call(this,{type:"error",error:P}),P}finally{k(this,dt).runNext(this)}}},xl=new WeakMap,vn=new WeakMap,dt=new WeakMap,br=new WeakMap,jn=new WeakSet,ds=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Ge.batch(()=>{k(this,vn).forEach(r=>{r.onMutationUpdate(t)}),k(this,dt).notify({mutation:this,type:"updated",action:t})})},Hf);function Pg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bn,cn,ml,qf,oN=(qf=class extends Qa{constructor(t={}){super();te(this,Bn);te(this,cn);te(this,ml);this.config=t,V(this,Bn,new Set),V(this,cn,new Map),V(this,ml,0)}build(t,s,r){const a=new lN({client:t,mutationCache:this,mutationId:++Cl(this,ml)._,options:t.defaultMutationOptions(s),state:r});return this.add(a),a}add(t){k(this,Bn).add(t);const s=ql(t);if(typeof s=="string"){const r=k(this,cn).get(s);r?r.push(t):k(this,cn).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,Bn).delete(t)){const s=ql(t);if(typeof s=="string"){const r=k(this,cn).get(s);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&k(this,cn).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=ql(t);if(typeof s=="string"){const r=k(this,cn).get(s),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const s=ql(t);if(typeof s=="string"){const a=(r=k(this,cn).get(s))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ge.batch(()=>{k(this,Bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,Bn).clear(),k(this,cn).clear()})}getAll(){return Array.from(k(this,Bn))}find(t){const s={exact:!0,...t};return this.getAll().find(r=>ef(s,r))}findAll(t={}){return this.getAll().filter(s=>ef(t,s))}notify(t){Ge.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return Ge.batch(()=>Promise.all(t.map(s=>s.continue().catch(pt))))}},Bn=new WeakMap,cn=new WeakMap,ml=new WeakMap,qf);function ql(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Hn,Ns,St,qn,Qn,mo,Wu,Kf,cN=(Kf=class extends Qa{constructor(s,r){super();te(this,Qn);te(this,Hn);te(this,Ns);te(this,St);te(this,qn);V(this,Hn,s),this.setOptions(r),this.bindMethods(),oe(this,Qn,mo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var a;const r=this.options;this.options=k(this,Hn).defaultMutationOptions(s),Ho(this.options,r)||k(this,Hn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,St),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Rr(r.mutationKey)!==Rr(this.options.mutationKey)?this.reset():((a=k(this,St))==null?void 0:a.state.status)==="pending"&&k(this,St).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=k(this,St))==null||s.removeObserver(this)}onMutationUpdate(s){oe(this,Qn,mo).call(this),oe(this,Qn,Wu).call(this,s)}getCurrentResult(){return k(this,Ns)}reset(){var s;(s=k(this,St))==null||s.removeObserver(this),V(this,St,void 0),oe(this,Qn,mo).call(this),oe(this,Qn,Wu).call(this)}mutate(s,r){var a;return V(this,qn,r),(a=k(this,St))==null||a.removeObserver(this),V(this,St,k(this,Hn).getMutationCache().build(k(this,Hn),this.options)),k(this,St).addObserver(this),k(this,St).execute(s)}},Hn=new WeakMap,Ns=new WeakMap,St=new WeakMap,qn=new WeakMap,Qn=new WeakSet,mo=function(){var r;const s=((r=k(this,St))==null?void 0:r.state)??Pg();V(this,Ns,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},Wu=function(s){Ge.batch(()=>{var r,a,i,l,o,c,d,x;if(k(this,qn)&&this.hasListeners()){const f=k(this,Ns).variables,g=k(this,Ns).context,b={client:k(this,Hn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(a=(r=k(this,qn)).onSuccess)==null||a.call(r,s.data,f,g,b)}catch(y){Promise.reject(y)}try{(l=(i=k(this,qn)).onSettled)==null||l.call(i,s.data,null,f,g,b)}catch(y){Promise.reject(y)}}else if((s==null?void 0:s.type)==="error"){try{(c=(o=k(this,qn)).onError)==null||c.call(o,s.error,f,g,b)}catch(y){Promise.reject(y)}try{(x=(d=k(this,qn)).onSettled)==null||x.call(d,void 0,s.error,f,g,b)}catch(y){Promise.reject(y)}}}this.listeners.forEach(f=>{f(k(this,Ns))})})},Kf),Nn,Wf,dN=(Wf=class extends Qa{constructor(t={}){super();te(this,Nn);this.config=t,V(this,Nn,new Map)}build(t,s,r){const a=s.queryKey,i=s.queryHash??cm(a,s);let l=this.get(i);return l||(l=new nN({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){k(this,Nn).has(t.queryHash)||(k(this,Nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=k(this,Nn).get(t.queryHash);s&&(t.destroy(),s===t&&k(this,Nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,Nn).get(t)}getAll(){return[...k(this,Nn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Zh(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>Zh(t,r)):s}notify(t){Ge.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Nn=new WeakMap,Wf),Ie,ws,ks,Ra,Ma,Ss,Ta,Oa,Vf,uN=(Vf=class{constructor(e={}){te(this,Ie);te(this,ws);te(this,ks);te(this,Ra);te(this,Ma);te(this,Ss);te(this,Ta);te(this,Oa);V(this,Ie,e.queryCache||new dN),V(this,ws,e.mutationCache||new oN),V(this,ks,e.defaultOptions||{}),V(this,Ra,new Map),V(this,Ma,new Map),V(this,Ss,0)}mount(){Cl(this,Ss)._++,k(this,Ss)===1&&(V(this,Ta,om.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ie).onFocus())})),V(this,Oa,qo.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ie).onOnline())})))}unmount(){var e,t;Cl(this,Ss)._--,k(this,Ss)===0&&((e=k(this,Ta))==null||e.call(this),V(this,Ta,void 0),(t=k(this,Oa))==null||t.call(this),V(this,Oa,void 0))}isFetching(e){return k(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,ws).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=k(this,Ie).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=k(this,Ie).build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Fs(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,Ie).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),a=k(this,Ie).get(r.queryHash),i=a==null?void 0:a.state.data,l=Wj(t,i);if(l!==void 0)return k(this,Ie).build(this,r).setData(l,{...s,manual:!0})}setQueriesData(e,t,s){return Ge.batch(()=>k(this,Ie).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=k(this,Ie).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=k(this,Ie);Ge.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=k(this,Ie);return Ge.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=Ge.batch(()=>k(this,Ie).findAll(e).map(a=>a.cancel(s)));return Promise.all(r).then(pt).catch(pt)}invalidateQueries(e,t={}){return Ge.batch(()=>(k(this,Ie).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=Ge.batch(()=>k(this,Ie).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,s);return s.throwOnError||(i=i.catch(pt)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(pt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=k(this,Ie).build(this,t);return s.isStaleByTime(Fs(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(pt).catch(pt)}fetchInfiniteQuery(e){return e.behavior=of(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(pt).catch(pt)}ensureInfiniteQueryData(e){return e.behavior=of(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qo.isOnline()?k(this,ws).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,Ie)}getMutationCache(){return k(this,ws)}getDefaultOptions(){return k(this,ks)}setDefaultOptions(e){V(this,ks,e)}setQueryDefaults(e,t){k(this,Ra).set(Rr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Ra).values()],s={};return t.forEach(r=>{Zi(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){k(this,Ma).set(Rr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Ma).values()],s={};return t.forEach(r=>{Zi(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,ks).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,ks).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,Ie).clear(),k(this,ws).clear()}},Ie=new WeakMap,ws=new WeakMap,ks=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Ss=new WeakMap,Ta=new WeakMap,Oa=new WeakMap,Vf),zg=m.createContext(void 0),le=e=>{const t=m.useContext(zg);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xN=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(zg.Provider,{value:e,children:t})),Rg=m.createContext(!1),mN=()=>m.useContext(Rg);Rg.Provider;function hN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fN=m.createContext(hN()),pN=()=>m.useContext(fN),gN=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?um(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},yN=e=>{m.useEffect(()=>{e.clearReset()},[e])},bN=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||um(s,[e.error,r])),vN=e=>{if(e.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>s(r(...a)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},jN=(e,t)=>e.isLoading&&e.isFetching&&!t,NN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,df=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function wN(e,t,s){var g,b,y,v;const r=mN(),a=pN(),i=le(),l=i.defaultQueryOptions(e);(b=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||b.call(g,l);const o=i.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",vN(l),gN(l,a,o),yN(a);const c=!i.getQueryCache().get(l.queryHash),[d]=m.useState(()=>new t(i,l)),x=d.getOptimisticResult(l),f=!r&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(N=>{const h=f?d.subscribe(Ge.batchCalls(N)):pt;return d.updateResult(),h},[d,f]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),m.useEffect(()=>{d.setOptions(l)},[l,d]),NN(l,x))throw df(l,d,a);if(bN({result:x,errorResetBoundary:a,throwOnError:l.throwOnError,query:o,suspense:l.suspense}))throw x.error;if((v=(y=i.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||v.call(y,l,x),l.experimental_prefetchInRender&&!el.isServer()&&jN(x,r)){const N=c?df(l,d,a):o==null?void 0:o.promise;N==null||N.catch(pt).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?x:d.trackResult(x)}function ke(e,t){return wN(e,sN)}function X(e,t){const s=le(),[r]=m.useState(()=>new cN(s,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const a=m.useSyncExternalStore(m.useCallback(l=>r.subscribe(Ge.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=m.useCallback((l,o)=>{r.mutate(l,o).catch(pt)},[r]);if(a.error&&um(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}let kN={data:""},SN=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||kN},CN=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,EN=/\/\*[^]*?\*\/| +/g,uf=/\n+/g,ps=(e,t)=>{let s="",r="",a="";for(let i in e){let l=e[i];i[0]=="@"?i[1]=="i"?s=i+" "+l+";":r+=i[1]=="f"?ps(l,i):i+"{"+ps(l,i[1]=="k"?"":t)+"}":typeof l=="object"?r+=ps(l,t?t.replace(/([^,])+/g,o=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,o):o?o+" "+c:c)):i):l!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=ps.p?ps.p(i,l):i+":"+l+";")}return s+(t&&a?t+"{"+a+"}":a)+r},An={},Mg=e=>{if(typeof e=="object"){let t="";for(let s in e)t+=s+Mg(e[s]);return t}return e},PN=(e,t,s,r,a)=>{let i=Mg(e),l=An[i]||(An[i]=(c=>{let d=0,x=11;for(;d<c.length;)x=101*x+c.charCodeAt(d++)>>>0;return"go"+x})(i));if(!An[l]){let c=i!==e?e:(d=>{let x,f,g=[{}];for(;x=CN.exec(d.replace(EN,""));)x[4]?g.shift():x[3]?(f=x[3].replace(uf," ").trim(),g.unshift(g[0][f]=g[0][f]||{})):g[0][x[1]]=x[2].replace(uf," ").trim();return g[0]})(e);An[l]=ps(a?{["@keyframes "+l]:c}:c,s?"":"."+l)}let o=s&&An.g?An.g:null;return s&&(An.g=An[l]),((c,d,x,f)=>{f?d.data=d.data.replace(f,c):d.data.indexOf(c)===-1&&(d.data=x?c+d.data:d.data+c)})(An[l],t,r,o),l},zN=(e,t,s)=>e.reduce((r,a,i)=>{let l=t[i];if(l&&l.call){let o=l(s),c=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=c?"."+c:o&&typeof o=="object"?o.props?"":ps(o,""):o===!1?"":o}return r+a+(l??"")},"");function Nc(e){let t=this||{},s=e.call?e(t.p):e;return PN(s.unshift?s.raw?zN(s,[].slice.call(arguments,1),t.p):s.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):s,SN(t.target),t.g,t.o,t.k)}let Tg,Vu,Gu;Nc.bind({g:1});let es=Nc.bind({k:1});function RN(e,t,s,r){ps.p=t,Tg=e,Vu=s,Gu=r}function Gs(e,t){let s=this||{};return function(){let r=arguments;function a(i,l){let o=Object.assign({},i),c=o.className||a.className;s.p=Object.assign({theme:Vu&&Vu()},o),s.o=/ *go\d+/.test(c),o.className=Nc.apply(s,r)+(c?" "+c:"");let d=e;return e[0]&&(d=o.as||e,delete o.as),Gu&&d[0]&&Gu(o),Tg(d,o)}return a}}var MN=e=>typeof e=="function",Ko=(e,t)=>MN(e)?e(t):e,TN=(()=>{let e=0;return()=>(++e).toString()})(),Og=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),ON=20,mm="default",Ag=(e,t)=>{let{toastLimit:s}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,s)};case 1:return{...e,toasts:e.toasts.map(l=>l.id===t.toast.id?{...l,...t.toast}:l)};case 2:let{toast:r}=t;return Ag(e,{type:e.toasts.find(l=>l.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(l=>l.id===a||a===void 0?{...l,dismissed:!0,visible:!1}:l)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(l=>l.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(l=>({...l,pauseDuration:l.pauseDuration+i}))}}},ho=[],Dg={toasts:[],pausedAt:void 0,settings:{toastLimit:ON}},kn={},Ig=(e,t=mm)=>{kn[t]=Ag(kn[t]||Dg,e),ho.forEach(([s,r])=>{s===t&&r(kn[t])})},Lg=e=>Object.keys(kn).forEach(t=>Ig(e,t)),AN=e=>Object.keys(kn).find(t=>kn[t].toasts.some(s=>s.id===e)),wc=(e=mm)=>t=>{Ig(t,e)},DN={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},IN=(e={},t=mm)=>{let[s,r]=m.useState(kn[t]||Dg),a=m.useRef(kn[t]);m.useEffect(()=>(a.current!==kn[t]&&r(kn[t]),ho.push([t,r]),()=>{let l=ho.findIndex(([o])=>o===t);l>-1&&ho.splice(l,1)}),[t]);let i=s.toasts.map(l=>{var o,c,d;return{...e,...e[l.type],...l,removeDelay:l.removeDelay||((o=e[l.type])==null?void 0:o.removeDelay)||(e==null?void 0:e.removeDelay),duration:l.duration||((c=e[l.type])==null?void 0:c.duration)||(e==null?void 0:e.duration)||DN[l.type],style:{...e.style,...(d=e[l.type])==null?void 0:d.style,...l.style}}});return{...s,toasts:i}},LN=(e,t="blank",s)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...s,id:(s==null?void 0:s.id)||TN()}),vl=e=>(t,s)=>{let r=LN(t,e,s);return wc(r.toasterId||AN(r.id))({type:2,toast:r}),r.id},Qe=(e,t)=>vl("blank")(e,t);Qe.error=vl("error");Qe.success=vl("success");Qe.loading=vl("loading");Qe.custom=vl("custom");Qe.dismiss=(e,t)=>{let s={type:3,toastId:e};t?wc(t)(s):Lg(s)};Qe.dismissAll=e=>Qe.dismiss(void 0,e);Qe.remove=(e,t)=>{let s={type:4,toastId:e};t?wc(t)(s):Lg(s)};Qe.removeAll=e=>Qe.remove(void 0,e);Qe.promise=(e,t,s)=>{let r=Qe.loading(t.loading,{...s,...s==null?void 0:s.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let i=t.success?Ko(t.success,a):void 0;return i?Qe.success(i,{id:r,...s,...s==null?void 0:s.success}):Qe.dismiss(r),a}).catch(a=>{let i=t.error?Ko(t.error,a):void 0;i?Qe.error(i,{id:r,...s,...s==null?void 0:s.error}):Qe.dismiss(r)}),e};var FN=1e3,_N=(e,t="default")=>{let{toasts:s,pausedAt:r}=IN(e,t),a=m.useRef(new Map).current,i=m.useCallback((f,g=FN)=>{if(a.has(f))return;let b=setTimeout(()=>{a.delete(f),l({type:4,toastId:f})},g);a.set(f,b)},[]);m.useEffect(()=>{if(r)return;let f=Date.now(),g=s.map(b=>{if(b.duration===1/0)return;let y=(b.duration||0)+b.pauseDuration-(f-b.createdAt);if(y<0){b.visible&&Qe.dismiss(b.id);return}return setTimeout(()=>Qe.dismiss(b.id,t),y)});return()=>{g.forEach(b=>b&&clearTimeout(b))}},[s,r,t]);let l=m.useCallback(wc(t),[t]),o=m.useCallback(()=>{l({type:5,time:Date.now()})},[l]),c=m.useCallback((f,g)=>{l({type:1,toast:{id:f,height:g}})},[l]),d=m.useCallback(()=>{r&&l({type:6,time:Date.now()})},[r,l]),x=m.useCallback((f,g)=>{let{reverseOrder:b=!1,gutter:y=8,defaultPosition:v}=g||{},N=s.filter(p=>(p.position||v)===(f.position||v)&&p.height),h=N.findIndex(p=>p.id===f.id),u=N.filter((p,j)=>j<h&&p.visible).length;return N.filter(p=>p.visible).slice(...b?[u+1]:[0,u]).reduce((p,j)=>p+(j.height||0)+y,0)},[s]);return m.useEffect(()=>{s.forEach(f=>{if(f.dismissed)i(f.id,f.removeDelay);else{let g=a.get(f.id);g&&(clearTimeout(g),a.delete(f.id))}})},[s,i]),{toasts:s,handlers:{updateHeight:c,startPause:o,endPause:d,calculateOffset:x}}},$N=es`
|
|
68
|
+
from {
|
|
69
|
+
transform: scale(0) rotate(45deg);
|
|
70
|
+
opacity: 0;
|
|
71
|
+
}
|
|
72
|
+
to {
|
|
73
|
+
transform: scale(1) rotate(45deg);
|
|
74
|
+
opacity: 1;
|
|
75
|
+
}`,UN=es`
|
|
76
|
+
from {
|
|
77
|
+
transform: scale(0);
|
|
78
|
+
opacity: 0;
|
|
79
|
+
}
|
|
80
|
+
to {
|
|
81
|
+
transform: scale(1);
|
|
82
|
+
opacity: 1;
|
|
83
|
+
}`,BN=es`
|
|
84
|
+
from {
|
|
85
|
+
transform: scale(0) rotate(90deg);
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
to {
|
|
89
|
+
transform: scale(1) rotate(90deg);
|
|
90
|
+
opacity: 1;
|
|
91
|
+
}`,HN=Gs("div")`
|
|
92
|
+
width: 20px;
|
|
93
|
+
opacity: 0;
|
|
94
|
+
height: 20px;
|
|
95
|
+
border-radius: 10px;
|
|
96
|
+
background: ${e=>e.primary||"#ff4b4b"};
|
|
97
|
+
position: relative;
|
|
98
|
+
transform: rotate(45deg);
|
|
99
|
+
|
|
100
|
+
animation: ${$N} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
101
|
+
forwards;
|
|
102
|
+
animation-delay: 100ms;
|
|
103
|
+
|
|
104
|
+
&:after,
|
|
105
|
+
&:before {
|
|
106
|
+
content: '';
|
|
107
|
+
animation: ${UN} 0.15s ease-out forwards;
|
|
108
|
+
animation-delay: 150ms;
|
|
109
|
+
position: absolute;
|
|
110
|
+
border-radius: 3px;
|
|
111
|
+
opacity: 0;
|
|
112
|
+
background: ${e=>e.secondary||"#fff"};
|
|
113
|
+
bottom: 9px;
|
|
114
|
+
left: 4px;
|
|
115
|
+
height: 2px;
|
|
116
|
+
width: 12px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:before {
|
|
120
|
+
animation: ${BN} 0.15s ease-out forwards;
|
|
121
|
+
animation-delay: 180ms;
|
|
122
|
+
transform: rotate(90deg);
|
|
123
|
+
}
|
|
124
|
+
`,qN=es`
|
|
125
|
+
from {
|
|
126
|
+
transform: rotate(0deg);
|
|
127
|
+
}
|
|
128
|
+
to {
|
|
129
|
+
transform: rotate(360deg);
|
|
130
|
+
}
|
|
131
|
+
`,KN=Gs("div")`
|
|
132
|
+
width: 12px;
|
|
133
|
+
height: 12px;
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
border: 2px solid;
|
|
136
|
+
border-radius: 100%;
|
|
137
|
+
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
138
|
+
border-right-color: ${e=>e.primary||"#616161"};
|
|
139
|
+
animation: ${qN} 1s linear infinite;
|
|
140
|
+
`,WN=es`
|
|
141
|
+
from {
|
|
142
|
+
transform: scale(0) rotate(45deg);
|
|
143
|
+
opacity: 0;
|
|
144
|
+
}
|
|
145
|
+
to {
|
|
146
|
+
transform: scale(1) rotate(45deg);
|
|
147
|
+
opacity: 1;
|
|
148
|
+
}`,VN=es`
|
|
149
|
+
0% {
|
|
150
|
+
height: 0;
|
|
151
|
+
width: 0;
|
|
152
|
+
opacity: 0;
|
|
153
|
+
}
|
|
154
|
+
40% {
|
|
155
|
+
height: 0;
|
|
156
|
+
width: 6px;
|
|
157
|
+
opacity: 1;
|
|
158
|
+
}
|
|
159
|
+
100% {
|
|
160
|
+
opacity: 1;
|
|
161
|
+
height: 10px;
|
|
162
|
+
}`,GN=Gs("div")`
|
|
163
|
+
width: 20px;
|
|
164
|
+
opacity: 0;
|
|
165
|
+
height: 20px;
|
|
166
|
+
border-radius: 10px;
|
|
167
|
+
background: ${e=>e.primary||"#61d345"};
|
|
168
|
+
position: relative;
|
|
169
|
+
transform: rotate(45deg);
|
|
170
|
+
|
|
171
|
+
animation: ${WN} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
172
|
+
forwards;
|
|
173
|
+
animation-delay: 100ms;
|
|
174
|
+
&:after {
|
|
175
|
+
content: '';
|
|
176
|
+
box-sizing: border-box;
|
|
177
|
+
animation: ${VN} 0.2s ease-out forwards;
|
|
178
|
+
opacity: 0;
|
|
179
|
+
animation-delay: 200ms;
|
|
180
|
+
position: absolute;
|
|
181
|
+
border-right: 2px solid;
|
|
182
|
+
border-bottom: 2px solid;
|
|
183
|
+
border-color: ${e=>e.secondary||"#fff"};
|
|
184
|
+
bottom: 6px;
|
|
185
|
+
left: 6px;
|
|
186
|
+
height: 10px;
|
|
187
|
+
width: 6px;
|
|
188
|
+
}
|
|
189
|
+
`,QN=Gs("div")`
|
|
190
|
+
position: absolute;
|
|
191
|
+
`,YN=Gs("div")`
|
|
192
|
+
position: relative;
|
|
193
|
+
display: flex;
|
|
194
|
+
justify-content: center;
|
|
195
|
+
align-items: center;
|
|
196
|
+
min-width: 20px;
|
|
197
|
+
min-height: 20px;
|
|
198
|
+
`,JN=es`
|
|
199
|
+
from {
|
|
200
|
+
transform: scale(0.6);
|
|
201
|
+
opacity: 0.4;
|
|
202
|
+
}
|
|
203
|
+
to {
|
|
204
|
+
transform: scale(1);
|
|
205
|
+
opacity: 1;
|
|
206
|
+
}`,XN=Gs("div")`
|
|
207
|
+
position: relative;
|
|
208
|
+
transform: scale(0.6);
|
|
209
|
+
opacity: 0.4;
|
|
210
|
+
min-width: 20px;
|
|
211
|
+
animation: ${JN} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
212
|
+
forwards;
|
|
213
|
+
`,ZN=({toast:e})=>{let{icon:t,type:s,iconTheme:r}=e;return t!==void 0?typeof t=="string"?m.createElement(XN,null,t):t:s==="blank"?null:m.createElement(YN,null,m.createElement(KN,{...r}),s!=="loading"&&m.createElement(QN,null,s==="error"?m.createElement(HN,{...r}):m.createElement(GN,{...r})))},e2=e=>`
|
|
214
|
+
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
215
|
+
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
216
|
+
`,t2=e=>`
|
|
217
|
+
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
218
|
+
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
219
|
+
`,n2="0%{opacity:0;} 100%{opacity:1;}",s2="0%{opacity:1;} 100%{opacity:0;}",r2=Gs("div")`
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
background: #fff;
|
|
223
|
+
color: #363636;
|
|
224
|
+
line-height: 1.3;
|
|
225
|
+
will-change: transform;
|
|
226
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
227
|
+
max-width: 350px;
|
|
228
|
+
pointer-events: auto;
|
|
229
|
+
padding: 8px 10px;
|
|
230
|
+
border-radius: 8px;
|
|
231
|
+
`,a2=Gs("div")`
|
|
232
|
+
display: flex;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
margin: 4px 10px;
|
|
235
|
+
color: inherit;
|
|
236
|
+
flex: 1 1 auto;
|
|
237
|
+
white-space: pre-line;
|
|
238
|
+
`,i2=(e,t)=>{let s=e.includes("top")?1:-1,[r,a]=Og()?[n2,s2]:[e2(s),t2(s)];return{animation:t?`${es(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${es(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},l2=m.memo(({toast:e,position:t,style:s,children:r})=>{let a=e.height?i2(e.position||t||"top-center",e.visible):{opacity:0},i=m.createElement(ZN,{toast:e}),l=m.createElement(a2,{...e.ariaProps},Ko(e.message,e));return m.createElement(r2,{className:e.className,style:{...a,...s,...e.style}},typeof r=="function"?r({icon:i,message:l}):m.createElement(m.Fragment,null,i,l))});RN(m.createElement);var o2=({id:e,className:t,style:s,onHeightUpdate:r,children:a})=>{let i=m.useCallback(l=>{if(l){let o=()=>{let c=l.getBoundingClientRect().height;r(e,c)};o(),new MutationObserver(o).observe(l,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return m.createElement("div",{ref:i,className:t,style:s},a)},c2=(e,t)=>{let s=e.includes("top"),r=s?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Og()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(s?1:-1)}px)`,...r,...a}},d2=Nc`
|
|
239
|
+
z-index: 9999;
|
|
240
|
+
> * {
|
|
241
|
+
pointer-events: auto;
|
|
242
|
+
}
|
|
243
|
+
`,Kl=16,u2=({reverseOrder:e,position:t="top-center",toastOptions:s,gutter:r,children:a,toasterId:i,containerStyle:l,containerClassName:o})=>{let{toasts:c,handlers:d}=_N(s,i);return m.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:Kl,left:Kl,right:Kl,bottom:Kl,pointerEvents:"none",...l},className:o,onMouseEnter:d.startPause,onMouseLeave:d.endPause},c.map(x=>{let f=x.position||t,g=d.calculateOffset(x,{reverseOrder:e,gutter:r,defaultPosition:t}),b=c2(f,g);return m.createElement(o2,{id:x.id,key:x.id,onHeightUpdate:d.updateHeight,className:x.visible?d2:"",style:b},x.type==="custom"?Ko(x.message,x):a?a(x):m.createElement(l2,{toast:x,position:f}))}))},A=Qe;/**
|
|
244
|
+
* @license lucide-react v0.451.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const x2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fg=(...e)=>e.filter((t,s,r)=>!!t&&r.indexOf(t)===s).join(" ");/**
|
|
249
|
+
* @license lucide-react v0.451.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/var m2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
254
|
+
* @license lucide-react v0.451.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const h2=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...o},c)=>m.createElement("svg",{ref:c,...m2,width:t,height:t,stroke:e,strokeWidth:r?Number(s)*24/Number(t):s,className:Fg("lucide",a),...o},[...l.map(([d,x])=>m.createElement(d,x)),...Array.isArray(i)?i:[i]]));/**
|
|
259
|
+
* @license lucide-react v0.451.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const F=(e,t)=>{const s=m.forwardRef(({className:r,...a},i)=>m.createElement(h2,{ref:i,iconNode:t,className:Fg(`lucide-${x2(e)}`,r),...a}));return s.displayName=`${e}`,s};/**
|
|
264
|
+
* @license lucide-react v0.451.0 - ISC
|
|
265
|
+
*
|
|
266
|
+
* This source code is licensed under the ISC license.
|
|
267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
+
*/const Qu=F("Accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]);/**
|
|
269
|
+
* @license lucide-react v0.451.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the ISC license.
|
|
272
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/const f2=F("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
274
|
+
* @license lucide-react v0.451.0 - ISC
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the ISC license.
|
|
277
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/const _g=F("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
|
|
279
|
+
* @license lucide-react v0.451.0 - ISC
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the ISC license.
|
|
282
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/const dr=F("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
284
|
+
* @license lucide-react v0.451.0 - ISC
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the ISC license.
|
|
287
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/const $g=F("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
|
|
289
|
+
* @license lucide-react v0.451.0 - ISC
|
|
290
|
+
*
|
|
291
|
+
* This source code is licensed under the ISC license.
|
|
292
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
+
*/const p2=F("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
294
|
+
* @license lucide-react v0.451.0 - ISC
|
|
295
|
+
*
|
|
296
|
+
* This source code is licensed under the ISC license.
|
|
297
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
+
*/const Yu=F("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
|
299
|
+
* @license lucide-react v0.451.0 - ISC
|
|
300
|
+
*
|
|
301
|
+
* This source code is licensed under the ISC license.
|
|
302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
+
*/const tl=F("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
304
|
+
* @license lucide-react v0.451.0 - ISC
|
|
305
|
+
*
|
|
306
|
+
* This source code is licensed under the ISC license.
|
|
307
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
+
*/const g2=F("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
309
|
+
* @license lucide-react v0.451.0 - ISC
|
|
310
|
+
*
|
|
311
|
+
* This source code is licensed under the ISC license.
|
|
312
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
313
|
+
*/const y2=F("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
|
|
314
|
+
* @license lucide-react v0.451.0 - ISC
|
|
315
|
+
*
|
|
316
|
+
* This source code is licensed under the ISC license.
|
|
317
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
318
|
+
*/const b2=F("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
319
|
+
* @license lucide-react v0.451.0 - ISC
|
|
320
|
+
*
|
|
321
|
+
* This source code is licensed under the ISC license.
|
|
322
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
+
*/const Mr=F("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
|
|
324
|
+
* @license lucide-react v0.451.0 - ISC
|
|
325
|
+
*
|
|
326
|
+
* This source code is licensed under the ISC license.
|
|
327
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
+
*/const v2=F("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
329
|
+
* @license lucide-react v0.451.0 - ISC
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the ISC license.
|
|
332
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/const En=F("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
|
|
334
|
+
* @license lucide-react v0.451.0 - ISC
|
|
335
|
+
*
|
|
336
|
+
* This source code is licensed under the ISC license.
|
|
337
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
+
*/const Ug=F("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/**
|
|
339
|
+
* @license lucide-react v0.451.0 - ISC
|
|
340
|
+
*
|
|
341
|
+
* This source code is licensed under the ISC license.
|
|
342
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
343
|
+
*/const _e=F("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
344
|
+
* @license lucide-react v0.451.0 - ISC
|
|
345
|
+
*
|
|
346
|
+
* This source code is licensed under the ISC license.
|
|
347
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
348
|
+
*/const Mt=F("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
349
|
+
* @license lucide-react v0.451.0 - ISC
|
|
350
|
+
*
|
|
351
|
+
* This source code is licensed under the ISC license.
|
|
352
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
+
*/const j2=F("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
354
|
+
* @license lucide-react v0.451.0 - ISC
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the ISC license.
|
|
357
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/const tn=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
359
|
+
* @license lucide-react v0.451.0 - ISC
|
|
360
|
+
*
|
|
361
|
+
* This source code is licensed under the ISC license.
|
|
362
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
363
|
+
*/const N2=F("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
364
|
+
* @license lucide-react v0.451.0 - ISC
|
|
365
|
+
*
|
|
366
|
+
* This source code is licensed under the ISC license.
|
|
367
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
368
|
+
*/const Ue=F("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
369
|
+
* @license lucide-react v0.451.0 - ISC
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the ISC license.
|
|
372
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/const w2=F("CircleMinus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);/**
|
|
374
|
+
* @license lucide-react v0.451.0 - ISC
|
|
375
|
+
*
|
|
376
|
+
* This source code is licensed under the ISC license.
|
|
377
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
+
*/const k2=F("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
379
|
+
* @license lucide-react v0.451.0 - ISC
|
|
380
|
+
*
|
|
381
|
+
* This source code is licensed under the ISC license.
|
|
382
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
383
|
+
*/const S2=F("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
384
|
+
* @license lucide-react v0.451.0 - ISC
|
|
385
|
+
*
|
|
386
|
+
* This source code is licensed under the ISC license.
|
|
387
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
388
|
+
*/const xt=F("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
389
|
+
* @license lucide-react v0.451.0 - ISC
|
|
390
|
+
*
|
|
391
|
+
* This source code is licensed under the ISC license.
|
|
392
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
393
|
+
*/const C2=F("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
394
|
+
* @license lucide-react v0.451.0 - ISC
|
|
395
|
+
*
|
|
396
|
+
* This source code is licensed under the ISC license.
|
|
397
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
398
|
+
*/const Fr=F("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
399
|
+
* @license lucide-react v0.451.0 - ISC
|
|
400
|
+
*
|
|
401
|
+
* This source code is licensed under the ISC license.
|
|
402
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
403
|
+
*/const cd=F("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/**
|
|
404
|
+
* @license lucide-react v0.451.0 - ISC
|
|
405
|
+
*
|
|
406
|
+
* This source code is licensed under the ISC license.
|
|
407
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
408
|
+
*/const Bg=F("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
409
|
+
* @license lucide-react v0.451.0 - ISC
|
|
410
|
+
*
|
|
411
|
+
* This source code is licensed under the ISC license.
|
|
412
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
413
|
+
*/const hm=F("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
414
|
+
* @license lucide-react v0.451.0 - ISC
|
|
415
|
+
*
|
|
416
|
+
* This source code is licensed under the ISC license.
|
|
417
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
418
|
+
*/const E2=F("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
419
|
+
* @license lucide-react v0.451.0 - ISC
|
|
420
|
+
*
|
|
421
|
+
* This source code is licensed under the ISC license.
|
|
422
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
423
|
+
*/const Hg=F("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
424
|
+
* @license lucide-react v0.451.0 - ISC
|
|
425
|
+
*
|
|
426
|
+
* This source code is licensed under the ISC license.
|
|
427
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
428
|
+
*/const kc=F("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
429
|
+
* @license lucide-react v0.451.0 - ISC
|
|
430
|
+
*
|
|
431
|
+
* This source code is licensed under the ISC license.
|
|
432
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
433
|
+
*/const Ya=F("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
434
|
+
* @license lucide-react v0.451.0 - ISC
|
|
435
|
+
*
|
|
436
|
+
* This source code is licensed under the ISC license.
|
|
437
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
438
|
+
*/const P2=F("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
439
|
+
* @license lucide-react v0.451.0 - ISC
|
|
440
|
+
*
|
|
441
|
+
* This source code is licensed under the ISC license.
|
|
442
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
443
|
+
*/const qg=F("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
444
|
+
* @license lucide-react v0.451.0 - ISC
|
|
445
|
+
*
|
|
446
|
+
* This source code is licensed under the ISC license.
|
|
447
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
448
|
+
*/const Kg=F("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);/**
|
|
449
|
+
* @license lucide-react v0.451.0 - ISC
|
|
450
|
+
*
|
|
451
|
+
* This source code is licensed under the ISC license.
|
|
452
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
453
|
+
*/const Wg=F("FileMinus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);/**
|
|
454
|
+
* @license lucide-react v0.451.0 - ISC
|
|
455
|
+
*
|
|
456
|
+
* This source code is licensed under the ISC license.
|
|
457
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
458
|
+
*/const Vg=F("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
|
|
459
|
+
* @license lucide-react v0.451.0 - ISC
|
|
460
|
+
*
|
|
461
|
+
* This source code is licensed under the ISC license.
|
|
462
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
463
|
+
*/const Gg=F("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
|
|
464
|
+
* @license lucide-react v0.451.0 - ISC
|
|
465
|
+
*
|
|
466
|
+
* This source code is licensed under the ISC license.
|
|
467
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
468
|
+
*/const Qg=F("FileQuestion",[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);/**
|
|
469
|
+
* @license lucide-react v0.451.0 - ISC
|
|
470
|
+
*
|
|
471
|
+
* This source code is licensed under the ISC license.
|
|
472
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
473
|
+
*/const fn=F("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
474
|
+
* @license lucide-react v0.451.0 - ISC
|
|
475
|
+
*
|
|
476
|
+
* This source code is licensed under the ISC license.
|
|
477
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
478
|
+
*/const Yg=F("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
479
|
+
* @license lucide-react v0.451.0 - ISC
|
|
480
|
+
*
|
|
481
|
+
* This source code is licensed under the ISC license.
|
|
482
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
483
|
+
*/const Jg=F("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
484
|
+
* @license lucide-react v0.451.0 - ISC
|
|
485
|
+
*
|
|
486
|
+
* This source code is licensed under the ISC license.
|
|
487
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
488
|
+
*/const nl=F("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
|
|
489
|
+
* @license lucide-react v0.451.0 - ISC
|
|
490
|
+
*
|
|
491
|
+
* This source code is licensed under the ISC license.
|
|
492
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
493
|
+
*/const Xg=F("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
494
|
+
* @license lucide-react v0.451.0 - ISC
|
|
495
|
+
*
|
|
496
|
+
* This source code is licensed under the ISC license.
|
|
497
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
498
|
+
*/const z2=F("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
499
|
+
* @license lucide-react v0.451.0 - ISC
|
|
500
|
+
*
|
|
501
|
+
* This source code is licensed under the ISC license.
|
|
502
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
503
|
+
*/const Tr=F("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
504
|
+
* @license lucide-react v0.451.0 - ISC
|
|
505
|
+
*
|
|
506
|
+
* This source code is licensed under the ISC license.
|
|
507
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
508
|
+
*/const ja=F("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
|
509
|
+
* @license lucide-react v0.451.0 - ISC
|
|
510
|
+
*
|
|
511
|
+
* This source code is licensed under the ISC license.
|
|
512
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
513
|
+
*/const Or=F("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
514
|
+
* @license lucide-react v0.451.0 - ISC
|
|
515
|
+
*
|
|
516
|
+
* This source code is licensed under the ISC license.
|
|
517
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
518
|
+
*/const R2=F("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]);/**
|
|
519
|
+
* @license lucide-react v0.451.0 - ISC
|
|
520
|
+
*
|
|
521
|
+
* This source code is licensed under the ISC license.
|
|
522
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
523
|
+
*/const Sc=F("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
524
|
+
* @license lucide-react v0.451.0 - ISC
|
|
525
|
+
*
|
|
526
|
+
* This source code is licensed under the ISC license.
|
|
527
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
528
|
+
*/const Zg=F("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
529
|
+
* @license lucide-react v0.451.0 - ISC
|
|
530
|
+
*
|
|
531
|
+
* This source code is licensed under the ISC license.
|
|
532
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
533
|
+
*/const Wo=F("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
|
|
534
|
+
* @license lucide-react v0.451.0 - ISC
|
|
535
|
+
*
|
|
536
|
+
* This source code is licensed under the ISC license.
|
|
537
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
538
|
+
*/const xf=F("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
539
|
+
* @license lucide-react v0.451.0 - ISC
|
|
540
|
+
*
|
|
541
|
+
* This source code is licensed under the ISC license.
|
|
542
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
543
|
+
*/const mf=F("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
544
|
+
* @license lucide-react v0.451.0 - ISC
|
|
545
|
+
*
|
|
546
|
+
* This source code is licensed under the ISC license.
|
|
547
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
548
|
+
*/const jl=F("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
549
|
+
* @license lucide-react v0.451.0 - ISC
|
|
550
|
+
*
|
|
551
|
+
* This source code is licensed under the ISC license.
|
|
552
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
553
|
+
*/const M2=F("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
554
|
+
* @license lucide-react v0.451.0 - ISC
|
|
555
|
+
*
|
|
556
|
+
* This source code is licensed under the ISC license.
|
|
557
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
558
|
+
*/const T2=F("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
|
|
559
|
+
* @license lucide-react v0.451.0 - ISC
|
|
560
|
+
*
|
|
561
|
+
* This source code is licensed under the ISC license.
|
|
562
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
563
|
+
*/const Vo=F("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
564
|
+
* @license lucide-react v0.451.0 - ISC
|
|
565
|
+
*
|
|
566
|
+
* This source code is licensed under the ISC license.
|
|
567
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
568
|
+
*/const O2=F("ListOrdered",[["line",{x1:"10",x2:"21",y1:"6",y2:"6",key:"76qw6h"}],["line",{x1:"10",x2:"21",y1:"12",y2:"12",key:"16nom4"}],["line",{x1:"10",x2:"21",y1:"18",y2:"18",key:"u3jurt"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
569
|
+
* @license lucide-react v0.451.0 - ISC
|
|
570
|
+
*
|
|
571
|
+
* This source code is licensed under the ISC license.
|
|
572
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
573
|
+
*/const ce=F("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
574
|
+
* @license lucide-react v0.451.0 - ISC
|
|
575
|
+
*
|
|
576
|
+
* This source code is licensed under the ISC license.
|
|
577
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
578
|
+
*/const dd=F("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
579
|
+
* @license lucide-react v0.451.0 - ISC
|
|
580
|
+
*
|
|
581
|
+
* This source code is licensed under the ISC license.
|
|
582
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
583
|
+
*/const fm=F("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
584
|
+
* @license lucide-react v0.451.0 - ISC
|
|
585
|
+
*
|
|
586
|
+
* This source code is licensed under the ISC license.
|
|
587
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
588
|
+
*/const A2=F("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
589
|
+
* @license lucide-react v0.451.0 - ISC
|
|
590
|
+
*
|
|
591
|
+
* This source code is licensed under the ISC license.
|
|
592
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
593
|
+
*/const D2=F("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
594
|
+
* @license lucide-react v0.451.0 - ISC
|
|
595
|
+
*
|
|
596
|
+
* This source code is licensed under the ISC license.
|
|
597
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
598
|
+
*/const ey=F("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
599
|
+
* @license lucide-react v0.451.0 - ISC
|
|
600
|
+
*
|
|
601
|
+
* This source code is licensed under the ISC license.
|
|
602
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
603
|
+
*/const ha=F("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
604
|
+
* @license lucide-react v0.451.0 - ISC
|
|
605
|
+
*
|
|
606
|
+
* This source code is licensed under the ISC license.
|
|
607
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
608
|
+
*/const I2=F("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
609
|
+
* @license lucide-react v0.451.0 - ISC
|
|
610
|
+
*
|
|
611
|
+
* This source code is licensed under the ISC license.
|
|
612
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
613
|
+
*/const L2=F("MoveRight",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/**
|
|
614
|
+
* @license lucide-react v0.451.0 - ISC
|
|
615
|
+
*
|
|
616
|
+
* This source code is licensed under the ISC license.
|
|
617
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
618
|
+
*/const _r=F("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
619
|
+
* @license lucide-react v0.451.0 - ISC
|
|
620
|
+
*
|
|
621
|
+
* This source code is licensed under the ISC license.
|
|
622
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
623
|
+
*/const Tt=F("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
624
|
+
* @license lucide-react v0.451.0 - ISC
|
|
625
|
+
*
|
|
626
|
+
* This source code is licensed under the ISC license.
|
|
627
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
628
|
+
*/const F2=F("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
629
|
+
* @license lucide-react v0.451.0 - ISC
|
|
630
|
+
*
|
|
631
|
+
* This source code is licensed under the ISC license.
|
|
632
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
633
|
+
*/const Pn=F("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
634
|
+
* @license lucide-react v0.451.0 - ISC
|
|
635
|
+
*
|
|
636
|
+
* This source code is licensed under the ISC license.
|
|
637
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
638
|
+
*/const pm=F("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
639
|
+
* @license lucide-react v0.451.0 - ISC
|
|
640
|
+
*
|
|
641
|
+
* This source code is licensed under the ISC license.
|
|
642
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
643
|
+
*/const ty=F("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
|
|
644
|
+
* @license lucide-react v0.451.0 - ISC
|
|
645
|
+
*
|
|
646
|
+
* This source code is licensed under the ISC license.
|
|
647
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
648
|
+
*/const Cc=F("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
649
|
+
* @license lucide-react v0.451.0 - ISC
|
|
650
|
+
*
|
|
651
|
+
* This source code is licensed under the ISC license.
|
|
652
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
653
|
+
*/const ny=F("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
654
|
+
* @license lucide-react v0.451.0 - ISC
|
|
655
|
+
*
|
|
656
|
+
* This source code is licensed under the ISC license.
|
|
657
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
658
|
+
*/const sy=F("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
|
|
659
|
+
* @license lucide-react v0.451.0 - ISC
|
|
660
|
+
*
|
|
661
|
+
* This source code is licensed under the ISC license.
|
|
662
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
663
|
+
*/const Ar=F("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
664
|
+
* @license lucide-react v0.451.0 - ISC
|
|
665
|
+
*
|
|
666
|
+
* This source code is licensed under the ISC license.
|
|
667
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
668
|
+
*/const _2=F("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
669
|
+
* @license lucide-react v0.451.0 - ISC
|
|
670
|
+
*
|
|
671
|
+
* This source code is licensed under the ISC license.
|
|
672
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
673
|
+
*/const Ba=F("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
674
|
+
* @license lucide-react v0.451.0 - ISC
|
|
675
|
+
*
|
|
676
|
+
* This source code is licensed under the ISC license.
|
|
677
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
678
|
+
*/const Go=F("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
679
|
+
* @license lucide-react v0.451.0 - ISC
|
|
680
|
+
*
|
|
681
|
+
* This source code is licensed under the ISC license.
|
|
682
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
683
|
+
*/const gm=F("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
684
|
+
* @license lucide-react v0.451.0 - ISC
|
|
685
|
+
*
|
|
686
|
+
* This source code is licensed under the ISC license.
|
|
687
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
688
|
+
*/const $2=F("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/**
|
|
689
|
+
* @license lucide-react v0.451.0 - ISC
|
|
690
|
+
*
|
|
691
|
+
* This source code is licensed under the ISC license.
|
|
692
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
693
|
+
*/const Ec=F("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
|
|
694
|
+
* @license lucide-react v0.451.0 - ISC
|
|
695
|
+
*
|
|
696
|
+
* This source code is licensed under the ISC license.
|
|
697
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
698
|
+
*/const U2=F("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
699
|
+
* @license lucide-react v0.451.0 - ISC
|
|
700
|
+
*
|
|
701
|
+
* This source code is licensed under the ISC license.
|
|
702
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
703
|
+
*/const Ni=F("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
704
|
+
* @license lucide-react v0.451.0 - ISC
|
|
705
|
+
*
|
|
706
|
+
* This source code is licensed under the ISC license.
|
|
707
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
708
|
+
*/const Ot=F("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
709
|
+
* @license lucide-react v0.451.0 - ISC
|
|
710
|
+
*
|
|
711
|
+
* This source code is licensed under the ISC license.
|
|
712
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
713
|
+
*/const B2=F("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
714
|
+
* @license lucide-react v0.451.0 - ISC
|
|
715
|
+
*
|
|
716
|
+
* This source code is licensed under the ISC license.
|
|
717
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
718
|
+
*/const H2=F("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
719
|
+
* @license lucide-react v0.451.0 - ISC
|
|
720
|
+
*
|
|
721
|
+
* This source code is licensed under the ISC license.
|
|
722
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
723
|
+
*/const q2=F("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
724
|
+
* @license lucide-react v0.451.0 - ISC
|
|
725
|
+
*
|
|
726
|
+
* This source code is licensed under the ISC license.
|
|
727
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
728
|
+
*/const fo=F("Tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);/**
|
|
729
|
+
* @license lucide-react v0.451.0 - ISC
|
|
730
|
+
*
|
|
731
|
+
* This source code is licensed under the ISC license.
|
|
732
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
733
|
+
*/const ry=F("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
734
|
+
* @license lucide-react v0.451.0 - ISC
|
|
735
|
+
*
|
|
736
|
+
* This source code is licensed under the ISC license.
|
|
737
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
738
|
+
*/const Pc=F("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
739
|
+
* @license lucide-react v0.451.0 - ISC
|
|
740
|
+
*
|
|
741
|
+
* This source code is licensed under the ISC license.
|
|
742
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
743
|
+
*/const hf=F("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
|
|
744
|
+
* @license lucide-react v0.451.0 - ISC
|
|
745
|
+
*
|
|
746
|
+
* This source code is licensed under the ISC license.
|
|
747
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
748
|
+
*/const gn=F("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
749
|
+
* @license lucide-react v0.451.0 - ISC
|
|
750
|
+
*
|
|
751
|
+
* This source code is licensed under the ISC license.
|
|
752
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
753
|
+
*/const K2=F("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/**
|
|
754
|
+
* @license lucide-react v0.451.0 - ISC
|
|
755
|
+
*
|
|
756
|
+
* This source code is licensed under the ISC license.
|
|
757
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
758
|
+
*/const W2=F("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
759
|
+
* @license lucide-react v0.451.0 - ISC
|
|
760
|
+
*
|
|
761
|
+
* This source code is licensed under the ISC license.
|
|
762
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
763
|
+
*/const Xt=F("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
764
|
+
* @license lucide-react v0.451.0 - ISC
|
|
765
|
+
*
|
|
766
|
+
* This source code is licensed under the ISC license.
|
|
767
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
768
|
+
*/const ym=F("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
769
|
+
* @license lucide-react v0.451.0 - ISC
|
|
770
|
+
*
|
|
771
|
+
* This source code is licensed under the ISC license.
|
|
772
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
773
|
+
*/const ay=F("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
774
|
+
* @license lucide-react v0.451.0 - ISC
|
|
775
|
+
*
|
|
776
|
+
* This source code is licensed under the ISC license.
|
|
777
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
778
|
+
*/const zc=F("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
779
|
+
* @license lucide-react v0.451.0 - ISC
|
|
780
|
+
*
|
|
781
|
+
* This source code is licensed under the ISC license.
|
|
782
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
783
|
+
*/const Dr=F("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
|
|
784
|
+
* @license lucide-react v0.451.0 - ISC
|
|
785
|
+
*
|
|
786
|
+
* This source code is licensed under the ISC license.
|
|
787
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
788
|
+
*/const Se=F("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
789
|
+
* @license lucide-react v0.451.0 - ISC
|
|
790
|
+
*
|
|
791
|
+
* This source code is licensed under the ISC license.
|
|
792
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
793
|
+
*/const Be=F("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function iy(e){var t,s,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(s=iy(e[t]))&&(r&&(r+=" "),r+=s)}else for(s in e)e[s]&&(r&&(r+=" "),r+=s);return r}function S(){for(var e,t,s=0,r="",a=arguments.length;s<a;s++)(e=arguments[s])&&(t=iy(e))&&(r&&(r+=" "),r+=t);return r}function ly({size:e=40}){return n.jsx("img",{src:"/favicon.svg",alt:"Assuremind",width:e,height:e,style:{flexShrink:0,borderRadius:e*.22},draggable:!1})}function V2(){return n.jsxs("div",{className:"flex items-center gap-3 select-none min-w-0 px-1",children:[n.jsx(ly,{size:46}),n.jsxs("div",{className:"flex flex-col justify-center leading-none min-w-0",children:[n.jsx("span",{className:"text-[20px] font-bold text-white truncate",style:{letterSpacing:"-0.02em"},children:"Assuremind"}),n.jsx("span",{className:"text-[9px] font-semibold text-slate-400 uppercase mt-1.5",style:{letterSpacing:"0.18em"},children:"Studio"})]})]})}function G2(){return n.jsxs("div",{className:"flex flex-col items-center gap-1 select-none",children:[n.jsx(ly,{size:36}),n.jsx("span",{className:"text-[8px] font-bold text-white/70 whitespace-nowrap",style:{letterSpacing:"-0.01em"},children:"Assuremind"})]})}const Q2=[{to:"/",icon:M2,label:"Dashboard"},{to:"/story",icon:Ot,label:"Smart Tests"},{to:"/tests",icon:nl,label:"Test Editor"},{to:"/run",icon:Tt,label:"Run Config"},{to:"/reports",icon:v2,label:"Reports"},{to:"/variables",icon:U2,label:"Variables"},{to:"/healing",icon:Wo,label:"Self-Healing"},{to:"/git",icon:Tr,label:"Git Control Center"},{to:"/library",icon:T2,label:"Step Library"},{to:"/docs",icon:tl,label:"Docs"},{to:"/settings",icon:Go,label:"Settings"}];function Y2({collapsed:e=!1,onToggle:t,mobileOpen:s=!1}){return n.jsxs(n.Fragment,{children:[s&&n.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-20 lg:hidden",onClick:t}),n.jsxs("aside",{className:S("fixed lg:relative z-30 flex flex-col h-full bg-sidebar text-white transition-all duration-300 ease-in-out flex-shrink-0",e?"w-[84px]":"w-[248px]",s?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:[n.jsx("div",{className:S("flex items-center border-b border-white/[0.06] flex-shrink-0",e?"justify-center px-2 py-3":"px-3 py-4"),children:e?n.jsx(G2,{}):n.jsx(V2,{})}),n.jsx("nav",{className:S("flex-1 overflow-hidden py-2 space-y-0.5",e?"px-2":"px-3"),style:{paddingTop:e?void 0:"0.75rem"},children:Q2.map(({to:r,icon:a,label:i})=>n.jsxs(Lj,{to:r,end:r==="/",className:({isActive:l})=>S("sidebar-item",l&&"active",e&&"justify-center !px-0"),title:e?i:void 0,children:[n.jsx(a,{size:18,className:"flex-shrink-0",strokeWidth:1.8}),!e&&n.jsx("span",{className:"truncate",children:i})]},r))}),n.jsx("button",{type:"button",onClick:t,className:S("hidden lg:flex items-center justify-center py-3.5","border-t border-white/[0.06] text-white/30 hover:text-white/70 transition-colors duration-200"),title:e?"Expand sidebar":"Collapse sidebar",children:e?n.jsx(tn,{size:16}):n.jsx(j2,{size:16})})]})]})}function J2(){const[e,t]=m.useState(!1),[s,r]=m.useState(!1);return{collapsed:e,mobileOpen:s,toggle:()=>{t(i=>!i),r(i=>!i)}}}const bm="/api",X2=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws`,oy=["chromium","firefox","webkit"];let ud=null;const Ju=new Set;function ff(){Ju.forEach(e=>e())}const Nr={subscribe(e){return Ju.add(e),()=>{Ju.delete(e)}},getSnapshot(){return{activeModal:ud}},showModal(e){ud=e,ff()},dismiss(){ud=null,ff()}};function Z2(){const[e,t]=m.useState(Nr.getSnapshot);return m.useEffect(()=>Nr.subscribe(()=>t(Nr.getSnapshot())),[]),e}const ew=new Set(["AI_NOT_CONFIGURED","JIRA_NOT_CONFIGURED","XRAY_NOT_CONFIGURED"]);async function U(e,t){const s=(t==null?void 0:t.body)!==void 0,r=await fetch(`${bm}${e}`,{headers:{...s?{"Content-Type":"application/json"}:{},...t==null?void 0:t.headers},...t});if(!r.ok){const a=await r.text();if(r.status===422)try{const i=JSON.parse(a);if(i.featureHint&&ew.has(i.featureHint))throw Nr.showModal(i.featureHint),new Error("Configuration required — check the setup instructions in the dialog.")}catch(i){if(i instanceof Error&&i.message.startsWith("Configuration required"))throw i}throw new Error(`API ${(t==null?void 0:t.method)??"GET"} ${e} → ${r.status}: ${a}`)}if(r.status!==204)return r.json()}const Ha={get:()=>U("/config"),update:e=>U("/config",{method:"PUT",body:JSON.stringify(e)}),getAiProvider:()=>U("/ai-provider"),getMcpStatus:()=>U("/mcp/status")},$r={list:e=>U(`/suites${e?`?type=${e}`:""}`),get:e=>U(`/suites/${e}`),create:e=>U("/suites",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>U(`/suites/${e}`,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>U(`/suites/${e}`,{method:"DELETE"})},Us={list:e=>U(`/suites/${e}/cases`),get:(e,t)=>U(`/suites/${e}/cases/${t}`),create:(e,t)=>U(`/suites/${e}/cases`,{method:"POST",body:JSON.stringify(t)}),update:(e,t,s)=>U(`/suites/${e}/cases/${t}`,{method:"PATCH",body:JSON.stringify(s)}),delete:(e,t)=>U(`/suites/${e}/cases/${t}`,{method:"DELETE"}),bulkDelete:(e,t)=>U(`/suites/${e}/cases/bulk-delete`,{method:"POST",body:JSON.stringify({ids:t})}),bulkMove:(e,t,s)=>U(`/suites/${e}/cases/bulk-move`,{method:"POST",body:JSON.stringify({ids:t,targetSuiteId:s})})},Ur={add:(e,t,s)=>U(`/suites/${e}/cases/${t}/steps`,{method:"POST",body:JSON.stringify(s)}),update:(e,t,s,r)=>U(`/suites/${e}/cases/${t}/steps/${s}`,{method:"PATCH",body:JSON.stringify(r)}),delete:(e,t,s)=>U(`/suites/${e}/cases/${t}/steps/${s}`,{method:"DELETE"}),generate:(e,t,s)=>U(`/suites/${e}/cases/${t}/steps/${s}/generate`,{method:"POST"}),generateAll:(e,t)=>U(`/suites/${e}/cases/${t}/steps/generate-all`,{method:"POST"}),reorder:(e,t,s)=>U(`/suites/${e}/cases/${t}/steps/reorder`,{method:"PATCH",body:JSON.stringify({stepIds:s})})},Br={get:e=>U(`/suites/${e}/hooks`),addStep:(e,t,s)=>U(`/suites/${e}/hooks/${t}/steps`,{method:"POST",body:JSON.stringify(s)}),updateStep:(e,t,s,r)=>U(`/suites/${e}/hooks/${t}/steps/${s}`,{method:"PATCH",body:JSON.stringify(r)}),deleteStep:(e,t,s)=>U(`/suites/${e}/hooks/${t}/steps/${s}`,{method:"DELETE"}),reorderSteps:(e,t,s)=>U(`/suites/${e}/hooks/${t}/steps/reorder`,{method:"PATCH",body:JSON.stringify({stepIds:s})}),generateStep:(e,t,s)=>U(`/suites/${e}/hooks/${t}/steps/${s}/generate`,{method:"POST"}),generateAll:(e,t)=>U(`/suites/${e}/hooks/${t}/steps/generate-all`,{method:"POST"})},xd={getAll:()=>U("/variables"),getEnv:e=>U(`/variables/env/${e}`),set:(e,t)=>U(`/variables/${e}`,{method:"PUT",body:JSON.stringify({value:t})}),delete:e=>U(`/variables/${e}`,{method:"DELETE"})},Kn={list:()=>U("/healing"),pending:()=>U("/healing/pending"),stats:()=>U("/healing/stats"),accept:e=>U(`/healing/${e}/accept`,{method:"PATCH"}),reject:e=>U(`/healing/${e}/reject`,{method:"PATCH"}),acceptAll:()=>U("/healing/accept-all",{method:"POST"}),delete:e=>U(`/healing/${e}`,{method:"DELETE"}),deleteBulk:e=>U("/healing/delete-bulk",{method:"POST",body:JSON.stringify({ids:e})}),deleteAll:()=>U("/healing/clear-all",{method:"POST"})},sl={start:e=>U("/run",{method:"POST",body:JSON.stringify(e)}),list:e=>U(`/run${e!==void 0?`?limit=${e}`:""}`),get:e=>U(`/run/${e}`)},Qo={list:e=>U(`/report${e!==void 0?`?limit=${e}`:""}`),get:e=>U(`/report/${e}`),delete:e=>U(`/report/${e}`,{method:"DELETE"})},Gr={generate:(e,t,s)=>U("/story/generate",{method:"POST",body:JSON.stringify({story:e,suiteName:t,jiraUrl:s})}),generateBulk:(e,t=3)=>U("/story/generate-bulk",{method:"POST",body:JSON.stringify({stories:e,concurrency:t})}),fetchJira:e=>U("/story/fetch-jira",{method:"POST",body:JSON.stringify({jiraUrl:e})}),swaggerPreview:e=>U("/story/swagger-preview",{method:"POST",body:JSON.stringify({specUrl:e})}),generateFromSwagger:(e,t,s,r)=>U("/story/generate-from-swagger",{method:"POST",body:JSON.stringify({specUrl:e,suiteName:t,tags:s,requirements:r||void 0})})},Hr={enabled:()=>U("/xray/enabled"),status:()=>U("/xray/status"),suiteStatus:e=>U(`/xray/status/${e}`),createAll:()=>U("/xray/create-all",{method:"POST"}),createSuite:e=>U(`/xray/create/suite/${e}`,{method:"POST"}),createCase:(e,t)=>U(`/xray/create/case/${e}/${t}`,{method:"POST"}),syncAll:()=>U("/xray/sync-all",{method:"POST"}),syncSuite:e=>U(`/xray/sync/suite/${e}`,{method:"POST"}),syncCase:(e,t)=>U(`/xray/sync/case/${e}/${t}`,{method:"POST"}),validate:()=>U("/xray/validate")},Qr={list:()=>U("/data-files"),get:e=>U(`/data-files/${encodeURIComponent(e)}`),upload:(e,t)=>U("/data-files/upload",{method:"POST",body:JSON.stringify({filename:e,content:t})}),update:(e,t)=>U(`/data-files/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({content:t})}),delete:e=>U(`/data-files/${encodeURIComponent(e)}`,{method:"DELETE"})},qe={status:()=>U("/git/status"),branches:()=>U("/git/branches"),checkout:e=>U("/git/checkout",{method:"POST",body:JSON.stringify({branch:e})}),commit:e=>U("/git/commit",{method:"POST",body:JSON.stringify({message:e})}),pull:e=>U("/git/pull",{method:"POST",body:JSON.stringify({rebase:e})}),push:()=>U("/git/push",{method:"POST"}),fullSync:e=>U("/git/full-sync",{method:"POST",body:JSON.stringify({message:e})}),log:e=>U(`/git/log${e?`?count=${e}`:""}`),diff:e=>U(`/git/diff${e?"?staged=true":""}`),conflictContent:e=>U(`/git/conflict-content/${encodeURIComponent(e)}`),resolveConflict:(e,t)=>U("/git/resolve-conflict",{method:"POST",body:JSON.stringify({filePath:e,content:t})}),continueRebase:()=>U("/git/continue-rebase",{method:"POST"}),abortRebase:()=>U("/git/abort-rebase",{method:"POST"}),generateCommitMessage:()=>U("/git/generate-commit-message",{method:"POST"}),resolveConflictAI:(e,t,s)=>U("/git/resolve-conflict-ai",{method:"POST",body:JSON.stringify({filePath:e,ours:t,theirs:s})}),impact:()=>U("/git/impact")};function Ja(e,t){const s=t.replace(/\\/g,"/").split("/").pop()??t;return`${bm}/results/${e}/${encodeURIComponent(s)}`}function tw(e){return`${bm}/results/baselines/${encodeURIComponent(e)}.png`}const nw={search:e=>U(`/search?q=${encodeURIComponent(e)}`)},sw={generate:e=>U("/ci-config",{method:"POST",body:JSON.stringify(e)})},rw={list:()=>U("/templates")},aw={get:(e,t)=>{const s=new URLSearchParams;return e&&s.set("suiteId",e),t&&s.set("caseId",t),U(`/flakiness?${s}`)}},ar={list:()=>U("/step-library"),create:e=>U("/step-library",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>U(`/step-library/${e}`,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>U(`/step-library/${e}`,{method:"DELETE"}),generate:e=>U(`/step-library/${e}/generate`,{method:"POST"})},pf={capture:(e,t)=>U(`/baselines/${e}/capture`,{method:"POST",body:JSON.stringify({screenshotPath:t})}),get:e=>U(`/baselines/${e}`)},md={start:(e,t)=>U("/recorder/start",{method:"POST",body:JSON.stringify({url:e,viewport:t})}),stop:()=>U("/recorder/stop",{method:"POST"}),status:()=>U("/recorder/status")};function iw(e){const t=e.locator;switch(e.action){case"navigate":return`await page.goto('${er(e.url||"")}');`;case"click":return`await page.${t}.click();`;case"fill":return`await page.${t}.fill('${er(e.value||"")}');`;case"select":return`await page.${t}.selectOption('${er(e.value||"")}');`;case"check":return`await page.${t}.check();`;case"uncheck":return`await page.${t}.uncheck();`;case"press":return t?`await page.${t}.press('${er(e.value||"")}');`:`await page.keyboard.press('${er(e.value||"")}');`;case"hover":return`await page.${t}.click();`;case"assert":{const s=e.instruction,r=e.soft?"expect.soft":"expect";if(s.includes("current URL contains")){const a=s.match(/contains "(.+)"/),i=a?a[1]:"/";return`await ${r}(page).toHaveURL(/${lw(i)}/);`}if(s.includes("page title is")){const a=s.match(/title is "(.+)"/),i=a?a[1]:"";return`await ${r}(page).toHaveTitle('${er(i)}');`}if(s.includes("has value")){const a=s.match(/has value "(.+)"/),i=a?a[1]:"";return`await ${r}(page.${t}).toHaveValue('${er(i)}');`}return s.includes("is checked")?`await ${r}(page.${t}).toBeChecked();`:s.includes("is unchecked")?`await ${r}(page.${t}).not.toBeChecked();`:t?`await ${r}(page.${t}).toBeVisible();`:`// TODO: ${s}`}default:return`// Unhandled action: ${e.action}`}}function er(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function lw(e){return e.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}let li=!1,hd=null;const Yr=[];let fd=!1,pd=[];const Xu=new Set;function Dn(){for(const e of Xu)e()}const Pe={subscribe(e){return Xu.add(e),()=>{Xu.delete(e)}},getSnapshot(){return{panelOpen:li,operationInProgress:hd,logSteps:[...Yr],hasConflict:fd,conflictFiles:[...pd]}},togglePanel(){li=!li,Dn()},openPanel(){li=!0,Dn()},closePanel(){li=!1,Dn()},startOperation(e){hd=e,Yr.length=0,Dn()},finishOperation(){hd=null,Dn()},addLogStep(e){const t=Yr.findIndex(s=>s.step===e.step&&s.status==="running");t>=0&&e.status!=="running"?Yr[t]=e:t<0&&Yr.push(e),Dn()},clearLogs(){Yr.length=0,Dn()},setConflict(e){fd=e.length>0,pd=e,Dn()},clearConflict(){fd=!1,pd=[],Dn()}};function Rc(){const[e,t]=m.useState(()=>Pe.getSnapshot());return m.useEffect(()=>Pe.subscribe(()=>t(Pe.getSnapshot())),[]),e}function vm(){return ke({queryKey:["git","status"],queryFn:qe.status,refetchInterval:5e3,retry:1})}function cy(){return ke({queryKey:["git","branches"],queryFn:qe.branches,staleTime:3e4,retry:1})}function dy(e){return ke({queryKey:["git","log",e],queryFn:()=>qe.log(e),staleTime:1e4,retry:1})}function uy(){const e=le();return X({mutationFn:t=>qe.checkout(t),onSuccess:(t,s)=>{e.invalidateQueries({queryKey:["git"]}),A.success(`Switched to ${s}`)},onError:t=>A.error(`Checkout failed: ${t.message}`)})}function xy(){const e=le();return X({mutationFn:t=>(Pe.startOperation("commit"),qe.commit(t)),onSuccess:t=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),A.success(`Committed: ${t.hash}`)},onError:t=>{Pe.finishOperation(),A.error(`Commit failed: ${t.message}`)}})}function my(){const e=le();return X({mutationFn:t=>(Pe.startOperation("pull"),qe.pull(t)),onSuccess:()=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),A.success("Pull successful")},onError:t=>{Pe.finishOperation(),A.error(`Pull failed: ${t.message}`)}})}function hy(){const e=le();return X({mutationFn:()=>(Pe.startOperation("push"),qe.push()),onSuccess:()=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),A.success("Pushed to remote")},onError:t=>{Pe.finishOperation(),A.error(`Push failed: ${t.message}`)}})}function fy(){const e=le();return X({mutationFn:t=>(Pe.startOperation("full-sync"),qe.fullSync(t)),onSuccess:()=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),A.success("Full sync complete")},onError:t=>{Pe.finishOperation(),A.error(`Sync failed: ${t.message}`)}})}function py(){return X({mutationFn:()=>qe.generateCommitMessage(),onError:e=>A.error(`AI generation failed: ${e.message}`)})}function gy(){const e=le();return X({mutationFn:({filePath:t,content:s})=>qe.resolveConflict(t,s),onSuccess:()=>{e.invalidateQueries({queryKey:["git"]}),A.success("Conflict resolved")},onError:t=>A.error(`Resolve failed: ${t.message}`)})}function yy(){return X({mutationFn:({filePath:e,ours:t,theirs:s})=>qe.resolveConflictAI(e,t,s),onError:e=>A.error(`AI resolve failed: ${e.message}`)})}function by(){const e=le();return X({mutationFn:()=>qe.continueRebase(),onSuccess:()=>{Pe.clearConflict(),e.invalidateQueries({queryKey:["git"]}),A.success("Rebase continued")},onError:t=>A.error(`Continue rebase failed: ${t.message}`)})}function vy(){const e=le();return X({mutationFn:()=>qe.abortRebase(),onSuccess:()=>{Pe.clearConflict(),e.invalidateQueries({queryKey:["git"]}),A.success("Rebase aborted")},onError:t=>A.error(`Abort rebase failed: ${t.message}`)})}const jy="assuremind-theme";function ow(){var t;const e=localStorage.getItem(jy);return e==="dark"||e==="light"?e:(t=window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}let ta=ow();const Zu=new Set;function Ny(e){const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")}Ny(ta);function cw(){for(const e of Zu)e()}const gd={subscribe(e){return Zu.add(e),()=>{Zu.delete(e)}},getSnapshot(){return ta},toggle(){ta=ta==="light"?"dark":"light",localStorage.setItem(jy,ta),Ny(ta),cw()}};function dw(){return{theme:m.useSyncExternalStore(gd.subscribe,gd.getSnapshot),toggle:gd.toggle}}const wy=6048e5,uw=864e5,Wl=43200,gf=1440,yf=Symbol.for("constructDateFrom");function ts(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yf in e?e[yf](t):e instanceof Date?new e.constructor(t):new Date(t)}function tt(e,t){return ts(t||e,e)}let xw={};function Nl(){return xw}function rl(e,t){var o,c,d,x;const s=Nl(),r=(t==null?void 0:t.weekStartsOn)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??s.weekStartsOn??((x=(d=s.locale)==null?void 0:d.options)==null?void 0:x.weekStartsOn)??0,a=tt(e,t==null?void 0:t.in),i=a.getDay(),l=(i<r?7:0)+i-r;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Yo(e,t){return rl(e,{...t,weekStartsOn:1})}function ky(e,t){const s=tt(e,t==null?void 0:t.in),r=s.getFullYear(),a=ts(s,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=Yo(a),l=ts(s,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const o=Yo(l);return s.getTime()>=i.getTime()?r+1:s.getTime()>=o.getTime()?r:r-1}function Jo(e){const t=tt(e),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+e-+s}function Mc(e,...t){const s=ts.bind(null,e||t.find(r=>typeof r=="object"));return t.map(s)}function bf(e,t){const s=tt(e,t==null?void 0:t.in);return s.setHours(0,0,0,0),s}function mw(e,t,s){const[r,a]=Mc(s==null?void 0:s.in,e,t),i=bf(r),l=bf(a),o=+i-Jo(i),c=+l-Jo(l);return Math.round((o-c)/uw)}function hw(e,t){const s=ky(e,t),r=ts(e,0);return r.setFullYear(s,0,4),r.setHours(0,0,0,0),Yo(r)}function po(e,t){const s=+tt(e)-+tt(t);return s<0?-1:s>0?1:s}function fw(e){return ts(e,Date.now())}function pw(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gw(e){return!(!pw(e)&&typeof e!="number"||isNaN(+tt(e)))}function yw(e,t,s){const[r,a]=Mc(s==null?void 0:s.in,e,t),i=r.getFullYear()-a.getFullYear(),l=r.getMonth()-a.getMonth();return i*12+l}function bw(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function vw(e,t){return+tt(e)-+tt(t)}function jw(e,t){const s=tt(e,t==null?void 0:t.in);return s.setHours(23,59,59,999),s}function Nw(e,t){const s=tt(e,t==null?void 0:t.in),r=s.getMonth();return s.setFullYear(s.getFullYear(),r+1,0),s.setHours(23,59,59,999),s}function ww(e,t){const s=tt(e,t==null?void 0:t.in);return+jw(s,t)==+Nw(s,t)}function kw(e,t,s){const[r,a,i]=Mc(s==null?void 0:s.in,e,e,t),l=po(a,i),o=Math.abs(yw(a,i));if(o<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-l*o);let c=po(a,i)===-l;ww(r)&&o===1&&po(r,i)===1&&(c=!1);const d=l*(o-+c);return d===0?0:d}function Sw(e,t,s){const r=vw(e,t)/1e3;return bw(s==null?void 0:s.roundingMethod)(r)}function Cw(e,t){const s=tt(e,t==null?void 0:t.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const Ew={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Pw=(e,t,s)=>{let r;const a=Ew[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+r:r+" ago":r};function yd(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const zw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Rw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Tw={date:yd({formats:zw,defaultWidth:"full"}),time:yd({formats:Rw,defaultWidth:"full"}),dateTime:yd({formats:Mw,defaultWidth:"full"})},Ow={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Aw=(e,t,s,r)=>Ow[e];function oi(e){return(t,s)=>{const r=s!=null&&s.context?String(s.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,o=s!=null&&s.width?String(s.width):l;a=e.formattingValues[o]||e.formattingValues[l]}else{const l=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;a=e.values[o]||e.values[l]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Dw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},_w={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$w={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Uw=(e,t)=>{const s=Number(e),r=s%100;if(r>20||r<10)switch(r%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},Bw={ordinalNumber:Uw,era:oi({values:Dw,defaultWidth:"wide"}),quarter:oi({values:Iw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oi({values:Lw,defaultWidth:"wide"}),day:oi({values:Fw,defaultWidth:"wide"}),dayPeriod:oi({values:_w,defaultWidth:"wide",formattingValues:$w,defaultFormattingWidth:"wide"})};function ci(e){return(t,s={})=>{const r=s.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const l=i[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?qw(o,f=>f.test(l)):Hw(o,f=>f.test(l));let d;d=e.valueCallback?e.valueCallback(c):c,d=s.valueCallback?s.valueCallback(d):d;const x=t.slice(l.length);return{value:d,rest:x}}}function Hw(e,t){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return s}function qw(e,t){for(let s=0;s<e.length;s++)if(t(e[s]))return s}function Kw(e){return(t,s={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let l=e.valueCallback?e.valueCallback(i[0]):i[0];l=s.valueCallback?s.valueCallback(l):l;const o=t.slice(a.length);return{value:l,rest:o}}}const Ww=/^(\d+)(th|st|nd|rd)?/i,Vw=/\d+/i,Gw={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Qw={any:[/^b/i,/^(a|c)/i]},Yw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jw={any:[/1/i,/2/i,/3/i,/4/i]},Xw={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Zw={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ek={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},tk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},nk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rk={ordinalNumber:Kw({matchPattern:Ww,parsePattern:Vw,valueCallback:e=>parseInt(e,10)}),era:ci({matchPatterns:Gw,defaultMatchWidth:"wide",parsePatterns:Qw,defaultParseWidth:"any"}),quarter:ci({matchPatterns:Yw,defaultMatchWidth:"wide",parsePatterns:Jw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ci({matchPatterns:Xw,defaultMatchWidth:"wide",parsePatterns:Zw,defaultParseWidth:"any"}),day:ci({matchPatterns:ek,defaultMatchWidth:"wide",parsePatterns:tk,defaultParseWidth:"any"}),dayPeriod:ci({matchPatterns:nk,defaultMatchWidth:"any",parsePatterns:sk,defaultParseWidth:"any"})},Sy={code:"en-US",formatDistance:Pw,formatLong:Tw,formatRelative:Aw,localize:Bw,match:rk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ak(e,t){const s=tt(e,t==null?void 0:t.in);return mw(s,Cw(s))+1}function ik(e,t){const s=tt(e,t==null?void 0:t.in),r=+Yo(s)-+hw(s);return Math.round(r/wy)+1}function Cy(e,t){var x,f,g,b;const s=tt(e,t==null?void 0:t.in),r=s.getFullYear(),a=Nl(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(x=t==null?void 0:t.locale)==null?void 0:x.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((b=(g=a.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,l=ts((t==null?void 0:t.in)||e,0);l.setFullYear(r+1,0,i),l.setHours(0,0,0,0);const o=rl(l,t),c=ts((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const d=rl(c,t);return+s>=+o?r+1:+s>=+d?r:r-1}function lk(e,t){var o,c,d,x;const s=Nl(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??s.firstWeekContainsDate??((x=(d=s.locale)==null?void 0:d.options)==null?void 0:x.firstWeekContainsDate)??1,a=Cy(e,t),i=ts((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),rl(i,t)}function ok(e,t){const s=tt(e,t==null?void 0:t.in),r=+rl(s,t)-+lk(s,t);return Math.round(r/wy)+1}function Ne(e,t){const s=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return s+r}const os={y(e,t){const s=e.getFullYear(),r=s>0?s:1-s;return Ne(t==="yy"?r%100:r,t.length)},M(e,t){const s=e.getMonth();return t==="M"?String(s+1):Ne(s+1,2)},d(e,t){return Ne(e.getDate(),t.length)},a(e,t){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h(e,t){return Ne(e.getHours()%12||12,t.length)},H(e,t){return Ne(e.getHours(),t.length)},m(e,t){return Ne(e.getMinutes(),t.length)},s(e,t){return Ne(e.getSeconds(),t.length)},S(e,t){const s=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,s-3));return Ne(a,t.length)}},Jr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vf={G:function(e,t,s){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})}},y:function(e,t,s){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return s.ordinalNumber(a,{unit:"year"})}return os.y(e,t)},Y:function(e,t,s,r){const a=Cy(e,r),i=a>0?a:1-a;if(t==="YY"){const l=i%100;return Ne(l,2)}return t==="Yo"?s.ordinalNumber(i,{unit:"year"}):Ne(i,t.length)},R:function(e,t){const s=ky(e);return Ne(s,t.length)},u:function(e,t){const s=e.getFullYear();return Ne(s,t.length)},Q:function(e,t,s){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ne(r,2);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,s){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ne(r,2);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,s){const r=e.getMonth();switch(t){case"M":case"MM":return os.M(e,t);case"Mo":return s.ordinalNumber(r+1,{unit:"month"});case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,s){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ne(r+1,2);case"Lo":return s.ordinalNumber(r+1,{unit:"month"});case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,s,r){const a=ok(e,r);return t==="wo"?s.ordinalNumber(a,{unit:"week"}):Ne(a,t.length)},I:function(e,t,s){const r=ik(e);return t==="Io"?s.ordinalNumber(r,{unit:"week"}):Ne(r,t.length)},d:function(e,t,s){return t==="do"?s.ordinalNumber(e.getDate(),{unit:"date"}):os.d(e,t)},D:function(e,t,s){const r=ak(e);return t==="Do"?s.ordinalNumber(r,{unit:"dayOfYear"}):Ne(r,t.length)},E:function(e,t,s){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,s,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ne(i,2);case"eo":return s.ordinalNumber(i,{unit:"day"});case"eee":return s.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(a,{width:"short",context:"formatting"});case"eeee":default:return s.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,s,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ne(i,t.length);case"co":return s.ordinalNumber(i,{unit:"day"});case"ccc":return s.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(a,{width:"narrow",context:"standalone"});case"cccccc":return s.day(a,{width:"short",context:"standalone"});case"cccc":default:return s.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,s){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Ne(a,t.length);case"io":return s.ordinalNumber(a,{unit:"day"});case"iii":return s.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(r,{width:"short",context:"formatting"});case"iiii":default:return s.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,s){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,s){const r=e.getHours();let a;switch(r===12?a=Jr.noon:r===0?a=Jr.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,s){const r=e.getHours();let a;switch(r>=17?a=Jr.evening:r>=12?a=Jr.afternoon:r>=4?a=Jr.morning:a=Jr.night,t){case"B":case"BB":case"BBB":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,s){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),s.ordinalNumber(r,{unit:"hour"})}return os.h(e,t)},H:function(e,t,s){return t==="Ho"?s.ordinalNumber(e.getHours(),{unit:"hour"}):os.H(e,t)},K:function(e,t,s){const r=e.getHours()%12;return t==="Ko"?s.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},k:function(e,t,s){let r=e.getHours();return r===0&&(r=24),t==="ko"?s.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},m:function(e,t,s){return t==="mo"?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):os.m(e,t)},s:function(e,t,s){return t==="so"?s.ordinalNumber(e.getSeconds(),{unit:"second"}):os.s(e,t)},S:function(e,t){return os.S(e,t)},X:function(e,t,s){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Nf(r);case"XXXX":case"XX":return rr(r);case"XXXXX":case"XXX":default:return rr(r,":")}},x:function(e,t,s){const r=e.getTimezoneOffset();switch(t){case"x":return Nf(r);case"xxxx":case"xx":return rr(r);case"xxxxx":case"xxx":default:return rr(r,":")}},O:function(e,t,s){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+jf(r,":");case"OOOO":default:return"GMT"+rr(r,":")}},z:function(e,t,s){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+jf(r,":");case"zzzz":default:return"GMT"+rr(r,":")}},t:function(e,t,s){const r=Math.trunc(+e/1e3);return Ne(r,t.length)},T:function(e,t,s){return Ne(+e,t.length)}};function jf(e,t=""){const s=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?s+String(a):s+String(a)+t+Ne(i,2)}function Nf(e,t){return e%60===0?(e>0?"-":"+")+Ne(Math.abs(e)/60,2):rr(e,t)}function rr(e,t=""){const s=e>0?"-":"+",r=Math.abs(e),a=Ne(Math.trunc(r/60),2),i=Ne(r%60,2);return s+a+t+i}const wf=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ey=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ck=(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],r=s[1],a=s[2];if(!a)return wf(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",wf(r,t)).replace("{{time}}",Ey(a,t))},dk={p:Ey,P:ck},uk=/^D+$/,xk=/^Y+$/,mk=["D","DD","YY","YYYY"];function hk(e){return uk.test(e)}function fk(e){return xk.test(e)}function pk(e,t,s){const r=gk(e,t,s);if(console.warn(r),mk.includes(e))throw new RangeError(r)}function gk(e,t,s){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vk=/^'([^]*?)'?$/,jk=/''/g,Nk=/[a-zA-Z]/;function wk(e,t,s){var x,f,g,b;const r=Nl(),a=r.locale??Sy,i=r.firstWeekContainsDate??((f=(x=r.locale)==null?void 0:x.options)==null?void 0:f.firstWeekContainsDate)??1,l=r.weekStartsOn??((b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,o=tt(e,s==null?void 0:s.in);if(!gw(o))throw new RangeError("Invalid time value");let c=t.match(bk).map(y=>{const v=y[0];if(v==="p"||v==="P"){const N=dk[v];return N(y,a.formatLong)}return y}).join("").match(yk).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const v=y[0];if(v==="'")return{isToken:!1,value:kk(y)};if(vf[v])return{isToken:!0,value:y};if(v.match(Nk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(c=a.localize.preprocessor(o,c));const d={firstWeekContainsDate:i,weekStartsOn:l,locale:a};return c.map(y=>{if(!y.isToken)return y.value;const v=y.value;(fk(v)||hk(v))&&pk(v,t,String(e));const N=vf[v[0]];return N(o,v,a.localize,d)}).join("")}function kk(e){const t=e.match(vk);return t?t[1].replace(jk,"'"):e}function Sk(e,t,s){const r=Nl(),a=(s==null?void 0:s.locale)??r.locale??Sy,i=2520,l=po(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const o=Object.assign({},s,{addSuffix:s==null?void 0:s.addSuffix,comparison:l}),[c,d]=Mc(s==null?void 0:s.in,...l>0?[t,e]:[e,t]),x=Sw(d,c),f=(Jo(d)-Jo(c))/1e3,g=Math.round((x-f)/60);let b;if(g<2)return s!=null&&s.includeSeconds?x<5?a.formatDistance("lessThanXSeconds",5,o):x<10?a.formatDistance("lessThanXSeconds",10,o):x<20?a.formatDistance("lessThanXSeconds",20,o):x<40?a.formatDistance("halfAMinute",0,o):x<60?a.formatDistance("lessThanXMinutes",1,o):a.formatDistance("xMinutes",1,o):g===0?a.formatDistance("lessThanXMinutes",1,o):a.formatDistance("xMinutes",g,o);if(g<45)return a.formatDistance("xMinutes",g,o);if(g<90)return a.formatDistance("aboutXHours",1,o);if(g<gf){const y=Math.round(g/60);return a.formatDistance("aboutXHours",y,o)}else{if(g<i)return a.formatDistance("xDays",1,o);if(g<Wl){const y=Math.round(g/gf);return a.formatDistance("xDays",y,o)}else if(g<Wl*2)return b=Math.round(g/Wl),a.formatDistance("aboutXMonths",b,o)}if(b=kw(d,c),b<12){const y=Math.round(g/Wl);return a.formatDistance("xMonths",y,o)}else{const y=b%12,v=Math.trunc(b/12);return y<3?a.formatDistance("aboutXYears",v,o):y<9?a.formatDistance("overXYears",v,o):a.formatDistance("almostXYears",v+1,o)}}function Xo(e,t){return Sk(e,fw(e),t)}let tr=[];const ex=new Set;function bd(){ex.forEach(e=>e())}const wr={subscribe(e){return ex.add(e),()=>{ex.delete(e)}},getSnapshot(){return{notifications:tr,unreadCount:tr.filter(e=>!e.read).length}},push(e){tr=[e,...tr].slice(0,20),bd()},markAllRead(){tr=tr.map(e=>({...e,read:!0})),bd()},clear(){tr=[],bd()}};function Ck(){const[e,t]=m.useState(()=>wr.getSnapshot());return m.useEffect(()=>wr.subscribe(()=>t(wr.getSnapshot())),[]),e}function Ek({type:e}){switch(e){case"run-complete":return n.jsx(Ue,{size:13,className:"text-emerald-500 flex-shrink-0"});case"run-error":return n.jsx(xt,{size:13,className:"text-red-500 flex-shrink-0"});case"healing":return n.jsx(Be,{size:13,className:"text-amber-500 flex-shrink-0"});case"git":return n.jsx(Tr,{size:13,className:"text-blue-500 flex-shrink-0"});default:return n.jsx(Yu,{size:13,className:"text-content-tertiary flex-shrink-0"})}}function Pk(){const[e,t]=m.useState(!1),{notifications:s,unreadCount:r}=Ck(),a=m.useRef(null),i=zn();return m.useEffect(()=>{if(!e)return;function l(o){a.current&&!a.current.contains(o.target)&&t(!1)}return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[e]),n.jsxs("div",{className:"relative",ref:a,children:[n.jsxs("button",{type:"button",onClick:()=>t(l=>!l),className:S("relative p-2 rounded-lg transition-all duration-200",e?"bg-accent-muted text-accent":"text-content-tertiary hover:bg-surface-inset hover:text-content-secondary"),"aria-label":"Notifications",title:"Notifications",children:[n.jsx(Yu,{size:16}),r>0&&n.jsx("span",{className:"absolute -top-1 -right-1 w-4 h-4 rounded-full bg-red-500 text-white text-[9px] font-bold flex items-center justify-center ring-2 ring-surface",children:r>9?"9+":r})]}),e&&n.jsxs("div",{className:"absolute right-0 top-full mt-2 w-80 bg-surface border border-border rounded-xl shadow-modal z-50 overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border bg-surface-inset/50",children:[n.jsx("span",{className:"text-xs font-semibold text-content",children:"Notifications"}),n.jsxs("div",{className:"flex items-center gap-1",children:[r>0&&n.jsx("button",{type:"button",onClick:()=>wr.markAllRead(),className:"p-1 rounded text-content-tertiary hover:text-content hover:bg-surface-inset transition-colors",title:"Mark all read",children:n.jsx(Ug,{size:12})}),n.jsx("button",{type:"button",onClick:()=>wr.clear(),className:"p-1 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors",title:"Clear all",children:n.jsx(gn,{size:12})})]})]}),n.jsx("div",{className:"max-h-80 overflow-y-auto divide-y divide-border/50",children:s.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-2",children:[n.jsx(Yu,{size:20,className:"text-content-tertiary/40"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No notifications"})]}):s.map(l=>n.jsxs("div",{className:S("flex items-start gap-2.5 px-3 py-2.5 transition-colors",!l.read&&"bg-accent-muted/20",l.link&&"cursor-pointer hover:bg-surface-inset/50"),onClick:()=>{l.link&&(t(!1),i(l.link))},children:[n.jsx("div",{className:"mt-0.5",children:n.jsx(Ek,{type:l.type})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:S("text-xs leading-relaxed",l.read?"text-content-secondary":"text-content font-medium"),children:l.message}),n.jsx("p",{className:"text-[9px] text-content-tertiary mt-0.5",children:Xo(new Date(l.timestamp),{addSuffix:!0})})]}),l.link&&n.jsx(Ya,{size:10,className:"text-content-tertiary/60 flex-shrink-0 mt-0.5"}),!l.read&&n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent flex-shrink-0 mt-1.5"})]},l.id))})]})]})}function zk(){const e=le(),t=zn(),[s,r]=m.useState(!1),a=m.useRef(null),{data:i}=ke({queryKey:["config"],queryFn:()=>Ha.get(),staleTime:3e4}),l=X({mutationFn:d=>{var f;const x=(f=i==null?void 0:i.profiles)==null?void 0:f.find(g=>g.name===d);if(!x)throw new Error("Profile not found");return Ha.update({activeProfile:x.name,environment:x.environment,baseUrl:x.baseUrl,browsers:x.browsers,...x.headless!==void 0?{headless:x.headless}:{}})},onSuccess:()=>{e.invalidateQueries({queryKey:["config"]}),r(!1)}});m.useEffect(()=>{const d=x=>{a.current&&!a.current.contains(x.target)&&r(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]);const o=(i==null?void 0:i.profiles)??[];if(o.length===0)return null;const c=(i==null?void 0:i.activeProfile)??(i==null?void 0:i.environment)??"env";return n.jsxs("div",{ref:a,className:"relative",children:[n.jsxs("button",{type:"button",onClick:()=>r(d=>!d),className:"flex items-center gap-1.5 text-xs border border-border rounded-lg px-2.5 py-1.5 text-content-secondary hover:bg-surface-inset transition-colors",children:[n.jsx(Or,{size:12,className:"text-accent flex-shrink-0"}),n.jsx("span",{className:"hidden sm:inline max-w-[100px] truncate",children:c}),n.jsx(Mt,{size:11,className:"text-content-tertiary"})]}),s&&n.jsxs("div",{className:"absolute right-0 top-full mt-1 w-52 bg-surface border border-border rounded-xl shadow-elevated z-50 overflow-hidden",children:[n.jsx("div",{className:"px-3 py-2 border-b border-border",children:n.jsx("p",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Environment Profiles"})}),n.jsx("div",{className:"py-1",children:o.map(d=>n.jsxs("button",{type:"button",onClick:()=>l.mutate(d.name),className:S("w-full text-left px-3 py-2 text-xs hover:bg-surface-inset transition-colors flex items-center justify-between gap-2",(i==null?void 0:i.activeProfile)===d.name&&"text-accent font-semibold"),children:[n.jsx("span",{className:"truncate",children:d.name}),n.jsx("span",{className:"text-[9px] text-content-tertiary flex-shrink-0",children:d.environment})]},d.name))}),n.jsx("div",{className:"border-t border-border px-3 py-2",children:n.jsxs("button",{type:"button",onClick:()=>{r(!1),t("/settings#profiles")},className:"flex items-center gap-1 text-[10px] text-content-tertiary hover:text-accent transition-colors",children:[n.jsx(Ba,{size:10})," Manage profiles"]})})]})]})}const Rk={anthropic:"Anthropic",bedrock:"Bedrock",openai:"OpenAI",google:"Google","azure-openai":"Azure OpenAI",ollama:"Ollama",unknown:"AI"};function Mk({title:e,onMenuClick:t}){const{data:s}=ke({queryKey:["ai-provider"],queryFn:()=>Ha.getAiProvider(),staleTime:6e4,retry:!1}),{panelOpen:r}=Rc(),{data:a}=vm(),{theme:i,toggle:l}=dw(),o=Rk[(s==null?void 0:s.provider)??""]??(s==null?void 0:s.provider)??"...",c=(s==null?void 0:s.model)??"...",d=((a==null?void 0:a.modified.length)??0)+((a==null?void 0:a.added.length)??0)+((a==null?void 0:a.deleted.length)??0)+((a==null?void 0:a.untracked.length)??0);return n.jsxs("header",{className:"h-14 bg-surface border-b border-border flex items-center px-5 gap-3 flex-shrink-0",children:[n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg hover:bg-surface-inset text-content-tertiary lg:hidden transition-colors","aria-label":"Toggle sidebar",children:n.jsx(A2,{size:18})}),n.jsx("h1",{className:"text-sm font-semibold text-content tracking-tight flex-1",children:e}),s&&n.jsxs("div",{className:"hidden sm:flex items-center gap-1.5 text-xs bg-surface-inset border border-border rounded-lg px-3 py-1.5",children:[n.jsx(g2,{size:13,className:"text-accent flex-shrink-0"}),n.jsx("span",{className:"font-medium text-content-secondary",children:o}),n.jsx("span",{className:"text-content-tertiary/50",children:"/"}),n.jsx("span",{className:"text-content-tertiary truncate max-w-[140px]",children:c})]}),n.jsx(zk,{}),n.jsx(Pk,{}),n.jsx("button",{type:"button",onClick:l,className:S("p-2 rounded-lg transition-all duration-200",i==="dark"?"bg-surface-inset text-amber-400 hover:bg-surface-overlay":"text-content-tertiary hover:bg-surface-inset hover:text-content-secondary"),"aria-label":i==="dark"?"Switch to light mode":"Switch to dark mode",title:i==="dark"?"Light mode":"Dark mode",children:i==="dark"?n.jsx(q2,{size:16}):n.jsx(I2,{size:16})}),n.jsxs("button",{type:"button",onClick:()=>Pe.togglePanel(),className:S("relative flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-200",r?"bg-accent-muted text-accent border border-accent/20":"text-content-tertiary hover:bg-surface-inset hover:text-content-secondary border border-transparent"),"aria-label":"Toggle Git panel",title:"Git Control Center",children:[n.jsx(Tr,{size:14}),n.jsx("span",{className:"hidden sm:inline",children:"Git"}),d>0&&n.jsx("span",{className:"absolute -top-1.5 -right-1.5 w-4 h-4 rounded-full bg-amber-500 text-white text-[9px] font-bold flex items-center justify-center ring-2 ring-surface",children:d>9?"9+":d})]})]})}function re({variant:e="primary",size:t="md",loading:s=!1,children:r,className:a,disabled:i,...l}){return n.jsxs("button",{...l,disabled:i||s,className:S("inline-flex items-center justify-center gap-2 font-medium rounded-lg transition-all duration-150","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",{"bg-gradient-to-b from-accent to-accent-dark text-white shadow-sm hover:shadow-md hover:brightness-110 focus-visible:ring-accent":e==="primary","bg-surface border border-border text-content-secondary hover:bg-surface-inset hover:text-content hover:border-border-strong focus-visible:ring-accent":e==="secondary","text-content-secondary hover:bg-surface-inset hover:text-content focus-visible:ring-accent/40":e==="ghost","bg-gradient-to-b from-red-500 to-red-600 text-white shadow-sm hover:shadow-md hover:brightness-110 focus-visible:ring-red-500":e==="danger","px-2.5 py-1.5 text-xs gap-1.5":t==="sm","px-4 py-2 text-sm":t==="md","px-5 py-2.5 text-sm":t==="lg","opacity-40 cursor-not-allowed pointer-events-none":i||s},a),children:[s&&n.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",children:[n.jsx("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),n.jsx("path",{className:"opacity-80",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),r]})}function qr(e){const t=m.useRef(null),s=m.useRef(e);s.current=e;const r=m.useCallback(()=>{var i;if(((i=t.current)==null?void 0:i.readyState)===WebSocket.OPEN)return;const a=new WebSocket(X2);t.current=a,a.onmessage=l=>{try{const o=JSON.parse(l.data),c=s.current[o.event];c&&c(o.data)}catch{}},a.onclose=()=>{setTimeout(r,3e3)},a.onerror=()=>{a.close()}},[]);m.useEffect(()=>(r(),()=>{var a;(a=t.current)==null||a.close()}),[r])}let Zo={isRunning:!1,runId:null,currentBrowser:null,currentCase:null,currentStep:null,completed:null,error:null,activeCases:new Map};const tx=new Set;function Py(){tx.forEach(e=>e())}function di(e){Zo=e(Zo),Py()}const vd={subscribe(e){return tx.add(e),()=>{tx.delete(e)}},getSnapshot(){return Zo},reset(){Zo={isRunning:!1,runId:null,currentBrowser:null,currentCase:null,currentStep:null,completed:null,error:null,activeCases:new Map},Py()}};function jm(){const e=m.useSyncExternalStore(vd.subscribe,vd.getSnapshot),t=m.useCallback(o=>{const c=o;di(()=>({isRunning:!0,runId:c.runId,currentBrowser:null,currentCase:null,currentStep:null,completed:null,error:null,activeCases:new Map}))},[]),s=m.useCallback(o=>{const c=o;di(d=>{const x=new Map(d.activeCases);return x.set(c.caseId,c.caseName),{...d,isRunning:!0,currentBrowser:c.browser??d.currentBrowser,currentCase:c,currentStep:null,activeCases:x}})},[]),r=m.useCallback(o=>{di(c=>({...c,isRunning:!0,currentStep:o}))},[]),a=m.useCallback(o=>{di(c=>({...c,isRunning:!1,completed:o,currentCase:null,currentStep:null}))},[]),i=m.useCallback(o=>{const c=o;di(d=>({...d,isRunning:!1,error:c.error}))},[]);qr({"run:start":t,"run:case":s,"run:step":r,"run:complete":a,"run:error":i});const l=m.useCallback(()=>{vd.reset()},[]);return{...e,reset:l}}function jd(e,t){qr({[e]:t})}function kf({data:e,maxHeight:t=32}){const s=Math.max(...e.map(r=>r.value),1);return n.jsx("div",{className:"flex items-end gap-[3px]",style:{height:t},children:e.map((r,a)=>n.jsx("div",{className:S("w-[6px] rounded-full transition-all duration-500",r.color),style:{height:`${Math.max(r.value/s*100,6)}%`}},a))})}function Tk({rate:e,hasData:t=!1,size:s=80}){const a=(s-6)/2,i=2*Math.PI*a,l=i-e/100*i,o=t?"#ef4444":"var(--color-border)";return n.jsxs("div",{className:"relative",style:{width:s,height:s},children:[n.jsxs("svg",{width:s,height:s,className:"-rotate-90",children:[n.jsx("circle",{cx:s/2,cy:s/2,r:a,fill:"none",stroke:o,strokeWidth:6}),n.jsx("circle",{cx:s/2,cy:s/2,r:a,fill:"none",stroke:"#10b981",strokeWidth:6,strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:l,className:"transition-all duration-1000 ease-out"})]}),n.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:n.jsxs("span",{className:"text-lg font-bold text-content tabular-nums",children:[e,"%"]})})]})}function Ok({status:e}){const t={passed:"bg-emerald-500",failed:"bg-red-500",partial:"bg-amber-500",running:"bg-blue-500 animate-pulse",skipped:"bg-slate-400"};return n.jsx("span",{className:S("w-2 h-2 rounded-full flex-shrink-0",t[e]??"bg-slate-400")})}function Ak(e,t){return e.filter(s=>{var r;return(r=s.suiteIds)==null?void 0:r.includes(t)}).slice(-7).map(s=>({value:s.totalTests>0?Math.round(s.passed/s.totalTests*100):0,color:s.failed>0?"bg-red-400":"bg-emerald-400"}))}function Dk(){const e=zn(),{data:t=[],isLoading:s}=ke({queryKey:["reports"],queryFn:()=>Qo.list(20)}),{data:r=[],isLoading:a}=ke({queryKey:["suites"],queryFn:()=>$r.list()}),{data:i}=ke({queryKey:["healing-stats"],queryFn:()=>Kn.stats(),staleTime:3e4,retry:!1}),l=jm(),o=s||a,c=t[0],d=r.reduce((w,z)=>w+(z.caseCount??0),0),x=r.filter(w=>(w.type??"ui")==="ui"),f=r.filter(w=>(w.type??"ui")==="api"),g=x.reduce((w,z)=>w+(z.caseCount??0),0),b=f.reduce((w,z)=>w+(z.caseCount??0),0),y=t.reduce((w,z)=>w+z.passed,0),v=t.reduce((w,z)=>w+z.failed,0),N=t.reduce((w,z)=>w+z.skipped,0),h=y+v>0?Math.round(y/(y+v)*100):0,u=y+v+N,p=t.filter(w=>w.duration).length>0?Math.round(t.filter(w=>w.duration).reduce((w,z)=>w+(z.duration??0),0)/t.filter(w=>w.duration).length/1e3):0,j=[...t].reverse().map(w=>({value:w.passed+w.failed+w.skipped,color:w.status==="passed"?"bg-emerald-400":w.status==="failed"?"bg-red-400":"bg-amber-400"}));return o?n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 px-8 pt-6 pb-4",children:[n.jsx("div",{className:"h-7 w-48 rounded-lg skeleton-shimmer"}),n.jsx("div",{className:"h-4 w-72 rounded-lg skeleton-shimmer mt-2"})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-8 pb-8",children:[n.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[1,2,3,4].map(w=>n.jsx("div",{className:"h-28 rounded-2xl skeleton-shimmer"},w))}),n.jsx("div",{className:"grid grid-cols-3 gap-4",children:[1,2,3].map(w=>n.jsx("div",{className:"h-64 rounded-2xl skeleton-shimmer"},w))})]})]}):n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 px-8 pt-6 pb-4 flex items-end justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-content tracking-tight",children:"Dashboard"}),n.jsx("p",{className:"text-sm text-content-tertiary mt-0.5",children:"Test automation health at a glance"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(re,{size:"sm",variant:"secondary",onClick:()=>e("/run"),children:[n.jsx(Tt,{size:13})," Run Tests"]}),n.jsxs(re,{size:"sm",onClick:()=>e("/story"),children:[n.jsx(Ot,{size:13})," Generate"]})]})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-8 pb-8 space-y-5",children:[l.isRunning&&n.jsx("div",{className:"rounded-2xl border border-accent/25 bg-gradient-to-r from-accent/[0.06] via-accent/[0.03] to-transparent p-4 animate-fade-in",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"relative w-8 h-8 flex-shrink-0",children:[n.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-accent/20"}),n.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-transparent border-t-accent animate-spin"})]}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"text-sm font-semibold text-content",children:"Run in progress..."}),l.currentCase&&n.jsxs("p",{className:"text-xs text-content-secondary truncate mt-0.5",children:[l.currentCase.caseName,l.currentStep&&` › ${l.currentStep.instruction}`]})]}),n.jsxs(re,{size:"sm",variant:"ghost",onClick:()=>e("/run"),children:["View ",n.jsx(dr,{size:12})]})]})}),l.completed&&!l.isRunning&&(()=>{const w=l.completed,z=w.failed===0&&w.passed>0,C=w.failed>0,P=z?{border:"border-emerald-200/50",bg:"bg-gradient-to-r from-emerald-50/80 to-transparent",icon:"text-emerald-500",title:"text-emerald-800",subtitle:"text-emerald-600",label:"All tests passed"}:C?{border:"border-red-200/50",bg:"bg-gradient-to-r from-red-50/80 to-transparent",icon:"text-red-500",title:"text-red-800",subtitle:"text-red-600",label:"Completed with failures"}:{border:"border-amber-200/50",bg:"bg-gradient-to-r from-amber-50/80 to-transparent",icon:"text-amber-500",title:"text-amber-800",subtitle:"text-amber-600",label:"Run completed"},_=z?Ue:C?xt:Xt;return n.jsx("div",{className:S("rounded-2xl border p-4 animate-fade-in",P.border,P.bg),children:n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(_,{size:20,className:S(P.icon,"flex-shrink-0")}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-sm font-semibold",P.title),children:P.label}),n.jsxs("p",{className:S("text-xs mt-0.5",P.subtitle),children:[w.passed," passed / ",w.failed," failed / ",w.skipped," skipped"]})]})]}),n.jsx(re,{variant:"secondary",size:"sm",onClick:()=>e("/reports"),children:"View Report"})]})})})(),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col justify-between",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-50 border border-indigo-100 flex items-center justify-center",children:n.jsx(jl,{size:18,className:"text-indigo-500"})}),n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Coverage"})]}),n.jsxs("div",{className:"mt-4",children:[n.jsx("p",{className:"text-3xl font-extrabold text-content tabular-nums tracking-tight",children:r.length}),n.jsx("p",{className:"text-xs text-content-tertiary mt-0.5",children:"test suites"})]}),n.jsxs("div",{className:"mt-3 pt-3 border-t border-border-muted flex items-center gap-4",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(ha,{size:11,className:"text-blue-500"}),n.jsxs("span",{className:"text-[11px] text-content-secondary font-medium",children:[x.length," UI"]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:["(",g,")"]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(F2,{size:11,className:"text-purple-500"}),n.jsxs("span",{className:"text-[11px] text-content-secondary font-medium",children:[f.length," API"]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:["(",b,")"]})]})]})]}),n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col items-center justify-center",children:[n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider mb-3",children:"Pass Rate"}),n.jsx(Tk,{rate:t.length>0?h:0,hasData:y+v>0}),n.jsx("p",{className:"text-[11px] text-content-tertiary mt-2",children:y+v>0?`${y} of ${y+v} cases passed`:"no runs yet"})]}),n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col justify-between",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-teal-50 border border-teal-100 flex items-center justify-center",children:n.jsx(f2,{size:18,className:"text-teal-500"})}),n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Execution"})]}),n.jsxs("div",{className:"mt-4",children:[n.jsx("p",{className:"text-3xl font-extrabold text-content tabular-nums tracking-tight",children:u}),n.jsx("p",{className:"text-xs text-content-tertiary mt-0.5",children:"tests executed"})]}),n.jsxs("div",{className:"mt-3 pt-3 border-t border-border-muted grid grid-cols-3 gap-2",children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Ue,{size:10,className:"text-emerald-500"}),n.jsx("span",{className:"text-[11px] font-semibold text-emerald-600 tabular-nums",children:y})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(xt,{size:10,className:"text-red-500"}),n.jsx("span",{className:"text-[11px] font-semibold text-red-500 tabular-nums",children:v})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Ec,{size:10,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[11px] font-semibold text-content-tertiary tabular-nums",children:N})]})]})]}),n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col justify-between",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-amber-50 border border-amber-100 flex items-center justify-center",children:n.jsx(Be,{size:18,className:"text-amber-500"})}),n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Insights"})]}),n.jsxs("div",{className:"mt-4 space-y-2.5",children:[n.jsx("div",{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[11px] text-content-tertiary",children:"Avg Duration"}),n.jsx("span",{className:"text-sm font-bold text-content tabular-nums",children:p>0?`${p}s`:"—"})]})}),n.jsx("div",{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[11px] text-content-tertiary",children:"Self-Healed"}),n.jsx("span",{className:"text-sm font-bold text-emerald-600 tabular-nums",children:(i==null?void 0:i.accepted)??0})]})}),n.jsx("div",{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[11px] text-content-tertiary",children:"Pending Review"}),n.jsx("span",{className:S("text-sm font-bold tabular-nums",((i==null?void 0:i.pending)??0)>0?"text-amber-500":"text-content-tertiary"),children:(i==null?void 0:i.pending)??0})]})})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[n.jsxs("div",{className:"lg:col-span-2 rounded-2xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-accent-muted flex items-center justify-center",children:n.jsx(W2,{size:14,className:"text-accent"})}),n.jsx("h2",{className:"text-sm font-semibold text-content",children:"Recent Runs"})]}),t.length>0&&n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(kf,{data:j,maxHeight:24}),n.jsxs("button",{onClick:()=>e("/reports"),className:"text-xs text-accent font-medium hover:underline flex items-center gap-0.5",children:["View all ",n.jsx(dr,{size:11})]})]})]}),t.length===0?n.jsxs("div",{className:"px-5 py-12 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-2xl bg-surface-inset flex items-center justify-center mx-auto mb-3",children:n.jsx(En,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-sm font-medium text-content-secondary",children:"No runs yet"}),n.jsx("p",{className:"text-xs text-content-tertiary mt-1 mb-4",children:"Execute your first test run to see results here"}),n.jsxs(re,{size:"sm",onClick:()=>e("/run"),children:[n.jsx(Tt,{size:12})," Start a Run"]})]}):n.jsxs("div",{className:"divide-y divide-border-muted",children:[n.jsxs("div",{className:"grid grid-cols-[1fr_100px_140px_80px_60px] px-5 py-2 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:[n.jsx("span",{children:"Run ID"}),n.jsx("span",{children:"Status"}),n.jsx("span",{children:"Results"}),n.jsx("span",{children:"Duration"}),n.jsx("span",{className:"text-right",children:"Time"})]}),t.slice(0,6).map(w=>{const z=w.passed+w.failed+w.skipped,C=z>0?Math.round(w.passed/z*100):0;return n.jsxs("div",{onClick:()=>e("/reports"),className:"grid grid-cols-[1fr_100px_140px_80px_60px] items-center px-5 py-3 hover:bg-surface-inset cursor-pointer transition-colors group",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx(Ok,{status:w.status}),n.jsx("span",{className:"text-xs font-mono text-content-secondary truncate",children:w.runId.slice(0,10)})]}),n.jsx("div",{children:n.jsx("span",{className:S("text-[10px] font-semibold px-2 py-0.5 rounded-md uppercase tracking-wide",w.status==="passed"?"bg-emerald-50 text-emerald-700":w.status==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-700"),children:w.status})}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"flex-1 h-1.5 bg-surface-inset rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-emerald-400 rounded-full transition-all duration-500",style:{width:`${C}%`}})}),n.jsxs("span",{className:"text-[11px] text-content-secondary tabular-nums w-12 text-right",children:[w.passed,"/",z]})]}),n.jsx("span",{className:"text-[11px] text-content-tertiary tabular-nums",children:w.duration?`${(w.duration/1e3).toFixed(1)}s`:"—"}),n.jsx("span",{className:"text-[10px] text-content-tertiary text-right",children:Xo(new Date(w.startedAt),{addSuffix:!1})})]},w.runId)})]})]}),n.jsxs("div",{className:"flex flex-col gap-4",children:[n.jsxs("div",{className:"rounded-2xl border border-border bg-surface overflow-hidden flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-indigo-50 border border-indigo-100 flex items-center justify-center",children:n.jsx(nl,{size:14,className:"text-indigo-500"})}),n.jsx("h2",{className:"text-sm font-semibold text-content",children:"Test Suites"})]}),n.jsxs("span",{className:"text-[10px] font-semibold text-content-tertiary bg-surface-inset px-2 py-0.5 rounded-md",children:[d," cases"]})]}),r.length===0?n.jsxs("div",{className:"px-5 py-8 text-center",children:[n.jsx("p",{className:"text-sm text-content-tertiary mb-3",children:"No suites yet"}),n.jsx(re,{size:"sm",onClick:()=>e("/tests"),children:"Create Suite"})]}):n.jsx("ul",{className:"divide-y divide-border-muted max-h-[200px] overflow-y-auto",children:r.map(w=>n.jsxs("li",{onClick:()=>e("/tests"),className:"flex items-center justify-between px-5 py-2.5 hover:bg-surface-inset cursor-pointer transition-colors group",children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("p",{className:"text-sm text-content font-medium truncate",children:w.name}),n.jsx("span",{className:S("text-[9px] px-1.5 py-0.5 rounded font-bold uppercase flex-shrink-0",(w.type??"ui")==="api"?"bg-purple-50 text-purple-600":"bg-blue-50 text-blue-600"),children:(w.type??"ui").toUpperCase()})]}),n.jsxs("p",{className:"text-[11px] text-content-tertiary mt-0.5",children:[w.caseCount??0," cases"]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[n.jsx(kf,{data:Ak(t,w.id),maxHeight:24}),n.jsx(dr,{size:13,className:"text-content-tertiary opacity-0 group-hover:opacity-100 transition-opacity"})]})]},w.id))})]}),n.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:[{label:"Smart Tests",icon:Ot,to:"/story",gradient:"from-violet-500 to-indigo-600"},{label:"Self-Healing",icon:Wo,to:"/healing",gradient:"from-rose-500 to-pink-600"},{label:"Variables",icon:gm,to:"/variables",gradient:"from-teal-500 to-cyan-600"},{label:"Reports",icon:En,to:"/reports",gradient:"from-amber-500 to-orange-600"}].map(({label:w,icon:z,to:C,gradient:P})=>n.jsxs("button",{type:"button",onClick:()=>e(C),className:"group relative overflow-hidden rounded-xl border border-border bg-surface px-3.5 py-3 hover:border-border-strong hover:shadow-card transition-all duration-200 flex items-center gap-3",children:[n.jsx("div",{className:S("w-8 h-8 rounded-lg bg-gradient-to-br flex items-center justify-center flex-shrink-0",P),children:n.jsx(z,{size:14,className:"text-white"})}),n.jsx("p",{className:"text-xs font-semibold text-content group-hover:text-accent transition-colors",children:w})]},C))})]})]}),c&&n.jsx("div",{className:"rounded-2xl border border-border bg-surface px-6 py-4",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:S("w-10 h-10 rounded-xl flex items-center justify-center",c.status==="passed"?"bg-emerald-50 border border-emerald-100":c.status==="failed"?"bg-red-50 border border-red-100":"bg-amber-50 border border-amber-100"),children:c.status==="passed"?n.jsx(Ue,{size:18,className:"text-emerald-500"}):c.status==="failed"?n.jsx(Xt,{size:18,className:"text-red-500"}):n.jsx(hf,{size:18,className:"text-amber-500"})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-content-secondary uppercase tracking-wider",children:"Last Run"}),n.jsxs("p",{className:"text-sm font-bold text-content mt-0.5",children:[c.passed," passed, ",c.failed," failed",c.skipped>0&&`, ${c.skipped} skipped`]})]})]}),n.jsxs("div",{className:"flex items-center gap-6 text-xs text-content-tertiary",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Fr,{size:12}),n.jsx("span",{children:Xo(new Date(c.startedAt),{addSuffix:!0})})]}),c.duration&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(hf,{size:12}),n.jsxs("span",{children:[(c.duration/1e3).toFixed(1),"s"]})]}),n.jsx("div",{className:"flex items-center gap-1.5 font-mono",children:n.jsxs("span",{children:["#",c.runId.slice(0,8)]})}),n.jsxs(re,{size:"sm",variant:"ghost",onClick:()=>e("/reports"),children:["Details ",n.jsx(dr,{size:11})]})]})]})})]})]})}function Rn({open:e,title:t="Confirm Delete",message:s,confirmLabel:r="Delete",onConfirm:a,onCancel:i}){return m.useEffect(()=>{if(!e)return;const l=o=>{o.key==="Escape"&&i(),o.key==="Enter"&&(o.preventDefault(),a())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,i]),e?n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center animate-fade-in",children:[n.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:i}),n.jsxs("div",{className:"relative bg-surface rounded-2xl shadow-modal w-full max-w-sm mx-4 p-6 animate-scale-in border border-border",children:[n.jsxs("div",{className:"flex items-start gap-3.5",children:[n.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl bg-red-50 border border-red-200/50 flex items-center justify-center",children:n.jsx(Xt,{size:18,className:"text-red-500"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("h3",{className:"text-sm font-semibold text-content",children:t}),n.jsx("p",{className:"mt-1 text-sm text-content-secondary leading-relaxed",children:s})]})]}),n.jsxs("div",{className:"mt-6 flex items-center justify-end gap-2.5",children:[n.jsx(re,{variant:"secondary",size:"sm",onClick:i,children:"Cancel"}),n.jsx(re,{variant:"danger",size:"sm",onClick:a,children:r})]})]})]}):null}function Mn(){const[e,t]=m.useState({open:!1,message:"",onConfirm:()=>{}}),s=m.useCallback((i,l)=>{t({open:!0,message:i,onConfirm:l})},[]),r=m.useCallback(()=>{t(i=>({...i,open:!1}))},[]),a=m.useCallback(()=>{e.onConfirm(),t(i=>({...i,open:!1}))},[e.onConfirm]);return{modalProps:{open:e.open,message:e.message,onConfirm:a,onCancel:r},confirmDelete:s}}const Ik=[{id:"all",label:"All"},{id:"auth",label:"Auth"},{id:"crud",label:"CRUD"},{id:"navigation",label:"Navigation"},{id:"form",label:"Form"},{id:"api",label:"API"}],Lk={auth:"bg-violet-50 text-violet-600",crud:"bg-blue-50 text-blue-600",navigation:"bg-teal-50 text-teal-600",form:"bg-orange-50 text-orange-600",api:"bg-purple-50 text-purple-600"};function Fk({open:e,onClose:t,suiteId:s,onCreated:r}){const[a,i]=m.useState("all"),[l,o]=m.useState(null),{data:c=[],isLoading:d}=ke({queryKey:["templates"],queryFn:()=>rw.list(),enabled:e}),x=X({mutationFn:b=>Us.create(s,{name:b.name,description:b.description,steps:b.steps.map((y,v)=>({...y,id:crypto.randomUUID(),order:v+1}))}),onSuccess:()=>{A.success("Test case created from template"),r(),t()},onError:b=>{A.error(b.message),o(null)}}),f=b=>{o(b.id),x.mutate(b)},g=a==="all"?c:c.filter(b=>b.category===a);return e?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-2xl mx-4 overflow-hidden flex flex-col max-h-[85vh]",onClick:b=>b.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-bold text-content",children:"Test Case Templates"}),n.jsx("p",{className:"text-[11px] text-content-tertiary mt-0.5",children:"Start from a pre-built template"})]}),n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset hover:text-content transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"flex gap-1 px-5 py-2.5 border-b border-border flex-shrink-0 overflow-x-auto",children:Ik.map(b=>n.jsx("button",{type:"button",onClick:()=>i(b.id),className:S("px-3 py-1.5 rounded-lg text-xs font-semibold transition-colors flex-shrink-0",a===b.id?"bg-accent text-white":"text-content-secondary hover:bg-surface-inset"),children:b.label},b.id))}),n.jsx("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:d?n.jsx("div",{className:"grid grid-cols-2 gap-3",children:[1,2,3,4].map(b=>n.jsx("div",{className:"h-28 rounded-xl skeleton-shimmer"},b))}):g.length===0?n.jsx("div",{className:"py-12 text-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"No templates in this category"})}):n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:g.map(b=>n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-4 flex flex-col gap-3 hover:border-border-strong hover:shadow-card transition-all",children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-surface-inset flex items-center justify-center flex-shrink-0",children:n.jsx(fn,{size:13,className:"text-content-secondary"})}),n.jsx("div",{className:"min-w-0",children:n.jsx("p",{className:"text-sm font-bold text-content truncate",children:b.name})})]}),n.jsx("span",{className:S("text-[9px] px-1.5 py-0.5 rounded font-bold uppercase flex-shrink-0",Lk[b.category]??"bg-surface-inset text-content-tertiary"),children:b.category})]}),n.jsx("p",{className:"text-xs text-content-secondary leading-relaxed",children:b.description}),n.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:[b.steps.length," step",b.steps.length!==1?"s":""]}),n.jsx("button",{type:"button",onClick:()=>f(b),disabled:x.isPending,className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-colors",l===b.id?"bg-emerald-50 text-emerald-600 border border-emerald-200":"bg-accent/10 text-accent hover:bg-accent/20",x.isPending&&"opacity-50 cursor-not-allowed"),children:l===b.id?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{size:11})," Creating..."]}):"Use Template"})]})]},b.id))})})]})}):null}function zy(){return ke({queryKey:["suites"],queryFn:()=>$r.list()})}function _k(){const e=le();return X({mutationFn:$r.create,onSuccess:()=>{e.invalidateQueries({queryKey:["suites"]}),A.success("Suite created")},onError:t=>A.error(t.message)})}function Ry(){const e=le();return X({mutationFn:({id:t,data:s})=>$r.update(t,s),onSuccess:()=>{e.invalidateQueries({queryKey:["suites"]}),A.success("Suite updated")},onError:t=>A.error(t.message)})}function $k(){const e=le();return X({mutationFn:$r.delete,onSuccess:()=>{e.invalidateQueries({queryKey:["suites"]}),A.success("Suite deleted")},onError:t=>A.error(t.message)})}function Uk(e){return ke({queryKey:["cases",e],queryFn:()=>Us.list(e),enabled:!!e})}function Bk(e,t){return ke({queryKey:["cases",e,t],queryFn:()=>Us.get(e,t),enabled:!!e&&!!t})}function Sf(e){const t=le();return X({mutationFn:s=>Us.create(e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["cases",e]}),A.success("Test case created")},onError:s=>A.error(s.message)})}function Hk(e){const t=le();return X({mutationFn:({caseId:s,data:r})=>Us.update(e,s,r),onSuccess:(s,{caseId:r})=>{t.invalidateQueries({queryKey:["cases",e]}),t.invalidateQueries({queryKey:["cases",e,r]}),A.success("Test case updated")},onError:s=>A.error(s.message)})}function qk(e){const t=le();return X({mutationFn:s=>Us.delete(e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["cases",e]}),A.success("Test case deleted")},onError:s=>A.error(s.message)})}function Kk(e,t){const s=le();return X({mutationFn:r=>Ur.add(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>A.error(r.message)})}function Wk(e,t){const s=le();return X({mutationFn:({stepId:r,instruction:a,timeout:i,stepType:l,retries:o,mockUrl:c,mockResponse:d,mockStatus:x,runAudit:f,soft:g})=>Ur.update(e,t,r,{instruction:a,timeout:i,stepType:l,retries:o,mockUrl:c,mockResponse:d,mockStatus:x,runAudit:f,soft:g}),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>A.error(r.message)})}function Vk(e,t){const s=le();return X({mutationFn:r=>Ur.reorder(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>A.error(r.message)})}function Gk(e,t){const s=le();return X({mutationFn:r=>Ur.delete(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>A.error(r.message)})}function Qk(e,t){const s=le();return X({mutationFn:r=>Ur.generate(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]}),A.success("Code generated")},onError:r=>A.error(r.message)})}function Yk(e,t){const s=le();return X({mutationFn:()=>Ur.generateAll(e,t),onSuccess:r=>{s.invalidateQueries({queryKey:["cases",e,t]}),A.success(`Generated code for ${r.generated} step(s)`)},onError:r=>A.error(r.message)})}const al=new Map,nx=new Set;function My(){for(const e of nx)e()}function Nd(){return"all"}function wd(e){return`suite:${e}`}function kd(e,t){return`case:${e}:${t}`}function Sd(e,t){al.set(e,{op:t,startedAt:Date.now()}),My()}function Cd(e){al.delete(e),My()}function Ed(e){var t;return((t=al.get(e))==null?void 0:t.op)??null}function Jk(){const e=new Map,t=new Map;let s=null;for(const[r,a]of al)r==="all"?s=a.op:r.startsWith("suite:")?e.set(r.slice(6),a.op):r.startsWith("case:")&&t.set(r.slice(5),a.op);return{allOp:s,busySuites:e,busyCases:t,activeCount:al.size}}function Xk(e){return nx.add(e),()=>{nx.delete(e)}}const et={startAll:e=>Sd(Nd(),e),finishAll:()=>Cd(Nd()),startSuite:(e,t)=>Sd(wd(e),t),finishSuite:e=>Cd(wd(e)),startCase:(e,t,s)=>Sd(kd(e,t),s),finishCase:(e,t)=>Cd(kd(e,t)),isAllBusy:()=>Ed(Nd()),isSuiteBusy:e=>Ed(wd(e)),isCaseBusy:(e,t)=>Ed(kd(e,t)),getSnapshot:Jk,subscribe:Xk};function wl(e,t){var s;if(e.failed>0){const r=e.results.filter(a=>a.action==="failed");A.error(`${t}: ${e.failed} failed — ${((s=r[0])==null?void 0:s.error)??"Unknown error"}`)}else if(e.created>0||e.synced>0){const r=[];e.created>0&&r.push(`${e.created} created`),e.synced>0&&r.push(`${e.synced} synced`),e.skipped>0&&r.push(`${e.skipped} skipped`),A.success(`Xray: ${r.join(", ")}`)}else e.skipped>0&&A.success(`Xray: ${e.skipped} already up to date`)}function Zk(){return ke({queryKey:["xray","status"],queryFn:()=>Hr.status(),retry:1,staleTime:1e4})}function Ty(e){return ke({queryKey:["xray","status",e],queryFn:()=>Hr.suiteStatus(e),enabled:!!e,retry:1,staleTime:1e4})}function e5(){const e=le();return X({mutationFn:()=>(et.startAll("create"),Hr.createAll()),onSuccess:t=>{et.finishAll(),e.invalidateQueries({queryKey:["xray"]}),wl(t,"Create in Xray")},onError:t=>{et.finishAll(),A.error(`Xray create failed: ${t.message}`)}})}function Oy(){const e=le();return X({mutationFn:t=>(et.startSuite(t,"create"),Hr.createSuite(t)),onSuccess:(t,s)=>{et.finishSuite(s),e.invalidateQueries({queryKey:["xray"]}),wl(t,"Create Suite")},onError:(t,s)=>{et.finishSuite(s),A.error(`Xray create failed: ${t.message}`)}})}function Ay(){const e=le();return X({mutationFn:({suiteId:t,caseId:s})=>(et.startCase(t,s,"create"),Hr.createCase(t,s)),onSuccess:(t,{suiteId:s,caseId:r})=>{et.finishCase(s,r),e.invalidateQueries({queryKey:["xray"]}),wl(t,"Create Case")},onError:(t,{suiteId:s,caseId:r})=>{et.finishCase(s,r),A.error(`Xray create failed: ${t.message}`)}})}function t5(){const e=le();return X({mutationFn:t=>(et.startSuite(t,"sync"),Hr.syncSuite(t)),onSuccess:(t,s)=>{et.finishSuite(s),e.invalidateQueries({queryKey:["xray"]}),wl(t,"Sync Suite")},onError:(t,s)=>{et.finishSuite(s),A.error(`Xray sync failed: ${t.message}`)}})}function Dy(){const e=le();return X({mutationFn:({suiteId:t,caseId:s})=>(et.startCase(t,s,"sync"),Hr.syncCase(t,s)),onSuccess:(t,{suiteId:s,caseId:r})=>{et.finishCase(s,r),e.invalidateQueries({queryKey:["xray"]}),wl(t,"Sync Case")},onError:(t,{suiteId:s,caseId:r})=>{et.finishCase(s,r),A.error(`Xray sync failed: ${t.message}`)}})}function Iy({code:e,maxLines:t,className:s}){const[r,a]=m.useState(!1),i=async()=>{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),1500)},l=!e.trim();return n.jsxs("div",{className:S("relative rounded-xl bg-[#0d1117] text-slate-300 ring-1 ring-white/5 overflow-hidden",s),children:[!l&&n.jsx("button",{type:"button",onClick:()=>void i(),className:S("absolute top-2.5 right-2.5 p-1.5 rounded-md transition-all duration-150",r?"bg-emerald-500/20 text-emerald-400":"text-slate-500 hover:text-slate-300 hover:bg-white/10"),title:"Copy code",children:r?n.jsx(_e,{size:13}):n.jsx(hm,{size:13})}),n.jsx("pre",{className:S("p-4 text-xs font-mono leading-relaxed overflow-x-auto",t&&`line-clamp-${t}`),style:t?{maxHeight:`${t*1.5}rem`,overflow:"auto"}:void 0,children:n.jsx("code",{children:l?"// No code generated yet":e})})]})}const n5={"not-created":{bg:"bg-surface-inset",text:"text-content-tertiary",dot:"bg-content-tertiary",border:"border-border",label:"Not Created"},created:{bg:"bg-emerald-50",text:"text-emerald-700",dot:"bg-emerald-500",border:"border-emerald-200/60",label:"Created"},synced:{bg:"bg-emerald-50/60",text:"text-emerald-600",dot:"bg-emerald-400",border:"border-emerald-200/60",label:"Synced"},"update-pending":{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500",border:"border-amber-200/60",label:"Update Pending"}};function Nm({status:e,xrayKey:t}){const s=n5[e];return n.jsxs("span",{className:S("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-[10px] font-semibold whitespace-nowrap border tracking-wide",s.bg,s.text,s.border),children:[n.jsx("span",{className:S("w-1.5 h-1.5 rounded-full flex-shrink-0",s.dot)}),s.label,t&&n.jsxs("span",{className:"text-[9px] opacity-60 truncate max-w-[80px]",title:t,children:["(",t,")"]})]})}const s5={"not-created":{icon:ym,label:"Push to Xray",title:"Create in Xray",btnClass:"bg-gradient-to-b from-emerald-500 to-emerald-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-emerald-600",iconHover:"hover:bg-emerald-50"},"update-pending":{icon:pm,label:"Sync Xray",title:"Sync changes to Xray",btnClass:"bg-gradient-to-b from-amber-500 to-amber-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-amber-500",iconHover:"hover:bg-amber-50"},created:{icon:Ue,label:"Synced with Xray",title:"Up to date -- click to re-sync",btnClass:"bg-gradient-to-b from-emerald-500 to-emerald-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-emerald-500",iconHover:"hover:bg-emerald-50"},synced:{icon:Ue,label:"Synced with Xray",title:"Up to date -- click to re-sync",btnClass:"bg-gradient-to-b from-emerald-500 to-emerald-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-emerald-500",iconHover:"hover:bg-emerald-50"}};function il({status:e,onClick:t,busy:s=!1,variant:r="full",label:a}){const i=s5[e],l=i.icon,o=a??i.label;return r==="icon"?n.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),t()},title:s?"Processing...":i.title,className:S("p-1.5 rounded-lg transition-all duration-150",s?"cursor-wait opacity-50":S(i.iconClass,i.iconHover)),children:s?n.jsx(ce,{size:14,className:"animate-spin text-accent"}):n.jsx(l,{size:14})}):n.jsxs("button",{type:"button",onClick:()=>t(),title:s?"Processing...":i.title,className:S("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-150",s?"bg-surface-inset text-content-tertiary cursor-wait":i.btnClass),children:[s?n.jsx(ce,{size:13,className:"animate-spin"}):n.jsx(l,{size:13}),s?"Processing...":o]})}function r5(e){return ke({queryKey:["hooks",e],queryFn:()=>Br.get(e),enabled:!!e})}function a5(e){const t=le();return X({mutationFn:({hookType:s,instruction:r,order:a})=>Br.addStep(e,s,{instruction:r,order:a}),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>A.error(s.message)})}function i5(e){const t=le();return X({mutationFn:({hookType:s,stepId:r,instruction:a,timeout:i})=>Br.updateStep(e,s,r,{instruction:a,timeout:i}),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>A.error(s.message)})}function l5(e){const t=le();return X({mutationFn:({hookType:s,stepId:r})=>Br.deleteStep(e,s,r),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>A.error(s.message)})}function o5(e){const t=le();return X({mutationFn:({hookType:s,stepIds:r})=>Br.reorderSteps(e,s,r),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>A.error(s.message)})}function c5(e){const t=le();return X({mutationFn:({hookType:s,stepId:r})=>Br.generateStep(e,s,r),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]}),A.success("Hook step code generated")},onError:s=>A.error(s.message)})}function d5(e){const t=le();return X({mutationFn:s=>Br.generateAll(e,s),onSuccess:s=>{t.invalidateQueries({queryKey:["hooks",e]}),A.success(`Generated code for ${s.generated} hook step(s)`)},onError:s=>A.error(s.message)})}const u5=[{type:"before_all",label:"Before All",desc:"Runs once before all test cases in the suite",icon:n.jsx(k2,{size:16}),color:"text-emerald-600"},{type:"before_each",label:"Before Each",desc:"Runs before every test case",icon:n.jsx(Ec,{size:16}),color:"text-blue-600"},{type:"after_each",label:"After Each",desc:"Runs after every test case",icon:n.jsx($2,{size:16}),color:"text-amber-600"},{type:"after_all",label:"After All",desc:"Runs once after all test cases in the suite",icon:n.jsx(S2,{size:16}),color:"text-red-500"}];function x5({suiteId:e,open:t,onClose:s}){const{data:r,isLoading:a}=r5(e);return t?n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[n.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:s}),n.jsxs("div",{className:"relative w-full max-w-3xl max-h-[85vh] bg-surface rounded-xl shadow-2xl flex flex-col overflow-hidden mx-4",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border bg-gradient-to-r from-slate-50 to-white",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Suite Hooks"}),n.jsx("p",{className:"text-xs text-content-tertiary mt-0.5",children:"Lifecycle hooks run setup/teardown around your test cases (Playwright hooks)"})]}),n.jsx("button",{onClick:s,className:"p-1.5 rounded-lg hover:bg-surface-inset transition-colors text-content-tertiary hover:text-content-secondary",children:n.jsx(Se,{size:18})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-4",children:a?n.jsx("div",{className:"flex items-center justify-center py-16",children:n.jsx(ce,{size:24,className:"animate-spin text-accent"})}):u5.map(i=>n.jsx(m5,{suiteId:e,hookType:i.type,label:i.label,description:i.desc,icon:i.icon,color:i.color,steps:(r==null?void 0:r[i.type])??[]},i.type))})]})]}):null}function m5({suiteId:e,hookType:t,label:s,description:r,icon:a,color:i,steps:l}){const[o,c]=m.useState(l.length>0),[d,x]=m.useState(""),[f,g]=m.useState(""),[b,y]=m.useState(null),[v,N]=m.useState(""),[h,u]=m.useState(new Set),[p,j]=m.useState(null),[w,z]=m.useState(null),C=a5(e),P=l5(e),{modalProps:_,confirmDelete:I}=Mn(),Q=o5(e),J=i5(e),O=c5(e),E=d5(e),L=()=>{d.trim()&&(C.mutate({hookType:t,instruction:d.trim()}),x(""))},Z=$=>{g($),O.mutate({hookType:t,stepId:$},{onSettled:()=>g("")})},ie=()=>{E.mutate(t)},R=$=>{if(!p||p===$){j(null),z(null);return}const se=l.map(de=>de.id),H=se.indexOf(p),fe=se.indexOf($);H<0||fe<0||(se.splice(H,1),se.splice(fe,0,p),Q.mutate({hookType:t,stepIds:se}),j(null),z(null))},W=$=>{y($.id),N($.instruction)},M=$=>{var se;v.trim()&&v!==((se=l.find(H=>H.id===$))==null?void 0:se.instruction)&&J.mutate({hookType:t,stepId:$,instruction:v.trim()}),y(null)},G=l.filter($=>{var se;return!((se=$.generatedCode)!=null&&se.trim())}).length;return n.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(!o),className:"w-full flex items-center gap-3 px-4 py-3 bg-surface-inset hover:bg-surface-inset transition-colors text-left",children:[o?n.jsx(Mt,{size:14,className:"text-content-tertiary"}):n.jsx(tn,{size:14,className:"text-content-tertiary"}),n.jsx("span",{className:S("flex-shrink-0",i),children:a}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("span",{className:"text-sm font-semibold text-content-secondary",children:s}),n.jsx("span",{className:"text-[10px] text-content-tertiary ml-2",children:r})]}),n.jsxs("span",{className:S("text-[10px] font-semibold px-2 py-0.5 rounded-full",l.length>0?"bg-accent/10 text-accent":"bg-slate-200 text-content-tertiary"),children:[l.length," step",l.length!==1?"s":""]})]}),o&&n.jsxs("div",{className:"border-t border-border bg-surface",children:[l.length===0?n.jsx("div",{className:"px-4 py-6 text-center",children:n.jsx("p",{className:"text-xs text-content-tertiary",children:"No steps yet — add one below"})}):n.jsx("div",{className:"divide-y divide-slate-100",children:l.map(($,se)=>n.jsxs("div",{draggable:!0,onDragStart:()=>j($.id),onDragOver:H=>{H.preventDefault(),z($.id)},onDragLeave:()=>z(null),onDrop:()=>R($.id),onDragEnd:()=>{j(null),z(null)},className:S("flex items-start gap-2 px-4 py-2.5 group transition-colors",w===$.id&&"bg-accent/5 border-l-2 border-accent",p===$.id&&"opacity-40"),children:[n.jsx("div",{className:"pt-0.5 cursor-grab text-content-tertiary opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(Sc,{size:12})}),n.jsx("span",{className:"text-[10px] font-bold text-content-tertiary pt-0.5 w-4 flex-shrink-0",children:se+1}),n.jsxs("div",{className:"flex-1 min-w-0",children:[b===$.id?n.jsx("input",{autoFocus:!0,className:"w-full text-xs border border-accent rounded px-2 py-1 focus:outline-none focus:ring-1 focus:ring-accent",value:v,onChange:H=>N(H.target.value),onBlur:()=>M($.id),onKeyDown:H=>{H.key==="Enter"&&M($.id),H.key==="Escape"&&y(null)}}):n.jsxs("p",{className:"text-xs text-content-secondary cursor-pointer hover:text-accent transition-colors flex items-center gap-1.5",onClick:()=>W($),title:"Click to edit",children:[$.instruction,$.generatedCode&&!h.has($.id)&&n.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-green-400 flex-shrink-0",title:"Code generated"})]}),$.generatedCode&&h.has($.id)&&n.jsx("div",{className:"mt-1",children:n.jsx(Iy,{code:$.generatedCode,maxLines:6})})]}),n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[$.generatedCode&&n.jsx("button",{title:h.has($.id)?"Hide code":"Show code",onClick:()=>u(H=>{const fe=new Set(H);return fe.has($.id)?fe.delete($.id):fe.add($.id),fe}),className:S("p-1 rounded transition-colors",h.has($.id)?"text-content-secondary bg-slate-100":"text-content-tertiary hover:bg-surface-inset"),children:n.jsx(Bg,{size:12})}),n.jsx("button",{title:"Generate code",onClick:()=>Z($.id),disabled:f===$.id,className:"p-1 rounded hover:bg-purple-50 text-purple-500 transition-colors",children:f===$.id?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Dr,{size:12})}),n.jsx("button",{title:"Delete step",onClick:()=>I("Delete this hook step? This cannot be undone.",()=>P.mutate({hookType:t,stepId:$.id})),className:"p-1 rounded hover:bg-red-50 text-red-400 transition-colors",children:n.jsx(gn,{size:12})})]})]},$.id))}),n.jsxs("div",{className:"px-4 py-3 border-t border-slate-100 bg-surface-inset/50 flex items-center gap-2",children:[n.jsx("input",{className:"flex-1 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent placeholder:text-content-tertiary",value:d,onChange:$=>x($.target.value),onKeyDown:$=>{$.key==="Enter"&&L()},placeholder:"Add a step (e.g. Navigate to login page)"}),n.jsxs("button",{type:"button",onClick:L,disabled:!d.trim()||C.isPending,className:S("inline-flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors",d.trim()?"bg-accent text-white hover:bg-accent/90":"bg-slate-200 text-content-tertiary cursor-not-allowed"),children:[C.isPending?n.jsx(ce,{size:11,className:"animate-spin"}):n.jsx(Pn,{size:11}),"Add"]}),l.length>0&&G>0&&n.jsxs("button",{type:"button",onClick:ie,disabled:E.isPending,className:"inline-flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-xs font-medium bg-purple-600 text-white hover:bg-purple-700 transition-colors",children:[E.isPending?n.jsx(ce,{size:11,className:"animate-spin"}):n.jsx(Dr,{size:11}),"Generate All (",G,")"]})]})]}),n.jsx(Rn,{..._})]})}const h5=[{token:"{{FAKE_FIRST_NAME}}",label:"First Name",example:"Alice"},{token:"{{FAKE_LAST_NAME}}",label:"Last Name",example:"Smith"},{token:"{{FAKE_AGE}}",label:"Age (18–80)",example:"34"},{token:"{{FAKE_EMAIL}}",label:"Email Address",example:"alice.smith123@example.com"},{token:"{{FAKE_PHONE}}",label:"Phone Number",example:"415-782-3901"},{token:"{{FAKE_PASSWORD}}",label:"Password",example:"Xk9#mP2$qL"}];function f5({onInsert:e}){const[t,s]=m.useState(!1),[r,a]=m.useState("6"),i=m.useRef(null);m.useEffect(()=>{if(!t)return;const c=d=>{i.current&&!i.current.contains(d.target)&&s(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[t]);const l=c=>{e(c),s(!1)},o=()=>{const c=Math.max(1,Math.min(20,parseInt(r,10)||6));l(`{{FAKE_NUMBER_${c}}}`)};return n.jsxs("div",{ref:i,className:"relative flex-shrink-0",children:[n.jsxs("button",{type:"button",onClick:()=>s(c=>!c),title:"Insert dynamic data token",className:S("inline-flex items-center justify-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-medium border transition-all duration-150 focus:outline-none",t?"bg-violet-600 text-white border-violet-700 ring-2 ring-violet-400 shadow-md":"bg-gradient-to-b from-violet-500 to-violet-600 text-white border-violet-700 shadow-sm hover:brightness-110 hover:shadow-md"),children:[n.jsx(Ot,{size:12}),n.jsx("span",{className:"hidden sm:inline",children:"Fake Data"}),n.jsx(Mt,{size:10,className:S("transition-transform",t&&"rotate-180")})]}),t&&n.jsxs("div",{className:"absolute top-full left-0 mt-1.5 z-50 w-72 rounded-xl border border-border bg-surface shadow-lg shadow-black/8 overflow-hidden animate-fade-in",children:[n.jsxs("div",{className:"px-3 py-2 bg-gradient-to-r from-violet-50 to-indigo-50 border-b border-border flex items-center gap-2",children:[n.jsx(Ot,{size:11,className:"text-violet-500"}),n.jsx("span",{className:"text-[10px] font-bold text-violet-700 uppercase tracking-wider",children:"Dynamic Data Tokens"})]}),n.jsxs("div",{className:"p-2",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest px-1 mb-1.5",children:"Person Details"}),n.jsx("div",{className:"space-y-0.5 max-h-[114px] overflow-y-auto",children:h5.map(({token:c,label:d,example:x})=>n.jsxs("button",{type:"button",onClick:()=>l(c),className:"w-full flex items-center justify-between gap-2 px-2 py-1.5 rounded-lg hover:bg-violet-50 transition-colors group text-left",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-[11px] font-medium text-content group-hover:text-violet-700 truncate",children:d}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-mono truncate",children:c})]}),n.jsx("span",{className:"text-[9px] text-content-tertiary bg-surface-inset px-1.5 py-0.5 rounded font-mono flex-shrink-0",children:x})]},c))})]}),n.jsx("div",{className:"border-t border-border mx-2"}),n.jsxs("div",{className:"p-2",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest px-1 mb-1.5 flex items-center gap-1",children:[n.jsx(Zg,{size:9})," Random Number"]}),n.jsxs("div",{className:"flex items-center gap-2 px-1",children:[n.jsxs("div",{className:"flex items-center gap-1.5 flex-1 bg-surface-inset rounded-lg px-2 py-1.5 border border-border",children:[n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"Digits:"}),n.jsx("input",{type:"number",min:1,max:20,value:r,onChange:c=>a(c.target.value),onKeyDown:c=>c.key==="Enter"&&o(),className:"w-10 text-[11px] bg-transparent outline-none text-content font-mono tabular-nums"})]}),n.jsx("button",{type:"button",onClick:o,className:"flex-shrink-0 px-2.5 py-1.5 rounded-lg bg-violet-600 hover:bg-violet-700 text-white text-[10px] font-semibold transition-colors",children:"Insert"})]}),n.jsx("p",{className:"text-[9px] text-content-tertiary px-1 mt-1.5 font-mono",children:`→ {{FAKE_NUMBER_${Math.max(1,parseInt(r,10)||6)}}}`})]}),n.jsx("div",{className:"px-3 py-1.5 bg-surface-inset/60 border-t border-border",children:n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Tokens resolve to fresh random values on every test run."})})]})]})}function p5({selectedIds:e,suiteId:t,suites:s,onClear:r,onDeleted:a,onMoved:i}){const l=le(),{modalProps:o,confirmDelete:c}=Mn(),[d,x]=m.useState(""),f=X({mutationFn:()=>Us.bulkDelete(t,Array.from(e)),onSuccess:v=>{A.success(`Deleted ${v.deleted} case${v.deleted!==1?"s":""}`),l.invalidateQueries({queryKey:["cases",t]}),a(),r()},onError:v=>A.error(v.message)}),g=X({mutationFn:v=>Us.bulkMove(t,Array.from(e),v),onSuccess:v=>{A.success(`Moved ${v.moved} case${v.moved!==1?"s":""}`),l.invalidateQueries({queryKey:["cases",t]}),i(),r(),x("")},onError:v=>A.error(v.message)}),b=s.filter(v=>v.id!==t),y=e.size;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"fixed bottom-0 left-[248px] right-0 z-30 bg-surface border-t border-border shadow-elevated px-5 py-3 flex items-center gap-3",children:[n.jsxs("span",{className:"text-sm font-semibold text-content flex-shrink-0",children:[y," case",y!==1?"s":""," selected"]}),n.jsx("button",{type:"button",onClick:()=>A("Coming soon",{icon:"🔜"}),className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border border-border text-content-secondary hover:bg-surface-inset transition-colors",children:"Run Selected"}),n.jsxs("button",{type:"button",onClick:()=>c(`Delete ${y} selected case${y!==1?"s":""}? This cannot be undone.`,()=>f.mutate()),disabled:f.isPending,className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border border-red-200 text-red-600 bg-red-50 hover:bg-red-100 transition-colors disabled:opacity-50",children:[n.jsx(gn,{size:12})," Delete Selected"]}),b.length>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(L2,{size:13,className:"text-content-tertiary flex-shrink-0"}),n.jsxs("select",{className:"text-xs border border-border rounded-lg px-2 py-1.5 bg-surface text-content-secondary focus:outline-none focus:ring-1 focus:ring-accent/30",value:d,onChange:v=>x(v.target.value),children:[n.jsx("option",{value:"",children:"Move to suite…"}),b.map(v=>n.jsx("option",{value:v.id,children:v.name},v.id))]}),d&&n.jsx("button",{type:"button",onClick:()=>g.mutate(d),disabled:g.isPending,className:"text-xs px-3 py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:"Move"})]}),n.jsx("div",{className:"flex-1"}),n.jsx("button",{type:"button",onClick:r,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx(Rn,{...o})]})}function g5({passRate:e,runs:t,flaky:s}){if(!s||t<3||e===1)return null;const r=Math.round(e*100);return n.jsx("span",{title:`Flaky: ${r}% pass rate over ${t} runs`,className:"inline-flex items-center gap-0.5 text-[8px] font-semibold px-1.5 py-0.5 rounded bg-amber-50 text-amber-600 ring-1 ring-amber-200 flex-shrink-0",children:"~flaky"})}function y5({open:e,onClose:t,suiteId:s,caseId:r,onInserted:a}){const i=le(),[l,o]=m.useState(""),[c,d]=m.useState(!1),[x,f]=m.useState(""),[g,b]=m.useState(""),{data:y=[]}=ke({queryKey:["step-library"],queryFn:()=>ar.list()}),v=X({mutationFn:u=>Ur.add(s,r,{instruction:u.instruction,...u.generatedCode?{generatedCode:u.generatedCode,strategy:"cache"}:{}}),onSuccess:()=>{i.invalidateQueries({queryKey:["cases",s,r]}),A.success("Step inserted"),a()},onError:u=>A.error(u.message)}),N=X({mutationFn:()=>ar.create({name:x,instruction:g}),onSuccess:()=>{i.invalidateQueries({queryKey:["step-library"]}),A.success("Step saved to library"),d(!1),f(""),b("")},onError:u=>A.error(u.message)}),h=y.filter(u=>!l||u.name.toLowerCase().includes(l.toLowerCase())||u.instruction.toLowerCase().includes(l.toLowerCase())||u.tags.some(p=>p.toLowerCase().includes(l.toLowerCase())));return e?n.jsxs("div",{className:"fixed right-0 top-0 bottom-0 w-80 bg-surface border-l border-border shadow-xl z-40 flex flex-col",children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(tl,{size:14,className:"text-accent"}),n.jsx("span",{className:"text-sm font-semibold text-content",children:"Step Library"})]}),n.jsx("button",{type:"button",onClick:t,className:"p-1 rounded text-content-tertiary hover:text-content hover:bg-surface-inset",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"px-3 py-2 border-b border-border flex-shrink-0",children:n.jsxs("div",{className:"relative",children:[n.jsx(Ar,{size:12,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary"}),n.jsx("input",{type:"text",placeholder:"Search steps…",value:l,onChange:u=>o(u.target.value),className:"w-full pl-7 pr-3 py-1.5 text-xs border border-border rounded-lg bg-surface-inset focus:outline-none focus:ring-1 focus:ring-accent/30"})]})}),n.jsxs("div",{className:"flex-1 overflow-y-auto py-2 px-2 space-y-1",children:[h.length===0&&n.jsx("p",{className:"text-[11px] text-content-tertiary text-center py-6",children:y.length===0?"No steps in library yet":"No results"}),h.map(u=>n.jsx("div",{className:"border border-border rounded-lg p-2.5 hover:border-accent/30 hover:bg-surface-inset/50 transition-colors",children:n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("p",{className:"text-xs font-semibold text-content truncate",children:u.name}),u.generatedCode?n.jsx("span",{className:"flex-shrink-0 text-[8px] px-1 py-px rounded bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-1 ring-emerald-200 dark:ring-emerald-800",children:"Ready"}):n.jsx("span",{className:"flex-shrink-0 text-[8px] px-1 py-px rounded bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-1 ring-amber-200 dark:ring-amber-800",children:"No code"})]}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5 line-clamp-2",children:u.instruction}),u.tags.length>0&&n.jsx("div",{className:"flex flex-wrap gap-0.5 mt-1",children:u.tags.map(p=>n.jsx("span",{className:"text-[8px] px-1 py-px rounded bg-accent/8 text-accent ring-1 ring-accent/15",children:p},p))})]}),n.jsx("button",{type:"button",onClick:()=>v.mutate({instruction:u.instruction,generatedCode:u.generatedCode}),disabled:v.isPending,className:"flex-shrink-0 text-[10px] px-2 py-1 rounded bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:"Insert"})]})},u.id))]}),n.jsx("div",{className:"border-t border-border p-3 flex-shrink-0",children:c?n.jsxs("div",{className:"space-y-2",children:[n.jsx("input",{type:"text",placeholder:"Step name",value:x,onChange:u=>f(u.target.value),className:"w-full px-2 py-1.5 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30"}),n.jsx("textarea",{placeholder:"Step instruction",value:g,onChange:u=>b(u.target.value),rows:2,className:"w-full px-2 py-1.5 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30 resize-none"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button",onClick:()=>N.mutate(),disabled:!x.trim()||!g.trim()||N.isPending,className:"flex-1 text-xs py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:"Save"}),n.jsx("button",{type:"button",onClick:()=>d(!1),className:"text-xs px-3 py-1.5 rounded-lg border border-border text-content-secondary hover:bg-surface-inset",children:"Cancel"})]})]}):n.jsxs("button",{type:"button",onClick:()=>d(!0),className:"w-full flex items-center justify-center gap-1.5 text-xs py-2 rounded-lg border border-dashed border-border text-content-tertiary hover:text-content hover:border-accent/40 transition-colors",children:[n.jsx(Pn,{size:12})," Save current step to library"]})})]}):null}const ui=new Set,Xr=new Map;let cs=null,xi=null,mi=null;const Zr=new Map,hi=new Map,sx=new Set;function ea(){sx.forEach(e=>e())}const gt={subscribe(e){return sx.add(e),()=>sx.delete(e)},getSnapshot(){return{runningCaseIds:ui,runningSuiteId:cs,caseLastRun:Zr,suiteLastRun:hi}},startCase(e){ui.add(e),ea()},startSuite(e){mi=e,cs=e,ea()},onRunStart(e){mi&&(xi=e,mi=null)},onCaseRunning(e,t){Xr.has(e)||Xr.set(e,t)},onCaseDone(e,t,s){const r=e===xi,a=Zr.get(t),i=r?(a==null?void 0:a.allureRunId)??e:e;Zr.set(t,{status:s,runId:e,allureRunId:i}),ea()},onComplete(e,t){const s=Xr.get(e);s&&(ui.delete(s),Xr.delete(e)),ui.clear(),Xr.clear(),e===xi&&cs?hi.set(cs,{...t,runId:e}):cs&&hi.set(cs,{...t,runId:e}),cs=null,xi=null,mi=null,ea()},seedFromHistory(e){for(const t of e)for(const s of t.suites){hi.has(s.suiteId)||hi.set(s.suiteId,{passed:t.passed,failed:t.failed,skipped:t.skipped,runId:t.runId});const a=t.suites.reduce((i,l)=>i+l.cases.length,0)===1;for(const i of s.cases){const l=Zr.get(i.caseId);l?a&&!l.allureRunId&&Zr.set(i.caseId,{...l,allureRunId:t.runId}):Zr.set(i.caseId,{status:i.status,runId:t.runId,allureRunId:t.runId})}}ea()},clear(){ui.clear(),Xr.clear(),cs=null,xi=null,mi=null,ea()}};function Tc(){const[e,t]=m.useState(()=>gt.getSnapshot());return m.useEffect(()=>gt.subscribe(()=>t(gt.getSnapshot())),[]),e}function wm(){const[e,t]=m.useState(()=>et.getSnapshot());return m.useEffect(()=>et.subscribe(()=>t(et.getSnapshot())),[]),e}const Ly=["critical","high","medium","low"],rx={critical:"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 ring-red-500/20 dark:ring-red-500/30",high:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 ring-orange-500/20 dark:ring-orange-500/30",medium:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-500/20 dark:ring-blue-500/30",low:"bg-surface-inset text-content-secondary ring-border"};function ll({tags:e,editable:t=!1,onAdd:s,onRemove:r}){const[a,i]=m.useState(""),l=()=>{const o=a.trim().toLowerCase().replace(/\s+/g,"-");if(!o||e.includes(o)){i("");return}s==null||s(o),i("")};return n.jsxs("div",{className:"flex flex-wrap gap-0.5 items-center",children:[e.map(o=>n.jsxs("span",{className:"inline-flex items-center gap-px px-1.5 py-px rounded bg-accent/8 text-accent text-[9px] font-medium ring-1 ring-accent/15 leading-tight",children:[o,t&&n.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(o),children:n.jsx(Se,{size:8,className:"hover:text-red-500"})})]},o)),t&&n.jsx("input",{className:"text-[9px] border border-dashed border-border rounded bg-transparent outline-none w-14 px-1.5 py-px placeholder-content-tertiary focus:border-accent focus:ring-1 focus:ring-accent/20 transition-colors",placeholder:"+ tag",value:a,onChange:o=>i(o.target.value),onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),l())},onBlur:l}),!t&&e.length===0&&n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"—"})]})}function Pd(){const e=Vs(),t=zn(),{suiteId:s="",caseId:r=""}=cj(),a=r?"case-editor":s?"suite-detail":"suites",[i,l]=m.useState(""),[o,c]=m.useState("ui"),[d,x]=m.useState(""),{modalProps:f,confirmDelete:g}=Mn(),[b,y]=m.useState(""),[v,N]=m.useState(""),[h,u]=m.useState(""),{data:p=[],isLoading:j}=zy();m.useEffect(()=>{var G;const M=(G=e.state)==null?void 0:G.openSuiteId;M&&p.length>0&&p.find(se=>se.id===M)&&t(`/tests/${M}`,{replace:!0})},[e.state,p]);const w=m.useMemo(()=>{const M=new Set;return p.forEach(G=>(G.tags??[]).forEach($=>M.add($))),Array.from(M).sort()},[p]),z=m.useMemo(()=>p.filter(M=>{const G=!b||M.name.toLowerCase().includes(b.toLowerCase())||(M.description??"").toLowerCase().includes(b.toLowerCase()),$=!v||(M.tags??[]).includes(v),se=M.type==="performance"?"audit":M.type??"ui";return G&&$&&(!h||se===h)}),[p,b,v,h]),C=p.find(M=>M.id===s),P=_k(),_=$k(),{data:I=[]}=Zk(),Q=e5(),J=Oy(),O=wm(),E=X({mutationFn:M=>sl.start({test:M}),onError:M=>{gt.clear(),A.error(M.message)}}),L=X({mutationFn:M=>sl.start({suite:M}),onError:M=>{gt.clear(),A.error(M.message)}}),Z=M=>{gt.startCase(M),E.mutate(M),t("/run")},ie=M=>{gt.startSuite(M),L.mutate(M),t("/run")},R=()=>{i.trim()&&(P.mutate({name:i,type:o}),l(""))};if(j)return n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(ce,{size:20,className:"animate-spin text-accent"})});let W=null;if(a==="suites"){const M=p.filter(H=>(H.type??"ui")==="ui").length,G=p.filter(H=>(H.type??"ui")==="api").length,$=p.filter(H=>H.type==="audit"||H.type==="performance").length,se=p.reduce((H,fe)=>H+(fe.caseCount??0),0);W=n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-violet-600 flex items-center justify-center shadow-sm shadow-indigo-500/20",children:n.jsx(nl,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Test Suites"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Manage and organize your test automation"})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center gap-1.5",children:[{label:"Total",val:p.length,color:"bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400 ring-indigo-200 dark:ring-indigo-800"},{label:"UI",val:M,color:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"},{label:"API",val:G,color:"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800"},...$>0?[{label:"Audit",val:$,color:"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"}]:[],{label:"Cases",val:se,color:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800"}].map(H=>n.jsxs("span",{className:S("inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1",H.color),children:[H.val," ",n.jsx("span",{className:"opacity-60 font-normal",children:H.label})]},H.label))}),n.jsx(il,{status:"not-created",variant:"full",label:"Sync All",onClick:()=>Q.mutate(),busy:O.allOp==="create"||O.allOp==="sync"})]})]}),n.jsxs("div",{className:"px-4 py-2 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsx("div",{className:"flex gap-0.5 flex-shrink-0 bg-surface-inset rounded-lg p-0.5",children:[["","All",p.length],["ui","UI",M],["api","API",G],...$>0?[["audit","⚡ Audit",$]]:[]].map(([H,fe,de])=>n.jsxs("button",{type:"button",onClick:()=>u(H),className:S("px-2 py-1 rounded-md text-[10px] font-semibold transition-all",h===H?"bg-surface text-accent shadow-sm ring-1 ring-border":"text-content-tertiary hover:text-content-secondary"),children:[fe," ",n.jsx("span",{className:"opacity-60 ml-0.5",children:de})]},H))}),n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsx(Ar,{size:11,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40 bg-surface placeholder-content-tertiary",placeholder:"Search suites…",value:b,onChange:H=>y(H.target.value)})]}),w.length>0&&n.jsxs("select",{value:v,onChange:H=>N(H.target.value),className:"text-xs border border-border rounded-lg px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent bg-surface min-w-[90px]",children:[n.jsx("option",{value:"",children:"All Tags"}),w.map(H=>n.jsx("option",{value:H,children:H},H))]}),(b||v||h)&&n.jsx("button",{type:"button",onClick:()=>{y(""),N(""),u("")},className:"p-1 rounded-lg text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:12})}),n.jsx("div",{className:"w-px h-4 bg-border"}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[n.jsx("div",{className:"flex gap-0 bg-surface-inset rounded-lg p-0.5 ring-1 ring-border",children:["ui","api","audit"].map(H=>n.jsx("button",{type:"button",onClick:()=>c(H),className:S("px-2 py-1 rounded-md text-[9px] font-bold uppercase transition-all",o===H?H==="api"?"bg-violet-500 text-white shadow-sm":H==="audit"?"bg-amber-500 text-white shadow-sm":"bg-blue-500 text-white shadow-sm":"text-content-tertiary hover:text-content-secondary"),children:H==="audit"?"⚡":H},H))}),n.jsx("input",{className:"w-36 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"New suite name…",value:i,onChange:H=>l(H.target.value),onKeyDown:H=>H.key==="Enter"&&R()}),n.jsxs(re,{size:"sm",onClick:R,disabled:P.isPending,children:[n.jsx(Pn,{size:11})," Add"]})]})]})]}),p.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(jl,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No suites yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Create your first test suite using the toolbar above"})]}):z.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-10 gap-2",children:[n.jsx(Jg,{size:16,className:"text-content-tertiary"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No suites match filters"}),n.jsx("button",{onClick:()=>{y(""),N(""),u("")},className:"text-[10px] text-accent hover:underline",children:"Clear filters"})]}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2.5",children:z.map(H=>{var fe,de;return n.jsx(b5,{suite:H,xrayStatus:((fe=I.find(me=>me.suiteId===H.id))==null?void 0:fe.status)??"not-created",xrayKey:((de=I.find(me=>me.suiteId===H.id))==null?void 0:de.xrayTestSetId)??null,onOpen:()=>t(`/tests/${H.id}`),onRun:()=>ie(H.id),onDelete:()=>g(`Delete suite "${H.name}"? All cases and steps will be lost.`,()=>_.mutate(H.id)),onXrayAction:()=>J.mutate(H.id),isXrayBusy:O.busySuites.get(H.id)==="create"||O.busySuites.get(H.id)==="sync"||O.allOp==="create"||O.allOp==="sync"},H.id)})})]})})})}return a==="suite-detail"&&s&&(W=n.jsx(v5,{suiteId:s,suite:C,suites:p,newCaseName:d,onNewCaseNameChange:x,onOpenCase:M=>t(`/tests/${s}/cases/${M}`),onRunCase:M=>Z(M),onRunSuite:()=>ie(s),onBack:()=>t("/tests")})),a==="case-editor"&&s&&r&&(W=n.jsx(j5,{suiteId:s,caseId:r,suiteName:(C==null?void 0:C.name)??"",suiteType:(C==null?void 0:C.type)??"ui",onBack:()=>t(`/tests/${s}`),onRunCase:()=>Z(r)})),n.jsxs("div",{className:"flex-1 overflow-hidden relative flex flex-col",children:[W,n.jsx(Rn,{...f})]})}function b5({suite:e,onOpen:t,onRun:s,onDelete:r,xrayStatus:a="not-created",xrayKey:i=null,onXrayAction:l,isXrayBusy:o=!1}){const{runningCaseIds:c,runningSuiteId:d,suiteLastRun:x}=Tc(),f=d===e.id,g=x.get(e.id),[b,y]=m.useState(!1),[v,N]=m.useState(e.name),[h,u]=m.useState(e.description??""),[p,j]=m.useState(e.tags??[]),[w,z]=m.useState(e.timeout?String(e.timeout):""),C=Ry(),P=m.useRef(null),_=(e.type??"ui")==="api",I=e.type==="audit"||e.type==="performance";m.useEffect(()=>{var L;b&&((L=P.current)==null||L.focus())},[b]);const Q=L=>{L.stopPropagation(),y(!0)},J=L=>{L==null||L.stopPropagation(),N(e.name),u(e.description??""),j(e.tags??[]),z(e.timeout?String(e.timeout):""),y(!1)},O=L=>{L==null||L.stopPropagation();const Z=w?parseInt(w,10):void 0;C.mutate({id:e.id,data:{name:v.trim()||e.name,description:h,tags:p,timeout:Z}},{onSuccess:()=>y(!1)})},E=L=>{L.key==="Enter"&&(L.preventDefault(),O()),L.key==="Escape"&&J()};return b?n.jsxs("div",{className:"rounded-xl border-2 border-accent/30 bg-accent/[0.02] p-3.5 space-y-2.5",onClick:L=>L.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:S("w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0",_?"bg-violet-100":"bg-blue-100"),children:n.jsx(fn,{size:11,className:_?"text-violet-600":"text-blue-600"})}),n.jsx("input",{ref:P,className:"flex-1 text-xs font-semibold border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",value:v,onChange:L=>N(L.target.value),onKeyDown:E,placeholder:"Suite name"})]}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:h,onChange:L=>u(L.target.value),onKeyDown:E,placeholder:"Description (optional)"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"number",min:1e3,step:1e3,className:"w-32 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:w,onChange:L=>z(L.target.value),onKeyDown:E,placeholder:"Timeout (ms)"}),n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"ms timeout"}),n.jsx("div",{className:"ml-auto",children:n.jsx(ll,{tags:p,editable:!0,onAdd:L=>j(Z=>[...Z,L]),onRemove:L=>j(Z=>Z.filter(ie=>ie!==L))})})]}),n.jsxs("div",{className:"flex gap-1.5 justify-end pt-0.5",children:[n.jsxs(re,{size:"sm",variant:"secondary",onClick:J,children:[n.jsx(Se,{size:10})," Cancel"]}),n.jsxs(re,{size:"sm",onClick:O,loading:C.isPending,children:[n.jsx(_e,{size:10})," Save"]})]})]}):n.jsxs("div",{className:"group rounded-xl border border-border bg-surface hover:border-accent/30 hover:shadow-sm hover:shadow-accent/5 cursor-pointer transition-all",onClick:t,children:[n.jsx("div",{className:"px-3.5 pt-3 pb-2",children:n.jsxs("div",{className:"flex items-start gap-2.5",children:[n.jsx("div",{className:S("w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 mt-0.5",_?"bg-gradient-to-br from-violet-100 to-purple-100 dark:from-violet-900/40 dark:to-purple-900/40":I?"bg-gradient-to-br from-amber-100 to-orange-100 dark:from-amber-900/40 dark:to-orange-900/40":"bg-gradient-to-br from-blue-100 to-indigo-100 dark:from-blue-900/40 dark:to-indigo-900/40"),children:n.jsx(fn,{size:14,className:_?"text-violet-600 dark:text-violet-400":I?"text-amber-600 dark:text-amber-400":"text-blue-600 dark:text-blue-400"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("p",{className:"text-xs font-bold text-content truncate",children:e.name}),I?n.jsxs("span",{className:"text-[7px] px-1 py-px rounded font-bold flex items-center gap-0.5 flex-shrink-0 ring-1 bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800",children:[n.jsx(Be,{size:7})," Audit"]}):n.jsx("span",{className:S("text-[7px] px-1 py-px rounded font-bold uppercase flex-shrink-0 ring-1",_?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"),children:_?"API":"UI"})]}),e.description&&n.jsx("p",{className:"text-[10px] text-content-tertiary truncate mt-0.5 leading-tight",children:e.description})]}),n.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",onClick:L=>L.stopPropagation(),children:[n.jsx("button",{type:"button",onClick:Q,title:"Edit",className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",children:n.jsx(_r,{size:11})}),n.jsx("button",{type:"button",onClick:L=>{L.stopPropagation(),r()},title:"Delete",className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(gn,{size:11})})]})]})}),n.jsxs("div",{className:"px-3.5 py-2 border-t border-border/50 bg-surface-inset/30 rounded-b-xl flex items-center gap-2",onClick:L=>L.stopPropagation(),children:[n.jsxs("span",{className:"text-[9px] font-medium text-content-secondary tabular-nums",children:[e.caseCount??0," case",(e.caseCount??0)!==1?"s":""]}),(e.tags??[]).length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"w-px h-3 bg-border"}),n.jsx(ll,{tags:e.tags??[]})]}),n.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[n.jsx(Nm,{status:a,xrayKey:i}),n.jsx(il,{variant:"icon",status:a,onClick:()=>l==null?void 0:l(),busy:o})]}),n.jsx("div",{className:"w-px h-3 bg-border"}),f?n.jsxs("span",{className:"flex items-center gap-1 text-[9px] text-teal-600 dark:text-teal-400 font-medium",children:[n.jsx(ce,{size:10,className:"animate-spin"})," Running"]}):n.jsxs("button",{type:"button",onClick:L=>{L.stopPropagation(),s()},className:"flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-[9px] font-medium text-teal-600 dark:text-teal-400 hover:bg-teal-50 dark:hover:bg-teal-900/20 transition-colors",title:"Run suite",children:[n.jsx(Tt,{size:10,strokeWidth:2.5})," Run"]}),n.jsx("button",{type:"button",disabled:!g,onClick:L=>{L.stopPropagation(),g&&window.open(`/allure/${g.runId}`,"_blank")},title:g?`Report: ${g.passed}p / ${g.failed}f`:"No report",className:S("p-1 rounded-md transition-colors",g?"text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20":"text-content-tertiary/50 cursor-not-allowed"),children:n.jsx(En,{size:11})}),n.jsx(tn,{size:11,className:"text-content-tertiary/50"})]})]})}function v5({suiteId:e,suite:t,suites:s,newCaseName:r,onNewCaseNameChange:a,onOpenCase:i,onRunCase:l,onRunSuite:o,onBack:c}){const{runningCaseIds:d,runningSuiteId:x,caseLastRun:f}=Tc(),g=x===e,{data:b=[],isLoading:y}=Uk(e),v=Sf(e),N=qk(e),h=Sf(e),[u,p]=m.useState(!1),[j,w]=m.useState(!1),{modalProps:z,confirmDelete:C}=Mn(),[P,_]=m.useState(new Set),I=m.useRef(-1),{data:Q}=ke({queryKey:["flakiness",e],queryFn:()=>aw.get(e),staleTime:6e4});m.useEffect(()=>{_(new Set),I.current=-1},[e]);const{data:J}=Ty(e),O=Oy(),E=Ay(),L=t5(),Z=Dy(),ie=wm(),R=()=>{((J==null?void 0:J.status)??"not-created")==="not-created"?O.mutate(e):L.mutate(e)},W=q=>{var pe;(((pe=J==null?void 0:J.cases.find(Te=>Te.caseId===q))==null?void 0:pe.status)??"not-created")==="not-created"?E.mutate({suiteId:e,caseId:q}):Z.mutate({suiteId:e,caseId:q})};m.useEffect(()=>{sl.list(20).then(async q=>{const ue=await Promise.all(q.slice(0,10).map(pe=>sl.get(pe.runId).catch(()=>null)));gt.seedFromHistory(ue.filter(pe=>pe!==null).map(pe=>({runId:pe.runId,passed:pe.passed,failed:pe.failed,skipped:pe.skipped,suites:pe.suites.map(Te=>({suiteId:Te.suiteId,cases:Te.cases.map(it=>({caseId:it.caseId,status:it.status}))}))})))}).catch(()=>{})},[e]);const[M,G]=m.useState(""),[$,se]=m.useState(new Set),[H,fe]=m.useState(""),de=$.size===0,me=m.useMemo(()=>{const q=new Set;return b.forEach(ue=>(ue.tags??[]).forEach(pe=>q.add(pe))),Array.from(q).sort()},[b]),Ce=m.useMemo(()=>b.filter(q=>{const ue=!M||q.name.toLowerCase().includes(M.toLowerCase()),pe=$.size===0||(q.tags??[]).some(it=>$.has(it)),Te=!H||q.priority===H;return ue&&pe&&Te}),[b,M,$,H]),Ke=!!(M||$.size>0||H),[nn,At]=m.useState(!1),[Dt,We]=m.useState((t==null?void 0:t.name)??""),[K,It]=m.useState((t==null?void 0:t.description)??""),[at,sn]=m.useState((t==null?void 0:t.tags)??[]),[Qs,Ys]=m.useState(t!=null&&t.timeout?String(t.timeout):""),T=Ry();m.useEffect(()=>{We((t==null?void 0:t.name)??""),It((t==null?void 0:t.description)??""),sn((t==null?void 0:t.tags)??[]),Ys(t!=null&&t.timeout?String(t.timeout):"")},[t==null?void 0:t.id]);const ee=()=>{const q=Qs?parseInt(Qs,10):void 0;T.mutate({id:e,data:{name:Dt.trim()||(t==null?void 0:t.name),description:K,tags:at,timeout:q}},{onSuccess:()=>At(!1)})},be=q=>{q.key==="Enter"&&(q.preventDefault(),ee()),q.key==="Escape"&&At(!1)},Tn=()=>{r.trim()&&(v.mutate({name:r}),a(""))},jt=q=>{h.mutate({name:`${q.name} (copy)`,description:q.description,priority:q.priority,tags:q.tags,steps:(q.steps??[]).map(ue=>({instruction:ue.instruction}))})},On=q=>`TC-${((t==null?void 0:t.name)??"TC").replace(/[^a-zA-Z]/g,"").slice(0,3).toUpperCase()||"TC"}-${String(q+1).padStart(3,"0")}`,rn=((t==null?void 0:t.type)??"ui")==="api",Js=(t==null?void 0:t.type)==="audit"||(t==null?void 0:t.type)==="performance";return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsx("div",{className:"px-4 py-1.5 bg-surface-inset/30 border-b border-border/50",children:n.jsxs("nav",{className:"flex items-center gap-1.5 text-[10px] text-content-tertiary",children:[n.jsxs("button",{onClick:c,className:"hover:text-accent transition-colors flex items-center gap-1",children:[n.jsx(Xg,{size:10})," Suites"]}),n.jsx(tn,{size:9}),n.jsx("span",{className:"text-content-secondary font-semibold",children:t==null?void 0:t.name})]})}),nn?n.jsxs("div",{className:"px-4 py-3.5 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",rn?"bg-gradient-to-br from-violet-500 to-purple-600":"bg-gradient-to-br from-blue-500 to-indigo-600"),children:n.jsx(nl,{size:13,className:"text-white"})}),n.jsx("input",{className:"flex-1 text-sm font-bold border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",value:Dt,onChange:q=>We(q.target.value),onKeyDown:be,placeholder:"Suite name",autoFocus:!0})]}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:K,onChange:q=>It(q.target.value),onKeyDown:be,placeholder:"Description"}),n.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Fr,{size:10,className:"text-content-tertiary"}),n.jsx("input",{type:"number",min:1e3,step:1e3,className:"w-28 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:Qs,onChange:q=>Ys(q.target.value),onKeyDown:be,placeholder:"Timeout ms"})]}),n.jsx("div",{className:"flex-1",children:n.jsx(ll,{tags:at,editable:!0,onAdd:q=>sn(ue=>[...ue,q]),onRemove:q=>sn(ue=>ue.filter(pe=>pe!==q))})}),n.jsxs("div",{className:"flex gap-1.5",children:[n.jsxs(re,{size:"sm",variant:"secondary",onClick:()=>At(!1),children:[n.jsx(Se,{size:10})," Cancel"]}),n.jsxs(re,{size:"sm",onClick:ee,loading:T.isPending,children:[n.jsx(_e,{size:10})," Save"]})]})]})]}):n.jsxs("div",{className:"px-4 py-3 flex items-center gap-3 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[n.jsx("div",{className:S("w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0 shadow-sm",rn?"bg-gradient-to-br from-violet-500 to-purple-600 shadow-violet-500/20":Js?"bg-gradient-to-br from-amber-500 to-orange-600 shadow-amber-500/20":"bg-gradient-to-br from-blue-500 to-indigo-600 shadow-blue-500/20"),children:n.jsx(nl,{size:16,className:"text-white"})}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("h1",{className:"text-sm font-bold text-content truncate",children:t==null?void 0:t.name}),Js?n.jsxs("span",{className:"text-[7px] px-1.5 py-px rounded font-bold flex items-center gap-0.5 ring-1 bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800",children:[n.jsx(Be,{size:7})," Audit"]}):n.jsx("button",{type:"button",onClick:q=>{q.stopPropagation();const ue=rn?"ui":"api";T.mutate({id:e,data:{type:ue}})},title:"Toggle type",className:S("text-[7px] px-1.5 py-px rounded font-bold uppercase ring-1 cursor-pointer transition-colors",rn?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800 hover:bg-violet-100 dark:hover:bg-violet-900/30":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"),children:rn?"API":"UI"}),n.jsx("button",{type:"button",onClick:()=>At(!0),className:"p-0.5 rounded text-content-tertiary hover:text-accent transition-colors",children:n.jsx(_r,{size:10})})]}),K&&n.jsx("p",{className:"text-[10px] text-content-tertiary truncate mt-0.5 leading-tight max-w-md",children:K})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[g?n.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-teal-600 dark:text-teal-400 font-medium px-2 py-1 rounded-lg bg-teal-50 dark:bg-teal-900/20 ring-1 ring-teal-200 dark:ring-teal-800",children:[n.jsx(ce,{size:11,className:"animate-spin"})," Running…"]}):n.jsxs(re,{size:"sm",onClick:o,className:"bg-teal-600 hover:bg-teal-700 text-white border-teal-600",children:[n.jsx(Tt,{size:10})," Run Suite"]}),n.jsxs(re,{size:"sm",onClick:()=>p(!0),className:"bg-indigo-600 hover:bg-indigo-700 text-white border-indigo-600",children:[n.jsx(Ba,{size:10})," Hooks"]}),n.jsx(il,{variant:"full",status:(J==null?void 0:J.status)??"not-created",label:"Sync",onClick:R,busy:ie.busySuites.get(e)==="create"||ie.busySuites.get(e)==="sync"||ie.allOp==="create"||ie.allOp==="sync"})]})]}),me.length>0&&n.jsxs("div",{className:"px-4 py-1.5 border-t border-border/50 flex items-center gap-1.5 flex-wrap",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mr-0.5",children:"Tags"}),n.jsx("button",{type:"button",onClick:()=>se(new Set),className:S("text-[9px] px-2 py-0.5 rounded-md font-medium transition-all",de?"bg-accent text-white shadow-sm shadow-accent/20":"text-content-tertiary hover:text-content-secondary bg-surface-inset hover:bg-surface-inset/80 ring-1 ring-border"),children:"All"}),me.map(q=>{const ue=$.has(q);return n.jsx("button",{type:"button",onClick:()=>{se(pe=>{const Te=new Set(pe);return ue?Te.delete(q):Te.add(q),Te})},className:S("text-[9px] px-2 py-0.5 rounded-md font-medium transition-all",ue||de?"bg-accent/10 text-accent ring-1 ring-accent/30":"text-content-tertiary bg-surface-inset ring-1 ring-border hover:text-content-secondary"),children:q},q)})]}),n.jsxs("div",{className:"px-4 py-2 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1 min-w-[120px]",children:[n.jsx(Ar,{size:11,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"Search tests…",value:M,onChange:q=>G(q.target.value)})]}),n.jsxs("select",{value:H,onChange:q=>fe(q.target.value),className:"text-xs border border-border rounded-lg px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent bg-surface min-w-[90px]",children:[n.jsx("option",{value:"",children:"All Priority"}),Ly.map(q=>n.jsx("option",{value:q,className:"capitalize",children:q.charAt(0).toUpperCase()+q.slice(1)},q))]}),Ke&&n.jsx("button",{type:"button",onClick:()=>{G(""),se(new Set),fe("")},className:"p-1 rounded-lg text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})}),n.jsx("div",{className:"w-px h-4 bg-border"}),n.jsx("input",{className:"w-36 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"New test case…",value:r,onChange:q=>a(q.target.value),onKeyDown:q=>q.key==="Enter"&&Tn()}),n.jsxs(re,{size:"sm",onClick:Tn,disabled:v.isPending,children:[n.jsx(Pn,{size:10})," Add"]}),n.jsx(re,{size:"sm",variant:"secondary",onClick:()=>w(!0),children:"From Template"}),n.jsx("span",{className:"text-[9px] text-content-tertiary ml-1 tabular-nums flex-shrink-0",children:Ke?`${Ce.length}/${b.length}`:`${b.length} test${b.length!==1?"s":""}`})]})]}),y?n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}):b.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(jl,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No test cases yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Add your first test case using the toolbar above"})]}):Ce.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-10 gap-2",children:[n.jsx(Jg,{size:16,className:"text-content-tertiary"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No tests match filters"}),n.jsx("button",{onClick:()=>{G(""),se(new Set),fe("")},className:"text-[10px] text-accent hover:underline",children:"Clear filters"})]}):n.jsxs("div",{className:"space-y-1.5",children:[Ce.length>0&&n.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-1",children:[n.jsx("input",{type:"checkbox",className:"rounded border-border text-accent cursor-pointer",checked:P.size===Ce.length&&Ce.length>0,onChange:q=>{q.target.checked?_(new Set(Ce.map(ue=>ue.id))):_(new Set)}}),n.jsx("span",{className:"text-[9px] text-content-tertiary",children:"Select all"})]}),Ce.map((q,ue)=>{const pe=q.steps.some(ve=>ve.stepType==="api"),Te=f.get(q.id),it=J==null?void 0:J.cases.find(ve=>ve.caseId===q.id),Kr=(it==null?void 0:it.status)??"not-created",kl=ie.busyCases.get(`${e}:${q.id}`)==="create"||ie.busyCases.get(`${e}:${q.id}`)==="sync"||ie.busySuites.get(e)==="create"||ie.busySuites.get(e)==="sync"||ie.allOp==="create"||ie.allOp==="sync",ss=P.has(q.id),rs=Q==null?void 0:Q.cases.find(ve=>ve.caseId===q.id);return n.jsx("div",{className:S("group rounded-xl border bg-surface hover:border-accent/30 hover:shadow-sm hover:shadow-accent/5 cursor-pointer transition-all",ss?"border-accent/40 bg-accent/[0.02]":"border-border"),onClick:()=>i(q.id),children:n.jsxs("div",{className:"px-3.5 py-2.5 flex items-center gap-3",children:[n.jsx("input",{type:"checkbox",className:"rounded border-border text-accent cursor-pointer flex-shrink-0",checked:ss,onClick:ve=>ve.stopPropagation(),onChange:ve=>{ve.stopPropagation(),_(Xs=>{const as=new Set(Xs);return ve.target.checked?as.add(q.id):as.delete(q.id),I.current=ue,as})},onClickCapture:ve=>{if(ve.shiftKey&&I.current>=0){ve.preventDefault();const Xs=Math.min(I.current,ue),as=Math.max(I.current,ue);_(Wr=>{const Zs=new Set(Wr);return Ce.slice(Xs,as+1).forEach(Xa=>Zs.add(Xa.id)),Zs})}I.current=ue}}),n.jsx(Sc,{size:11,className:"text-content-tertiary/40 group-hover:text-content-tertiary cursor-grab flex-shrink-0 transition-colors"}),n.jsx("span",{className:"text-[9px] font-mono text-accent font-semibold bg-accent/5 px-1.5 py-0.5 rounded ring-1 ring-accent/10 flex-shrink-0 tabular-nums",children:On(ue)}),n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[n.jsx("span",{className:"text-xs font-medium text-content truncate",children:q.name}),n.jsx("span",{className:S("text-[7px] px-1 py-px rounded font-bold uppercase flex-shrink-0 ring-1",pe?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":Js?"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"),children:pe?"API":Js?"Audit":"UI"}),rs&&n.jsx(g5,{passRate:rs.passRate,runs:rs.runs,flaky:rs.flaky})]}),n.jsxs("span",{className:"text-[9px] text-content-tertiary tabular-nums flex-shrink-0",children:[q.steps.length," step",q.steps.length!==1?"s":""]}),n.jsx("span",{className:S("text-[8px] px-1.5 py-0.5 rounded capitalize ring-1 flex-shrink-0 font-medium",rx[q.priority]??rx.low),children:q.priority}),(q.tags??[]).length>0&&n.jsx("div",{className:"flex-shrink-0",onClick:ve=>ve.stopPropagation(),children:n.jsx(ll,{tags:q.tags})}),(()=>{if(!Te)return n.jsx("span",{className:"text-[8px] px-1.5 py-0.5 rounded ring-1 ring-border text-content-tertiary/60 flex-shrink-0",children:"Never"});const ve={passed:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800",failed:"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 ring-red-200 dark:ring-red-800",skipped:"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"};return n.jsx("span",{className:S("text-[8px] px-1.5 py-0.5 rounded capitalize ring-1 flex-shrink-0 font-medium",ve[Te.status]??"ring-border text-content-tertiary"),children:Te.status})})(),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",onClick:ve=>ve.stopPropagation(),children:[n.jsx(Nm,{status:Kr,xrayKey:it==null?void 0:it.xrayTestId}),n.jsx(il,{variant:"icon",status:Kr,onClick:()=>W(q.id),busy:kl})]}),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",onClick:ve=>ve.stopPropagation(),children:[d.has(q.id)?n.jsx(ce,{size:11,className:"animate-spin text-teal-600 dark:text-teal-400"}):n.jsx("button",{type:"button",onClick:()=>l(q.id),title:"Run",className:"p-1 rounded-md text-teal-600 dark:text-teal-400 hover:bg-teal-50 dark:hover:bg-teal-900/20 transition-colors",children:n.jsx(Tt,{size:11})}),n.jsx("button",{type:"button",disabled:!Te,onClick:()=>{Te&&window.open(`/allure/${Te.allureRunId}`,"_blank")},title:"Report",className:S("p-1 rounded-md transition-colors",Te?"text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20":"text-content-tertiary/40 cursor-not-allowed"),children:n.jsx(En,{size:11})}),n.jsx("button",{type:"button",onClick:ve=>{ve.stopPropagation(),jt(q)},title:"Duplicate",className:"p-1 rounded-md text-content-tertiary hover:text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-colors",children:n.jsx(hm,{size:11})}),n.jsx("button",{type:"button",onClick:ve=>{ve.stopPropagation(),C(`Delete "${q.name}"?`,()=>N.mutate(q.id))},title:"Delete",className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(gn,{size:10})})]}),n.jsx(tn,{size:11,className:"text-content-tertiary/40 flex-shrink-0"})]})},q.id)})]})]})}),n.jsx(x5,{suiteId:e,open:u,onClose:()=>p(!1)}),n.jsx(Fk,{open:j,onClose:()=>w(!1),suiteId:e,onCreated:()=>{}}),n.jsx(Rn,{...z}),P.size>0&&n.jsx(p5,{selectedIds:P,suiteId:e,suites:s,onClear:()=>_(new Set),onDeleted:()=>_(new Set),onMoved:()=>_(new Set)})]})}function j5({suiteId:e,caseId:t,suiteName:s,suiteType:r,onBack:a,onRunCase:i}){const{runningCaseIds:l,caseLastRun:o}=Tc(),c=l.has(t),d=o.get(t),{data:x,isLoading:f}=Bk(e,t),g=Hk(e),b=Kk(e,t),y=Wk(e,t),v=Gk(e,t),{modalProps:N,confirmDelete:h}=Mn(),u=Vk(e,t),p=Qk(e,t),j=Yk(e,t),{data:w}=Ty(e),z=Ay(),C=Dy(),P=w==null?void 0:w.cases.find(D=>D.caseId===t),_=wm(),I=()=>{((P==null?void 0:P.status)??"not-created")==="not-created"?z.mutate({suiteId:e,caseId:t}):C.mutate({suiteId:e,caseId:t})},[Q,J]=m.useState(""),[O,E]=m.useState(!1),[L,Z]=m.useState(""),[ie,R]=m.useState("medium"),[W,M]=m.useState([]),[G,$]=m.useState(""),[se,H]=m.useState("none"),[fe,de]=m.useState(""),[me,Ce]=m.useState(""),[Ke,nn]=m.useState(!1),[At,Dt]=m.useState(!1),We=m.useRef(null),[K,It]=m.useState(!1),[at,sn]=m.useState(""),[Qs,Ys]=m.useState(""),T=m.useRef(null),[ee,be]=m.useState(null),[Tn,jt]=m.useState(null),[On,rn]=m.useState("steps"),[Js,q]=m.useState(!1),[ue,pe]=m.useState([]),[Te,it]=m.useState([]),[Kr,kl]=m.useState(["performance","accessibility","seo"]),[ss,rs]=m.useState(""),[ve,Xs]=m.useState(""),[as,Wr]=m.useState(!1),[Zs,Xa]=m.useState([]),[Yy,Rm]=m.useState(!1),[Jy,Mm]=m.useState(!1),Oc=m.useRef(null);qr({"recorder:action":D=>{const ae=D;Xa(ne=>[...ne,ae]),setTimeout(()=>{var ne;(ne=Oc.current)==null||ne.scrollTo({top:Oc.current.scrollHeight,behavior:"smooth"})},50)},"recorder:stopped":()=>{Wr(!1)}});const Xy=async()=>{try{Rm(!0),Xa([]),await md.start(),Wr(!0),A.success("Recording started — Shift+Click = assert element, Ctrl+Shift+U = assert URL",{duration:5e3})}catch(D){A.error((D==null?void 0:D.message)||"Failed to start recorder")}finally{Rm(!1)}},Zy=async()=>{try{Mm(!0);const D=await md.stop();if(Wr(!1),D.actions.length>0){for(const ae of D.actions){const ne=iw(ae);await b.mutateAsync({instruction:ae.instruction,generatedCode:ne,strategy:"recorder",...ae.soft?{soft:!0}:{}})}A.success(`Added ${D.actions.length} recorded steps with code`)}else A("No actions were recorded")}catch(D){A.error((D==null?void 0:D.message)||"Failed to stop recorder")}finally{Mm(!1)}};m.useEffect(()=>{md.status().then(D=>{D.recording&&(Wr(!0),Xa(D.actions))}).catch(()=>{})},[]),m.useEffect(()=>{var ae,ne;if(!x)return;J(x.name),Z(x.description??""),R(x.priority??"medium"),M([...x.tags]),$(x.timeout?String(x.timeout):"");const D=x.dataSource;D?(H(D.type??"none"),de(D.path??""),Ce(D.data?JSON.stringify(D.data,null,2):"")):(H("none"),de(""),Ce("")),pe(((ae=x.caseHooks)==null?void 0:ae.before.map(xe=>({id:xe.id,instruction:xe.instruction})))??[]),it(((ne=x.caseHooks)==null?void 0:ne.after.map(xe=>({id:xe.id,instruction:xe.instruction})))??[]),kl(x.lighthouseCategories??["performance","accessibility","seo"]),Dt(!1),It(!1)},[x==null?void 0:x.id]);const lt=()=>{Dt(!0),It(!1)},eb=D=>{D.key==="Enter"&&(D.preventDefault(),Sl())},tb=D=>{const ae=T.current;if(!ae){sn(Ac=>Ac+D);return}const ne=ae.selectionStart??at.length,xe=ae.selectionEnd??at.length,Lt=at.slice(0,ne)+D+at.slice(xe);sn(Lt),setTimeout(()=>{ae.focus(),ae.setSelectionRange(ne+D.length,ne+D.length)},0)},Sl=async()=>{const D=G?parseInt(G,10):void 0;let ae;if(se!=="none")if(ae={type:se},se==="inline")try{ae.data=JSON.parse(me)}catch{}else ae.path=fe;const ne={before:ue.map((xe,Lt)=>({...xe,order:Lt})),after:Te.map((xe,Lt)=>({...xe,order:Lt}))};await g.mutateAsync({caseId:t,data:{name:Q,description:L,priority:ie,tags:W,timeout:D,dataSource:ae,caseHooks:ne,lighthouseCategories:Kr}}),Dt(!1),It(!0)},nb=async()=>{At&&await Sl(),i()},Tm=()=>{at.trim()&&(b.mutate({instruction:at}),sn(""))},sb=async D=>{Ys(D),await p.mutateAsync(D).finally(()=>Ys(""))},Om=x?`TC-${(x.name||"").replace(/[^a-zA-Z]/g,"").slice(0,3).toUpperCase()||"TST"}-001`:"…";if(f||!x)return n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})});const is=[...x.steps].sort((D,ae)=>D.order-ae.order),rb=is.some(D=>D.stepType==="api"),Am=r==="audit"||r==="performance";return n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 bg-surface border-b border-border z-10",children:[n.jsxs("div",{className:"flex items-center gap-1.5 px-5 pt-2 pb-1 text-[10px] text-content-tertiary",children:[n.jsxs("button",{onClick:()=>window.location.assign("/tests"),className:"hover:text-accent flex items-center gap-1",children:[n.jsx(Xg,{size:10})," Suites"]}),n.jsx(tn,{size:9}),n.jsx("button",{onClick:a,className:"hover:text-accent",children:s}),n.jsx(tn,{size:9}),n.jsx("span",{className:"text-content-secondary font-semibold font-mono",children:Om})]}),n.jsxs("div",{className:"px-5 pb-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:O?n.jsx("input",{ref:We,className:"flex-1 text-sm font-bold text-content bg-transparent border-b-2 border-accent outline-none p-0 pb-px",value:Q,onChange:D=>{J(D.target.value),lt()},onBlur:()=>E(!1),onKeyDown:D=>{D.key==="Enter"&&E(!1),D.key==="Escape"&&(J((x==null?void 0:x.name)??""),E(!1))},autoFocus:!0}):n.jsxs("div",{className:"flex items-center gap-1.5 group min-w-0",children:[n.jsx("h1",{className:"text-sm font-bold text-content truncate",children:Q||"Untitled Test Case"}),n.jsx("button",{type:"button",onClick:()=>{E(!0),setTimeout(()=>{var D;return(D=We.current)==null?void 0:D.focus()},0)},className:"p-0.5 rounded text-content-tertiary opacity-0 group-hover:opacity-100 hover:bg-surface-inset transition-all",children:n.jsx(_r,{size:10})})]})}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[n.jsx(il,{variant:"full",status:(P==null?void 0:P.status)??"not-created",onClick:I,busy:_.busyCases.get(`${e}:${t}`)==="create"||_.busyCases.get(`${e}:${t}`)==="sync"||_.busySuites.get(e)==="create"||_.busySuites.get(e)==="sync"||_.allOp==="create"||_.allOp==="sync"}),n.jsxs(re,{variant:"secondary",size:"sm",onClick:Sl,loading:g.isPending,disabled:!At,children:[n.jsx(ny,{size:10})," Save"]}),n.jsxs(re,{size:"sm",onClick:nb,loading:c,disabled:c,children:[!c&&n.jsx(Tt,{size:10})," ",c?"Running…":"Save & Run"]})]})]}),n.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[n.jsx("span",{className:"px-1.5 py-px rounded text-[9px] font-mono font-bold bg-teal-50 dark:bg-teal-900/20 text-teal-700 dark:text-teal-400 ring-1 ring-teal-200 dark:ring-teal-800",children:Om}),c?n.jsxs("span",{className:"flex items-center gap-1 text-[9px] text-teal-600 dark:text-teal-400 font-medium",children:[n.jsx(ce,{size:9,className:"animate-spin"})," Running"]}):(()=>{if(!d)return n.jsx("span",{className:"text-[8px] px-1.5 py-px rounded ring-1 ring-border text-content-tertiary",children:"Never run"});const D={passed:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800",failed:"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 ring-red-200 dark:ring-red-800",skipped:"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"};return n.jsx("span",{className:S("text-[8px] px-1.5 py-px rounded capitalize ring-1",D[d.status]??"ring-border text-content-tertiary"),children:d.status})})(),n.jsx("button",{type:"button",disabled:!d,onClick:()=>{d&&window.open(`/allure/${d.allureRunId}`,"_blank")},className:S("p-0.5 rounded transition-colors",d?"text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20":"text-content-tertiary cursor-not-allowed"),children:n.jsx(En,{size:11})}),n.jsx(Nm,{status:(P==null?void 0:P.status)??"not-created",xrayKey:P==null?void 0:P.xrayTestId}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsx("div",{className:"flex items-center gap-1",children:Ly.map(D=>n.jsx("button",{type:"button",onClick:()=>{R(D),lt()},className:S("px-1.5 py-px rounded text-[8px] capitalize font-bold transition-all ring-1",ie===D?rx[D]:"ring-transparent text-content-tertiary hover:ring-border"),children:D},D))}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsx(ll,{tags:W,editable:!0,onAdd:D=>{M(ae=>[...ae,D]),lt()},onRemove:D=>{M(ae=>ae.filter(ne=>ne!==D)),lt()}}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Fr,{size:9,className:"text-content-tertiary"}),n.jsx("input",{type:"number",min:1e3,step:1e3,className:"w-16 text-[9px] bg-transparent border-b border-dashed border-border px-1 py-px text-content-secondary placeholder:text-content-tertiary focus:outline-none focus:border-accent tabular-nums",placeholder:"30000",value:G,onChange:D=>{$(D.target.value),lt()},onKeyDown:eb}),n.jsx("span",{className:"text-[8px] text-content-tertiary",children:"ms"})]}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsxs("button",{type:"button",onClick:()=>nn(D=>!D),className:S("flex items-center gap-1 text-[9px] font-medium px-1.5 py-0.5 rounded transition-colors",Ke?"text-accent bg-accent/5":"text-content-tertiary hover:text-content-secondary hover:bg-surface-inset"),children:[n.jsx(Ba,{size:9})," ",Ke?"Less":"More",n.jsx(Mt,{size:8,className:S("transition-transform",Ke&&"rotate-180")})]}),At&&n.jsx("span",{className:"text-[8px] text-amber-500 dark:text-amber-400 font-bold ml-auto",children:"● Unsaved"}),K&&!At&&n.jsx("span",{className:"text-[8px] text-emerald-500 dark:text-emerald-400 font-bold ml-auto",children:"✓ Saved"})]})]}),Ke&&n.jsxs("div",{className:"px-5 pb-3 pt-1 border-t border-border bg-surface-inset/30 animate-fade-in",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Description"}),n.jsx("textarea",{rows:2,className:"w-full text-xs text-content-secondary bg-surface rounded-lg border border-border outline-none resize-none focus:ring-2 focus:ring-accent/30 px-2.5 py-1.5",placeholder:"Add a description…",value:L,onChange:D=>{Z(D.target.value),lt()},onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),Sl())}})]}),n.jsx("div",{children:n.jsx(N5,{type:se,filePath:fe,inlineData:me,onTypeChange:D=>{H(D),lt()},onFilePathChange:D=>{de(D),lt()},onInlineChange:D=>{Ce(D),lt()}})})]}),Am&&n.jsxs("div",{className:"mt-3 pt-3 border-t border-border/50",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-2 flex items-center gap-1.5",children:[n.jsx(Be,{size:9,className:"text-amber-500 dark:text-amber-400"})," Non-Functional Checks (Lighthouse)"]}),n.jsxs("div",{className:"flex items-center gap-4",children:[["performance","accessibility","seo"].map(D=>{const ae={performance:"⚡ Performance",accessibility:"♿ Accessibility",seo:"🔍 SEO"},ne=Kr.includes(D);return n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[n.jsx("input",{type:"checkbox",checked:ne,onChange:()=>{kl(xe=>ne?xe.filter(Lt=>Lt!==D):[...xe,D]),lt()},className:"w-3 h-3 rounded accent-amber-600 cursor-pointer"}),n.jsx("span",{className:"text-[10px] text-content-secondary",children:ae[D]})]},D)}),Kr.length===0&&n.jsx("span",{className:"text-[9px] text-amber-600",children:"⚠ No checks selected — Lighthouse will be skipped"})]})]})]})]}),n.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 px-5 pt-2 pb-0 border-b border-border bg-surface",children:[n.jsx("button",{type:"button",onClick:()=>rn("steps"),className:S("px-3 py-1.5 text-xs font-semibold rounded-t-lg transition-colors border-b-2",On==="steps"?"border-accent text-accent":"border-transparent text-content-tertiary hover:text-content-secondary"),children:"Steps"}),n.jsxs("button",{type:"button",onClick:()=>rn("hooks"),className:S("px-3 py-1.5 text-xs font-semibold rounded-t-lg transition-colors border-b-2",On==="hooks"?"border-accent text-accent":"border-transparent text-content-tertiary hover:text-content-secondary"),children:["Hooks",ue.length+Te.length>0&&n.jsx("span",{className:"ml-1 text-[9px] bg-accent/10 text-accent rounded px-1",children:ue.length+Te.length})]}),n.jsx("div",{className:"flex-1"}),n.jsxs("button",{type:"button",onClick:()=>q(!0),title:"Step Library",className:"flex items-center gap-1.5 text-[10px] text-content-tertiary hover:text-accent hover:bg-accent/5 px-2 py-1 rounded-lg transition-colors mb-1",children:[n.jsx(tl,{size:11})," Library"]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto bg-surface-inset/20",children:n.jsxs("div",{className:"max-w-4xl mx-auto px-5 py-3",children:[On==="hooks"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2 border-b border-border bg-surface-inset/30",children:[n.jsx("h3",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest",children:"Before Hooks"}),n.jsx("p",{className:"text-[9px] text-content-tertiary mt-0.5",children:"Run before all steps"})]}),n.jsxs("div",{className:"p-3 space-y-1.5",children:[ue.map((D,ae)=>n.jsxs("div",{className:"flex items-center gap-2 text-xs bg-surface-inset/50 rounded-lg px-3 py-2 border border-border",children:[n.jsx("span",{className:"text-content-tertiary font-mono text-[9px] w-4",children:ae+1}),n.jsx("span",{className:"flex-1 text-content-secondary",children:D.instruction}),n.jsx("button",{type:"button",onClick:()=>{pe(ne=>ne.filter((xe,Lt)=>Lt!==ae)),lt()},className:"p-0.5 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})})]},D.id)),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("input",{className:"flex-1 text-xs border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"Add before-hook instruction…",value:ss,onChange:D=>rs(D.target.value),onKeyDown:D=>{D.key==="Enter"&&ss.trim()&&(pe(ae=>[...ae,{id:crypto.randomUUID(),instruction:ss.trim()}]),rs(""),lt())}}),n.jsxs(re,{size:"sm",onClick:()=>{ss.trim()&&(pe(D=>[...D,{id:crypto.randomUUID(),instruction:ss.trim()}]),rs(""),lt())},children:[n.jsx(Pn,{size:11})," Add"]})]})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2 border-b border-border bg-surface-inset/30",children:[n.jsx("h3",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest",children:"After Hooks"}),n.jsx("p",{className:"text-[9px] text-content-tertiary mt-0.5",children:"Run after all steps (always)"})]}),n.jsxs("div",{className:"p-3 space-y-1.5",children:[Te.map((D,ae)=>n.jsxs("div",{className:"flex items-center gap-2 text-xs bg-surface-inset/50 rounded-lg px-3 py-2 border border-border",children:[n.jsx("span",{className:"text-content-tertiary font-mono text-[9px] w-4",children:ae+1}),n.jsx("span",{className:"flex-1 text-content-secondary",children:D.instruction}),n.jsx("button",{type:"button",onClick:()=>{it(ne=>ne.filter((xe,Lt)=>Lt!==ae)),lt()},className:"p-0.5 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})})]},D.id)),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("input",{className:"flex-1 text-xs border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"Add after-hook instruction…",value:ve,onChange:D=>Xs(D.target.value),onKeyDown:D=>{D.key==="Enter"&&ve.trim()&&(it(ae=>[...ae,{id:crypto.randomUUID(),instruction:ve.trim()}]),Xs(""),lt())}}),n.jsxs(re,{size:"sm",onClick:()=>{ve.trim()&&(it(D=>[...D,{id:crypto.randomUUID(),instruction:ve.trim()}]),Xs(""),lt())},children:[n.jsx(Pn,{size:11})," Add"]})]})]})]})]}),On==="steps"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex gap-2 mb-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Be,{size:12,className:"absolute left-3 top-1/2 -translate-y-1/2 text-accent/50 pointer-events-none"}),n.jsx("input",{ref:T,className:"w-full text-xs border border-border rounded-lg pl-8 pr-3 py-2 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary shadow-xs",placeholder:"Describe a step in plain English and press Enter…",value:at,onChange:D=>sn(D.target.value),onKeyDown:D=>D.key==="Enter"&&Tm()})]}),n.jsx(f5,{onInsert:tb}),n.jsxs(re,{size:"sm",onClick:Tm,disabled:b.isPending,className:"border border-transparent",children:[n.jsx(Pn,{size:11})," Add Step"]}),as?n.jsxs(re,{size:"sm",loading:Jy,onClick:Zy,className:"border border-transparent bg-gradient-to-b from-red-500 to-red-600 text-white hover:brightness-110 shadow-sm hover:shadow-md focus-visible:ring-red-500 animate-pulse",children:[n.jsx(H2,{size:10,className:"fill-current"})," Stop Recording"]}):n.jsxs(re,{size:"sm",loading:Yy,onClick:Xy,className:"border border-transparent bg-gradient-to-b from-red-400 to-red-500 text-white hover:brightness-110 shadow-sm hover:shadow-md focus-visible:ring-red-500",children:[n.jsx(C2,{size:10,className:"fill-current"})," Record"]}),n.jsxs(re,{size:"sm",loading:j.isPending,onClick:()=>j.mutate(),className:"border border-transparent bg-gradient-to-b from-emerald-500 to-emerald-600 text-white hover:brightness-110 shadow-sm hover:shadow-md focus-visible:ring-emerald-500",children:[n.jsx(Dr,{size:11})," Generate All"]})]}),as&&Zs.length>0&&n.jsxs("div",{className:"mb-3 border border-red-300 dark:border-red-700 rounded-xl overflow-hidden bg-red-50 dark:bg-red-950/30",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-red-100 dark:bg-red-900/40 border-b border-red-200 dark:border-red-800",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"relative flex h-2 w-2",children:[n.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),n.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-red-500"})]}),n.jsxs("span",{className:"text-[11px] font-semibold text-red-700 dark:text-red-300",children:["Recording — ",Zs.length," action",Zs.length!==1?"s":""," captured"]})]}),n.jsx("span",{className:"text-[10px] text-red-500 dark:text-red-400",children:"Interact with the browser to record steps"})]}),n.jsx("div",{ref:Oc,className:"max-h-40 overflow-y-auto px-3 py-2 space-y-1",children:Zs.map((D,ae)=>n.jsxs("div",{className:"flex items-start gap-2 text-[11px]",children:[n.jsx("span",{className:S("flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center font-mono font-bold text-[9px]",D.action==="assert"?"bg-emerald-200 dark:bg-emerald-800 text-emerald-700 dark:text-emerald-300":"bg-red-200 dark:bg-red-800 text-red-700 dark:text-red-300"),children:ae+1}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[D.action==="assert"&&n.jsx(_e,{size:10,className:"text-emerald-500 flex-shrink-0"}),n.jsx("span",{className:S("text-content-secondary",D.action==="assert"&&"text-emerald-700 dark:text-emerald-300 font-medium"),children:D.instruction})]})]},D.id))})]}),n.jsx("div",{className:"space-y-1.5",children:is.length===0?n.jsxs("div",{className:"border border-dashed border-border rounded-xl py-10 text-center bg-surface",children:[n.jsx(Be,{size:20,className:"mx-auto text-content-tertiary/40 mb-2"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No steps yet — type an instruction above and press Enter"}),n.jsxs("p",{className:"text-[10px] text-content-tertiary mt-1",children:["Or click ",n.jsx("span",{className:"font-semibold",children:"Generate All"})," to let AI write all steps"]})]}):is.map((D,ae)=>n.jsx(w5,{step:D,index:ae,suiteId:e,caseId:t,caseIsApi:rb,suiteIsAudit:Am,generating:Qs===D.id,isDragging:ee===D.id,isDragOver:Tn===D.id,onDragStart:()=>be(D.id),onDragOver:()=>jt(D.id),onDrop:()=>{if(!ee||ee===D.id){be(null),jt(null);return}const ne=is.map(Ac=>Ac.id),xe=ne.indexOf(ee),Lt=ne.indexOf(D.id);ne.splice(xe,1),ne.splice(Lt,0,ee),u.mutate(ne),be(null),jt(null)},onDragEnd:()=>{be(null),jt(null)},onDelete:ne=>h("Delete this step?",()=>v.mutate(ne)),onGenerate:ne=>void sb(ne),onSaveInstruction:(ne,xe)=>y.mutate({stepId:ne,instruction:xe}),onSaveTimeout:(ne,xe)=>y.mutate({stepId:ne,timeout:xe}),onSaveRetries:(ne,xe)=>y.mutate({stepId:ne,retries:xe??void 0}),onSaveStepType:(ne,xe)=>y.mutate({stepId:ne,stepType:xe}),onSaveMockUrl:(ne,xe)=>y.mutate({stepId:ne,mockUrl:xe}),onSaveMockResponse:(ne,xe)=>y.mutate({stepId:ne,mockResponse:xe}),onSaveMockStatus:(ne,xe)=>y.mutate({stepId:ne,mockStatus:xe}),onSaveRunAudit:(ne,xe)=>y.mutate({stepId:ne,runAudit:xe},{onSuccess:()=>A.success(xe?"⚡ Audit checkpoint set":"Audit checkpoint removed")}),onSaveSoft:(ne,xe)=>y.mutate({stepId:ne,soft:xe},{onSuccess:()=>A.success(xe?"Soft assertion — test continues on failure":"Hard assertion — test stops on failure")})},D.id))}),is.length>0&&n.jsxs("p",{className:"text-[9px] text-content-tertiary text-center mt-3",children:[is.length," step",is.length!==1?"s":""," · ",is.filter(D=>{var ae;return!!((ae=D.generatedCode)!=null&&ae.trim())}).length," with code"]})]})]})}),n.jsx(Rn,{...N}),n.jsx(y5,{open:Js,onClose:()=>q(!1),suiteId:e,caseId:t,onInserted:()=>q(!1)})]})}function N5({type:e,filePath:t,inlineData:s,onTypeChange:r,onFilePathChange:a,onInlineChange:i}){const[l,o]=m.useState([]),[c,d]=m.useState([]),[x,f]=m.useState(!1),[g,b]=m.useState(""),[y,v]=m.useState(!1),N=m.useRef(null);m.useEffect(()=>{Qr.list().then(o).catch(()=>{})},[]),m.useEffect(()=>{if((e==="json-file"||e==="csv-file")&&t){const j=t.replace(/^data\//,"");Qr.get(j).then(w=>{d(w.rows),b(w.raw)}).catch(()=>d([]))}else if(e==="inline"&&s)try{d(JSON.parse(s))}catch{d([])}else d([])},[e,t,s]);const h=async j=>{var z;const w=(z=j.target.files)==null?void 0:z[0];if(w){v(!0);try{const C=await w.text(),P=await Qr.upload(w.name,C);a(P.path),r(w.name.endsWith(".csv")?"csv-file":"json-file");const _=await Qr.list();o(_),A.success(`Uploaded ${w.name} (${P.rowCount} rows)`)}catch(C){A.error(C instanceof Error?C.message:"Upload failed")}finally{v(!1),j.target.value=""}}},u=async()=>{if((e==="json-file"||e==="csv-file")&&t){const j=t.replace(/^data\//,"");try{await Qr.update(j,g);const w=await Qr.get(j);d(w.rows),f(!1),A.success("Data file saved")}catch(w){A.error(w instanceof Error?w.message:"Save failed")}}else if(e==="inline"){i(g);try{d(JSON.parse(g))}catch{d([])}f(!1)}},p=c.length>0?Object.keys(c[0]):[];return n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1.5 flex items-center gap-1",children:[n.jsx(Hg,{size:9})," Data-Driven"]}),n.jsxs("div",{className:"flex items-center gap-1.5 mb-2 flex-wrap",children:[["none","inline","json-file","csv-file"].map(j=>n.jsx("button",{type:"button",onClick:()=>r(j),className:S("px-2 py-0.5 rounded-md text-[9px] font-semibold transition-all ring-1",e===j?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":"ring-border text-content-tertiary hover:bg-surface-inset"),children:j==="none"?"Off":j==="inline"?"Inline":j==="json-file"?"JSON":"CSV"},j)),(e==="json-file"||e==="csv-file")&&n.jsxs("select",{className:"max-w-[160px] text-[10px] border border-border rounded-md px-1.5 py-0.5 focus:outline-none focus:ring-1 focus:ring-accent bg-surface-inset/50",value:t,onChange:j=>a(j.target.value),children:[n.jsx("option",{value:"",children:"Select file…"}),l.filter(j=>e==="csv-file"?j.type==="csv":j.type==="json").map(j=>n.jsx("option",{value:j.path,children:j.name},j.name))]}),e!=="none"&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",onClick:()=>{var j;return(j=N.current)==null?void 0:j.click()},className:"flex items-center gap-0.5 px-1.5 py-0.5 rounded-md ring-1 ring-dashed ring-violet-300 dark:ring-violet-700 text-[9px] font-semibold text-violet-600 dark:text-violet-400 hover:bg-violet-50 dark:hover:bg-violet-900/20 transition-colors",children:[y?n.jsx(ce,{size:9,className:"animate-spin"}):n.jsx(ym,{size:9})," Upload"]}),n.jsx("input",{ref:N,type:"file",accept:".json,.csv",onChange:h,className:"hidden"})]})]}),e==="inline"&&!x&&n.jsx("textarea",{className:"w-full h-14 text-[10px] font-mono border border-border rounded-lg px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 mb-2 bg-surface-inset/50",placeholder:'[{"email":"user1@test.com","password":"pass1"}]',value:s,onChange:j=>i(j.target.value)}),e!=="none"&&c.length>0&&!x&&n.jsxs("div",{className:"mb-2",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsxs("span",{className:"text-[9px] text-content-tertiary",children:[c.length," row",c.length!==1?"s":""]}),n.jsxs("button",{type:"button",onClick:()=>{e==="inline"&&b(s),f(!0)},className:"text-[9px] text-violet-600 dark:text-violet-400 hover:text-violet-800 dark:hover:text-violet-300 font-semibold flex items-center gap-0.5",children:[n.jsx(_r,{size:8})," Edit"]})]}),n.jsx("div",{className:"overflow-x-auto border border-border rounded-lg",children:n.jsxs("table",{className:"w-full text-[10px]",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-surface-inset border-b border-border",children:[n.jsx("th",{className:"px-2 py-1 text-left font-bold text-content-tertiary w-6",children:"#"}),p.map(j=>n.jsx("th",{className:"px-2 py-1 text-left font-bold text-violet-600 dark:text-violet-400",children:`{{${j}}}`},j))]})}),n.jsxs("tbody",{children:[c.slice(0,8).map((j,w)=>n.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-surface-inset/50",children:[n.jsx("td",{className:"px-2 py-0.5 text-content-tertiary tabular-nums",children:w+1}),p.map(z=>n.jsx("td",{className:"px-2 py-0.5 text-content-secondary font-mono",children:j[z]},z))]},w)),c.length>8&&n.jsx("tr",{children:n.jsxs("td",{colSpan:p.length+1,className:"px-2 py-1 text-center text-content-tertiary text-[9px] italic",children:["+",c.length-8," more"]})})]})]})})]}),x&&n.jsxs("div",{className:"mb-2",children:[n.jsx("textarea",{className:"w-full h-32 text-[10px] font-mono border border-violet-300 dark:border-violet-700 rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-violet-300 dark:focus:ring-violet-700 bg-violet-50/20 dark:bg-violet-900/10 text-content",value:g,onChange:j=>b(j.target.value)}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5",children:[n.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-0.5 px-2.5 py-1 rounded-lg bg-violet-600 text-white text-[10px] font-semibold hover:bg-violet-700",children:[n.jsx(_e,{size:10})," Save"]}),n.jsxs("button",{type:"button",onClick:()=>f(!1),className:"flex items-center gap-0.5 px-2.5 py-1 rounded-lg border border-border text-[10px] text-content-secondary hover:bg-surface-inset",children:[n.jsx(Se,{size:10})," Cancel"]})]})]})]})}function w5({step:e,index:t,caseIsApi:s,suiteIsAudit:r,generating:a,isDragging:i,isDragOver:l,onDragStart:o,onDragOver:c,onDrop:d,onDragEnd:x,onDelete:f,onGenerate:g,onSaveInstruction:b,onSaveTimeout:y,onSaveRetries:v,onSaveStepType:N,onSaveMockUrl:h,onSaveMockResponse:u,onSaveMockStatus:p,onSaveRunAudit:j,onSaveSoft:w}){var We;const[z,C]=m.useState(!1),[P,_]=m.useState(!1),[I,Q]=m.useState(e.instruction),[J,O]=m.useState(e.timeout?String(e.timeout):""),[E,L]=m.useState(e.retries!=null?String(e.retries):""),[Z,ie]=m.useState(e.mockUrl??""),[R,W]=m.useState(e.mockResponse??""),[M,G]=m.useState(e.mockStatus?String(e.mockStatus):"200"),$=m.useRef(null),[se,H]=m.useState(void 0),fe=!!((We=e.generatedCode)!=null&&We.trim()),de=e.stepType==="mock",me=!!e.runAudit,Ce=se!==void 0?se:me,Ke=se!==void 0&&se!==me,nn=()=>{se!==void 0&&(j==null||j(e.id,se),H(void 0))},At=()=>H(void 0);m.useEffect(()=>{de&&C(!0)},[de]),m.useEffect(()=>{O(e.timeout?String(e.timeout):"")},[e.timeout]),m.useEffect(()=>{Q(e.instruction)},[e.instruction]),m.useEffect(()=>{var K;P&&((K=$.current)==null||K.focus())},[P]);const Dt=()=>{const K=I.trim();K&&K!==e.instruction&&b(e.id,K),_(!1)};return n.jsxs("div",{draggable:!0,onDragStart:K=>{K.dataTransfer.effectAllowed="move",o()},onDragOver:K=>{K.preventDefault(),c()},onDrop:K=>{K.preventDefault(),d()},onDragEnd:x,className:S("rounded-lg overflow-hidden transition-all",i?"opacity-40 ring-2 ring-accent":"ring-1 ring-border",l?"ring-2 ring-accent shadow-sm":""),children:[n.jsxs("div",{className:"flex items-start gap-2 px-3 py-2",children:[n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 pt-0.5",children:[n.jsx(Sc,{size:11,className:"text-content-tertiary hover:text-content-secondary cursor-grab active:cursor-grabbing"}),n.jsx("span",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-accent to-accent-dark text-white text-[9px] font-bold flex items-center justify-center",children:t+1})]}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-start gap-1.5 flex-wrap",children:[P?n.jsx("input",{ref:$,className:"flex-1 text-xs text-content border border-accent/40 rounded-md px-2 py-0.5 focus:outline-none focus:ring-1 focus:ring-accent/30 min-w-0 bg-surface-inset/50",value:I,onChange:K=>Q(K.target.value),onKeyDown:K=>{K.key==="Enter"&&(K.preventDefault(),Dt()),K.key==="Escape"&&(Q(e.instruction),_(!1))},onBlur:Dt}):n.jsx("span",{className:"text-xs text-content font-medium flex-1",children:e.instruction}),n.jsx("span",{className:S("text-[8px] px-1 py-px rounded font-bold uppercase flex-shrink-0 ring-1",de?"bg-purple-50 dark:bg-purple-900/20 text-purple-600 dark:text-purple-400 ring-purple-200 dark:ring-purple-800":e.stepType==="api"||s?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":r?"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"),children:de?"Mock":e.stepType==="api"||s?"API":r?"Audit":"UI"}),Ce&&n.jsxs("span",{className:S("text-[8px] px-1 py-px rounded font-bold flex items-center gap-0.5 ring-1",Ke?"bg-amber-50 dark:bg-amber-900/20 text-amber-500 dark:text-amber-400 ring-amber-200 dark:ring-amber-800 opacity-60":"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"),children:[n.jsx(Be,{size:7}),Ke?"Audit*":"Audit"]}),e.lastHealed&&n.jsx("span",{className:"text-[8px] px-1 py-px rounded bg-amber-50 text-amber-600 ring-1 ring-amber-200 font-bold",children:"healed"})]}),fe&&!P&&n.jsx("p",{className:"text-[10px] text-content-tertiary mt-px",children:"Code generated ✓"})]}),n.jsxs("select",{value:e.stepType??"ui",onChange:K=>{K.target.value==="mock"&&C(!0),N==null||N(e.id,K.target.value)},className:"text-[10px] border border-border rounded-md px-1 py-0.5 bg-surface-inset/50 text-content-secondary focus:outline-none focus:border-accent flex-shrink-0",children:[n.jsx("option",{value:"ui",children:"UI"}),n.jsx("option",{value:"api",children:"API"}),n.jsx("option",{value:"mock",children:"Mock"})]}),n.jsx("input",{type:"number",min:0,max:5,step:1,className:"w-10 text-[10px] border border-border rounded-md px-1.5 py-0.5 text-content-secondary placeholder:text-content-tertiary focus:outline-none focus:border-accent flex-shrink-0 bg-surface-inset/50",placeholder:"×",title:"Retries",value:E,onChange:K=>L(K.target.value),onBlur:()=>{const K=E.trim()?parseInt(E,10):null,It=e.retries??null;K!==It&&(v==null||v(e.id,K!=null&&K>=0?K:null))},onKeyDown:K=>{K.key==="Enter"&&K.target.blur()}}),n.jsx("input",{type:"number",min:100,step:100,className:"w-16 text-[10px] border border-border rounded-md px-1.5 py-0.5 text-content-secondary placeholder:text-content-tertiary focus:outline-none focus:border-accent flex-shrink-0 bg-surface-inset/50",placeholder:"ms",value:J,onChange:K=>O(K.target.value),onBlur:()=>{const K=J.trim()?parseInt(J,10):null,It=e.timeout??null;K!==It&&y(e.id,K&&K>0?K:null)},onKeyDown:K=>{K.key==="Enter"&&K.target.blur()}}),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[P?n.jsx("button",{type:"button",onClick:Dt,className:"p-1 rounded-md text-emerald-500 hover:bg-emerald-50 dark:hover:bg-emerald-900/20 transition-colors",children:n.jsx(_e,{size:12})}):n.jsx("button",{type:"button",onClick:()=>_(!0),className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",children:n.jsx(_r,{size:11})}),r&&!s&&e.stepType!=="api"&&e.stepType!=="mock"&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",title:Ce?"Remove Lighthouse audit checkpoint":"Mark as Lighthouse audit checkpoint",onClick:K=>{K.stopPropagation(),H(!Ce)},onMouseDown:K=>K.stopPropagation(),className:S("flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-bold transition-all cursor-pointer select-none",Ce?"text-amber-700 dark:text-amber-400 bg-amber-100 dark:bg-amber-900/30 hover:bg-amber-200 dark:hover:bg-amber-900/40 ring-1 ring-amber-300 dark:ring-amber-700":"text-content-tertiary hover:text-amber-600 dark:hover:text-amber-400 hover:bg-amber-50 dark:hover:bg-amber-900/20 ring-1 ring-transparent hover:ring-amber-200 dark:hover:ring-amber-800"),children:[n.jsx(Be,{size:9}),n.jsx("span",{children:"Audit"})]}),Ke&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:"Save audit change",onClick:K=>{K.stopPropagation(),nn()},onMouseDown:K=>K.stopPropagation(),className:"p-1 rounded-md text-emerald-600 hover:bg-emerald-50 dark:hover:bg-emerald-900/20 transition-colors",children:n.jsx(_e,{size:11})}),n.jsx("button",{type:"button",title:"Cancel",onClick:K=>{K.stopPropagation(),At()},onMouseDown:K=>K.stopPropagation(),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})})]})]}),/^(?:soft\s+)?(?:verify|check|assert|ensure|confirm)\b/i.test(e.instruction)&&n.jsx("button",{type:"button",title:e.soft?"Soft assertion (test continues on failure) — click to make hard":"Hard assertion (test stops on failure) — click to make soft",onClick:K=>{K.stopPropagation(),w==null||w(e.id,!e.soft)},onMouseDown:K=>K.stopPropagation(),className:S("flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-bold transition-all cursor-pointer select-none",e.soft?"text-blue-700 dark:text-blue-400 bg-blue-100 dark:bg-blue-900/30 hover:bg-blue-200 dark:hover:bg-blue-900/40 ring-1 ring-blue-300 dark:ring-blue-700":"text-content-tertiary hover:text-blue-600 dark:hover:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 ring-1 ring-transparent hover:ring-blue-200 dark:hover:ring-blue-800"),children:n.jsx("span",{children:e.soft?"Soft":"Hard"})}),n.jsx("button",{type:"button",onClick:()=>g(e.id),disabled:a,className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors disabled:opacity-40",children:a?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Dr,{size:12})}),n.jsx("button",{type:"button",onClick:()=>f(e.id),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(gn,{size:11})}),n.jsx("button",{type:"button",onClick:()=>C(K=>!K),className:"p-1 rounded-md text-content-tertiary hover:text-content-secondary hover:bg-surface-inset transition-colors",children:z?n.jsx(Mt,{size:12}):n.jsx(tn,{size:12})})]})]}),z&&n.jsxs("div",{className:"border-t border-border",children:[de&&n.jsxs("div",{className:"px-3 py-2.5 bg-violet-50/50 dark:bg-violet-900/10 space-y-1.5 border-b border-border",children:[n.jsx("p",{className:"text-[9px] font-bold text-violet-600 dark:text-violet-400 uppercase tracking-widest",children:"Mock Route"}),n.jsxs("div",{className:"flex gap-2 items-center",children:[n.jsx("input",{className:"flex-1 text-[10px] border border-border rounded px-2 py-1 bg-surface focus:outline-none focus:border-violet-400",placeholder:"URL pattern, e.g. **/api/users",value:Z,onChange:K=>ie(K.target.value),onBlur:()=>{Z!==(e.mockUrl??"")&&(h==null||h(e.id,Z))}}),n.jsx("input",{type:"number",className:"w-16 text-[10px] border border-border rounded px-2 py-1 bg-surface focus:outline-none focus:border-violet-400",placeholder:"Status",value:M,onChange:K=>G(K.target.value),onBlur:()=>{const K=parseInt(M,10);!isNaN(K)&&K!==(e.mockStatus??200)&&(p==null||p(e.id,K))}})]}),n.jsx("textarea",{rows:3,className:"w-full text-[10px] border border-border rounded px-2 py-1 bg-surface focus:outline-none focus:border-violet-400 font-mono resize-none",placeholder:'{"key":"value"}',value:R,onChange:K=>W(K.target.value),onBlur:()=>{R!==(e.mockResponse??"")&&(u==null||u(e.id,R))}})]}),fe?n.jsx(Iy,{code:e.generatedCode,maxLines:12,className:"rounded-none"}):n.jsxs("div",{className:"px-3 py-2.5 text-[10px] text-content-tertiary italic bg-surface-inset/30",children:["No code yet — click ",n.jsx(Dr,{size:9,className:"inline mb-0.5"})," to generate"]})]})]})}let Kt=null,fi=!1;const ax=new Set;function pi(){ax.forEach(e=>e())}const xn={subscribe(e){return ax.add(e),()=>{ax.delete(e)}},getSnapshot(){return{job:Kt,showPopup:fi}},start(e,t){const s=`gen-${Date.now()}`;return Kt={id:s,tab:e,label:t,status:"running",startedAt:Date.now()},fi=!1,pi(),s},done(e,t){Kt&&(Kt={...Kt,status:"done",suiteId:e,suiteName:t},fi=!0,pi())},error(e){Kt&&(Kt={...Kt,status:"error",error:e},pi())},dismissPopup(){fi=!1,pi()},clear(){Kt=null,fi=!1,pi()},isRunning(){return(Kt==null?void 0:Kt.status)==="running"}};function Fy(){const[e,t]=m.useState(()=>xn.getSnapshot());return m.useEffect(()=>xn.subscribe(()=>t(xn.getSnapshot())),[]),e}const k5=[{title:"Login Flow",story:"User logs in with valid credentials, navigates to the dashboard, and verifies that the welcome message is displayed."},{title:"E-Commerce Checkout",story:"User searches for a product, adds it to the cart, proceeds to checkout, and completes the purchase."},{title:"Admin Management",story:"Admin user creates a new account, assigns roles, and verifies the account appears in the user list."}],S5=/^(https?:\/\/.+\/(browse|issue)\/[A-Z][A-Z0-9_]+-\d+|https?:\/\/.+selectedIssue=[A-Z][A-Z0-9_]+-\d+|[A-Z][A-Z0-9_]+-\d+)$/i;function Cf(e){return e.trim()?S5.test(e.trim()):!0}function Ef(e){const t=e.trim();if(!t)return null;const s=t.match(/([A-Z][A-Z0-9_]+-\d+)/i);return s?s[1].toUpperCase():null}function C5(e){const t=e.trim();if(!t)return[];if(t.startsWith("["))try{const i=JSON.parse(t).map(l=>{if(typeof l=="string")return{story:l.trim()};if(typeof l=="object"&&l!==null&&"story"in l){const o=l;return{story:String(o.story).trim(),suiteName:o.suiteName,jiraUrl:o.jiraUrl}}return null}).filter(l=>l!==null&&l.story.length>=10);if(i.length>0)return i}catch{}const s=t.split(/\n\s*---+\s*\n/).map(a=>a.trim()).filter(Boolean);if(s.length>1)return s.map(a=>a.replace(/^\d+\.\s*/,"").trim()).filter(a=>a.length>=10).map(a=>({story:a}));const r=t.split(`
|
|
794
|
+
`).filter(a=>/^\d+[\.\)]\s/.test(a.trim()));return r.length>1?r.map(a=>a.replace(/^\d+[\.\)]\s*/,"").trim()).filter(a=>a.length>=10).map(a=>({story:a})):t.length>=10?[{story:t}]:[]}function zd({icon:e,title:t,desc:s,tag:r,active:a,gradient:i,onClick:l}){return n.jsxs("button",{type:"button",onClick:l,className:S("relative flex items-start gap-2.5 p-3 rounded-xl border-2 text-left transition-all duration-200 group flex-1 min-w-0",a?"border-accent bg-accent/[0.04] shadow-sm":"border-transparent bg-surface hover:bg-surface-inset/50 hover:border-border"),children:[a&&n.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 -translate-y-px w-8 h-[3px] rounded-full bg-gradient-to-r from-accent to-accent-light"}),n.jsx("div",{className:S("w-5 h-5 rounded flex items-center justify-center transition-all flex-shrink-0",a?i:"bg-surface-inset"),children:n.jsx(e,{size:14,className:a?"text-white":"text-content-tertiary",strokeWidth:1.8})}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:S("text-xs font-semibold transition-colors",a?"text-content":"text-content-secondary"),children:t}),r&&n.jsx("span",{className:S("text-[8px] font-bold uppercase tracking-wider px-1 py-px rounded",a?"bg-accent/10 text-accent":"bg-surface-inset text-content-tertiary"),children:r})]}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-px leading-snug truncate",children:s})]})]})}function Pf({title:e,icon:t,children:s,defaultOpen:r=!1}){const[a,i]=m.useState(r);return n.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>i(l=>!l),className:"w-full flex items-center justify-between px-4 py-3 bg-surface-inset/50 hover:bg-surface-inset transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(t,{size:13,className:"text-content-tertiary"}),n.jsx("span",{className:"text-xs font-semibold text-content-secondary",children:e})]}),n.jsx(Mt,{size:13,className:S("text-content-tertiary transition-transform duration-200",a&&"rotate-180")})]}),a&&n.jsx("div",{className:"px-4 py-3 border-t border-border bg-surface",children:s})]})}function E5({content:e,onClose:t}){const[s,r]=m.useState(!1);return n.jsxs("div",{className:S("rounded-xl border overflow-hidden transition-all animate-fade-in","border-indigo-200/50 bg-gradient-to-br from-indigo-50/40 via-surface to-violet-50/20"),children:[n.jsxs("div",{className:"px-3 pt-3 pb-1.5 space-y-1.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-indigo-100/80 text-indigo-700 text-xs font-bold",children:[n.jsx(Ya,{size:11})," ",e.issueKey]}),n.jsx("span",{className:"px-2 py-0.5 rounded-md bg-surface-inset text-content-secondary text-[10px] font-semibold border border-border",children:e.issueType}),n.jsx("span",{className:"px-2 py-0.5 rounded-md bg-surface-inset text-content-secondary text-[10px] font-semibold border border-border",children:e.status}),n.jsx("span",{className:"px-2 py-0.5 rounded-md bg-amber-50 text-amber-700 text-[10px] font-semibold border border-amber-200/50",children:e.priority})]}),n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[n.jsx("button",{type:"button",onClick:()=>r(a=>!a),className:"text-indigo-500 hover:text-indigo-700 text-[10px] font-semibold px-2 py-1 rounded-md hover:bg-indigo-50 transition-colors",children:s?"Less":"More"}),n.jsx("button",{type:"button",onClick:t,className:"p-1 rounded-md text-content-tertiary hover:text-content-secondary hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:13})})]})]}),n.jsx("p",{className:"font-semibold text-content text-xs leading-relaxed",children:e.summary})]}),n.jsxs("div",{className:S("px-3 pb-3 space-y-1.5",s?"overflow-y-auto max-h-[200px]":""),children:[e.description&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Description"}),n.jsx("p",{className:S("text-xs text-content-secondary leading-relaxed whitespace-pre-wrap",!s&&"line-clamp-3"),children:e.description})]}),e.acceptanceCriteria&&s&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Acceptance Criteria"}),n.jsx("p",{className:"text-xs text-content-secondary leading-relaxed whitespace-pre-wrap",children:e.acceptanceCriteria})]}),e.comments.length>0&&s&&n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:["Comments (",e.comments.length,")"]}),e.comments.map((a,i)=>n.jsx("p",{className:"text-xs text-content-secondary italic mt-1 whitespace-pre-wrap",children:a},i))]}),e.labels.length>0&&n.jsx("div",{className:"flex items-center gap-1 flex-wrap pt-1",children:e.labels.map(a=>n.jsx("span",{className:"px-2 py-0.5 rounded-full bg-surface-inset text-content-tertiary text-[9px] font-medium border border-border",children:a},a))})]})]})}function P5({pct:e,size:t=64,stroke:s=5}){const r=(t-s)/2,a=2*Math.PI*r,i=a-e/100*a;return n.jsxs("svg",{width:t,height:t,className:"-rotate-90",children:[n.jsx("circle",{cx:t/2,cy:t/2,r,fill:"none",stroke:"currentColor",strokeWidth:s,className:"text-surface-inset"}),n.jsx("circle",{cx:t/2,cy:t/2,r,fill:"none",stroke:"url(#prog-grad)",strokeWidth:s,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:i,className:"transition-all duration-700 ease-out"}),n.jsx("defs",{children:n.jsxs("linearGradient",{id:"prog-grad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"var(--color-accent)"}),n.jsx("stop",{offset:"100%",stopColor:"var(--color-accent-light, #818cf8)"})]})})]})}const z5={GET:"bg-blue-500/10 text-blue-600 ring-blue-500/20",POST:"bg-emerald-500/10 text-emerald-600 ring-emerald-500/20",PUT:"bg-amber-500/10 text-amber-600 ring-amber-500/20",DELETE:"bg-red-500/10 text-red-600 ring-red-500/20",PATCH:"bg-violet-500/10 text-violet-600 ring-violet-500/20"},R5=[{icon:ey,label:"--- separator",example:`Story one
|
|
795
|
+
---
|
|
796
|
+
Story two`},{icon:O2,label:"Numbered",example:`1. Story one
|
|
797
|
+
2. Story two`},{icon:y2,label:"JSON",example:'[{"story":"…","suiteName":"Auth"}]'},{icon:fn,label:"CSV Upload",example:`story,suiteName
|
|
798
|
+
"Story","Auth"`}];function M5(){const[e,t]=m.useState("single"),s=zn(),[r,a]=m.useState(""),[i,l]=m.useState(""),[,o]=m.useState(!1),[c,d]=m.useState(""),[x,f]=m.useState(null),[g,b]=m.useState(!0),[y,v]=m.useState(""),[N,h]=m.useState(3),[u,p]=m.useState([]),[j,w]=m.useState(null),[z,C]=m.useState(null),[P,_]=m.useState(null),[I,Q]=m.useState(""),[J,O]=m.useState([]),E=m.useRef(null);m.useEffect(()=>{const T=C5(y),ee=J.map(be=>({story:[be.summary,be.description,be.acceptanceCriteria].filter(Boolean).join(`
|
|
799
|
+
`),suiteName:be.summary,jiraUrl:be.issueKey}));p([...ee,...T])},[y,J]);const[L,Z]=m.useState(""),[ie,R]=m.useState(""),[W,M]=m.useState(""),[G,$]=m.useState(null),[se,H]=m.useState(""),fe=X({mutationFn:T=>Gr.fetchJira(T),onSuccess:T=>{f(T),b(!0),A.success(`Fetched ${T.issueKey}: ${T.summary}`)},onError:T=>{f(null),A.error(T.message)}}),de=X({mutationFn:T=>Gr.fetchJira(T),onSuccess:T=>{if(J.some(ee=>ee.issueKey===T.issueKey)){A.error(`${T.issueKey} already added`);return}O(ee=>[...ee,T]),Q(""),A.success(`Added ${T.issueKey}`)},onError:T=>{A.error(T.message)}}),me=X({mutationFn:()=>(xn.start("single",i||"Test Suite"),Gr.generate(r,i||void 0,c||void 0)),onSuccess:T=>{o(!0),xn.done(T.suiteId,T.suiteName)},onError:T=>{xn.error(T.message),A.error(T.message)}}),Ce=X({mutationFn:()=>Gr.generateBulk(u,N),onSuccess:T=>A.success(`Processing ${T.total} stories…`),onError:T=>A.error(T.message)}),Ke=X({mutationFn:()=>Gr.swaggerPreview(L),onSuccess:T=>{$(T),R(T.title?`${T.title} API Tests`:""),A.success(`Found ${T.totalEndpoints} endpoints`)},onError:T=>{$(null),A.error(T.message)}}),nn=X({mutationFn:()=>{xn.start("swagger",ie||"API Tests");const T=W.trim()?W.split(",").map(ee=>ee.trim()).filter(Boolean):void 0;return Gr.generateFromSwagger(L,ie||void 0,T,se)},onSuccess:T=>{xn.done(T.suiteId,T.suiteName),A.success(`Generated ${T.endpointsFound} endpoint tests`)},onError:T=>{xn.error(T.message),A.error(T.message)}});jd("story:bulk-start",T=>{const ee=T;_(ee.jobId),w({jobId:ee.jobId,total:ee.total,completed:0,failed:0,currentIndex:0,currentStory:""}),C(null)}),jd("story:bulk-progress",T=>{const ee=T;ee.jobId===P&&w(ee)}),jd("story:bulk-done",T=>{const ee=T;ee.jobId===P&&(C(ee),w(null),ee.failed===0?A.success(`All ${ee.completed} suites generated!`):A.success(`${ee.completed} done, ${ee.failed} failed`))});const At=T=>{var Tn;const ee=(Tn=T.target.files)==null?void 0:Tn[0];if(!ee)return;const be=new FileReader;be.onload=jt=>{var rn;const On=(rn=jt.target)==null?void 0:rn.result;if(ee.name.endsWith(".csv")){const q=On.split(`
|
|
800
|
+
`).slice(1).map(ue=>ue.split(",").map(pe=>pe.replace(/^"|"$/g,"").trim())).filter(ue=>{var pe;return((pe=ue[0])==null?void 0:pe.length)>=10}).map(ue=>({story:ue[0],suiteName:ue[1]||void 0}));v(q.map((ue,pe)=>`${pe+1}. ${ue.story}`).join(`
|
|
801
|
+
`))}else v(On)},be.readAsText(ee),T.target.value=""},Dt=j?Math.round((j.completed+j.failed)/j.total*100):0,We=Ce.isPending||j!==null&&z===null,K=Cf(c),It=Ef(c),at=Cf(I),sn=Ef(I),Qs=T=>O(ee=>ee.filter(be=>be.issueKey!==T)),Ys=r.trim().length>=10||!!x&&!!c.trim();return n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-br from-violet-500 via-indigo-500 to-blue-600 flex items-center justify-center shadow-sm shadow-indigo-500/20",children:n.jsx(Ot,{size:16,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-base font-bold text-content tracking-tight",children:"Smart Tests"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"AI-powered test generation from stories, Jira, or API specs"})]})]})}),n.jsxs("div",{className:"grid grid-cols-3 gap-2 p-1 rounded-xl bg-surface border border-border shadow-xs",children:[n.jsx(zd,{icon:Dr,title:"Single Story",desc:"Describe one user journey — AI creates the full test suite",active:e==="single",gradient:"bg-gradient-to-br from-violet-500 to-indigo-600",onClick:()=>t("single")}),n.jsx(zd,{icon:jl,title:"Bulk Import",desc:"Generate multiple suites at once from text, JSON, CSV, or Jira",tag:"batch",active:e==="bulk",gradient:"bg-gradient-to-br from-amber-500 to-orange-600",onClick:()=>t("bulk")}),n.jsx(zd,{icon:Bg,title:"API Import",desc:"Import OpenAPI / Swagger specs to auto-generate API tests",tag:"api",active:e==="swagger",gradient:"bg-gradient-to-br from-emerald-500 to-teal-600",onClick:()=>t("swagger")})]}),e==="single"&&n.jsxs("div",{className:"grid grid-cols-5 gap-3 animate-fade-in",children:[n.jsxs("div",{className:"col-span-3 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-indigo-100 flex items-center justify-center",children:n.jsx(Vo,{size:14,className:"text-indigo-600"})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Jira Integration"}),n.jsx("span",{className:"ml-2 text-[10px] text-content-tertiary font-medium",children:"Optional"})]})]}),x&&!g&&n.jsxs("button",{type:"button",onClick:()=>b(!0),className:"flex items-center gap-1 text-[10px] text-indigo-600 hover:text-indigo-700 font-semibold",children:[n.jsx(qg,{size:10})," Show ",x.issueKey]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{className:S("w-full rounded-xl px-3 py-2 text-xs transition-all border focus:outline-none focus:ring-2 placeholder-content-tertiary",c.trim()?K?"border-indigo-300 focus:ring-indigo-300 bg-indigo-50/20":"border-red-300 focus:ring-red-300 bg-red-50/20":"border-border bg-surface-inset/50 focus:ring-accent/30 focus:border-accent/50"),placeholder:"PROJ-123 or paste full Jira URL",value:c,onChange:T=>{d(T.target.value),T.target.value.trim()||f(null)}}),It&&K&&n.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-[10px] font-mono font-bold text-indigo-600 bg-indigo-100 px-2 py-0.5 rounded-md",children:It})]}),n.jsxs(re,{variant:"secondary",size:"sm",onClick:()=>fe.mutate(c),loading:fe.isPending,disabled:!c.trim()||!K||fe.isPending,children:[n.jsx(cd,{size:14})," Fetch"]})]}),c.trim()&&!K&&n.jsxs("p",{className:"text-[10px] text-red-500 flex items-center gap-1",children:[n.jsx(Xt,{size:10})," Invalid format — use PROJ-123 or full Jira URL"]}),x&&g&&n.jsx(E5,{content:x,onClose:()=>b(!1)})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-violet-100 flex items-center justify-center",children:n.jsx(fn,{size:14,className:"text-violet-600"})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[11px] font-bold text-content",children:"User Story"}),x?n.jsx("span",{className:"ml-2 text-[10px] text-content-tertiary font-medium",children:"Optional — Jira content used"}):n.jsx("span",{className:"ml-1 text-red-400 text-xs",children:"*"})]})]}),n.jsx("textarea",{className:"w-full rounded-xl border border-border bg-surface-inset/50 p-4 text-sm text-content leading-relaxed focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50 resize-vertical min-h-[80px] placeholder-content-tertiary transition-all",rows:x?3:5,placeholder:x?"Add extra context or leave blank — Jira content is enough":`Describe the user journey you want to automate…
|
|
802
|
+
|
|
803
|
+
Example: User logs in with valid credentials, navigates to the dashboard, and verifies that the welcome message is displayed.`,value:r,onChange:T=>{a(T.target.value),o(!1)}})]}),n.jsx("div",{className:"rounded-xl border border-border bg-surface p-3.5",children:n.jsxs("div",{className:"flex items-end gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("label",{className:"text-[11px] font-bold text-content mb-2 block",children:["Suite Name ",n.jsx("span",{className:"text-content-tertiary font-normal text-[10px]",children:"(AI auto-suggests if blank)"})]}),n.jsx("input",{className:"w-full rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50 placeholder-content-tertiary transition-all",placeholder:x?`e.g. ${x.summary}`:"e.g. Authentication Tests",value:i,onChange:T=>l(T.target.value)})]}),n.jsxs(re,{onClick:()=>me.mutate(),loading:me.isPending,disabled:!Ys,children:[n.jsx(Ot,{size:14})," Generate Suite"]})]})})]}),n.jsxs("div",{className:"col-span-2 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{size:13,className:"text-amber-500"}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Quick Start"})]}),n.jsx("div",{className:"space-y-2",children:k5.map((T,ee)=>n.jsxs("button",{type:"button",onClick:()=>{a(T.story),o(!1)},className:"w-full text-left px-3 py-2 rounded-lg border border-border bg-surface-inset/30 hover:bg-accent/[0.04] hover:border-accent/30 transition-all group",children:[n.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[n.jsx("span",{className:"text-[10px] font-bold text-content group-hover:text-accent transition-colors",children:T.title}),n.jsx(p2,{size:11,className:"text-content-tertiary group-hover:text-accent transition-colors"})]}),n.jsx("p",{className:"text-[10px] text-content-tertiary leading-snug line-clamp-2",children:T.story})]},ee))})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(xf,{size:13,className:"text-accent"}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Pro Tips"})]}),n.jsx("div",{className:"space-y-2",children:["Paste a Jira link to auto-fetch story details","Write in plain English — describe the full journey","Include expected outcomes for better assertions","Combine Jira + extra context for best results"].map((T,ee)=>n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(dr,{size:9,className:"text-accent flex-shrink-0 mt-1"}),n.jsx("span",{className:"text-[11px] text-content-tertiary leading-relaxed",children:T})]},ee))})]})]})]}),e==="bulk"&&n.jsxs("div",{className:"space-y-3 animate-fade-in",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-indigo-100 flex items-center justify-center",children:n.jsx(Vo,{size:14,className:"text-indigo-600"})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Fetch from Jira"}),n.jsx("span",{className:"ml-2 text-[10px] text-content-tertiary",children:"Paste URL → Fetch → repeat"})]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{className:S("w-full rounded-xl px-3.5 py-2 text-sm border transition-all focus:outline-none focus:ring-2 placeholder-content-tertiary",I.trim()?at?"border-indigo-300 focus:ring-indigo-300 bg-indigo-50/20":"border-red-300 focus:ring-red-300 bg-red-50/20":"border-border bg-surface-inset/50 focus:ring-accent/30"),placeholder:"PROJ-123 or Jira URL",value:I,onChange:T=>Q(T.target.value),onKeyDown:T=>{T.key==="Enter"&&I.trim()&&at&&!de.isPending&&!We&&de.mutate(I)},disabled:We}),sn&&at&&n.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-[10px] font-mono font-bold text-indigo-600 bg-indigo-100 px-2 py-0.5 rounded-md",children:sn})]}),n.jsxs(re,{variant:"secondary",size:"sm",onClick:()=>de.mutate(I),loading:de.isPending,disabled:!I.trim()||!at||de.isPending||We,children:[n.jsx(cd,{size:14})," Fetch"]})]}),I.trim()&&!at&&n.jsxs("p",{className:"text-[10px] text-red-500 flex items-center gap-1",children:[n.jsx(Xt,{size:10})," Invalid Jira URL format"]}),J.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1.5 pt-1",children:J.map(T=>n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-indigo-50 border border-indigo-200/60 text-xs text-indigo-700 transition-all hover:shadow-sm",title:T.summary,children:[n.jsx(Ya,{size:9,className:"text-indigo-400"}),n.jsx("span",{className:"font-mono font-bold text-[10px]",children:T.issueKey}),n.jsx("span",{className:"max-w-[120px] truncate text-[10px]",children:T.summary}),!We&&n.jsx("button",{type:"button",onClick:()=>Qs(T.issueKey),className:"text-indigo-300 hover:text-red-500 transition-colors",children:n.jsx(Se,{size:10})})]},T.issueKey))})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-amber-100 flex items-center justify-center",children:n.jsx(fn,{size:14,className:"text-amber-600"})}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Supported Formats"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-2",children:R5.map(({icon:T,label:ee,example:be})=>n.jsxs("div",{className:"p-2.5 rounded-xl bg-surface-inset/50 border border-border",children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[n.jsx(T,{size:10,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[10px] font-bold text-content-secondary",children:ee})]}),n.jsx("pre",{className:"text-[9px] text-content-tertiary font-mono leading-relaxed whitespace-pre-wrap line-clamp-2",children:be})]},ee))})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 bg-surface-inset/30 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("span",{className:"text-xs text-content-secondary",children:u.length>0?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-bold text-accent tabular-nums",children:u.length})," stories",J.length>0&&n.jsxs("span",{className:"text-content-tertiary ml-1",children:["(",J.length," Jira",u.length-J.length>0?` + ${u.length-J.length} manual`:"",")"]})]}):n.jsx("span",{className:"text-content-tertiary",children:"No stories yet"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Parallel"}),n.jsx("select",{className:"text-xs border border-border rounded-lg px-2 py-1 bg-surface focus:outline-none focus:ring-2 focus:ring-accent/30",value:N,onChange:T=>h(Number(T.target.value)),disabled:We,children:[1,2,3,4,5].map(T=>n.jsxs("option",{value:T,children:[T,"×"]},T))})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{ref:E,type:"file",accept:".txt,.csv,.json",className:"hidden",onChange:At}),n.jsxs(re,{variant:"secondary",size:"sm",onClick:()=>{var T;return(T=E.current)==null?void 0:T.click()},disabled:We,children:[n.jsx(ym,{size:12})," Upload"]}),n.jsxs(re,{size:"sm",onClick:()=>{C(null),Ce.mutate()},loading:Ce.isPending,disabled:u.length===0||We,children:[n.jsx(Be,{size:13})," Generate ",u.length>0?u.length:""," Suites"]})]})]}),n.jsxs("div",{className:"min-h-[220px]",children:[!We&&!z&&n.jsx("textarea",{className:"w-full h-[220px] p-4 text-xs text-content leading-relaxed focus:outline-none resize-none font-mono placeholder-content-tertiary bg-transparent",placeholder:`Paste your stories here…
|
|
804
|
+
|
|
805
|
+
Use --- separators, numbered lists, or JSON array format.
|
|
806
|
+
Or fetch from Jira above.`,value:y,onChange:T=>v(T.target.value),disabled:We}),We&&j&&n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-4",children:[n.jsxs("div",{className:"relative",children:[n.jsx(P5,{pct:Dt,size:72,stroke:5}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsxs("span",{className:"text-sm font-bold text-content tabular-nums",children:[Dt,"%"]})})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:"text-sm font-semibold text-content",children:"Generating suites…"}),n.jsxs("p",{className:"text-xs text-content-tertiary mt-1",children:[j.completed+j.failed," of ",j.total," complete"]})]}),n.jsx("div",{className:"flex gap-5",children:[["Total",j.total,"text-content"],["Done",j.completed,"text-emerald-600"],["Failed",j.failed,"text-red-500"]].map(([T,ee,be])=>n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:`text-lg font-bold tabular-nums ${be}`,children:ee}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-semibold uppercase tracking-wider",children:T})]},String(T)))}),j.currentStory&&n.jsxs("div",{className:"max-w-md mx-auto flex items-start gap-2 p-3 bg-accent/5 rounded-xl border border-accent/10",children:[n.jsx(Be,{size:12,className:"text-accent flex-shrink-0 mt-0.5"}),n.jsxs("p",{className:"text-[11px] text-content-secondary line-clamp-2",children:[n.jsxs("span",{className:"font-semibold",children:["#",j.currentIndex+1,":"]})," ",j.currentStory]})]})]}),z&&n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-4",children:[n.jsx("div",{className:S("w-10 h-10 rounded-xl flex items-center justify-center",z.failed===0?"bg-emerald-100":"bg-amber-100"),children:z.failed===0?n.jsx(Ue,{size:20,className:"text-emerald-600"}):n.jsx(Xt,{size:20,className:"text-amber-600"})}),n.jsxs("div",{className:"text-center",children:[n.jsxs("p",{className:"text-sm font-bold text-content",children:[z.completed," suites generated",z.failed>0?`, ${z.failed} failed`:" successfully"]}),n.jsx("p",{className:"text-xs text-content-tertiary mt-1",children:"Ready in Test Editor"})]}),n.jsx("div",{className:"flex gap-5",children:[["Total",z.total,"text-content"],["Generated",z.completed,"text-emerald-600"],["Failed",z.failed,"text-red-500"]].map(([T,ee,be])=>n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:`text-lg font-bold tabular-nums ${be}`,children:ee}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-semibold uppercase tracking-wider",children:T})]},String(T)))}),z.failedItems.length>0&&n.jsx("div",{className:"w-full max-w-lg space-y-1.5 max-h-[140px] overflow-y-auto px-4",children:z.failedItems.map(T=>n.jsxs("div",{className:"flex items-start gap-2 p-2.5 bg-red-50/60 rounded-xl border border-red-200/40",children:[n.jsx(xt,{size:12,className:"text-red-500 flex-shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] text-red-700 font-medium line-clamp-1",children:T.story}),n.jsx("p",{className:"text-[10px] text-red-400 mt-0.5",children:T.error})]})]},T.index))}),n.jsxs("div",{className:"flex gap-2 pt-2",children:[n.jsxs(re,{size:"sm",onClick:()=>s("/tests"),children:["Open Test Editor ",n.jsx(tn,{size:13})]}),n.jsxs(re,{variant:"secondary",size:"sm",onClick:()=>{C(null),v(""),O([])},children:[n.jsx(Se,{size:13})," Start Over"]})]})]})]})]})]}),e==="swagger"&&n.jsxs("div",{className:"space-y-3 animate-fade-in",children:[n.jsx("div",{className:"flex items-center gap-2.5 px-1",children:[{n:1,label:"Fetch Spec",done:!!G},{n:2,label:"Configure",done:!1},{n:3,label:"Generate",done:!1}].map((T,ee,be)=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:S("w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold transition-all",T.done?"bg-emerald-500 text-white":"bg-surface-inset text-content-tertiary border border-border"),children:T.done?n.jsx(Ue,{size:12}):T.n}),n.jsx("span",{className:S("text-xs font-semibold",T.done?"text-emerald-600":"text-content-tertiary"),children:T.label})]}),ee<be.length-1&&n.jsx("div",{className:S("w-12 h-px",T.done?"bg-emerald-300":"bg-border")})]},T.n))}),n.jsxs("div",{className:"grid grid-cols-5 gap-3",children:[n.jsxs("div",{className:"col-span-3 rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-emerald-100 flex items-center justify-center",children:n.jsx(Or,{size:14,className:"text-emerald-600"})}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"API Specification URL"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{className:"flex-1 rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50 placeholder-content-tertiary transition-all",placeholder:"https://api.example.com/v2/api-docs",value:L,onChange:T=>{Z(T.target.value),$(null)}}),n.jsxs(re,{variant:"secondary",size:"sm",onClick:()=>Ke.mutate(),loading:Ke.isPending,disabled:!L.trim()||Ke.isPending,children:[n.jsx(cd,{size:14})," Fetch & Parse"]})]}),Ke.isError&&n.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-xl bg-red-50/60 border border-red-200/40 text-xs text-red-600",children:[n.jsx(xt,{size:13,className:"flex-shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"font-medium",children:Ke.error.message}),n.jsx("p",{className:"text-[10px] text-red-400 mt-0.5",children:"Tip: Use the direct spec URL, not a portal page. Check DevTools → Network."})]})]})]}),n.jsxs("div",{className:"col-span-2 rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-violet-100 flex items-center justify-center",children:n.jsx(fn,{size:14,className:"text-violet-600"})}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Extra Requirements"}),n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"Optional"})]}),n.jsx("textarea",{className:"w-full rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 resize-none placeholder-content-tertiary leading-relaxed",rows:3,placeholder:"e.g. Include Bearer auth, test 400/401/404 errors, validate response schemas…",value:se,onChange:T=>H(T.target.value)})]})]}),G&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"rounded-xl border border-emerald-200/50 bg-gradient-to-r from-emerald-50/40 via-surface to-teal-50/20 p-3.5 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-6 h-6 rounded-lg bg-emerald-500 flex items-center justify-center",children:n.jsx(Ue,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-bold text-content",children:G.title}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5",children:G.baseUrl})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"text-center px-3",children:[n.jsx("p",{className:"text-base font-bold text-emerald-600 tabular-nums",children:G.totalEndpoints}),n.jsx("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest",children:"Endpoints"})]}),n.jsx("div",{className:"w-px h-6 bg-border"}),n.jsxs("div",{className:"text-center px-2",children:[n.jsx("p",{className:"text-base font-bold text-teal-600 tabular-nums",children:G.tags.length}),n.jsx("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest",children:"Tags"})]})]})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx(ry,{size:11,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest",children:"Filter by tag"}),W.trim()&&n.jsx("button",{type:"button",onClick:()=>M(""),className:"text-[9px] text-accent hover:text-accent-dark font-semibold ml-1",children:"Clear all"})]}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:G.tags.map(T=>{const ee=W.split(",").map(jt=>jt.trim()).filter(Boolean),be=ee.includes(T),Tn=G.endpoints.filter(jt=>jt.tag===T).length;return n.jsxs("button",{type:"button",onClick:()=>{M(be?ee.filter(jt=>jt!==T).join(", "):[...ee,T].join(", "))},className:S("inline-flex items-center gap-1.5 text-[10px] px-2.5 py-1.5 rounded-lg border font-semibold transition-all",be?"bg-accent text-white border-accent shadow-sm shadow-accent/20":"bg-surface text-content-secondary border-border hover:border-accent/40"),children:[T,n.jsx("span",{className:S("text-[9px] px-1 py-px rounded font-bold",be?"bg-white/20 text-white":"bg-surface-inset text-content-tertiary"),children:Tn})]},T)})})]})]}),n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsx("div",{className:"max-h-[220px] overflow-y-auto",children:n.jsxs("table",{className:"w-full text-xs",children:[n.jsx("thead",{className:"bg-surface-inset/50 sticky top-0 border-b border-border",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest w-20",children:"Method"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Path"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Summary"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest w-16",children:"Tag"})]})}),n.jsx("tbody",{children:G.endpoints.filter(T=>W.trim()?W.split(",").map(ee=>ee.trim()).filter(Boolean).includes(T.tag):!0).map((T,ee)=>n.jsxs("tr",{className:"border-t border-border-muted hover:bg-surface-inset/30 transition-colors",children:[n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:S("font-mono font-bold text-[10px] px-2 py-0.5 rounded-md ring-1",z5[T.method]||"bg-surface-inset text-content-secondary ring-border"),children:T.method})}),n.jsx("td",{className:"px-4 py-2.5 font-mono text-content-secondary text-[11px]",children:T.path}),n.jsx("td",{className:"px-4 py-2.5 text-content-tertiary truncate max-w-[240px]",children:T.summary}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-[9px] text-content-tertiary bg-surface-inset px-1.5 py-0.5 rounded",children:T.tag})})]},ee))})]})})}),n.jsx("div",{className:"rounded-xl border border-border bg-surface p-3.5",children:n.jsxs("div",{className:"flex items-end gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-bold text-content mb-2 block",children:"Suite Name"}),n.jsx("input",{className:"w-full rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 placeholder-content-tertiary",placeholder:"e.g. Payment API Tests",value:ie,onChange:T=>R(T.target.value)})]}),n.jsxs(re,{onClick:()=>nn.mutate(),loading:nn.isPending,disabled:nn.isPending,children:[n.jsx(Ot,{size:14})," Generate Suite"]})]})})]}),nn.isError&&n.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-red-50/60 border border-red-200/40 text-xs text-red-600",children:[n.jsx(xt,{size:14,className:"flex-shrink-0 mt-0.5"}),n.jsx("span",{className:"font-medium",children:nn.error.message})]}),!G&&n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(Pf,{title:"Supported Formats",icon:xf,defaultOpen:!0,children:n.jsx("div",{className:"space-y-1.5",children:["OpenAPI 3.x (JSON / YAML)","Swagger 2.0 (JSON / YAML)","Direct URL, Swagger UI, or /api-docs"].map(T=>n.jsxs("div",{className:"flex items-center gap-2 text-xs text-content-secondary",children:[n.jsx(Ue,{size:10,className:"text-emerald-500 flex-shrink-0"}),T]},T))})}),n.jsx(Pf,{title:"Pro Tips",icon:Be,defaultOpen:!0,children:n.jsx("div",{className:"space-y-1.5",children:["Use the raw spec URL, not a portal page","Filter by tags to import only relevant endpoints","Generated steps use page.request API","Chained tests use context.setVariable"].map(T=>n.jsxs("div",{className:"flex items-start gap-2 text-xs text-content-secondary",children:[n.jsx(dr,{size:9,className:"text-accent flex-shrink-0 mt-0.5"}),T]},T))})})]})]})]})})})}function ec({checked:e,onChange:t,label:s,disabled:r}){return n.jsxs("label",{className:S("inline-flex items-center gap-2.5 cursor-pointer select-none",r&&"opacity-40 cursor-not-allowed"),children:[n.jsx("button",{type:"button",role:"switch","aria-checked":e,disabled:r,onClick:()=>t(!e),className:S("relative inline-flex h-[22px] w-10 items-center rounded-full transition-all duration-200","focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus:outline-none",e?"bg-gradient-to-r from-accent to-accent-dark":"bg-slate-200"),children:n.jsx("span",{className:S("inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform duration-200",e?"translate-x-[21px]":"translate-x-[3px]")})}),s&&n.jsx("span",{className:"text-sm text-content-secondary",children:s})]})}const T5=[{id:"github",label:"GitHub Actions"},{id:"gitlab",label:"GitLab CI"},{id:"jenkins",label:"Jenkins"}];function O5({open:e,onClose:t,runConfig:s}){var x,f,g,b;const[r,a]=m.useState("github"),[i,l]=m.useState(!1),o=X({mutationFn:y=>sw.generate({platform:y,browsers:(s==null?void 0:s.browsers)??["chromium"],parallel:(s==null?void 0:s.parallel)??2,device:(s==null?void 0:s.device)||void 0}),onError:y=>A.error(y.message)});m.useEffect(()=>{e&&o.mutate(r)},[e,r]);const c=()=>{var y;(y=o.data)!=null&&y.yaml&&navigator.clipboard.writeText(o.data.yaml).then(()=>{l(!0),A.success("Copied to clipboard"),setTimeout(()=>l(!1),2e3)})},d=()=>{var h;if(!((h=o.data)!=null&&h.yaml))return;const y=new Blob([o.data.yaml],{type:"text/plain"}),v=URL.createObjectURL(y),N=document.createElement("a");N.href=v,N.download=o.data.filename??`${r}-ci.yml`,document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(v)};return e?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-2xl mx-4 overflow-hidden flex flex-col max-h-[85vh]",onClick:y=>y.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-bold text-content",children:"CI Config Generator"}),n.jsx("p",{className:"text-[11px] text-content-tertiary mt-0.5",children:"Generate configuration for your CI/CD pipeline"})]}),n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset hover:text-content transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"flex border-b border-border px-5 flex-shrink-0",children:T5.map(y=>n.jsx("button",{type:"button",onClick:()=>a(y.id),className:S("px-4 py-2.5 text-xs font-semibold border-b-2 transition-colors -mb-px",r===y.id?"border-accent text-accent":"border-transparent text-content-secondary hover:text-content"),children:y.label},y.id))}),n.jsx("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:o.isPending?n.jsx("div",{className:"h-48 flex items-center justify-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"Generating..."})}):(x=o.data)!=null&&x.yaml?n.jsx("pre",{className:"bg-[#1e1e2e] text-[#cdd6f4] text-xs font-mono p-4 rounded-xl overflow-auto whitespace-pre leading-relaxed",children:o.data.yaml}):n.jsx("div",{className:"h-48 flex items-center justify-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"No config generated yet"})})}),n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border bg-surface-inset/30 flex-shrink-0",children:[((f=o.data)==null?void 0:f.filename)&&n.jsx("span",{className:"text-[11px] text-content-tertiary font-mono",children:o.data.filename}),n.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[n.jsxs("button",{type:"button",onClick:c,disabled:!((g=o.data)!=null&&g.yaml),className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors","border-border text-content-secondary hover:bg-surface-inset disabled:opacity-40"),children:[i?n.jsx(_e,{size:12,className:"text-emerald-500"}):n.jsx(hm,{size:12}),i?"Copied!":"Copy"]}),n.jsxs("button",{type:"button",onClick:d,disabled:!((b=o.data)!=null&&b.yaml),className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors","bg-accent text-white hover:brightness-110 disabled:opacity-40"),children:[n.jsx(kc,{size:12}),"Download"]})]})]})]})}):null}const zf=500;let tc=new Map,ol=new Map,kr=[],km=0;const ix=new Set;function lx(){km++,ix.forEach(e=>e())}let nc={screenshot:null,screenshots:new Map,consoleLogs:[],consoleLogsByCase:new Map,activeCaseIds:[],_v:-1};function A5(){const e=kr[kr.length-1],t=e?tc.get(e)??null:null,s=Array.from(ol.values()).flat().sort((r,a)=>r.timestamp-a.timestamp);return nc={screenshot:t,screenshots:new Map(tc),consoleLogs:s,consoleLogsByCase:new Map(ol),activeCaseIds:[...kr],_v:km},nc}const Rd={subscribe(e){return ix.add(e),()=>{ix.delete(e)}},getSnapshot(){return nc._v!==km?A5():nc},reset(){tc=new Map,ol=new Map,kr=[],lx()}};function _y(){const e=m.useSyncExternalStore(Rd.subscribe,Rd.getSnapshot),t=m.useCallback(a=>{const i=a;tc.set(i.caseId,i.image),kr.includes(i.caseId)||(kr=[...kr,i.caseId]),lx()},[]),s=m.useCallback(a=>{const i=a,o=[...ol.get(i.caseId)??[],...i.logs];o.length>zf&&o.splice(0,o.length-zf),ol.set(i.caseId,o),lx()},[]);qr({"run:screenshot":t,"run:console":s});const r=m.useCallback(()=>{Rd.reset()},[]);return{screenshot:e.screenshot,screenshots:e.screenshots,consoleLogs:e.consoleLogs,consoleLogsByCase:e.consoleLogsByCase,activeCaseIds:e.activeCaseIds,reset:r}}let _n=[],ox=0;const cx=new Set;function dx(){ox++,cx.forEach(e=>e())}let Md={steps:[],_v:-1};const Td={subscribe(e){return cx.add(e),()=>{cx.delete(e)}},getSnapshot(){return Md._v!==ox&&(Md={steps:_n,_v:ox}),Md},reset(){_n=[],dx()}};function $y(){const e=m.useSyncExternalStore(Td.subscribe,Td.getSnapshot),t=m.useCallback(a=>{const i=a;if(i.status!=="running"){if(_n.some(l=>l.stepId===i.stepId&&l.status===i.status))return;_n=[..._n,{...i,timestamp:Date.now()}],_n.length>200&&(_n=_n.slice(-200)),dx()}},[]),s=m.useCallback(()=>{_n=[],dx()},[]);qr({"run:step":t,"run:start":s});const r=m.useCallback(()=>{Td.reset()},[]);return{stepLogs:e.steps,reset:r}}function Uy(e){const[t,s]=m.useState(0),r=m.useRef(null);m.useEffect(()=>(e?(s(0),r.current=setInterval(()=>s(l=>l+1),1e3)):r.current&&(clearInterval(r.current),r.current=null),()=>{r.current&&clearInterval(r.current)}),[e]);const a=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${a}:${i}`}function qa({browser:e,size:t=16,className:s=""}){const r=(e??"").toLowerCase();return r.includes("chromium")||r.includes("chrome")?n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",fill:"#4285F4"}),n.jsx("path",{d:"M24 14.4h16.97A22 22 0 0 0 24 2 22 22 0 0 0 5.56 33.6L14.08 19A11.6 11.6 0 0 1 24 14.4z",fill:"#EA4335"}),n.jsx("path",{d:"M14.08 19L5.56 33.6A22 22 0 0 0 24 46a22 22 0 0 0 8.52-1.7L24 30.4A11.6 11.6 0 0 1 14.08 19z",fill:"#34A853"}),n.jsx("path",{d:"M24 30.4l8.52 13.9A22 22 0 0 0 40.97 14.4H24a11.6 11.6 0 0 1 8.52 16z",fill:"#FBBC05"}),n.jsx("circle",{cx:"24",cy:"24",r:"8",fill:"white"}),n.jsx("circle",{cx:"24",cy:"24",r:"5.5",fill:"#4285F4"})]}):r.includes("firefox")?n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",fill:"#FF9500"}),n.jsx("path",{d:"M38 16c-1-3-3.5-5.5-5-6.5.8 2 1 3.5.5 5-1-3-3-5-5.5-7.5-.5-.5-1-1-1-1.5 0-.2 0-.3-.2-.3-.1 0-.2.1-.2.2-3 5-1 9 .5 12-2-1-4.5-1-6.5 0-1-2-1-4.5 0-6.5-3 2-5 5-6 8-.2-.5-.3-1.5-.3-2-1.5 1.5-2.5 3.5-3 5.5A18 18 0 0 0 8 30c0 9 7.5 16 16 16s16-7 16-16c0-5-1-10-2-14z",fill:"#FF4500"}),n.jsx("path",{d:"M30 34c-1.5 1.5-4 2.5-6 2.5s-5-1-6.5-3A8 8 0 0 1 16 28c0-2.5 1.5-5 4-6 3-1.5 6-.5 8 1 2 1.5 3 4 3 6.5 0 1.5-.5 3-1 4.5z",fill:"#FFDC00"})]}):r.includes("webkit")||r.includes("safari")?n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",fill:"url(#safari-grad)"}),n.jsx("circle",{cx:"24",cy:"24",r:"18",fill:"white",fillOpacity:"0.15"}),n.jsx("circle",{cx:"24",cy:"24",r:"17",stroke:"white",strokeOpacity:"0.3",strokeWidth:"0.5",fill:"none"}),n.jsx("polygon",{points:"24,8 26,24 24,40 22,24",fill:"white",fillOpacity:"0.9"}),n.jsx("polygon",{points:"24,8 26,24 24,24",fill:"#FF3B30"}),n.jsx("polygon",{points:"24,40 22,24 24,24",fill:"#FF3B30"}),n.jsx("circle",{cx:"24",cy:"24",r:"2.5",fill:"white"}),n.jsx("defs",{children:n.jsxs("linearGradient",{id:"safari-grad",x1:"0",y1:"0",x2:"48",y2:"48",children:[n.jsx("stop",{offset:"0%",stopColor:"#00D4FF"}),n.jsx("stop",{offset:"100%",stopColor:"#0066FF"})]})})]}):n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",stroke:"#94a3b8",strokeWidth:"2",fill:"none"}),n.jsx("ellipse",{cx:"24",cy:"24",rx:"10",ry:"22",stroke:"#94a3b8",strokeWidth:"1.5",fill:"none"}),n.jsx("line",{x1:"2",y1:"24",x2:"46",y2:"24",stroke:"#94a3b8",strokeWidth:"1.5"}),n.jsx("line",{x1:"24",y1:"2",x2:"24",y2:"46",stroke:"#94a3b8",strokeWidth:"1.5"})]})}function Sm(e){const t=(e??"").toLowerCase();return t.includes("chromium")||t.includes("chrome")?"Chromium":t.includes("firefox")?"Firefox":t.includes("webkit")||t.includes("safari")?"WebKit":e??"Browser"}const By=[{id:"desktop-1920",name:"Full HD (1920×1080)",category:"desktop",viewport:{width:1920,height:1080}},{id:"desktop-1440",name:"QHD (1440×900)",category:"desktop",viewport:{width:1440,height:900}},{id:"desktop-1366",name:"Laptop (1366×768)",category:"desktop",viewport:{width:1366,height:768}},{id:"desktop-1280",name:"Default (1280×720)",category:"desktop",viewport:{width:1280,height:720}},{id:"desktop-768",name:"Small Laptop (1024×768)",category:"desktop",viewport:{width:1024,height:768}}],Hy=[{id:"iphone-15-pro",name:"iPhone 15 Pro",category:"mobile",viewport:{width:393,height:852},playwrightDevice:"iPhone 15 Pro",recommendedBrowser:"webkit",dpr:3},{id:"iphone-15",name:"iPhone 15",category:"mobile",viewport:{width:390,height:844},playwrightDevice:"iPhone 15",recommendedBrowser:"webkit",dpr:3},{id:"iphone-14",name:"iPhone 14",category:"mobile",viewport:{width:390,height:844},playwrightDevice:"iPhone 14",recommendedBrowser:"webkit",dpr:3},{id:"iphone-se",name:"iPhone SE",category:"mobile",viewport:{width:375,height:667},playwrightDevice:"iPhone SE",recommendedBrowser:"webkit",dpr:2},{id:"pixel-7",name:"Pixel 7",category:"mobile",viewport:{width:412,height:915},playwrightDevice:"Pixel 7",recommendedBrowser:"chromium",dpr:2.625},{id:"pixel-5",name:"Pixel 5",category:"mobile",viewport:{width:393,height:851},playwrightDevice:"Pixel 5",recommendedBrowser:"chromium",dpr:2.75},{id:"galaxy-s9",name:"Galaxy S9+",category:"mobile",viewport:{width:320,height:658},playwrightDevice:"Galaxy S9+",recommendedBrowser:"chromium",dpr:4.5},{id:"galaxy-s8",name:"Galaxy S8",category:"mobile",viewport:{width:360,height:740},playwrightDevice:"Galaxy S8",recommendedBrowser:"chromium",dpr:3}],qy=[{id:"ipad-pro-11",name:'iPad Pro 11"',category:"tablet",viewport:{width:834,height:1194},playwrightDevice:"iPad Pro 11",recommendedBrowser:"webkit",dpr:2},{id:"ipad-gen7",name:"iPad (gen 7)",category:"tablet",viewport:{width:810,height:1080},playwrightDevice:"iPad (gen 7)",recommendedBrowser:"webkit",dpr:2},{id:"ipad-mini",name:"iPad Mini",category:"tablet",viewport:{width:768,height:1024},playwrightDevice:"iPad Mini",recommendedBrowser:"webkit",dpr:2},{id:"galaxy-tab-s4",name:"Galaxy Tab S4",category:"tablet",viewport:{width:712,height:1138},playwrightDevice:"Galaxy Tab S4",recommendedBrowser:"chromium",dpr:2.25}],ux=[...By,...Hy,...qy];function Ky(e){if(e)return ux.find(t=>t.playwrightDevice===e)??ux.find(t=>t.id===e)}const D5=[{mode:"all",label:"All Tests",desc:"Every suite & case",icon:B2},{mode:"suite",label:"By Suite",desc:"Specific test suite",icon:fn},{mode:"tag",label:"By Tag",desc:"Match by tag",icon:ry},{mode:"test",label:"Single Test",desc:"One test by name",icon:fn}];function I5(e=60){const[t,s]=m.useState(e),r=m.useRef(!1),a=m.useCallback(i=>{i.preventDefault(),r.current=!0;const l=c=>{if(!r.current)return;const x=i.target.parentElement.getBoundingClientRect(),f=(c.clientX-x.left)/x.width*100;s(Math.max(30,Math.min(80,f)))},o=()=>{r.current=!1,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",l),window.addEventListener("mouseup",o)},[]);return{leftPct:t,onMouseDown:a}}function L5(e=55){const[t,s]=m.useState(e),r=m.useRef(!1),a=m.useCallback(i=>{i.preventDefault(),r.current=!0;const l=c=>{if(!r.current)return;const x=i.target.parentElement.getBoundingClientRect(),f=(c.clientY-x.top)/x.height*100;s(Math.max(25,Math.min(75,f)))},o=()=>{r.current=!1,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",l),window.addEventListener("mouseup",o)},[]);return{topPct:t,onMouseDown:a}}const Rf={log:"text-slate-300",info:"text-blue-400",warn:"text-amber-400",error:"text-red-400",debug:"text-slate-500",default:"text-slate-400"},Mf={log:"text-slate-500",info:"text-blue-500",warn:"text-amber-500",error:"text-red-500",debug:"text-slate-600"};function F5(){const[e,t]=m.useState("all"),[s,r]=m.useState(""),[a,i]=m.useState(""),[l,o]=m.useState(""),[c,d]=m.useState(["chromium"]),[x,f]=m.useState(!0),[g,b]=m.useState(!1),[y,v]=m.useState(2),[N,h]=m.useState("only-on-failure"),[u,p]=m.useState("off"),[j,w]=m.useState("off"),[z,C]=m.useState(""),[P,_]=m.useState(!1),[I,Q]=m.useState(!0),[J,O]=m.useState(!1),{data:E=[]}=ke({queryKey:["suites"],queryFn:()=>$r.list()}),L=jm(),Z=_y(),ie=Tc(),R=ie.runningSuiteId!==null||ie.runningCaseIds.size>0,W=P||L.isRunning||R,M=Uy(W),G=W||L.completed;m.useEffect(()=>{P&&(L.isRunning||L.completed)&&_(!1)},[P,L.isRunning,L.completed]);const $=X({mutationFn:me=>sl.start(me),onError:me=>{_(!1),A.error(me.message)}}),se=me=>{d(Ce=>Ce.includes(me)?Ce.length>1?Ce.filter(Ke=>Ke!==me):Ce:[...Ce,me])},H=()=>{L.reset(),Z.reset(),gt.clear(),_(!0);const me={browsers:c,headed:x,noHealing:g,parallel:y,screenshot:N,video:u,trace:j};e==="all"&&(me.all=!0),e==="suite"&&s&&(me.suite=s),e==="tag"&&a&&(me.tag=a),e==="test"&&l&&(me.test=l),z&&(me.device=z),$.mutate(me)},fe=()=>{L.reset(),Z.reset(),gt.clear()},de=()=>{A.success("Browser is running in headed mode — check your taskbar")};return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[G?n.jsx($5,{progress:L,live:Z,elapsed:M,runActive:W,onRunAgain:fe,onOpenExternal:de}):n.jsx(_5,{mode:e,setMode:t,suiteId:s,setSuiteId:r,tag:a,setTag:i,testName:l,setTestName:o,browsers:c,toggleBrowser:se,headed:x,setHeaded:f,noHealing:g,setNoHealing:b,parallel:y,setParallel:v,screenshot:N,setScreenshot:h,video:u,setVideo:p,trace:j,setTrace:w,device:z,setDevice:C,suites:E,runActive:W,optionsOpen:I,setOptionsOpen:Q,onRun:H,submitting:P,onCiConfig:()=>O(!0)}),n.jsx(O5,{open:J,onClose:()=>O(!1),runConfig:{browsers:c,parallel:y,device:z||void 0}})]})}function _5(e){const{mode:t,setMode:s,suiteId:r,setSuiteId:a,tag:i,setTag:l,testName:o,setTestName:c,browsers:d,toggleBrowser:x,headed:f,setHeaded:g,noHealing:b,setNoHealing:y,parallel:v,setParallel:N,screenshot:h,setScreenshot:u,video:p,setVideo:j,trace:w,setTrace:z,device:C,setDevice:P,suites:_,runActive:I,onRun:Q,submitting:J,onCiConfig:O}=e,[E,L]=m.useState("all"),Z=Ky(C||void 0),R=((Z==null?void 0:Z.category)==="mobile"||(Z==null?void 0:Z.category)==="tablet")&&!d.includes("chromium"),W=E==="all"?ux:E==="desktop"?By:E==="mobile"?Hy:qy;return n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-emerald-500 to-cyan-600 flex items-center justify-center shadow-sm shadow-emerald-500/20",children:n.jsx(Tt,{size:17,className:"text-white translate-x-0.5"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Run Configuration"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Configure and launch your test run"})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(re,{size:"sm",variant:"secondary",onClick:O,children:"CI Config"}),n.jsxs(re,{size:"sm",onClick:Q,loading:J,disabled:I,children:[n.jsx(Tt,{size:10})," Start Run"]})]})]})}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-3",children:[n.jsxs("div",{className:"lg:col-span-3 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center",children:n.jsx(Be,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Run Mode"})]}),n.jsxs("div",{className:"p-3 space-y-2.5",children:[n.jsx("div",{className:"grid grid-cols-2 gap-2",children:D5.map(({mode:M,label:G,desc:$,icon:se})=>n.jsxs("button",{type:"button",onClick:()=>!I&&s(M),disabled:I,className:S("flex items-start gap-2 p-2.5 rounded-lg border text-left transition-all",I&&"opacity-50 cursor-not-allowed",t===M?"border-accent bg-accent/5 ring-1 ring-accent/20":"border-border hover:border-slate-300 hover:bg-surface-inset/30"),children:[n.jsx(se,{size:12,className:S("flex-shrink-0 mt-0.5",t===M?"text-accent":"text-content-tertiary")}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-[11px] font-semibold",t===M?"text-accent":"text-content-secondary"),children:G}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:$})]})]},M))}),t==="suite"&&!I&&n.jsxs("select",{value:r,onChange:M=>a(M.target.value),className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",children:[n.jsx("option",{value:"",children:"Select a suite..."}),_.map(M=>n.jsx("option",{value:M.name,children:M.name},M.id))]}),t==="tag"&&!I&&n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"e.g. smoke",value:i,onChange:M=>l(M.target.value)}),t==="test"&&!I&&n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"e.g. Login with valid credentials",value:o,onChange:M=>c(M.target.value)})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center",children:n.jsx(Or,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Browsers"})]}),n.jsx("div",{className:"p-3",children:n.jsx("div",{className:"flex gap-2 flex-wrap",children:oy.map(M=>n.jsxs("button",{type:"button",onClick:()=>!I&&x(M),disabled:I,className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg border text-[11px] capitalize transition-all font-medium",I&&"opacity-50 cursor-not-allowed",d.includes(M)?"border-accent bg-accent/10 text-accent ring-1 ring-accent/20":"border-border text-content-secondary hover:border-slate-300"),children:[n.jsx(qa,{browser:M,size:14}),Sm(M)]},M))})})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-teal-500 to-cyan-600 flex items-center justify-center",children:n.jsx(Ni,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Device Emulation"}),Z&&n.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-teal-50 text-teal-600 ring-1 ring-teal-200 text-[9px] font-semibold",children:[Z.category==="mobile"?n.jsx(Ni,{size:8}):Z.category==="tablet"?n.jsx(fo,{size:8}):n.jsx(ha,{size:8}),Z.name]})]}),Z&&n.jsx("button",{type:"button",onClick:()=>P(""),disabled:I,className:"text-content-tertiary hover:text-content-secondary transition-colors disabled:opacity-50",title:"Clear device",children:n.jsx(Se,{size:12})})]}),n.jsxs("div",{className:"p-3 space-y-2.5",children:[R&&n.jsxs("div",{className:"flex items-start gap-2 px-2.5 py-2 rounded-lg bg-amber-50 border border-amber-200",children:[n.jsx(Xt,{size:12,className:"text-amber-500 flex-shrink-0 mt-0.5"}),n.jsxs("p",{className:"text-[10px] text-amber-700 leading-relaxed",children:["Mobile/tablet emulation works best with ",n.jsx("strong",{children:"Chromium"}),". Touch events and mobile UA may not work correctly in Firefox or WebKit."]})]}),n.jsx("div",{className:"flex gap-1 p-0.5 bg-surface-inset rounded-lg",children:[{id:"all",label:"All",icon:null},{id:"desktop",label:"Desktop",icon:ha},{id:"mobile",label:"Mobile",icon:Ni},{id:"tablet",label:"Tablet",icon:fo}].map(({id:M,label:G,icon:$})=>n.jsxs("button",{type:"button",onClick:()=>L(M),disabled:I,className:S("flex-1 flex items-center justify-center gap-1 py-1 rounded-md text-[9px] font-semibold transition-all disabled:opacity-50",E===M?"bg-surface shadow-sm text-content":"text-content-tertiary hover:text-content-secondary"),children:[$&&n.jsx($,{size:9}),G]},M))}),n.jsxs("div",{className:"grid grid-cols-2 gap-1.5 max-h-44 overflow-y-auto pr-0.5",children:[(E==="all"||E==="desktop")&&n.jsxs("button",{type:"button",onClick:()=>!I&&P(""),disabled:I,className:S("flex flex-col items-start gap-0.5 p-2 rounded-lg border text-left transition-all disabled:opacity-50",C?"border-border hover:border-slate-300 hover:bg-surface-inset/30":"border-teal-400 bg-teal-50 ring-1 ring-teal-300"),children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(ha,{size:10,className:C?"text-content-tertiary":"text-teal-500"}),n.jsx("span",{className:S("text-[10px] font-semibold",C?"text-content-secondary":"text-teal-600"),children:"No Emulation"})]}),n.jsx("span",{className:"text-[9px] text-content-tertiary",children:"Use config viewport"})]}),W.map(M=>{const G=C===(M.playwrightDevice??M.id),$=M.category==="mobile"?Ni:M.category==="tablet"?fo:ha;return n.jsxs("button",{type:"button",onClick:()=>!I&&P(M.playwrightDevice??M.id),disabled:I,className:S("flex flex-col items-start gap-0.5 p-2 rounded-lg border text-left transition-all disabled:opacity-50",G?"border-teal-400 bg-teal-50 ring-1 ring-teal-300":"border-border hover:border-slate-300 hover:bg-surface-inset/30"),children:[n.jsxs("div",{className:"flex items-center gap-1 w-full",children:[n.jsx($,{size:10,className:G?"text-teal-500":"text-content-tertiary"}),n.jsx("span",{className:S("text-[10px] font-semibold truncate flex-1",G?"text-teal-600":"text-content-secondary"),children:M.name}),M.recommendedBrowser&&M.category!=="desktop"&&n.jsx("span",{className:S("text-[8px] px-1 py-0.5 rounded font-medium flex-shrink-0",M.recommendedBrowser==="webkit"?"bg-slate-100 text-slate-500":"bg-blue-50 text-blue-500"),children:M.recommendedBrowser==="webkit"?"Safari":"Chrome"})]}),n.jsxs("span",{className:"text-[9px] text-content-tertiary",children:[M.viewport.width,"×",M.viewport.height,M.dpr?` @${M.dpr}x`:""]})]},M.id)})]})]})]})]}),n.jsxs("div",{className:"lg:col-span-2 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-slate-500 to-slate-700 flex items-center justify-center",children:n.jsx(Ba,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Options"})]}),n.jsxs("div",{className:"p-3 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-medium text-content-secondary",children:"Headed mode"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Show browser window"})]}),n.jsx(ec,{checked:f,onChange:g,disabled:I})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(gm,{size:10,className:"text-amber-500"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-medium text-content-secondary",children:"Disable self-healing"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Skip AI healing"})]})]}),n.jsx(ec,{checked:b,onChange:y,disabled:I})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(E2,{size:10,className:"text-blue-500"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-medium text-content-secondary",children:"Parallel workers"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Concurrent cases"})]})]}),n.jsx("input",{type:"number",min:1,max:10,value:v,disabled:I,onChange:M=>N(Number(M.target.value)),className:"w-12 text-xs border border-border rounded-lg px-1.5 py-1 text-center focus:outline-none focus:ring-2 focus:ring-accent/30 disabled:opacity-50 bg-surface"})]})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-pink-500 to-rose-600 flex items-center justify-center",children:n.jsx(Mr,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Capture"})]}),n.jsx("div",{className:"p-3 space-y-2",children:[{label:"Screenshot",icon:Mr,cls:"text-blue-400",val:h,set:u,opts:[["off","Off"],["on","Every test"],["only-on-failure","On failure"]]},{label:"Video",icon:zc,cls:"text-purple-400",val:p,set:j,opts:[["off","Off"],["on","Every test"],["on-first-retry","1st retry"],["retain-on-failure","On failure"]]},{label:"Trace",icon:sy,cls:"text-emerald-400",val:w,set:z,opts:[["off","Off"],["on","Every test"],["on-first-retry","1st retry"],["retain-on-failure","On failure"]]}].map(({label:M,icon:G,cls:$,val:se,set:H,opts:fe})=>n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-content-secondary min-w-0 flex-shrink-0 font-medium",children:[n.jsx(G,{size:11,className:$}),M]}),n.jsx("select",{value:se,disabled:I,onChange:de=>H(de.target.value),className:"flex-1 border border-border rounded-lg px-2 py-1 text-[10px] focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface disabled:opacity-50 min-w-0",children:fe.map(([de,me])=>n.jsx("option",{value:de,children:me},de))})]},M))})]}),n.jsxs(re,{size:"lg",onClick:Q,loading:J,disabled:I,className:"w-full",children:[n.jsx(Tt,{size:14})," Start Test Run"]})]})]})]})})}function $5({progress:e,live:t,elapsed:s,runActive:r,onRunAgain:a,onOpenExternal:i}){const{leftPct:l,onMouseDown:o}=I5(60),{topPct:c,onMouseDown:d}=L5(55),x=m.useRef(null),[f,g]=m.useState("steps"),{stepLogs:b}=$y(),[y,v]=m.useState(null),N=t.activeCaseIds.length>1;m.useEffect(()=>{t.activeCaseIds.length>0&&!y&&v(t.activeCaseIds[0])},[t.activeCaseIds,y]);const h=N&&y?b.filter(p=>p.caseId===y):b,u=N&&y?t.consoleLogsByCase.get(y)??[]:t.consoleLogs;return m.useEffect(()=>{var p;(p=x.current)==null||p.scrollIntoView({behavior:"smooth"})},[h.length,u.length]),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[n.jsx(U5,{elapsed:s,runActive:r,progress:e,onRunAgain:a}),N?n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative",style:{minHeight:0},children:[n.jsxs("div",{className:"overflow-y-auto bg-slate-900 flex flex-col",style:{height:`${c}%`},children:[n.jsxs("div",{className:"flex-shrink-0 h-8 bg-slate-800 border-b border-slate-700 flex items-center justify-between px-3",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500/80"}),n.jsxs("span",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider ml-2",children:["Browser Previews — ",t.activeCaseIds.length," running"]})]}),n.jsx("button",{type:"button",onClick:i,title:"Open in external browser",className:"p-1 rounded text-slate-400 hover:text-white hover:bg-slate-700 transition-colors",children:n.jsx(Ya,{size:11})})]}),n.jsx("div",{className:"flex flex-col gap-0 flex-1",children:t.activeCaseIds.map((p,j)=>{const w=t.screenshots.get(p),z=e.activeCases.get(p)??p.slice(0,8),C=y===p,P=j===t.activeCaseIds.length-1;return n.jsxs("div",{className:S("flex flex-col cursor-pointer transition-all",!P&&"border-b border-slate-700",C&&"ring-inset ring-2 ring-accent"),onClick:()=>v(p),children:[n.jsxs("div",{className:S("flex items-center justify-between px-3 py-1.5 flex-shrink-0",C?"bg-accent/10 border-b border-accent/30":"bg-slate-800/60 border-b border-slate-700"),children:[n.jsxs("div",{className:"flex items-center gap-2",children:[e.currentBrowser&&n.jsx(qa,{browser:e.currentBrowser,size:12}),n.jsx("span",{className:"text-[10px] font-mono text-slate-300 truncate max-w-xs",children:z})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[C&&n.jsx("span",{className:"text-[8px] font-semibold text-accent uppercase tracking-wider",children:"Selected"}),r&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"})]})]}),n.jsx("div",{className:"relative bg-slate-950 flex-1",children:w?n.jsx("img",{src:`data:image/jpeg;base64,${w}`,alt:z,className:"w-full h-auto object-contain"}):n.jsxs("div",{className:"h-32 flex items-center justify-center gap-2",children:[n.jsx(ce,{size:14,className:"text-slate-600 animate-spin"}),n.jsx("span",{className:"text-[10px] text-slate-600",children:"Waiting for screenshot..."})]})})]},p)})})]}),n.jsxs("div",{className:"flex-shrink-0 h-1.5 bg-slate-700 hover:bg-accent cursor-row-resize flex items-center justify-center transition-colors group relative",onMouseDown:d,children:[n.jsx("div",{className:"absolute inset-x-0 -top-1.5 -bottom-1.5"}),n.jsx("div",{className:"flex gap-0.5",children:n.jsx("div",{className:"w-4 h-0.5 rounded-full bg-slate-500 group-hover:bg-white transition-colors"})})]}),n.jsxs("div",{className:"flex flex-col bg-[#1a1b26] overflow-hidden",style:{height:`${100-c}%`},children:[n.jsx("div",{className:"flex-shrink-0 flex items-center gap-1 px-2 py-1 bg-[#16172a] border-b border-slate-700 overflow-x-auto",children:t.activeCaseIds.map(p=>{const j=e.activeCases.get(p)??p.slice(0,8),w=y===p;return n.jsx("button",{type:"button",onClick:()=>v(p),className:S("px-2 py-0.5 rounded text-[8px] font-mono truncate max-w-[160px] transition-colors flex-shrink-0",w?"bg-accent/20 text-accent ring-1 ring-accent/30":"text-slate-500 hover:text-slate-300 hover:bg-slate-800"),children:j},p)})}),n.jsx(Of,{tab:f,setTab:g,stepCount:h.length,logCount:u.length}),n.jsx(Af,{tab:f,stepLogs:h,consoleLogs:u,endRef:x}),e.completed&&!r&&n.jsx("div",{className:"flex-shrink-0 border-t border-slate-700 p-3",children:n.jsx(Tf,{completed:e.completed,onRunAgain:a})})]})]}):n.jsxs("div",{className:"flex flex-1 overflow-hidden relative",style:{minHeight:0},children:[n.jsxs("div",{className:"flex flex-col bg-slate-900 overflow-hidden",style:{width:`${l}%`},children:[n.jsx(B5,{onOpenExternal:i,browser:e.currentBrowser}),n.jsxs("div",{className:"flex-1 relative overflow-hidden flex items-center justify-center",children:[t.screenshot?n.jsx("img",{src:`data:image/jpeg;base64,${t.screenshot}`,alt:"Browser",className:S("max-w-full max-h-full object-contain",e.completed&&!r&&"opacity-30")}):r?n.jsx(H5,{progress:e}):null,e.completed&&!r&&n.jsx("div",{className:S("w-full",t.screenshot?"absolute inset-0 flex items-center justify-center bg-black/50 backdrop-blur-sm":"p-6"),children:n.jsx(Tf,{completed:e.completed,onRunAgain:a})}),n.jsx(q5,{step:e.currentStep})]})]}),n.jsx(K5,{onMouseDown:o}),n.jsxs("div",{className:"flex flex-col bg-[#1a1b26] overflow-hidden",style:{width:`${100-l}%`},children:[n.jsx(Of,{tab:f,setTab:g,stepCount:h.length,logCount:u.length}),n.jsx(Af,{tab:f,stepLogs:h,consoleLogs:u,endRef:x})]})]})]})}function Tf({completed:e,onRunAgain:t}){const s=e.failed===0;return n.jsxs("div",{className:S("w-full max-w-sm rounded-2xl border p-5 shadow-lg",s?"border-emerald-500/30 bg-emerald-950/80":"border-red-500/30 bg-red-950/80"),children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s?n.jsx(Ue,{size:22,className:"text-emerald-400 flex-shrink-0"}):n.jsx(xt,{size:22,className:"text-red-400 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-sm font-bold",s?"text-emerald-300":"text-red-300"),children:s?"All tests passed!":"Run completed with failures"}),n.jsxs("p",{className:S("text-[10px]",s?"text-emerald-400/70":"text-red-400/70"),children:["Finished in ",Math.round(e.duration/1e3),"s"]})]})]}),n.jsx("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[{label:"Passed",value:e.passed,color:"text-emerald-400",bg:"bg-emerald-500/10 ring-emerald-500/20"},{label:"Failed",value:e.failed,color:"text-red-400",bg:"bg-red-500/10 ring-red-500/20"},{label:"Skipped",value:e.skipped,color:"text-slate-400",bg:"bg-slate-500/10 ring-slate-500/20"}].map(({label:r,value:a,color:i,bg:l})=>n.jsxs("div",{className:S("rounded-xl p-2.5 text-center ring-1",l),children:[n.jsx("p",{className:S("text-lg font-bold tabular-nums",i),children:a}),n.jsx("p",{className:"text-[8px] text-slate-400 uppercase tracking-wider",children:r})]},r))}),n.jsxs("button",{type:"button",onClick:t,className:"w-full flex items-center justify-center gap-2 py-2 rounded-xl ring-1 ring-slate-600 bg-slate-800 hover:bg-slate-700 transition-all text-xs font-medium text-slate-300 hover:text-white",children:[n.jsx(Cc,{size:11})," Run Again"]})]})}function U5({elapsed:e,runActive:t,progress:s,onRunAgain:r}){var a;return n.jsxs("div",{className:"flex-shrink-0 px-4 py-2 bg-surface border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center",t?"bg-gradient-to-br from-emerald-500 to-cyan-600":(a=s.completed)!=null&&a.failed?"bg-gradient-to-br from-red-500 to-rose-600":"bg-gradient-to-br from-emerald-500 to-green-600"),children:t?n.jsx(ce,{size:13,className:"text-white animate-spin"}):n.jsx(Ue,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("p",{className:"text-xs font-bold text-content",children:t?"Running Tests":"Run Complete"}),t&&n.jsx("span",{className:"inline-flex items-center gap-1 text-[8px] font-semibold px-1.5 py-0.5 rounded-md ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200 animate-pulse",children:"LIVE"})]}),s.currentCase&&t&&n.jsx("p",{className:"text-[9px] text-content-tertiary truncate max-w-xs",children:s.currentCase.caseName})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[!t&&s.completed&&n.jsxs("div",{className:"flex items-center gap-1.5 mr-2",children:[n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[9px] font-semibold px-1.5 py-0.5 rounded ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200",children:[n.jsx(Ue,{size:8})," ",s.completed.passed]}),s.completed.failed>0&&n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[9px] font-semibold px-1.5 py-0.5 rounded ring-1 bg-red-50 text-red-600 ring-red-200",children:[n.jsx(xt,{size:8})," ",s.completed.failed]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 text-content-tertiary",children:[n.jsx(Fr,{size:10}),n.jsx("p",{className:"text-xs font-mono font-bold text-content-secondary",children:e})]}),!t&&n.jsxs("button",{type:"button",onClick:r,className:"text-[10px] font-medium text-accent hover:text-accent-dark flex items-center gap-1 ml-1",children:[n.jsx(Cc,{size:10})," New Run"]})]})]})}function B5({onOpenExternal:e,onToggleFullscreen:t,fullscreen:s,browser:r}){return n.jsxs("div",{className:"flex-shrink-0 h-8 bg-slate-800 border-b border-slate-700 flex items-center justify-between px-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500/80"})]}),r?n.jsxs("div",{className:"flex items-center gap-1.5 ml-2",children:[n.jsx(qa,{browser:r,size:14}),n.jsx("span",{className:"text-[10px] font-semibold text-slate-300 uppercase tracking-wider",children:Sm(r)})]}):n.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider ml-2",children:"Browser Preview"})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[t&&n.jsx("button",{type:"button",onClick:t,title:s?"Exit fullscreen":"Fullscreen",className:"p-1 rounded text-slate-400 hover:text-white hover:bg-slate-700 transition-colors",children:s?n.jsx(D2,{size:11}):n.jsx(fm,{size:11})}),n.jsx("button",{type:"button",onClick:e,title:"Open in external browser",className:"p-1 rounded text-slate-400 hover:text-white hover:bg-slate-700 transition-colors",children:n.jsx(Ya,{size:11})})]})]})}function H5({progress:e}){return n.jsxs("div",{className:"flex flex-col items-center gap-4 p-8 max-w-xs",children:[n.jsxs("div",{className:"w-48 h-32 rounded-xl bg-slate-800 border border-slate-700 overflow-hidden relative",children:[n.jsxs("div",{className:"h-5 bg-slate-750 border-b border-slate-700 flex items-center px-2 gap-1.5",children:[n.jsxs("div",{className:"flex gap-1",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500/50"}),n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500/50"}),n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500/50"})]}),n.jsx("div",{className:"flex-1 h-2.5 rounded bg-slate-700 ml-1"})]}),n.jsxs("div",{className:"p-2 space-y-1.5",children:[n.jsx("div",{className:"h-2 bg-slate-700 rounded w-3/4 animate-pulse"}),n.jsx("div",{className:"h-2 bg-slate-700 rounded w-1/2 animate-pulse",style:{animationDelay:"200ms"}}),n.jsx("div",{className:"h-2 bg-slate-700 rounded w-5/6 animate-pulse",style:{animationDelay:"400ms"}}),n.jsx("div",{className:"h-6 bg-accent/10 rounded mt-2 animate-pulse border border-accent/20",style:{animationDelay:"600ms"}})]}),n.jsx("div",{className:"absolute inset-x-0 h-0.5 bg-gradient-to-r from-transparent via-accent to-transparent opacity-60",style:{animation:"scan-line 2s ease-in-out infinite",top:"30%"}})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:"text-xs font-semibold text-slate-300",children:e.currentCase?"Executing test...":"Launching browser..."}),e.currentCase&&n.jsx("p",{className:"text-[10px] text-slate-500 mt-1 truncate max-w-[200px]",children:e.currentCase.caseName})]}),n.jsx("div",{className:"flex items-center gap-1.5",children:[0,160,320].map(t=>n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent animate-bounce",style:{animationDelay:`${t}ms`}},t))}),n.jsx("style",{children:`
|
|
807
|
+
@keyframes scan-line {
|
|
808
|
+
0%, 100% { top: 20%; opacity: 0; }
|
|
809
|
+
50% { top: 80%; opacity: 0.6; }
|
|
810
|
+
}
|
|
811
|
+
`})]})}function q5({step:e}){return e?n.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent px-4 py-3",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse flex-shrink-0"}),n.jsx("p",{className:"text-[10px] text-white/80 truncate font-mono",children:e.instruction})]})}):null}function K5({onMouseDown:e}){return n.jsxs("div",{className:"flex-shrink-0 w-1.5 bg-slate-700 hover:bg-accent cursor-col-resize flex items-center justify-center transition-colors group relative",onMouseDown:e,children:[n.jsx("div",{className:"absolute inset-y-0 -left-1.5 -right-1.5"})," ",n.jsx(Sc,{size:10,className:"text-slate-500 group-hover:text-white"})]})}function Of({tab:e,setTab:t,stepCount:s,logCount:r}){return n.jsxs("div",{className:"flex-shrink-0 h-8 bg-[#1e1f2e] border-b border-slate-700 flex items-center px-1",children:[n.jsxs("button",{type:"button",onClick:()=>t("steps"),className:S("flex items-center gap-1.5 px-3 h-full text-[10px] font-semibold uppercase tracking-wider border-b-2 transition-colors",e==="steps"?"text-accent border-accent":"text-slate-500 border-transparent hover:text-slate-300"),children:[n.jsx(Tt,{size:9})," Steps",s>0&&n.jsx("span",{className:"text-[8px] ml-0.5 opacity-60",children:s})]}),n.jsxs("button",{type:"button",onClick:()=>t("console"),className:S("flex items-center gap-1.5 px-3 h-full text-[10px] font-semibold uppercase tracking-wider border-b-2 transition-colors",e==="console"?"text-accent border-accent":"text-slate-500 border-transparent hover:text-slate-300"),children:[n.jsx(Pc,{size:9})," Console",r>0&&n.jsx("span",{className:"text-[8px] ml-0.5 opacity-60",children:r})]})]})}function Af({tab:e,stepLogs:t,consoleLogs:s,endRef:r}){return e==="steps"?n.jsxs("div",{className:"flex-1 overflow-y-auto text-[10px] px-3 py-2 space-y-0.5",children:[t.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-2 text-slate-600",children:[n.jsx(Tt,{size:18}),n.jsx("p",{className:"text-[10px]",children:"Steps will appear as they execute..."})]}):t.map((a,i)=>n.jsxs("div",{className:"flex items-start gap-2 py-1 px-2 rounded hover:bg-white/[0.02] -mx-1",children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:a.status==="passed"?n.jsx(Ue,{size:11,className:"text-emerald-400"}):a.status==="failed"?n.jsx(xt,{size:11,className:"text-red-400"}):n.jsx(Ec,{size:11,className:"text-slate-500"})}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("p",{className:S("font-mono truncate",a.status==="passed"?"text-slate-300":a.status==="failed"?"text-red-300":"text-slate-500"),children:a.instruction})}),n.jsxs("span",{className:"text-slate-600 flex-shrink-0 tabular-nums",children:[a.duration,"ms"]})]},`${a.stepId}-${i}`)),n.jsx("div",{ref:r})]}):n.jsxs("div",{className:"flex-1 overflow-y-auto font-mono text-[10px] px-3 py-2 space-y-px",children:[s.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-2 text-slate-600",children:[n.jsx(Pc,{size:18}),n.jsx("p",{className:"text-[10px]",children:"Console logs will appear here..."})]}):s.map((a,i)=>{const l=Rf[a.type]??Rf.default,o=Mf[a.type]??Mf.debug,c=new Date(a.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return n.jsxs("div",{className:"flex items-start gap-2 py-0.5 hover:bg-white/[0.02] rounded px-1 -mx-1",children:[n.jsx("span",{className:"text-slate-600 flex-shrink-0 tabular-nums",children:c}),n.jsx("span",{className:S("flex-shrink-0 uppercase text-[8px] font-bold w-9",o),children:a.type.slice(0,5)}),n.jsx("span",{className:S("break-all",l),children:a.text})]},i)}),n.jsx("div",{ref:r})]})}function Wy({label:e,color:t,className:s}){return n.jsx("span",{className:S("inline-flex items-center px-2 py-0.5 rounded-md text-[11px] font-semibold tracking-wide",t??"bg-surface-inset text-content-secondary",s),children:e})}function Cm({status:e}){const t={passed:"bg-emerald-50 text-emerald-700 border border-emerald-200/60",failed:"bg-red-50 text-red-700 border border-red-200/60",running:"bg-blue-50 text-blue-700 border border-blue-200/60",pending:"bg-slate-50 text-slate-600 border border-slate-200/60",skipped:"bg-amber-50 text-amber-700 border border-amber-200/60",partial:"bg-orange-50 text-orange-700 border border-orange-200/60"};return n.jsx(Wy,{label:e,color:t[e]??"bg-slate-100 text-slate-600"})}function W5(e){switch(e){case"passed":return"bg-emerald-500";case"failed":return"bg-red-500";case"skipped":return"bg-slate-500";case"healed":return"bg-amber-500";default:return"bg-slate-400"}}function V5({steps:e,onSelect:t}){const s=e.filter(r=>r.screenshotPath);return s.length<2?null:n.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",style:{scrollbarWidth:"thin"},children:s.map((r,a)=>{const i=Ja("screenshots",r.screenshotPath),l=r.healed?"healed":r.status;return n.jsxs("button",{type:"button",onClick:()=>t(i),className:"relative flex-shrink-0 rounded overflow-hidden border border-border hover:border-accent/50 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",style:{width:80,height:60},title:r.instruction,children:[n.jsx("img",{src:i,alt:`Step ${a+1}`,className:"w-full h-full object-cover"}),n.jsx("span",{className:"absolute top-0.5 left-0.5 bg-black/60 text-white text-[8px] font-bold px-1 py-px rounded leading-none",children:a+1}),n.jsx("span",{className:S("absolute bottom-1 right-1 w-2 h-2 rounded-full ring-1 ring-white/50",W5(l))})]},r.stepId)})})}function G5(e){if(e.healed)return"bg-amber-500";switch(e.status){case"passed":return"bg-emerald-500";case"failed":return"bg-red-500";case"skipped":return"bg-slate-500";default:return"bg-slate-400"}}function Q5({steps:e}){const[t,s]=m.useState(null),r=e.reduce((i,l)=>i+(l.duration??0),0);if(r===0||e.length===0)return null;let a=0;return n.jsxs("div",{className:"px-3 py-2 border-t border-border bg-surface-inset/20",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-wider mb-2",children:"Execution Timeline"}),n.jsx("div",{className:"relative h-5 bg-surface-inset rounded overflow-hidden",children:e.map((i,l)=>{const o=i.duration/r*100,c=a/r*100;return a+=i.duration,n.jsx("div",{className:S("absolute top-0 h-full transition-opacity hover:opacity-80 cursor-default",G5(i)),style:{left:`${c}%`,width:`${Math.max(o,.5)}%`},onMouseEnter:()=>s(`${i.instruction} — ${i.duration}ms`),onMouseLeave:()=>s(null)},i.stepId??l)})}),t&&n.jsx("p",{className:"text-[9px] text-content-secondary mt-1 truncate",children:t}),n.jsx("div",{className:"flex mt-1 relative",style:{height:14},children:(()=>{let i=0;return e.map((l,o)=>{const c=l.duration/r*100,d=i/r*100;i+=l.duration;const x=(l.instruction??"").slice(0,8);return n.jsx("div",{className:"absolute text-[8px] text-content-tertiary truncate overflow-hidden",style:{left:`${d}%`,width:`${Math.max(c,2)}%`,top:0},title:l.instruction,children:x},l.stepId??o)})})()})]})}function Y5({stepId:e,currentScreenshotPath:t}){const{data:s,refetch:r}=ke({queryKey:["baseline",e],queryFn:()=>pf.get(e),enabled:!!e}),a=X({mutationFn:()=>{if(!t)throw new Error("No screenshot available");return pf.capture(e,t)},onSuccess:()=>{A.success("Baseline saved"),r()},onError:o=>A.error(o.message)}),i=t?Ja("screenshots",t):null,l=s!=null&&s.hasBaseline?`${tw(e)}?t=${s.capturedAt??Date.now()}`:null;return n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Visual Regression"}),n.jsxs("div",{className:"flex items-center gap-2",children:[(s==null?void 0:s.hasBaseline)&&n.jsx("span",{className:"text-[8px] px-1.5 py-0.5 rounded bg-emerald-50 text-emerald-600 ring-1 ring-emerald-200 font-semibold",children:"Baseline set"}),t&&n.jsxs("button",{type:"button",onClick:()=>a.mutate(),disabled:a.isPending,className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:[n.jsx(Mr,{size:9})," Set as Baseline"]})]})]}),n.jsxs("div",{className:"flex gap-3",children:[i&&n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-[8px] text-content-tertiary mb-1",children:"Current"}),n.jsx("img",{src:i,alt:"Current screenshot",className:"rounded border border-border max-h-32 object-contain"})]}),l&&n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-[8px] text-content-tertiary mb-1",children:"Baseline"}),n.jsx("img",{src:l,alt:"Baseline screenshot",className:"rounded border border-border max-h-32 object-contain"})]}),!l&&i&&n.jsx("div",{className:"flex-1 flex items-center justify-center border border-dashed border-border rounded-lg min-h-[80px]",children:n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No baseline set"})})]})]})}function Em(e,t){if(t==null)return"na";switch(e){case"fcp":return t<1800?"good":t<3e3?"needs-improvement":"poor";case"lcp":return t<2500?"good":t<4e3?"needs-improvement":"poor";case"cls":return t<.1?"good":t<.25?"needs-improvement":"poor";case"ttfb":return t<800?"good":t<1800?"needs-improvement":"poor";case"tbt":return t<200?"good":t<600?"needs-improvement":"poor";case"si":return t<3400?"good":t<5800?"needs-improvement":"poor";case"tti":return t<3800?"good":t<7300?"needs-improvement":"poor";case"inp":return t<200?"good":t<500?"needs-improvement":"poor"}}const J5={good:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-700 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800","needs-improvement":"bg-amber-50 dark:bg-amber-900/20 text-amber-700 dark:text-amber-400 ring-amber-200 dark:ring-amber-800",poor:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 ring-red-200 dark:ring-red-800",na:"bg-surface-inset text-content-tertiary ring-border"};function X5(e,t){return t==null?"—":e==="cls"?t.toFixed(3):t<1e3?`${Math.round(t)}ms`:`${(t/1e3).toFixed(2)}s`}function Pm(e){return e==null?{ring:"ring-border",text:"text-content-tertiary",bg:"bg-surface-inset",label:"—"}:e>=90?{ring:"ring-emerald-300 dark:ring-emerald-700",text:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-900/20",label:"Good"}:e>=50?{ring:"ring-amber-300 dark:ring-amber-700",text:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-900/20",label:"Needs Work"}:{ring:"ring-red-300 dark:ring-red-700",text:"text-red-600 dark:text-red-400",bg:"bg-red-50 dark:bg-red-900/20",label:"Poor"}}const zm=[{key:"fcp",label:"FCP",desc:"First Contentful Paint"},{key:"lcp",label:"LCP",desc:"Largest Contentful Paint"},{key:"cls",label:"CLS",desc:"Cumulative Layout Shift"},{key:"ttfb",label:"TTFB",desc:"Time to First Byte"},{key:"tbt",label:"TBT",desc:"Total Blocking Time"},{key:"si",label:"SI",desc:"Speed Index"},{key:"tti",label:"TTI",desc:"Time to Interactive"},{key:"inp",label:"INP",desc:"Interaction to Next Paint"}];function Df({metricKey:e,value:t}){const s=Em(e,t),r=zm.find(a=>a.key===e);return n.jsxs("div",{className:S("rounded-lg px-2 py-2 ring-1 text-center flex-1 min-w-[70px]",J5[s]),children:[n.jsx("p",{className:"text-[8px] font-bold uppercase tracking-widest opacity-60 mb-0.5",children:r.label}),n.jsx("p",{className:"text-xs font-bold tabular-nums leading-tight",children:X5(e,t)})]})}function Od({score:e,label:t}){const s=Pm(e),r=24,a=2*Math.PI*r,i=e!=null?e/100*a:0;return n.jsxs("div",{className:S("flex flex-col items-center justify-center rounded-xl px-3 py-2.5 ring-2 flex-1",s.bg,s.ring),children:[n.jsxs("div",{className:"relative w-14 h-14",children:[n.jsxs("svg",{className:"w-14 h-14 -rotate-90",viewBox:"0 0 60 60",children:[n.jsx("circle",{cx:"30",cy:"30",r,fill:"none",stroke:"currentColor",strokeWidth:"5",className:"opacity-10"}),n.jsx("circle",{cx:"30",cy:"30",r,fill:"none",stroke:"currentColor",strokeWidth:"5",strokeDasharray:a,strokeDashoffset:a-i,strokeLinecap:"round",className:s.text})]}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsx("span",{className:S("text-base font-black tabular-nums",s.text),children:e??"—"})})]}),n.jsx("p",{className:S("text-[8px] font-bold mt-1 leading-tight",s.text),children:s.label}),n.jsx("p",{className:"text-[8px] text-content-tertiary mt-px text-center leading-tight",children:t})]})}function If({audits:e,label:t,score:s}){if(!e||e.length===0)return null;const r=e.filter(c=>!c.passed&&!c.partial&&!c.na),a=e.filter(c=>!!c.partial),i=e.filter(c=>c.passed),l=e.filter(c=>!!c.na),o=Pm(s);return n.jsxs("div",{className:"mt-2 space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[n.jsxs("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest flex-1",children:[t," Audits"]}),s!=null&&n.jsx("span",{className:S("text-[9px] font-black px-1.5 py-0.5 rounded-md ring-1",o.bg,o.text,o.ring),children:s})]}),n.jsxs("div",{className:"space-y-0.5 max-h-48 overflow-y-auto pr-1",children:[r.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-red-600 dark:text-red-400 font-medium",children:[n.jsx(xt,{size:9,className:"text-red-500 flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id)),a.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-amber-600 dark:text-amber-400 font-medium",children:[n.jsx(Xt,{size:9,className:"text-amber-500 flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id)),l.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-content-tertiary",children:[n.jsx(w2,{size:9,className:"text-content-tertiary flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id)),i.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-emerald-600 dark:text-emerald-400",children:[n.jsx(Ue,{size:9,className:"text-emerald-500 flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id))]})]})}function Z5(e,t){let s=0,r=0,a=0;if(t==="performance")for(const i of e)for(const{key:l}of zm){const o=Em(l,i[l]);o==="good"?s++:o==="needs-improvement"?r++:o==="poor"&&a++}else{const i=t==="accessibility"?"a11yAudits":"seoAudits",l=t==="accessibility"?"a11yScore":"seoScore";for(const o of e){const c=o[i]??[];s+=c.filter(x=>x.passed).length,r+=c.filter(x=>!!x.partial).length,a+=c.filter(x=>!x.passed&&!x.partial&&!x.na).length;const d=Pm(o[l]);d.label==="Good"?s++:d.label==="Needs Work"?r++:d.label==="Poor"&&a++}}return{good:s,warn:r,poor:a}}function eS({caseName:e,pageLoads:t,focus:s="performance",onClose:r}){const[a,i]=m.useState(s),l=Z5(t,a),o=a==="performance"?"metrics":a==="accessibility"?"a11y checks":"seo checks",c=[{key:"performance",label:"Performance",icon:n.jsx(Be,{size:10}),color:"text-violet-600 dark:text-violet-400",activeColor:"bg-violet-50 dark:bg-violet-900/20 text-violet-700 dark:text-violet-300 ring-violet-200 dark:ring-violet-700"},{key:"accessibility",label:"Accessibility",icon:n.jsx(Qu,{size:10}),color:"text-blue-600 dark:text-blue-400",activeColor:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 ring-blue-200 dark:ring-blue-700"},{key:"seo",label:"SEO",icon:n.jsx(Ar,{size:10}),color:"text-emerald-600 dark:text-emerald-400",activeColor:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-700 dark:text-emerald-300 ring-emerald-200 dark:ring-emerald-700"}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 bg-black/30 z-40",onClick:r}),n.jsxs("div",{className:"fixed right-0 top-0 h-full w-[560px] max-w-full bg-surface shadow-2xl z-50 flex flex-col border-l border-border",children:[n.jsxs("div",{className:"border-b border-border bg-gradient-to-r from-violet-50 to-indigo-50 dark:from-violet-900/20 dark:to-indigo-900/20 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-3 px-5 py-3",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",a==="performance"?"bg-violet-500":a==="accessibility"?"bg-blue-500":"bg-emerald-500"),children:a==="performance"?n.jsx(Be,{size:13,className:"text-white"}):a==="accessibility"?n.jsx(Qu,{size:13,className:"text-white"}):n.jsx(Ar,{size:13,className:"text-white"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-xs font-bold text-content",children:"Lighthouse Audit"}),n.jsx("p",{className:"text-[10px] text-content-tertiary truncate",children:e})]}),n.jsx("button",{type:"button",onClick:r,className:"p-1.5 rounded-lg text-content-tertiary hover:text-content hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"flex gap-1 px-5 pb-0",children:c.map(d=>n.jsxs("button",{type:"button",onClick:()=>i(d.key),className:S("flex items-center gap-1.5 px-3 py-1.5 text-[10px] font-semibold rounded-t-lg border-b-2 transition-colors",a===d.key?"border-current "+d.color+" bg-surface/80":"border-transparent text-content-tertiary hover:text-content-secondary"),children:[d.icon," ",d.label]},d.key))})]}),l.good+l.warn+l.poor>0&&n.jsxs("div",{className:"px-5 py-2.5 border-b border-border bg-surface-inset/40 flex items-center gap-4 flex-shrink-0",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest flex-shrink-0",children:["Overall ",n.jsxs("span",{className:"normal-case font-normal opacity-60",children:["(",o,")"]})]}),n.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[l.good>0&&n.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-700 dark:text-emerald-400 font-semibold",children:[n.jsx("span",{className:"text-emerald-500 text-[11px] leading-none",children:"●"}),l.good," ",a==="performance"?"Good":"Passed"]}),l.warn>0&&n.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-amber-700 dark:text-amber-400 font-semibold",children:[n.jsx("span",{className:"text-amber-400 text-[11px] leading-none",children:"●"}),l.warn," Needs Work"]}),l.poor>0&&n.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-red-700 dark:text-red-400 font-semibold",children:[n.jsx("span",{className:"text-red-500 text-[11px] leading-none",children:"●"}),l.poor," ",a==="performance"?"Poor":"Failed"]})]}),n.jsxs("p",{className:"text-[9px] text-content-tertiary",children:[t.length," page",t.length!==1?"s":""]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:t.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-40 text-center",children:[n.jsx(Be,{size:24,className:"text-content-tertiary mb-2 opacity-40"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No page navigations recorded"}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-1 opacity-60",children:"Only available for Chromium browser runs"})]}):t.map((d,x)=>{var f,g;return n.jsxs("div",{className:"rounded-xl border border-border bg-surface shadow-sm overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset/50 border-b border-border",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-0.5",children:["Step ",d.stepIndex+1]}),n.jsx("p",{className:"text-[10px] text-content-secondary truncate mb-1",title:d.stepInstruction,children:d.stepInstruction}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Or,{size:9,className:"text-indigo-400 dark:text-indigo-500 flex-shrink-0"}),n.jsx("p",{className:"text-[10px] font-mono text-indigo-600 dark:text-indigo-400 truncate font-medium",title:d.url,children:d.url})]})]}),d.lighthouseError?n.jsxs("div",{className:"px-4 py-3 flex items-start gap-2",children:[n.jsx(Xt,{size:12,className:"text-amber-500 flex-shrink-0 mt-0.5"}),n.jsx("p",{className:"text-[10px] text-amber-700 dark:text-amber-400",children:d.lighthouseError})]}):n.jsxs("div",{className:"px-4 py-3 space-y-3",children:[a==="performance"&&n.jsxs(n.Fragment,{children:[n.jsx(Od,{score:d.score,label:"Performance"}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest",children:"Core Web Vitals"}),n.jsx("div",{className:"flex gap-1.5 flex-wrap",children:["fcp","lcp","cls","ttfb"].map(b=>n.jsx(Df,{metricKey:b,value:d[b]},b))}),n.jsx("div",{className:"flex gap-1.5 flex-wrap",children:["tbt","si","tti","inp"].map(b=>n.jsx(Df,{metricKey:b,value:d[b]},b))})]}),n.jsx("div",{className:"pt-1 border-t border-border/50 grid grid-cols-2 gap-x-4 gap-y-0.5",children:zm.map(({key:b,label:y,desc:v})=>{const N=Em(b,d[b]);return n.jsxs("div",{className:"flex items-center gap-1.5 text-[8px] text-content-tertiary",children:[n.jsx("span",{className:S("text-[10px] leading-none flex-shrink-0",N==="good"?"text-emerald-500":N==="needs-improvement"?"text-amber-400":N==="poor"?"text-red-500":"text-slate-300"),children:"●"}),n.jsx("span",{className:"font-medium",children:y}),n.jsx("span",{className:"opacity-60 truncate",children:v})]},b)})})]}),a==="accessibility"&&n.jsxs(n.Fragment,{children:[n.jsx(Od,{score:d.a11yScore,label:"Accessibility"}),(((f=d.a11yAudits)==null?void 0:f.length)??0)>0?n.jsx(If,{audits:d.a11yAudits,label:"Accessibility",score:d.a11yScore}):n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No accessibility audit data available."})]}),a==="seo"&&n.jsxs(n.Fragment,{children:[n.jsx(Od,{score:d.seoScore,label:"SEO"}),(((g=d.seoAudits)==null?void 0:g.length)??0)>0?n.jsx(If,{audits:d.seoAudits,label:"SEO",score:d.seoScore}):n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No SEO audit data available."})]})]})]},x)})}),n.jsx("div",{className:"px-5 py-2.5 border-t border-border bg-surface-inset/30 flex-shrink-0",children:n.jsx("p",{className:"text-[9px] text-content-tertiary text-center",children:"Powered by Google Lighthouse · Desktop preset · Chromium only"})})]})]})}function tS({src:e,onClose:t}){return n.jsxs("div",{className:"fixed inset-0 bg-black/80 z-50 flex flex-col items-center justify-center p-4",onClick:t,children:[n.jsxs("div",{className:"absolute top-4 right-4 flex items-center gap-2",children:[n.jsx("a",{href:e,download:!0,onClick:s=>s.stopPropagation(),title:"Download",className:"text-white/70 hover:text-white p-2 rounded-lg bg-surface/10 hover:bg-surface/20",children:n.jsx(kc,{size:14})}),n.jsx("button",{type:"button",onClick:t,className:"text-white/70 hover:text-white p-2 rounded-lg bg-surface/10 hover:bg-surface/20",children:n.jsx(Se,{size:14})})]}),n.jsx("img",{src:e,alt:"Screenshot",className:"max-w-full max-h-full rounded-lg shadow-2xl object-contain",onClick:s=>s.stopPropagation()}),n.jsx("p",{className:"text-white/40 text-[10px] mt-2",children:"Click outside to close"})]})}function nS({step:e,onScreenshot:t}){const[s,r]=m.useState(e.status==="failed"),a=e.screenshotPath?Ja("screenshots",e.screenshotPath):null,i=e.status==="passed"?n.jsx(Ue,{size:11,className:"text-emerald-500 flex-shrink-0"}):e.status==="failed"?n.jsx(xt,{size:11,className:"text-red-500 flex-shrink-0"}):n.jsx(Ec,{size:11,className:"text-content-tertiary flex-shrink-0"});return n.jsxs("div",{className:"border-t border-border/50 first:border-0",children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 cursor-pointer hover:bg-surface-inset/50 text-[10px] select-none transition-colors",onClick:()=>r(l=>!l),children:[i,n.jsx("span",{className:S("text-[8px] px-1 py-px rounded font-bold uppercase ring-1 flex-shrink-0",e.stepType==="api"?"bg-violet-50 text-violet-600 ring-violet-200":"bg-blue-50 text-blue-600 ring-blue-200"),children:e.stepType==="api"?"API":"UI"}),n.jsx("span",{className:S("flex-1 truncate text-[10px]",e.status==="failed"?"text-red-700 font-medium":"text-content-secondary"),children:e.instruction}),e.healed&&n.jsx("span",{className:"text-[8px] bg-amber-50 text-amber-600 px-1.5 py-0.5 rounded font-semibold ring-1 ring-amber-200 flex-shrink-0",children:"✦ healed"}),a&&n.jsx("button",{type:"button",title:"View screenshot",className:"text-content-tertiary hover:text-accent flex-shrink-0 p-0.5",onClick:l=>{l.stopPropagation(),t(a)},children:n.jsx(Mr,{size:10})}),n.jsxs("span",{className:"text-content-tertiary w-10 text-right flex-shrink-0 tabular-nums text-[9px]",children:[e.duration,"ms"]}),s?n.jsx(N2,{size:10,className:"text-content-tertiary flex-shrink-0"}):n.jsx(Mt,{size:10,className:"text-content-tertiary flex-shrink-0"})]}),s&&n.jsxs("div",{className:"px-3 pb-2.5 pt-1 space-y-2 bg-surface-inset/30",children:[e.code&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Code"}),n.jsx("pre",{className:"text-[10px] font-mono bg-slate-900 text-slate-100 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed",children:e.code})]}),e.error&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-red-500 uppercase tracking-widest mb-1",children:"Error"}),n.jsx("pre",{className:"text-[10px] text-red-700 bg-red-50 border border-red-100 rounded-lg p-2.5 font-mono whitespace-pre-wrap leading-relaxed",children:e.error})]}),e.healed&&e.healedCode&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-amber-600 uppercase tracking-widest mb-1",children:"Healed Code"}),n.jsx("pre",{className:"text-[10px] font-mono bg-amber-50 border border-amber-200 text-amber-900 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed",children:e.healedCode})]}),e.apiRequest&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-violet-500 uppercase tracking-widest mb-1",children:"API Request"}),n.jsx("pre",{className:"text-[10px] font-mono bg-violet-50 border border-violet-100 text-violet-900 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed",children:`${e.apiRequest.method} ${e.apiRequest.url}${e.apiRequest.headers?`
|
|
812
|
+
Headers: `+JSON.stringify(e.apiRequest.headers,null,2):""}${e.apiRequest.body?`
|
|
813
|
+
Body: `+e.apiRequest.body:""}`})]}),e.apiResponse&&n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-indigo-500 uppercase tracking-widest mb-1",children:["API Response — ",e.apiResponse.status," ",e.apiResponse.statusText," (",e.apiResponse.duration,"ms)"]}),n.jsx("pre",{className:"text-[10px] font-mono bg-indigo-50 border border-indigo-100 text-indigo-900 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed max-h-48 overflow-y-auto",children:e.apiResponse.body?e.apiResponse.body.slice(0,2e3):"(empty body)"})]}),a&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Screenshot"}),n.jsxs("div",{className:"relative group inline-block",children:[n.jsx("img",{src:a,alt:"Step screenshot",className:"rounded-lg border border-border max-w-full max-h-40 object-contain cursor-zoom-in hover:opacity-95 transition-opacity",onClick:()=>t(a)}),n.jsx("button",{type:"button",onClick:()=>t(a),title:"Fullscreen",className:"absolute top-1.5 right-1.5 bg-black/50 text-white p-1 rounded opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(fm,{size:10})})]}),n.jsx("div",{className:"mt-2",children:n.jsx(Y5,{stepId:e.stepId,currentScreenshotPath:e.screenshotPath})})]})]})]})}function sS({videoPath:e}){const t=Ja("videos",e);return n.jsxs("div",{className:"border-t border-border bg-black",children:[n.jsxs("div",{className:"px-3 pt-2 pb-1 flex items-center justify-between",children:[n.jsxs("p",{className:"text-[10px] font-medium text-content-tertiary flex items-center gap-1.5",children:[n.jsx(zc,{size:10})," Recording"]}),n.jsxs("a",{href:t,download:!0,title:"Download video",className:"text-[10px] text-content-tertiary hover:text-accent flex items-center gap-1",children:[n.jsx(kc,{size:10})," Download"]})]}),n.jsx("video",{src:t,controls:!0,playsInline:!0,className:"w-full max-h-64 bg-black"})]})}function rS({tracePath:e}){const t=e.replace(/\\/g,"/").split("/").pop()??"",s=Ja("traces",e),r=`/trace/index.html?trace=${encodeURIComponent(`${window.location.origin}${s}`)}`;return n.jsxs("div",{className:"border-t border-border px-3 py-2 flex items-center justify-between bg-violet-50/30",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Kg,{size:12,className:"text-violet-500 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[10px] font-semibold text-content-secondary",children:"Playwright Trace"}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-mono truncate max-w-[200px]",children:t})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[n.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] bg-violet-600 hover:bg-violet-700 text-white px-2 py-1 rounded-lg font-semibold transition-colors",children:[n.jsx(Tt,{size:9})," Open Viewer"]}),n.jsxs("a",{href:s,download:!0,title:"Download .zip",className:"inline-flex items-center gap-0.5 text-[10px] text-content-secondary hover:text-content px-1.5 py-1 border border-border rounded-lg hover:border-border transition-colors",children:[n.jsx(kc,{size:9})," .zip"]})]})]})}function aS({tc:e,suiteType:t,onScreenshot:s}){var b;const[r,a]=m.useState(e.status==="failed"),[i,l]=m.useState(!1),[o,c]=m.useState(null),d=e.steps.filter(y=>y.screenshotPath).length,x=e.steps.filter(y=>y.screenshotPath),g=(t==="audit"||t==="performance")&&(e.pageLoads??[]).some(y=>!y.lighthouseError&&(y.score!=null&&y.score<50||y.a11yScore!=null&&y.a11yScore<50||y.seoScore!=null&&y.seoScore<50));return n.jsxs("div",{className:S("border-t",g?"border-red-300 bg-red-50/30":"border-border/50"),children:[n.jsxs("div",{className:S("flex items-center gap-2 px-3 py-2 cursor-pointer select-none transition-colors",g?"hover:bg-red-50/50":"hover:bg-surface-inset/50"),onClick:()=>a(y=>!y),children:[r?n.jsx(Mt,{size:11,className:"text-content-tertiary flex-shrink-0"}):n.jsx(tn,{size:11,className:"text-content-tertiary flex-shrink-0"}),n.jsx(Cm,{status:e.status}),n.jsx("span",{className:"text-xs text-content font-medium flex-1 truncate",children:e.caseName}),n.jsxs("div",{className:"flex items-center gap-1.5",onClick:y=>y.stopPropagation(),children:[n.jsxs("button",{type:"button",title:"Toggle execution timeline",onClick:()=>l(y=>!y),className:S("flex items-center gap-0.5 text-[8px] px-1.5 py-0.5 rounded ring-1 transition-colors",i?"bg-indigo-100 text-indigo-600 ring-indigo-200":"bg-surface-inset text-content-tertiary ring-border hover:text-content-secondary"),children:[n.jsx(En,{size:8})," timeline"]}),(((b=e.pageLoads)==null?void 0:b.length)??0)>0&&(()=>{const y=e.pageLoads,v=y.some(u=>u.score!=null||u.fcp!=null),N=y.some(u=>{var p;return u.a11yScore!=null||(((p=u.a11yAudits)==null?void 0:p.length)??0)>0}),h=y.some(u=>{var p;return u.seoScore!=null||(((p=u.seoAudits)==null?void 0:p.length)??0)>0});return n.jsxs(n.Fragment,{children:[v&&n.jsxs("button",{type:"button",onClick:u=>{u.stopPropagation(),c("performance")},title:"Page Speed (Lighthouse)",className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded-lg bg-violet-50 text-violet-600 hover:bg-violet-100 ring-1 ring-violet-200 font-semibold transition-colors flex-shrink-0",children:[n.jsx(Be,{size:9})," Speed"]}),N&&n.jsxs("button",{type:"button",onClick:u=>{u.stopPropagation(),c("accessibility")},title:"Accessibility (Lighthouse)",className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100 ring-1 ring-blue-200 font-semibold transition-colors flex-shrink-0",children:[n.jsx(Qu,{size:9})," A11y"]}),h&&n.jsxs("button",{type:"button",onClick:u=>{u.stopPropagation(),c("seo")},title:"SEO (Lighthouse)",className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded-lg bg-emerald-50 text-emerald-600 hover:bg-emerald-100 ring-1 ring-emerald-200 font-semibold transition-colors flex-shrink-0",children:[n.jsx(Ar,{size:9})," SEO"]})]})})(),e.device&&(()=>{const y=Ky(e.device),v=(y==null?void 0:y.category)==="mobile"?Ni:(y==null?void 0:y.category)==="tablet"?fo:ha,N=(y==null?void 0:y.name)??e.device;return n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-teal-600 bg-teal-50 px-1.5 py-0.5 rounded ring-1 ring-teal-200 max-w-[90px] truncate",title:N,children:[n.jsx(v,{size:8})," ",N]})})(),d>0&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-content-secondary bg-surface-inset px-1.5 py-0.5 rounded ring-1 ring-border",children:[n.jsx(Mr,{size:8})," ",d]}),e.videoPath&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-blue-600 bg-blue-50 px-1.5 py-0.5 rounded ring-1 ring-blue-200",children:[n.jsx(zc,{size:8})," video"]}),e.tracePath&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-violet-600 bg-violet-50 px-1.5 py-0.5 rounded ring-1 ring-violet-200",children:[n.jsx(Kg,{size:8})," trace"]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary tabular-nums",children:[(e.duration/1e3).toFixed(1),"s"]})]})]}),r&&n.jsxs("div",{className:"bg-surface",children:[x.length>=2&&n.jsxs("div",{className:"px-4 py-3 border-b border-border",children:[n.jsx("p",{className:"text-[10px] text-content-tertiary uppercase tracking-wider mb-2",children:"Screenshot Filmstrip"}),n.jsx(V5,{steps:e.steps,onSelect:s})]}),i&&n.jsx(Q5,{steps:e.steps}),e.steps.map(y=>n.jsx(nS,{step:y,onScreenshot:s},y.stepId)),e.videoPath&&n.jsx(sS,{videoPath:e.videoPath}),e.tracePath&&n.jsx(rS,{tracePath:e.tracePath})]}),o&&n.jsx(eS,{caseName:e.caseName,pageLoads:e.pageLoads??[],focus:o,onClose:()=>c(null)})]})}function iS({runId:e}){const[t,s]=m.useState(null),{data:r,isLoading:a}=ke({queryKey:["report",e],queryFn:()=>Qo.get(e)});return a?n.jsx("div",{className:"flex items-center justify-center py-6",children:n.jsx(ce,{size:14,className:"animate-spin text-accent"})}):r?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-3.5 pb-3 space-y-2",children:r.suites.map(i=>n.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-surface-inset/50 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cm,{status:i.status}),n.jsx("span",{className:"text-xs font-semibold text-content",children:i.suiteName}),n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:["· ",i.browser]})]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary tabular-nums",children:[(i.duration/1e3).toFixed(1),"s"]})]}),i.cases.map(l=>n.jsx(aS,{tc:l,suiteType:i.suiteType,onScreenshot:s},l.caseId))]},i.suiteId))}),t&&n.jsx(tS,{src:t,onClose:()=>s(null)})]}):null}function lS(){const[e,t]=m.useState(""),{modalProps:s,confirmDelete:r}=Mn(),a=le(),{data:i=[],isLoading:l}=ke({queryKey:["reports"],queryFn:()=>Qo.list(30)}),o=X({mutationFn:Qo.delete,onSuccess:()=>{a.invalidateQueries({queryKey:["reports"]}),A.success("Report deleted")},onError:f=>A.error(f.message)}),c=i.reduce((f,g)=>f+g.passed,0),d=i.reduce((f,g)=>f+g.failed,0),x=i.reduce((f,g)=>f+g.skipped,0);return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-sm shadow-blue-500/20",children:n.jsx(En,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Reports"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Screenshots · Video · Trace Viewer · Run Logs"})]})]}),n.jsx("div",{className:"flex items-center gap-2",children:i.length>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-surface-inset text-content-tertiary ring-border",children:[i.length," ",n.jsx("span",{className:"opacity-60 font-normal",children:"runs"})]}),n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200",children:[c," ",n.jsx("span",{className:"opacity-60 font-normal",children:"passed"})]}),n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-red-50 text-red-600 ring-red-200",children:[d," ",n.jsx("span",{className:"opacity-60 font-normal",children:"failed"})]}),x>0&&n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-amber-50 text-amber-600 ring-amber-200",children:[x," ",n.jsx("span",{className:"opacity-60 font-normal",children:"skip"})]})]})})]})}),l&&n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}),!l&&i.length===0&&n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(En,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No runs yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Configure and start a run first. Enable screenshot, video, and trace in Settings."})]}),n.jsx("div",{className:"space-y-2",children:i.map(f=>{const g=e===f.runId;return n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden hover:border-accent/20 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 py-2.5 cursor-pointer hover:bg-surface-inset/30 select-none transition-colors",onClick:()=>t(b=>b===f.runId?"":f.runId),children:[g?n.jsx(Mt,{size:12,className:"text-content-tertiary flex-shrink-0"}):n.jsx(tn,{size:12,className:"text-content-tertiary flex-shrink-0"}),n.jsx(Cm,{status:f.status}),f.environment&&n.jsx("span",{className:"text-[8px] px-1.5 py-0.5 rounded font-bold uppercase ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200 flex-shrink-0",children:f.environment}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("p",{className:"text-[10px] font-mono text-content-secondary",children:[f.runId.slice(0,12),"…"]}),n.jsxs("p",{className:"text-[9px] text-content-tertiary flex items-center gap-1 mt-0.5",children:[n.jsx(Fr,{size:8}),wk(new Date(f.startedAt),"MMM d, HH:mm")," · ",Xo(new Date(f.startedAt),{addSuffix:!0})]})]}),n.jsxs("div",{className:"flex items-center gap-2 text-[10px] flex-shrink-0",children:[n.jsxs("span",{className:"text-emerald-600 font-semibold tabular-nums",children:[f.passed,"✓"]}),n.jsxs("span",{className:"text-red-500 font-semibold tabular-nums",children:[f.failed,"✗"]}),f.skipped>0&&n.jsxs("span",{className:"text-content-tertiary tabular-nums",children:[f.skipped,"skip"]}),n.jsx("div",{className:"w-px h-3 bg-border"}),n.jsx("span",{className:"text-content-tertiary tabular-nums",children:f.duration!=null?(f.duration/1e3).toFixed(1)+"s":"—"})]}),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",onClick:b=>b.stopPropagation(),children:[f.logFilePath&&n.jsx("a",{href:Ja("logs",f.logFilePath),target:"_blank",rel:"noopener noreferrer",title:"Run Log",className:"p-1 rounded-md text-emerald-500 hover:bg-emerald-50 transition-colors",children:n.jsx(fn,{size:13})}),n.jsx("a",{href:`/allure/${f.runId}`,target:"_blank",rel:"noopener noreferrer",title:"Allure Report",className:"p-1 rounded-md text-blue-500 hover:bg-blue-50 transition-colors",children:n.jsx(En,{size:13})}),n.jsx("button",{type:"button",title:"Delete",onClick:()=>r("Delete this report? This cannot be undone.",()=>o.mutate(f.runId)),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors",children:n.jsx(gn,{size:12})})]})]}),g&&n.jsx(iS,{runId:f.runId})]},f.runId)})})]})}),n.jsx(Rn,{...s})]})}function oS(){const[e,t]=m.useState(""),[s,r]=m.useState(""),[a,i]=m.useState(!1),[l,o]=m.useState(new Set),[c,d]=m.useState(null),[x,f]=m.useState(""),[g,b]=m.useState(!1),{modalProps:y,confirmDelete:v}=Mn(),N=le(),{data:h={},isLoading:u}=ke({queryKey:["variables"],queryFn:()=>xd.getAll()}),p=X({mutationFn:({key:E,value:L,secret:Z})=>xd.set(E,Z?{value:L,secret:!0}:L),onSuccess:()=>{N.invalidateQueries({queryKey:["variables"]}),t(""),r(""),i(!1),d(null),A.success("Variable saved")},onError:E=>A.error(E.message)}),j=X({mutationFn:xd.delete,onSuccess:()=>{N.invalidateQueries({queryKey:["variables"]}),A.success("Variable deleted")},onError:E=>A.error(E.message)}),w=h._system,z=Object.entries(h).filter(([E])=>E!=="_system").map(([E,L])=>typeof L=="string"?{key:E,value:L,secret:!1}:{key:E,value:L.value,secret:!0}),C=z.filter(E=>E.secret).length,P=z.filter(E=>{var L;return(L=w==null?void 0:w[E.key])==null?void 0:L.readOnly}).length,_=E=>{o(L=>{const Z=new Set(L);return Z.has(E)?Z.delete(E):Z.add(E),Z})},I=()=>{if(e.trim()){if(e.trim()==="BASE_URL"){A.error("BASE_URL is managed in Settings → Environment");return}p.mutate({key:e.trim(),value:s,secret:a})}},Q=E=>{d(E.key),f(E.value),b(E.secret)},J=()=>{c&&p.mutate({key:c,value:x,secret:g})},O=()=>{d(null),f(""),b(!1)};return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-teal-500 to-emerald-600 flex items-center justify-center shadow-sm shadow-teal-500/20",children:n.jsx(Hg,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Variables"}),n.jsxs("p",{className:"text-[10px] text-content-tertiary",children:["Global variables available in all tests as ","{{VARIABLE_NAME}}"]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-surface-inset text-content-tertiary ring-border",children:[z.length," ",n.jsx("span",{className:"opacity-60 font-normal",children:"total"})]}),C>0&&n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-amber-50 text-amber-600 ring-amber-200",children:[n.jsx(dd,{size:7})," ",C," ",n.jsx("span",{className:"opacity-60 font-normal",children:"secret"})]}),P>0&&n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-blue-50 text-blue-600 ring-blue-200",children:[n.jsx(Go,{size:7})," ",P," ",n.jsx("span",{className:"opacity-60 font-normal",children:"system"})]})]})]}),n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsxs("div",{className:"relative",children:[n.jsx(mf,{size:10,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{className:"w-full text-xs font-mono uppercase tracking-wide border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"VARIABLE_NAME",value:e,onChange:E=>t(E.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,"_")),onKeyDown:E=>E.key==="Enter"&&I()})]})}),n.jsx("div",{className:"flex-[2] min-w-0",children:n.jsx("input",{type:a?"password":"text",className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"variable value",value:s,onChange:E=>r(E.target.value),onKeyDown:E=>E.key==="Enter"&&I()})}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[n.jsxs("label",{className:"flex items-center gap-1.5 text-[9px] text-content-tertiary cursor-pointer select-none",children:[n.jsx(ec,{checked:a,onChange:i}),n.jsx(dd,{size:9})]}),n.jsxs(re,{size:"sm",onClick:I,loading:p.isPending&&!c,disabled:!e.trim(),children:[n.jsx(Pn,{size:10})," Add"]})]})]})]}),n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:u?n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}):z.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(mf,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No variables yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Add your first variable using the toolbar above"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-[1fr_2fr_80px_80px] gap-2 px-3.5 py-2 bg-surface-inset/50 border-b border-border",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Key"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Value"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest text-center",children:"Type"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest text-center",children:"Actions"})]}),n.jsx("div",{className:"max-h-[500px] overflow-y-auto divide-y divide-border/50",children:z.map(E=>{var R,W,M;const L=((R=w==null?void 0:w[E.key])==null?void 0:R.readOnly)===!0,Z=(M=(W=w==null?void 0:w[E.key])==null?void 0:W.environment)==null?void 0:M.toUpperCase(),ie=c===E.key;return n.jsxs("div",{className:S("grid grid-cols-[1fr_2fr_80px_80px] gap-2 px-3.5 py-2 items-center transition-colors",ie?"bg-accent/[0.02]":"hover:bg-surface-inset/40"),children:[n.jsx("span",{className:"text-[10px] font-mono text-accent font-medium truncate",children:`{{${E.key}}}`}),n.jsx("div",{className:"min-w-0",children:ie?n.jsx("input",{type:g?"password":"text",className:"w-full text-[10px] font-mono border border-accent/40 rounded-lg px-2 py-1 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",value:x,onChange:G=>f(G.target.value),onKeyDown:G=>{G.key==="Enter"&&J(),G.key==="Escape"&&O()},autoFocus:!0}):n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("span",{className:"text-[10px] font-mono text-content-secondary truncate",children:E.secret&&!l.has(E.key)?"••••••••":E.value}),E.secret&&n.jsx("button",{type:"button",onClick:()=>_(E.key),className:"text-content-tertiary hover:text-content-secondary flex-shrink-0 p-0.5",children:l.has(E.key)?n.jsx(P2,{size:9}):n.jsx(qg,{size:9})})]})}),n.jsx("div",{className:"text-center",children:L?n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[8px] bg-blue-50 text-blue-600 px-1.5 py-0.5 rounded ring-1 ring-blue-200 font-medium",children:[n.jsx(Go,{size:7})," ",Z??"sys"]}):E.secret?n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[8px] bg-amber-50 text-amber-600 px-1.5 py-0.5 rounded ring-1 ring-amber-200 font-medium",children:[n.jsx(dd,{size:7})," secret"]}):n.jsx("span",{className:"text-[8px] text-content-tertiary",children:"plain"})}),n.jsx("div",{className:"flex items-center gap-0.5 justify-center",children:L?n.jsx("span",{className:"text-[8px] text-content-tertiary italic",children:"read-only"}):ie?n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:J,title:"Save",className:"p-1 rounded-md text-emerald-500 hover:bg-emerald-50 transition-colors",children:n.jsx(_e,{size:11})}),n.jsx("button",{type:"button",onClick:O,title:"Cancel",className:"p-1 rounded-md text-content-tertiary hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:11})})]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:()=>Q(E),title:"Edit",className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",children:n.jsx(_r,{size:10})}),n.jsx("button",{type:"button",title:"Delete",onClick:()=>v(`Delete "${E.key}"?`,()=>j.mutate(E.key)),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors",children:n.jsx(gn,{size:10})})]})})]},E.key)})})]})})]})}),n.jsx(Rn,{...y})]})}function Vy({children:e,className:t,padding:s=!0}){return n.jsx("div",{className:S("bg-surface rounded-xl border border-border shadow-card transition-shadow duration-200",s&&"p-5",t),children:e})}const cS={blue:{bg:"bg-blue-50",border:"border-blue-200/60",value:"text-blue-600",icon:"text-blue-500",glow:"shadow-blue-100/50"},teal:{bg:"bg-teal-50",border:"border-teal-200/60",value:"text-teal-600",icon:"text-teal-500",glow:"shadow-teal-100/50"},green:{bg:"bg-green-50",border:"border-green-200/60",value:"text-green-600",icon:"text-green-500",glow:"shadow-green-100/50"},orange:{bg:"bg-orange-50",border:"border-orange-200/60",value:"text-orange-600",icon:"text-orange-500",glow:"shadow-orange-100/50"},rose:{bg:"bg-rose-50",border:"border-rose-200/60",value:"text-rose-500",icon:"text-rose-400",glow:"shadow-rose-100/50"},red:{bg:"bg-red-50",border:"border-red-200/60",value:"text-red-600",icon:"text-red-500",glow:"shadow-red-100/50"},purple:{bg:"bg-purple-50",border:"border-purple-200/60",value:"text-purple-600",icon:"text-purple-500",glow:"shadow-purple-100/50"}};function Vl({label:e,value:t,sub:s,color:r,icon:a}){const i=r?cS[r]:null;return n.jsxs("div",{className:S("rounded-xl border px-4 py-3.5 flex items-center gap-3.5 transition-all duration-200",i?`${i.bg} ${i.border}`:"bg-surface border-border"),children:[a&&n.jsx("div",{className:S("flex items-center justify-center w-9 h-9 rounded-lg flex-shrink-0",i?`${i.bg} ${i.icon}`:"bg-surface-inset text-content-tertiary"),children:a}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-content-tertiary leading-none",children:e}),n.jsx("p",{className:S("font-bold mt-1.5 leading-none",typeof t=="string"&&t.length>3?"text-sm":"text-lg",i?i.value:"text-content"),children:t}),s&&n.jsx("p",{className:"text-[11px] text-content-tertiary mt-1",children:s})]})]})}const dS={1:"Smart Retry",2:"AI Regeneration",3:"Multi-Selector",4:"Visual/SoM",5:"Decompose",6:"Manual"};function uS({event:e}){const t=le(),{modalProps:s,confirmDelete:r}=Mn(),a=X({mutationFn:()=>Kn.accept(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:["healing"]}),A.success("Healing accepted — test file updated")},onError:o=>A.error(o.message)}),i=X({mutationFn:()=>Kn.reject(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:["healing"]}),A("Healing rejected")},onError:o=>A.error(o.message)}),l=X({mutationFn:()=>Kn.delete(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:["healing"]}),A.success("Event deleted")},onError:o=>A.error(o.message)});return n.jsxs(n.Fragment,{children:[n.jsxs(Vy,{className:"overflow-hidden",padding:!1,children:[n.jsxs("div",{className:"px-4 py-3 border-b border-border bg-surface-inset flex items-center gap-3",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-content-secondary truncate",children:e.instruction}),n.jsxs("p",{className:"text-xs text-content-tertiary mt-0.5",children:["Case: ",e.caseId," · Level ",e.level,": ",dS[e.level]??"Unknown"]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[n.jsx(Wy,{label:e.status,color:e.status==="pending"?"bg-yellow-100 text-yellow-700":e.status==="accepted"?"bg-green-100 text-green-700":"bg-slate-100 text-content-secondary"}),n.jsx("button",{type:"button",onClick:()=>r("Delete this healing event? This cannot be undone.",()=>l.mutate()),disabled:l.isPending,className:"p-1 text-content-tertiary hover:text-red-500 transition-colors",title:"Delete event",children:n.jsx(gn,{size:13})})]})]}),n.jsxs("div",{className:"grid grid-cols-2 divide-x divide-border-muted",children:[n.jsxs("div",{className:"p-3",children:[n.jsx("p",{className:"text-xs font-semibold text-red-500 mb-1",children:"Before (failed)"}),n.jsx("pre",{className:"text-xs font-mono text-content-secondary bg-red-50 rounded p-2 overflow-x-auto whitespace-pre-wrap break-all max-h-32",children:e.failedCode||"// (no code)"})]}),n.jsxs("div",{className:"p-3",children:[n.jsx("p",{className:"text-xs font-semibold text-green-600 mb-1",children:"After (healed)"}),n.jsx("pre",{className:"text-xs font-mono text-content-secondary bg-green-50 rounded p-2 overflow-x-auto whitespace-pre-wrap break-all max-h-32",children:e.healedCode})]})]}),e.status==="pending"&&n.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-t border-border bg-surface-inset",children:[n.jsxs(re,{size:"sm",onClick:()=>a.mutate(),loading:a.isPending,children:[n.jsx(_e,{size:13})," Accept & Update File"]}),n.jsxs(re,{variant:"secondary",size:"sm",onClick:()=>i.mutate(),loading:i.isPending,children:[n.jsx(Se,{size:13})," Reject"]})]})]}),n.jsx(Rn,{...s})]})}function Ad({title:e,events:t}){return n.jsxs("div",{className:"mb-8",children:[n.jsxs("h2",{className:"text-sm font-semibold text-content-secondary mb-3",children:[e," (",t.length,")"]}),n.jsx("div",{className:"space-y-3 max-h-[680px] overflow-y-auto pr-1",children:t.map(s=>n.jsx(uS,{event:s},s.id))})]})}function xS(){const e=le(),{modalProps:t,confirmDelete:s}=Mn(),{data:r=[],isLoading:a}=ke({queryKey:["healing","pending"],queryFn:()=>Kn.pending()}),{data:i}=ke({queryKey:["healing","stats"],queryFn:()=>Kn.stats()}),{data:l=[]}=ke({queryKey:["healing"],queryFn:()=>Kn.list()}),o=X({mutationFn:Kn.acceptAll,onSuccess:y=>{e.invalidateQueries({queryKey:["healing"]}),A.success(`Accepted ${y.accepted} heal(s)`)},onError:y=>A.error(y.message)}),c=X({mutationFn:Kn.deleteAll,onSuccess:y=>{e.invalidateQueries({queryKey:["healing"]}),A.success(`Cleared ${y.deleted} event(s)`)},onError:y=>A.error(y.message)}),d=(y,v)=>y.createdAt<v.createdAt?1:-1,x=[...r].sort(d),f=[...l.filter(y=>y.status==="accepted")].sort(d),g=[...l.filter(y=>y.status==="rejected")].sort(d),b=()=>{s("Delete all healing events? This cannot be undone.",()=>c.mutate())};return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 px-6 py-4 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h1",{className:"text-xl font-bold text-content flex items-center gap-2",children:[n.jsx(Wo,{size:20,className:"text-accent"})," Self-Healing"]}),n.jsx("p",{className:"text-sm text-content-tertiary mt-0.5",children:"Review AI-generated fixes for broken test steps"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[l.length>0&&n.jsxs(re,{variant:"secondary",onClick:b,loading:c.isPending,children:[n.jsx(K2,{size:14})," Delete All"]}),r.length>0&&n.jsxs(re,{onClick:()=>o.mutate(),loading:o.isPending,children:[n.jsx(Ug,{size:15})," Accept All (",r.length,")"]})]})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[i&&n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(Vl,{label:"Total Events",value:i.total,color:"blue"}),n.jsx(Vl,{label:"Pending Review",value:i.pending,color:"orange"}),n.jsx(Vl,{label:"Accepted",value:i.accepted,color:"green"}),n.jsx(Vl,{label:"Rejected",value:i.rejected,color:"purple"})]}),a&&n.jsx("p",{className:"text-sm text-content-tertiary text-center py-12",children:"Loading…"}),x.length>0&&n.jsx(Ad,{title:"Pending Review",events:x}),!a&&r.length===0&&n.jsxs(Vy,{className:"text-center py-12 mb-6",children:[n.jsx(Wo,{size:32,className:"text-slate-200 mx-auto mb-3"}),n.jsx("p",{className:"text-content-secondary font-medium",children:"No pending heals"}),n.jsx("p",{className:"text-content-tertiary text-sm mt-1",children:"Self-healing events appear here when tests fail and AI generates a fix"})]}),f.length>0&&n.jsx(Ad,{title:"Accepted",events:f}),g.length>0&&n.jsx(Ad,{title:"Rejected",events:g})]}),n.jsx(Rn,{...t})]})}function ln({label:e,hint:t,children:s}){return n.jsxs("div",{className:"flex items-start gap-4 py-2.5 border-b border-border/50 last:border-0",children:[n.jsxs("div",{className:"w-40 flex-shrink-0 pt-0.5",children:[n.jsx("p",{className:"text-[11px] font-semibold text-content-secondary",children:e}),t&&n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5 leading-relaxed",children:t})]}),n.jsx("div",{className:"flex-1 min-w-0",children:s})]})}function Nt({label:e,hint:t,checked:s,onChange:r}){return n.jsxs("div",{className:"flex items-start gap-3 py-2.5 border-b border-border/50 last:border-0",children:[n.jsx("div",{className:"pt-0.5 flex-shrink-0",children:n.jsx(ec,{checked:s,onChange:r})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-semibold text-content-secondary",children:e}),t&&n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5",children:t})]})]})}function In({icon:e,iconBg:t,title:s,desc:r,children:a}){return n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2.5 border-b border-border flex items-center gap-2.5",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 shadow-sm",t),children:n.jsx(e,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-xs font-bold text-content",children:s}),r&&n.jsx("p",{className:"text-[9px] text-content-tertiary",children:r})]})]}),n.jsx("div",{className:"px-4 py-1",children:a})]})}function ms(e){return n.jsx("input",{...e,className:S("border border-border rounded-lg px-2.5 py-1.5 text-xs bg-surface text-content-secondary","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40",e.className)})}function wi({value:e,onChange:t,options:s,className:r}){return n.jsx("select",{value:e,onChange:a=>t(a.target.value),className:S("border border-border rounded-lg px-2.5 py-1.5 text-xs bg-surface text-content-secondary","focus:outline-none focus:ring-2 focus:ring-accent/30",r),children:s.map(a=>n.jsx("option",{value:a.value,children:a.label},a.value))})}const Dd=[{label:"Standard (1280×720)",width:1280,height:720},{label:"Laptop (1366×768)",width:1366,height:768},{label:"Full HD (1920×1080)",width:1920,height:1080},{label:"Mobile (390×844)",width:390,height:844},{label:"Tablet (768×1024)",width:768,height:1024},{label:"Custom",width:0,height:0}];function mS({viewport:e,onChange:t}){const s=Dd.find(i=>i.width===e.width&&i.height===e.height),r=(s==null?void 0:s.label)??"Custom",a=i=>{const l=Dd.find(o=>o.label===i);l&&l.width!==0&&t({width:l.width,height:l.height})};return n.jsx(ln,{label:"Viewport",hint:"Browser window size",children:n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx(wi,{className:"w-44",value:r,onChange:a,options:Dd.map(i=>({value:i.label,label:i.label}))}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(ms,{type:"number",className:"w-16",value:e.width,min:320,onChange:i=>t({...e,width:Number(i.target.value)})}),n.jsx("span",{className:"text-content-tertiary text-[10px]",children:"×"}),n.jsx(ms,{type:"number",className:"w-16",value:e.height,min:240,onChange:i=>t({...e,height:Number(i.target.value)})}),n.jsx("span",{className:"text-[9px] text-content-tertiary",children:"px"})]})]})})}function hS(){var g,b,y,v,N,h,u,p,j,w,z,C,P,_,I,Q,J;const e=le(),{data:t,isLoading:s}=ke({queryKey:["config"],queryFn:()=>Ha.get()}),[r,a]=m.useState({}),[i,l]=m.useState(!1),[o,c]=m.useState({name:"",environment:"stage",baseUrl:"",browsers:["chromium"]});m.useEffect(()=>{t&&a(t)},[t]);const d=X({mutationFn:()=>Ha.update(r),onSuccess:()=>{e.invalidateQueries({queryKey:["config"]}),A.success("Settings saved")},onError:O=>A.error(O.message)}),x=(O,E)=>a(L=>({...L,[O]:E})),f=O=>{const E=r.browsers??[];x("browsers",E.includes(O)?E.length>1?E.filter(L=>L!==O):E:[...E,O])};return s||!r.healing||!r.reporting?n.jsx("div",{className:"flex h-full items-center justify-center",children:n.jsx(ce,{size:20,className:"animate-spin text-accent"})}):n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-violet-600 flex items-center justify-center shadow-sm shadow-indigo-500/20",children:n.jsx(Ba,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Settings"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Configure Assuremind Studio"})]})]}),n.jsxs(re,{size:"sm",onClick:()=>d.mutate(),loading:d.isPending,children:[n.jsx(ny,{size:11})," Save Settings"]})]})}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3 items-start",children:[n.jsxs("div",{className:"space-y-3",children:[n.jsxs(In,{icon:_2,iconBg:"bg-gradient-to-br from-indigo-500 to-violet-600 shadow-indigo-500/20",title:"Environment",desc:"Target environment & URLs",children:[n.jsx(ln,{label:"Active Environment",hint:"Where tests run against",children:n.jsx("div",{className:"flex gap-1 flex-wrap",children:["dev","stage","test","prod"].map(O=>n.jsx("button",{type:"button",onClick:()=>{var L;x("environment",O);const E=(L=r.environmentUrls)==null?void 0:L[O];E&&x("baseUrl",E)},className:S("px-2.5 py-1 rounded-lg text-[10px] font-semibold uppercase tracking-wide transition-all",r.environment===O?"bg-accent text-white shadow-sm shadow-accent/20":"text-content-tertiary hover:text-content-secondary bg-surface-inset ring-1 ring-border"),children:O},O))})}),n.jsx(ln,{label:"Environment URLs",hint:"Base URL per environment",children:n.jsx("div",{className:"space-y-1.5",children:["dev","stage","test","prod"].map(O=>{var E;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:S("w-11 text-[9px] font-bold uppercase text-center py-0.5 rounded",r.environment===O?"bg-accent/10 text-accent ring-1 ring-accent/20":"bg-surface-inset text-content-tertiary ring-1 ring-border"),children:O}),n.jsx(ms,{className:"flex-1",placeholder:`https://${O}.example.com`,value:((E=r.environmentUrls)==null?void 0:E[O])??"",onChange:L=>{const Z={...r.environmentUrls??{dev:"",stage:"",test:"",prod:""},[O]:L.target.value};x("environmentUrls",Z),r.environment===O&&x("baseUrl",L.target.value)}})]},O)})})}),n.jsx(ln,{label:"Base URL",hint:"Auto-resolved from active env",children:n.jsx(ms,{className:"w-full bg-surface-inset/50 text-content-tertiary cursor-not-allowed",placeholder:"http://localhost:3000",value:r.baseUrl??"",readOnly:!0,disabled:!0})})]}),n.jsxs(In,{icon:Ba,iconBg:"bg-gradient-to-br from-slate-500 to-slate-700 shadow-slate-500/20",title:"Execution",desc:"Timeouts, retries & parallelism",children:[n.jsx(ln,{label:"Timeouts & Workers",hint:"Per-test limits",children:n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] text-content-tertiary mb-0.5",children:"Timeout (ms)"}),n.jsx(ms,{type:"number",className:"w-24",value:r.timeout??3e4,onChange:O=>x("timeout",Number(O.target.value))})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] text-content-tertiary mb-0.5",children:"Retries"}),n.jsx(ms,{type:"number",min:0,max:5,className:"w-16",value:r.retries??1,onChange:O=>x("retries",Number(O.target.value))})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] text-content-tertiary mb-0.5",children:"Workers"}),n.jsx(ms,{type:"number",min:1,max:10,className:"w-16",value:r.parallel??2,onChange:O=>x("parallel",Number(O.target.value))})]})]})}),n.jsx(ln,{label:"Page load strategy",hint:"Playwright wait after each step",children:n.jsx(wi,{className:"w-full",value:r.pageLoad??"domcontentloaded",onChange:O=>x("pageLoad",O),options:[{value:"commit",label:"commit — first network response"},{value:"domcontentloaded",label:"domcontentloaded — DOM ready"},{value:"load",label:"load — full page load event"},{value:"networkidle",label:"networkidle — no network 500ms"}]})})]}),n.jsxs(In,{icon:gm,iconBg:"bg-gradient-to-br from-amber-500 to-orange-600 shadow-amber-500/20",title:"Self-Healing",desc:"AI-powered selector recovery",children:[n.jsx(Nt,{label:"Enable self-healing",hint:"Auto-fix broken selectors during runs",checked:((g=r.healing)==null?void 0:g.enabled)??!0,onChange:O=>x("healing",{...r.healing,enabled:O})}),n.jsx(ln,{label:"Max healing level",hint:"1 = retry only · 2 = AI regen · 3 = multi-selector · 4 = visual · 5 = decompose",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ms,{type:"number",min:1,max:5,className:"w-16",value:Math.min(((b=r.healing)==null?void 0:b.maxLevel)??5,5),onChange:O=>x("healing",{...r.healing,maxLevel:Number(O.target.value)})}),n.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(O=>{var E;return n.jsx("div",{className:S("w-4 h-1.5 rounded-full transition-colors",O<=Math.min(((E=r.healing)==null?void 0:E.maxLevel)??5,5)?"bg-amber-400":"bg-surface-inset")},O)})})]})}),n.jsx(Nt,{label:"Auto-PR on CI heal",hint:"GitHub PR when selector healed in CI",checked:((y=r.healing)==null?void 0:y.autoPR)??!1,onChange:O=>x("healing",{...r.healing,autoPR:O})})]}),n.jsxs(In,{icon:En,iconBg:"bg-gradient-to-br from-indigo-500 to-blue-600 shadow-indigo-500/20",title:"Reporting",desc:"Output format & destinations",children:[n.jsx(Nt,{label:"Allure report",hint:"Interactive HTML report with history & trends",checked:((v=r.reporting)==null?void 0:v.allure)??!0,onChange:O=>x("reporting",{...r.reporting,allure:O})}),n.jsx(Nt,{label:"HTML report",hint:"Standalone summary saved to results/",checked:((N=r.reporting)==null?void 0:N.html)??!0,onChange:O=>x("reporting",{...r.reporting,html:O})}),n.jsx(Nt,{label:"JSON report",hint:"Machine-readable run data",checked:((h=r.reporting)==null?void 0:h.json)??!0,onChange:O=>x("reporting",{...r.reporting,json:O})})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs(In,{icon:Or,iconBg:"bg-gradient-to-br from-blue-500 to-cyan-600 shadow-blue-500/20",title:"General",desc:"Browser & display settings",children:[n.jsx(ln,{label:"Browsers",hint:"One or more browsers",children:n.jsx("div",{className:"flex gap-1.5 flex-wrap",children:oy.map(O=>{const E=(r.browsers??[]).includes(O);return n.jsxs("button",{type:"button",onClick:()=>f(O),className:S("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[10px] font-semibold capitalize transition-all",E?"bg-accent/10 text-accent ring-1 ring-accent/30":"text-content-tertiary bg-surface-inset ring-1 ring-border hover:text-content-secondary"),children:[n.jsx(qa,{browser:O,size:14}),O]},O)})})}),n.jsx(Nt,{label:"Headless mode",hint:"Run browsers without visible window",checked:r.headless??!0,onChange:O=>x("headless",O)}),n.jsx(mS,{viewport:r.viewport??{width:1280,height:720},onChange:O=>x("viewport",O)})]}),n.jsxs(In,{icon:Mr,iconBg:"bg-gradient-to-br from-pink-500 to-rose-600 shadow-pink-500/20",title:"Capture",desc:"Screenshots, video & traces",children:[n.jsx(ln,{label:"Screenshot",hint:"When to capture screenshots",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Mr,{size:11,className:"text-pink-400 flex-shrink-0"}),n.jsx(wi,{className:"w-40",value:r.screenshot??"only-on-failure",onChange:O=>x("screenshot",O),options:[{value:"off",label:"Off"},{value:"on",label:"Every test"},{value:"only-on-failure",label:"On failure only"}]})]})}),n.jsx(ln,{label:"Video",hint:"When to record video",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(zc,{size:11,className:"text-violet-400 flex-shrink-0"}),n.jsx(wi,{className:"w-40",value:r.video??"off",onChange:O=>x("video",O),options:[{value:"off",label:"Off"},{value:"on",label:"Every test"},{value:"on-first-retry",label:"On first retry"},{value:"retain-on-failure",label:"On failure only"}]})]})}),n.jsx(ln,{label:"Trace",hint:"Playwright trace for debugging",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(sy,{size:11,className:"text-emerald-400 flex-shrink-0"}),n.jsx(wi,{className:"w-40",value:r.trace??"on-first-retry",onChange:O=>x("trace",O),options:[{value:"off",label:"Off"},{value:"on",label:"Every test"},{value:"on-first-retry",label:"On first retry"},{value:"retain-on-failure",label:"On failure only"}]})]})})]}),n.jsxs(In,{icon:Ot,iconBg:"bg-gradient-to-br from-purple-500 to-fuchsia-600 shadow-purple-500/20",title:"MCP Integration",desc:"AI-sighted code generation via Playwright MCP",children:[n.jsx(Nt,{label:"Enable MCP",hint:"ON by default — AI sees real page elements during generation. Test execution is unaffected.",checked:((u=r.mcp)==null?void 0:u.enabled)??!0,onChange:O=>x("mcp",{...r.mcp,enabled:O})}),n.jsx(Nt,{label:"Headless mode",hint:"Run MCP browser without visible window",checked:((p=r.mcp)==null?void 0:p.headless)??!0,onChange:O=>x("mcp",{...r.mcp,headless:O})}),n.jsx(Nt,{label:"Act-then-script",hint:"Execute action via MCP first, then convert to script",checked:((j=r.mcp)==null?void 0:j.actThenScript)??!1,onChange:O=>x("mcp",{...r.mcp,actThenScript:O})}),n.jsx(Nt,{label:"Proactive healing",hint:"Validate selectors against live page before test run",checked:((w=r.mcp)==null?void 0:w.proactiveHealing)??!1,onChange:O=>x("mcp",{...r.mcp,proactiveHealing:O})})]}),n.jsxs(In,{icon:b2,iconBg:"bg-gradient-to-br from-emerald-500 to-teal-600 shadow-emerald-500/20",title:"RAG Memory",desc:"Semantic memory from past runs — AI learns from every generation & healing",children:[n.jsx(Nt,{label:"Enable RAG",hint:"AI retrieves similar past steps & fixes to improve accuracy",checked:((z=r.rag)==null?void 0:z.enabled)??!0,onChange:O=>x("rag",{...r.rag,enabled:O})}),n.jsx(Nt,{label:"Code Corpus",hint:"Remember instruction-to-code mappings from successful runs",checked:((P=(C=r.rag)==null?void 0:C.codeCorpus)==null?void 0:P.enabled)??!0,onChange:O=>x("rag",{...r.rag,codeCorpus:{...r.rag.codeCorpus,enabled:O}})}),n.jsx(Nt,{label:"Healing Corpus",hint:"Remember past healing fixes for smarter self-repair",checked:((I=(_=r.rag)==null?void 0:_.healingCorpus)==null?void 0:I.enabled)??!0,onChange:O=>x("rag",{...r.rag,healingCorpus:{...r.rag.healingCorpus,enabled:O}})}),n.jsx(Nt,{label:"Error Catalog",hint:"Track recurring error patterns to avoid known-bad selectors",checked:((J=(Q=r.rag)==null?void 0:Q.errorCatalog)==null?void 0:J.enabled)??!0,onChange:O=>x("rag",{...r.rag,errorCatalog:{...r.rag.errorCatalog,enabled:O}})})]}),n.jsx(In,{icon:Or,iconBg:"bg-gradient-to-br from-teal-500 to-cyan-600 shadow-teal-500/20",title:"Environment Profiles",desc:"Quick-switch presets for different environments",children:n.jsxs("div",{id:"profiles",className:"space-y-2",children:[(r.profiles??[]).length===0&&n.jsx("p",{className:"text-[10px] text-content-tertiary py-2",children:"No profiles defined. Add one below."}),(r.profiles??[]).map((O,E)=>n.jsxs("div",{className:"flex items-center gap-2 py-1.5 border-b border-border/40 last:border-0",children:[n.jsx("span",{className:"text-xs font-medium text-content w-24 truncate",children:O.name}),n.jsx("span",{className:"text-[10px] text-content-tertiary w-14",children:O.environment}),n.jsx("span",{className:"text-[10px] text-content-tertiary flex-1 truncate",children:O.baseUrl}),n.jsx("button",{type:"button",onClick:()=>{const L=(r.profiles??[]).filter((Z,ie)=>ie!==E);x("profiles",L)},className:"p-1 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors flex-shrink-0",children:n.jsx(gn,{size:11})})]},E)),i?n.jsxs("div",{className:"mt-2 p-3 rounded-lg border border-border bg-surface-alt space-y-2",children:[n.jsx("p",{className:"text-[10px] font-semibold text-content-secondary",children:"New Profile"}),n.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Name"}),n.jsx("input",{type:"text",value:o.name,onChange:O=>c(E=>({...E,name:O.target.value})),placeholder:"e.g. Staging",className:"w-full mt-0.5 px-2 py-1 text-[11px] rounded border border-border bg-surface focus:outline-none focus:ring-1 focus:ring-accent"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Environment"}),n.jsxs("select",{value:o.environment,onChange:O=>c(E=>({...E,environment:O.target.value})),className:"w-full mt-0.5 px-2 py-1 text-[11px] rounded border border-border bg-surface focus:outline-none focus:ring-1 focus:ring-accent",children:[n.jsx("option",{value:"dev",children:"dev"}),n.jsx("option",{value:"stage",children:"stage"}),n.jsx("option",{value:"test",children:"test"}),n.jsx("option",{value:"prod",children:"prod"})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Base URL"}),n.jsx("input",{type:"url",value:o.baseUrl,onChange:O=>c(E=>({...E,baseUrl:O.target.value})),placeholder:"https://your-app.com",className:"w-full mt-0.5 px-2 py-1 text-[11px] rounded border border-border bg-surface focus:outline-none focus:ring-1 focus:ring-accent"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Browsers"}),n.jsx("div",{className:"flex gap-3 mt-1",children:["chromium","firefox","webkit"].map(O=>n.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-content-secondary cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:o.browsers.includes(O),onChange:E=>c(L=>({...L,browsers:E.target.checked?[...L.browsers,O]:L.browsers.filter(Z=>Z!==O)})),className:"rounded"}),n.jsx(qa,{browser:O,size:12}),O]},O))})]}),n.jsxs("div",{className:"flex gap-2 pt-1",children:[n.jsx("button",{type:"button",onClick:()=>{if(!o.name.trim()){A.error("Profile name is required");return}if(!o.baseUrl.startsWith("http")){A.error("Base URL must start with http:// or https://");return}if(o.browsers.length===0){A.error("Select at least one browser");return}x("profiles",[...r.profiles??[],{name:o.name.trim(),environment:o.environment,baseUrl:o.baseUrl,browsers:o.browsers}]),c({name:"",environment:"stage",baseUrl:"",browsers:["chromium"]}),l(!1)},className:"px-2.5 py-1 text-[10px] font-medium rounded bg-accent text-white hover:bg-accent-dark transition-colors",children:"Add"}),n.jsx("button",{type:"button",onClick:()=>{l(!1),c({name:"",environment:"stage",baseUrl:"",browsers:["chromium"]})},className:"px-2.5 py-1 text-[10px] rounded border border-border text-content-secondary hover:bg-surface-alt transition-colors",children:"Cancel"})]})]}):n.jsxs("button",{type:"button",onClick:()=>l(!0),className:"inline-flex items-center gap-1 text-[10px] text-accent hover:text-accent-dark py-1 transition-colors",children:[n.jsx(Pn,{size:11})," Add Profile"]})]})})]})]})]})})})}function fS(){const e=le(),{modalProps:t,confirmDelete:s}=Mn(),[r,a]=m.useState(!1),[i,l]=m.useState(""),[o,c]=m.useState(""),[d,x]=m.useState(""),[f,g]=m.useState(null),[b,y]=m.useState({}),[v,N]=m.useState(null),{data:h=[],isLoading:u}=ke({queryKey:["step-library"],queryFn:()=>ar.list()}),p=X({mutationFn:()=>ar.create({name:i.trim(),instruction:o.trim(),tags:d.split(",").map(C=>C.trim()).filter(Boolean)}),onSuccess:()=>{e.invalidateQueries({queryKey:["step-library"]}),A.success("Step created"),a(!1),l(""),c(""),x("")},onError:C=>A.error(C.message)}),j=X({mutationFn:({id:C,data:P})=>ar.update(C,P),onSuccess:()=>{e.invalidateQueries({queryKey:["step-library"]}),A.success("Step updated"),g(null)},onError:C=>A.error(C.message)}),w=X({mutationFn:C=>ar.delete(C),onSuccess:()=>{e.invalidateQueries({queryKey:["step-library"]}),A.success("Step deleted")},onError:C=>A.error(C.message)}),z=X({mutationFn:C=>ar.generate(C),onSuccess:()=>{e.invalidateQueries({queryKey:["step-library"]}),A.success("Code generated"),N(null)},onError:C=>{A.error(C.message),N(null)}});return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-4xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center shadow-sm shadow-violet-500/20",children:n.jsx(tl,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Step Library"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Reusable step templates for your test cases"})]})]}),n.jsxs("button",{type:"button",onClick:()=>a(C=>!C),className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors",children:[n.jsx(Pn,{size:13})," Add Step"]})]})}),r&&n.jsxs("div",{className:"rounded-xl border border-accent/30 bg-surface p-4 space-y-2.5",children:[n.jsx("p",{className:"text-xs font-semibold text-content",children:"New Library Step"}),n.jsx("input",{type:"text",placeholder:"Name (e.g. Login as admin)",value:i,onChange:C=>l(C.target.value),className:"w-full px-3 py-2 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30"}),n.jsx("textarea",{placeholder:"Instruction (e.g. Click the login button and fill in admin credentials)",value:o,onChange:C=>c(C.target.value),rows:3,className:"w-full px-3 py-2 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30 resize-none"}),n.jsx("input",{type:"text",placeholder:"Tags (comma-separated, optional)",value:d,onChange:C=>x(C.target.value),className:"w-full px-3 py-2 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button",onClick:()=>p.mutate(),disabled:!i.trim()||!o.trim()||p.isPending,className:"text-xs px-4 py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:p.isPending?"Saving…":"Save"}),n.jsx("button",{type:"button",onClick:()=>a(!1),className:"text-xs px-3 py-1.5 rounded-lg border border-border text-content-secondary hover:bg-surface-inset",children:"Cancel"})]})]}),u&&n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}),!u&&h.length===0&&!r&&n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx(tl,{size:24,className:"text-content-tertiary"}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No steps in library"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:'Click "Add Step" to create your first reusable step template.'})]}),h.length>0&&n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("table",{className:"w-full text-xs",children:[n.jsx("thead",{className:"bg-surface-inset/50 border-b border-border",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left px-4 py-2.5 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Name"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Instruction"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Code"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Tags"}),n.jsx("th",{className:"px-4 py-2.5 w-24"})]})}),n.jsx("tbody",{className:"divide-y divide-border",children:h.map(C=>n.jsxs("tr",{className:"hover:bg-surface-inset/30 transition-colors",children:[n.jsx("td",{className:"px-4 py-2.5 font-medium text-content",children:f===C.id?n.jsx("input",{type:"text",value:b.name??C.name,onChange:P=>y(_=>({..._,name:P.target.value})),className:"w-full px-2 py-1 border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-accent/30"}):C.name}),n.jsx("td",{className:"px-4 py-2.5 text-content-secondary max-w-xs",children:f===C.id?n.jsx("textarea",{value:b.instruction??C.instruction,onChange:P=>y(_=>({..._,instruction:P.target.value})),rows:2,className:"w-full px-2 py-1 border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-accent/30 resize-none"}):n.jsx("span",{className:"line-clamp-2",children:C.instruction})}),n.jsx("td",{className:"px-4 py-2.5",children:C.generatedCode?n.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-1 ring-emerald-200 dark:ring-emerald-800",children:"Ready"}):n.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-1 ring-amber-200 dark:ring-amber-800",children:"No code"})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"flex flex-wrap gap-0.5",children:C.tags.map(P=>n.jsx("span",{className:"text-[8px] px-1 py-px rounded bg-accent/8 text-accent ring-1 ring-accent/15",children:P},P))})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"flex items-center gap-1",children:f===C.id?n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:()=>j.mutate({id:C.id,data:b}),className:"p-1 rounded text-emerald-600 hover:bg-emerald-50",children:n.jsx(_e,{size:12})}),n.jsx("button",{type:"button",onClick:()=>g(null),className:"p-1 rounded text-content-tertiary hover:bg-surface-inset",children:n.jsx(Se,{size:12})})]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:C.generatedCode?"Regenerate code":"Generate code",onClick:()=>{N(C.id),z.mutate(C.id)},disabled:v===C.id,className:"p-1 rounded text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors disabled:opacity-40",children:v===C.id?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Dr,{size:12})}),n.jsx("button",{type:"button",onClick:()=>{g(C.id),y({name:C.name,instruction:C.instruction,tags:C.tags})},className:"p-1 rounded text-content-tertiary hover:text-content hover:bg-surface-inset",children:n.jsx(_r,{size:12})}),n.jsx("button",{type:"button",onClick:()=>s(`Delete "${C.name}"?`,()=>w.mutate(C.id)),className:"p-1 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50",children:n.jsx(gn,{size:12})})]})})})]},C.id))})]})})]})}),n.jsx(Rn,{...t})]})}const ki=[{id:"getting-started",title:"Getting Started",category:"Getting Started",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Assuremind Studio is an AI-powered test automation platform for web applications. It lets you describe tests in plain English, generate Playwright code automatically, and run them in the cloud or locally."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Prerequisites"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Node.js 18+"}),n.jsx("li",{children:"An AI provider API key (Anthropic, OpenAI, Google, or Azure)"}),n.jsx("li",{children:"A test target application URL"})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Quick Setup"}),n.jsx("pre",{className:"text-[11px] bg-surface-inset rounded-lg px-4 py-3 overflow-x-auto border border-border font-mono",children:`npm install
|
|
814
|
+
npm run build
|
|
815
|
+
npm start`}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open ",n.jsx("code",{className:"text-accent",children:"http://localhost:4000"})," to access the Studio UI. The first run triggers the onboarding wizard."]})]})},{id:"configuration",title:"Configuration",category:"Getting Started",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Configuration is stored in ",n.jsx("code",{className:"text-accent",children:"tests/autotest.config.json"})," and editable from the Settings page."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Key Settings"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Field"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Description"})]})}),n.jsx("tbody",{className:"text-content-secondary",children:[["baseUrl","Default URL for all test cases"],["environment","Active environment: dev | stage | test | prod"],["browsers","List of browsers: chromium, firefox, webkit"],["headless","Run browsers without a visible window"],["timeout","Global step timeout in ms (default 30000)"],["retries","Global retry count per step (default 0)"],["parallel","Number of parallel workers"],["screenshot","Screenshot mode: always | on-failure | never"]].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4 font-mono text-accent",children:e}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})})]})},{id:"test-suites",title:"Test Suites",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Test Suites group related test cases. Each suite has a type (",n.jsx("strong",{children:"UI"}),", ",n.jsx("strong",{children:"API"}),", or ",n.jsx("strong",{children:"Audit"}),"), tags, and an optional timeout override."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Suite Types"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Type"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Description"})]})}),n.jsx("tbody",{className:"text-content-secondary",children:[["UI",'Standard Playwright browser automation. Steps show a blue "UI" badge. No Lighthouse.'],["API","API-only tests using HTTP request and assertion steps."],["Audit",'Full Playwright automation with Lighthouse non-functional checks (Performance, Accessibility, SEO). Steps show an amber "Audit" badge. Screenshot, video, and trace are disabled by default. Files stored in tests/audit/.']].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4 font-mono text-accent",children:e}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Creating a Suite"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Go to ",n.jsx("strong",{children:"Test Suites"})," in the sidebar."]}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"+ New Suite"})," and enter a name."]}),n.jsxs("li",{children:["Select the suite type: ",n.jsx("strong",{children:"UI"}),", ",n.jsx("strong",{children:"API"}),", or ",n.jsx("strong",{children:"Audit"}),"."]}),n.jsx("li",{children:"Optionally set tags and timeout."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Suite Actions"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Each suite supports inline rename, duplicate, delete, and direct run via the Run Configuration page."})]})},{id:"audit-suites",title:"Audit Suites",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Audit suites run exactly like UI suites (full Playwright automation) but add non-functional quality checks via Google Lighthouse for Performance, Accessibility, and SEO."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"⚡ Audit Flag on Steps"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["In Audit suites, each step has a ",n.jsx("strong",{children:"⚡ Audit"})," button. Clicking it marks that step as a Lighthouse checkpoint — when the step runs, Lighthouse audits ",n.jsx("code",{className:"text-accent",children:"page.url()"})," at that point. Confirm with ",n.jsx("strong",{children:"✓"})," to save or ",n.jsx("strong",{children:"✗"})," to cancel. If no steps are marked, Lighthouse is skipped entirely."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Non-Functional Checks"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Each test case in an Audit suite has a ",n.jsx("strong",{children:"Non-Functional Checks"})," section with three checkboxes:"]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"⚡ Performance"})," — Lighthouse Performance score"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"♿ Accessibility"})," — Lighthouse Accessibility score"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"🔍 SEO"})," — Lighthouse SEO score"]})]}),n.jsx("p",{className:"text-sm text-content-secondary",children:"If all three are unchecked, Lighthouse is skipped for that case. A warning is shown if none are selected."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Score Thresholds"}),n.jsxs("div",{className:"flex gap-4 text-sm",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-emerald-500 inline-block"})," Good (90–100)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-amber-400 inline-block"})," Needs Work (50–89)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-red-500 inline-block"})," Poor (0–49) — test FAILS"]})]})]})},{id:"test-cases",title:"Test Cases",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Test cases contain steps written in plain English. Each case has priority, tags, timeout, and optional data-driven configuration."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Writing Steps"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open a case, type a step instruction in the input bar (e.g. ",n.jsx("em",{children:'"Click the Login button"'}),"), and press Enter. The step is saved immediately. Click ",n.jsx("strong",{children:"Generate All"})," to generate Playwright code for all steps at once."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Step Types"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"UI"})," — Playwright browser actions"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"API"})," — HTTP request/assertion steps"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Mock"})," — Intercept and stub network requests"]})]})]})},{id:"ai-generation",title:"AI Code Generation",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Assuremind uses your configured AI provider to convert natural-language instructions into executable Playwright code."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Write a step instruction in plain English."}),n.jsxs("li",{children:["Click the wand icon or ",n.jsx("strong",{children:"Generate All"}),"."]}),n.jsx("li",{children:"The AI generates strategy-specific Playwright code."}),n.jsx("li",{children:"Review the code by expanding the step row."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Supported Providers"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Anthropic Claude, OpenAI GPT-4, Google Gemini, AWS Bedrock, Azure OpenAI, and Ollama (local). Configure via Settings → AI Provider."})]})},{id:"run-configuration",title:"Run Configuration",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Run Configuration page lets you select suites, browsers, and settings before executing a test run."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Options"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Select one or more suites to run"}),n.jsx("li",{children:"Override browsers, headless mode, and parallel count"}),n.jsx("li",{children:"Enable/disable video recording and tracing"}),n.jsx("li",{children:"Set retries and screenshot mode per run"})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Device Emulation"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["The ",n.jsx("strong",{children:"Device Emulation"})," section lets you emulate real mobile and tablet devices using Playwright's built-in device descriptors. Selecting a device applies the correct viewport, user-agent, device pixel ratio, and touch/mobile flags automatically."]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2 mt-1",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Desktop"})," — Viewport-only presets (1920×1080, 1440×900, 1366×768, 1280×720, 1024×768). No mobile emulation."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Mobile"})," — iPhone 15 Pro/15/14/SE, Pixel 7/5, Galaxy S9+/S8. Full Playwright device descriptor including touch events and mobile UA. Chromium is recommended."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Tablet"})," — iPad Pro 11″, iPad (gen 7), iPad Mini, Galaxy Tab S4. Use WebKit or Chromium for best results."]})]}),n.jsx("p",{className:"text-sm text-content-secondary mt-1",children:"A teal device badge appears on each case in the Reports page when the run used device emulation, making it easy to identify mobile vs desktop results at a glance."}),n.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg px-3 py-2 text-[11px] text-amber-700 mt-1",children:["⚠ Mobile and tablet device descriptors work best with ",n.jsx("strong",{children:"Chromium"}),". Firefox and WebKit do not fully support Playwright's mobile emulation flags."]}),n.jsx("h4",{className:"text-sm font-semibold text-content mt-2",children:"Live Progress"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Run progress is streamed via WebSocket. Status updates appear in real time on the case list and via toast notifications."}),n.jsx("h4",{className:"text-sm font-semibold text-content mt-2",children:"Running from CI/CD (CLI)"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Every option available in the UI is also available as a CLI flag:"}),n.jsx("pre",{className:"bg-[#1e1e2e] text-[#cdd6f4] text-[10px] font-mono p-3 rounded-lg overflow-x-auto leading-relaxed mt-1",children:`# Run all tests in CI (headless, exit 1 on failure)
|
|
816
|
+
npx assuremind run --all --ci
|
|
817
|
+
|
|
818
|
+
# Filter by type, suite, tag, or test name
|
|
819
|
+
npx assuremind run --type ui --tag smoke
|
|
820
|
+
npx assuremind run --suite "Login Tests" --browser chromium firefox
|
|
821
|
+
|
|
822
|
+
# Device emulation in CI
|
|
823
|
+
npx assuremind run --all --device "iPhone 15 Pro" --browser chromium --ci
|
|
824
|
+
npx assuremind run --tag smoke --device "Pixel 7" --browser chromium --ci
|
|
825
|
+
npx assuremind run --all --device "iPad Pro 11" --browser webkit --ci`})]})},{id:"reports",title:"Reports",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Reports show step-level results with screenshots, error messages, Lighthouse scores (Audit suites), and visual regression baselines."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Report Features"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Per-step pass/fail status and error details"}),n.jsx("li",{children:"Screenshot filmstrip — click any thumbnail to enlarge"}),n.jsx("li",{children:"Execution timeline (Gantt view) per case"}),n.jsx("li",{children:"Visual baseline comparison with diff overlay"}),n.jsx("li",{children:"Allure integration for full HTML reports"})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Lighthouse Results (Audit Suites)"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["For Audit suite cases with Lighthouse data, three tab buttons appear on the case row: ",n.jsx("strong",{children:"⚡ Speed"})," (Performance), ",n.jsx("strong",{children:"♿ A11y"})," (Accessibility), and ",n.jsx("strong",{children:"🔍 SEO"}),". Case rows are highlighted red when any score is Poor (< 50)."]}),n.jsxs("div",{className:"flex gap-4 text-sm mt-1",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-emerald-500 inline-block"})," Good (90+)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-amber-400 inline-block"})," Needs Work (50–89)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-red-500 inline-block"})," Poor (< 50) — case FAILS"]})]}),n.jsx("p",{className:"text-sm text-content-secondary mt-1",children:"Allure reports for Audit cases include three separate HTML attachments: Performance Report, Accessibility Report, and SEO Report. The Allure test status is set to FAILED if any score is below 50."})]})},{id:"self-healing",title:"Self-Healing",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Self-healing automatically fixes broken selectors when UI changes cause test failures. Failed steps are re-generated using AI with updated selectors."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Configuration"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Max Level"})," — Healing aggressiveness (1–5)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Daily Budget"})," — Max AI calls per day for healing"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Auto PR"})," — Automatically open a Git PR for healed steps"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Healed Steps"}),n.jsx("p",{className:"text-sm text-content-secondary",children:'Steps that were healed show an amber "healed" badge in the case editor. View the full healing log in the Self-Healing page.'})]})},{id:"variables",title:"Variables",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Variables let you inject dynamic data into step instructions using ",n.jsx("code",{className:"text-accent",children:"{{variableName}}"})," tokens."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Types of Variables"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Static"})," — Fixed string values (e.g. credentials)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Environment"})," — Per-environment overrides"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Faker"})," — Randomly generated test data (e.g. fake email)"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Dynamic Data Picker"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Click the data picker icon next to the step input to insert variables, faker tokens, or environment values at the cursor position."})]})},{id:"git-control",title:"Git Control Center",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Git Control Center provides a visual interface for all Git operations — commit, push, pull, branch switching, and conflict resolution."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Key Operations"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Commit"})," — Stage and commit all changes with a message"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"AI Message"})," — Generate a commit message using AI"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Full Sync"})," — Commit + push in one click"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Conflict Resolution"})," — Visual diff and AI-assisted merge"]})]})]})},{id:"bulk-actions",title:"Bulk Actions",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Select multiple test cases and perform batch operations including delete and move-to-suite."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How to Use"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Click the checkbox to the left of any test case row."}),n.jsxs("li",{children:["Hold ",n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-surface-inset border border-border text-[10px]",children:"Shift"})," and click another row to select a range."]}),n.jsx("li",{children:"The Bulk Action Bar appears at the bottom of the screen."}),n.jsxs("li",{children:["Choose ",n.jsx("strong",{children:"Delete"})," or ",n.jsx("strong",{children:"Move to Suite"}),"."]})]})]})},{id:"flakiness-tracker",title:"Flakiness Tracker",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Flakiness Tracker analyzes the last 20 runs for each test case and flags cases that intermittently pass and fail."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Flaky Badge"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Cases with a pass rate between 0% and 100% (and at least 3 runs) show an amber ",n.jsx("strong",{children:"~flaky"})," badge in the case list. Hover to see the exact pass rate."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Thresholds"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"A case is considered flaky when it has at least 3 recorded runs and its historical pass rate is between 1% and 99%."})]})},{id:"step-library",title:"Step Library",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Step Library stores reusable step templates that can be inserted into any test case with a single click."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Managing the Library"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Go to ",n.jsx("strong",{children:"Step Library"})," in the sidebar. Add steps with a name, instruction, and optional tags. Library steps are stored in ",n.jsx("code",{className:"text-accent",children:"tests/.step-library.json"}),"."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Inserting Steps"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open a test case, click the ",n.jsx("strong",{children:"Library"})," button in the top-right of the steps area. Search for a step template and click ",n.jsx("strong",{children:"Insert"})," to add it to the current case."]})]})},{id:"environment-profiles",title:"Environment Profiles",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Environment Profiles let you save and switch between different test configurations (URL, browsers, environment) without manually editing settings."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Creating Profiles"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Go to ",n.jsx("strong",{children:"Settings → Environment Profiles"})," and click ",n.jsx("strong",{children:"Add Profile"}),". Enter a name, then configure the profile in the list."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Switching Profiles"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"The profile picker appears in the top bar. Click a profile name to instantly apply it, overriding the active environment and base URL for the next run."})]})},{id:"mcp-integration",title:"MCP Integration",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["MCP (Model Context Protocol) integration connects the AI code generator to a real Playwright browser via the official ",n.jsx("code",{className:"text-accent",children:"@playwright/mcp"})," server. Instead of guessing selectors blindly, the AI sees actual page elements through accessibility snapshots — boosting code generation accuracy from ~50-70% to ~90-95%."]}),n.jsxs("div",{className:"rounded-lg bg-purple-50 border border-purple-200 px-4 py-3 text-sm text-purple-800",children:[n.jsx("strong",{children:"Enabled by default"})," — MCP is ON for code generation and OFF for test execution. Your existing tests and CI/CD pipelines are unaffected."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["When you click ",n.jsx("strong",{children:"Generate Code"}),", the SmartRouter launches a headless Playwright browser via MCP."]}),n.jsxs("li",{children:["The browser navigates to your app's URL and takes an ",n.jsx("strong",{children:"accessibility snapshot"})," — a structured tree of all interactive elements (buttons, inputs, links, etc.)."]}),n.jsx("li",{children:"The snapshot is fed to the AI alongside the step instruction, so the AI sees exact element roles, names, and attributes."}),n.jsx("li",{children:"The AI generates Playwright code using real selectors from the live page — no guessing."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Generation Strategies"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Strategy"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Toggle"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Description"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Snapshot-Driven","Enable MCP","AI sees live accessibility snapshot during generation. Zero overhead for cached/template steps."],["Act-then-Script","Act-then-script","AI plans MCP tool actions → executes them on the real browser → converts successful actions to Playwright code. Near-100% accuracy but higher latency."],["Proactive Healing","Proactive healing","Before a test run, MCP takes a fresh snapshot and validates every selector in generated code against the live page. Missing elements are flagged with suggestions."]].map(([e,t,s])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5 pr-4 font-mono text-accent text-[10px]",children:t}),n.jsx("td",{className:"py-1.5",children:s})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Settings"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Go to ",n.jsx("strong",{children:"Settings → MCP Integration"})," to configure:"]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Enable MCP"})," — Master switch (ON by default). When off, falls back to blind generation."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Headless mode"})," — Run the MCP browser without a visible window (ON by default)."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Act-then-script"})," — Two-phase generation: execute first, then convert to code (OFF by default)."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Proactive healing"})," — Pre-run selector validation against the live page (OFF by default)."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Fallback Behavior"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Every MCP call is wrapped in a silent try/catch. If the MCP server crashes, the browser fails to launch, or a snapshot times out, the system ",n.jsx("strong",{children:"automatically falls back to blind generation"})," — exactly how it worked before MCP. No test run will ever fail because of MCP."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Performance Impact"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Template steps (~60%)"})," — Zero MCP overhead (bypassed entirely)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Cached steps (~20%)"})," — Zero MCP overhead (bypassed entirely)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"AI-generated steps (~20%)"})," — +2-5s first page load, <500ms for subsequent snapshots on the same page"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Test execution"})," — Zero impact (MCP is never used during runs)"]})]})]})},{id:"rag-memory",title:"RAG Memory",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["RAG (Retrieval-Augmented Generation) gives the AI ",n.jsx("strong",{children:"semantic memory"})," from past test runs. Every successful step, healing fix, and recurring error is indexed so the AI retrieves similar experiences and generates better code over time."]}),n.jsxs("div",{className:"rounded-lg bg-emerald-50 border border-emerald-200 px-4 py-3 text-sm text-emerald-800",children:[n.jsx("strong",{children:"Enabled by default"})," — uses local TF-IDF embeddings and file-based JSON storage. Zero cost, zero database, fully offline."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Three Corpora"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Corpus"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Stores"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Used During"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Code Corpus","Instruction-to-code mappings from successful runs","Generation — similar past steps as AI examples or direct fuzzy cache hits"],["Healing Corpus","Past healing events (error + fix pairs)","Self-healing — proven past fixes injected into Level 2 repair prompt"],["Error Catalog","Recurring error patterns per URL with fix history","Generation — AI warned about known-bad selectors to avoid"]].map(([e,t,s])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5 pr-4",children:t}),n.jsx("td",{className:"py-1.5",children:s})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Step passes"})," — instruction + code are ingested into the Code Corpus."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Step fails"})," — error pattern is recorded in the Error Catalog."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Healing succeeds"})," — fix is ingested into the Healing Corpus; Error Catalog updated with the fix."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Next generation"})," — SmartRouter queries Code Corpus. Score ≥ 0.90 = direct use ($0). Score 0.65-0.90 = AI prompt examples."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Next healing"})," — Level 2 queries Healing Corpus for similar past fixes."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"SmartRouter Pipeline"}),n.jsx("pre",{className:"text-[11px] bg-surface-inset rounded-lg px-4 py-3 overflow-x-auto border border-border font-mono leading-relaxed",children:`1. Template ($0) → 2. Cache ($0) → 2.3 RAG ($0) → 2.5 MCP → AI Call
|
|
826
|
+
↑
|
|
827
|
+
Score ≥ 0.90 → direct use (free)
|
|
828
|
+
Score 0.65–0.90 → inject as examples`}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Storage"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["All RAG data stored in ",n.jsx("code",{className:"text-accent",children:"results/.rag/"})," as JSON files — fully Git-friendly. Delete the directory to reset all memory."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Consumer Experience"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:[n.jsx("strong",{children:"Zero setup required."})," RAG is ON by default and works automatically from the first run:"]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Run 1"})," — memory is empty, AI generates code normally"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Run 2+"})," — similar instructions retrieved instead of making API calls (free + faster)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Run 10+"})," — most common steps served from memory at zero cost"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"FAQ"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Question"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Answer"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Do I need to configure anything?","No. RAG is ON by default with zero setup."],["Does it cost anything?","No. TF-IDF embedder runs locally. RAG hits replace paid AI calls."],["Does it slow down tests?","No. RAG lookup is <1ms. It speeds up generation."],["Works in CI/CD?","Yes. Cache results/.rag/ between runs to persist memory."],["Share memory across team?","Commit results/.rag/ to Git or use a CI cache step."],["How to reset?","Delete the results/.rag/ folder."]].map(([e,t])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"When to Use the Settings Card"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Most users ",n.jsx("strong",{children:"never need to touch RAG settings"}),". The Settings → RAG Memory card exists for power-user scenarios:"]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Scenario"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Action"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Debugging a flaky test","Turn OFF Code Corpus — forces fresh AI generation"],["Healing keeps suggesting a bad fix","Turn OFF Healing Corpus — clears bad fix influence"],["Major app redesign","Turn OFF RAG entirely — old memory is misleading"],["Want deterministic CI runs","Disable RAG in CI, keep ON locally"],["Error warnings are outdated","Turn OFF Error Catalog — stops AI from avoiding selectors that are fine now"]].map(([e,t])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Settings Reference"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Go to ",n.jsx("strong",{children:"Settings → RAG Memory"})," to configure:"]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Enable RAG"})," — Master switch (ON by default)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Code Corpus"})," — Toggle instruction-to-code memory"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Healing Corpus"})," — Toggle healing fix memory"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Error Catalog"})," — Toggle error pattern tracking"]})]})]})},{id:"per-step-retry",title:"Per-Step Retry",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Individual steps can be configured to retry on failure, independent of the global retry setting."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Configuration"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["In the case editor, each step row shows a small ",n.jsx("strong",{children:"×"})," number input next to the timeout. Enter a value from 0–5 to set the retry count for that step. The step-level value overrides the global setting."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Retry Behavior"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"On failure, the step is re-executed up to N times. If any attempt passes, the step is marked as passed. All retry attempts are logged in the step result."})]})},{id:"case-hooks",title:"Case-Level Hooks",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Before and After hooks run additional steps around a test case's main step sequence."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Hooks Tab"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open a test case and click the ",n.jsx("strong",{children:"Hooks"})," tab (next to Steps). Add before-hooks that run before any steps, and after-hooks that always run even if steps fail."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Use Cases"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Before hook: Login, seed test data, navigate to start URL"}),n.jsx("li",{children:"After hook: Logout, clean up created records, capture diagnostics"})]})]})},{id:"network-mocking",title:"Network Mocking",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Mock steps intercept HTTP requests matching a URL pattern and return a custom response — without touching the real backend."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Creating a Mock Step"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["In the case editor, change the step type dropdown to ",n.jsx("strong",{children:"Mock"}),"."]}),n.jsx("li",{children:"Expand the step to reveal the Mock Route fields."}),n.jsxs("li",{children:["Enter the URL pattern (e.g. ",n.jsx("code",{className:"text-accent",children:"**/api/users"}),"), status code, and JSON body."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Behavior"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"The mock route is active for the duration of that step and is removed immediately after. Subsequent steps run against the real network."})]})},{id:"audit-lighthouse",title:"Audit & Lighthouse",category:"New Features",content:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("p",{children:[n.jsx("strong",{children:"Audit suites"})," run full Playwright automation and trigger Google Lighthouse at steps explicitly marked with the ",n.jsx("strong",{children:"⚡ Audit"})," flag. Three categories are measured: Performance, Accessibility, and SEO."]}),n.jsxs("div",{className:"rounded-lg bg-violet-50 border border-violet-200 px-4 py-3 text-sm text-violet-800",children:[n.jsx("strong",{children:"Chromium only"}),' — Lighthouse uses Chrome DevTools Protocol (CDP). Firefox and WebKit runs will show a "not available" notice instead.']}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Create an ",n.jsx("strong",{children:"Audit"})," suite in the Test Editor."]}),n.jsxs("li",{children:["Mark one or more steps with the ",n.jsx("strong",{children:"⚡ Audit"})," button to designate Lighthouse checkpoints."]}),n.jsxs("li",{children:["In the ",n.jsx("strong",{children:"Non-Functional Checks"})," section on each case, tick ⚡ Performance, ♿ Accessibility, and/or 🔍 SEO."]}),n.jsxs("li",{children:["Run the suite — Lighthouse audits ",n.jsx("code",{className:"text-accent",children:"page.url()"})," at each marked step."]}),n.jsx("li",{children:"Results are saved to the run report with color-coded scores."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Collected Metrics"}),n.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{label:"Performance Score",range:"0–100",good:"≥ 90",desc:"Overall Lighthouse score"},{label:"FCP",range:"ms",good:"< 1.8s",desc:"First Contentful Paint"},{label:"LCP",range:"ms",good:"< 2.5s",desc:"Largest Contentful Paint"},{label:"CLS",range:"score",good:"< 0.1",desc:"Cumulative Layout Shift"},{label:"TTFB",range:"ms",good:"< 800ms",desc:"Time to First Byte"},{label:"TBT",range:"ms",good:"< 200ms",desc:"Total Blocking Time"},{label:"Speed Index",range:"ms",good:"< 3.4s",desc:"Visual load speed"},{label:"TTI",range:"ms",good:"< 3.8s",desc:"Time to Interactive"},{label:"INP",range:"ms",good:"< 200ms",desc:"Interaction to Next Paint"}].map(e=>n.jsxs("div",{className:"rounded-lg border border-border bg-surface-inset/40 px-3 py-2",children:[n.jsx("p",{className:"text-xs font-bold text-content",children:e.label}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:e.desc}),n.jsxs("p",{className:"text-[10px] text-emerald-600 font-medium mt-0.5",children:["Good: ",e.good]})]},e.label))}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Viewing in Reports"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Open the Reports page and expand a completed Audit run."}),n.jsxs("li",{children:["Case rows with Lighthouse data show three tab buttons: ",n.jsx("strong",{children:"⚡ Speed"}),", ",n.jsx("strong",{children:"♿ A11y"}),", ",n.jsx("strong",{children:"🔍 SEO"}),"."]}),n.jsx("li",{children:"Click a tab to view the score and metrics for that category."}),n.jsx("li",{children:"Case rows are highlighted red when any score is Poor (< 50)."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Allure Attachments"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Each Audit case produces three separate HTML attachments in the Allure report: Performance Report, Accessibility Report, and SEO Report. The Allure test status is set to FAILED if any score is below 50."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Color Thresholds"}),n.jsxs("div",{className:"flex gap-4 text-sm",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-emerald-500 inline-block"})," Good (90–100)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-amber-400 inline-block"})," Needs Work (50–89)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-red-500 inline-block"})," Poor (0–49) — test FAILS"]})]})]})},{id:"visual-regression",title:"Visual Regression",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Visual regression testing compares step screenshots against saved baselines to detect unintended UI changes."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Setting a Baseline"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Run a test case until steps have screenshots."}),n.jsx("li",{children:"Open the Reports page and expand a step."}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"Set as Baseline"})," in the Baseline Panel."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Comparing"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["After setting a baseline, subsequent runs show both the current screenshot and the baseline side-by-side. Baselines are stored in ",n.jsx("code",{className:"text-accent",children:"results/baselines/"}),"."]})]})},{id:"test-impact",title:"Test Impact Analysis",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Test Impact Analysis identifies which test cases might be affected by the current set of uncommitted file changes."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Running Analysis"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Open the ",n.jsx("strong",{children:"Git Control Center"}),"."]}),n.jsxs("li",{children:["Expand the ",n.jsx("strong",{children:"Test Impact Analysis"})," section."]}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"Analyze Impact"}),"."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Changed file names and paths are compared against test case names, step instructions, and suite names. Matched cases are listed with the matched file as the reason."})]})},{id:"device-emulation",title:"Device Emulation",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Device Emulation lets you test your application as it appears on real mobile phones and tablets, using Playwright's built-in device descriptor registry. No manual viewport tuning needed — the correct user-agent, device pixel ratio, viewport, touch events, and ",n.jsx("code",{className:"text-[10px] bg-surface-inset px-1 py-0.5 rounded",children:"isMobile"})," flag are all applied automatically."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Using in Studio (Run Config)"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Go to the ",n.jsx("strong",{children:"Run Config"})," page."]}),n.jsxs("li",{children:["Find the ",n.jsx("strong",{children:"Device Emulation"})," card below the Browsers card."]}),n.jsxs("li",{children:["Use the tabs to filter by ",n.jsx("strong",{children:"All / Desktop / Mobile / Tablet"}),"."]}),n.jsx("li",{children:"Click a device card to select it — it highlights in teal."}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"Start Run"})," — the device is applied to every case in the run."]}),n.jsxs("li",{children:["To clear, click the ",n.jsx("strong",{children:"×"})," in the card header or select ",n.jsx("strong",{children:"No Emulation"}),"."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Using from CLI / CI"}),n.jsx("pre",{className:"bg-[#1e1e2e] text-[#cdd6f4] text-[10px] font-mono p-3 rounded-lg overflow-x-auto leading-relaxed",children:`# Mobile
|
|
829
|
+
npx assuremind run --all --device "iPhone 15 Pro" --browser chromium --ci
|
|
830
|
+
npx assuremind run --tag smoke --device "Pixel 7" --browser chromium --ci
|
|
831
|
+
|
|
832
|
+
# Tablet
|
|
833
|
+
npx assuremind run --all --device "iPad Pro 11" --browser webkit --ci
|
|
834
|
+
npx assuremind run --suite "Mobile" --device "Galaxy Tab S4" --browser chromium --ci
|
|
835
|
+
|
|
836
|
+
# Permanent default in autotest.config.ts
|
|
837
|
+
device: 'iPhone 15 Pro'`}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Available Devices"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Device"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Category"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Viewport"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Best Browser"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["iPhone 15 Pro","Mobile","393×852","Chromium / WebKit"],["iPhone 15","Mobile","390×844","Chromium / WebKit"],["iPhone 14","Mobile","390×844","Chromium / WebKit"],["iPhone SE","Mobile","375×667","Chromium / WebKit"],["Pixel 7","Mobile","412×915","Chromium"],["Pixel 5","Mobile","393×851","Chromium"],["Galaxy S9+","Mobile","320×658","Chromium"],["Galaxy S8","Mobile","360×740","Chromium"],["iPad Pro 11","Tablet","834×1194","WebKit / Chromium"],["iPad (gen 7)","Tablet","810×1080","WebKit / Chromium"],["iPad Mini","Tablet","768×1024","WebKit / Chromium"],["Galaxy Tab S4","Tablet","712×1138","Chromium"]].map(([e,t,s,r])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-mono text-[10px]",children:e}),n.jsx("td",{className:"py-1.5 pr-4",children:t}),n.jsx("td",{className:"py-1.5 pr-4",children:s}),n.jsx("td",{className:"py-1.5",children:r})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"In Reports"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"When a run uses device emulation, each case row in Reports shows a teal device badge (📱 phone / tablet icon) with the device name, so you can instantly tell mobile runs from desktop runs."}),n.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg px-3 py-2 text-[11px] text-amber-700",children:["⚠ Mobile and tablet device descriptors work best with ",n.jsx("strong",{children:"Chromium"}),". Firefox and WebKit do not fully support Playwright's mobile emulation flags (touch events, mobile UA)."]})]})},{id:"test-recorder",title:"Test Recorder",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["The Test Recorder lets you create tests by interacting with your application in a real browser — ",n.jsx("strong",{children:"no coding, no AI, no cost"}),". Click, fill forms, navigate pages, and every action becomes a test step with verified Playwright code."]}),n.jsxs("div",{className:"rounded-lg bg-red-50 border border-red-200 px-4 py-3 text-sm text-red-800",children:[n.jsx("strong",{children:"Zero AI, zero cost"})," — the recorder resolves locators against Playwright's live accessibility tree. No API keys or AI calls needed."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How to Record"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Open a test case in the ",n.jsx("strong",{children:"Test Editor"}),"."]}),n.jsxs("li",{children:["Click the red ",n.jsx("strong",{children:"Record"}),' button (between "Add Step" and "Generate All").']}),n.jsx("li",{children:"A headed Chromium browser opens your app's base URL."}),n.jsxs("li",{children:["Interact naturally — click buttons, fill forms, navigate pages. ",n.jsx("strong",{children:"Iframes are handled automatically."})]}),n.jsx("li",{children:"Each action appears in the live preview panel in real time."}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"Stop Recording"})," when done — all actions become steps with pre-generated code."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Assertion Shortcuts"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Shortcut"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Type"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Behavior"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Example Output"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Shift+Click","Hard assertion","Test stops on failure","expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible()"],["Ctrl+Shift+Click","Soft assertion","Test continues, failures collected","expect.soft(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible()"],["Ctrl+Shift+U","URL check","Hard assertion","expect(page).toHaveURL(/dashboard/)"],["Ctrl+Shift+T","Title check","Hard assertion","expect(page).toHaveTitle(/Dashboard/)"]].map(([e,t,s,r])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4",children:n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-surface-inset border border-border text-[10px] font-mono",children:e})}),n.jsx("td",{className:"py-1.5 pr-4",children:t}),n.jsx("td",{className:"py-1.5 pr-4",children:s}),n.jsx("td",{className:"py-1.5 font-mono text-[10px] text-accent",children:r})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Hard vs Soft Assertions"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Type"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Keyword"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Behavior"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"When to use"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Hard","Verify ...","Test stops immediately on failure","Critical checks — login worked, page loaded"],["Soft","Soft verify ...","Test continues, all failures reported at end","Multiple checks on one page — verify 5 fields are correct"]].map(([e,t,s,r])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5 pr-4 font-mono text-[10px]",children:t}),n.jsx("td",{className:"py-1.5 pr-4",children:s}),n.jsx("td",{className:"py-1.5",children:r})]},e))})]})}),n.jsx("p",{className:"text-sm text-content-secondary",children:n.jsx("strong",{children:"Three ways to use soft assertions:"})}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Recorder"})," — Ctrl+Shift+Click instead of Shift+Click"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Plain English"}),' — Start instruction with "Soft verify..." or "Soft check..." or "Soft assert..."']}),n.jsxs("li",{children:[n.jsx("strong",{children:"Step toggle"})," — Click the blue ",n.jsx("strong",{children:"Hard/Soft"})," badge on any assertion step in the editor"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Locator Resolution (6 Strategies)"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["The recorder queries Playwright's ",n.jsx("strong",{children:"accessibility tree"})," and tries 6 strategies in priority order, verifying each with ",n.jsx("code",{className:"text-accent",children:"count() === 1"}),":"]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"#"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Strategy"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Example"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["1","data-testid","page.getByTestId('login-btn')"],["2","getByRole (exact + level)","page.getByRole('heading', { name: 'Dashboard', level: 1 })"],["3","getByRole (exact)","page.getByRole('button', { name: 'Login' })"],["4","getByLabel","page.getByLabel('Email')"],["5","getByPlaceholder","page.getByPlaceholder('Enter email')"],["6","getByText","page.getByText('Welcome')"],["7","CSS fallback","page.locator('#login-btn')"]].map(([e,t,s])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5 pr-4 font-medium",children:t}),n.jsx("td",{className:"py-1.5 font-mono text-[10px] text-accent",children:s})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"What Makes It Stand Out vs Other Recorders"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Feature"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Selenium IDE"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Playwright Codegen"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Assuremind Recorder"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Locator quality","CSS/XPath","Good","Best — 6 strategies, verified"],["Accessibility tree","No","Partial","Full — every locator checked"],["Iframe support","Partial","Manual","Auto — frameLocator() code"],["Assertions","Manual","Manual","Shift+Click shortcuts"],["Plain-English steps","No","No","Yes — auto-generated"],["Self-healing after","No","No","Yes — 5-level AI cascade"],["RAG memory","No","No","Yes — feeds learning loop"],["Cost","Free","Free","Free"]].map(([e,t,s,r])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5 pr-4",children:t}),n.jsx("td",{className:"py-1.5 pr-4",children:s}),n.jsx("td",{className:"py-1.5 font-medium text-emerald-600",children:r})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Biggest Pain Points in Test Automation — Solved"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Pain Point"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"How Recorder Solves It"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["Writing tests is slow","Record a full test in 30 seconds"],["Selectors break constantly","Locators verified against Playwright's accessibility tree in real time"],["AI costs money","Recording + code generation = $0, zero AI calls"],["Non-technical testers can't write tests","Anyone who can click a browser can create tests"],["Assertions are hard to write","Shift+Click for visibility, Ctrl+Shift+U for URL, Ctrl+Shift+T for title"],["Recorded tests are fragile","6-strategy locator resolution + post-run 5-level self-healing"],["Apps use iframes (SAP, Salesforce)","Auto-detects iframes, generates frameLocator() chains"]].map(([e,t])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-medium text-content",children:e}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Iframe Support"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["The recorder automatically handles ",n.jsx("strong",{children:"same-origin iframes"})," — common in enterprise apps like SAP, Salesforce, and embedded widgets:"]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Capture script injected into ",n.jsx("strong",{children:"all frames"})," (main page + every iframe)"]}),n.jsxs("li",{children:["Elements inside iframes produce ",n.jsx("code",{className:"text-accent",children:"frameLocator()"})," chains automatically"]}),n.jsxs("li",{children:["Example: ",n.jsxs("code",{className:"text-accent text-[10px]",children:["page.frameLocator('#content-frame').getByRole('button', ","{"," name: 'Submit' ","}",").click()"]})]}),n.jsxs("li",{children:["Dynamically loaded iframes detected via ",n.jsx("code",{className:"text-accent",children:"frameattached"})," events"]}),n.jsx("li",{children:"Recording banner only appears in the main frame"}),n.jsxs("li",{children:[n.jsx("strong",{children:"Limitation:"})," Cross-origin iframes (different domain) cannot be instrumented due to browser security"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Technical Details"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Uses ",n.jsx("code",{className:"text-accent",children:"context.exposeBinding()"})," — communication survives all page navigations and works across all frames"]}),n.jsxs("li",{children:["Input values captured on ",n.jsx("strong",{children:"blur"})," (when user leaves the field), not on keystrokes — no duplicate steps"]}),n.jsxs("li",{children:["Capture script re-injected on every page load via ",n.jsx("code",{className:"text-accent",children:"page.on('load')"})," and into child frames via ",n.jsx("code",{className:"text-accent",children:"frameattached"})," + ",n.jsx("code",{className:"text-accent",children:"framenavigated"})]}),n.jsxs("li",{children:["Recorded steps use the ",n.jsx("strong",{children:"recorder"})," strategy tag, distinguishing them from AI-generated code"]}),n.jsx("li",{children:'All recorded steps are immediately runnable — no "Generate Code" step required'})]})]})},{id:"keyboard-shortcuts",title:"Keyboard Shortcuts",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Press ",n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-surface-inset border border-border text-[10px]",children:"?"})," anywhere in the app to open the shortcuts modal."]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Shortcut"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Action"})]})}),n.jsx("tbody",{className:"text-content-secondary",children:[["?","Show keyboard shortcuts"],["Ctrl+K / Cmd+K","Open search palette"],["Escape","Close modal / dialog"],["Enter (step input)","Add new step"],["Enter (case name)","Save case"],["Shift+Click (case row)","Range-select cases"]].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4",children:n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-surface-inset border border-border text-[10px] font-mono",children:e})}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})})]})},{id:"data-driven",title:"Data-Driven Testing",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Test cases support data-driven execution — running the same case multiple times with different input data."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Data Sources"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Inline JSON"})," — Enter an array of objects directly in the editor"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"JSON File"})," — Reference a ",n.jsx("code",{className:"text-accent",children:".json"})," file in your project"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"CSV File"})," — Reference a ",n.jsx("code",{className:"text-accent",children:".csv"})," file with headers"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Accessing Data"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Use ",n.jsx("code",{className:"text-accent",children:"{{row.fieldName}}"})," in step instructions to reference data columns. The case runs once per row."]})]})},{id:"faker-data",title:"Faker / Dynamic Data",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Faker tokens generate random, realistic test data at runtime. Use them to avoid hardcoded values in test steps."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Available Tokens"}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:["faker.email","faker.name","faker.phone","faker.company","faker.uuid","faker.date","faker.number","faker.word"].map(e=>n.jsx("code",{className:"text-[10px] bg-surface-inset rounded px-2 py-0.5 border border-border text-accent font-mono",children:`{{${e}}}`},e))}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Usage"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Type the token directly in a step instruction, or use the ",n.jsx("strong",{children:"Dynamic Data Picker"})," button next to the step input to insert tokens at the cursor position."]})]})},{id:"api-reference",title:"API Reference",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Assuremind exposes a REST API at ",n.jsx("code",{className:"text-accent",children:"http://localhost:4000/api"})," for programmatic access."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Key Endpoints"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Endpoint"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Description"})]})}),n.jsx("tbody",{className:"text-content-secondary font-mono",children:[["GET /suites","List all test suites"],["POST /suites","Create a suite"],["GET /suites/:id/cases","List cases in a suite"],["POST /suites/:id/cases","Create a test case"],["POST /run","Start a test run"],["GET /results","List run results"],["GET /flakiness","Get flakiness report"],["GET /step-library","List library steps"],["GET /git/impact","Run test impact analysis"]].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4 text-accent text-[10px]",children:e}),n.jsx("td",{className:"py-1.5 font-sans",children:t})]},e))})]})})]})}],pS=Array.from(new Set(ki.map(e=>e.category)));function gS(){const[e,t]=m.useState(ki[0].id),s=m.useRef({}),r=m.useRef(null);m.useEffect(()=>{const i=[];return ki.forEach(l=>{const o=s.current[l.id];if(!o)return;const c=new IntersectionObserver(([d])=>{d.isIntersecting&&t(l.id)},{root:r.current,rootMargin:"-20% 0px -60% 0px",threshold:0});c.observe(o),i.push(c)}),()=>i.forEach(l=>l.disconnect())},[]);const a=i=>{const l=s.current[i];if(l&&r.current){const o=r.current,c=l.offsetTop-24;o.scrollTo({top:c,behavior:"smooth"})}};return n.jsxs("div",{className:"flex h-full overflow-hidden bg-background",children:[n.jsx("aside",{className:"w-56 flex-shrink-0 border-r border-border bg-surface overflow-y-auto hidden lg:block",children:n.jsxs("div",{className:"px-4 py-4",children:[n.jsx("h2",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest mb-3",children:"Documentation"}),n.jsx("nav",{className:"space-y-0.5",children:pS.map(i=>n.jsxs("div",{className:"mb-3",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest px-2 py-1",children:i}),ki.filter(l=>l.category===i).map(l=>n.jsx("button",{type:"button",onClick:()=>a(l.id),className:S("w-full text-left px-2 py-1.5 rounded-lg text-xs transition-colors",e===l.id?"bg-accent/8 text-accent font-semibold":"text-content-secondary hover:text-content hover:bg-surface-inset"),children:l.title},l.id))]},i))})]})}),n.jsx("div",{ref:r,className:"flex-1 overflow-y-auto",children:n.jsx("div",{className:"max-w-2xl mx-auto px-6 py-6 space-y-0",children:ki.map(i=>n.jsxs("section",{id:i.id,ref:l=>{l&&(s.current[i.id]=l)},className:"mb-10 scroll-mt-6",children:[n.jsxs("div",{className:"mb-4",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:i.category}),n.jsx("h2",{className:"text-base font-bold text-content mt-0.5",children:i.title})]}),n.jsx("div",{className:"text-sm text-content-secondary leading-relaxed",children:i.content}),n.jsx("div",{className:"mt-8 border-b border-border"})]},i.id))})})]})}function yS(e){const t=new Date(e),s=Math.floor((Date.now()-t.getTime())/1e3);if(s<60)return`${s}s ago`;const r=Math.floor(s/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}const bS={M:{icon:Vg,color:"text-blue-500",bg:"bg-blue-50",ring:"ring-blue-200",label:"Modified"},A:{icon:Gg,color:"text-emerald-500",bg:"bg-emerald-50",ring:"ring-emerald-200",label:"Added"},D:{icon:Wg,color:"text-red-500",bg:"bg-red-50",ring:"ring-red-200",label:"Deleted"},"?":{icon:Qg,color:"text-content-tertiary",bg:"bg-surface-inset",ring:"ring-border",label:"Untracked"}};function vS(){const{operationInProgress:e,logSteps:t,hasConflict:s,conflictFiles:r}=Rc(),{data:a,isLoading:i}=vm(),{data:l}=cy(),{data:o,refetch:c}=dy(20),d=uy(),x=xy(),f=my(),g=hy(),b=fy(),y=py(),[v,N]=m.useState(""),[h,u]=m.useState(!0),[p,j]=m.useState(!1),[w,z]=m.useState(!0),[C,P]=m.useState(!1),[_,I]=m.useState(!1),{data:Q,isFetching:J,refetch:O}=ke({queryKey:["git-impact"],queryFn:()=>qe.impact(),enabled:_,staleTime:0}),E=m.useRef(null),L=!!e,Z=((a==null?void 0:a.modified.length)??0)+((a==null?void 0:a.added.length)??0)+((a==null?void 0:a.deleted.length)??0)+((a==null?void 0:a.untracked.length)??0);m.useEffect(()=>{var R;(R=E.current)==null||R.scrollIntoView({behavior:"smooth"})},[t.length]);const ie=()=>{v.trim()?b.mutate(v):y.mutate(void 0,{onSuccess:R=>{N(R.message),b.mutate(R.message)}})};return n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center gap-3 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-orange-500 to-rose-600 flex items-center justify-center shadow-sm shadow-orange-500/20",children:n.jsx(Tr,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Git Control Center"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Commit, push, pull and resolve conflicts"})]})]}),n.jsx("div",{className:"flex-1"}),n.jsxs("div",{className:"relative flex-shrink-0",children:[n.jsxs("button",{onClick:()=>j(!p),className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-surface-inset hover:bg-surface-inset/80 border border-border text-xs font-medium text-content-secondary transition-colors",children:[n.jsx(Tr,{size:12,className:"text-accent flex-shrink-0"}),n.jsx("span",{className:"max-w-[160px] truncate",children:(a==null?void 0:a.branch)??"..."}),n.jsx(Mt,{size:11,className:S("transition-transform text-content-tertiary",p&&"rotate-180")})]}),p&&l&&n.jsxs("div",{className:"absolute top-full right-0 mt-1 w-56 bg-surface border border-border rounded-xl shadow-lg z-20 max-h-56 overflow-y-auto",children:[n.jsx("div",{className:"px-3 py-1.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Local"}),l.all.map(R=>n.jsx("button",{onClick:()=>{j(!1),R!==(a==null?void 0:a.branch)&&d.mutate(R)},className:S("w-full text-left px-3 py-1.5 text-xs hover:bg-surface-inset transition-colors",R===(a==null?void 0:a.branch)&&"font-semibold text-accent bg-accent/5"),children:R},R)),l.remote.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-3 py-1.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest border-t border-border",children:"Remote"}),l.remote.map(R=>n.jsx("button",{onClick:()=>{j(!1),d.mutate(R.replace(/^origin\//,""))},className:"w-full text-left px-3 py-1.5 text-xs text-content-secondary hover:bg-surface-inset",children:R},R))]})]})]}),n.jsxs("span",{className:S("inline-flex items-center gap-1.5 text-[10px] px-2.5 py-1 rounded-lg font-semibold ring-1",a!=null&&a.conflicted.length?"bg-red-50 text-red-600 ring-red-200":a!=null&&a.isClean?"bg-emerald-50 text-emerald-600 ring-emerald-200":"bg-amber-50 text-amber-600 ring-amber-200"),children:[n.jsx("span",{className:S("w-1.5 h-1.5 rounded-full",a!=null&&a.conflicted.length?"bg-red-500":a!=null&&a.isClean?"bg-emerald-500":"bg-amber-500")}),i?"Loading…":a!=null&&a.conflicted.length?"Conflict":a!=null&&a.isClean?"Clean":`${Z} pending`]}),a&&(a.ahead>0||a.behind>0)&&n.jsxs("span",{className:"text-[10px] text-content-tertiary font-mono tabular-nums",children:[a.ahead>0&&n.jsxs("span",{className:"text-emerald-600",children:["↑",a.ahead]}),a.ahead>0&&a.behind>0&&" ",a.behind>0&&n.jsxs("span",{className:"text-amber-600",children:["↓",a.behind]})]})]}),n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsx(ja,{size:11,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{type:"text",value:v,onChange:R=>N(R.target.value),placeholder:"Commit message…",className:"w-full text-xs border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40 bg-surface placeholder-content-tertiary",onKeyDown:R=>{R.key==="Enter"&&v.trim()&&x.mutate(v)}})]}),n.jsx("button",{onClick:()=>y.mutate(void 0,{onSuccess:R=>N(R.message)}),disabled:y.isPending,title:"AI commit message",className:"p-1.5 rounded-lg border border-border bg-surface text-violet-500 hover:bg-violet-50 hover:border-violet-200 transition-colors flex-shrink-0 disabled:opacity-50",children:y.isPending?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Ot,{size:12})}),n.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-content-tertiary cursor-pointer select-none flex-shrink-0",children:[n.jsx("input",{type:"checkbox",checked:h,onChange:R=>u(R.target.checked),className:"rounded border-border text-accent focus:ring-accent w-3 h-3"}),"Rebase"]}),n.jsx("div",{className:"w-px h-5 bg-border"}),n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[n.jsx(Ql,{icon:n.jsx(ja,{size:11}),label:"Commit",onClick:()=>v.trim()&&x.mutate(v),disabled:L||!v.trim(),loading:e==="commit"}),n.jsx(Ql,{icon:n.jsx($g,{size:11}),label:"Push",onClick:()=>g.mutate(),disabled:L,loading:e==="push"}),n.jsx(Ql,{icon:n.jsx(_g,{size:11}),label:"Pull",onClick:()=>f.mutate(h),disabled:L,loading:e==="pull"}),n.jsx(Ql,{icon:n.jsx(ty,{size:11}),label:"Full Sync",onClick:ie,disabled:L,loading:e==="full-sync",primary:!0})]})]})]}),s&&n.jsx(jS,{conflictFiles:r}),!s&&n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-3",children:[n.jsxs("div",{className:"lg:col-span-2 rounded-xl border border-border bg-surface overflow-hidden flex flex-col",children:[n.jsxs("div",{className:"px-3.5 py-2 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Changes"}),Z>0&&n.jsx("span",{className:"text-[9px] font-bold text-accent bg-accent/8 px-1.5 py-px rounded ring-1 ring-accent/15",children:Z})]}),Z>0&&n.jsx("div",{className:"flex items-center gap-2",children:[{type:"M",count:(a==null?void 0:a.modified.length)??0,color:"text-blue-500"},{type:"A",count:(a==null?void 0:a.added.length)??0,color:"text-emerald-500"},{type:"D",count:(a==null?void 0:a.deleted.length)??0,color:"text-red-500"},{type:"?",count:(a==null?void 0:a.untracked.length)??0,color:"text-content-tertiary"}].filter(R=>R.count>0).map(R=>n.jsxs("span",{className:S("text-[9px] font-mono font-bold",R.color),children:[R.type,R.count]},R.type))})]}),n.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:Z===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-10 gap-1.5",children:[n.jsx(_e,{size:18,className:"text-emerald-400"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Working tree clean"})]}):n.jsxs("div",{className:"px-1.5 py-1",children:[a==null?void 0:a.modified.map(R=>n.jsx(Gl,{file:R,type:"M"},`M-${R}`)),a==null?void 0:a.added.map(R=>n.jsx(Gl,{file:R,type:"A"},`A-${R}`)),a==null?void 0:a.deleted.map(R=>n.jsx(Gl,{file:R,type:"D"},`D-${R}`)),a==null?void 0:a.untracked.map(R=>n.jsx(Gl,{file:R,type:"?"},`?-${R}`))]})})]}),n.jsxs("div",{className:"lg:col-span-3 rounded-xl border border-border bg-surface overflow-hidden flex flex-col",children:[n.jsxs("div",{className:"px-3.5 py-2 border-b border-border flex items-center justify-between",children:[n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Commit History"}),n.jsx("button",{onClick:()=>c(),className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",title:"Refresh",children:n.jsx(pm,{size:11})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:!o||o.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-10 gap-1.5",children:[n.jsx(ja,{size:18,className:"text-content-tertiary/40"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No commits yet"})]}):n.jsxs("div",{className:"relative px-3.5 py-2",children:[n.jsx("div",{className:"absolute left-[22px] top-4 bottom-4 w-px bg-border"}),n.jsx("div",{className:"space-y-0.5",children:o.map((R,W)=>n.jsxs("div",{className:"flex items-start gap-2.5 relative group py-1.5 rounded-lg hover:bg-surface-inset/50 px-1 -mx-1 transition-colors",children:[n.jsx("div",{className:S("mt-1 w-3 h-3 rounded-full border-2 flex-shrink-0 z-[1]",W===0?"border-accent bg-accent/20":"border-border bg-surface")}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-xs text-content font-medium leading-snug truncate",title:R.message,children:R.message}),n.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-content-tertiary mt-0.5",children:[n.jsx("code",{className:"font-mono text-accent/70 text-[9px]",children:R.shortHash}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(ay,{size:8})," ",R.author]}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(Fr,{size:8})," ",yS(R.date)]})]})]})]},R.hash))})]})})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("button",{onClick:()=>P(!C),className:"w-full px-3.5 py-2 flex items-center justify-between hover:bg-surface-inset/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{size:12,className:"text-amber-500"}),n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Test Impact Analysis"}),Q&&Q.impactedCases.length>0&&n.jsxs("span",{className:"text-[9px] font-bold text-amber-600 bg-amber-50 px-1.5 py-px rounded ring-1 ring-amber-200",children:[Q.impactedCases.length," impacted"]})]}),n.jsx(Mt,{size:11,className:S("text-content-tertiary transition-transform",C&&"rotate-180")})]}),C&&n.jsxs("div",{className:"border-t border-border px-3.5 py-3",children:[n.jsx("p",{className:"text-[10px] text-content-tertiary mb-3",children:"Finds test cases that may be affected by uncommitted file changes."}),n.jsxs("button",{onClick:()=>{I(!0),setTimeout(()=>O(),0)},disabled:J,className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg bg-amber-500 text-white hover:bg-amber-600 transition-colors disabled:opacity-50 mb-3",children:[J?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Be,{size:12}),"Analyze Impact"]}),Q&&n.jsxs(n.Fragment,{children:[Q.changedFiles.length>0&&n.jsxs("div",{className:"mb-3",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:["Changed Files (",Q.changedFiles.length,")"]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:Q.changedFiles.map(R=>n.jsx("span",{className:"text-[9px] font-mono bg-surface-inset px-2 py-0.5 rounded border border-border text-content-secondary",children:R},R))})]}),Q.impactedCases.length===0?n.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-emerald-600 bg-emerald-50 rounded-lg px-3 py-2",children:[n.jsx(_e,{size:12})," No test cases appear to be impacted by current changes."]}):n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:["Impacted Cases (",Q.impactedCases.length,")"]}),n.jsx("div",{className:"space-y-1",children:Q.impactedCases.map(R=>n.jsxs("div",{className:"flex items-start gap-2 text-[10px] bg-amber-50 rounded-lg px-3 py-2 border border-amber-200",children:[n.jsx(Xt,{size:11,className:"text-amber-500 mt-px flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"font-semibold text-content",children:R.caseName}),n.jsxs("p",{className:"text-content-tertiary",children:[R.suiteName," · ",R.reason]})]})]},R.caseId))})]})]})]})]}),t.length>0&&n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("button",{onClick:()=>z(!w),className:"w-full px-3.5 py-2 border-b border-border flex items-center justify-between hover:bg-surface-inset/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Pc,{size:12,className:"text-content-tertiary"}),n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Execution Log"}),n.jsxs("span",{className:"text-[9px] font-medium text-content-tertiary bg-surface-inset px-1.5 py-px rounded ring-1 ring-border",children:[t.length," step",t.length!==1?"s":""]}),e&&n.jsxs("span",{className:"flex items-center gap-1 text-[9px] text-blue-500 font-medium",children:[n.jsx(ce,{size:9,className:"animate-spin"})," ",e]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:R=>{R.stopPropagation(),Pe.clearLogs()},className:"text-[9px] text-content-tertiary hover:text-red-500 px-1.5 py-0.5 rounded hover:bg-red-50 transition-colors",children:"Clear"}),n.jsx(Mt,{size:11,className:S("text-content-tertiary transition-transform",w&&"rotate-180")})]})]}),w&&n.jsx("div",{className:"px-3.5 py-2 max-h-[200px] overflow-y-auto bg-surface-inset/20",children:n.jsxs("div",{className:"space-y-1",children:[t.map((R,W)=>n.jsxs("div",{className:"flex items-start gap-2 text-[10px] py-0.5",children:[R.status==="running"&&n.jsx(ce,{size:11,className:"mt-px text-blue-500 animate-spin flex-shrink-0"}),R.status==="done"&&n.jsx(_e,{size:11,className:"mt-px text-emerald-500 flex-shrink-0"}),R.status==="error"&&n.jsx(xt,{size:11,className:"mt-px text-red-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("span",{className:S("font-medium",R.status==="error"?"text-red-600":"text-content-secondary"),children:R.step}),R.message&&n.jsxs("span",{className:S("ml-1.5 font-normal",R.status==="error"?"text-red-400":"text-content-tertiary"),children:["— ",R.message]})]})]},W)),n.jsx("div",{ref:E})]})})]})]})})})}function jS({conflictFiles:e}){const t=gy(),s=yy(),r=by(),a=vy(),[i,l]=m.useState({}),o=h=>i[h]??{mode:"none",ours:"",theirs:"",merged:"",resolved:!1,loading:!1},c=(h,u)=>l(p=>({...p,[h]:{...o(h),...u}})),d=async h=>{c(h,{loading:!0});try{const u=await qe.conflictContent(h);c(h,{ours:u.ours,theirs:u.theirs,merged:u.ours,loading:!1})}catch{c(h,{ours:"(error)",theirs:"(error)",loading:!1})}},x=async h=>{let p=o(h).ours;p||(p=(await qe.conflictContent(h)).ours),c(h,{loading:!0}),t.mutate({filePath:h,content:p},{onSuccess:()=>c(h,{resolved:!0,loading:!1})})},f=async h=>{let p=o(h).theirs;p||(p=(await qe.conflictContent(h)).theirs),c(h,{loading:!0}),t.mutate({filePath:h,content:p},{onSuccess:()=>c(h,{resolved:!0,loading:!1})})},g=async h=>{let u=o(h);u.ours||(await d(h),u=o(h)),c(h,{mode:"ai",loading:!0}),s.mutate({filePath:h,ours:u.ours,theirs:u.theirs},{onSuccess:p=>c(h,{merged:p.resolved,loading:!1}),onError:()=>c(h,{loading:!1})})},b=async h=>{o(h).ours||await d(h),c(h,{mode:"manual"})},y=h=>{const u=o(h);c(h,{loading:!0}),t.mutate({filePath:h,content:u.merged},{onSuccess:()=>c(h,{resolved:!0,loading:!1,mode:"none"})})},v=e.every(h=>o(h).resolved),N=e.filter(h=>o(h).resolved).length;return n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50/80 overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg bg-red-100 flex items-center justify-center flex-shrink-0",children:n.jsx(Xt,{size:15,className:"text-red-500"})}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-xs font-bold text-red-800",children:"Merge Conflict Detected"}),n.jsxs("p",{className:"text-[10px] text-red-600",children:[N,"/",e.length," file",e.length>1?"s":""," resolved"]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("button",{onClick:()=>a.mutate(),disabled:a.isPending,className:"flex items-center gap-1 px-2.5 py-1.5 text-[10px] font-medium text-red-600 bg-surface border border-red-200 rounded-lg hover:bg-red-50 transition-colors disabled:opacity-50",children:[n.jsx(Cc,{size:10}),a.isPending?"Aborting…":"Abort"]}),n.jsxs("button",{onClick:()=>r.mutate(),disabled:!v||r.isPending,className:S("flex items-center gap-1 px-3 py-1.5 text-[10px] font-semibold rounded-lg transition-colors",v?"bg-emerald-600 hover:bg-emerald-700 text-white shadow-sm shadow-emerald-500/20":"bg-surface-inset text-content-tertiary cursor-not-allowed ring-1 ring-border"),children:[n.jsx(_e,{size:10}),r.isPending?"Continuing…":"Continue Rebase"]})]})]}),n.jsx("div",{className:"h-0.5 bg-red-100",children:n.jsx("div",{className:"h-full bg-emerald-500 transition-all",style:{width:`${e.length>0?N/e.length*100:0}%`}})})]}),e.map(h=>{const u=o(h);return n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2.5 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Yg,{size:13,className:u.resolved?"text-emerald-500":"text-amber-500"}),n.jsx("code",{className:"text-xs font-mono text-content-secondary",children:h}),u.resolved&&n.jsxs("span",{className:"text-[9px] text-emerald-600 bg-emerald-50 px-1.5 py-0.5 rounded-md flex items-center gap-0.5 font-semibold ring-1 ring-emerald-200",children:[n.jsx(_e,{size:9})," Resolved"]})]}),!u.resolved&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Yl,{label:"Keep Local",onClick:()=>x(h),loading:u.loading&&u.mode==="none"}),n.jsx(Yl,{label:"Accept Incoming",onClick:()=>f(h),loading:u.loading&&u.mode==="none"}),n.jsx(Yl,{label:"Manual",onClick:()=>b(h)}),n.jsx(Yl,{label:"AI Resolve",onClick:()=>g(h),loading:u.loading&&u.mode==="ai",icon:n.jsx(Ot,{size:9}),accent:!0})]})]}),u.mode!=="none"&&!u.resolved&&n.jsx("div",{className:"p-3.5",children:u.loading&&!u.ours?n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(ce,{size:16,className:"animate-spin text-content-tertiary"})}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-blue-600 uppercase tracking-widest mb-1 block",children:"Local (Ours)"}),n.jsx("textarea",{value:u.ours,readOnly:!0,rows:12,className:"w-full text-[10px] font-mono p-2.5 border border-blue-200 rounded-lg bg-blue-50/50 resize-y focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-orange-600 uppercase tracking-widest mb-1 block",children:"Incoming (Theirs)"}),n.jsx("textarea",{value:u.theirs,readOnly:!0,rows:12,className:"w-full text-[10px] font-mono p-2.5 border border-orange-200 rounded-lg bg-orange-50/50 resize-y focus:outline-none"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-emerald-600 uppercase tracking-widest mb-1 block",children:"Merged Output (editable)"}),n.jsx("textarea",{value:u.merged,onChange:p=>c(h,{merged:p.target.value}),rows:12,className:"w-full text-[10px] font-mono p-2.5 border border-emerald-200 rounded-lg bg-emerald-50/50 resize-y focus:outline-none focus:ring-2 focus:ring-emerald-300"})]}),n.jsx("div",{className:"flex justify-end mt-2.5",children:n.jsxs("button",{onClick:()=>y(h),disabled:u.loading,className:"flex items-center gap-1 px-3 py-1.5 bg-emerald-600 hover:bg-emerald-700 text-white text-[10px] font-semibold rounded-lg transition-colors disabled:opacity-50 shadow-sm shadow-emerald-500/20",children:[u.loading?n.jsx(ce,{size:10,className:"animate-spin"}):n.jsx(_e,{size:10}),"Mark as Resolved"]})})]})})]},h)})]})}function Gl({file:e,type:t}){const s=bS[t],r=s.icon;return n.jsxs("div",{className:"flex items-center gap-2 py-1 px-2 rounded-lg hover:bg-surface-inset/60 group transition-colors",children:[n.jsx("div",{className:S("w-5 h-5 rounded flex items-center justify-center flex-shrink-0",s.bg),children:n.jsx(r,{size:10,className:s.color})}),n.jsx("span",{className:S("text-[10px] font-mono truncate flex-1",s.color),title:e,children:e}),n.jsx("span",{className:S("text-[8px] px-1.5 py-px rounded font-medium ring-1",s.bg,s.color,s.ring),children:s.label})]})}function Ql({icon:e,label:t,onClick:s,disabled:r,loading:a,primary:i}){return n.jsxs("button",{onClick:s,disabled:r,className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[10px] font-semibold transition-all",i?"bg-accent hover:bg-accent-dark text-white shadow-sm shadow-accent/20":"bg-surface hover:bg-surface-inset text-content-secondary border border-border",r&&"opacity-50 cursor-not-allowed",a&&"cursor-wait"),children:[a?n.jsx(ce,{size:11,className:"animate-spin"}):e,t]})}function Yl({label:e,onClick:t,loading:s,icon:r,accent:a}){return n.jsxs("button",{onClick:t,disabled:s,className:S("flex items-center gap-0.5 px-2 py-1 text-[9px] font-medium rounded-lg transition-colors",a?"bg-violet-50 text-violet-600 hover:bg-violet-100 ring-1 ring-violet-200":"bg-surface-inset text-content-secondary hover:bg-surface-inset/80 ring-1 ring-border",s&&"opacity-60 cursor-wait"),children:[s?n.jsx(ce,{size:9,className:"animate-spin"}):r,e]})}function NS(e){const t=new Date(e),s=Math.floor((Date.now()-t.getTime())/1e3);if(s<60)return`${s}s ago`;const r=Math.floor(s/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}const wS={M:{icon:Vg,color:"text-blue-500",bg:"bg-blue-50",label:"M"},A:{icon:Gg,color:"text-emerald-500",bg:"bg-emerald-50",label:"A"},D:{icon:Wg,color:"text-red-500",bg:"bg-red-50",label:"D"},"?":{icon:Qg,color:"text-content-tertiary",bg:"bg-surface-inset",label:"?"}};function kS(){var Q,J,O;const{panelOpen:e,operationInProgress:t,logSteps:s,hasConflict:r}=Rc(),{data:a,isLoading:i}=vm(),{data:l}=cy(),{data:o,refetch:c}=dy(15),d=uy(),x=xy(),f=my(),g=hy(),b=fy(),y=py(),[v,N]=m.useState(""),[h,u]=m.useState(!0),[p,j]=m.useState(!1),[w,z]=m.useState(!0),C=m.useRef(null),P=!!t,_=((a==null?void 0:a.modified.length)??0)+((a==null?void 0:a.added.length)??0)+((a==null?void 0:a.deleted.length)??0)+((a==null?void 0:a.untracked.length)??0);m.useEffect(()=>{var E;(E=C.current)==null||E.scrollIntoView({behavior:"smooth"})},[s.length]);const I=()=>{v.trim()?b.mutate(v):y.mutate(void 0,{onSuccess:E=>{N(E.message),b.mutate(E.message)}})};return n.jsxs(n.Fragment,{children:[e&&n.jsx("div",{className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-[1px] transition-opacity",onClick:()=>Pe.closePanel()}),n.jsxs("div",{className:S("fixed top-0 right-0 h-full z-50 w-[400px] max-w-[90vw] bg-surface border-l border-border shadow-2xl","flex flex-col transition-transform duration-300 ease-in-out",e?"translate-x-0":"translate-x-full"),children:[n.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5 border-b border-border bg-surface flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-gradient-to-br from-orange-500 to-rose-600 flex items-center justify-center shadow-sm shadow-orange-500/20",children:n.jsx(Tr,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-xs font-bold text-content",children:"Git Control"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Quick operations"})]})]}),n.jsx("button",{onClick:()=>Pe.closePanel(),className:"p-1 rounded-lg hover:bg-surface-inset text-content-tertiary hover:text-content-secondary transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto",children:[r&&n.jsxs("div",{className:"mx-3 mt-3 px-3 py-2 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 flex-shrink-0"}),n.jsx("span",{className:"text-[10px] text-red-700 font-medium",children:"Merge conflict — open full Git page to resolve"})]}),n.jsx("div",{className:"px-3.5 py-2.5 border-b border-border",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsxs("button",{onClick:()=>j(!p),className:"w-full flex items-center justify-between gap-2 px-2.5 py-1.5 rounded-lg bg-surface-inset hover:bg-surface-inset/80 border border-border text-xs font-medium text-content-secondary transition-colors",children:[n.jsxs("span",{className:"flex items-center gap-1.5 truncate",children:[n.jsx(Tr,{size:11,className:"text-accent flex-shrink-0"}),(a==null?void 0:a.branch)??"..."]}),n.jsx(Mt,{size:10,className:S("transition-transform text-content-tertiary",p&&"rotate-180")})]}),p&&l&&n.jsxs("div",{className:"absolute top-full left-0 right-0 mt-1 bg-surface border border-border rounded-xl shadow-lg z-10 max-h-48 overflow-y-auto",children:[n.jsx("div",{className:"px-2.5 py-1 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Local"}),l.all.map(E=>n.jsx("button",{onClick:()=>{j(!1),E!==(a==null?void 0:a.branch)&&d.mutate(E)},className:S("w-full text-left px-2.5 py-1.5 text-[10px] hover:bg-surface-inset transition-colors",E===(a==null?void 0:a.branch)&&"font-semibold text-accent bg-accent/5"),children:E},E)),l.remote.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-2.5 py-1 text-[9px] font-bold text-content-tertiary uppercase tracking-widest border-t border-border",children:"Remote"}),l.remote.map(E=>n.jsx("button",{onClick:()=>{j(!1),d.mutate(E.replace(/^origin\//,""))},className:"w-full text-left px-2.5 py-1.5 text-[10px] text-content-secondary hover:bg-surface-inset",children:E},E))]})]})]}),n.jsxs("span",{className:S("inline-flex items-center gap-1.5 text-[9px] px-2 py-1 rounded-lg font-semibold ring-1 flex-shrink-0",(Q=a==null?void 0:a.conflicted)!=null&&Q.length?"bg-red-50 text-red-600 ring-red-200":a!=null&&a.isClean?"bg-emerald-50 text-emerald-600 ring-emerald-200":"bg-amber-50 text-amber-600 ring-amber-200"),children:[n.jsx("span",{className:S("w-1.5 h-1.5 rounded-full",(J=a==null?void 0:a.conflicted)!=null&&J.length?"bg-red-500":a!=null&&a.isClean?"bg-emerald-500":"bg-amber-500")}),i?"…":(O=a==null?void 0:a.conflicted)!=null&&O.length?"Conflict":a!=null&&a.isClean?"Clean":`${_} pending`]}),a&&(a.ahead>0||a.behind>0)&&n.jsxs("span",{className:"text-[9px] text-content-tertiary font-mono tabular-nums flex-shrink-0",children:[a.ahead>0&&n.jsxs("span",{className:"text-emerald-600",children:["↑",a.ahead]}),a.behind>0&&n.jsxs("span",{className:"text-amber-600 ml-0.5",children:["↓",a.behind]})]})]})}),n.jsxs("div",{className:"px-3.5 py-2.5 border-b border-border",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Changes"}),_>0&&n.jsx("span",{className:"text-[9px] font-bold text-accent bg-accent/8 px-1.5 py-px rounded ring-1 ring-accent/15",children:_})]}),_>0&&n.jsx("div",{className:"flex items-center gap-1.5",children:[{type:"M",count:(a==null?void 0:a.modified.length)??0,color:"text-blue-500"},{type:"A",count:(a==null?void 0:a.added.length)??0,color:"text-emerald-500"},{type:"D",count:(a==null?void 0:a.deleted.length)??0,color:"text-red-500"},{type:"?",count:(a==null?void 0:a.untracked.length)??0,color:"text-content-tertiary"}].filter(E=>E.count>0).map(E=>n.jsxs("span",{className:S("text-[8px] font-mono font-bold",E.color),children:[E.type,E.count]},E.type))})]}),_===0?n.jsxs("div",{className:"flex items-center gap-1.5 py-2",children:[n.jsx(_e,{size:12,className:"text-emerald-400"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Working tree clean"})]}):n.jsxs("div",{className:"space-y-px max-h-[150px] overflow-y-auto",children:[a==null?void 0:a.modified.map(E=>n.jsx(Jl,{file:E,type:"M"},`M-${E}`)),a==null?void 0:a.added.map(E=>n.jsx(Jl,{file:E,type:"A"},`A-${E}`)),a==null?void 0:a.deleted.map(E=>n.jsx(Jl,{file:E,type:"D"},`D-${E}`)),a==null?void 0:a.untracked.map(E=>n.jsx(Jl,{file:E,type:"?"},`?-${E}`))]})]}),n.jsxs("div",{className:"px-3.5 py-2.5 border-b border-border space-y-2.5",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsx(ja,{size:10,className:"absolute left-2 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{type:"text",value:v,onChange:E=>N(E.target.value),placeholder:"Commit message…",className:"w-full text-[10px] border border-border rounded-lg pl-6 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40 bg-surface-inset/50 placeholder-content-tertiary",onKeyDown:E=>{E.key==="Enter"&&v.trim()&&x.mutate(v)}})]}),n.jsx("button",{onClick:()=>y.mutate(void 0,{onSuccess:E=>N(E.message)}),disabled:y.isPending,title:"AI commit message",className:"p-1.5 rounded-lg border border-border bg-surface text-violet-500 hover:bg-violet-50 hover:border-violet-200 transition-colors flex-shrink-0 disabled:opacity-50",children:y.isPending?n.jsx(ce,{size:10,className:"animate-spin"}):n.jsx(Ot,{size:10})})]}),n.jsxs("label",{className:"flex items-center gap-1.5 text-[9px] text-content-tertiary cursor-pointer select-none",children:[n.jsx("input",{type:"checkbox",checked:h,onChange:E=>u(E.target.checked),className:"rounded border-border text-accent focus:ring-accent w-3 h-3"}),"Pull latest (rebase) before commit"]}),n.jsxs("div",{className:"grid grid-cols-4 gap-1",children:[n.jsx(Xl,{icon:n.jsx(ja,{size:10}),label:"Commit",onClick:()=>v.trim()&&x.mutate(v),disabled:P||!v.trim(),loading:t==="commit"}),n.jsx(Xl,{icon:n.jsx($g,{size:10}),label:"Push",onClick:()=>g.mutate(),disabled:P,loading:t==="push"}),n.jsx(Xl,{icon:n.jsx(_g,{size:10}),label:"Pull",onClick:()=>f.mutate(h),disabled:P,loading:t==="pull"}),n.jsx(Xl,{icon:n.jsx(ty,{size:10}),label:"Sync",onClick:I,disabled:P,loading:t==="full-sync",primary:!0})]}),n.jsx("p",{className:"text-[8px] text-content-tertiary text-center",children:"Sync: pull --rebase → stage → commit → push"})]}),s.length>0&&n.jsxs("div",{className:"border-b border-border",children:[n.jsxs("button",{onClick:()=>z(!w),className:"w-full px-3.5 py-2 flex items-center justify-between hover:bg-surface-inset/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Pc,{size:10,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Log"}),n.jsx("span",{className:"text-[8px] font-medium text-content-tertiary bg-surface-inset px-1.5 py-px rounded ring-1 ring-border",children:s.length}),t&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-blue-500 font-medium",children:[n.jsx(ce,{size:8,className:"animate-spin"})," ",t]})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{onClick:E=>{E.stopPropagation(),Pe.clearLogs()},className:"text-[8px] text-content-tertiary hover:text-red-500 px-1 py-0.5 rounded hover:bg-red-50 transition-colors",children:"Clear"}),n.jsx(Mt,{size:10,className:S("text-content-tertiary transition-transform",w&&"rotate-180")})]})]}),w&&n.jsx("div",{className:"px-3.5 pb-2.5 max-h-[150px] overflow-y-auto",children:n.jsxs("div",{className:"space-y-0.5",children:[s.map((E,L)=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] py-0.5",children:[E.status==="running"&&n.jsx(ce,{size:9,className:"mt-px text-blue-500 animate-spin flex-shrink-0"}),E.status==="done"&&n.jsx(_e,{size:9,className:"mt-px text-emerald-500 flex-shrink-0"}),E.status==="error"&&n.jsx(xt,{size:9,className:"mt-px text-red-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("span",{className:S("font-medium",E.status==="error"?"text-red-600":"text-content-secondary"),children:E.step}),E.message&&n.jsxs("span",{className:S("ml-1 font-normal",E.status==="error"?"text-red-400":"text-content-tertiary"),children:["— ",E.message]})]})]},L)),n.jsx("div",{ref:C})]})})]}),n.jsxs("div",{className:"px-3.5 py-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"History"}),n.jsx("button",{onClick:()=>c(),className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",title:"Refresh",children:n.jsx(pm,{size:10})})]}),!o||o.length===0?n.jsxs("div",{className:"flex items-center gap-1.5 py-3",children:[n.jsx(ja,{size:12,className:"text-content-tertiary/40"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No commits yet"})]}):n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"absolute left-[5px] top-2 bottom-2 w-px bg-border"}),n.jsx("div",{className:"space-y-0.5",children:o.map((E,L)=>n.jsxs("div",{className:"flex items-start gap-2 relative py-1 rounded-lg hover:bg-surface-inset/50 px-0.5 -mx-0.5 transition-colors",children:[n.jsx("div",{className:S("mt-1.5 w-[9px] h-[9px] rounded-full border-[1.5px] flex-shrink-0 z-[1]",L===0?"border-accent bg-accent/20":"border-border bg-surface")}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-[10px] text-content font-medium leading-snug truncate",title:E.message,children:E.message}),n.jsxs("div",{className:"flex items-center gap-1.5 text-[8px] text-content-tertiary mt-0.5",children:[n.jsx("code",{className:"font-mono text-accent/70",children:E.shortHash}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(ay,{size:7})," ",E.author]}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(Fr,{size:7})," ",NS(E.date)]})]})]})]},E.hash))})]})]})]})]})]})}function Jl({file:e,type:t}){const s=wS[t],r=s.icon;return n.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 px-1.5 rounded-md hover:bg-surface-inset/60 transition-colors",children:[n.jsx("div",{className:S("w-4 h-4 rounded flex items-center justify-center flex-shrink-0",s.bg),children:n.jsx(r,{size:9,className:s.color})}),n.jsx("span",{className:S("text-[9px] font-mono truncate flex-1",s.color),title:e,children:e})]})}function Xl({icon:e,label:t,onClick:s,disabled:r,loading:a,primary:i}){return n.jsxs("button",{onClick:s,disabled:r,className:S("flex flex-col items-center justify-center gap-0.5 px-2 py-1.5 rounded-lg text-[9px] font-semibold transition-all",i?"bg-accent hover:bg-accent-dark text-white shadow-sm shadow-accent/20":"bg-surface hover:bg-surface-inset text-content-secondary border border-border",r&&"opacity-50 cursor-not-allowed",a&&"cursor-wait"),children:[a?n.jsx(ce,{size:10,className:"animate-spin"}):e,t]})}function SS(){const e=zn(),t=Vs(),s=jm(),r=_y(),{stepLogs:a}=$y(),i=s.isRunning,l=Uy(i),[o,c]=m.useState(!1),[d,x]=m.useState(!1),[f,g]=m.useState(!1),b=t.pathname==="/run";m.useEffect(()=>{i&&!f&&(c(!0),x(!1))},[i,f]),m.useEffect(()=>{i&&g(!1)},[s.runId]);const y=()=>{c(!1),g(!0)},v=()=>{c(!1),g(!0),e("/run")};return!o&&!i&&!s.completed||!o||b?null:d?n.jsx(CS,{runActive:i,elapsed:l,completed:s.completed,onExpand:()=>x(!1),onClose:y}):n.jsx(ES,{progress:s,live:r,elapsed:l,runActive:i,stepLogs:a,onMinimise:()=>x(!0),onClose:y,onGoToRunConfig:v})}function CS({runActive:e,elapsed:t,completed:s,onExpand:r,onClose:a}){return n.jsxs("div",{className:"fixed bottom-4 right-4 z-[9999] flex items-center gap-2 bg-slate-900 rounded-full px-3 py-1.5 shadow-2xl border border-slate-700 cursor-pointer hover:bg-slate-800 transition-colors",onClick:r,children:[e?n.jsxs(n.Fragment,{children:[n.jsx(ce,{size:12,className:"text-emerald-400 animate-spin"}),n.jsx("span",{className:"text-[10px] font-semibold text-white",children:"Running"}),n.jsx("span",{className:"text-[9px] font-mono text-slate-400",children:t})]}):s?n.jsxs(n.Fragment,{children:[s.failed>0?n.jsx(xt,{size:12,className:"text-red-400"}):n.jsx(Ue,{size:12,className:"text-emerald-400"}),n.jsxs("span",{className:"text-[10px] font-semibold text-white",children:[s.passed,"✓ ",s.failed>0&&`${s.failed}✗`]})]}):null,n.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),a()},className:"p-0.5 rounded-full hover:bg-slate-700 text-slate-500 hover:text-white transition-colors",children:n.jsx(Se,{size:10})})]})}function ES({progress:e,live:t,elapsed:s,runActive:r,stepLogs:a,onMinimise:i,onClose:l,onGoToRunConfig:o}){var h;const c=m.useRef(null),[d,x]=m.useState(null),f=m.useRef(!1),g=m.useRef({x:0,y:0}),b=m.useRef(null);m.useEffect(()=>{var u;(u=b.current)==null||u.scrollIntoView({behavior:"smooth"})},[a.length]);const y=m.useCallback(u=>{u.preventDefault(),f.current=!0;const p=c.current,j=(d==null?void 0:d.x)??(p?p.getBoundingClientRect().left:window.innerWidth-400),w=(d==null?void 0:d.y)??(p?p.getBoundingClientRect().top:window.innerHeight-400);g.current={x:u.clientX-j,y:u.clientY-w};const z=P=>{f.current&&x({x:Math.max(0,Math.min(window.innerWidth-200,P.clientX-g.current.x)),y:Math.max(0,Math.min(window.innerHeight-60,P.clientY-g.current.y))})},C=()=>{f.current=!1,window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",C)};window.addEventListener("mousemove",z),window.addEventListener("mouseup",C)},[d]),v=!!t.screenshot,N=e.completed;return n.jsxs("div",{ref:c,className:"fixed z-[9999] w-[340px] rounded-xl bg-slate-900 border border-slate-700 shadow-2xl overflow-hidden flex flex-col",style:d?{left:d.x,top:d.y,maxHeight:420}:{bottom:16,right:16,maxHeight:420},children:[n.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-3 py-2 bg-slate-800 border-b border-slate-700 cursor-move select-none",onMouseDown:y,children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(R2,{size:12,className:"text-slate-500"}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500/80"})]}),e.currentBrowser&&n.jsx(qa,{browser:e.currentBrowser,size:14,className:"ml-1"}),n.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider ml-1",children:e.currentBrowser?Sm(e.currentBrowser):r?"Browser Preview":"Run Complete"}),r&&n.jsx("span",{className:"text-[8px] font-bold px-1.5 py-0.5 rounded bg-emerald-500/20 text-emerald-400 animate-pulse",children:"LIVE"})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{type:"button",onClick:u=>{u.stopPropagation(),o()},title:"Open in Run Config (full view)",className:"p-1.5 rounded text-slate-300 hover:text-accent hover:bg-slate-600 transition-colors",onMouseDown:u=>u.stopPropagation(),children:n.jsx(fm,{size:14})}),n.jsx("button",{type:"button",onClick:u=>{u.stopPropagation(),i()},title:"Minimise",className:"p-1.5 rounded text-slate-300 hover:text-white hover:bg-slate-600 transition-colors",onMouseDown:u=>u.stopPropagation(),children:n.jsx(ey,{size:14})}),n.jsx("button",{type:"button",onClick:u=>{u.stopPropagation(),l()},title:"Close",className:"p-1.5 rounded text-slate-300 hover:text-red-400 hover:bg-slate-600 transition-colors",onMouseDown:u=>u.stopPropagation(),children:n.jsx(Se,{size:14})})]})]}),n.jsxs("div",{className:"relative bg-slate-950 flex items-center justify-center overflow-hidden",style:{minHeight:120,maxHeight:180},children:[v&&n.jsx("img",{src:`data:image/jpeg;base64,${t.screenshot}`,alt:"Browser",className:S("w-full h-auto object-contain",N&&!r&&"opacity-30"),style:{maxHeight:180}}),!v&&r&&n.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[n.jsxs("div",{className:"w-12 h-8 rounded-lg bg-slate-800 border border-slate-700 overflow-hidden relative",children:[n.jsxs("div",{className:"h-2 bg-slate-750 border-b border-slate-700 flex items-center px-1 gap-0.5",children:[n.jsx("div",{className:"w-1 h-1 rounded-full bg-red-500/50"}),n.jsx("div",{className:"w-1 h-1 rounded-full bg-amber-500/50"}),n.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500/50"})]}),n.jsxs("div",{className:"p-1 space-y-0.5",children:[n.jsx("div",{className:"h-0.5 bg-slate-700 rounded w-3/4 animate-pulse"}),n.jsx("div",{className:"h-0.5 bg-slate-700 rounded w-1/2 animate-pulse"})]})]}),n.jsx("p",{className:"text-[9px] text-slate-500",children:"Waiting for screenshots..."}),n.jsx("div",{className:"flex gap-1",children:[0,120,240].map(u=>n.jsx("div",{className:"w-1 h-1 rounded-full bg-accent animate-bounce",style:{animationDelay:`${u}ms`}},u))})]}),N&&!r&&n.jsx("div",{className:S("w-full",v?"absolute inset-0 flex items-center justify-center bg-black/50 backdrop-blur-sm":"py-4 px-6"),children:n.jsxs("div",{className:S(v?"px-5 py-4":""),children:[n.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[N.failed===0?n.jsx(Ue,{size:18,className:"text-emerald-400"}):n.jsx(xt,{size:18,className:"text-red-400"}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-xs font-bold",N.failed===0?"text-emerald-300":"text-red-300"),children:N.failed===0?"All tests passed!":"Completed with failures"}),n.jsxs("p",{className:"text-[9px] text-slate-400",children:[Math.round(N.duration/1e3),"s elapsed"]})]})]}),n.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:[{label:"Passed",v:N.passed,c:"text-emerald-400 bg-emerald-500/10 ring-emerald-500/20"},{label:"Failed",v:N.failed,c:"text-red-400 bg-red-500/10 ring-red-500/20"},{label:"Skipped",v:N.skipped,c:"text-slate-400 bg-slate-500/10 ring-slate-500/20"}].map(({label:u,v:p,c:j})=>n.jsxs("div",{className:S("rounded-lg p-2 text-center ring-1",j),children:[n.jsx("p",{className:"text-sm font-bold tabular-nums",children:p}),n.jsx("p",{className:"text-[7px] uppercase tracking-wider text-slate-500",children:u})]},u))})]})}),r&&e.currentStep&&n.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/90 to-transparent px-3 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-400 animate-pulse flex-shrink-0"}),n.jsx("p",{className:"text-[8px] text-white/70 truncate font-mono",children:e.currentStep.instruction})]})})]}),n.jsxs("div",{className:"flex-shrink-0 border-t border-slate-700",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-1 bg-slate-800/50",children:[n.jsx("div",{className:"flex items-center gap-2",children:r?n.jsxs(n.Fragment,{children:[n.jsx(ce,{size:9,className:"text-emerald-400 animate-spin"}),n.jsx("span",{className:"text-[9px] text-slate-300 font-medium truncate max-w-[180px]",children:((h=e.currentCase)==null?void 0:h.caseName)??"Starting..."})]}):n.jsxs("span",{className:"text-[9px] text-slate-400",children:[a.length," step",a.length!==1&&"s"," executed"]})}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[9px] font-mono text-slate-500",children:s}),n.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-[8px] font-semibold text-accent hover:text-accent-light transition-colors",title:"Open full view in Run Config",children:[n.jsx(Ya,{size:8})," Full View"]})]})]}),a.length>0&&n.jsxs("div",{className:"max-h-[72px] overflow-y-auto px-2 py-1 space-y-px",children:[a.slice(-5).map((u,p)=>n.jsxs("div",{className:"flex items-center gap-1.5 py-px text-[8px]",children:[u.status==="passed"?n.jsx(Ue,{size:8,className:"text-emerald-400 flex-shrink-0"}):u.status==="failed"?n.jsx(xt,{size:8,className:"text-red-400 flex-shrink-0"}):n.jsx(Tt,{size:8,className:"text-slate-600 flex-shrink-0"}),n.jsx("span",{className:S("truncate flex-1 font-mono",u.status==="passed"?"text-slate-400":u.status==="failed"?"text-red-300":"text-slate-600"),children:u.instruction}),n.jsxs("span",{className:"text-slate-600 tabular-nums flex-shrink-0",children:[u.duration,"ms"]})]},`${u.stepId}-${p}`)),n.jsx("div",{ref:b})]})]})]})}function PS(){const{hasConflict:e,conflictFiles:t}=Rc(),s=gy(),r=yy(),a=by(),i=vy(),[l,o]=m.useState({});if(!e||t.length===0)return null;const c=h=>l[h]??{mode:"none",ours:"",theirs:"",merged:"",resolved:!1,loading:!1},d=(h,u)=>o(p=>({...p,[h]:{...c(h),...u}})),x=async h=>{d(h,{loading:!0});try{const u=await qe.conflictContent(h);d(h,{ours:u.ours,theirs:u.theirs,merged:u.ours,loading:!1})}catch{d(h,{ours:"(error loading)",theirs:"(error loading)",loading:!1})}},f=async h=>{let p=c(h).ours;p||(p=(await qe.conflictContent(h)).ours),d(h,{loading:!0}),s.mutate({filePath:h,content:p},{onSuccess:()=>d(h,{resolved:!0,loading:!1})})},g=async h=>{let p=c(h).theirs;p||(p=(await qe.conflictContent(h)).theirs),d(h,{loading:!0}),s.mutate({filePath:h,content:p},{onSuccess:()=>d(h,{resolved:!0,loading:!1})})},b=async h=>{let u=c(h);u.ours||(await x(h),u=c(h)),d(h,{mode:"ai",loading:!0}),r.mutate({filePath:h,ours:u.ours,theirs:u.theirs},{onSuccess:p=>d(h,{merged:p.resolved,loading:!1}),onError:()=>d(h,{loading:!1})})},y=async h=>{c(h).ours||await x(h),d(h,{mode:"manual"})},v=h=>{const u=c(h);d(h,{loading:!0}),s.mutate({filePath:h,content:u.merged},{onSuccess:()=>d(h,{resolved:!0,loading:!1,mode:"none"})})},N=t.every(h=>c(h).resolved);return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-surface rounded-2xl shadow-2xl w-full max-w-4xl mx-4 max-h-[90vh] flex flex-col overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-100 bg-red-50 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Xt,{size:20,className:"text-red-500"}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-bold text-red-800",children:"Merge Conflict Detected"}),n.jsxs("p",{className:"text-xs text-red-600",children:[t.length," file",t.length>1?"s":""," with conflicts"]})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{onClick:()=>i.mutate(),disabled:i.isPending,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-red-600 bg-surface border border-red-200 rounded-lg hover:bg-red-50 transition-colors disabled:opacity-50",children:[n.jsx(Cc,{size:11}),i.isPending?"Aborting...":"Abort Rebase"]}),n.jsxs("button",{onClick:()=>a.mutate(),disabled:!N||a.isPending,className:S("flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium rounded-lg transition-colors",N?"bg-green-600 hover:bg-green-700 text-white":"bg-slate-200 text-content-tertiary cursor-not-allowed"),children:[n.jsx(_e,{size:11}),a.isPending?"Continuing...":"Continue Rebase"]}),n.jsx("button",{onClick:()=>Pe.clearConflict(),className:"p-1.5 rounded hover:bg-red-100 text-red-400 transition-colors",children:n.jsx(Se,{size:16})})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-4",children:t.map(h=>{const u=c(h);return n.jsxs("div",{className:"border border-slate-200 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset border-b border-slate-100 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Yg,{size:14,className:u.resolved?"text-green-500":"text-amber-500"}),n.jsx("code",{className:"text-xs font-mono text-content-secondary",children:h}),u.resolved&&n.jsxs("span",{className:"text-[10px] text-green-600 bg-green-100 px-2 py-0.5 rounded-full flex items-center gap-1 font-medium",children:[n.jsx(_e,{size:9})," Resolved"]})]}),!u.resolved&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Zl,{label:"Keep Local",onClick:()=>f(h),loading:u.loading&&u.mode==="none"}),n.jsx(Zl,{label:"Accept Incoming",onClick:()=>g(h),loading:u.loading&&u.mode==="none"}),n.jsx(Zl,{label:"Manual",onClick:()=>y(h)}),n.jsx(Zl,{label:"AI Resolve",onClick:()=>b(h),loading:u.loading&&u.mode==="ai",icon:n.jsx(Ot,{size:9}),accent:!0})]})]}),u.mode!=="none"&&!u.resolved&&n.jsx("div",{className:"p-4",children:u.loading&&!u.ours?n.jsx("div",{className:"flex items-center justify-center py-6",children:n.jsx(ce,{size:18,className:"animate-spin text-content-tertiary"})}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-blue-600 uppercase tracking-wider mb-1 block",children:"Local (Ours)"}),n.jsx("textarea",{value:u.ours,readOnly:!0,rows:10,className:"w-full text-[11px] font-mono p-2.5 border border-blue-200 rounded-lg bg-blue-50/50 resize-y focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-orange-600 uppercase tracking-wider mb-1 block",children:"Incoming (Theirs)"}),n.jsx("textarea",{value:u.theirs,readOnly:!0,rows:10,className:"w-full text-[11px] font-mono p-2.5 border border-orange-200 rounded-lg bg-orange-50/50 resize-y focus:outline-none"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-green-600 uppercase tracking-wider mb-1 block",children:"Merged Output (editable)"}),n.jsx("textarea",{value:u.merged,onChange:p=>d(h,{merged:p.target.value}),rows:10,className:"w-full text-[11px] font-mono p-2.5 border border-green-200 rounded-lg bg-green-50/50 resize-y focus:outline-none focus:ring-2 focus:ring-green-300"})]}),n.jsx("div",{className:"flex justify-end mt-2",children:n.jsxs("button",{onClick:()=>v(h),disabled:u.loading,className:"flex items-center gap-1.5 px-4 py-1.5 bg-green-600 hover:bg-green-700 text-white text-xs font-medium rounded-lg transition-colors disabled:opacity-50",children:[u.loading?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(_e,{size:12}),"Mark as Resolved"]})})]})})]},h)})})]})})}function Zl({label:e,onClick:t,loading:s,icon:r,accent:a}){return n.jsxs("button",{onClick:t,disabled:s,className:S("flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-lg transition-colors",a?"bg-purple-100 text-purple-700 hover:bg-purple-200":"bg-slate-100 text-content-secondary hover:bg-slate-200",s&&"opacity-60 cursor-wait"),children:[s?n.jsx(ce,{size:9,className:"animate-spin"}):r,e]})}function zS(e){m.useEffect(()=>{function t(s){const r=s.target;if(!(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement))for(const a of e){const i=s.key===a.key,l=!!a.ctrl,o=!!a.meta,c=!!a.shift,d=l?s.ctrlKey:!s.ctrlKey,x=o?s.metaKey:!s.metaKey,f=c?s.shiftKey:!s.shiftKey,g=(()=>{if(l||o){const b=l?s.ctrlKey:!0,y=o?s.metaKey:!0,v=c?s.shiftKey:!s.shiftKey;return l&&!o&&s.metaKey||o&&!l&&s.ctrlKey?!1:b&&y&&v}return d&&x&&f})();if(i&&g){s.preventDefault(),a.action();return}}}return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e])}const RS=[{keys:["?"],description:"Show keyboard shortcuts"},{keys:["Ctrl","K"],description:"Search (Cmd+K)"},{keys:["Esc"],description:"Close modal / cancel"}];function MS({open:e,onClose:t}){return m.useEffect(()=>{if(!e)return;function s(r){r.key==="Escape"&&t()}return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-lg mx-4 overflow-hidden",onClick:s=>s.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[n.jsx("h2",{className:"text-sm font-bold text-content",children:"Keyboard Shortcuts"}),n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset hover:text-content transition-colors","aria-label":"Close",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"px-5 py-4 grid grid-cols-2 gap-x-6 gap-y-3",children:RS.map(s=>n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsx("span",{className:"text-xs text-content-secondary",children:s.description}),n.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:s.keys.map(r=>n.jsx("kbd",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded text-[10px] font-mono font-semibold bg-surface-inset border border-border text-content-secondary min-w-[22px]",children:r},r))})]},s.description))}),n.jsx("div",{className:"px-5 py-3 border-t border-border bg-surface-inset/30",children:n.jsxs("p",{className:"text-[10px] text-content-tertiary",children:["Press ",n.jsx("kbd",{className:"inline-flex items-center justify-center px-1 py-px rounded text-[9px] font-mono bg-surface-inset border border-border text-content-tertiary",children:"Esc"})," or click outside to close"]})})]})}):null}const TS={suite:"Suites",case:"Cases",step:"Steps"},OS={name:"name",description:"description",tag:"tag",instruction:"instruction"};function AS({type:e}){return e==="suite"?n.jsx(jl,{size:13,className:"text-indigo-500 flex-shrink-0"}):e==="case"?n.jsx(fn,{size:13,className:"text-blue-500 flex-shrink-0"}):n.jsx(Zg,{size:13,className:"text-teal-500 flex-shrink-0"})}function DS({open:e,onClose:t}){const s=zn(),[r,a]=m.useState(""),[i,l]=m.useState(""),[o,c]=m.useState(-1),d=m.useRef(null);m.useEffect(()=>{const N=setTimeout(()=>l(r),300);return()=>clearTimeout(N)},[r]),m.useEffect(()=>{e&&(a(""),l(""),c(-1),setTimeout(()=>{var N;return(N=d.current)==null?void 0:N.focus()},50))},[e]);const{data:x=[]}=ke({queryKey:["search",i],queryFn:()=>nw.search(i),enabled:i.trim().length>1,staleTime:0}),f={suite:x.filter(N=>N.type==="suite"),case:x.filter(N=>N.type==="case"),step:x.filter(N=>N.type==="step")},g=x,b=N=>{N.type==="suite"?s(`/tests/${N.suiteId}`):N.type==="case"?s(`/tests/${N.suiteId}/cases/${N.caseId}`):s(`/tests/${N.suiteId}/cases/${N.caseId}`),t()},y=N=>{N.key==="ArrowDown"?(N.preventDefault(),c(h=>Math.min(h+1,g.length-1))):N.key==="ArrowUp"?(N.preventDefault(),c(h=>Math.max(h-1,-1))):N.key==="Enter"&&o>=0&&g[o]?(N.preventDefault(),b(g[o])):N.key==="Escape"&&t()};if(!e)return null;let v=-1;return n.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 backdrop-blur-sm pt-[15vh]",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-xl mx-4 overflow-hidden",onClick:N=>N.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border",children:[n.jsx(Ar,{size:15,className:"text-content-tertiary flex-shrink-0"}),n.jsx("input",{ref:d,type:"text",placeholder:"Search suites, cases, steps...",value:r,onChange:N=>{a(N.target.value),c(-1)},onKeyDown:y,className:"flex-1 text-sm bg-transparent text-content placeholder-content-tertiary outline-none"}),r&&n.jsx("button",{type:"button",onClick:()=>{a(""),l("")},className:"p-1 rounded text-content-tertiary hover:text-content transition-colors",children:n.jsx(Se,{size:13})}),n.jsx("kbd",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded border border-border bg-surface-inset text-content-tertiary",children:"Esc"})]}),n.jsx("div",{className:"overflow-y-auto max-h-[50vh]",children:i.trim().length<2?n.jsx("div",{className:"px-5 py-8 text-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"Type at least 2 characters to search"})}):x.length===0?n.jsx("div",{className:"px-5 py-8 text-center",children:n.jsxs("p",{className:"text-sm text-content-tertiary",children:['No results for "',i,'"']})}):n.jsx("div",{className:"py-1",children:["suite","case","step"].map(N=>{const h=f[N];return h.length===0?null:n.jsxs("div",{children:[n.jsx("div",{className:"px-4 py-1.5 text-[10px] font-bold text-content-tertiary uppercase tracking-wider bg-surface-inset/50",children:TS[N]}),h.map(u=>{v++;const j=o===v;return n.jsxs("button",{type:"button",onClick:()=>b(u),className:S("w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors",j?"bg-accent/10":"hover:bg-surface-inset"),children:[n.jsx(AS,{type:u.type}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm font-medium text-content truncate",children:u.type==="step"?u.instruction:u.type==="case"?u.caseName:u.suiteName}),n.jsx("span",{className:S("text-[9px] px-1.5 py-0.5 rounded font-semibold uppercase flex-shrink-0",u.matchedOn==="name"?"bg-accent/10 text-accent":u.matchedOn==="tag"?"bg-purple-50 text-purple-600":"bg-surface-inset text-content-tertiary"),children:OS[u.matchedOn]})]}),n.jsxs("p",{className:"text-[11px] text-content-tertiary truncate mt-0.5",children:[u.type!=="suite"&&`${u.suiteName}`,u.type==="step"&&u.caseName&&` › ${u.caseName}`]})]}),n.jsx(dr,{size:11,className:S("text-content-tertiary transition-opacity flex-shrink-0",j?"opacity-100":"opacity-0")})]},`${u.suiteId}-${u.caseId??""}-${u.stepId??""}`)})]},N)})})}),x.length>0&&n.jsxs("div",{className:"px-4 py-2.5 border-t border-border bg-surface-inset/30 flex items-center gap-3 text-[10px] text-content-tertiary",children:[n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("kbd",{className:"px-1 py-px rounded border border-border bg-surface font-mono",children:"↑↓"})," navigate"]}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("kbd",{className:"px-1 py-px rounded border border-border bg-surface font-mono",children:"↵"})," select"]})]})]})})}const Gy="assuremind_onboarding_done";function Id(){localStorage.setItem(Gy,"true")}function IS(){const{data:e=[],isLoading:t}=zy(),[s,r]=m.useState(0),[a,i]=m.useState(""),[l,o]=m.useState(""),c=zn(),d=!!localStorage.getItem(Gy),x=X({mutationFn:b=>Ha.update({baseUrl:b}),onError:b=>A.error(b.message)}),f=X({mutationFn:b=>$r.create({name:b,type:"ui"}),onSuccess:()=>{Id(),c("/tests")},onError:b=>A.error(b.message)});if(t||e.length>0||d)return null;const g=[0,1,2].map(b=>n.jsx("span",{className:`w-2 h-2 rounded-full transition-colors ${b===s?"bg-accent":"bg-border"}`},b));return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-md mx-4 overflow-hidden",children:[s===0&&n.jsxs("div",{className:"flex flex-col items-center px-8 py-8 gap-4",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-accent to-accent-dark flex items-center justify-center shadow-lg",children:n.jsx(Be,{size:28,className:"text-white"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Welcome to Assuremind Studio"}),n.jsx("p",{className:"text-sm text-content-secondary mt-2 leading-relaxed",children:"AI-powered test automation that writes, runs, and self-heals your tests. Let's get you set up in just a few steps."})]}),n.jsx("div",{className:"flex items-center gap-2 mt-2",children:g}),n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n.jsx(re,{onClick:()=>r(1),className:"w-full",children:"Get Started"}),n.jsx("button",{type:"button",onClick:()=>{Id()},className:"text-xs text-content-tertiary hover:text-content-secondary transition-colors py-1",children:"Skip for now"})]})]}),s===1&&n.jsxs("div",{className:"flex flex-col items-center px-8 py-8 gap-4",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg",children:n.jsx(Or,{size:28,className:"text-white"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Set your Base URL"}),n.jsx("p",{className:"text-sm text-content-secondary mt-2 leading-relaxed",children:"This is the URL of the application you want to test."})]}),n.jsx("input",{type:"url",placeholder:"https://your-app.example.com",value:a,onChange:b=>i(b.target.value),className:"w-full px-3 py-2 rounded-lg border border-border bg-surface-inset text-sm text-content placeholder:text-content-tertiary outline-none focus:ring-2 focus:ring-accent/40 focus:border-accent transition-all"}),n.jsx("div",{className:"flex items-center gap-2",children:g}),n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n.jsx(re,{onClick:async()=>{a&&await x.mutateAsync(a),r(2)},loading:x.isPending,className:"w-full",children:"Next"}),n.jsx("button",{type:"button",onClick:()=>{Id()},className:"text-xs text-content-tertiary hover:text-content-secondary transition-colors py-1",children:"Skip for now"})]})]}),s===2&&n.jsxs("div",{className:"flex flex-col items-center px-8 py-8 gap-4",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center shadow-lg",children:n.jsx(z2,{size:28,className:"text-white"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Create your first test suite"}),n.jsx("p",{className:"text-sm text-content-secondary mt-2 leading-relaxed",children:"Give your first test suite a name. You can add test cases to it right after."})]}),n.jsx("input",{type:"text",placeholder:"e.g. Login flow",value:l,onChange:b=>o(b.target.value),className:"w-full px-3 py-2 rounded-lg border border-border bg-surface-inset text-sm text-content placeholder:text-content-tertiary outline-none focus:ring-2 focus:ring-accent/40 focus:border-accent transition-all",onKeyDown:b=>{b.key==="Enter"&&l.trim()&&f.mutate(l.trim())}}),n.jsx("div",{className:"flex items-center gap-2",children:g}),n.jsx(re,{onClick:()=>{l.trim()&&f.mutate(l.trim())},loading:f.isPending,disabled:!l.trim(),className:"w-full",children:"Create Suite & Continue"})]})]})})}const LS={AI_NOT_CONFIGURED:{icon:n.jsx(Ot,{size:20,className:"text-indigo-500"}),iconBg:"bg-indigo-50 border-indigo-200/50 dark:bg-indigo-900/30 dark:border-indigo-700/50",title:"AI Provider Setup Required",description:"To use AI-powered features like test generation, code generation, and self-healing, you need to configure an AI provider and its API key.",envVars:[{name:"AI_PROVIDER",example:"openai | anthropic | google | azure-openai | bedrock | ..."},{name:"<PROVIDER>_API_KEY",example:"sk-... (your provider API key)"}]},JIRA_NOT_CONFIGURED:{icon:n.jsx(Vo,{size:20,className:"text-blue-500"}),iconBg:"bg-blue-50 border-blue-200/50 dark:bg-blue-900/30 dark:border-blue-700/50",title:"Jira Integration Setup Required",description:"To fetch Jira issues and enrich test generation with Jira stories, you need to configure your Jira credentials.",envVars:[{name:"JIRA_BASE_URL",example:"https://your-domain.atlassian.net"},{name:"JIRA_EMAIL",example:"your-email@company.com"},{name:"JIRA_API_TOKEN",example:"your-jira-api-token"}]},XRAY_NOT_CONFIGURED:{icon:n.jsx(Vo,{size:20,className:"text-emerald-500"}),iconBg:"bg-emerald-50 border-emerald-200/50 dark:bg-emerald-900/30 dark:border-emerald-700/50",title:"Xray Integration Setup Required",description:"To sync test suites and cases with Jira Xray, you need to configure both Jira credentials and the Xray project key.",envVars:[{name:"JIRA_BASE_URL",example:"https://your-domain.atlassian.net"},{name:"JIRA_EMAIL",example:"your-email@company.com"},{name:"JIRA_API_TOKEN",example:"your-jira-api-token"},{name:"XRAY_PROJECT_KEY",example:"PROJ"}]}};function FS(){const{activeModal:e}=Z2();if(m.useEffect(()=>{if(!e)return;const s=r=>{r.key==="Escape"&&Nr.dismiss()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e]),!e)return null;const t=LS[e];return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center animate-fade-in",children:[n.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>Nr.dismiss()}),n.jsxs("div",{className:"relative bg-surface rounded-2xl shadow-modal w-full max-w-md mx-4 overflow-hidden border border-border animate-scale-in",children:[n.jsxs("div",{className:"flex items-start gap-3.5 p-6 pb-4",children:[n.jsx("div",{className:`flex-shrink-0 w-11 h-11 rounded-xl border flex items-center justify-center ${t.iconBg}`,children:t.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("h3",{className:"text-base font-semibold text-content",children:t.title}),n.jsx("p",{className:"mt-1.5 text-sm text-content-secondary leading-relaxed",children:t.description})]})]}),n.jsxs("div",{className:"mx-6 mb-4 rounded-xl bg-surface-inset border border-border p-4",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(Go,{size:14,className:"text-content-tertiary"}),n.jsx("span",{className:"text-xs font-semibold text-content-secondary uppercase tracking-wider",children:"Add to your .env file"})]}),n.jsx("div",{className:"space-y-2",children:t.envVars.map(s=>n.jsxs("div",{className:"font-mono text-xs",children:[n.jsx("span",{className:"text-accent font-semibold",children:s.name}),n.jsx("span",{className:"text-content-tertiary",children:"="}),n.jsx("span",{className:"text-content-secondary",children:s.example})]},s.name))})]}),n.jsxs("div",{className:"mx-6 mb-5 text-xs text-content-tertiary leading-relaxed",children:["After updating your ",n.jsx("code",{className:"px-1 py-0.5 rounded bg-surface-inset text-content-secondary",children:".env"})," file, restart the Studio server for changes to take effect."]}),n.jsx("div",{className:"flex items-center justify-end gap-2.5 px-6 pb-6",children:n.jsx(re,{variant:"secondary",size:"sm",onClick:()=>Nr.dismiss(),children:"Close"})})]})]})}function _S(){const{job:e,showPopup:t}=Fy(),s=zn();return!t||!e||e.status!=="done"?null:n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm animate-fade-in",children:n.jsxs("div",{className:"bg-surface rounded-2xl shadow-modal w-full max-w-sm mx-4 overflow-hidden border border-border animate-scale-in",children:[n.jsxs("div",{className:"flex flex-col items-center pt-8 pb-5 px-6 bg-gradient-to-b from-emerald-50/80 to-surface",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-emerald-100 border border-emerald-200/50 flex items-center justify-center mb-3",children:n.jsx(Ue,{size:28,className:"text-emerald-500"})}),n.jsx("h2",{className:"text-lg font-bold text-content",children:"Suite Generated!"}),e.suiteName&&n.jsx("span",{className:"mt-2 px-3 py-1 rounded-lg bg-accent-muted text-accent text-xs font-semibold",children:e.suiteName}),n.jsx("p",{className:"text-sm text-content-secondary text-center mt-2.5 leading-relaxed",children:"Your test suite has been created. Open the Test Editor to review and run the generated test cases."})]}),n.jsxs("div",{className:"flex flex-col gap-2.5 px-6 pb-6",children:[n.jsxs("button",{type:"button",onClick:()=>{xn.dismissPopup(),s("/tests",{state:{openSuiteId:e.suiteId}})},className:"w-full py-2.5 rounded-xl bg-gradient-to-b from-accent to-accent-dark text-white font-semibold text-sm hover:brightness-110 transition-all flex items-center justify-center gap-2 shadow-sm",children:[n.jsx(tn,{size:16})," Open Test Cases"]}),n.jsx("button",{type:"button",onClick:()=>xn.dismissPopup(),className:"w-full py-2.5 rounded-xl border border-border text-content-secondary font-medium text-sm hover:bg-surface-inset transition-colors",children:"Stay on this page"})]})]})})}function $S(){const{job:e}=Fy(),[t,s]=m.useState(null),r=m.useRef(null),a=m.useRef(null);m.useEffect(()=>{(e==null?void 0:e.status)==="running"&&s(null)},[e==null?void 0:e.id]);const i=m.useCallback(d=>{d.preventDefault();const x=a.current;if(!x)return;x.setPointerCapture(d.pointerId);const f=x.getBoundingClientRect();r.current={startX:d.clientX,startY:d.clientY,origX:f.left,origY:f.top}},[]),l=m.useCallback(d=>{if(!r.current)return;const x=a.current;if(!x)return;const f=d.clientX-r.current.startX,g=d.clientY-r.current.startY,b=r.current.origX+f,y=r.current.origY+g,v=window.innerWidth-x.offsetWidth,N=window.innerHeight-x.offsetHeight;s({x:Math.max(0,Math.min(b,v)),y:Math.max(0,Math.min(y,N))})},[]),o=m.useCallback(()=>{r.current=null},[]);if(!e||e.status!=="running")return null;const c=t?{left:t.x,top:t.y,right:"auto",bottom:"auto"}:{right:24,bottom:80};return n.jsxs("div",{ref:a,onPointerDown:i,onPointerMove:l,onPointerUp:o,style:{...c,position:"fixed",zIndex:40,touchAction:"none",cursor:"grab",userSelect:"none"},className:"flex items-center gap-2.5 px-4 py-2.5 rounded-xl bg-gradient-to-r from-accent to-accent-dark text-white shadow-elevated text-xs font-semibold animate-pulse",children:[n.jsx(ce,{size:14,className:"animate-spin"}),"Generating: ",e.label]})}function US(){return qr({"run:start":e=>{gt.onRunStart(e.runId)},"run:case":e=>{const t=e;t.status==="running"&>.onCaseRunning(t.runId,t.caseId)},"run:case:done":e=>{const t=e;gt.onCaseDone(t.runId,t.caseId,t.status)},"run:complete":e=>{const t=e;gt.onComplete(t.runId,{passed:t.passed,failed:t.failed,skipped:t.skipped});const s=t.passed+t.failed+t.skipped;t.failed>0?A.error(`Run complete — ${t.passed}/${s} passed, ${t.failed} failed`):A.success(`Run complete — ${t.passed}/${s} passed`),wr.push({id:crypto.randomUUID(),type:"run-complete",message:`Run complete — ${t.passed} passed, ${t.failed} failed`,timestamp:Date.now(),read:!1,link:"/reports"})},"run:error":e=>{const t=e;gt.clear(),A.error(`Run error: ${t.error??"unknown"}`),wr.push({id:crypto.randomUUID(),type:"run-error",message:`Run error: ${t.error??"unknown"}`,timestamp:Date.now(),read:!1,link:"/reports"})}}),null}function BS(){return qr({"git:log":e=>{Pe.addLogStep(e)},"git:conflict":e=>{const t=e;Pe.setConflict(t.files)},"git:operation-done":()=>{Pe.finishOperation()}}),null}const HS={"/":"Dashboard","/tests":"Test Suites","/story":"Smart Tests","/run":"Run Configuration","/reports":"Reports","/variables":"Variables","/healing":"Self-Healing","/git":"Git Control Center","/settings":"Settings","/library":"Step Library","/docs":"Documentation"};function qS(){const e=Vs();return e.pathname.startsWith("/tests")?"Test Suites":HS[e.pathname]??"Assuremind Studio"}function KS(){const{collapsed:e,mobileOpen:t,toggle:s}=J2(),r=qS(),[a,i]=m.useState(!1),[l,o]=m.useState(!1);return zS([{key:"?",description:"Show shortcuts",action:()=>i(!0)},{key:"Escape",description:"Close modal",action:()=>{i(!1),o(!1)}},{key:"k",ctrl:!0,description:"Search (Cmd+K)",action:()=>o(!0)},{key:"k",meta:!0,description:"Search (Cmd+K)",action:()=>o(!0)}]),n.jsxs("div",{className:"flex h-full overflow-hidden",children:[n.jsx(US,{}),n.jsx(BS,{}),n.jsx(Y2,{collapsed:e,onToggle:s,mobileOpen:t}),n.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[n.jsx(Mk,{title:r,onMenuClick:s}),n.jsx("main",{className:"flex flex-col flex-1 overflow-hidden bg-background",children:n.jsxs(Sj,{children:[n.jsx(wt,{path:"/",element:n.jsx(Dk,{})}),n.jsx(wt,{path:"/tests",element:n.jsx(Pd,{})}),n.jsx(wt,{path:"/tests/:suiteId",element:n.jsx(Pd,{})}),n.jsx(wt,{path:"/tests/:suiteId/cases/:caseId",element:n.jsx(Pd,{})}),n.jsx(wt,{path:"/story",element:n.jsx(M5,{})}),n.jsx(wt,{path:"/run",element:n.jsx(F5,{})}),n.jsx(wt,{path:"/reports",element:n.jsx(lS,{})}),n.jsx(wt,{path:"/variables",element:n.jsx(oS,{})}),n.jsx(wt,{path:"/healing",element:n.jsx(xS,{})}),n.jsx(wt,{path:"/git",element:n.jsx(vS,{})}),n.jsx(wt,{path:"/settings",element:n.jsx(hS,{})}),n.jsx(wt,{path:"/library",element:n.jsx(fS,{})}),n.jsx(wt,{path:"/docs",element:n.jsx(gS,{})})]})})]}),n.jsx(MS,{open:a,onClose:()=>i(!1)}),n.jsx(DS,{open:l,onClose:()=>o(!1)})]})}function WS(){return n.jsxs(n.Fragment,{children:[n.jsx(KS,{}),n.jsx(kS,{}),n.jsx(PS,{}),n.jsx(_S,{}),n.jsx($S,{}),n.jsx(SS,{}),n.jsx(IS,{}),n.jsx(FS,{}),n.jsx(u2,{position:"bottom-right",toastOptions:{style:{fontSize:"13px",borderRadius:"12px",padding:"10px 16px",boxShadow:"0 4px 16px -2px rgb(0 0 0 / 0.08), 0 2px 6px -2px rgb(0 0 0 / 0.04)"}}})]})}const VS=new uN({defaultOptions:{queries:{retry:1,staleTime:1e4,refetchOnWindowFocus:!1}}}),Qy=document.getElementById("root");if(!Qy)throw new Error("Root element not found");ig(Qy).render(n.jsx(m.StrictMode,{children:n.jsx(Oj,{children:n.jsx(xN,{client:VS,children:n.jsx(WS,{})})})}));
|