lazyscout 0.3.9 → 0.3.11

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.
@@ -1,22 +1,22 @@
1
- (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(c){if(c.ep)return;c.ep=!0;const h=s(c);fetch(c.href,h)}})();var zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pg(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var xc={exports:{}},Ii={};var xm;function nx(){if(xm)return Ii;xm=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function s(o,c,h){var f=null;if(h!==void 0&&(f=""+h),c.key!==void 0&&(f=""+c.key),"key"in c){h={};for(var p in c)p!=="key"&&(h[p]=c[p])}else h=c;return c=h.ref,{$$typeof:a,type:o,key:f,ref:c!==void 0?c:null,props:h}}return Ii.Fragment=l,Ii.jsx=s,Ii.jsxs=s,Ii}var Sm;function ax(){return Sm||(Sm=1,xc.exports=nx()),xc.exports}var r=ax(),Sc={exports:{}},Ue={};var jm;function rx(){if(jm)return Ue;jm=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function y(S){return S===null||typeof S!="object"?null:(S=x&&S[x]||S["@@iterator"],typeof S=="function"?S:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,j={};function T(S,C,$){this.props=S,this.context=C,this.refs=j,this.updater=$||A}T.prototype.isReactComponent={},T.prototype.setState=function(S,C){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,C,"setState")},T.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function O(){}O.prototype=T.prototype;function k(S,C,$){this.props=S,this.context=C,this.refs=j,this.updater=$||A}var M=k.prototype=new O;M.constructor=k,N(M,T.prototype),M.isPureReactComponent=!0;var R=Array.isArray;function B(){}var H={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function W(S,C,$){var K=$.ref;return{$$typeof:a,type:S,key:C,ref:K!==void 0?K:null,props:$}}function ne(S,C){return W(S.type,C,S.props)}function se(S){return typeof S=="object"&&S!==null&&S.$$typeof===a}function q(S){var C={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function($){return C[$]})}var G=/\/+/g;function E(S,C){return typeof S=="object"&&S!==null&&S.key!=null?q(""+S.key):C.toString(36)}function X(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(B,B):(S.status="pending",S.then(function(C){S.status==="pending"&&(S.status="fulfilled",S.value=C)},function(C){S.status==="pending"&&(S.status="rejected",S.reason=C)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function V(S,C,$,K,ie){var ye=typeof S;(ye==="undefined"||ye==="boolean")&&(S=null);var _e=!1;if(S===null)_e=!0;else switch(ye){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(S.$$typeof){case a:case l:_e=!0;break;case w:return _e=S._init,V(_e(S._payload),C,$,K,ie)}}if(_e)return ie=ie(S),_e=K===""?"."+E(S,0):K,R(ie)?($="",_e!=null&&($=_e.replace(G,"$&/")+"/"),V(ie,C,$,"",function(je){return je})):ie!=null&&(se(ie)&&(ie=ne(ie,$+(ie.key==null||S&&S.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+_e)),C.push(ie)),1;_e=0;var Ne=K===""?".":K+":";if(R(S))for(var oe=0;oe<S.length;oe++)K=S[oe],ye=Ne+E(K,oe),_e+=V(K,C,$,ye,ie);else if(oe=y(S),typeof oe=="function")for(S=oe.call(S),oe=0;!(K=S.next()).done;)K=K.value,ye=Ne+E(K,oe++),_e+=V(K,C,$,ye,ie);else if(ye==="object"){if(typeof S.then=="function")return V(X(S),C,$,K,ie);throw C=String(S),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return _e}function P(S,C,$){if(S==null)return S;var K=[],ie=0;return V(S,K,"","",function(ye){return C.call($,ye,ie++)}),K}function Q(S){if(S._status===-1){var C=S._result;C=C(),C.then(function($){(S._status===0||S._status===-1)&&(S._status=1,S._result=$)},function($){(S._status===0||S._status===-1)&&(S._status=2,S._result=$)}),S._status===-1&&(S._status=0,S._result=C)}if(S._status===1)return S._result.default;throw S._result}var D=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},I={map:P,forEach:function(S,C,$){P(S,function(){C.apply(this,arguments)},$)},count:function(S){var C=0;return P(S,function(){C++}),C},toArray:function(S){return P(S,function(C){return C})||[]},only:function(S){if(!se(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ue.Activity=v,Ue.Children=I,Ue.Component=T,Ue.Fragment=s,Ue.Profiler=c,Ue.PureComponent=k,Ue.StrictMode=o,Ue.Suspense=m,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(S){return H.H.useMemoCache(S)}},Ue.cache=function(S){return function(){return S.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(S,C,$){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var K=N({},S.props),ie=S.key;if(C!=null)for(ye in C.key!==void 0&&(ie=""+C.key),C)!ae.call(C,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&C.ref===void 0||(K[ye]=C[ye]);var ye=arguments.length-2;if(ye===1)K.children=$;else if(1<ye){for(var _e=Array(ye),Ne=0;Ne<ye;Ne++)_e[Ne]=arguments[Ne+2];K.children=_e}return W(S.type,ie,K)},Ue.createContext=function(S){return S={$$typeof:f,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},Ue.createElement=function(S,C,$){var K,ie={},ye=null;if(C!=null)for(K in C.key!==void 0&&(ye=""+C.key),C)ae.call(C,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ie[K]=C[K]);var _e=arguments.length-2;if(_e===1)ie.children=$;else if(1<_e){for(var Ne=Array(_e),oe=0;oe<_e;oe++)Ne[oe]=arguments[oe+2];ie.children=Ne}if(S&&S.defaultProps)for(K in _e=S.defaultProps,_e)ie[K]===void 0&&(ie[K]=_e[K]);return W(S,ye,ie)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(S){return{$$typeof:p,render:S}},Ue.isValidElement=se,Ue.lazy=function(S){return{$$typeof:w,_payload:{_status:-1,_result:S},_init:Q}},Ue.memo=function(S,C){return{$$typeof:g,type:S,compare:C===void 0?null:C}},Ue.startTransition=function(S){var C=H.T,$={};H.T=$;try{var K=S(),ie=H.S;ie!==null&&ie($,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(B,D)}catch(ye){D(ye)}finally{C!==null&&$.types!==null&&(C.types=$.types),H.T=C}},Ue.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Ue.use=function(S){return H.H.use(S)},Ue.useActionState=function(S,C,$){return H.H.useActionState(S,C,$)},Ue.useCallback=function(S,C){return H.H.useCallback(S,C)},Ue.useContext=function(S){return H.H.useContext(S)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(S,C){return H.H.useDeferredValue(S,C)},Ue.useEffect=function(S,C){return H.H.useEffect(S,C)},Ue.useEffectEvent=function(S){return H.H.useEffectEvent(S)},Ue.useId=function(){return H.H.useId()},Ue.useImperativeHandle=function(S,C,$){return H.H.useImperativeHandle(S,C,$)},Ue.useInsertionEffect=function(S,C){return H.H.useInsertionEffect(S,C)},Ue.useLayoutEffect=function(S,C){return H.H.useLayoutEffect(S,C)},Ue.useMemo=function(S,C){return H.H.useMemo(S,C)},Ue.useOptimistic=function(S,C){return H.H.useOptimistic(S,C)},Ue.useReducer=function(S,C,$){return H.H.useReducer(S,C,$)},Ue.useRef=function(S){return H.H.useRef(S)},Ue.useState=function(S){return H.H.useState(S)},Ue.useSyncExternalStore=function(S,C,$){return H.H.useSyncExternalStore(S,C,$)},Ue.useTransition=function(){return H.H.useTransition()},Ue.version="19.2.8",Ue}var wm;function Ed(){return wm||(wm=1,Sc.exports=rx()),Sc.exports}var F=Ed();const Zr=Pg(F);var jc={exports:{}},Vi={},wc={exports:{}},_c={};var _m;function ix(){return _m||(_m=1,(function(a){function l(V,P){var Q=V.length;V.push(P);e:for(;0<Q;){var D=Q-1>>>1,I=V[D];if(0<c(I,P))V[D]=P,V[Q]=I,Q=D;else break e}}function s(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var P=V[0],Q=V.pop();if(Q!==P){V[0]=Q;e:for(var D=0,I=V.length,S=I>>>1;D<S;){var C=2*(D+1)-1,$=V[C],K=C+1,ie=V[K];if(0>c($,Q))K<I&&0>c(ie,$)?(V[D]=ie,V[K]=Q,D=K):(V[D]=$,V[C]=Q,D=C);else if(K<I&&0>c(ie,Q))V[D]=ie,V[K]=Q,D=K;else break e}}return P}function c(V,P){var Q=V.sortIndex-P.sortIndex;return Q!==0?Q:V.id-P.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();a.unstable_now=function(){return f.now()-p}}var m=[],g=[],w=1,v=null,x=3,y=!1,A=!1,N=!1,j=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function M(V){for(var P=s(g);P!==null;){if(P.callback===null)o(g);else if(P.startTime<=V)o(g),P.sortIndex=P.expirationTime,l(m,P);else break;P=s(g)}}function R(V){if(N=!1,M(V),!A)if(s(m)!==null)A=!0,B||(B=!0,q());else{var P=s(g);P!==null&&X(R,P.startTime-V)}}var B=!1,H=-1,ae=5,W=-1;function ne(){return j?!0:!(a.unstable_now()-W<ae)}function se(){if(j=!1,B){var V=a.unstable_now();W=V;var P=!0;try{e:{A=!1,N&&(N=!1,O(H),H=-1),y=!0;var Q=x;try{t:{for(M(V),v=s(m);v!==null&&!(v.expirationTime>V&&ne());){var D=v.callback;if(typeof D=="function"){v.callback=null,x=v.priorityLevel;var I=D(v.expirationTime<=V);if(V=a.unstable_now(),typeof I=="function"){v.callback=I,M(V),P=!0;break t}v===s(m)&&o(m),M(V)}else o(m);v=s(m)}if(v!==null)P=!0;else{var S=s(g);S!==null&&X(R,S.startTime-V),P=!1}}break e}finally{v=null,x=Q,y=!1}P=void 0}}finally{P?q():B=!1}}}var q;if(typeof k=="function")q=function(){k(se)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,E=G.port2;G.port1.onmessage=se,q=function(){E.postMessage(null)}}else q=function(){T(se,0)};function X(V,P){H=T(function(){V(a.unstable_now())},P)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(V){V.callback=null},a.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<V?Math.floor(1e3/V):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(V){switch(x){case 1:case 2:case 3:var P=3;break;default:P=x}var Q=x;x=P;try{return V()}finally{x=Q}},a.unstable_requestPaint=function(){j=!0},a.unstable_runWithPriority=function(V,P){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var Q=x;x=V;try{return P()}finally{x=Q}},a.unstable_scheduleCallback=function(V,P,Q){var D=a.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?D+Q:D):Q=D,V){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=Q+I,V={id:w++,callback:P,priorityLevel:V,startTime:Q,expirationTime:I,sortIndex:-1},Q>D?(V.sortIndex=Q,l(g,V),s(m)===null&&V===s(g)&&(N?(O(H),H=-1):N=!0,X(R,Q-D))):(V.sortIndex=I,l(m,V),A||y||(A=!0,B||(B=!0,q()))),V},a.unstable_shouldYield=ne,a.unstable_wrapCallback=function(V){var P=x;return function(){var Q=x;x=P;try{return V.apply(this,arguments)}finally{x=Q}}}})(_c)),_c}var Nm;function lx(){return Nm||(Nm=1,wc.exports=ix()),wc.exports}var Nc={exports:{}},Pt={};var Em;function sx(){if(Em)return Pt;Em=1;var a=Ed();function l(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)g+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(l(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal");function h(m,g,w){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:m,containerInfo:g,implementation:w}}var f=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Pt.createPortal=function(m,g){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return h(m,g,null,w)},Pt.flushSync=function(m){var g=f.T,w=o.p;try{if(f.T=null,o.p=2,m)return m()}finally{f.T=g,o.p=w,o.d.f()}},Pt.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},Pt.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},Pt.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var w=g.as,v=p(w,g.crossOrigin),x=typeof g.integrity=="string"?g.integrity:void 0,y=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;w==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:y}):w==="script"&&o.d.X(m,{crossOrigin:v,integrity:x,fetchPriority:y,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Pt.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var w=p(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},Pt.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var w=g.as,v=p(w,g.crossOrigin);o.d.L(m,w,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Pt.preloadModule=function(m,g){if(typeof m=="string")if(g){var w=p(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},Pt.requestFormReset=function(m){o.d.r(m)},Pt.unstable_batchedUpdates=function(m,g){return m(g)},Pt.useFormState=function(m,g,w){return f.H.useFormState(m,g,w)},Pt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Pt.version="19.2.8",Pt}var Tm;function ox(){if(Tm)return Nc.exports;Tm=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),Nc.exports=sx(),Nc.exports}var Om;function ux(){if(Om)return Vi;Om=1;var a=lx(),l=Ed(),s=ox();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function f(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 p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(h(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var u=n.return;if(u===null)break;var d=u.alternate;if(d===null){if(i=u.return,i!==null){n=i;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===n)return m(u),e;if(d===i)return m(u),t;d=d.sibling}throw Error(o(188))}if(n.return!==i.return)n=u,i=d;else{for(var b=!1,z=u.child;z;){if(z===n){b=!0,n=u,i=d;break}if(z===i){b=!0,i=u,n=d;break}z=z.sibling}if(!b){for(z=d.child;z;){if(z===n){b=!0,n=d,i=u;break}if(z===i){b=!0,i=d,n=u;break}z=z.sibling}if(!b)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var G=Symbol.for("react.client.reference");function E(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case T:return"Profiler";case j:return"StrictMode";case R:return"Suspense";case B:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case k:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:E(e.type)||"Memo";case ae:t=e._payload,e=e._init;try{return E(e(t))}catch{}}return null}var X=Array.isArray,V=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},D=[],I=-1;function S(e){return{current:e}}function C(e){0>I||(e.current=D[I],D[I]=null,I--)}function $(e,t){I++,D[I]=e.current,e.current=t}var K=S(null),ie=S(null),ye=S(null),_e=S(null);function Ne(e,t){switch($(ye,t),$(ie,e),$(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ip(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ip(t),e=Vp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(K),$(K,e)}function oe(){C(K),C(ie),C(ye)}function je(e){e.memoizedState!==null&&$(_e,e);var t=K.current,n=Vp(t,e.type);t!==n&&($(ie,e),$(K,n))}function Ee(e){ie.current===e&&(C(K),C(ie)),_e.current===e&&(C(_e),$i._currentValue=Q)}var $e,He;function _(e){if($e===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$e=t&&t[1]||"",He=-1<n.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+$e+e+He}var Y=!1;function re(e,t){if(!e||Y)return"";Y=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(fe){var de=fe}Reflect.construct(e,[],ve)}else{try{ve.call()}catch(fe){de=fe}e.call(ve.prototype)}}else{try{throw Error()}catch(fe){de=fe}(ve=e())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(fe){if(fe&&de&&typeof fe.stack=="string")return[fe.stack,de.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=i.DetermineComponentFrameRoot(),b=d[0],z=d[1];if(b&&z){var Z=b.split(`
1
+ (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(c){if(c.ep)return;c.ep=!0;const h=s(c);fetch(c.href,h)}})();var zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xc={exports:{}},Ii={};var xm;function nx(){if(xm)return Ii;xm=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function s(o,c,h){var f=null;if(h!==void 0&&(f=""+h),c.key!==void 0&&(f=""+c.key),"key"in c){h={};for(var p in c)p!=="key"&&(h[p]=c[p])}else h=c;return c=h.ref,{$$typeof:n,type:o,key:f,ref:c!==void 0?c:null,props:h}}return Ii.Fragment=l,Ii.jsx=s,Ii.jsxs=s,Ii}var Sm;function ax(){return Sm||(Sm=1,xc.exports=nx()),xc.exports}var r=ax(),Sc={exports:{}},Ue={};var jm;function rx(){if(jm)return Ue;jm=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function y(S){return S===null||typeof S!="object"?null:(S=x&&S[x]||S["@@iterator"],typeof S=="function"?S:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,j={};function T(S,A,$){this.props=S,this.context=A,this.refs=j,this.updater=$||C}T.prototype.isReactComponent={},T.prototype.setState=function(S,A){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,A,"setState")},T.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function O(){}O.prototype=T.prototype;function k(S,A,$){this.props=S,this.context=A,this.refs=j,this.updater=$||C}var M=k.prototype=new O;M.constructor=k,N(M,T.prototype),M.isPureReactComponent=!0;var R=Array.isArray;function B(){}var H={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function W(S,A,$){var K=$.ref;return{$$typeof:n,type:S,key:A,ref:K!==void 0?K:null,props:$}}function ne(S,A){return W(S.type,A,S.props)}function se(S){return typeof S=="object"&&S!==null&&S.$$typeof===n}function q(S){var A={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function($){return A[$]})}var G=/\/+/g;function E(S,A){return typeof S=="object"&&S!==null&&S.key!=null?q(""+S.key):A.toString(36)}function X(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(B,B):(S.status="pending",S.then(function(A){S.status==="pending"&&(S.status="fulfilled",S.value=A)},function(A){S.status==="pending"&&(S.status="rejected",S.reason=A)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function V(S,A,$,K,ie){var ye=typeof S;(ye==="undefined"||ye==="boolean")&&(S=null);var _e=!1;if(S===null)_e=!0;else switch(ye){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(S.$$typeof){case n:case l:_e=!0;break;case w:return _e=S._init,V(_e(S._payload),A,$,K,ie)}}if(_e)return ie=ie(S),_e=K===""?"."+E(S,0):K,R(ie)?($="",_e!=null&&($=_e.replace(G,"$&/")+"/"),V(ie,A,$,"",function(je){return je})):ie!=null&&(se(ie)&&(ie=ne(ie,$+(ie.key==null||S&&S.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+_e)),A.push(ie)),1;_e=0;var Ne=K===""?".":K+":";if(R(S))for(var oe=0;oe<S.length;oe++)K=S[oe],ye=Ne+E(K,oe),_e+=V(K,A,$,ye,ie);else if(oe=y(S),typeof oe=="function")for(S=oe.call(S),oe=0;!(K=S.next()).done;)K=K.value,ye=Ne+E(K,oe++),_e+=V(K,A,$,ye,ie);else if(ye==="object"){if(typeof S.then=="function")return V(X(S),A,$,K,ie);throw A=String(S),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.")}return _e}function P(S,A,$){if(S==null)return S;var K=[],ie=0;return V(S,K,"","",function(ye){return A.call($,ye,ie++)}),K}function Q(S){if(S._status===-1){var A=S._result;A=A(),A.then(function($){(S._status===0||S._status===-1)&&(S._status=1,S._result=$)},function($){(S._status===0||S._status===-1)&&(S._status=2,S._result=$)}),S._status===-1&&(S._status=0,S._result=A)}if(S._status===1)return S._result.default;throw S._result}var D=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var A=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(A))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},I={map:P,forEach:function(S,A,$){P(S,function(){A.apply(this,arguments)},$)},count:function(S){var A=0;return P(S,function(){A++}),A},toArray:function(S){return P(S,function(A){return A})||[]},only:function(S){if(!se(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ue.Activity=v,Ue.Children=I,Ue.Component=T,Ue.Fragment=s,Ue.Profiler=c,Ue.PureComponent=k,Ue.StrictMode=o,Ue.Suspense=m,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(S){return H.H.useMemoCache(S)}},Ue.cache=function(S){return function(){return S.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(S,A,$){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var K=N({},S.props),ie=S.key;if(A!=null)for(ye in A.key!==void 0&&(ie=""+A.key),A)!ae.call(A,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&A.ref===void 0||(K[ye]=A[ye]);var ye=arguments.length-2;if(ye===1)K.children=$;else if(1<ye){for(var _e=Array(ye),Ne=0;Ne<ye;Ne++)_e[Ne]=arguments[Ne+2];K.children=_e}return W(S.type,ie,K)},Ue.createContext=function(S){return S={$$typeof:f,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},Ue.createElement=function(S,A,$){var K,ie={},ye=null;if(A!=null)for(K in A.key!==void 0&&(ye=""+A.key),A)ae.call(A,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ie[K]=A[K]);var _e=arguments.length-2;if(_e===1)ie.children=$;else if(1<_e){for(var Ne=Array(_e),oe=0;oe<_e;oe++)Ne[oe]=arguments[oe+2];ie.children=Ne}if(S&&S.defaultProps)for(K in _e=S.defaultProps,_e)ie[K]===void 0&&(ie[K]=_e[K]);return W(S,ye,ie)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(S){return{$$typeof:p,render:S}},Ue.isValidElement=se,Ue.lazy=function(S){return{$$typeof:w,_payload:{_status:-1,_result:S},_init:Q}},Ue.memo=function(S,A){return{$$typeof:g,type:S,compare:A===void 0?null:A}},Ue.startTransition=function(S){var A=H.T,$={};H.T=$;try{var K=S(),ie=H.S;ie!==null&&ie($,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(B,D)}catch(ye){D(ye)}finally{A!==null&&$.types!==null&&(A.types=$.types),H.T=A}},Ue.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Ue.use=function(S){return H.H.use(S)},Ue.useActionState=function(S,A,$){return H.H.useActionState(S,A,$)},Ue.useCallback=function(S,A){return H.H.useCallback(S,A)},Ue.useContext=function(S){return H.H.useContext(S)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(S,A){return H.H.useDeferredValue(S,A)},Ue.useEffect=function(S,A){return H.H.useEffect(S,A)},Ue.useEffectEvent=function(S){return H.H.useEffectEvent(S)},Ue.useId=function(){return H.H.useId()},Ue.useImperativeHandle=function(S,A,$){return H.H.useImperativeHandle(S,A,$)},Ue.useInsertionEffect=function(S,A){return H.H.useInsertionEffect(S,A)},Ue.useLayoutEffect=function(S,A){return H.H.useLayoutEffect(S,A)},Ue.useMemo=function(S,A){return H.H.useMemo(S,A)},Ue.useOptimistic=function(S,A){return H.H.useOptimistic(S,A)},Ue.useReducer=function(S,A,$){return H.H.useReducer(S,A,$)},Ue.useRef=function(S){return H.H.useRef(S)},Ue.useState=function(S){return H.H.useState(S)},Ue.useSyncExternalStore=function(S,A,$){return H.H.useSyncExternalStore(S,A,$)},Ue.useTransition=function(){return H.H.useTransition()},Ue.version="19.2.8",Ue}var wm;function Ed(){return wm||(wm=1,Sc.exports=rx()),Sc.exports}var F=Ed();const Zr=Pg(F);var jc={exports:{}},Vi={},wc={exports:{}},_c={};var _m;function ix(){return _m||(_m=1,(function(n){function l(V,P){var Q=V.length;V.push(P);e:for(;0<Q;){var D=Q-1>>>1,I=V[D];if(0<c(I,P))V[D]=P,V[Q]=I,Q=D;else break e}}function s(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var P=V[0],Q=V.pop();if(Q!==P){V[0]=Q;e:for(var D=0,I=V.length,S=I>>>1;D<S;){var A=2*(D+1)-1,$=V[A],K=A+1,ie=V[K];if(0>c($,Q))K<I&&0>c(ie,$)?(V[D]=ie,V[K]=Q,D=K):(V[D]=$,V[A]=Q,D=A);else if(K<I&&0>c(ie,Q))V[D]=ie,V[K]=Q,D=K;else break e}}return P}function c(V,P){var Q=V.sortIndex-P.sortIndex;return Q!==0?Q:V.id-P.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var m=[],g=[],w=1,v=null,x=3,y=!1,C=!1,N=!1,j=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function M(V){for(var P=s(g);P!==null;){if(P.callback===null)o(g);else if(P.startTime<=V)o(g),P.sortIndex=P.expirationTime,l(m,P);else break;P=s(g)}}function R(V){if(N=!1,M(V),!C)if(s(m)!==null)C=!0,B||(B=!0,q());else{var P=s(g);P!==null&&X(R,P.startTime-V)}}var B=!1,H=-1,ae=5,W=-1;function ne(){return j?!0:!(n.unstable_now()-W<ae)}function se(){if(j=!1,B){var V=n.unstable_now();W=V;var P=!0;try{e:{C=!1,N&&(N=!1,O(H),H=-1),y=!0;var Q=x;try{t:{for(M(V),v=s(m);v!==null&&!(v.expirationTime>V&&ne());){var D=v.callback;if(typeof D=="function"){v.callback=null,x=v.priorityLevel;var I=D(v.expirationTime<=V);if(V=n.unstable_now(),typeof I=="function"){v.callback=I,M(V),P=!0;break t}v===s(m)&&o(m),M(V)}else o(m);v=s(m)}if(v!==null)P=!0;else{var S=s(g);S!==null&&X(R,S.startTime-V),P=!1}}break e}finally{v=null,x=Q,y=!1}P=void 0}}finally{P?q():B=!1}}}var q;if(typeof k=="function")q=function(){k(se)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,E=G.port2;G.port1.onmessage=se,q=function(){E.postMessage(null)}}else q=function(){T(se,0)};function X(V,P){H=T(function(){V(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(V){V.callback=null},n.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(V){switch(x){case 1:case 2:case 3:var P=3;break;default:P=x}var Q=x;x=P;try{return V()}finally{x=Q}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(V,P){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var Q=x;x=V;try{return P()}finally{x=Q}},n.unstable_scheduleCallback=function(V,P,Q){var D=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?D+Q:D):Q=D,V){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=Q+I,V={id:w++,callback:P,priorityLevel:V,startTime:Q,expirationTime:I,sortIndex:-1},Q>D?(V.sortIndex=Q,l(g,V),s(m)===null&&V===s(g)&&(N?(O(H),H=-1):N=!0,X(R,Q-D))):(V.sortIndex=I,l(m,V),C||y||(C=!0,B||(B=!0,q()))),V},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(V){var P=x;return function(){var Q=x;x=P;try{return V.apply(this,arguments)}finally{x=Q}}}})(_c)),_c}var Nm;function lx(){return Nm||(Nm=1,wc.exports=ix()),wc.exports}var Nc={exports:{}},Pt={};var Em;function sx(){if(Em)return Pt;Em=1;var n=Ed();function l(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)g+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(l(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal");function h(m,g,w){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:m,containerInfo:g,implementation:w}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Pt.createPortal=function(m,g){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return h(m,g,null,w)},Pt.flushSync=function(m){var g=f.T,w=o.p;try{if(f.T=null,o.p=2,m)return m()}finally{f.T=g,o.p=w,o.d.f()}},Pt.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},Pt.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},Pt.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var w=g.as,v=p(w,g.crossOrigin),x=typeof g.integrity=="string"?g.integrity:void 0,y=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;w==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:y}):w==="script"&&o.d.X(m,{crossOrigin:v,integrity:x,fetchPriority:y,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Pt.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var w=p(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},Pt.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var w=g.as,v=p(w,g.crossOrigin);o.d.L(m,w,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Pt.preloadModule=function(m,g){if(typeof m=="string")if(g){var w=p(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},Pt.requestFormReset=function(m){o.d.r(m)},Pt.unstable_batchedUpdates=function(m,g){return m(g)},Pt.useFormState=function(m,g,w){return f.H.useFormState(m,g,w)},Pt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Pt.version="19.2.8",Pt}var Tm;function ox(){if(Tm)return Nc.exports;Tm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Nc.exports=sx(),Nc.exports}var Om;function ux(){if(Om)return Vi;Om=1;var n=lx(),l=Ed(),s=ox();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function f(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 p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(h(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var u=a.return;if(u===null)break;var d=u.alternate;if(d===null){if(i=u.return,i!==null){a=i;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===a)return m(u),e;if(d===i)return m(u),t;d=d.sibling}throw Error(o(188))}if(a.return!==i.return)a=u,i=d;else{for(var b=!1,z=u.child;z;){if(z===a){b=!0,a=u,i=d;break}if(z===i){b=!0,i=u,a=d;break}z=z.sibling}if(!b){for(z=d.child;z;){if(z===a){b=!0,a=d,i=u;break}if(z===i){b=!0,i=d,a=u;break}z=z.sibling}if(!b)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var G=Symbol.for("react.client.reference");function E(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case T:return"Profiler";case j:return"StrictMode";case R:return"Suspense";case B:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case k:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:E(e.type)||"Memo";case ae:t=e._payload,e=e._init;try{return E(e(t))}catch{}}return null}var X=Array.isArray,V=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},D=[],I=-1;function S(e){return{current:e}}function A(e){0>I||(e.current=D[I],D[I]=null,I--)}function $(e,t){I++,D[I]=e.current,e.current=t}var K=S(null),ie=S(null),ye=S(null),_e=S(null);function Ne(e,t){switch($(ye,t),$(ie,e),$(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ip(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ip(t),e=Vp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}A(K),$(K,e)}function oe(){A(K),A(ie),A(ye)}function je(e){e.memoizedState!==null&&$(_e,e);var t=K.current,a=Vp(t,e.type);t!==a&&($(ie,e),$(K,a))}function Ee(e){ie.current===e&&(A(K),A(ie)),_e.current===e&&(A(_e),$i._currentValue=Q)}var $e,He;function _(e){if($e===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);$e=t&&t[1]||"",He=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+$e+e+He}var Y=!1;function re(e,t){if(!e||Y)return"";Y=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(fe){var de=fe}Reflect.construct(e,[],ve)}else{try{ve.call()}catch(fe){de=fe}e.call(ve.prototype)}}else{try{throw Error()}catch(fe){de=fe}(ve=e())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(fe){if(fe&&de&&typeof fe.stack=="string")return[fe.stack,de.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=i.DetermineComponentFrameRoot(),b=d[0],z=d[1];if(b&&z){var Z=b.split(`
4
4
  `),ce=z.split(`
5
5
  `);for(u=i=0;i<Z.length&&!Z[i].includes("DetermineComponentFrameRoot");)i++;for(;u<ce.length&&!ce[u].includes("DetermineComponentFrameRoot");)u++;if(i===Z.length||u===ce.length)for(i=Z.length-1,u=ce.length-1;1<=i&&0<=u&&Z[i]!==ce[u];)u--;for(;1<=i&&0<=u;i--,u--)if(Z[i]!==ce[u]){if(i!==1||u!==1)do if(i--,u--,0>u||Z[i]!==ce[u]){var pe=`
6
- `+Z[i].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),pe}while(1<=i&&0<=u);break}}}finally{Y=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?_(n):""}function L(e,t){switch(e.tag){case 26:case 27:case 5:return _(e.type);case 16:return _("Lazy");case 13:return e.child!==t&&t!==null?_("Suspense Fallback"):_("Suspense");case 19:return _("SuspenseList");case 0:case 15:return re(e.type,!1);case 11:return re(e.type.render,!1);case 1:return re(e.type,!0);case 31:return _("Activity");default:return""}}function U(e){try{var t="",n=null;do t+=L(e,n),n=e,e=e.return;while(e);return t}catch(i){return`
6
+ `+Z[i].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),pe}while(1<=i&&0<=u);break}}}finally{Y=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?_(a):""}function L(e,t){switch(e.tag){case 26:case 27:case 5:return _(e.type);case 16:return _("Lazy");case 13:return e.child!==t&&t!==null?_("Suspense Fallback"):_("Suspense");case 19:return _("SuspenseList");case 0:case 15:return re(e.type,!1);case 11:return re(e.type.render,!1);case 1:return re(e.type,!0);case 31:return _("Activity");default:return""}}function U(e){try{var t="",a=null;do t+=L(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
7
7
  Error generating stack: `+i.message+`
8
- `+i.stack}}var J=Object.prototype.hasOwnProperty,ge=a.unstable_scheduleCallback,he=a.unstable_cancelCallback,te=a.unstable_shouldYield,xe=a.unstable_requestPaint,we=a.unstable_now,be=a.unstable_getCurrentPriorityLevel,Te=a.unstable_ImmediatePriority,qe=a.unstable_UserBlockingPriority,De=a.unstable_NormalPriority,ht=a.unstable_LowPriority,Nt=a.unstable_IdlePriority,Bt=a.log,Jt=a.unstable_setDisableYieldValue,Xe=null,ut=null;function Pe(e){if(typeof Bt=="function"&&Jt(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Xe,e)}catch{}}var Me=Math.clz32?Math.clz32:Je,At=Math.log,xt=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(At(e)/xt|0)|0}var et=256,St=262144,zt=4194304;function vt(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Gt(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var u=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var z=i&134217727;return z!==0?(i=z&~d,i!==0?u=vt(i):(b&=z,b!==0?u=vt(b):n||(n=z&~e,n!==0&&(u=vt(n))))):(z=i&~d,z!==0?u=vt(z):b!==0?u=vt(b):n||(n=i&~e,n!==0&&(u=vt(n)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,n=t&-t,d>=n||d===32&&(n&4194048)!==0)?t:u}function $t(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dn(){var e=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),e}function Hn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ze(e,t,n,i,u,d){var b=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var z=e.entanglements,Z=e.expirationTimes,ce=e.hiddenUpdates;for(n=b&~n;0<n;){var pe=31-Me(n),ve=1<<pe;z[pe]=0,Z[pe]=-1;var de=ce[pe];if(de!==null)for(ce[pe]=null,pe=0;pe<de.length;pe++){var fe=de[pe];fe!==null&&(fe.lane&=-536870913)}n&=~ve}i!==0&&Ge(e,i,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Me(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&261930}function Jr(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Me(n),u=1<<i;u&t|e[i]&t&&(e[i]|=t),n&=~u}}function Wr(e,t){var n=t&-t;return n=(n&42)!==0?1:La(n),(n&(e.suspendedLanes|t))!==0?0:n}function La(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ei(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vl(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:hm(e.type))}function yl(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var sn=Math.random().toString(36).slice(2),Et="__reactFiber$"+sn,Ht="__reactProps$"+sn,ra="__reactContainer$"+sn,ti="__reactEvents$"+sn,bl="__reactListeners$"+sn,uo="__reactHandles$"+sn,xl="__reactResources$"+sn,ia="__reactMarker$"+sn;function lr(e){delete e[Et],delete e[Ht],delete e[ti],delete e[bl],delete e[uo]}function la(e){var t=e[Et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ra]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Kp(e);e!==null;){if(n=e[Et])return n;e=Kp(e)}return t}e=n,n=e.parentNode}return null}function sa(e){if(e=e[Et]||e[ra]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Se(e){var t=e[xl];return t||(t=e[xl]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ce(e){e[ia]=!0}var tt=new Set,yt={};function jt(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(yt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var oa=RegExp("^[: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]*$"),Sl={},jl={};function co(e){return J.call(jl,e)?!0:J.call(Sl,e)?!1:oa.test(e)?jl[e]=!0:(Sl[e]=!0,!1)}function gn(e,t,n){if(co(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ua(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Wt(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wl(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fo(e,t,n){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,d=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(b){n=""+b,d.call(this,b)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(b){n=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ho(e){if(!e._valueTracker){var t=wl(e)?"checked":"value";e._valueTracker=fo(e,t,""+e[t])}}function Ud(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=wl(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function _l(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}}var Qv=/[\n"\\]/g;function vn(e){return e.replace(Qv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function po(e,t,n,i,u,d,b,z){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?mo(e,b,bt(t)):n!=null?mo(e,b,bt(n)):i!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?e.name=""+bt(z):e.removeAttribute("name")}function Md(e,t,n,i,u,d,b,z){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||n!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ho(e);return}n=n!=null?""+bt(n):"",t=t!=null?""+bt(t):n,z||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=z?e.checked:!!i,e.defaultChecked=!!i,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),ho(e)}function mo(e,t,n){t==="number"&&_l(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function sr(e,t,n,i){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&i&&(e[n].defaultSelected=!0)}else{for(n=""+bt(n),t=null,u=0;u<e.length;u++){if(e[u].value===n){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Ld(e,t,n){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+bt(n):""}function Bd(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(o(92));if(X(i)){if(1<i.length)throw Error(o(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=bt(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i),ho(e)}function or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $d(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||Kv.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Hd(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var u in t)i=t[u],t.hasOwnProperty(u)&&n[u]!==i&&$d(e,u,i)}else for(var d in t)t.hasOwnProperty(d)&&$d(e,d,t[d])}function go(e){if(e.indexOf("-")===-1)return!1;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 Jv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Wv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Nl(e){return Wv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function qn(){}var vo=null;function yo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ur=null,cr=null;function qd(e){var t=sa(e);if(t&&(e=t.stateNode)){var n=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(po(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+vn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var u=i[Ht]||null;if(!u)throw Error(o(90));po(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&Ud(i)}break e;case"textarea":Ld(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&sr(e,!!n.multiple,t,!1)}}}var bo=!1;function Gd(e,t,n){if(bo)return e(t,n);bo=!0;try{var i=e(t);return i}finally{if(bo=!1,(ur!==null||cr!==null)&&(fs(),ur&&(t=ur,e=cr,cr=ur=null,qd(t),e)))for(t=0;t<e.length;t++)qd(e[t])}}function ni(e,t){var n=e.stateNode;if(n===null)return null;var i=n[Ht]||null;if(i===null)return null;n=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xo=!1;if(Gn)try{var ai={};Object.defineProperty(ai,"passive",{get:function(){xo=!0}}),window.addEventListener("test",ai,ai),window.removeEventListener("test",ai,ai)}catch{xo=!1}var ca=null,So=null,El=null;function Id(){if(El)return El;var e,t=So,n=t.length,i,u="value"in ca?ca.value:ca.textContent,d=u.length;for(e=0;e<n&&t[e]===u[e];e++);var b=n-e;for(i=1;i<=b&&t[n-i]===u[d-i];i++);return El=u.slice(e,1<i?1-i:void 0)}function Tl(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 Ol(){return!0}function Vd(){return!1}function en(e){function t(n,i,u,d,b){this._reactName=n,this._targetInst=u,this.type=i,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(n=e[z],this[z]=n?n(d):d[z]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ol:Vd,this.isPropagationStopped=Vd,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ol)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Al=en($a),ri=v({},$a,{view:0,detail:0}),ey=en(ri),jo,wo,ii,Cl=v({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:No,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!==ii&&(ii&&e.type==="mousemove"?(jo=e.screenX-ii.screenX,wo=e.screenY-ii.screenY):wo=jo=0,ii=e),jo)},movementY:function(e){return"movementY"in e?e.movementY:wo}}),Yd=en(Cl),ty=v({},Cl,{dataTransfer:0}),ny=en(ty),ay=v({},ri,{relatedTarget:0}),_o=en(ay),ry=v({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),iy=en(ry),ly=v({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sy=en(ly),oy=v({},$a,{data:0}),Fd=en(oy),uy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cy={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"},dy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dy[e])?!!t[e]:!1}function No(){return fy}var hy=v({},ri,{key:function(e){if(e.key){var t=uy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:No,charCode:function(e){return e.type==="keypress"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),py=en(hy),my=v({},Cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pd=en(my),gy=v({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:No}),vy=en(gy),yy=v({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),by=en(yy),xy=v({},Cl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Sy=en(xy),jy=v({},$a,{newState:0,oldState:0}),wy=en(jy),_y=[9,13,27,32],Eo=Gn&&"CompositionEvent"in window,li=null;Gn&&"documentMode"in document&&(li=document.documentMode);var Ny=Gn&&"TextEvent"in window&&!li,Zd=Gn&&(!Eo||li&&8<li&&11>=li),Xd=" ",Qd=!1;function Kd(e,t){switch(e){case"keyup":return _y.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Ey(e,t){switch(e){case"compositionend":return Jd(t);case"keypress":return t.which!==32?null:(Qd=!0,Xd);case"textInput":return e=t.data,e===Xd&&Qd?null:e;default:return null}}function Ty(e,t){if(dr)return e==="compositionend"||!Eo&&Kd(e,t)?(e=Id(),El=So=ca=null,dr=!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 Zd&&t.locale!=="ko"?null:t.data;default:return null}}var Oy={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 Wd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Oy[e.type]:t==="textarea"}function ef(e,t,n,i){ur?cr?cr.push(i):cr=[i]:ur=i,t=bs(t,"onChange"),0<t.length&&(n=new Al("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var si=null,oi=null;function Ay(e){Lp(e,0)}function Rl(e){var t=Ba(e);if(Ud(t))return e}function tf(e,t){if(e==="change")return t}var nf=!1;if(Gn){var To;if(Gn){var Oo="oninput"in document;if(!Oo){var af=document.createElement("div");af.setAttribute("oninput","return;"),Oo=typeof af.oninput=="function"}To=Oo}else To=!1;nf=To&&(!document.documentMode||9<document.documentMode)}function rf(){si&&(si.detachEvent("onpropertychange",lf),oi=si=null)}function lf(e){if(e.propertyName==="value"&&Rl(oi)){var t=[];ef(t,oi,e,yo(e)),Gd(Ay,t)}}function Cy(e,t,n){e==="focusin"?(rf(),si=t,oi=n,si.attachEvent("onpropertychange",lf)):e==="focusout"&&rf()}function Ry(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rl(oi)}function ky(e,t){if(e==="click")return Rl(t)}function Dy(e,t){if(e==="input"||e==="change")return Rl(t)}function zy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:zy;function ui(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var u=n[i];if(!J.call(t,u)||!on(e[u],t[u]))return!1}return!0}function sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function of(e,t){var n=sf(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sf(n)}}function uf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_l(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_l(e.document)}return t}function Ao(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")}var Uy=Gn&&"documentMode"in document&&11>=document.documentMode,fr=null,Co=null,ci=null,Ro=!1;function df(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ro||fr==null||fr!==_l(i)||(i=fr,"selectionStart"in i&&Ao(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ci&&ui(ci,i)||(ci=i,i=bs(Co,"onSelect"),0<i.length&&(t=new Al("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=fr)))}function Ha(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hr={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionrun:Ha("Transition","TransitionRun"),transitionstart:Ha("Transition","TransitionStart"),transitioncancel:Ha("Transition","TransitionCancel"),transitionend:Ha("Transition","TransitionEnd")},ko={},ff={};Gn&&(ff=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);function qa(e){if(ko[e])return ko[e];if(!hr[e])return e;var t=hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ff)return ko[e]=t[n];return e}var hf=qa("animationend"),pf=qa("animationiteration"),mf=qa("animationstart"),My=qa("transitionrun"),Ly=qa("transitionstart"),By=qa("transitioncancel"),gf=qa("transitionend"),vf=new Map,Do="abort auxClick beforeToggle 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(" ");Do.push("scrollEnd");function On(e,t){vf.set(e,t),jt(t,[e])}var kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],pr=0,zo=0;function Dl(){for(var e=pr,t=zo=pr=0;t<e;){var n=yn[t];yn[t++]=null;var i=yn[t];yn[t++]=null;var u=yn[t];yn[t++]=null;var d=yn[t];if(yn[t++]=null,i!==null&&u!==null){var b=i.pending;b===null?u.next=u:(u.next=b.next,b.next=u),i.pending=u}d!==0&&yf(n,u,d)}}function zl(e,t,n,i){yn[pr++]=e,yn[pr++]=t,yn[pr++]=n,yn[pr++]=i,zo|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Uo(e,t,n,i){return zl(e,t,n,i),Ul(e)}function Ga(e,t){return zl(e,null,null,t),Ul(e)}function yf(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var u=!1,d=e.return;d!==null;)d.childLanes|=n,i=d.alternate,i!==null&&(i.childLanes|=n),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-Me(n),e=d.hiddenUpdates,i=e[u],i===null?e[u]=[t]:i.push(t),t.lane=n|536870912),d):null}function Ul(e){if(50<ki)throw ki=0,Vu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var mr={};function $y(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,n,i){return new $y(e,t,n,i)}function Mo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var n=e.alternate;return n===null?(n=un(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function bf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ml(e,t,n,i,u,d){var b=0;if(i=e,typeof e=="function")Mo(e)&&(b=1);else if(typeof e=="string")b=Vb(e,n,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=un(31,n,t,u),e.elementType=W,e.lanes=d,e;case N:return Ia(n.children,u,d,t);case j:b=8,u|=24;break;case T:return e=un(12,n,t,u|2),e.elementType=T,e.lanes=d,e;case R:return e=un(13,n,t,u),e.elementType=R,e.lanes=d,e;case B:return e=un(19,n,t,u),e.elementType=B,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:b=10;break e;case O:b=9;break e;case M:b=11;break e;case H:b=14;break e;case ae:b=16,i=null;break e}b=29,n=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=un(b,n,t,u),t.elementType=e,t.type=i,t.lanes=d,t}function Ia(e,t,n,i){return e=un(7,e,i,t),e.lanes=n,e}function Lo(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function xf(e){var t=un(18,null,null,0);return t.stateNode=e,t}function Bo(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Sf=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var n=Sf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:U(t)},Sf.set(e,t),t)}return{value:e,source:t,stack:U(t)}}var gr=[],vr=0,Ll=null,di=0,xn=[],Sn=0,da=null,zn=1,Un="";function Vn(e,t){gr[vr++]=di,gr[vr++]=Ll,Ll=e,di=t}function jf(e,t,n){xn[Sn++]=zn,xn[Sn++]=Un,xn[Sn++]=da,da=e;var i=zn;e=Un;var u=32-Me(i)-1;i&=~(1<<u),n+=1;var d=32-Me(t)+u;if(30<d){var b=u-u%5;d=(i&(1<<b)-1).toString(32),i>>=b,u-=b,zn=1<<32-Me(t)+u|n<<u|i,Un=d+e}else zn=1<<d|n<<u|i,Un=e}function $o(e){e.return!==null&&(Vn(e,1),jf(e,1,0))}function Ho(e){for(;e===Ll;)Ll=gr[--vr],gr[vr]=null,di=gr[--vr],gr[vr]=null;for(;e===da;)da=xn[--Sn],xn[Sn]=null,Un=xn[--Sn],xn[Sn]=null,zn=xn[--Sn],xn[Sn]=null}function wf(e,t){xn[Sn++]=zn,xn[Sn++]=Un,xn[Sn++]=da,zn=t.id,Un=t.overflow,da=e}var It=null,ct=null,Ze=!1,fa=null,jn=!1,qo=Error(o(519));function ha(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fi(bn(t,e)),qo}function _f(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Et]=e,t[Ht]=i,n){case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":case"embed":Ve("load",t);break;case"video":case"audio":for(n=0;n<zi.length;n++)Ve(zi[n],t);break;case"source":Ve("error",t);break;case"img":case"image":case"link":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"input":Ve("invalid",t),Md(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ve("invalid",t);break;case"textarea":Ve("invalid",t),Bd(t,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||qp(t.textContent,n)?(i.popover!=null&&(Ve("beforetoggle",t),Ve("toggle",t)),i.onScroll!=null&&Ve("scroll",t),i.onScrollEnd!=null&&Ve("scrollend",t),i.onClick!=null&&(t.onclick=qn),t=!0):t=!1,t||ha(e,!0)}function Nf(e){for(It=e.return;It;)switch(It.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:It=It.return}}function yr(e){if(e!==It)return!1;if(!Ze)return Nf(e),Ze=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ic(e.type,e.memoizedProps)),n=!n),n&&ct&&ha(e),Nf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Qp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Qp(e)}else t===27?(t=ct,Ta(e.type)?(e=cc,cc=null,ct=e):ct=t):ct=It?_n(e.stateNode.nextSibling):null;return!0}function Va(){ct=It=null,Ze=!1}function Go(){var e=fa;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),fa=null),e}function fi(e){fa===null?fa=[e]:fa.push(e)}var Io=S(null),Ya=null,Yn=null;function pa(e,t,n){$(Io,t._currentValue),t._currentValue=n}function Fn(e){e._currentValue=Io.current,C(Io)}function Vo(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Yo(e,t,n,i){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var b=u.child;d=d.firstContext;e:for(;d!==null;){var z=d;d=u;for(var Z=0;Z<t.length;Z++)if(z.context===t[Z]){d.lanes|=n,z=d.alternate,z!==null&&(z.lanes|=n),Vo(d.return,n,e),i||(b=null);break e}d=z.next}}else if(u.tag===18){if(b=u.return,b===null)throw Error(o(341));b.lanes|=n,d=b.alternate,d!==null&&(d.lanes|=n),Vo(b,n,e),b=null}else b=u.child;if(b!==null)b.return=u;else for(b=u;b!==null;){if(b===e){b=null;break}if(u=b.sibling,u!==null){u.return=b.return,b=u;break}b=b.return}u=b}}function br(e,t,n,i){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var b=u.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var z=u.type;on(u.pendingProps.value,b.value)||(e!==null?e.push(z):e=[z])}}else if(u===_e.current){if(b=u.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push($i):e=[$i])}u=u.return}e!==null&&Yo(t,e,n,i),t.flags|=262144}function Bl(e){for(e=e.firstContext;e!==null;){if(!on(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fa(e){Ya=e,Yn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Vt(e){return Ef(Ya,e)}function $l(e,t){return Ya===null&&Fa(e),Ef(e,t)}function Ef(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yn===null){if(e===null)throw Error(o(308));Yn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yn=Yn.next=t;return n}var Hy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},qy=a.unstable_scheduleCallback,Gy=a.unstable_NormalPriority,Ct={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fo(){return{controller:new Hy,data:new Map,refCount:0}}function hi(e){e.refCount--,e.refCount===0&&qy(Gy,function(){e.controller.abort()})}var pi=null,Po=0,xr=0,Sr=null;function Iy(e,t){if(pi===null){var n=pi=[];Po=0,xr=Qu(),Sr={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Po++,t.then(Tf,Tf),t}function Tf(){if(--Po===0&&pi!==null){Sr!==null&&(Sr.status="fulfilled");var e=pi;pi=null,xr=0,Sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vy(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(i.status="rejected",i.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),i}var Of=V.S;V.S=function(e,t){dp=we(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Iy(e,t),Of!==null&&Of(e,t)};var Pa=S(null);function Zo(){var e=Pa.current;return e!==null?e:st.pooledCache}function Hl(e,t){t===null?$(Pa,Pa.current):$(Pa,t.pool)}function Af(){var e=Zo();return e===null?null:{parent:Ct._currentValue,pool:e}}var jr=Error(o(460)),Xo=Error(o(474)),ql=Error(o(542)),Gl={then:function(){}};function Cf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Rf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(qn,qn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e;default:if(typeof t.status=="string")t.then(qn,qn);else{if(e=st,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=i}},function(i){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e}throw Xa=t,jr}}function Za(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Xa=n,jr):n}}var Xa=null;function kf(){if(Xa===null)throw Error(o(459));var e=Xa;return Xa=null,e}function Df(e){if(e===jr||e===ql)throw Error(o(483))}var wr=null,mi=0;function Il(e){var t=mi;return mi+=1,wr===null&&(wr=[]),Rf(wr,e,t)}function gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vl(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function zf(e){function t(le,ee){if(e){var ue=le.deletions;ue===null?(le.deletions=[ee],le.flags|=16):ue.push(ee)}}function n(le,ee){if(!e)return null;for(;ee!==null;)t(le,ee),ee=ee.sibling;return null}function i(le){for(var ee=new Map;le!==null;)le.key!==null?ee.set(le.key,le):ee.set(le.index,le),le=le.sibling;return ee}function u(le,ee){return le=In(le,ee),le.index=0,le.sibling=null,le}function d(le,ee,ue){return le.index=ue,e?(ue=le.alternate,ue!==null?(ue=ue.index,ue<ee?(le.flags|=67108866,ee):ue):(le.flags|=67108866,ee)):(le.flags|=1048576,ee)}function b(le){return e&&le.alternate===null&&(le.flags|=67108866),le}function z(le,ee,ue,me){return ee===null||ee.tag!==6?(ee=Lo(ue,le.mode,me),ee.return=le,ee):(ee=u(ee,ue),ee.return=le,ee)}function Z(le,ee,ue,me){var Re=ue.type;return Re===N?pe(le,ee,ue.props.children,me,ue.key):ee!==null&&(ee.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ae&&Za(Re)===ee.type)?(ee=u(ee,ue.props),gi(ee,ue),ee.return=le,ee):(ee=Ml(ue.type,ue.key,ue.props,null,le.mode,me),gi(ee,ue),ee.return=le,ee)}function ce(le,ee,ue,me){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ue.containerInfo||ee.stateNode.implementation!==ue.implementation?(ee=Bo(ue,le.mode,me),ee.return=le,ee):(ee=u(ee,ue.children||[]),ee.return=le,ee)}function pe(le,ee,ue,me,Re){return ee===null||ee.tag!==7?(ee=Ia(ue,le.mode,me,Re),ee.return=le,ee):(ee=u(ee,ue),ee.return=le,ee)}function ve(le,ee,ue){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Lo(""+ee,le.mode,ue),ee.return=le,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return ue=Ml(ee.type,ee.key,ee.props,null,le.mode,ue),gi(ue,ee),ue.return=le,ue;case A:return ee=Bo(ee,le.mode,ue),ee.return=le,ee;case ae:return ee=Za(ee),ve(le,ee,ue)}if(X(ee)||q(ee))return ee=Ia(ee,le.mode,ue,null),ee.return=le,ee;if(typeof ee.then=="function")return ve(le,Il(ee),ue);if(ee.$$typeof===k)return ve(le,$l(le,ee),ue);Vl(le,ee)}return null}function de(le,ee,ue,me){var Re=ee!==null?ee.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Re!==null?null:z(le,ee,""+ue,me);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:return ue.key===Re?Z(le,ee,ue,me):null;case A:return ue.key===Re?ce(le,ee,ue,me):null;case ae:return ue=Za(ue),de(le,ee,ue,me)}if(X(ue)||q(ue))return Re!==null?null:pe(le,ee,ue,me,null);if(typeof ue.then=="function")return de(le,ee,Il(ue),me);if(ue.$$typeof===k)return de(le,ee,$l(le,ue),me);Vl(le,ue)}return null}function fe(le,ee,ue,me,Re){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return le=le.get(ue)||null,z(ee,le,""+me,Re);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case y:return le=le.get(me.key===null?ue:me.key)||null,Z(ee,le,me,Re);case A:return le=le.get(me.key===null?ue:me.key)||null,ce(ee,le,me,Re);case ae:return me=Za(me),fe(le,ee,ue,me,Re)}if(X(me)||q(me))return le=le.get(ue)||null,pe(ee,le,me,Re,null);if(typeof me.then=="function")return fe(le,ee,ue,Il(me),Re);if(me.$$typeof===k)return fe(le,ee,ue,$l(ee,me),Re);Vl(ee,me)}return null}function Oe(le,ee,ue,me){for(var Re=null,Qe=null,Ae=ee,Be=ee=0,Fe=null;Ae!==null&&Be<ue.length;Be++){Ae.index>Be?(Fe=Ae,Ae=null):Fe=Ae.sibling;var Ke=de(le,Ae,ue[Be],me);if(Ke===null){Ae===null&&(Ae=Fe);break}e&&Ae&&Ke.alternate===null&&t(le,Ae),ee=d(Ke,ee,Be),Qe===null?Re=Ke:Qe.sibling=Ke,Qe=Ke,Ae=Fe}if(Be===ue.length)return n(le,Ae),Ze&&Vn(le,Be),Re;if(Ae===null){for(;Be<ue.length;Be++)Ae=ve(le,ue[Be],me),Ae!==null&&(ee=d(Ae,ee,Be),Qe===null?Re=Ae:Qe.sibling=Ae,Qe=Ae);return Ze&&Vn(le,Be),Re}for(Ae=i(Ae);Be<ue.length;Be++)Fe=fe(Ae,le,Be,ue[Be],me),Fe!==null&&(e&&Fe.alternate!==null&&Ae.delete(Fe.key===null?Be:Fe.key),ee=d(Fe,ee,Be),Qe===null?Re=Fe:Qe.sibling=Fe,Qe=Fe);return e&&Ae.forEach(function(ka){return t(le,ka)}),Ze&&Vn(le,Be),Re}function ke(le,ee,ue,me){if(ue==null)throw Error(o(151));for(var Re=null,Qe=null,Ae=ee,Be=ee=0,Fe=null,Ke=ue.next();Ae!==null&&!Ke.done;Be++,Ke=ue.next()){Ae.index>Be?(Fe=Ae,Ae=null):Fe=Ae.sibling;var ka=de(le,Ae,Ke.value,me);if(ka===null){Ae===null&&(Ae=Fe);break}e&&Ae&&ka.alternate===null&&t(le,Ae),ee=d(ka,ee,Be),Qe===null?Re=ka:Qe.sibling=ka,Qe=ka,Ae=Fe}if(Ke.done)return n(le,Ae),Ze&&Vn(le,Be),Re;if(Ae===null){for(;!Ke.done;Be++,Ke=ue.next())Ke=ve(le,Ke.value,me),Ke!==null&&(ee=d(Ke,ee,Be),Qe===null?Re=Ke:Qe.sibling=Ke,Qe=Ke);return Ze&&Vn(le,Be),Re}for(Ae=i(Ae);!Ke.done;Be++,Ke=ue.next())Ke=fe(Ae,le,Be,Ke.value,me),Ke!==null&&(e&&Ke.alternate!==null&&Ae.delete(Ke.key===null?Be:Ke.key),ee=d(Ke,ee,Be),Qe===null?Re=Ke:Qe.sibling=Ke,Qe=Ke);return e&&Ae.forEach(function(tx){return t(le,tx)}),Ze&&Vn(le,Be),Re}function lt(le,ee,ue,me){if(typeof ue=="object"&&ue!==null&&ue.type===N&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:e:{for(var Re=ue.key;ee!==null;){if(ee.key===Re){if(Re=ue.type,Re===N){if(ee.tag===7){n(le,ee.sibling),me=u(ee,ue.props.children),me.return=le,le=me;break e}}else if(ee.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ae&&Za(Re)===ee.type){n(le,ee.sibling),me=u(ee,ue.props),gi(me,ue),me.return=le,le=me;break e}n(le,ee);break}else t(le,ee);ee=ee.sibling}ue.type===N?(me=Ia(ue.props.children,le.mode,me,ue.key),me.return=le,le=me):(me=Ml(ue.type,ue.key,ue.props,null,le.mode,me),gi(me,ue),me.return=le,le=me)}return b(le);case A:e:{for(Re=ue.key;ee!==null;){if(ee.key===Re)if(ee.tag===4&&ee.stateNode.containerInfo===ue.containerInfo&&ee.stateNode.implementation===ue.implementation){n(le,ee.sibling),me=u(ee,ue.children||[]),me.return=le,le=me;break e}else{n(le,ee);break}else t(le,ee);ee=ee.sibling}me=Bo(ue,le.mode,me),me.return=le,le=me}return b(le);case ae:return ue=Za(ue),lt(le,ee,ue,me)}if(X(ue))return Oe(le,ee,ue,me);if(q(ue)){if(Re=q(ue),typeof Re!="function")throw Error(o(150));return ue=Re.call(ue),ke(le,ee,ue,me)}if(typeof ue.then=="function")return lt(le,ee,Il(ue),me);if(ue.$$typeof===k)return lt(le,ee,$l(le,ue),me);Vl(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ee!==null&&ee.tag===6?(n(le,ee.sibling),me=u(ee,ue),me.return=le,le=me):(n(le,ee),me=Lo(ue,le.mode,me),me.return=le,le=me),b(le)):n(le,ee)}return function(le,ee,ue,me){try{mi=0;var Re=lt(le,ee,ue,me);return wr=null,Re}catch(Ae){if(Ae===jr||Ae===ql)throw Ae;var Qe=un(29,Ae,null,le.mode);return Qe.lanes=me,Qe.return=le,Qe}}}var Qa=zf(!0),Uf=zf(!1),ma=!1;function Qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ko(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function va(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(We&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=Ul(e),yf(e,null,n),t}return zl(e,i,t,n),Ul(e)}function vi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Jr(e,n)}}function Jo(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var u=null,d=null;if(n=n.firstBaseUpdate,n!==null){do{var b={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};d===null?u=d=b:d=d.next=b,n=n.next}while(n!==null);d===null?u=d=t:d=d.next=t}else u=d=t;n={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wo=!1;function yi(){if(Wo){var e=Sr;if(e!==null)throw e}}function bi(e,t,n,i){Wo=!1;var u=e.updateQueue;ma=!1;var d=u.firstBaseUpdate,b=u.lastBaseUpdate,z=u.shared.pending;if(z!==null){u.shared.pending=null;var Z=z,ce=Z.next;Z.next=null,b===null?d=ce:b.next=ce,b=Z;var pe=e.alternate;pe!==null&&(pe=pe.updateQueue,z=pe.lastBaseUpdate,z!==b&&(z===null?pe.firstBaseUpdate=ce:z.next=ce,pe.lastBaseUpdate=Z))}if(d!==null){var ve=u.baseState;b=0,pe=ce=Z=null,z=d;do{var de=z.lane&-536870913,fe=de!==z.lane;if(fe?(Ye&de)===de:(i&de)===de){de!==0&&de===xr&&(Wo=!0),pe!==null&&(pe=pe.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Oe=e,ke=z;de=t;var lt=n;switch(ke.tag){case 1:if(Oe=ke.payload,typeof Oe=="function"){ve=Oe.call(lt,ve,de);break e}ve=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=ke.payload,de=typeof Oe=="function"?Oe.call(lt,ve,de):Oe,de==null)break e;ve=v({},ve,de);break e;case 2:ma=!0}}de=z.callback,de!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=u.callbacks,fe===null?u.callbacks=[de]:fe.push(de))}else fe={lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},pe===null?(ce=pe=fe,Z=ve):pe=pe.next=fe,b|=de;if(z=z.next,z===null){if(z=u.shared.pending,z===null)break;fe=z,z=fe.next,fe.next=null,u.lastBaseUpdate=fe,u.shared.pending=null}}while(!0);pe===null&&(Z=ve),u.baseState=Z,u.firstBaseUpdate=ce,u.lastBaseUpdate=pe,d===null&&(u.shared.lanes=0),ja|=b,e.lanes=b,e.memoizedState=ve}}function Mf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Lf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Mf(n[e],t)}var _r=S(null),Yl=S(0);function Bf(e,t){e=ta,$(Yl,e),$(_r,t),ta=e|t.baseLanes}function eu(){$(Yl,ta),$(_r,_r.current)}function tu(){ta=Yl.current,C(_r),C(Yl)}var cn=S(null),wn=null;function ya(e){var t=e.alternate;$(Tt,Tt.current&1),$(cn,e),wn===null&&(t===null||_r.current!==null||t.memoizedState!==null)&&(wn=e)}function nu(e){$(Tt,Tt.current),$(cn,e),wn===null&&(wn=e)}function $f(e){e.tag===22?($(Tt,Tt.current),$(cn,e),wn===null&&(wn=e)):ba()}function ba(){$(Tt,Tt.current),$(cn,cn.current)}function dn(e){C(cn),wn===e&&(wn=null),C(Tt)}var Tt=S(0);function Fl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||oc(n)||uc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 Pn=0,Le=null,rt=null,Rt=null,Pl=!1,Nr=!1,Ka=!1,Zl=0,xi=0,Er=null,Yy=0;function wt(){throw Error(o(321))}function au(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!on(e[n],t[n]))return!1;return!0}function ru(e,t,n,i,u,d){return Pn=d,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?jh:bu,Ka=!1,d=n(i,u),Ka=!1,Nr&&(d=qf(t,n,i,u)),Hf(e),d}function Hf(e){V.H=wi;var t=rt!==null&&rt.next!==null;if(Pn=0,Rt=rt=Le=null,Pl=!1,xi=0,Er=null,t)throw Error(o(300));e===null||kt||(e=e.dependencies,e!==null&&Bl(e)&&(kt=!0))}function qf(e,t,n,i){Le=e;var u=0;do{if(Nr&&(Er=null),xi=0,Nr=!1,25<=u)throw Error(o(301));if(u+=1,Rt=rt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}V.H=wh,d=t(n,i)}while(Nr);return d}function Fy(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?Si(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Le.flags|=1024),t}function iu(){var e=Zl!==0;return Zl=0,e}function lu(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function su(e){if(Pl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pl=!1}Pn=0,Rt=rt=Le=null,Nr=!1,xi=Zl=0,Er=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?Le.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function Ot(){if(rt===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Rt===null?Le.memoizedState:Rt.next;if(t!==null)Rt=t,rt=e;else{if(e===null)throw Le.alternate===null?Error(o(467)):Error(o(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Rt===null?Le.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function Xl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Si(e){var t=xi;return xi+=1,Er===null&&(Er=[]),e=Rf(Er,e,t),t=Le,(Rt===null?t.memoizedState:Rt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?jh:bu),e}function Ql(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Si(e);if(e.$$typeof===k)return Vt(e)}throw Error(o(438,String(e)))}function ou(e){var t=null,n=Le.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=Le.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Xl(),Le.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=ne;return t.index++,n}function Zn(e,t){return typeof t=="function"?t(e):t}function Kl(e){var t=Ot();return uu(t,rt,e)}function uu(e,t,n){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=n;var u=e.baseQueue,d=i.pending;if(d!==null){if(u!==null){var b=u.next;u.next=d.next,d.next=b}t.baseQueue=u=d,i.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var z=b=null,Z=null,ce=t,pe=!1;do{var ve=ce.lane&-536870913;if(ve!==ce.lane?(Ye&ve)===ve:(Pn&ve)===ve){var de=ce.revertLane;if(de===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),ve===xr&&(pe=!0);else if((Pn&de)===de){ce=ce.next,de===xr&&(pe=!0);continue}else ve={lane:0,revertLane:ce.revertLane,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Z===null?(z=Z=ve,b=d):Z=Z.next=ve,Le.lanes|=de,ja|=de;ve=ce.action,Ka&&n(d,ve),d=ce.hasEagerState?ce.eagerState:n(d,ve)}else de={lane:ve,revertLane:ce.revertLane,gesture:ce.gesture,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Z===null?(z=Z=de,b=d):Z=Z.next=de,Le.lanes|=ve,ja|=ve;ce=ce.next}while(ce!==null&&ce!==t);if(Z===null?b=d:Z.next=z,!on(d,e.memoizedState)&&(kt=!0,pe&&(n=Sr,n!==null)))throw n;e.memoizedState=d,e.baseState=b,e.baseQueue=Z,i.lastRenderedState=d}return u===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function cu(e){var t=Ot(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,u=n.pending,d=t.memoizedState;if(u!==null){n.pending=null;var b=u=u.next;do d=e(d,b.action),b=b.next;while(b!==u);on(d,t.memoizedState)||(kt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),n.lastRenderedState=d}return[d,i]}function Gf(e,t,n){var i=Le,u=Ot(),d=Ze;if(d){if(n===void 0)throw Error(o(407));n=n()}else n=t();var b=!on((rt||u).memoizedState,n);if(b&&(u.memoizedState=n,kt=!0),u=u.queue,hu(Yf.bind(null,i,u,e),[e]),u.getSnapshot!==t||b||Rt!==null&&Rt.memoizedState.tag&1){if(i.flags|=2048,Tr(9,{destroy:void 0},Vf.bind(null,i,u,n,t),null),st===null)throw Error(o(349));d||(Pn&127)!==0||If(i,t,n)}return n}function If(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Le.updateQueue,t===null?(t=Xl(),Le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vf(e,t,n,i){t.value=n,t.getSnapshot=i,Ff(t)&&Pf(e)}function Yf(e,t,n){return n(function(){Ff(t)&&Pf(e)})}function Ff(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!on(e,n)}catch{return!0}}function Pf(e){var t=Ga(e,2);t!==null&&ln(t,e,2)}function du(e){var t=Qt();if(typeof e=="function"){var n=e;if(e=n(),Ka){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},t}function Zf(e,t,n,i){return e.baseState=n,uu(e,rt,typeof i=="function"?i:Zn)}function Py(e,t,n,i,u){if(es(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};V.T!==null?n(!0):d.isTransition=!1,i(d),n=t.pending,n===null?(d.next=t.pending=d,Xf(t,d)):(d.next=n.next,t.pending=n.next=d)}}function Xf(e,t){var n=t.action,i=t.payload,u=e.state;if(t.isTransition){var d=V.T,b={};V.T=b;try{var z=n(u,i),Z=V.S;Z!==null&&Z(b,z),Qf(e,t,z)}catch(ce){fu(e,t,ce)}finally{d!==null&&b.types!==null&&(d.types=b.types),V.T=d}}else try{d=n(u,i),Qf(e,t,d)}catch(ce){fu(e,t,ce)}}function Qf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){Kf(e,t,i)},function(i){return fu(e,t,i)}):Kf(e,t,n)}function Kf(e,t,n){t.status="fulfilled",t.value=n,Jf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xf(e,n)))}function fu(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,Jf(t),t=t.next;while(t!==i)}e.action=null}function Jf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wf(e,t){return t}function eh(e,t){if(Ze){var n=st.formState;if(n!==null){e:{var i=Le;if(Ze){if(ct){t:{for(var u=ct,d=jn;u.nodeType!==8;){if(!d){u=null;break t}if(u=_n(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){ct=_n(u.nextSibling),i=u.data==="F!";break e}}ha(i)}i=!1}i&&(t=n[0])}}return n=Qt(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wf,lastRenderedState:t},n.queue=i,n=bh.bind(null,Le,i),i.dispatch=n,i=du(!1),d=yu.bind(null,Le,!1,i.queue),i=Qt(),u={state:t,dispatch:null,action:e,pending:null},i.queue=u,n=Py.bind(null,Le,u,d,n),u.dispatch=n,i.memoizedState=e,[t,n,!1]}function th(e){var t=Ot();return nh(t,rt,e)}function nh(e,t,n){if(t=uu(e,t,Wf)[0],e=Kl(Zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Si(t)}catch(b){throw b===jr?ql:b}else i=t;t=Ot();var u=t.queue,d=u.dispatch;return n!==t.memoizedState&&(Le.flags|=2048,Tr(9,{destroy:void 0},Zy.bind(null,u,n),null)),[i,d,e]}function Zy(e,t){e.action=t}function ah(e){var t=Ot(),n=rt;if(n!==null)return nh(t,n,e);Ot(),t=t.memoizedState,n=Ot();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Tr(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=Le.updateQueue,t===null&&(t=Xl(),Le.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function rh(){return Ot().memoizedState}function Jl(e,t,n,i){var u=Qt();Le.flags|=e,u.memoizedState=Tr(1|t,{destroy:void 0},n,i===void 0?null:i)}function Wl(e,t,n,i){var u=Ot();i=i===void 0?null:i;var d=u.memoizedState.inst;rt!==null&&i!==null&&au(i,rt.memoizedState.deps)?u.memoizedState=Tr(t,d,n,i):(Le.flags|=e,u.memoizedState=Tr(1|t,d,n,i))}function ih(e,t){Jl(8390656,8,e,t)}function hu(e,t){Wl(2048,8,e,t)}function Xy(e){Le.flags|=4;var t=Le.updateQueue;if(t===null)t=Xl(),Le.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function lh(e){var t=Ot().memoizedState;return Xy({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function sh(e,t){return Wl(4,2,e,t)}function oh(e,t){return Wl(4,4,e,t)}function uh(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ch(e,t,n){n=n!=null?n.concat([e]):null,Wl(4,4,uh.bind(null,t,e),n)}function pu(){}function dh(e,t){var n=Ot();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&au(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function fh(e,t){var n=Ot();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&au(t,i[1]))return i[0];if(i=e(),Ka){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[i,t],i}function mu(e,t,n){return n===void 0||(Pn&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=hp(),Le.lanes|=e,ja|=e,n)}function hh(e,t,n,i){return on(n,t)?n:_r.current!==null?(e=mu(e,n,i),on(e,t)||(kt=!0),e):(Pn&42)===0||(Pn&1073741824)!==0&&(Ye&261930)===0?(kt=!0,e.memoizedState=n):(e=hp(),Le.lanes|=e,ja|=e,t)}function ph(e,t,n,i,u){var d=P.p;P.p=d!==0&&8>d?d:8;var b=V.T,z={};V.T=z,yu(e,!1,t,n);try{var Z=u(),ce=V.S;if(ce!==null&&ce(z,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var pe=Vy(Z,i);ji(e,t,pe,pn(e))}else ji(e,t,i,pn(e))}catch(ve){ji(e,t,{then:function(){},status:"rejected",reason:ve},pn())}finally{P.p=d,b!==null&&z.types!==null&&(b.types=z.types),V.T=b}}function Qy(){}function gu(e,t,n,i){if(e.tag!==5)throw Error(o(476));var u=mh(e).queue;ph(e,u,t,Q,n===null?Qy:function(){return gh(e),n(i)})}function mh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:Q},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function gh(e){var t=mh(e);t.next===null&&(t=e.alternate.memoizedState),ji(e,t.next.queue,{},pn())}function vu(){return Vt($i)}function vh(){return Ot().memoizedState}function yh(){return Ot().memoizedState}function Ky(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pn();e=ga(n);var i=va(t,e,n);i!==null&&(ln(i,t,n),vi(i,t,n)),t={cache:Fo()},e.payload=t;return}t=t.return}}function Jy(e,t,n){var i=pn();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},es(e)?xh(t,n):(n=Uo(e,t,n,i),n!==null&&(ln(n,e,i),Sh(n,t,i)))}function bh(e,t,n){var i=pn();ji(e,t,n,i)}function ji(e,t,n,i){var u={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(es(e))xh(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var b=t.lastRenderedState,z=d(b,n);if(u.hasEagerState=!0,u.eagerState=z,on(z,b))return zl(e,t,u,0),st===null&&Dl(),!1}catch{}if(n=Uo(e,t,u,i),n!==null)return ln(n,e,i),Sh(n,t,i),!0}return!1}function yu(e,t,n,i){if(i={lane:2,revertLane:Qu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},es(e)){if(t)throw Error(o(479))}else t=Uo(e,n,i,2),t!==null&&ln(t,e,2)}function es(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function xh(e,t){Nr=Pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sh(e,t,n){if((n&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Jr(e,n)}}var wi={readContext:Vt,use:Ql,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};wi.useEffectEvent=wt;var jh={readContext:Vt,use:Ql,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:ih,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Jl(4194308,4,uh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jl(4194308,4,e,t)},useInsertionEffect:function(e,t){Jl(4,2,e,t)},useMemo:function(e,t){var n=Qt();t=t===void 0?null:t;var i=e();if(Ka){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=Qt();if(n!==void 0){var u=n(t);if(Ka){Pe(!0);try{n(t)}finally{Pe(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=Jy.bind(null,Le,e),[i.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=du(e);var t=e.queue,n=bh.bind(null,Le,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:pu,useDeferredValue:function(e,t){var n=Qt();return mu(n,e,t)},useTransition:function(){var e=du(!1);return e=ph.bind(null,Le,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Le,u=Qt();if(Ze){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),st===null)throw Error(o(349));(Ye&127)!==0||If(i,t,n)}u.memoizedState=n;var d={value:n,getSnapshot:t};return u.queue=d,ih(Yf.bind(null,i,d,e),[e]),i.flags|=2048,Tr(9,{destroy:void 0},Vf.bind(null,i,d,n,t),null),n},useId:function(){var e=Qt(),t=st.identifierPrefix;if(Ze){var n=Un,i=zn;n=(i&~(1<<32-Me(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Zl++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Yy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vu,useFormState:eh,useActionState:eh,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=yu.bind(null,Le,!0,n),n.dispatch=t,[e,t]},useMemoCache:ou,useCacheRefresh:function(){return Qt().memoizedState=Ky.bind(null,Le)},useEffectEvent:function(e){var t=Qt(),n={impl:e};return t.memoizedState=n,function(){if((We&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},bu={readContext:Vt,use:Ql,useCallback:dh,useContext:Vt,useEffect:hu,useImperativeHandle:ch,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:fh,useReducer:Kl,useRef:rh,useState:function(){return Kl(Zn)},useDebugValue:pu,useDeferredValue:function(e,t){var n=Ot();return hh(n,rt.memoizedState,e,t)},useTransition:function(){var e=Kl(Zn)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Gf,useId:vh,useHostTransitionStatus:vu,useFormState:th,useActionState:th,useOptimistic:function(e,t){var n=Ot();return Zf(n,rt,e,t)},useMemoCache:ou,useCacheRefresh:yh};bu.useEffectEvent=lh;var wh={readContext:Vt,use:Ql,useCallback:dh,useContext:Vt,useEffect:hu,useImperativeHandle:ch,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:fh,useReducer:cu,useRef:rh,useState:function(){return cu(Zn)},useDebugValue:pu,useDeferredValue:function(e,t){var n=Ot();return rt===null?mu(n,e,t):hh(n,rt.memoizedState,e,t)},useTransition:function(){var e=cu(Zn)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Gf,useId:vh,useHostTransitionStatus:vu,useFormState:ah,useActionState:ah,useOptimistic:function(e,t){var n=Ot();return rt!==null?Zf(n,rt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ou,useCacheRefresh:yh};wh.useEffectEvent=lh;function xu(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:v({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Su={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=pn(),u=ga(i);u.payload=t,n!=null&&(u.callback=n),t=va(e,u,i),t!==null&&(ln(t,e,i),vi(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=pn(),u=ga(i);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=va(e,u,i),t!==null&&(ln(t,e,i),vi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pn(),i=ga(n);i.tag=2,t!=null&&(i.callback=t),t=va(e,i,n),t!==null&&(ln(t,e,n),vi(t,e,n))}};function _h(e,t,n,i,u,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,b):t.prototype&&t.prototype.isPureReactComponent?!ui(n,i)||!ui(u,d):!0}function Nh(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Su.enqueueReplaceState(t,t.state,null)}function Ja(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=v({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function Eh(e){kl(e)}function Th(e){console.error(e)}function Oh(e){kl(e)}function ts(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Ah(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function ju(e,t,n){return n=ga(n),n.tag=3,n.payload={element:null},n.callback=function(){ts(e,t)},n}function Ch(e){return e=ga(e),e.tag=3,e}function Rh(e,t,n,i){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var d=i.value;e.payload=function(){return u(d)},e.callback=function(){Ah(t,n,i)}}var b=n.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Ah(t,n,i),typeof u!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var z=i.stack;this.componentDidCatch(i.value,{componentStack:z!==null?z:""})})}function Wy(e,t,n,i,u){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&br(t,n,u,!0),n=cn.current,n!==null){switch(n.tag){case 31:case 13:return wn===null?hs():n.alternate===null&&_t===0&&(_t=3),n.flags&=-257,n.flags|=65536,n.lanes=u,i===Gl?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),Pu(e,i,u)),!1;case 22:return n.flags|=65536,i===Gl?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),Pu(e,i,u)),!1}throw Error(o(435,n.tag))}return Pu(e,i,u),hs(),!1}if(Ze)return t=cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==qo&&(e=Error(o(422),{cause:i}),fi(bn(e,n)))):(i!==qo&&(t=Error(o(423),{cause:i}),fi(bn(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=bn(i,n),u=ju(e.stateNode,i,u),Jo(e,u),_t!==4&&(_t=2)),!1;var d=Error(o(520),{cause:i});if(d=bn(d,n),Ri===null?Ri=[d]:Ri.push(d),_t!==4&&(_t=2),t===null)return!0;i=bn(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=ju(n.stateNode,i,e),Jo(n,e),!1;case 1:if(t=n.type,d=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(wa===null||!wa.has(d))))return n.flags|=65536,u&=-u,n.lanes|=u,u=Ch(u),Rh(u,e,n,i),Jo(n,u),!1}n=n.return}while(n!==null);return!1}var wu=Error(o(461)),kt=!1;function Yt(e,t,n,i){t.child=e===null?Uf(t,null,n,i):Qa(t,e.child,n,i)}function kh(e,t,n,i,u){n=n.render;var d=t.ref;if("ref"in i){var b={};for(var z in i)z!=="ref"&&(b[z]=i[z])}else b=i;return Fa(t),i=ru(e,t,n,b,d,u),z=iu(),e!==null&&!kt?(lu(e,t,u),Xn(e,t,u)):(Ze&&z&&$o(t),t.flags|=1,Yt(e,t,i,u),t.child)}function Dh(e,t,n,i,u){if(e===null){var d=n.type;return typeof d=="function"&&!Mo(d)&&d.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=d,zh(e,t,d,i,u)):(e=Ml(n.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ru(e,u)){var b=d.memoizedProps;if(n=n.compare,n=n!==null?n:ui,n(b,i)&&e.ref===t.ref)return Xn(e,t,u)}return t.flags|=1,e=In(d,i),e.ref=t.ref,e.return=t,t.child=e}function zh(e,t,n,i,u){if(e!==null){var d=e.memoizedProps;if(ui(d,i)&&e.ref===t.ref)if(kt=!1,t.pendingProps=i=d,Ru(e,u))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,Xn(e,t,u)}return _u(e,t,n,i,u)}function Uh(e,t,n,i){var u=i.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|n:n,e!==null){for(i=t.child=e.child,u=0;i!==null;)u=u|i.lanes|i.childLanes,i=i.sibling;i=u&~d}else i=0,t.child=null;return Mh(e,t,d,n,i)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hl(t,d!==null?d.cachePool:null),d!==null?Bf(t,d):eu(),$f(t);else return i=t.lanes=536870912,Mh(e,t,d!==null?d.baseLanes|n:n,n,i)}else d!==null?(Hl(t,d.cachePool),Bf(t,d),ba(),t.memoizedState=null):(e!==null&&Hl(t,null),eu(),ba());return Yt(e,t,u,n),t.child}function _i(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mh(e,t,n,i,u){var d=Zo();return d=d===null?null:{parent:Ct._currentValue,pool:d},t.memoizedState={baseLanes:n,cachePool:d},e!==null&&Hl(t,null),eu(),$f(t),e!==null&&br(e,t,i,!0),t.childLanes=u,null}function ns(e,t){return t=rs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lh(e,t,n){return Qa(t,e.child,null,n),e=ns(t,t.pendingProps),e.flags|=2,dn(t),t.memoizedState=null,e}function eb(e,t,n){var i=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ze){if(i.mode==="hidden")return e=ns(t,i),t.lanes=536870912,_i(null,e);if(nu(t),(e=ct)?(e=Xp(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:zn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},n=xf(e),n.return=t,t.child=n,It=t,ct=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return ns(t,i)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(nu(t),u)if(t.flags&256)t.flags&=-257,t=Lh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(kt||br(e,t,n,!1),u=(n&e.childLanes)!==0,kt||u){if(i=st,i!==null&&(b=Wr(i,n),b!==0&&b!==d.retryLane))throw d.retryLane=b,Ga(e,b),ln(i,e,b),wu;hs(),t=Lh(e,t,n)}else e=d.treeContext,ct=_n(b.nextSibling),It=t,Ze=!0,fa=null,jn=!1,e!==null&&wf(t,e),t=ns(t,i),t.flags|=4096;return t}return e=In(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function as(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _u(e,t,n,i,u){return Fa(t),n=ru(e,t,n,i,void 0,u),i=iu(),e!==null&&!kt?(lu(e,t,u),Xn(e,t,u)):(Ze&&i&&$o(t),t.flags|=1,Yt(e,t,n,u),t.child)}function Bh(e,t,n,i,u,d){return Fa(t),t.updateQueue=null,n=qf(t,i,n,u),Hf(e),i=iu(),e!==null&&!kt?(lu(e,t,d),Xn(e,t,d)):(Ze&&i&&$o(t),t.flags|=1,Yt(e,t,n,d),t.child)}function $h(e,t,n,i,u){if(Fa(t),t.stateNode===null){var d=mr,b=n.contextType;typeof b=="object"&&b!==null&&(d=Vt(b)),d=new n(i,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Su,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=i,d.state=t.memoizedState,d.refs={},Qo(t),b=n.contextType,d.context=typeof b=="object"&&b!==null?Vt(b):mr,d.state=t.memoizedState,b=n.getDerivedStateFromProps,typeof b=="function"&&(xu(t,n,b,i),d.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&Su.enqueueReplaceState(d,d.state,null),bi(t,i,d,u),yi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){d=t.stateNode;var z=t.memoizedProps,Z=Ja(n,z);d.props=Z;var ce=d.context,pe=n.contextType;b=mr,typeof pe=="object"&&pe!==null&&(b=Vt(pe));var ve=n.getDerivedStateFromProps;pe=typeof ve=="function"||typeof d.getSnapshotBeforeUpdate=="function",z=t.pendingProps!==z,pe||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(z||ce!==b)&&Nh(t,d,i,b),ma=!1;var de=t.memoizedState;d.state=de,bi(t,i,d,u),yi(),ce=t.memoizedState,z||de!==ce||ma?(typeof ve=="function"&&(xu(t,n,ve,i),ce=t.memoizedState),(Z=ma||_h(t,n,Z,i,de,ce,b))?(pe||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=ce),d.props=i,d.state=ce,d.context=b,i=Z):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{d=t.stateNode,Ko(e,t),b=t.memoizedProps,pe=Ja(n,b),d.props=pe,ve=t.pendingProps,de=d.context,ce=n.contextType,Z=mr,typeof ce=="object"&&ce!==null&&(Z=Vt(ce)),z=n.getDerivedStateFromProps,(ce=typeof z=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==ve||de!==Z)&&Nh(t,d,i,Z),ma=!1,de=t.memoizedState,d.state=de,bi(t,i,d,u),yi();var fe=t.memoizedState;b!==ve||de!==fe||ma||e!==null&&e.dependencies!==null&&Bl(e.dependencies)?(typeof z=="function"&&(xu(t,n,z,i),fe=t.memoizedState),(pe=ma||_h(t,n,pe,i,de,fe,Z)||e!==null&&e.dependencies!==null&&Bl(e.dependencies))?(ce||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(i,fe,Z),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(i,fe,Z)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=fe),d.props=i,d.state=fe,d.context=Z,i=pe):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),i=!1)}return d=i,as(e,t),i=(t.flags&128)!==0,d||i?(d=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&i?(t.child=Qa(t,e.child,null,u),t.child=Qa(t,null,n,u)):Yt(e,t,n,u),t.memoizedState=d.state,e=t.child):e=Xn(e,t,u),e}function Hh(e,t,n,i){return Va(),t.flags|=256,Yt(e,t,n,i),t.child}var Nu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Eu(e){return{baseLanes:e,cachePool:Af()}}function Tu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=hn),e}function qh(e,t,n){var i=t.pendingProps,u=!1,d=(t.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),b&&(u=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ze){if(u?ya(t):ba(),(e=ct)?(e=Xp(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:zn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},n=xf(e),n.return=t,t.child=n,It=t,ct=null)):e=null,e===null)throw ha(t);return uc(e)?t.lanes=32:t.lanes=536870912,null}var z=i.children;return i=i.fallback,u?(ba(),u=t.mode,z=rs({mode:"hidden",children:z},u),i=Ia(i,u,n,null),z.return=t,i.return=t,z.sibling=i,t.child=z,i=t.child,i.memoizedState=Eu(n),i.childLanes=Tu(e,b,n),t.memoizedState=Nu,_i(null,i)):(ya(t),Ou(t,z))}var Z=e.memoizedState;if(Z!==null&&(z=Z.dehydrated,z!==null)){if(d)t.flags&256?(ya(t),t.flags&=-257,t=Au(e,t,n)):t.memoizedState!==null?(ba(),t.child=e.child,t.flags|=128,t=null):(ba(),z=i.fallback,u=t.mode,i=rs({mode:"visible",children:i.children},u),z=Ia(z,u,n,null),z.flags|=2,i.return=t,z.return=t,i.sibling=z,t.child=i,Qa(t,e.child,null,n),i=t.child,i.memoizedState=Eu(n),i.childLanes=Tu(e,b,n),t.memoizedState=Nu,t=_i(null,i));else if(ya(t),uc(z)){if(b=z.nextSibling&&z.nextSibling.dataset,b)var ce=b.dgst;b=ce,i=Error(o(419)),i.stack="",i.digest=b,fi({value:i,source:null,stack:null}),t=Au(e,t,n)}else if(kt||br(e,t,n,!1),b=(n&e.childLanes)!==0,kt||b){if(b=st,b!==null&&(i=Wr(b,n),i!==0&&i!==Z.retryLane))throw Z.retryLane=i,Ga(e,i),ln(b,e,i),wu;oc(z)||hs(),t=Au(e,t,n)}else oc(z)?(t.flags|=192,t.child=e.child,t=null):(e=Z.treeContext,ct=_n(z.nextSibling),It=t,Ze=!0,fa=null,jn=!1,e!==null&&wf(t,e),t=Ou(t,i.children),t.flags|=4096);return t}return u?(ba(),z=i.fallback,u=t.mode,Z=e.child,ce=Z.sibling,i=In(Z,{mode:"hidden",children:i.children}),i.subtreeFlags=Z.subtreeFlags&65011712,ce!==null?z=In(ce,z):(z=Ia(z,u,n,null),z.flags|=2),z.return=t,i.return=t,i.sibling=z,t.child=i,_i(null,i),i=t.child,z=e.child.memoizedState,z===null?z=Eu(n):(u=z.cachePool,u!==null?(Z=Ct._currentValue,u=u.parent!==Z?{parent:Z,pool:Z}:u):u=Af(),z={baseLanes:z.baseLanes|n,cachePool:u}),i.memoizedState=z,i.childLanes=Tu(e,b,n),t.memoizedState=Nu,_i(e.child,i)):(ya(t),n=e.child,e=n.sibling,n=In(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=n,t.memoizedState=null,n)}function Ou(e,t){return t=rs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rs(e,t){return e=un(22,e,null,t),e.lanes=0,e}function Au(e,t,n){return Qa(t,e.child,null,n),e=Ou(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gh(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Vo(e.return,t,n)}function Cu(e,t,n,i,u,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:u,treeForkCount:d}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=i,b.tail=n,b.tailMode=u,b.treeForkCount=d)}function Ih(e,t,n){var i=t.pendingProps,u=i.revealOrder,d=i.tail;i=i.children;var b=Tt.current,z=(b&2)!==0;if(z?(b=b&1|2,t.flags|=128):b&=1,$(Tt,b),Yt(e,t,i,n),i=Ze?di:0,!z&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gh(e,n,t);else if(e.tag===19)Gh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(n=t.child,u=null;n!==null;)e=n.alternate,e!==null&&Fl(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),Cu(t,!1,u,n,d,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Fl(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}Cu(t,!0,n,null,d,i);break;case"together":Cu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ja|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(br(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=In(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=In(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ru(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bl(e)))}function tb(e,t,n){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),pa(t,Ct,e.memoizedState.cache),Va();break;case 27:case 5:je(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,nu(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(ya(t),t.flags|=128,null):(n&t.child.childLanes)!==0?qh(e,t,n):(ya(t),e=Xn(e,t,n),e!==null?e.sibling:null);ya(t);break;case 19:var u=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(br(e,t,n,!1),i=(n&t.childLanes)!==0),u){if(i)return Ih(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),$(Tt,Tt.current),i)break;return null;case 22:return t.lanes=0,Uh(e,t,n,t.pendingProps);case 24:pa(t,Ct,e.memoizedState.cache)}return Xn(e,t,n)}function Vh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!Ru(e,n)&&(t.flags&128)===0)return kt=!1,tb(e,t,n);kt=(e.flags&131072)!==0}else kt=!1,Ze&&(t.flags&1048576)!==0&&jf(t,di,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Za(t.elementType),t.type=e,typeof e=="function")Mo(e)?(i=Ja(e,i),t.tag=1,t=$h(null,t,e,i,n)):(t.tag=0,t=_u(null,t,e,i,n));else{if(e!=null){var u=e.$$typeof;if(u===M){t.tag=11,t=kh(null,t,e,i,n);break e}else if(u===H){t.tag=14,t=Dh(null,t,e,i,n);break e}}throw t=E(e)||e,Error(o(306,t,""))}}return t;case 0:return _u(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,u=Ja(i,t.pendingProps),$h(e,t,i,u,n);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var d=t.memoizedState;u=d.element,Ko(e,t),bi(t,i,null,n);var b=t.memoizedState;if(i=b.cache,pa(t,Ct,i),i!==d.cache&&Yo(t,[Ct],n,!0),yi(),i=b.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Hh(e,t,i,n);break e}else if(i!==u){u=bn(Error(o(424)),t),fi(u),t=Hh(e,t,i,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ct=_n(e.firstChild),It=t,Ze=!0,fa=null,jn=!0,n=Uf(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Va(),i===u){t=Xn(e,t,n);break e}Yt(e,t,i,n)}t=t.child}return t;case 26:return as(e,t),e===null?(n=tm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ze||(n=t.type,e=t.pendingProps,i=xs(ye.current).createElement(n),i[Et]=t,i[Ht]=e,Ft(i,n,e),Ce(i),t.stateNode=i):t.memoizedState=tm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&Ze&&(i=t.stateNode=Jp(t.type,t.pendingProps,ye.current),It=t,jn=!0,u=ct,Ta(t.type)?(cc=u,ct=_n(i.firstChild)):ct=u),Yt(e,t,t.pendingProps.children,n),as(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ze&&((u=i=ct)&&(i=Rb(i,t.type,t.pendingProps,jn),i!==null?(t.stateNode=i,It=t,ct=_n(i.firstChild),jn=!1,u=!0):u=!1),u||ha(t)),je(t),u=t.type,d=t.pendingProps,b=e!==null?e.memoizedProps:null,i=d.children,ic(u,d)?i=null:b!==null&&ic(u,b)&&(t.flags|=32),t.memoizedState!==null&&(u=ru(e,t,Fy,null,null,n),$i._currentValue=u),as(e,t),Yt(e,t,i,n),t.child;case 6:return e===null&&Ze&&((e=n=ct)&&(n=kb(n,t.pendingProps,jn),n!==null?(t.stateNode=n,It=t,ct=null,e=!0):e=!1),e||ha(t)),null;case 13:return qh(e,t,n);case 4:return Ne(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Qa(t,null,i,n):Yt(e,t,i,n),t.child;case 11:return kh(e,t,t.type,t.pendingProps,n);case 7:return Yt(e,t,t.pendingProps,n),t.child;case 8:return Yt(e,t,t.pendingProps.children,n),t.child;case 12:return Yt(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,pa(t,t.type,i.value),Yt(e,t,i.children,n),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,Fa(t),u=Vt(u),i=i(u),t.flags|=1,Yt(e,t,i,n),t.child;case 14:return Dh(e,t,t.type,t.pendingProps,n);case 15:return zh(e,t,t.type,t.pendingProps,n);case 19:return Ih(e,t,n);case 31:return eb(e,t,n);case 22:return Uh(e,t,n,t.pendingProps);case 24:return Fa(t),i=Vt(Ct),e===null?(u=Zo(),u===null&&(u=st,d=Fo(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=n),u=d),t.memoizedState={parent:i,cache:u},Qo(t),pa(t,Ct,u)):((e.lanes&n)!==0&&(Ko(e,t),bi(t,null,null,n),yi()),u=e.memoizedState,d=t.memoizedState,u.parent!==i?(u={parent:i,cache:i},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),pa(t,Ct,i)):(i=d.cache,pa(t,Ct,i),i!==u.cache&&Yo(t,[Ct],n,!0))),Yt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Qn(e){e.flags|=4}function ku(e,t,n,i,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(vp())e.flags|=8192;else throw Xa=Gl,Xo}else e.flags&=-16777217}function Yh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!lm(t))if(vp())e.flags|=8192;else throw Xa=Gl,Xo}function is(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Dn():536870912,e.lanes|=t,Rr|=t)}function Ni(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var u=e.child;u!==null;)n|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)n|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function nb(e,t,n){var i=t.pendingProps;switch(Ho(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Fn(Ct),oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(yr(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Go())),dt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Qn(t),d!==null?(dt(t),Yh(t,d)):(dt(t),ku(t,u,null,i,n))):d?d!==e.memoizedState?(Qn(t),dt(t),Yh(t,d)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Qn(t),dt(t),ku(t,u,e,i,n)),null;case 27:if(Ee(t),n=ye.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Qn(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return dt(t),null}e=K.current,yr(t)?_f(t):(e=Jp(u,i,n),t.stateNode=e,Qn(t))}return dt(t),null;case 5:if(Ee(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Qn(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return dt(t),null}if(d=K.current,yr(t))_f(t);else{var b=xs(ye.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof i.is=="string"?b.createElement("select",{is:i.is}):b.createElement("select"),i.multiple?d.multiple=!0:i.size&&(d.size=i.size);break;default:d=typeof i.is=="string"?b.createElement(u,{is:i.is}):b.createElement(u)}}d[Et]=t,d[Ht]=i;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)d.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=d;e:switch(Ft(d,u,i),u){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Qn(t)}}return dt(t),ku(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Qn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=ye.current,yr(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,u=It,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||qp(e.nodeValue,n)),e||ha(t,!0)}else e=xs(e).createTextNode(i),e[Et]=t,t.stateNode=e}return dt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=yr(t),n!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Et]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else n=Go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(dn(t),t):(dn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return dt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=yr(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Et]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),u=!1}else u=Go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(dn(t),t):(dn(t),null)}return dn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==u&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),is(t,t.updateQueue),dt(t),null);case 4:return oe(),e===null&&ec(t.stateNode.containerInfo),dt(t),null;case 10:return Fn(t.type),dt(t),null;case 19:if(C(Tt),i=t.memoizedState,i===null)return dt(t),null;if(u=(t.flags&128)!==0,d=i.rendering,d===null)if(u)Ni(i,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Fl(e),d!==null){for(t.flags|=128,Ni(i,!1),e=d.updateQueue,t.updateQueue=e,is(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bf(n,e),n=n.sibling;return $(Tt,Tt.current&1|2),Ze&&Vn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&we()>cs&&(t.flags|=128,u=!0,Ni(i,!1),t.lanes=4194304)}else{if(!u)if(e=Fl(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,is(t,e),Ni(i,!0),i.tail===null&&i.tailMode==="hidden"&&!d.alternate&&!Ze)return dt(t),null}else 2*we()-i.renderingStartTime>cs&&n!==536870912&&(t.flags|=128,u=!0,Ni(i,!1),t.lanes=4194304);i.isBackwards?(d.sibling=t.child,t.child=d):(e=i.last,e!==null?e.sibling=d:t.child=d,i.last=d)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=we(),e.sibling=null,n=Tt.current,$(Tt,u?n&1|2:n&1),Ze&&Vn(t,i.treeForkCount),e):(dt(t),null);case 22:case 23:return dn(t),tu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),n=t.updateQueue,n!==null&&is(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&C(Pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Fn(Ct),dt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function ab(e,t){switch(Ho(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(Ct),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(dn(t),t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(Tt),null;case 4:return oe(),null;case 10:return Fn(t.type),null;case 22:case 23:return dn(t),tu(),e!==null&&C(Pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fn(Ct),null;case 25:return null;default:return null}}function Fh(e,t){switch(Ho(t),t.tag){case 3:Fn(Ct),oe();break;case 26:case 27:case 5:Ee(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&dn(t);break;case 13:dn(t);break;case 19:C(Tt);break;case 10:Fn(t.type);break;case 22:case 23:dn(t),tu(),e!==null&&C(Pa);break;case 24:Fn(Ct)}}function Ei(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&e)===e){i=void 0;var d=n.create,b=n.inst;i=d(),b.destroy=i}n=n.next}while(n!==u)}}catch(z){at(t,t.return,z)}}function xa(e,t,n){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var d=u.next;i=d;do{if((i.tag&e)===e){var b=i.inst,z=b.destroy;if(z!==void 0){b.destroy=void 0,u=t;var Z=n,ce=z;try{ce()}catch(pe){at(u,Z,pe)}}}i=i.next}while(i!==d)}}catch(pe){at(t,t.return,pe)}}function Ph(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Lf(t,n)}catch(i){at(e,e.return,i)}}}function Zh(e,t,n){n.props=Ja(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){at(e,t,i)}}function Ti(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(u){at(e,t,u)}}function Mn(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(u){at(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){at(e,t,u)}else n.current=null}function Xh(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(u){at(e,e.return,u)}}function Du(e,t,n){try{var i=e.stateNode;Nb(i,e.type,n,t),i[Ht]=t}catch(u){at(e,e.return,u)}}function Qh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ta(e.type)||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qh(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.tag===27&&Ta(e.type)||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 Uu(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qn));else if(i!==4&&(i===27&&Ta(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Uu(e,t,n),e=e.sibling;e!==null;)Uu(e,t,n),e=e.sibling}function ls(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Ta(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ls(e,t,n),e=e.sibling;e!==null;)ls(e,t,n),e=e.sibling}function Kh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ft(t,i,n),t[Et]=e,t[Ht]=n}catch(d){at(e,e.return,d)}}var Kn=!1,Dt=!1,Mu=!1,Jh=typeof WeakSet=="function"?WeakSet:Set,qt=null;function rb(e,t){if(e=e.containerInfo,ac=Ts,e=cf(e),Ao(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var u=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{n.nodeType,d.nodeType}catch{n=null;break e}var b=0,z=-1,Z=-1,ce=0,pe=0,ve=e,de=null;t:for(;;){for(var fe;ve!==n||u!==0&&ve.nodeType!==3||(z=b+u),ve!==d||i!==0&&ve.nodeType!==3||(Z=b+i),ve.nodeType===3&&(b+=ve.nodeValue.length),(fe=ve.firstChild)!==null;)de=ve,ve=fe;for(;;){if(ve===e)break t;if(de===n&&++ce===u&&(z=b),de===d&&++pe===i&&(Z=b),(fe=ve.nextSibling)!==null)break;ve=de,de=ve.parentNode}ve=fe}n=z===-1||Z===-1?null:{start:z,end:Z}}else n=null}n=n||{start:0,end:0}}else n=null;for(rc={focusedElem:e,selectionRange:n},Ts=!1,qt=t;qt!==null;)if(t=qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,qt=e;else for(;qt!==null;){switch(t=qt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)u=e[n],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,n=t,u=d.memoizedProps,d=d.memoizedState,i=n.stateNode;try{var Oe=Ja(n.type,u);e=i.getSnapshotBeforeUpdate(Oe,d),i.__reactInternalSnapshotBeforeUpdate=e}catch(ke){at(n,n.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)sc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":sc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,qt=e;break}qt=t.return}}function Wh(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(e,n),i&4&&Ei(5,n);break;case 1:if(Wn(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(b){at(n,n.return,b)}else{var u=Ja(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){at(n,n.return,b)}}i&64&&Ph(n),i&512&&Ti(n,n.return);break;case 3:if(Wn(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Lf(e,t)}catch(b){at(n,n.return,b)}}break;case 27:t===null&&i&4&&Kh(n);case 26:case 5:Wn(e,n),t===null&&i&4&&Xh(n),i&512&&Ti(n,n.return);break;case 12:Wn(e,n);break;case 31:Wn(e,n),i&4&&np(e,n);break;case 13:Wn(e,n),i&4&&ap(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=hb.bind(null,n),Db(e,n))));break;case 22:if(i=n.memoizedState!==null||Kn,!i){t=t!==null&&t.memoizedState!==null||Dt,u=Kn;var d=Dt;Kn=i,(Dt=t)&&!d?ea(e,n,(n.subtreeFlags&8772)!==0):Wn(e,n),Kn=u,Dt=d}break;case 30:break;default:Wn(e,n)}}function ep(e){var t=e.alternate;t!==null&&(e.alternate=null,ep(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mt=null,tn=!1;function Jn(e,t,n){for(n=n.child;n!==null;)tp(e,t,n),n=n.sibling}function tp(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Xe,n)}catch{}switch(n.tag){case 26:Dt||Mn(n,t),Jn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Dt||Mn(n,t);var i=mt,u=tn;Ta(n.type)&&(mt=n.stateNode,tn=!1),Jn(e,t,n),Mi(n.stateNode),mt=i,tn=u;break;case 5:Dt||Mn(n,t);case 6:if(i=mt,u=tn,mt=null,Jn(e,t,n),mt=i,tn=u,mt!==null)if(tn)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(n.stateNode)}catch(d){at(n,t,d)}else try{mt.removeChild(n.stateNode)}catch(d){at(n,t,d)}break;case 18:mt!==null&&(tn?(e=mt,Pp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),$r(e)):Pp(mt,n.stateNode));break;case 4:i=mt,u=tn,mt=n.stateNode.containerInfo,tn=!0,Jn(e,t,n),mt=i,tn=u;break;case 0:case 11:case 14:case 15:xa(2,n,t),Dt||xa(4,n,t),Jn(e,t,n);break;case 1:Dt||(Mn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&Zh(n,t,i)),Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:Dt=(i=Dt)||n.memoizedState!==null,Jn(e,t,n),Dt=i;break;default:Jn(e,t,n)}}function np(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$r(e)}catch(n){at(t,t.return,n)}}}function ap(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$r(e)}catch(n){at(t,t.return,n)}}function ib(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jh),t;default:throw Error(o(435,e.tag))}}function ss(e,t){var n=ib(e);t.forEach(function(i){if(!n.has(i)){n.add(i);var u=pb.bind(null,e,i);i.then(u,u)}})}function nn(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var u=n[i],d=e,b=t,z=b;e:for(;z!==null;){switch(z.tag){case 27:if(Ta(z.type)){mt=z.stateNode,tn=!1;break e}break;case 5:mt=z.stateNode,tn=!1;break e;case 3:case 4:mt=z.stateNode.containerInfo,tn=!0;break e}z=z.return}if(mt===null)throw Error(o(160));tp(d,b,u),mt=null,tn=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rp(t,e),t=t.sibling}var An=null;function rp(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),an(e),i&4&&(xa(3,e,e.return),Ei(3,e),xa(5,e,e.return));break;case 1:nn(t,e),an(e),i&512&&(Dt||n===null||Mn(n,n.return)),i&64&&Kn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var u=An;if(nn(t,e),an(e),i&512&&(Dt||n===null||Mn(n,n.return)),i&4){var d=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":d=u.getElementsByTagName("title")[0],(!d||d[ia]||d[Et]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(i),u.head.insertBefore(d,u.querySelector("head > title"))),Ft(d,i,n),d[Et]=e,Ce(d),i=d;break e;case"link":var b=rm("link","href",u).get(i+(n.href||""));if(b){for(var z=0;z<b.length;z++)if(d=b[z],d.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&d.getAttribute("rel")===(n.rel==null?null:n.rel)&&d.getAttribute("title")===(n.title==null?null:n.title)&&d.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){b.splice(z,1);break t}}d=u.createElement(i),Ft(d,i,n),u.head.appendChild(d);break;case"meta":if(b=rm("meta","content",u).get(i+(n.content||""))){for(z=0;z<b.length;z++)if(d=b[z],d.getAttribute("content")===(n.content==null?null:""+n.content)&&d.getAttribute("name")===(n.name==null?null:n.name)&&d.getAttribute("property")===(n.property==null?null:n.property)&&d.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&d.getAttribute("charset")===(n.charSet==null?null:n.charSet)){b.splice(z,1);break t}}d=u.createElement(i),Ft(d,i,n),u.head.appendChild(d);break;default:throw Error(o(468,i))}d[Et]=e,Ce(d),i=d}e.stateNode=i}else im(u,e.type,e.stateNode);else e.stateNode=am(u,i,e.memoizedProps);else d!==i?(d===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):d.count--,i===null?im(u,e.type,e.stateNode):am(u,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Du(e,e.memoizedProps,n.memoizedProps)}break;case 27:nn(t,e),an(e),i&512&&(Dt||n===null||Mn(n,n.return)),n!==null&&i&4&&Du(e,e.memoizedProps,n.memoizedProps);break;case 5:if(nn(t,e),an(e),i&512&&(Dt||n===null||Mn(n,n.return)),e.flags&32){u=e.stateNode;try{or(u,"")}catch(Oe){at(e,e.return,Oe)}}i&4&&e.stateNode!=null&&(u=e.memoizedProps,Du(e,u,n!==null?n.memoizedProps:u)),i&1024&&(Mu=!0);break;case 6:if(nn(t,e),an(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(Oe){at(e,e.return,Oe)}}break;case 3:if(ws=null,u=An,An=Ss(t.containerInfo),nn(t,e),An=u,an(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{$r(t.containerInfo)}catch(Oe){at(e,e.return,Oe)}Mu&&(Mu=!1,ip(e));break;case 4:i=An,An=Ss(e.stateNode.containerInfo),nn(t,e),an(e),An=i;break;case 12:nn(t,e),an(e);break;case 31:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ss(e,i)));break;case 13:nn(t,e),an(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(us=we()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ss(e,i)));break;case 22:u=e.memoizedState!==null;var Z=n!==null&&n.memoizedState!==null,ce=Kn,pe=Dt;if(Kn=ce||u,Dt=pe||Z,nn(t,e),Dt=pe,Kn=ce,an(e),i&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||Z||Kn||Dt||Wa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){Z=n=t;try{if(d=Z.stateNode,u)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{z=Z.stateNode;var ve=Z.memoizedProps.style,de=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;z.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(Oe){at(Z,Z.return,Oe)}}}else if(t.tag===6){if(n===null){Z=t;try{Z.stateNode.nodeValue=u?"":Z.memoizedProps}catch(Oe){at(Z,Z.return,Oe)}}}else if(t.tag===18){if(n===null){Z=t;try{var fe=Z.stateNode;u?Zp(fe,!0):Zp(Z.stateNode,!1)}catch(Oe){at(Z,Z.return,Oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,ss(e,n))));break;case 19:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ss(e,i)));break;case 30:break;case 21:break;default:nn(t,e),an(e)}}function an(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(Qh(i)){n=i;break}i=i.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var u=n.stateNode,d=zu(e);ls(e,d,u);break;case 5:var b=n.stateNode;n.flags&32&&(or(b,""),n.flags&=-33);var z=zu(e);ls(e,z,b);break;case 3:case 4:var Z=n.stateNode.containerInfo,ce=zu(e);Uu(e,ce,Z);break;default:throw Error(o(161))}}catch(pe){at(e,e.return,pe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ip(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ip(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wh(e,t.alternate,t),t=t.sibling}function Wa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xa(4,t,t.return),Wa(t);break;case 1:Mn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Zh(t,t.return,n),Wa(t);break;case 27:Mi(t.stateNode);case 26:case 5:Mn(t,t.return),Wa(t);break;case 22:t.memoizedState===null&&Wa(t);break;case 30:Wa(t);break;default:Wa(t)}e=e.sibling}}function ea(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,u=e,d=t,b=d.flags;switch(d.tag){case 0:case 11:case 15:ea(u,d,n),Ei(4,d);break;case 1:if(ea(u,d,n),i=d,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(ce){at(i,i.return,ce)}if(i=d,u=i.updateQueue,u!==null){var z=i.stateNode;try{var Z=u.shared.hiddenCallbacks;if(Z!==null)for(u.shared.hiddenCallbacks=null,u=0;u<Z.length;u++)Mf(Z[u],z)}catch(ce){at(i,i.return,ce)}}n&&b&64&&Ph(d),Ti(d,d.return);break;case 27:Kh(d);case 26:case 5:ea(u,d,n),n&&i===null&&b&4&&Xh(d),Ti(d,d.return);break;case 12:ea(u,d,n);break;case 31:ea(u,d,n),n&&b&4&&np(u,d);break;case 13:ea(u,d,n),n&&b&4&&ap(u,d);break;case 22:d.memoizedState===null&&ea(u,d,n),Ti(d,d.return);break;case 30:break;default:ea(u,d,n)}t=t.sibling}}function Lu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&hi(n))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e))}function Cn(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lp(e,t,n,i),t=t.sibling}function lp(e,t,n,i){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Cn(e,t,n,i),u&2048&&Ei(9,t);break;case 1:Cn(e,t,n,i);break;case 3:Cn(e,t,n,i),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e)));break;case 12:if(u&2048){Cn(e,t,n,i),e=t.stateNode;try{var d=t.memoizedProps,b=d.id,z=d.onPostCommit;typeof z=="function"&&z(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Z){at(t,t.return,Z)}}else Cn(e,t,n,i);break;case 31:Cn(e,t,n,i);break;case 13:Cn(e,t,n,i);break;case 23:break;case 22:d=t.stateNode,b=t.alternate,t.memoizedState!==null?d._visibility&2?Cn(e,t,n,i):Oi(e,t):d._visibility&2?Cn(e,t,n,i):(d._visibility|=2,Or(e,t,n,i,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Lu(b,t);break;case 24:Cn(e,t,n,i),u&2048&&Bu(t.alternate,t);break;default:Cn(e,t,n,i)}}function Or(e,t,n,i,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,b=t,z=n,Z=i,ce=b.flags;switch(b.tag){case 0:case 11:case 15:Or(d,b,z,Z,u),Ei(8,b);break;case 23:break;case 22:var pe=b.stateNode;b.memoizedState!==null?pe._visibility&2?Or(d,b,z,Z,u):Oi(d,b):(pe._visibility|=2,Or(d,b,z,Z,u)),u&&ce&2048&&Lu(b.alternate,b);break;case 24:Or(d,b,z,Z,u),u&&ce&2048&&Bu(b.alternate,b);break;default:Or(d,b,z,Z,u)}t=t.sibling}}function Oi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,u=i.flags;switch(i.tag){case 22:Oi(n,i),u&2048&&Lu(i.alternate,i);break;case 24:Oi(n,i),u&2048&&Bu(i.alternate,i);break;default:Oi(n,i)}t=t.sibling}}var Ai=8192;function Ar(e,t,n){if(e.subtreeFlags&Ai)for(e=e.child;e!==null;)sp(e,t,n),e=e.sibling}function sp(e,t,n){switch(e.tag){case 26:Ar(e,t,n),e.flags&Ai&&e.memoizedState!==null&&Yb(n,An,e.memoizedState,e.memoizedProps);break;case 5:Ar(e,t,n);break;case 3:case 4:var i=An;An=Ss(e.stateNode.containerInfo),Ar(e,t,n),An=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Ai,Ai=16777216,Ar(e,t,n),Ai=i):Ar(e,t,n));break;default:Ar(e,t,n)}}function op(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ci(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];qt=i,cp(i,e)}op(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)up(e),e=e.sibling}function up(e){switch(e.tag){case 0:case 11:case 15:Ci(e),e.flags&2048&&xa(9,e,e.return);break;case 3:Ci(e);break;case 12:Ci(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,os(e)):Ci(e);break;default:Ci(e)}}function os(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];qt=i,cp(i,e)}op(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xa(8,t,t.return),os(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,os(t));break;default:os(t)}e=e.sibling}}function cp(e,t){for(;qt!==null;){var n=qt;switch(n.tag){case 0:case 11:case 15:xa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:hi(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,qt=i;else e:for(n=e;qt!==null;){i=qt;var u=i.sibling,d=i.return;if(ep(i),i===n){qt=null;break e}if(u!==null){u.return=d,qt=u;break e}qt=d}}}var lb={getCacheForType:function(e){var t=Vt(Ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Vt(Ct).controller.signal}},sb=typeof WeakMap=="function"?WeakMap:Map,We=0,st=null,Ie=null,Ye=0,nt=0,fn=null,Sa=!1,Cr=!1,$u=!1,ta=0,_t=0,ja=0,er=0,Hu=0,hn=0,Rr=0,Ri=null,rn=null,qu=!1,us=0,dp=0,cs=1/0,ds=null,wa=null,Mt=0,_a=null,kr=null,na=0,Gu=0,Iu=null,fp=null,ki=0,Vu=null;function pn(){return(We&2)!==0&&Ye!==0?Ye&-Ye:V.T!==null?Qu():vl()}function hp(){if(hn===0)if((Ye&536870912)===0||Ze){var e=St;St<<=1,(St&3932160)===0&&(St=262144),hn=e}else hn=536870912;return e=cn.current,e!==null&&(e.flags|=32),hn}function ln(e,t,n){(e===st&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Dr(e,0),Na(e,Ye,hn,!1)),Ut(e,n),((We&2)===0||e!==st)&&(e===st&&((We&2)===0&&(er|=n),_t===4&&Na(e,Ye,hn,!1)),Ln(e))}function pp(e,t,n){if((We&6)!==0)throw Error(o(327));var i=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$t(e,t),u=i?cb(e,t):Fu(e,t,!0),d=i;do{if(u===0){Cr&&!i&&Na(e,t,0,!1);break}else{if(n=e.current.alternate,d&&!ob(n)){u=Fu(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var z=e;u=Ri;var Z=z.current.memoizedState.isDehydrated;if(Z&&(Dr(z,b).flags|=256),b=Fu(z,b,!1),b!==2){if($u&&!Z){z.errorRecoveryDisabledLanes|=d,er|=d,u=4;break e}d=rn,rn=u,d!==null&&(rn===null?rn=d:rn.push.apply(rn,d))}u=b}if(d=!1,u!==2)continue}}if(u===1){Dr(e,0),Na(e,t,0,!0);break}e:{switch(i=e,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Na(i,t,hn,!Sa);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=us+300-we(),10<u)){if(Na(i,t,hn,!Sa),Gt(i,0,!0)!==0)break e;na=t,i.timeoutHandle=Yp(mp.bind(null,i,n,rn,ds,qu,t,hn,er,Rr,Sa,d,"Throttled",-0,0),u);break e}mp(i,n,rn,ds,qu,t,hn,er,Rr,Sa,d,null,-0,0)}}break}while(!0);Ln(e)}function mp(e,t,n,i,u,d,b,z,Z,ce,pe,ve,de,fe){if(e.timeoutHandle=-1,ve=t.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qn},sp(t,d,ve);var Oe=(d&62914560)===d?us-we():(d&4194048)===d?dp-we():0;if(Oe=Fb(ve,Oe),Oe!==null){na=d,e.cancelPendingCommit=Oe(wp.bind(null,e,t,d,n,i,u,b,z,Z,pe,ve,null,de,fe)),Na(e,d,b,!ce);return}}wp(e,t,d,n,i,u,b,z,Z)}function ob(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var u=n[i],d=u.getSnapshot;u=u.value;try{if(!on(d(),u))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Na(e,t,n,i){t&=~Hu,t&=~er,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var u=t;0<u;){var d=31-Me(u),b=1<<d;i[d]=-1,u&=~b}n!==0&&Ge(e,n,t)}function fs(){return(We&6)===0?(Di(0),!1):!0}function Yu(){if(Ie!==null){if(nt===0)var e=Ie.return;else e=Ie,Yn=Ya=null,su(e),wr=null,mi=0,e=Ie;for(;e!==null;)Fh(e.alternate,e),e=e.return;Ie=null}}function Dr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Ob(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),na=0,Yu(),st=e,Ie=n=In(e.current,null),Ye=t,nt=0,fn=null,Sa=!1,Cr=$t(e,t),$u=!1,Rr=hn=Hu=er=ja=_t=0,rn=Ri=null,qu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var u=31-Me(i),d=1<<u;t|=e[u],i&=~d}return ta=t,Dl(),n}function gp(e,t){Le=null,V.H=wi,t===jr||t===ql?(t=kf(),nt=3):t===Xo?(t=kf(),nt=4):nt=t===wu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fn=t,Ie===null&&(_t=1,ts(e,bn(t,e.current)))}function vp(){var e=cn.current;return e===null?!0:(Ye&4194048)===Ye?wn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===wn:!1}function yp(){var e=V.H;return V.H=wi,e===null?wi:e}function bp(){var e=V.A;return V.A=lb,e}function hs(){_t=4,Sa||(Ye&4194048)!==Ye&&cn.current!==null||(Cr=!0),(ja&134217727)===0&&(er&134217727)===0||st===null||Na(st,Ye,hn,!1)}function Fu(e,t,n){var i=We;We|=2;var u=yp(),d=bp();(st!==e||Ye!==t)&&(ds=null,Dr(e,t)),t=!1;var b=_t;e:do try{if(nt!==0&&Ie!==null){var z=Ie,Z=fn;switch(nt){case 8:Yu(),b=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(t=!0);var ce=nt;if(nt=0,fn=null,zr(e,z,Z,ce),n&&Cr){b=0;break e}break;default:ce=nt,nt=0,fn=null,zr(e,z,Z,ce)}}ub(),b=_t;break}catch(pe){gp(e,pe)}while(!0);return t&&e.shellSuspendCounter++,Yn=Ya=null,We=i,V.H=u,V.A=d,Ie===null&&(st=null,Ye=0,Dl()),b}function ub(){for(;Ie!==null;)xp(Ie)}function cb(e,t){var n=We;We|=2;var i=yp(),u=bp();st!==e||Ye!==t?(ds=null,cs=we()+500,Dr(e,t)):Cr=$t(e,t);e:do try{if(nt!==0&&Ie!==null){t=Ie;var d=fn;t:switch(nt){case 1:nt=0,fn=null,zr(e,t,d,1);break;case 2:case 9:if(Cf(d)){nt=0,fn=null,Sp(t);break}t=function(){nt!==2&&nt!==9||st!==e||(nt=7),Ln(e)},d.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:Cf(d)?(nt=0,fn=null,Sp(t)):(nt=0,fn=null,zr(e,t,d,7));break;case 5:var b=null;switch(Ie.tag){case 26:b=Ie.memoizedState;case 5:case 27:var z=Ie;if(b?lm(b):z.stateNode.complete){nt=0,fn=null;var Z=z.sibling;if(Z!==null)Ie=Z;else{var ce=z.return;ce!==null?(Ie=ce,ps(ce)):Ie=null}break t}}nt=0,fn=null,zr(e,t,d,5);break;case 6:nt=0,fn=null,zr(e,t,d,6);break;case 8:Yu(),_t=6;break e;default:throw Error(o(462))}}db();break}catch(pe){gp(e,pe)}while(!0);return Yn=Ya=null,V.H=i,V.A=u,We=n,Ie!==null?0:(st=null,Ye=0,Dl(),_t)}function db(){for(;Ie!==null&&!te();)xp(Ie)}function xp(e){var t=Vh(e.alternate,e,ta);e.memoizedProps=e.pendingProps,t===null?ps(e):Ie=t}function Sp(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Bh(n,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=Bh(n,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:su(t);default:Fh(n,t),t=Ie=bf(t,ta),t=Vh(n,t,ta)}e.memoizedProps=e.pendingProps,t===null?ps(e):Ie=t}function zr(e,t,n,i){Yn=Ya=null,su(t),wr=null,mi=0;var u=t.return;try{if(Wy(e,u,t,n,Ye)){_t=1,ts(e,bn(n,e.current)),Ie=null;return}}catch(d){if(u!==null)throw Ie=u,d;_t=1,ts(e,bn(n,e.current)),Ie=null;return}t.flags&32768?(Ze||i===1?e=!0:Cr||(Ye&536870912)!==0?e=!1:(Sa=e=!0,(i===2||i===9||i===3||i===6)&&(i=cn.current,i!==null&&i.tag===13&&(i.flags|=16384))),jp(t,e)):ps(t)}function ps(e){var t=e;do{if((t.flags&32768)!==0){jp(t,Sa);return}e=t.return;var n=nb(t.alternate,t,ta);if(n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);_t===0&&(_t=5)}function jp(e,t){do{var n=ab(e.alternate,e);if(n!==null){n.flags&=32767,Ie=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ie=e;return}Ie=e=n}while(e!==null);_t=6,Ie=null}function wp(e,t,n,i,u,d,b,z,Z){e.cancelPendingCommit=null;do ms();while(Mt!==0);if((We&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=zo,ze(e,n,d,b,z,Z),e===st&&(Ie=st=null,Ye=0),kr=t,_a=e,na=n,Gu=d,Iu=u,fp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mb(De,function(){return Op(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null,u=P.p,P.p=2,b=We,We|=4;try{rb(e,t,n)}finally{We=b,P.p=u,V.T=i}}Mt=1,_p(),Np(),Ep()}}function _p(){if(Mt===1){Mt=0;var e=_a,t=kr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=V.T,V.T=null;var i=P.p;P.p=2;var u=We;We|=4;try{rp(t,e);var d=rc,b=cf(e.containerInfo),z=d.focusedElem,Z=d.selectionRange;if(b!==z&&z&&z.ownerDocument&&uf(z.ownerDocument.documentElement,z)){if(Z!==null&&Ao(z)){var ce=Z.start,pe=Z.end;if(pe===void 0&&(pe=ce),"selectionStart"in z)z.selectionStart=ce,z.selectionEnd=Math.min(pe,z.value.length);else{var ve=z.ownerDocument||document,de=ve&&ve.defaultView||window;if(de.getSelection){var fe=de.getSelection(),Oe=z.textContent.length,ke=Math.min(Z.start,Oe),lt=Z.end===void 0?ke:Math.min(Z.end,Oe);!fe.extend&&ke>lt&&(b=lt,lt=ke,ke=b);var le=of(z,ke),ee=of(z,lt);if(le&&ee&&(fe.rangeCount!==1||fe.anchorNode!==le.node||fe.anchorOffset!==le.offset||fe.focusNode!==ee.node||fe.focusOffset!==ee.offset)){var ue=ve.createRange();ue.setStart(le.node,le.offset),fe.removeAllRanges(),ke>lt?(fe.addRange(ue),fe.extend(ee.node,ee.offset)):(ue.setEnd(ee.node,ee.offset),fe.addRange(ue))}}}}for(ve=[],fe=z;fe=fe.parentNode;)fe.nodeType===1&&ve.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ve.length;z++){var me=ve[z];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}Ts=!!ac,rc=ac=null}finally{We=u,P.p=i,V.T=n}}e.current=t,Mt=2}}function Np(){if(Mt===2){Mt=0;var e=_a,t=kr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=V.T,V.T=null;var i=P.p;P.p=2;var u=We;We|=4;try{Wh(e,t.alternate,t)}finally{We=u,P.p=i,V.T=n}}Mt=3}}function Ep(){if(Mt===4||Mt===3){Mt=0,xe();var e=_a,t=kr,n=na,i=fp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,kr=_a=null,Tp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(wa=null),ei(n),t=t.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Xe,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=V.T,u=P.p,P.p=2,V.T=null;try{for(var d=e.onRecoverableError,b=0;b<i.length;b++){var z=i[b];d(z.value,{componentStack:z.stack})}}finally{V.T=t,P.p=u}}(na&3)!==0&&ms(),Ln(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===Vu?ki++:(ki=0,Vu=e):ki=0,Di(0)}}function Tp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hi(t)))}function ms(){return _p(),Np(),Ep(),Op()}function Op(){if(Mt!==5)return!1;var e=_a,t=Gu;Gu=0;var n=ei(na),i=V.T,u=P.p;try{P.p=32>n?32:n,V.T=null,n=Iu,Iu=null;var d=_a,b=na;if(Mt=0,kr=_a=null,na=0,(We&6)!==0)throw Error(o(331));var z=We;if(We|=4,up(d.current),lp(d,d.current,b,n),We=z,Di(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Xe,d)}catch{}return!0}finally{P.p=u,V.T=i,Tp(e,t)}}function Ap(e,t,n){t=bn(n,t),t=ju(e.stateNode,t,2),e=va(e,t,2),e!==null&&(Ut(e,2),Ln(e))}function at(e,t,n){if(e.tag===3)Ap(e,e,n);else for(;t!==null;){if(t.tag===3){Ap(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(wa===null||!wa.has(i))){e=bn(n,e),n=Ch(2),i=va(t,n,2),i!==null&&(Rh(n,i,t,e),Ut(i,2),Ln(i));break}}t=t.return}}function Pu(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new sb;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(n)||($u=!0,u.add(n),e=fb.bind(null,e,t,n),t.then(e,e))}function fb(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,st===e&&(Ye&n)===n&&(_t===4||_t===3&&(Ye&62914560)===Ye&&300>we()-us?(We&2)===0&&Dr(e,0):Hu|=n,Rr===Ye&&(Rr=0)),Ln(e)}function Cp(e,t){t===0&&(t=Dn()),e=Ga(e,t),e!==null&&(Ut(e,t),Ln(e))}function hb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Cp(e,n)}function pb(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),Cp(e,n)}function mb(e,t){return ge(e,t)}var gs=null,Ur=null,Zu=!1,vs=!1,Xu=!1,Ea=0;function Ln(e){e!==Ur&&e.next===null&&(Ur===null?gs=Ur=e:Ur=Ur.next=e),vs=!0,Zu||(Zu=!0,vb())}function Di(e,t){if(!Xu&&vs){Xu=!0;do for(var n=!1,i=gs;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var d=0;else{var b=i.suspendedLanes,z=i.pingedLanes;d=(1<<31-Me(42|e)+1)-1,d&=u&~(b&~z),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(n=!0,zp(i,d))}else d=Ye,d=Gt(i,i===st?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(d&3)===0||$t(i,d)||(n=!0,zp(i,d));i=i.next}while(n);Xu=!1}}function gb(){Rp()}function Rp(){vs=Zu=!1;var e=0;Ea!==0&&Tb()&&(e=Ea);for(var t=we(),n=null,i=gs;i!==null;){var u=i.next,d=kp(i,t);d===0?(i.next=null,n===null?gs=u:n.next=u,u===null&&(Ur=n)):(n=i,(e!==0||(d&3)!==0)&&(vs=!0)),i=u}Mt!==0&&Mt!==5||Di(e),Ea!==0&&(Ea=0)}function kp(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-Me(d),z=1<<b,Z=u[b];Z===-1?((z&n)===0||(z&i)!==0)&&(u[b]=pt(z,t)):Z<=t&&(e.expiredLanes|=z),d&=~z}if(t=st,n=Ye,n=Gt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&he(i),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||$t(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&he(i),ei(n)){case 2:case 8:n=qe;break;case 32:n=De;break;case 268435456:n=Nt;break;default:n=De}return i=Dp.bind(null,e),n=ge(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&he(i),e.callbackPriority=2,e.callbackNode=null,2}function Dp(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ms()&&e.callbackNode!==n)return null;var i=Ye;return i=Gt(e,e===st?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(pp(e,i,t),kp(e,we()),e.callbackNode!=null&&e.callbackNode===n?Dp.bind(null,e):null)}function zp(e,t){if(ms())return null;pp(e,t,!0)}function vb(){Ab(function(){(We&6)!==0?ge(Te,gb):Rp()})}function Qu(){if(Ea===0){var e=xr;e===0&&(e=et,et<<=1,(et&261888)===0&&(et=256)),Ea=e}return Ea}function Up(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Nl(""+e)}function Mp(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function yb(e,t,n,i,u){if(t==="submit"&&n&&n.stateNode===u){var d=Up((u[Ht]||null).action),b=i.submitter;b&&(t=(t=b[Ht]||null)?Up(t.formAction):b.getAttribute("formAction"),t!==null&&(d=t,b=null));var z=new Al("action","action",null,i,u);e.push({event:z,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Ea!==0){var Z=b?Mp(u,b):new FormData(u);gu(n,{pending:!0,data:Z,method:u.method,action:d},null,Z)}}else typeof d=="function"&&(z.preventDefault(),Z=b?Mp(u,b):new FormData(u),gu(n,{pending:!0,data:Z,method:u.method,action:d},d,Z))},currentTarget:u}]})}}for(var Ku=0;Ku<Do.length;Ku++){var Ju=Do[Ku],bb=Ju.toLowerCase(),xb=Ju[0].toUpperCase()+Ju.slice(1);On(bb,"on"+xb)}On(hf,"onAnimationEnd"),On(pf,"onAnimationIteration"),On(mf,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(My,"onTransitionRun"),On(Ly,"onTransitionStart"),On(By,"onTransitionCancel"),On(gf,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),jt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jt("onBeforeInput",["compositionend","keypress","textInput","paste"]),jt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="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(" "),Sb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zi));function Lp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],u=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var b=i.length-1;0<=b;b--){var z=i[b],Z=z.instance,ce=z.currentTarget;if(z=z.listener,Z!==d&&u.isPropagationStopped())break e;d=z,u.currentTarget=ce;try{d(u)}catch(pe){kl(pe)}u.currentTarget=null,d=Z}else for(b=0;b<i.length;b++){if(z=i[b],Z=z.instance,ce=z.currentTarget,z=z.listener,Z!==d&&u.isPropagationStopped())break e;d=z,u.currentTarget=ce;try{d(u)}catch(pe){kl(pe)}u.currentTarget=null,d=Z}}}}function Ve(e,t){var n=t[ti];n===void 0&&(n=t[ti]=new Set);var i=e+"__bubble";n.has(i)||(Bp(t,e,2,!1),n.add(i))}function Wu(e,t,n){var i=0;t&&(i|=4),Bp(n,e,i,t)}var ys="_reactListening"+Math.random().toString(36).slice(2);function ec(e){if(!e[ys]){e[ys]=!0,tt.forEach(function(n){n!=="selectionchange"&&(Sb.has(n)||Wu(n,!1,e),Wu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ys]||(t[ys]=!0,Wu("selectionchange",!1,t))}}function Bp(e,t,n,i){switch(hm(t)){case 2:var u=Xb;break;case 8:u=Qb;break;default:u=mc}n=u.bind(null,t,n,e),u=void 0,!xo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,n,{capture:!0,passive:u}):e.addEventListener(t,n,!0):u!==void 0?e.addEventListener(t,n,{passive:u}):e.addEventListener(t,n,!1)}function tc(e,t,n,i,u){var d=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var b=i.tag;if(b===3||b===4){var z=i.stateNode.containerInfo;if(z===u)break;if(b===4)for(b=i.return;b!==null;){var Z=b.tag;if((Z===3||Z===4)&&b.stateNode.containerInfo===u)return;b=b.return}for(;z!==null;){if(b=la(z),b===null)return;if(Z=b.tag,Z===5||Z===6||Z===26||Z===27){i=d=b;continue e}z=z.parentNode}}i=i.return}Gd(function(){var ce=d,pe=yo(n),ve=[];e:{var de=vf.get(e);if(de!==void 0){var fe=Al,Oe=e;switch(e){case"keypress":if(Tl(n)===0)break e;case"keydown":case"keyup":fe=py;break;case"focusin":Oe="focus",fe=_o;break;case"focusout":Oe="blur",fe=_o;break;case"beforeblur":case"afterblur":fe=_o;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=Yd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=ny;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=vy;break;case hf:case pf:case mf:fe=iy;break;case gf:fe=by;break;case"scroll":case"scrollend":fe=ey;break;case"wheel":fe=Sy;break;case"copy":case"cut":case"paste":fe=sy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=Pd;break;case"toggle":case"beforetoggle":fe=wy}var ke=(t&4)!==0,lt=!ke&&(e==="scroll"||e==="scrollend"),le=ke?de!==null?de+"Capture":null:de;ke=[];for(var ee=ce,ue;ee!==null;){var me=ee;if(ue=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ue===null||le===null||(me=ni(ee,le),me!=null&&ke.push(Ui(ee,me,ue))),lt)break;ee=ee.return}0<ke.length&&(de=new fe(de,Oe,null,n,pe),ve.push({event:de,listeners:ke}))}}if((t&7)===0){e:{if(de=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",de&&n!==vo&&(Oe=n.relatedTarget||n.fromElement)&&(la(Oe)||Oe[ra]))break e;if((fe||de)&&(de=pe.window===pe?pe:(de=pe.ownerDocument)?de.defaultView||de.parentWindow:window,fe?(Oe=n.relatedTarget||n.toElement,fe=ce,Oe=Oe?la(Oe):null,Oe!==null&&(lt=h(Oe),ke=Oe.tag,Oe!==lt||ke!==5&&ke!==27&&ke!==6)&&(Oe=null)):(fe=null,Oe=ce),fe!==Oe)){if(ke=Yd,me="onMouseLeave",le="onMouseEnter",ee="mouse",(e==="pointerout"||e==="pointerover")&&(ke=Pd,me="onPointerLeave",le="onPointerEnter",ee="pointer"),lt=fe==null?de:Ba(fe),ue=Oe==null?de:Ba(Oe),de=new ke(me,ee+"leave",fe,n,pe),de.target=lt,de.relatedTarget=ue,me=null,la(pe)===ce&&(ke=new ke(le,ee+"enter",Oe,n,pe),ke.target=ue,ke.relatedTarget=lt,me=ke),lt=me,fe&&Oe)t:{for(ke=jb,le=fe,ee=Oe,ue=0,me=le;me;me=ke(me))ue++;me=0;for(var Re=ee;Re;Re=ke(Re))me++;for(;0<ue-me;)le=ke(le),ue--;for(;0<me-ue;)ee=ke(ee),me--;for(;ue--;){if(le===ee||ee!==null&&le===ee.alternate){ke=le;break t}le=ke(le),ee=ke(ee)}ke=null}else ke=null;fe!==null&&$p(ve,de,fe,ke,!1),Oe!==null&&lt!==null&&$p(ve,lt,Oe,ke,!0)}}e:{if(de=ce?Ba(ce):window,fe=de.nodeName&&de.nodeName.toLowerCase(),fe==="select"||fe==="input"&&de.type==="file")var Qe=tf;else if(Wd(de))if(nf)Qe=Dy;else{Qe=Ry;var Ae=Cy}else fe=de.nodeName,!fe||fe.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ce&&go(ce.elementType)&&(Qe=tf):Qe=ky;if(Qe&&(Qe=Qe(e,ce))){ef(ve,Qe,n,pe);break e}Ae&&Ae(e,de,ce),e==="focusout"&&ce&&de.type==="number"&&ce.memoizedProps.value!=null&&mo(de,"number",de.value)}switch(Ae=ce?Ba(ce):window,e){case"focusin":(Wd(Ae)||Ae.contentEditable==="true")&&(fr=Ae,Co=ce,ci=null);break;case"focusout":ci=Co=fr=null;break;case"mousedown":Ro=!0;break;case"contextmenu":case"mouseup":case"dragend":Ro=!1,df(ve,n,pe);break;case"selectionchange":if(Uy)break;case"keydown":case"keyup":df(ve,n,pe)}var Be;if(Eo)e:{switch(e){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else dr?Kd(e,n)&&(Fe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Fe="onCompositionStart");Fe&&(Zd&&n.locale!=="ko"&&(dr||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&dr&&(Be=Id()):(ca=pe,So="value"in ca?ca.value:ca.textContent,dr=!0)),Ae=bs(ce,Fe),0<Ae.length&&(Fe=new Fd(Fe,e,null,n,pe),ve.push({event:Fe,listeners:Ae}),Be?Fe.data=Be:(Be=Jd(n),Be!==null&&(Fe.data=Be)))),(Be=Ny?Ey(e,n):Ty(e,n))&&(Fe=bs(ce,"onBeforeInput"),0<Fe.length&&(Ae=new Fd("onBeforeInput","beforeinput",null,n,pe),ve.push({event:Ae,listeners:Fe}),Ae.data=Be)),yb(ve,e,ce,n,pe)}Lp(ve,t)})}function Ui(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bs(e,t){for(var n=t+"Capture",i=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=ni(e,n),u!=null&&i.unshift(Ui(e,u,d)),u=ni(e,t),u!=null&&i.push(Ui(e,u,d))),e.tag===3)return i;e=e.return}return[]}function jb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $p(e,t,n,i,u){for(var d=t._reactName,b=[];n!==null&&n!==i;){var z=n,Z=z.alternate,ce=z.stateNode;if(z=z.tag,Z!==null&&Z===i)break;z!==5&&z!==26&&z!==27||ce===null||(Z=ce,u?(ce=ni(n,d),ce!=null&&b.unshift(Ui(n,ce,Z))):u||(ce=ni(n,d),ce!=null&&b.push(Ui(n,ce,Z)))),n=n.return}b.length!==0&&e.push({event:t,listeners:b})}var wb=/\r\n?/g,_b=/\u0000|\uFFFD/g;function Hp(e){return(typeof e=="string"?e:""+e).replace(wb,`
9
- `).replace(_b,"")}function qp(e,t){return t=Hp(t),Hp(e)===t}function it(e,t,n,i,u,d){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||or(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&or(e,""+i);break;case"className":ua(e,"class",i);break;case"tabIndex":ua(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ua(e,n,i);break;case"style":Hd(e,i,d);break;case"data":if(t!=="object"){ua(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Nl(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(n==="formAction"?(t!=="input"&&it(e,t,"name",u.name,u,null),it(e,t,"formEncType",u.formEncType,u,null),it(e,t,"formMethod",u.formMethod,u,null),it(e,t,"formTarget",u.formTarget,u,null)):(it(e,t,"encType",u.encType,u,null),it(e,t,"method",u.method,u,null),it(e,t,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Nl(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=qn);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(n=i.__html,n!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=Nl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":Ve("beforetoggle",e),Ve("toggle",e),gn(e,"popover",i);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":gn(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Jv.get(n)||n,gn(e,n,i))}}function nc(e,t,n,i,u,d){switch(n){case"style":Hd(e,i,d);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(n=i.__html,n!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"children":typeof i=="string"?or(e,i):(typeof i=="number"||typeof i=="bigint")&&or(e,""+i);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"onClick":i!=null&&(e.onclick=qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yt.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),t=n.slice(2,u?n.length-7:void 0),d=e[Ht]||null,d=d!=null?d[n]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof i=="function")){typeof d!="function"&&d!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,u);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):gn(e,n,i)}}}function Ft(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",e),Ve("load",e);var i=!1,u=!1,d;for(d in n)if(n.hasOwnProperty(d)){var b=n[d];if(b!=null)switch(d){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,d,b,n,null)}}u&&it(e,t,"srcSet",n.srcSet,n,null),i&&it(e,t,"src",n.src,n,null);return;case"input":Ve("invalid",e);var z=d=b=u=null,Z=null,ce=null;for(i in n)if(n.hasOwnProperty(i)){var pe=n[i];if(pe!=null)switch(i){case"name":u=pe;break;case"type":b=pe;break;case"checked":Z=pe;break;case"defaultChecked":ce=pe;break;case"value":d=pe;break;case"defaultValue":z=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,t));break;default:it(e,t,i,pe,n,null)}}Md(e,d,z,Z,ce,b,u,!1);return;case"select":Ve("invalid",e),i=b=d=null;for(u in n)if(n.hasOwnProperty(u)&&(z=n[u],z!=null))switch(u){case"value":d=z;break;case"defaultValue":b=z;break;case"multiple":i=z;default:it(e,t,u,z,n,null)}t=d,n=b,e.multiple=!!i,t!=null?sr(e,!!i,t,!1):n!=null&&sr(e,!!i,n,!0);return;case"textarea":Ve("invalid",e),d=u=i=null;for(b in n)if(n.hasOwnProperty(b)&&(z=n[b],z!=null))switch(b){case"value":i=z;break;case"defaultValue":u=z;break;case"children":d=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(91));break;default:it(e,t,b,z,n,null)}Bd(e,i,u,d);return;case"option":for(Z in n)n.hasOwnProperty(Z)&&(i=n[Z],i!=null)&&(Z==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":it(e,t,Z,i,n,null));return;case"dialog":Ve("beforetoggle",e),Ve("toggle",e),Ve("cancel",e),Ve("close",e);break;case"iframe":case"object":Ve("load",e);break;case"video":case"audio":for(i=0;i<zi.length;i++)Ve(zi[i],e);break;case"image":Ve("error",e),Ve("load",e);break;case"details":Ve("toggle",e);break;case"embed":case"source":case"link":Ve("error",e),Ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ce in n)if(n.hasOwnProperty(ce)&&(i=n[ce],i!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,ce,i,n,null)}return;default:if(go(t)){for(pe in n)n.hasOwnProperty(pe)&&(i=n[pe],i!==void 0&&nc(e,t,pe,i,n,void 0));return}}for(z in n)n.hasOwnProperty(z)&&(i=n[z],i!=null&&it(e,t,z,i,n,null))}function Nb(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,b=null,z=null,Z=null,ce=null,pe=null;for(fe in n){var ve=n[fe];if(n.hasOwnProperty(fe)&&ve!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Z=ve;default:i.hasOwnProperty(fe)||it(e,t,fe,null,i,ve)}}for(var de in i){var fe=i[de];if(ve=n[de],i.hasOwnProperty(de)&&(fe!=null||ve!=null))switch(de){case"type":d=fe;break;case"name":u=fe;break;case"checked":ce=fe;break;case"defaultChecked":pe=fe;break;case"value":b=fe;break;case"defaultValue":z=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:fe!==ve&&it(e,t,de,fe,i,ve)}}po(e,b,z,Z,ce,pe,d,u);return;case"select":fe=b=z=de=null;for(d in n)if(Z=n[d],n.hasOwnProperty(d)&&Z!=null)switch(d){case"value":break;case"multiple":fe=Z;default:i.hasOwnProperty(d)||it(e,t,d,null,i,Z)}for(u in i)if(d=i[u],Z=n[u],i.hasOwnProperty(u)&&(d!=null||Z!=null))switch(u){case"value":de=d;break;case"defaultValue":z=d;break;case"multiple":b=d;default:d!==Z&&it(e,t,u,d,i,Z)}t=z,n=b,i=fe,de!=null?sr(e,!!n,de,!1):!!i!=!!n&&(t!=null?sr(e,!!n,t,!0):sr(e,!!n,n?[]:"",!1));return;case"textarea":fe=de=null;for(z in n)if(u=n[z],n.hasOwnProperty(z)&&u!=null&&!i.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:it(e,t,z,null,i,u)}for(b in i)if(u=i[b],d=n[b],i.hasOwnProperty(b)&&(u!=null||d!=null))switch(b){case"value":de=u;break;case"defaultValue":fe=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&it(e,t,b,u,i,d)}Ld(e,de,fe);return;case"option":for(var Oe in n)de=n[Oe],n.hasOwnProperty(Oe)&&de!=null&&!i.hasOwnProperty(Oe)&&(Oe==="selected"?e.selected=!1:it(e,t,Oe,null,i,de));for(Z in i)de=i[Z],fe=n[Z],i.hasOwnProperty(Z)&&de!==fe&&(de!=null||fe!=null)&&(Z==="selected"?e.selected=de&&typeof de!="function"&&typeof de!="symbol":it(e,t,Z,de,i,fe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in n)de=n[ke],n.hasOwnProperty(ke)&&de!=null&&!i.hasOwnProperty(ke)&&it(e,t,ke,null,i,de);for(ce in i)if(de=i[ce],fe=n[ce],i.hasOwnProperty(ce)&&de!==fe&&(de!=null||fe!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:it(e,t,ce,de,i,fe)}return;default:if(go(t)){for(var lt in n)de=n[lt],n.hasOwnProperty(lt)&&de!==void 0&&!i.hasOwnProperty(lt)&&nc(e,t,lt,void 0,i,de);for(pe in i)de=i[pe],fe=n[pe],!i.hasOwnProperty(pe)||de===fe||de===void 0&&fe===void 0||nc(e,t,pe,de,i,fe);return}}for(var le in n)de=n[le],n.hasOwnProperty(le)&&de!=null&&!i.hasOwnProperty(le)&&it(e,t,le,null,i,de);for(ve in i)de=i[ve],fe=n[ve],!i.hasOwnProperty(ve)||de===fe||de==null&&fe==null||it(e,t,ve,de,i,fe)}function Gp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Eb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var u=n[i],d=u.transferSize,b=u.initiatorType,z=u.duration;if(d&&z&&Gp(b)){for(b=0,z=u.responseEnd,i+=1;i<n.length;i++){var Z=n[i],ce=Z.startTime;if(ce>z)break;var pe=Z.transferSize,ve=Z.initiatorType;pe&&Gp(ve)&&(Z=Z.responseEnd,b+=pe*(Z<z?1:(z-ce)/(Z-ce)))}if(--i,t+=8*(d+b)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ac=null,rc=null;function xs(e){return e.nodeType===9?e:e.ownerDocument}function Ip(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Vp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ic(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var lc=null;function Tb(){var e=window.event;return e&&e.type==="popstate"?e===lc?!1:(lc=e,!0):(lc=null,!1)}var Yp=typeof setTimeout=="function"?setTimeout:void 0,Ob=typeof clearTimeout=="function"?clearTimeout:void 0,Fp=typeof Promise=="function"?Promise:void 0,Ab=typeof queueMicrotask=="function"?queueMicrotask:typeof Fp<"u"?function(e){return Fp.resolve(null).then(e).catch(Cb)}:Yp;function Cb(e){setTimeout(function(){throw e})}function Ta(e){return e==="head"}function Pp(e,t){var n=t,i=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(i===0){e.removeChild(u),$r(t);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")Mi(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Mi(n);for(var d=n.firstChild;d;){var b=d.nextSibling,z=d.nodeName;d[ia]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&d.rel.toLowerCase()==="stylesheet"||n.removeChild(d),d=b}}else n==="body"&&Mi(e.ownerDocument.body);n=u}while(n);$r(t)}function Zp(e,t){var n=e;e=0;do{var i=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=i}while(n)}function sc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":sc(n),lr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Rb(e,t,n,i){for(;e.nodeType===1;){var u=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[ia])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function kb(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_n(e.nextSibling),e===null))return null;return e}function Xp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function oc(e){return e.data==="$?"||e.data==="$~"}function uc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Db(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function _n(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var cc=null;function Qp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return _n(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Kp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Jp(e,t,n){switch(t=xs(n),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lr(e)}var Nn=new Map,Wp=new Set;function Ss(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var aa=P.d;P.d={f:zb,r:Ub,D:Mb,C:Lb,L:Bb,m:$b,X:qb,S:Hb,M:Gb};function zb(){var e=aa.f(),t=fs();return e||t}function Ub(e){var t=sa(e);t!==null&&t.tag===5&&t.type==="form"?gh(t):aa.r(e)}var Mr=typeof document>"u"?null:document;function em(e,t,n){var i=Mr;if(i&&typeof t=="string"&&t){var u=vn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),Wp.has(u)||(Wp.add(u),e={rel:e,crossOrigin:n,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),Ft(t,"link",e),Ce(t),i.head.appendChild(t)))}}function Mb(e){aa.D(e),em("dns-prefetch",e,null)}function Lb(e,t){aa.C(e,t),em("preconnect",e,t)}function Bb(e,t,n){aa.L(e,t,n);var i=Mr;if(i&&e&&t){var u='link[rel="preload"][as="'+vn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+vn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+vn(n.imageSizes)+'"]')):u+='[href="'+vn(e)+'"]';var d=u;switch(t){case"style":d=Lr(e);break;case"script":d=Br(e)}Nn.has(d)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Nn.set(d,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(Li(d))||t==="script"&&i.querySelector(Bi(d))||(t=i.createElement("link"),Ft(t,"link",e),Ce(t),i.head.appendChild(t)))}}function $b(e,t){aa.m(e,t);var n=Mr;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+vn(i)+'"][href="'+vn(e)+'"]',d=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Br(e)}if(!Nn.has(d)&&(e=v({rel:"modulepreload",href:e},t),Nn.set(d,e),n.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Bi(d)))return}i=n.createElement("link"),Ft(i,"link",e),Ce(i),n.head.appendChild(i)}}}function Hb(e,t,n){aa.S(e,t,n);var i=Mr;if(i&&e){var u=Se(i).hoistableStyles,d=Lr(e);t=t||"default";var b=u.get(d);if(!b){var z={loading:0,preload:null};if(b=i.querySelector(Li(d)))z.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Nn.get(d))&&dc(e,n);var Z=b=i.createElement("link");Ce(Z),Ft(Z,"link",e),Z._p=new Promise(function(ce,pe){Z.onload=ce,Z.onerror=pe}),Z.addEventListener("load",function(){z.loading|=1}),Z.addEventListener("error",function(){z.loading|=2}),z.loading|=4,js(b,t,i)}b={type:"stylesheet",instance:b,count:1,state:z},u.set(d,b)}}}function qb(e,t){aa.X(e,t);var n=Mr;if(n&&e){var i=Se(n).hoistableScripts,u=Br(e),d=i.get(u);d||(d=n.querySelector(Bi(u)),d||(e=v({src:e,async:!0},t),(t=Nn.get(u))&&fc(e,t),d=n.createElement("script"),Ce(d),Ft(d,"link",e),n.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(u,d))}}function Gb(e,t){aa.M(e,t);var n=Mr;if(n&&e){var i=Se(n).hoistableScripts,u=Br(e),d=i.get(u);d||(d=n.querySelector(Bi(u)),d||(e=v({src:e,async:!0,type:"module"},t),(t=Nn.get(u))&&fc(e,t),d=n.createElement("script"),Ce(d),Ft(d,"link",e),n.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(u,d))}}function tm(e,t,n,i){var u=(u=ye.current)?Ss(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Lr(n.href),n=Se(u).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Lr(n.href);var d=Se(u).hoistableStyles,b=d.get(e);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=u.querySelector(Li(e)))&&!d._p&&(b.instance=d,b.state.loading=5),Nn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Nn.set(e,n),d||Ib(u,e,n,b.state))),t&&i===null)throw Error(o(528,""));return b}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Br(n),n=Se(u).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Lr(e){return'href="'+vn(e)+'"'}function Li(e){return'link[rel="stylesheet"]['+e+"]"}function nm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Ib(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ft(t,"link",n),Ce(t),e.head.appendChild(t))}function Br(e){return'[src="'+vn(e)+'"]'}function Bi(e){return"script[async]"+e}function am(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+vn(n.href)+'"]');if(i)return t.instance=i,Ce(i),i;var u=v({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ce(i),Ft(i,"style",u),js(i,n.precedence,e),t.instance=i;case"stylesheet":u=Lr(n.href);var d=e.querySelector(Li(u));if(d)return t.state.loading|=4,t.instance=d,Ce(d),d;i=nm(n),(u=Nn.get(u))&&dc(i,u),d=(e.ownerDocument||e).createElement("link"),Ce(d);var b=d;return b._p=new Promise(function(z,Z){b.onload=z,b.onerror=Z}),Ft(d,"link",i),t.state.loading|=4,js(d,n.precedence,e),t.instance=d;case"script":return d=Br(n.src),(u=e.querySelector(Bi(d)))?(t.instance=u,Ce(u),u):(i=n,(u=Nn.get(d))&&(i=v({},n),fc(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),Ce(u),Ft(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,js(i,n.precedence,e));return t.instance}function js(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,d=u,b=0;b<i.length;b++){var z=i[b];if(z.dataset.precedence===t)d=z;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function dc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ws=null;function rm(e,t,n){if(ws===null){var i=new Map,u=ws=new Map;u.set(n,i)}else u=ws,i=u.get(n),i||(i=new Map,u.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),u=0;u<n.length;u++){var d=n[u];if(!(d[ia]||d[Et]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(t)||"";b=e+b;var z=i.get(b);z?z.push(d):i.set(b,[d])}}return i}function im(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Vb(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function lm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Yb(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=Lr(i.href),d=t.querySelector(Li(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_s.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=d,Ce(d);return}d=t.ownerDocument||t,i=nm(i),(u=Nn.get(u))&&dc(i,u),d=d.createElement("link"),Ce(d);var b=d;b._p=new Promise(function(z,Z){b.onload=z,b.onerror=Z}),Ft(d,"link",i),n.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=_s.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var hc=0;function Fb(e,t){return e.stylesheets&&e.count===0&&Es(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&Es(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&hc===0&&(hc=62500*Eb());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Es(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>hc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(u)}}:null}function _s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Es(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ns=null;function Es(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ns=new Map,t.forEach(Pb,e),Ns=null,_s.call(e))}function Pb(e,t){if(!(t.state.loading&4)){var n=Ns.get(e);if(n)var i=n.get(null);else{n=new Map,Ns.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var b=u[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(n.set(b.dataset.precedence,b),i=b)}i&&n.set(null,i)}u=t.instance,b=u.getAttribute("data-precedence"),d=n.get(b)||i,d===i&&n.set(null,u),n.set(b,u),this.count++,i=_s.bind(this),u.addEventListener("load",i),u.addEventListener("error",i),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var $i={$$typeof:k,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function Zb(e,t,n,i,u,d,b,z,Z){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Hn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hn(0),this.hiddenUpdates=Hn(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function sm(e,t,n,i,u,d,b,z,Z,ce,pe,ve){return e=new Zb(e,t,n,b,Z,ce,pe,ve,z),t=1,d===!0&&(t|=24),d=un(3,null,null,t),e.current=d,d.stateNode=e,t=Fo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:i,isDehydrated:n,cache:t},Qo(d),e}function om(e){return e?(e=mr,e):mr}function um(e,t,n,i,u,d){u=om(u),i.context===null?i.context=u:i.pendingContext=u,i=ga(t),i.payload={element:n},d=d===void 0?null:d,d!==null&&(i.callback=d),n=va(e,i,t),n!==null&&(ln(n,e,t),vi(n,e,t))}function cm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pc(e,t){cm(e,t),(e=e.alternate)&&cm(e,t)}function dm(e){if(e.tag===13||e.tag===31){var t=Ga(e,67108864);t!==null&&ln(t,e,67108864),pc(e,67108864)}}function fm(e){if(e.tag===13||e.tag===31){var t=pn();t=La(t);var n=Ga(e,t);n!==null&&ln(n,e,t),pc(e,t)}}var Ts=!0;function Xb(e,t,n,i){var u=V.T;V.T=null;var d=P.p;try{P.p=2,mc(e,t,n,i)}finally{P.p=d,V.T=u}}function Qb(e,t,n,i){var u=V.T;V.T=null;var d=P.p;try{P.p=8,mc(e,t,n,i)}finally{P.p=d,V.T=u}}function mc(e,t,n,i){if(Ts){var u=gc(i);if(u===null)tc(e,t,i,Os,n),pm(e,i);else if(Jb(u,e,t,n,i))i.stopPropagation();else if(pm(e,i),t&4&&-1<Kb.indexOf(e)){for(;u!==null;){var d=sa(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=vt(d.pendingLanes);if(b!==0){var z=d;for(z.pendingLanes|=2,z.entangledLanes|=2;b;){var Z=1<<31-Me(b);z.entanglements[1]|=Z,b&=~Z}Ln(d),(We&6)===0&&(cs=we()+500,Di(0))}}break;case 31:case 13:z=Ga(d,2),z!==null&&ln(z,d,2),fs(),pc(d,2)}if(d=gc(i),d===null&&tc(e,t,i,Os,n),d===u)break;u=d}u!==null&&i.stopPropagation()}else tc(e,t,i,null,n)}}function gc(e){return e=yo(e),vc(e)}var Os=null;function vc(e){if(Os=null,e=la(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=f(t),e!==null)return e;e=null}else if(n===31){if(e=p(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Os=e,null}function hm(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(be()){case Te:return 2;case qe:return 8;case De:case ht:return 32;case Nt:return 268435456;default:return 32}default:return 32}}var yc=!1,Oa=null,Aa=null,Ca=null,Hi=new Map,qi=new Map,Ra=[],Kb="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".split(" ");function pm(e,t){switch(e){case"focusin":case"focusout":Oa=null;break;case"dragenter":case"dragleave":Aa=null;break;case"mouseover":case"mouseout":Ca=null;break;case"pointerover":case"pointerout":Hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function Gi(e,t,n,i,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:d,targetContainers:[u]},t!==null&&(t=sa(t),t!==null&&dm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Jb(e,t,n,i,u){switch(t){case"focusin":return Oa=Gi(Oa,e,t,n,i,u),!0;case"dragenter":return Aa=Gi(Aa,e,t,n,i,u),!0;case"mouseover":return Ca=Gi(Ca,e,t,n,i,u),!0;case"pointerover":var d=u.pointerId;return Hi.set(d,Gi(Hi.get(d)||null,e,t,n,i,u)),!0;case"gotpointercapture":return d=u.pointerId,qi.set(d,Gi(qi.get(d)||null,e,t,n,i,u)),!0}return!1}function mm(e){var t=la(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=f(n),t!==null){e.blockedOn=t,yl(e.priority,function(){fm(n)});return}}else if(t===31){if(t=p(n),t!==null){e.blockedOn=t,yl(e.priority,function(){fm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function As(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gc(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);vo=i,n.target.dispatchEvent(i),vo=null}else return t=sa(n),t!==null&&dm(t),e.blockedOn=n,!1;t.shift()}return!0}function gm(e,t,n){As(e)&&n.delete(t)}function Wb(){yc=!1,Oa!==null&&As(Oa)&&(Oa=null),Aa!==null&&As(Aa)&&(Aa=null),Ca!==null&&As(Ca)&&(Ca=null),Hi.forEach(gm),qi.forEach(gm)}function Cs(e,t){e.blockedOn===t&&(e.blockedOn=null,yc||(yc=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Wb)))}var Rs=null;function vm(e){Rs!==e&&(Rs=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Rs===e&&(Rs=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],u=e[t+2];if(typeof i!="function"){if(vc(i||n)===null)continue;break}var d=sa(n);d!==null&&(e.splice(t,3),t-=3,gu(d,{pending:!0,data:u,method:n.method,action:i},i,u))}}))}function $r(e){function t(Z){return Cs(Z,e)}Oa!==null&&Cs(Oa,e),Aa!==null&&Cs(Aa,e),Ca!==null&&Cs(Ca,e),Hi.forEach(t),qi.forEach(t);for(var n=0;n<Ra.length;n++){var i=Ra[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Ra.length&&(n=Ra[0],n.blockedOn===null);)mm(n),n.blockedOn===null&&Ra.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var u=n[i],d=n[i+1],b=u[Ht]||null;if(typeof d=="function")b||vm(n);else if(b){var z=null;if(d&&d.hasAttribute("formAction")){if(u=d,b=d[Ht]||null)z=b.formAction;else if(vc(u)!==null)continue}else z=b.action;typeof z=="function"?n[i+1]=z:(n.splice(i,3),i-=3),vm(n)}}}function ym(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return u=b})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function bc(e){this._internalRoot=e}ks.prototype.render=bc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current,i=pn();um(n,i,e,t,null,null)},ks.prototype.unmount=bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;um(e.current,2,null,e,null,null),fs(),t[ra]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=vl();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ra.length&&t!==0&&t<Ra[n].priority;n++);Ra.splice(n,0,e),n===0&&mm(e)}};var bm=l.version;if(bm!=="19.2.8")throw Error(o(527,bm,"19.2.8"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var ex={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ds.isDisabled&&Ds.supportsFiber)try{Xe=Ds.inject(ex),ut=Ds}catch{}}return Vi.createRoot=function(e,t){if(!c(e))throw Error(o(299));var n=!1,i="",u=Eh,d=Th,b=Oh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=sm(e,1,!1,null,null,n,i,null,u,d,b,ym),e[ra]=t.current,ec(e),new bc(t)},Vi.hydrateRoot=function(e,t,n){if(!c(e))throw Error(o(299));var i=!1,u="",d=Eh,b=Th,z=Oh,Z=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(z=n.onRecoverableError),n.formState!==void 0&&(Z=n.formState)),t=sm(e,1,!0,t,n??null,i,u,Z,d,b,z,ym),t.context=om(null),n=t.current,i=pn(),i=La(i),u=ga(i),u.callback=null,va(n,u,i),n=i,t.current.lanes=n,Ut(t,n),Ln(t),e[ra]=t.current,ec(e),new ks(t)},Vi.version="19.2.8",Vi}var Am;function cx(){if(Am)return jc.exports;Am=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),jc.exports=ux(),jc.exports}var dx=cx();const fx={en:{overview:"Overview",testCases:"Test Cases",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"New project",projects:"Projects",files:"Files",settings:"Project settings",localWorkspace:"Local workspace",storedHere:"Projects are stored on this device",activeTarget:"Active project target",savedProject:"Saved project",newWorkspace:"New local workspace",scoutWebsite:"Scout a website",targetUrl:"Target URL",startPath:"Start Path",scopePath:"Scope Path",maxPages:"Max pages",maxDepth:"Max depth",language:"Test Case Language",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"Limit exploration to a specific page or path.",startPathHelp:"The page path where exploration should begin, such as /admin/users.",scopePathHelp:"Keep exploration under this path, such as /admin.",startPathHint:"Where to continue exploring after login",scopePathHint:"Limits exploration to this section",explore:"Explore",currentPageOnly:"Current page only",thisSection:"This section",entireSite:"Entire site",targetedGuideTitle:"How to use Targeted Exploration",targetedGuideTargetUrl:"Enter the main URL of the system you want LazyScout to explore.",targetedGuideStartPath:"Enter the path where exploration should begin, such as",targetedGuideScopePath:"Set a boundary such as",targetedGuideScopePathEnd:"so the flow does not move to other areas.",targetedGuideCurrentPage:"explores one page",targetedGuideThisSection:"explores only the scope",targetedGuideEntireSite:"explores the whole website",targetedGuideExample:"Example: Target URL = your system, Start Path = /admin/users, Scope Path = /admin, choose This section.",search:"Search",addCase:"Add Test Case",screenshot:"Screenshot",delete:"Delete",export:"Export CSV",activeProjectTarget:"Active project target",currentProject:"Current project",scoutDescription:"Enter a URL and let Playwright discover pages, controls, forms and UI states automatically.",scouting:"Scouting…",optional:"optional",targetUrlHelp:"The main website URL that LazyScout should open and explore, such as https://example.com.",maxPagesHelp:"Maximum number of pages Scout will inspect. Higher values may take longer.",maxDepthHelp:"Link depth from the starting page. 0 means one page; 1 means pages linked from it.",testLanguageHelp:"Language used for generated Test Case titles and details.",maxPagesDescription:"Maximum number of pages to inspect",maxDepthDescription:"Link depth to follow from the target page",testLanguageDescription:"Language used for generated Test Case details",safetyNotice:"Playwright stays within the same origin and avoids actions that can change or delete data.",includeApiChecks:"Include API checks from XHR/fetch",waitAfterNavigation:"Wait after navigation",debugMode:"Debug mode",scoutAgain:"Scout again",regenerateProject:"Regenerate this project?",regenerateWarning:"Scout Site will replace the current discovered pages and generated Test Cases for this project.",regenerateHint:"Export any Test Cases you want to keep before confirming. Project Settings will remain unchanged.",cancel:"Cancel",expandScout:"Expand Scout form",collapseScout:"Collapse Scout form",help:"Help"},th:{overview:"ภาพรวม",testCases:"Test Case",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"โปรเจกต์ใหม่",projects:"โปรเจกต์",files:"ไฟล์",settings:"ตั้งค่าโปรเจกต์",localWorkspace:"พื้นที่ทำงานในเครื่อง",storedHere:"โปรเจกต์ถูกเก็บไว้ในอุปกรณ์นี้",activeTarget:"เว็บไซต์ของโปรเจกต์",savedProject:"บันทึกแล้ว",newWorkspace:"พื้นที่ทำงานใหม่",scoutWebsite:"สำรวจเว็บไซต์",targetUrl:"URL เป้าหมาย",startPath:"จุดเริ่มต้น (Path)",scopePath:"ขอบเขต (Path)",maxPages:"จำนวนหน้าสูงสุด",maxDepth:"ระดับความลึก",language:"ภาษาของ Test Case",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"กำหนดขอบเขตการสำรวจเฉพาะหน้า หรือเฉพาะ path ที่ต้องการ",startPathHelp:"หน้าเริ่มต้นภายในเว็บไซต์ เช่น /admin/users ใช้เมื่ออยากเริ่มจากหน้าลึก ๆ",scopePathHelp:"จำกัดการสำรวจให้อยู่ใต้ path นี้ เช่น /admin จะไม่ออกไปสำรวจส่วนอื่นของเว็บ",startPathHint:"หน้าที่ต้องการให้เริ่มสำรวจหลังเข้าสู่ระบบ",scopePathHint:"จำกัดการสำรวจให้อยู่ในส่วนนี้",explore:"ขอบเขตการสำรวจ",currentPageOnly:"สำรวจหน้าเดียว",thisSection:"สำรวจเฉพาะส่วนนี้",entireSite:"สำรวจทั้งเว็บไซต์",targetedGuideTitle:"วิธีใช้ Targeted Exploration",targetedGuideTargetUrl:"ใส่ URL หลักของระบบที่ต้องการให้ LazyScout สำรวจ",targetedGuideStartPath:"ใส่ path ที่ต้องการให้เริ่ม เช่น",targetedGuideScopePath:"ใส่ขอบเขต เช่น",targetedGuideScopePathEnd:"เพื่อไม่ให้ flow โยกไปหน้าอื่น",targetedGuideCurrentPage:"สำรวจเพียงหน้าเดียว",targetedGuideThisSection:"สำรวจเฉพาะ scope",targetedGuideEntireSite:"สำรวจทั้งเว็บไซต์",targetedGuideExample:"ตัวอย่าง: Target URL = ระบบของคุณ, Start Path = /admin/users, Scope Path = /admin, เลือก This section",search:"ค้นหา",addCase:"เพิ่ม Test Case",screenshot:"Screenshot",delete:"ลบ",export:"Export CSV",activeProjectTarget:"เว็บไซต์เป้าหมายของโปรเจกต์",currentProject:"โปรเจกต์ปัจจุบัน",scoutDescription:"ใส่ URL แล้วให้ Playwright ค้นหาหน้า ปุ่ม ฟอร์ม และสถานะ UI โดยอัตโนมัติ",scouting:"กำลังสำรวจ…",optional:"ไม่บังคับ",targetUrlHelp:"URL หลักของเว็บไซต์ที่ต้องการให้ LazyScout เปิดและสำรวจ เช่น https://example.com",maxPagesHelp:"จำนวนหน้าสูงสุดที่ Scout จะสำรวจ ค่ายิ่งมากอาจใช้เวลานานขึ้น",maxDepthHelp:"ระดับความลึกของลิงก์จากหน้าเริ่มต้น 0 คือหน้าเดียว และ 1 คือหน้าที่ลิงก์จากหน้านั้น",testLanguageHelp:"ภาษาที่ใช้สร้างชื่อและรายละเอียดของ Test Case",maxPagesDescription:"จำนวนหน้าสูงสุดที่จะสำรวจ",maxDepthDescription:"ระดับความลึกของลิงก์จากหน้าเป้าหมาย",testLanguageDescription:"ภาษาที่ใช้สร้างรายละเอียด Test Case",safetyNotice:"Playwright จะอยู่ภายใน origin เดียวกัน และหลีกเลี่ยงการกระทำที่อาจเปลี่ยนแปลงหรือลบข้อมูล",includeApiChecks:"รวม API checks จาก XHR/fetch",waitAfterNavigation:"รอหลังเปลี่ยนหน้า",debugMode:"โหมด Debug",scoutAgain:"สำรวจอีกครั้ง",regenerateProject:"ต้องการสร้างข้อมูลของโปรเจกต์นี้ใหม่หรือไม่?",regenerateWarning:"Scout Site จะเขียนทับหน้าที่ค้นพบและ Test Case ที่สร้างไว้ของโปรเจกต์นี้",regenerateHint:"Export Test Case ที่ต้องการเก็บไว้ก่อนยืนยัน ส่วน Project Settings จะยังคงเดิม",cancel:"ยกเลิก",expandScout:"ขยายฟอร์ม Scout",collapseScout:"พับฟอร์ม Scout",help:"คำอธิบาย"}},Zg=F.createContext(null);function hx({children:a}){const[l,s]=F.useState(()=>localStorage.getItem("lazyscout-language")||"en");F.useEffect(()=>{localStorage.setItem("lazyscout-language",l),document.documentElement.lang=l},[l]);const o=F.useMemo(()=>({language:l,setLanguage:s,toggleLanguage:()=>s(c=>c==="en"?"th":"en"),t:c=>fx[l][c]}),[l]);return r.jsx(Zg.Provider,{value:o,children:a})}function io(){const a=F.useContext(Zg);if(!a)throw new Error("useLanguage must be used inside LanguageProvider");return a}const Xg="lazyscout-test-case-language";function px(){const a=localStorage.getItem(Xg);return a==="th"||a==="en"?a:"en"}function tr({text:a}){const{t:l}=io(),[s,o]=F.useState(!1);return r.jsxs("span",{className:`help-tip ${s?"is-open":""}`,children:[r.jsx("button",{type:"button","aria-label":l("help"),"aria-expanded":s,title:a,onClick:c=>{c.preventDefault(),c.stopPropagation(),o(h=>!h)},children:"?"}),r.jsx("span",{className:"help-tip-popover",role:"tooltip",children:a})]})}function mx({loading:a,initialUrl:l="",hasExistingData:s=!1,initialLanguage:o,onLanguageChange:c,onAnalyze:h}){const{t:f}=io(),[p,m]=F.useState(l),[g,w]=F.useState(20),[v,x]=F.useState(3),[y,A]=F.useState(o??px),[N,j]=F.useState(!1),[T,O]=F.useState(750),[k,M]=F.useState(""),[R,B]=F.useState(""),[H,ae]=F.useState("site"),[W,ne]=F.useState(!1),[se,q]=F.useState(!1),[G,E]=F.useState(!1),X=(()=>{try{return new URL(l).hostname}catch{return"Current project"}})();function V(Q){if(Q.preventDefault(),!(!p.trim()||a)){if(s){E(!0);return}P()}}function P(){const Q=Math.min(100,Math.max(1,g===""?20:g)),D=Math.min(10,Math.max(0,v===""?3:v));h(p.trim(),Q,D,y,N,T,k.trim()||void 0,R.trim()||void 0,H,W),E(!1)}return r.jsxs("form",{onSubmit:V,className:l?"project-scout-card":"new-project-card",children:[l&&r.jsxs("div",{className:"project-target-heading",children:[r.jsx("span",{className:"target-glow",children:"◎"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("activeProjectTarget")}),r.jsx("h2",{children:X}),r.jsx("span",{children:l})]}),r.jsxs("span",{className:"target-status",children:[r.jsx("i",{})," ",f("savedProject")]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${se?"is-collapsed":""}`,onClick:()=>q(Q=>!Q),"aria-label":f(se?"expandScout":"collapseScout"),title:f(se?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),!l&&r.jsxs("div",{className:"new-project-hero",children:[r.jsx("span",{className:"scout-orbit",children:"✦"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("localWorkspace")}),r.jsx("h2",{children:f("scoutWebsite")}),r.jsx("p",{children:f("scoutDescription")})]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${se?"is-collapsed":""}`,onClick:()=>q(Q=>!Q),"aria-label":f(se?"expandScout":"collapseScout"),title:f(se?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),r.jsxs("div",{className:`scout-form-body ${se?"is-collapsed":""}`,children:[r.jsxs("div",{className:"scout-form-grid",children:[r.jsxs("div",{className:"scout-url-field",children:[r.jsxs("label",{className:"field-label",htmlFor:"target-url",children:[f("targetUrl"),r.jsx(tr,{text:f("targetUrlHelp")})]}),r.jsx("input",{id:"target-url",className:"field",value:p,onChange:Q=>m(Q.target.value),placeholder:"https://example.com",autoComplete:"off",disabled:a})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-pages",children:[f("maxPages"),r.jsx(tr,{text:f("maxPagesHelp")})]}),r.jsx("input",{id:"max-pages",className:"field",type:"number",min:1,max:100,value:g,onChange:Q=>w(Q.target.value===""?"":Math.min(100,Math.max(1,Number(Q.target.value)))),disabled:a})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-depth",children:[f("maxDepth"),r.jsx(tr,{text:f("maxDepthHelp")})]}),r.jsx("input",{id:"max-depth",className:"field",type:"number",min:0,max:10,value:v,onChange:Q=>x(Q.target.value===""?"":Math.min(10,Math.max(0,Number(Q.target.value)))),disabled:a})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"test-language",children:[f("language"),r.jsx(tr,{text:f("testLanguageHelp")})]}),r.jsxs("select",{id:"test-language",className:"field",value:y,onChange:Q=>{const D=Q.target.value;A(D),localStorage.setItem(Xg,D),c?.(D)},disabled:a,children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsx("button",{type:"submit",className:"btn btn-primary scout-submit",disabled:a||!p.trim(),children:f(a?"scouting":"scoutSite")})]}),!l&&r.jsxs("div",{className:"scout-options-help",children:[r.jsxs("span",{children:[r.jsx("b",{children:f("maxPages")})," ",f("maxPagesDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("maxDepth")})," ",f("maxDepthDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("language")})," ",f("testLanguageDescription")]})]}),r.jsx("p",{className:"mt-3 text-xs text-slate-500",children:f("safetyNotice")}),r.jsxs("div",{className:"mt-3 border-t border-slate-100 pt-3",children:[r.jsxs("p",{className:"text-xs font-semibold text-slate-700 mb-2",children:[f("targetedExploration")," ",r.jsx(tr,{text:f("targetedExplorationHelp")})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"start-path",children:[f("startPath"),r.jsx(tr,{text:f("startPathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"start-path",className:"field text-sm",value:k,onChange:Q=>M(Q.target.value),placeholder:"/admin/users",autoComplete:"off",disabled:a}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("startPathHint")})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"scope-path",children:[f("scopePath"),r.jsx(tr,{text:f("scopePathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"scope-path",className:"field text-sm",value:R,onChange:Q=>B(Q.target.value),placeholder:"/admin",autoComplete:"off",disabled:a}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("scopePathHint")})]})]}),r.jsxs("div",{className:"mt-3",children:[r.jsx("label",{className:"field-label text-xs",children:f("explore")}),r.jsxs("div",{className:"flex gap-4 mt-1",children:[r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"current-page",checked:H==="current-page",onChange:()=>ae("current-page"),disabled:a}),f("currentPageOnly")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"scope",checked:H==="scope",onChange:()=>ae("scope"),disabled:a}),f("thisSection")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"site",checked:H==="site",onChange:()=>ae("site"),disabled:a}),f("entireSite")]})]})]})]}),r.jsxs("details",{className:"scout-guide",children:[r.jsx("summary",{children:f("targetedGuideTitle")}),r.jsxs("div",{className:"scout-guide-body",children:[r.jsx("img",{src:"/lazyscout-icon-v2.png",alt:"LazyScout"}),r.jsxs("div",{children:[r.jsxs("p",{children:[r.jsx("b",{children:f("targetUrl")})," ",f("targetedGuideTargetUrl")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("startPath")})," ",f("targetedGuideStartPath")," ",r.jsx("code",{children:"/admin/users"})]}),r.jsxs("p",{children:[r.jsx("b",{children:f("scopePath")})," ",f("targetedGuideScopePath")," ",r.jsx("code",{children:"/admin"})," ",f("targetedGuideScopePathEnd")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("currentPageOnly")})," ",f("targetedGuideCurrentPage")," · ",r.jsx("b",{children:f("thisSection")})," ",f("targetedGuideThisSection")," · ",r.jsx("b",{children:f("entireSite")})," ",f("targetedGuideEntireSite")]}),r.jsx("p",{className:"text-slate-500",children:f("targetedGuideExample")})]})]})]}),r.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-4 border-t border-slate-100 pt-3 text-xs text-slate-600",children:[r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:N,onChange:Q=>j(Q.target.checked),className:"h-4 w-4",disabled:a})," ",f("includeApiChecks")]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[f("waitAfterNavigation")," ",r.jsx("input",{className:"field w-24",type:"number",min:0,max:5e3,step:250,value:T,onChange:Q=>O(Q.target.value===""?0:Number(Q.target.value)),disabled:a})," ","ms"]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:W,onChange:Q=>ne(Q.target.checked),className:"h-4 w-4",disabled:a})," ",f("debugMode")]})]})]}),G&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal scout-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"scout-confirm-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("scoutAgain")}),r.jsx("h2",{id:"scout-confirm-title",children:f("regenerateProject")})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>E(!1),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:f("regenerateWarning")}),r.jsx("p",{className:"text-sm text-slate-500",children:f("regenerateHint")})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>E(!1),children:f("cancel")}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:P,children:f("scoutSite")})]})]})})]})}function Ec({message:a,hint:l}){return r.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[r.jsx("p",{className:"text-sm font-semibold text-red-700",children:a}),l&&r.jsx("p",{className:"mt-1 text-sm text-red-600",children:l})]})}function gx({result:a,activeUrl:l,onSelect:s}){const[o,c]=F.useState(!1),h=a.pages.reduce((f,p)=>{const m=new URL(p.finalUrl).pathname||"/";return(f[m]??=[]).push(p),f},{});return r.jsxs("aside",{className:`workspace-panel workspace-tree ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsx("button",{type:"button",className:"tree-panel-toggle",onClick:()=>c(f=>!f),"aria-label":o?"ขยาย Explorer":"พับ Explorer",title:o?"ขยาย Explorer":"พับ Explorer",children:o?"›":"‹"}),r.jsxs("div",{className:"tree-panel-heading",children:[r.jsx("p",{className:"eyebrow",children:"Explorer"}),r.jsx("h2",{children:"State Tree"})]}),r.jsx("span",{className:"status-dot status-pass",title:"scan complete"})]}),!o&&r.jsxs("div",{className:"tree-meta",children:[r.jsxs("span",{children:[a.pages.length," pages"]}),r.jsxs("span",{children:[a.actionGraph.states.length," states"]})]}),!o&&r.jsx("div",{className:"tree-list",children:Object.entries(h).map(([f,p])=>r.jsxs("div",{className:"tree-branch",children:[r.jsxs("div",{className:"tree-path",children:[r.jsx("span",{className:"tree-chevron",children:"⌄"}),r.jsx("span",{className:"tree-folder",children:"●"}),f]}),p.map(m=>r.jsxs("button",{type:"button",onClick:()=>s(m.finalUrl),className:`tree-node ${l===m.finalUrl?"is-active":""}`,children:[r.jsx("span",{className:"tree-node-icon",children:m.state?.visibleDialogs.length?"◈":"◇"}),r.jsx("span",{className:"truncate",children:m.state?.visibleDialogs[0]??(m.title||"Untitled page")}),r.jsx("span",{className:"tree-node-count",children:m.buttons.length})]},m.state?.id??m.finalUrl))]},f))}),!o&&r.jsxs("div",{className:"tree-footer",children:[r.jsx("span",{className:"status-dot status-pass"})," Safe exploration only",r.jsx("br",{}),r.jsx("span",{className:"status-dot status-warn"})," Destructive actions blocked"]})]})}const Qg=["password","passwd","token","access_token","refresh_token","api_key","apikey","authorization","cookie","set-cookie","secret","client_secret","session","sessionid"];Qg.map(a=>a.replace("-","[-_]?").replace("_","[-_]?")).join("|");Qg.filter(a=>a!=="authorization").map(a=>a.replace("-","[-_]?").replace("_","[-_]?")).join("|");const Kg=["delete","remove","destroy","erase","drop","reset","purchase","buy","checkout","pay","payment","transfer","withdraw","refund","submit order","place order","confirm payment","confirm order","deactivate","disable account","delete account","close account","unsubscribe","cancel subscription","revoke access","reset database","ลบ","ชำระเงิน","จ่าย","โอน","ซื้อ","สั่งซื้อ","ยืนยันการชำระ"],vx=100,yx=80;function Jg(a){if(!Array.isArray(a))return[];const l=a.filter(s=>typeof s=="string").map(s=>s.trim().toLowerCase().slice(0,yx)).filter(Boolean);return[...new Set(l)].slice(0,vx)}function Hr(a){const l=a.name||a.label||a.text||a.placeholder;return l&&a.role?`${a.role} "${l}"`:l?`"${l}"`:a.cssSelector?`element (${a.cssSelector})`:"element"}function pl(a){if(a.description)return a.description;switch(a.type){case"navigate":return`Navigate to ${a.url}`;case"click":return`Click ${Hr(a.target)}`;case"fill":return`Enter "${a.value}" in ${Hr(a.target)}`;case"select":return`Select "${a.option}" from ${Hr(a.target)}`;case"check":return`${a.checked?"Check":"Uncheck"} ${Hr(a.target)}`;case"wait":return`Wait for ${a.mode}: ${a.value}`;case"assertVisible":return`Verify that ${Hr(a.target)} is visible`;case"assertText":return a.target?`Verify that ${Hr(a.target)} shows "${a.text}"`:`Verify that the page shows "${a.text}"`;case"assertUrl":return`Verify that the URL contains "${a.urlContains}"`;case"manual":return a.description}}function bx(a){return a.map((l,s)=>`${s+1}. ${pl(l)}`).join(`
10
- `)}function ud(a,l){return`TC-${a}-${String(l).padStart(3,"0")}`}function cd(a,l){return`TD-${a}-${String(l).padStart(3,"0")}`}function xx(a="MANUAL",l=cd("MANUAL",1),s=""){return{id:l,module:a,sourceUrl:s,field:"",inputType:"text",required:!1,validValue:"",invalidValue:""}}function Sx(a="MANUAL",l=ud("MANUAL",1),s=""){return{id:l,module:a,title:"New test case",preconditions:[],steps:[],expectedResult:"",type:"positive",priority:"medium",automationStatus:"manual",status:"pending",sourceUrl:s}}const jx={positive:"bg-emerald-100 text-emerald-800",negative:"bg-rose-100 text-rose-800",validation:"bg-amber-100 text-amber-800"},wx={high:"bg-red-100 text-red-800",medium:"bg-blue-100 text-blue-800",low:"bg-slate-100 text-slate-700"},_x={ready:"bg-emerald-100 text-emerald-800","needs-data":"bg-amber-100 text-amber-800","needs-review":"bg-orange-100 text-orange-800",manual:"bg-slate-200 text-slate-700"};function Nx({value:a}){return r.jsx("span",{className:`badge ${jx[a]}`,children:a})}function Ex({value:a}){return r.jsx("span",{className:`badge ${wx[a]}`,children:a})}function Tx({value:a}){return r.jsx("span",{className:`badge ${_x[a]}`,children:a})}function Ox({testCase:a,onEdit:l,onClose:s}){return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:o=>o.target===o.currentTarget&&s(),children:r.jsxs("section",{className:"modern-modal test-detail-modal",role:"dialog","aria-modal":"true","aria-labelledby":"test-case-detail-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test Case detail"}),r.jsx("h2",{id:"test-case-detail-title",children:a.id}),r.jsx("p",{children:a.title})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:s,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"test-detail-body",children:[r.jsxs("div",{className:"test-detail-meta",children:[r.jsx(Nx,{value:a.type}),r.jsx(Ex,{value:a.priority}),r.jsx(Tx,{value:a.automationStatus}),r.jsx("span",{className:"badge bg-slate-100 text-slate-600",children:a.folder??a.module})]}),(a.tags?.length||a.requirements?.length)&&r.jsxs("section",{className:"traceability-meta",children:[a.tags?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Tags"}),a.tags.map(o=>r.jsx("span",{className:"tag-chip",children:o},o))]}):null,a.requirements?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Requirements / Tickets"}),a.requirements.map(o=>r.jsx("span",{className:"requirement-chip",children:o},o))]}):null]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Preconditions"}),a.preconditions.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ul",{className:"list-inside list-disc space-y-1 text-sm text-slate-700",children:a.preconditions.map((o,c)=>r.jsx("li",{children:o},c))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Steps"}),a.steps.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ol",{className:"space-y-2 text-sm text-slate-700",children:a.steps.map((o,c)=>r.jsxs("li",{className:"test-detail-step",children:[r.jsx("span",{children:c+1}),r.jsxs("div",{children:[pl(o),r.jsxs("small",{children:["[",o.type,"]"]})]})]},c))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Expected Result"}),r.jsx("p",{className:"text-sm text-slate-700",children:a.expectedResult||"—"})]}),a.notes&&r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Notes from Generator"}),r.jsx("p",{className:"text-sm text-slate-500",children:a.notes})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Source URL"}),r.jsx("p",{className:"break-all text-xs text-slate-500",children:a.sourceUrl})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:l,children:"Edit Test Case"})]})]})})}function Ax({testCase:a,onSave:l,onCancel:s}){const[o,c]=F.useState({...a}),[h,f]=F.useState(a.preconditions.join(`
11
- `)),[p,m]=F.useState((a.tags??[]).join(", ")),[g,w]=F.useState((a.requirements??[]).join(", "));F.useEffect(()=>{function j(T){T.key==="Escape"&&s()}return document.addEventListener("keydown",j),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",j),document.body.style.overflow=""}},[s]);function v(j){c(T=>({...T,...j}))}function x(j,T){c(O=>({...O,steps:O.steps.map((k,M)=>M===j?{...k,description:T}:k)}))}function y(j){c(T=>({...T,steps:T.steps.filter((O,k)=>k!==j)}))}function A(){c(j=>({...j,steps:[...j.steps,{type:"manual",description:"New step"}]}))}function N(){l({...o,preconditions:h.split(`
12
- `).map(j=>j.trim()).filter(Boolean),tags:Cm(p),requirements:Cm(g)})}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:j=>j.target===j.currentTarget&&s(),children:r.jsxs("div",{className:"modern-modal test-case-editor-modal",children:[r.jsxs("div",{className:"card-title flex shrink-0 items-center justify-between",children:[r.jsxs("span",{children:["Edit ",o.id]}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:s,"aria-label":"Close editor",children:"✕"})]}),r.jsxs("div",{className:"test-case-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-module",children:"Module"}),r.jsx("input",{id:"edit-module",className:"field",value:o.module,onChange:j=>v({module:j.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-id",children:"TC ID"}),r.jsx("input",{id:"edit-id",className:"field font-mono",value:o.id,onChange:j=>v({id:j.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-folder",children:"Folder"}),r.jsx("input",{id:"edit-folder",className:"field",value:o.folder??o.module,onChange:j=>v({folder:j.target.value})})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-title",children:"Title"}),r.jsx("input",{id:"edit-title",className:"field",value:o.title,onChange:j=>v({title:j.target.value})})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-type",children:"Type"}),r.jsxs("select",{id:"edit-type",className:"field",value:o.type,onChange:j=>v({type:j.target.value}),children:[r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-priority",children:"Priority"}),r.jsxs("select",{id:"edit-priority",className:"field",value:o.priority,onChange:j=>v({priority:j.target.value}),children:[r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-automation",children:"Automation Status"}),r.jsxs("select",{id:"edit-automation",className:"field",value:o.automationStatus,onChange:j=>v({automationStatus:j.target.value}),children:[r.jsx("option",{value:"ready",children:"ready"}),r.jsx("option",{value:"needs-data",children:"needs-data"}),r.jsx("option",{value:"needs-review",children:"needs-review"}),r.jsx("option",{value:"manual",children:"manual"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-preconditions",children:"Preconditions (one per line)"}),r.jsx("textarea",{id:"edit-preconditions",className:"field h-20",value:h,onChange:j=>f(j.target.value)})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-tags",children:"Tags (comma separated)"}),r.jsx("input",{id:"edit-tags",className:"field",value:p,onChange:j=>m(j.target.value),placeholder:"smoke, regression, critical"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-requirements",children:"Requirements / Tickets"}),r.jsx("textarea",{id:"edit-requirements",className:"field min-h-10 resize-y leading-5",value:g,onChange:j=>w(j.target.value),placeholder:"JIRA-123, https://tracker.example/456",rows:2})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[r.jsx("span",{className:"field-label mb-0",children:"Steps"}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:A,children:"+ Add step"})]}),r.jsxs("div",{className:"space-y-2",children:[o.steps.map((j,T)=>r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsxs("span",{className:"w-5 text-xs text-slate-400",children:[T+1,"."]}),r.jsx("input",{className:"field min-w-0",value:pl(j),onChange:O=>x(T,O.target.value)}),r.jsx("span",{className:"w-24 shrink-0 font-mono text-xs text-slate-400",children:j.type}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>y(T),children:"Delete"})]},T)),o.steps.length===0&&r.jsx("p",{className:"text-sm text-slate-400",children:"No steps yet."})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-expected",children:"Expected Result"}),r.jsx("textarea",{id:"edit-expected",className:"field h-20",value:o.expectedResult,onChange:j=>v({expectedResult:j.target.value})})]})]}),r.jsxs("div",{className:"test-case-editor-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Save"})]})]})})}function Cm(a){return a.split(/[,;\n]/).map(l=>l.trim()).filter(Boolean)}function qr({value:a,editValue:l=a,options:s,multiline:o=!1,onSave:c}){const[h,f]=F.useState(!1),[p,m]=F.useState(l);if(F.useEffect(()=>{h||m(l)},[h,l]),!h)return r.jsx("span",{className:"inline-edit-value",title:"Double-click to edit",onDoubleClick:()=>f(!0),children:a||"—"});const g=()=>{f(!1),p!==l&&c(p)},w={autoFocus:!0,value:p,onChange:v=>m(v.target.value),onBlur:g,onKeyDown:v=>{v.key==="Enter"&&g(),v.key==="Escape"&&(m(l),f(!1))},onClick:v=>v.stopPropagation()};return o&&!s?r.jsx("textarea",{...w,className:"inline-edit-textarea",rows:5}):s?r.jsx("select",{...w,className:"inline-edit-input",children:s.map(v=>r.jsx("option",{children:v},v))}):r.jsx("input",{...w,className:"inline-edit-input"})}function Yi({value:a,onSave:l}){const[s,o]=F.useState(!1),[c,h]=F.useState(a),f=F.useRef(null),p=F.useRef(null);if(F.useEffect(()=>{s||h(a)},[s,a]),!s)return r.jsx("span",{className:"inline-edit-value",title:"Double-click to edit title",onDoubleClick:()=>o(!0),dangerouslySetInnerHTML:{__html:a||"—"}});const m=()=>{const x=window.getSelection();x?.rangeCount&&(f.current=x.getRangeAt(0).cloneRange())},g=()=>{const x=window.getSelection();f.current&&x&&(x.removeAllRanges(),x.addRange(f.current))},w=(x,y)=>{g(),document.execCommand(x,!1,y),p.current?.focus(),m()},v=x=>{h(x.innerHTML),o(!1),l(x.innerHTML)};return r.jsxs("div",{className:"rich-text-editor",onClick:x=>x.stopPropagation(),children:[r.jsxs("div",{className:"rich-text-toolbar",children:[r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>w("bold"),children:"B"}),r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>w("italic"),children:"I"}),r.jsx("input",{type:"color",defaultValue:"#1e293b",onMouseDown:()=>m(),onChange:x=>w("foreColor",x.target.value),"aria-label":"Text color"}),r.jsxs("select",{defaultValue:"3",onMouseDown:()=>m(),onChange:x=>w("fontSize",x.target.value),"aria-label":"Text size",children:[r.jsx("option",{value:"2",children:"Small"}),r.jsx("option",{value:"3",children:"Normal"}),r.jsx("option",{value:"5",children:"Large"}),r.jsx("option",{value:"7",children:"Huge"})]})]}),r.jsx("div",{className:"rich-text-content",ref:p,contentEditable:!0,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:{__html:c},onBlur:x=>{x.relatedTarget&&p.current?.parentElement?.contains(x.relatedTarget)||v(x.currentTarget)},onMouseUp:m,onKeyUp:m,onKeyDown:x=>{x.key==="Escape"&&(h(a),o(!1))}})]})}function Cx({testCases:a,selectedIds:l,activeId:s,onToggleSelect:o,onToggleAll:c,onOpen:h,onEdit:f,onDelete:p,onReorder:m,onUpdateCell:g,executionStatuses:w={}}){const[v,x]=F.useState(),[y,A]=F.useState(),[N,j]=F.useState(),[T,O]=F.useState({}),k=F.useRef(null),M=a.length>0&&a.every(R=>l.includes(R.id));return F.useEffect(()=>{function R(H){k.current&&!k.current.contains(H.target)&&j(void 0)}function B(H){H.key==="Escape"&&j(void 0)}return document.addEventListener("pointerdown",R),document.addEventListener("keydown",B),()=>{document.removeEventListener("pointerdown",R),document.removeEventListener("keydown",B)}},[]),a.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:"No Test Cases match the current filters."}):r.jsx("div",{className:"test-case-table-scroll border border-slate-200",children:r.jsxs("table",{className:"test-case-table border-collapse",style:{minWidth:"2200px",width:"max-content"},children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-10",children:"Move"}),r.jsx("th",{className:"table-head w-10",children:r.jsx("input",{type:"checkbox",checked:M,onChange:()=>c(M?[]:a.map(R=>R.id)),"aria-label":"Select all"})}),r.jsx("th",{className:"table-head w-32",children:"TC ID"}),r.jsx("th",{className:"table-head w-28",children:"Folder"}),r.jsx("th",{className:"table-head",children:"Title"}),r.jsx("th",{className:"table-head w-24",children:"Type"}),r.jsx("th",{className:"table-head w-24",children:"Priority"}),r.jsx("th",{className:"table-head w-56",children:"Steps"}),r.jsx("th",{className:"table-head",children:"Expected Result"}),r.jsx("th",{className:"table-head w-32",children:"Automation"}),r.jsx("th",{className:"table-head w-48",children:"Preconditions"}),r.jsx("th",{className:"table-head w-48",children:"Notes"}),r.jsx("th",{className:"table-head w-40",children:"Tags"}),r.jsx("th",{className:"table-head w-32",children:"Status"}),r.jsx("th",{className:"table-head w-28 text-center",children:"Actions"})]})}),r.jsx("tbody",{children:a.map(R=>r.jsxs("tr",{onDragOver:B=>{B.preventDefault(),A(R.id)},onDrop:B=>{B.preventDefault(),v&&m(v,R.id),x(void 0),A(void 0)},onDragEnd:()=>{x(void 0),A(void 0)},className:`border-b border-slate-100 hover:bg-blue-50 ${y===R.id?"bg-indigo-50 ring-2 ring-inset ring-indigo-300":""} ${s===R.id?"bg-blue-50":""}`,children:[r.jsx("td",{className:"table-cell drag-handle",draggable:!0,onDragStart:()=>x(R.id),onClick:B=>B.stopPropagation(),title:"Drag to reorder",children:"⠿"}),r.jsx("td",{className:"table-cell",onClick:B=>B.stopPropagation(),children:r.jsx("input",{type:"checkbox",checked:l.includes(R.id),onChange:()=>o(R.id),"aria-label":`Select ${R.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs",children:R.id}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:R.folder??R.module,onSave:B=>g(R.id,"folder",B)})}),r.jsxs("td",{className:"table-cell font-medium text-slate-900",children:[r.jsx(Yi,{value:R.title,onSave:B=>g(R.id,"title",B)}),(R.tags?.length||R.requirements?.length)&&r.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[R.tags?.slice(0,3).map(B=>r.jsx("span",{className:"tag-chip",children:B},B)),R.requirements?.slice(0,2).map(B=>r.jsx("span",{className:"requirement-chip",children:B},B))]})]}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:R.type,options:["positive","negative","validation"],onSave:B=>g(R.id,"type",B)})}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:R.priority,options:["high","medium","low"],onSave:B=>g(R.id,"priority",B)})}),r.jsxs("td",{className:"table-cell min-w-56",children:[r.jsx(Yi,{value:R.steps.map((B,H)=>`${H+1}. ${pl(B)}`).join(`
8
+ `+i.stack}}var J=Object.prototype.hasOwnProperty,ge=n.unstable_scheduleCallback,he=n.unstable_cancelCallback,te=n.unstable_shouldYield,xe=n.unstable_requestPaint,we=n.unstable_now,be=n.unstable_getCurrentPriorityLevel,Te=n.unstable_ImmediatePriority,qe=n.unstable_UserBlockingPriority,De=n.unstable_NormalPriority,ht=n.unstable_LowPriority,Nt=n.unstable_IdlePriority,Lt=n.log,Jt=n.unstable_setDisableYieldValue,Xe=null,ut=null;function Pe(e){if(typeof Lt=="function"&&Jt(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Xe,e)}catch{}}var Me=Math.clz32?Math.clz32:Je,Ct=Math.log,xt=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ct(e)/xt|0)|0}var et=256,St=262144,zt=4194304;function vt(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Gt(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var u=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var z=i&134217727;return z!==0?(i=z&~d,i!==0?u=vt(i):(b&=z,b!==0?u=vt(b):a||(a=z&~e,a!==0&&(u=vt(a))))):(z=i&~d,z!==0?u=vt(z):b!==0?u=vt(b):a||(a=i&~e,a!==0&&(u=vt(a)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:u}function Bt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dn(){var e=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),e}function Hn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ze(e,t,a,i,u,d){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var z=e.entanglements,Z=e.expirationTimes,ce=e.hiddenUpdates;for(a=b&~a;0<a;){var pe=31-Me(a),ve=1<<pe;z[pe]=0,Z[pe]=-1;var de=ce[pe];if(de!==null)for(ce[pe]=null,pe=0;pe<de.length;pe++){var fe=de[pe];fe!==null&&(fe.lane&=-536870913)}a&=~ve}i!==0&&Ge(e,i,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~t))}function Ge(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Me(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Jr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-Me(a),u=1<<i;u&t|e[i]&t&&(e[i]|=t),a&=~u}}function Wr(e,t){var a=t&-t;return a=(a&42)!==0?1:La(a),(a&(e.suspendedLanes|t))!==0?0:a}function La(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ei(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vl(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:hm(e.type))}function yl(e,t){var a=P.p;try{return P.p=e,t()}finally{P.p=a}}var sn=Math.random().toString(36).slice(2),Et="__reactFiber$"+sn,$t="__reactProps$"+sn,ra="__reactContainer$"+sn,ti="__reactEvents$"+sn,bl="__reactListeners$"+sn,uo="__reactHandles$"+sn,xl="__reactResources$"+sn,ia="__reactMarker$"+sn;function lr(e){delete e[Et],delete e[$t],delete e[ti],delete e[bl],delete e[uo]}function la(e){var t=e[Et];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ra]||a[Et]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Kp(e);e!==null;){if(a=e[Et])return a;e=Kp(e)}return t}e=a,a=e.parentNode}return null}function sa(e){if(e=e[Et]||e[ra]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Se(e){var t=e[xl];return t||(t=e[xl]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ae(e){e[ia]=!0}var tt=new Set,yt={};function jt(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(yt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var oa=RegExp("^[: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]*$"),Sl={},jl={};function co(e){return J.call(jl,e)?!0:J.call(Sl,e)?!1:oa.test(e)?jl[e]=!0:(Sl[e]=!0,!1)}function gn(e,t,a){if(co(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ua(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Wt(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wl(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fo(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,d=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(b){a=""+b,d.call(this,b)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ho(e){if(!e._valueTracker){var t=wl(e)?"checked":"value";e._valueTracker=fo(e,t,""+e[t])}}function Ud(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=wl(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function _l(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}}var Qv=/[\n"\\]/g;function vn(e){return e.replace(Qv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function po(e,t,a,i,u,d,b,z){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?mo(e,b,bt(t)):a!=null?mo(e,b,bt(a)):i!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?e.name=""+bt(z):e.removeAttribute("name")}function Md(e,t,a,i,u,d,b,z){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ho(e);return}a=a!=null?""+bt(a):"",t=t!=null?""+bt(t):a,z||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=z?e.checked:!!i,e.defaultChecked=!!i,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),ho(e)}function mo(e,t,a){t==="number"&&_l(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function sr(e,t,a,i){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&i&&(e[a].defaultSelected=!0)}else{for(a=""+bt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Ld(e,t,a){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+bt(a):""}function Bd(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if(X(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=bt(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),ho(e)}function or(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Kv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $d(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||Kv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Hd(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var u in t)i=t[u],t.hasOwnProperty(u)&&a[u]!==i&&$d(e,u,i)}else for(var d in t)t.hasOwnProperty(d)&&$d(e,d,t[d])}function go(e){if(e.indexOf("-")===-1)return!1;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 Jv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Wv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Nl(e){return Wv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function qn(){}var vo=null;function yo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ur=null,cr=null;function qd(e){var t=sa(e);if(t&&(e=t.stateNode)){var a=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(po(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+vn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var u=i[$t]||null;if(!u)throw Error(o(90));po(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&Ud(i)}break e;case"textarea":Ld(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&sr(e,!!a.multiple,t,!1)}}}var bo=!1;function Gd(e,t,a){if(bo)return e(t,a);bo=!0;try{var i=e(t);return i}finally{if(bo=!1,(ur!==null||cr!==null)&&(fs(),ur&&(t=ur,e=cr,cr=ur=null,qd(t),e)))for(t=0;t<e.length;t++)qd(e[t])}}function ni(e,t){var a=e.stateNode;if(a===null)return null;var i=a[$t]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xo=!1;if(Gn)try{var ai={};Object.defineProperty(ai,"passive",{get:function(){xo=!0}}),window.addEventListener("test",ai,ai),window.removeEventListener("test",ai,ai)}catch{xo=!1}var ca=null,So=null,El=null;function Id(){if(El)return El;var e,t=So,a=t.length,i,u="value"in ca?ca.value:ca.textContent,d=u.length;for(e=0;e<a&&t[e]===u[e];e++);var b=a-e;for(i=1;i<=b&&t[a-i]===u[d-i];i++);return El=u.slice(e,1<i?1-i:void 0)}function Tl(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 Ol(){return!0}function Vd(){return!1}function en(e){function t(a,i,u,d,b){this._reactName=a,this._targetInst=u,this.type=i,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(a=e[z],this[z]=a?a(d):d[z]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ol:Vd,this.isPropagationStopped=Vd,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ol)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cl=en($a),ri=v({},$a,{view:0,detail:0}),ey=en(ri),jo,wo,ii,Al=v({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:No,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!==ii&&(ii&&e.type==="mousemove"?(jo=e.screenX-ii.screenX,wo=e.screenY-ii.screenY):wo=jo=0,ii=e),jo)},movementY:function(e){return"movementY"in e?e.movementY:wo}}),Yd=en(Al),ty=v({},Al,{dataTransfer:0}),ny=en(ty),ay=v({},ri,{relatedTarget:0}),_o=en(ay),ry=v({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),iy=en(ry),ly=v({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sy=en(ly),oy=v({},$a,{data:0}),Fd=en(oy),uy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cy={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"},dy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dy[e])?!!t[e]:!1}function No(){return fy}var hy=v({},ri,{key:function(e){if(e.key){var t=uy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:No,charCode:function(e){return e.type==="keypress"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),py=en(hy),my=v({},Al,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pd=en(my),gy=v({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:No}),vy=en(gy),yy=v({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),by=en(yy),xy=v({},Al,{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}),Sy=en(xy),jy=v({},$a,{newState:0,oldState:0}),wy=en(jy),_y=[9,13,27,32],Eo=Gn&&"CompositionEvent"in window,li=null;Gn&&"documentMode"in document&&(li=document.documentMode);var Ny=Gn&&"TextEvent"in window&&!li,Zd=Gn&&(!Eo||li&&8<li&&11>=li),Xd=" ",Qd=!1;function Kd(e,t){switch(e){case"keyup":return _y.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Ey(e,t){switch(e){case"compositionend":return Jd(t);case"keypress":return t.which!==32?null:(Qd=!0,Xd);case"textInput":return e=t.data,e===Xd&&Qd?null:e;default:return null}}function Ty(e,t){if(dr)return e==="compositionend"||!Eo&&Kd(e,t)?(e=Id(),El=So=ca=null,dr=!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 Zd&&t.locale!=="ko"?null:t.data;default:return null}}var Oy={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 Wd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Oy[e.type]:t==="textarea"}function ef(e,t,a,i){ur?cr?cr.push(i):cr=[i]:ur=i,t=bs(t,"onChange"),0<t.length&&(a=new Cl("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var si=null,oi=null;function Cy(e){Lp(e,0)}function Rl(e){var t=Ba(e);if(Ud(t))return e}function tf(e,t){if(e==="change")return t}var nf=!1;if(Gn){var To;if(Gn){var Oo="oninput"in document;if(!Oo){var af=document.createElement("div");af.setAttribute("oninput","return;"),Oo=typeof af.oninput=="function"}To=Oo}else To=!1;nf=To&&(!document.documentMode||9<document.documentMode)}function rf(){si&&(si.detachEvent("onpropertychange",lf),oi=si=null)}function lf(e){if(e.propertyName==="value"&&Rl(oi)){var t=[];ef(t,oi,e,yo(e)),Gd(Cy,t)}}function Ay(e,t,a){e==="focusin"?(rf(),si=t,oi=a,si.attachEvent("onpropertychange",lf)):e==="focusout"&&rf()}function Ry(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rl(oi)}function ky(e,t){if(e==="click")return Rl(t)}function Dy(e,t){if(e==="input"||e==="change")return Rl(t)}function zy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:zy;function ui(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var u=a[i];if(!J.call(t,u)||!on(e[u],t[u]))return!1}return!0}function sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function of(e,t){var a=sf(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=sf(a)}}function uf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_l(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=_l(e.document)}return t}function Co(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")}var Uy=Gn&&"documentMode"in document&&11>=document.documentMode,fr=null,Ao=null,ci=null,Ro=!1;function df(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ro||fr==null||fr!==_l(i)||(i=fr,"selectionStart"in i&&Co(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ci&&ui(ci,i)||(ci=i,i=bs(Ao,"onSelect"),0<i.length&&(t=new Cl("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=fr)))}function Ha(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var hr={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionrun:Ha("Transition","TransitionRun"),transitionstart:Ha("Transition","TransitionStart"),transitioncancel:Ha("Transition","TransitionCancel"),transitionend:Ha("Transition","TransitionEnd")},ko={},ff={};Gn&&(ff=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);function qa(e){if(ko[e])return ko[e];if(!hr[e])return e;var t=hr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ff)return ko[e]=t[a];return e}var hf=qa("animationend"),pf=qa("animationiteration"),mf=qa("animationstart"),My=qa("transitionrun"),Ly=qa("transitionstart"),By=qa("transitioncancel"),gf=qa("transitionend"),vf=new Map,Do="abort auxClick beforeToggle 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(" ");Do.push("scrollEnd");function On(e,t){vf.set(e,t),jt(t,[e])}var kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],pr=0,zo=0;function Dl(){for(var e=pr,t=zo=pr=0;t<e;){var a=yn[t];yn[t++]=null;var i=yn[t];yn[t++]=null;var u=yn[t];yn[t++]=null;var d=yn[t];if(yn[t++]=null,i!==null&&u!==null){var b=i.pending;b===null?u.next=u:(u.next=b.next,b.next=u),i.pending=u}d!==0&&yf(a,u,d)}}function zl(e,t,a,i){yn[pr++]=e,yn[pr++]=t,yn[pr++]=a,yn[pr++]=i,zo|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Uo(e,t,a,i){return zl(e,t,a,i),Ul(e)}function Ga(e,t){return zl(e,null,null,t),Ul(e)}function yf(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var u=!1,d=e.return;d!==null;)d.childLanes|=a,i=d.alternate,i!==null&&(i.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-Me(a),e=d.hiddenUpdates,i=e[u],i===null?e[u]=[t]:i.push(t),t.lane=a|536870912),d):null}function Ul(e){if(50<ki)throw ki=0,Vu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var mr={};function $y(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,a,i){return new $y(e,t,a,i)}function Mo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var a=e.alternate;return a===null?(a=un(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function bf(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ml(e,t,a,i,u,d){var b=0;if(i=e,typeof e=="function")Mo(e)&&(b=1);else if(typeof e=="string")b=Vb(e,a,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=un(31,a,t,u),e.elementType=W,e.lanes=d,e;case N:return Ia(a.children,u,d,t);case j:b=8,u|=24;break;case T:return e=un(12,a,t,u|2),e.elementType=T,e.lanes=d,e;case R:return e=un(13,a,t,u),e.elementType=R,e.lanes=d,e;case B:return e=un(19,a,t,u),e.elementType=B,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:b=10;break e;case O:b=9;break e;case M:b=11;break e;case H:b=14;break e;case ae:b=16,i=null;break e}b=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=un(b,a,t,u),t.elementType=e,t.type=i,t.lanes=d,t}function Ia(e,t,a,i){return e=un(7,e,i,t),e.lanes=a,e}function Lo(e,t,a){return e=un(6,e,null,t),e.lanes=a,e}function xf(e){var t=un(18,null,null,0);return t.stateNode=e,t}function Bo(e,t,a){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Sf=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var a=Sf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:U(t)},Sf.set(e,t),t)}return{value:e,source:t,stack:U(t)}}var gr=[],vr=0,Ll=null,di=0,xn=[],Sn=0,da=null,zn=1,Un="";function Vn(e,t){gr[vr++]=di,gr[vr++]=Ll,Ll=e,di=t}function jf(e,t,a){xn[Sn++]=zn,xn[Sn++]=Un,xn[Sn++]=da,da=e;var i=zn;e=Un;var u=32-Me(i)-1;i&=~(1<<u),a+=1;var d=32-Me(t)+u;if(30<d){var b=u-u%5;d=(i&(1<<b)-1).toString(32),i>>=b,u-=b,zn=1<<32-Me(t)+u|a<<u|i,Un=d+e}else zn=1<<d|a<<u|i,Un=e}function $o(e){e.return!==null&&(Vn(e,1),jf(e,1,0))}function Ho(e){for(;e===Ll;)Ll=gr[--vr],gr[vr]=null,di=gr[--vr],gr[vr]=null;for(;e===da;)da=xn[--Sn],xn[Sn]=null,Un=xn[--Sn],xn[Sn]=null,zn=xn[--Sn],xn[Sn]=null}function wf(e,t){xn[Sn++]=zn,xn[Sn++]=Un,xn[Sn++]=da,zn=t.id,Un=t.overflow,da=e}var It=null,ct=null,Ze=!1,fa=null,jn=!1,qo=Error(o(519));function ha(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fi(bn(t,e)),qo}function _f(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Et]=e,t[$t]=i,a){case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":case"embed":Ve("load",t);break;case"video":case"audio":for(a=0;a<zi.length;a++)Ve(zi[a],t);break;case"source":Ve("error",t);break;case"img":case"image":case"link":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"input":Ve("invalid",t),Md(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ve("invalid",t);break;case"textarea":Ve("invalid",t),Bd(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||qp(t.textContent,a)?(i.popover!=null&&(Ve("beforetoggle",t),Ve("toggle",t)),i.onScroll!=null&&Ve("scroll",t),i.onScrollEnd!=null&&Ve("scrollend",t),i.onClick!=null&&(t.onclick=qn),t=!0):t=!1,t||ha(e,!0)}function Nf(e){for(It=e.return;It;)switch(It.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:It=It.return}}function yr(e){if(e!==It)return!1;if(!Ze)return Nf(e),Ze=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ic(e.type,e.memoizedProps)),a=!a),a&&ct&&ha(e),Nf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Qp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Qp(e)}else t===27?(t=ct,Ta(e.type)?(e=cc,cc=null,ct=e):ct=t):ct=It?_n(e.stateNode.nextSibling):null;return!0}function Va(){ct=It=null,Ze=!1}function Go(){var e=fa;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),fa=null),e}function fi(e){fa===null?fa=[e]:fa.push(e)}var Io=S(null),Ya=null,Yn=null;function pa(e,t,a){$(Io,t._currentValue),t._currentValue=a}function Fn(e){e._currentValue=Io.current,A(Io)}function Vo(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Yo(e,t,a,i){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var b=u.child;d=d.firstContext;e:for(;d!==null;){var z=d;d=u;for(var Z=0;Z<t.length;Z++)if(z.context===t[Z]){d.lanes|=a,z=d.alternate,z!==null&&(z.lanes|=a),Vo(d.return,a,e),i||(b=null);break e}d=z.next}}else if(u.tag===18){if(b=u.return,b===null)throw Error(o(341));b.lanes|=a,d=b.alternate,d!==null&&(d.lanes|=a),Vo(b,a,e),b=null}else b=u.child;if(b!==null)b.return=u;else for(b=u;b!==null;){if(b===e){b=null;break}if(u=b.sibling,u!==null){u.return=b.return,b=u;break}b=b.return}u=b}}function br(e,t,a,i){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var b=u.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var z=u.type;on(u.pendingProps.value,b.value)||(e!==null?e.push(z):e=[z])}}else if(u===_e.current){if(b=u.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push($i):e=[$i])}u=u.return}e!==null&&Yo(t,e,a,i),t.flags|=262144}function Bl(e){for(e=e.firstContext;e!==null;){if(!on(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fa(e){Ya=e,Yn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Vt(e){return Ef(Ya,e)}function $l(e,t){return Ya===null&&Fa(e),Ef(e,t)}function Ef(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Yn===null){if(e===null)throw Error(o(308));Yn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yn=Yn.next=t;return a}var Hy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},qy=n.unstable_scheduleCallback,Gy=n.unstable_NormalPriority,At={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fo(){return{controller:new Hy,data:new Map,refCount:0}}function hi(e){e.refCount--,e.refCount===0&&qy(Gy,function(){e.controller.abort()})}var pi=null,Po=0,xr=0,Sr=null;function Iy(e,t){if(pi===null){var a=pi=[];Po=0,xr=Qu(),Sr={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Po++,t.then(Tf,Tf),t}function Tf(){if(--Po===0&&pi!==null){Sr!==null&&(Sr.status="fulfilled");var e=pi;pi=null,xr=0,Sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vy(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(i.status="rejected",i.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),i}var Of=V.S;V.S=function(e,t){dp=we(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Iy(e,t),Of!==null&&Of(e,t)};var Pa=S(null);function Zo(){var e=Pa.current;return e!==null?e:st.pooledCache}function Hl(e,t){t===null?$(Pa,Pa.current):$(Pa,t.pool)}function Cf(){var e=Zo();return e===null?null:{parent:At._currentValue,pool:e}}var jr=Error(o(460)),Xo=Error(o(474)),ql=Error(o(542)),Gl={then:function(){}};function Af(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Rf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(qn,qn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e;default:if(typeof t.status=="string")t.then(qn,qn);else{if(e=st,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=i}},function(i){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e}throw Xa=t,jr}}function Za(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Xa=a,jr):a}}var Xa=null;function kf(){if(Xa===null)throw Error(o(459));var e=Xa;return Xa=null,e}function Df(e){if(e===jr||e===ql)throw Error(o(483))}var wr=null,mi=0;function Il(e){var t=mi;return mi+=1,wr===null&&(wr=[]),Rf(wr,e,t)}function gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vl(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function zf(e){function t(le,ee){if(e){var ue=le.deletions;ue===null?(le.deletions=[ee],le.flags|=16):ue.push(ee)}}function a(le,ee){if(!e)return null;for(;ee!==null;)t(le,ee),ee=ee.sibling;return null}function i(le){for(var ee=new Map;le!==null;)le.key!==null?ee.set(le.key,le):ee.set(le.index,le),le=le.sibling;return ee}function u(le,ee){return le=In(le,ee),le.index=0,le.sibling=null,le}function d(le,ee,ue){return le.index=ue,e?(ue=le.alternate,ue!==null?(ue=ue.index,ue<ee?(le.flags|=67108866,ee):ue):(le.flags|=67108866,ee)):(le.flags|=1048576,ee)}function b(le){return e&&le.alternate===null&&(le.flags|=67108866),le}function z(le,ee,ue,me){return ee===null||ee.tag!==6?(ee=Lo(ue,le.mode,me),ee.return=le,ee):(ee=u(ee,ue),ee.return=le,ee)}function Z(le,ee,ue,me){var Re=ue.type;return Re===N?pe(le,ee,ue.props.children,me,ue.key):ee!==null&&(ee.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ae&&Za(Re)===ee.type)?(ee=u(ee,ue.props),gi(ee,ue),ee.return=le,ee):(ee=Ml(ue.type,ue.key,ue.props,null,le.mode,me),gi(ee,ue),ee.return=le,ee)}function ce(le,ee,ue,me){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ue.containerInfo||ee.stateNode.implementation!==ue.implementation?(ee=Bo(ue,le.mode,me),ee.return=le,ee):(ee=u(ee,ue.children||[]),ee.return=le,ee)}function pe(le,ee,ue,me,Re){return ee===null||ee.tag!==7?(ee=Ia(ue,le.mode,me,Re),ee.return=le,ee):(ee=u(ee,ue),ee.return=le,ee)}function ve(le,ee,ue){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Lo(""+ee,le.mode,ue),ee.return=le,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return ue=Ml(ee.type,ee.key,ee.props,null,le.mode,ue),gi(ue,ee),ue.return=le,ue;case C:return ee=Bo(ee,le.mode,ue),ee.return=le,ee;case ae:return ee=Za(ee),ve(le,ee,ue)}if(X(ee)||q(ee))return ee=Ia(ee,le.mode,ue,null),ee.return=le,ee;if(typeof ee.then=="function")return ve(le,Il(ee),ue);if(ee.$$typeof===k)return ve(le,$l(le,ee),ue);Vl(le,ee)}return null}function de(le,ee,ue,me){var Re=ee!==null?ee.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Re!==null?null:z(le,ee,""+ue,me);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:return ue.key===Re?Z(le,ee,ue,me):null;case C:return ue.key===Re?ce(le,ee,ue,me):null;case ae:return ue=Za(ue),de(le,ee,ue,me)}if(X(ue)||q(ue))return Re!==null?null:pe(le,ee,ue,me,null);if(typeof ue.then=="function")return de(le,ee,Il(ue),me);if(ue.$$typeof===k)return de(le,ee,$l(le,ue),me);Vl(le,ue)}return null}function fe(le,ee,ue,me,Re){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return le=le.get(ue)||null,z(ee,le,""+me,Re);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case y:return le=le.get(me.key===null?ue:me.key)||null,Z(ee,le,me,Re);case C:return le=le.get(me.key===null?ue:me.key)||null,ce(ee,le,me,Re);case ae:return me=Za(me),fe(le,ee,ue,me,Re)}if(X(me)||q(me))return le=le.get(ue)||null,pe(ee,le,me,Re,null);if(typeof me.then=="function")return fe(le,ee,ue,Il(me),Re);if(me.$$typeof===k)return fe(le,ee,ue,$l(ee,me),Re);Vl(ee,me)}return null}function Oe(le,ee,ue,me){for(var Re=null,Qe=null,Ce=ee,Be=ee=0,Fe=null;Ce!==null&&Be<ue.length;Be++){Ce.index>Be?(Fe=Ce,Ce=null):Fe=Ce.sibling;var Ke=de(le,Ce,ue[Be],me);if(Ke===null){Ce===null&&(Ce=Fe);break}e&&Ce&&Ke.alternate===null&&t(le,Ce),ee=d(Ke,ee,Be),Qe===null?Re=Ke:Qe.sibling=Ke,Qe=Ke,Ce=Fe}if(Be===ue.length)return a(le,Ce),Ze&&Vn(le,Be),Re;if(Ce===null){for(;Be<ue.length;Be++)Ce=ve(le,ue[Be],me),Ce!==null&&(ee=d(Ce,ee,Be),Qe===null?Re=Ce:Qe.sibling=Ce,Qe=Ce);return Ze&&Vn(le,Be),Re}for(Ce=i(Ce);Be<ue.length;Be++)Fe=fe(Ce,le,Be,ue[Be],me),Fe!==null&&(e&&Fe.alternate!==null&&Ce.delete(Fe.key===null?Be:Fe.key),ee=d(Fe,ee,Be),Qe===null?Re=Fe:Qe.sibling=Fe,Qe=Fe);return e&&Ce.forEach(function(ka){return t(le,ka)}),Ze&&Vn(le,Be),Re}function ke(le,ee,ue,me){if(ue==null)throw Error(o(151));for(var Re=null,Qe=null,Ce=ee,Be=ee=0,Fe=null,Ke=ue.next();Ce!==null&&!Ke.done;Be++,Ke=ue.next()){Ce.index>Be?(Fe=Ce,Ce=null):Fe=Ce.sibling;var ka=de(le,Ce,Ke.value,me);if(ka===null){Ce===null&&(Ce=Fe);break}e&&Ce&&ka.alternate===null&&t(le,Ce),ee=d(ka,ee,Be),Qe===null?Re=ka:Qe.sibling=ka,Qe=ka,Ce=Fe}if(Ke.done)return a(le,Ce),Ze&&Vn(le,Be),Re;if(Ce===null){for(;!Ke.done;Be++,Ke=ue.next())Ke=ve(le,Ke.value,me),Ke!==null&&(ee=d(Ke,ee,Be),Qe===null?Re=Ke:Qe.sibling=Ke,Qe=Ke);return Ze&&Vn(le,Be),Re}for(Ce=i(Ce);!Ke.done;Be++,Ke=ue.next())Ke=fe(Ce,le,Be,Ke.value,me),Ke!==null&&(e&&Ke.alternate!==null&&Ce.delete(Ke.key===null?Be:Ke.key),ee=d(Ke,ee,Be),Qe===null?Re=Ke:Qe.sibling=Ke,Qe=Ke);return e&&Ce.forEach(function(tx){return t(le,tx)}),Ze&&Vn(le,Be),Re}function lt(le,ee,ue,me){if(typeof ue=="object"&&ue!==null&&ue.type===N&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:e:{for(var Re=ue.key;ee!==null;){if(ee.key===Re){if(Re=ue.type,Re===N){if(ee.tag===7){a(le,ee.sibling),me=u(ee,ue.props.children),me.return=le,le=me;break e}}else if(ee.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ae&&Za(Re)===ee.type){a(le,ee.sibling),me=u(ee,ue.props),gi(me,ue),me.return=le,le=me;break e}a(le,ee);break}else t(le,ee);ee=ee.sibling}ue.type===N?(me=Ia(ue.props.children,le.mode,me,ue.key),me.return=le,le=me):(me=Ml(ue.type,ue.key,ue.props,null,le.mode,me),gi(me,ue),me.return=le,le=me)}return b(le);case C:e:{for(Re=ue.key;ee!==null;){if(ee.key===Re)if(ee.tag===4&&ee.stateNode.containerInfo===ue.containerInfo&&ee.stateNode.implementation===ue.implementation){a(le,ee.sibling),me=u(ee,ue.children||[]),me.return=le,le=me;break e}else{a(le,ee);break}else t(le,ee);ee=ee.sibling}me=Bo(ue,le.mode,me),me.return=le,le=me}return b(le);case ae:return ue=Za(ue),lt(le,ee,ue,me)}if(X(ue))return Oe(le,ee,ue,me);if(q(ue)){if(Re=q(ue),typeof Re!="function")throw Error(o(150));return ue=Re.call(ue),ke(le,ee,ue,me)}if(typeof ue.then=="function")return lt(le,ee,Il(ue),me);if(ue.$$typeof===k)return lt(le,ee,$l(le,ue),me);Vl(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ee!==null&&ee.tag===6?(a(le,ee.sibling),me=u(ee,ue),me.return=le,le=me):(a(le,ee),me=Lo(ue,le.mode,me),me.return=le,le=me),b(le)):a(le,ee)}return function(le,ee,ue,me){try{mi=0;var Re=lt(le,ee,ue,me);return wr=null,Re}catch(Ce){if(Ce===jr||Ce===ql)throw Ce;var Qe=un(29,Ce,null,le.mode);return Qe.lanes=me,Qe.return=le,Qe}}}var Qa=zf(!0),Uf=zf(!1),ma=!1;function Qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ko(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function va(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(We&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=Ul(e),yf(e,null,a),t}return zl(e,i,t,a),Ul(e)}function vi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Jr(e,a)}}function Jo(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var u=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?u=d=b:d=d.next=b,a=a.next}while(a!==null);d===null?u=d=t:d=d.next=t}else u=d=t;a={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Wo=!1;function yi(){if(Wo){var e=Sr;if(e!==null)throw e}}function bi(e,t,a,i){Wo=!1;var u=e.updateQueue;ma=!1;var d=u.firstBaseUpdate,b=u.lastBaseUpdate,z=u.shared.pending;if(z!==null){u.shared.pending=null;var Z=z,ce=Z.next;Z.next=null,b===null?d=ce:b.next=ce,b=Z;var pe=e.alternate;pe!==null&&(pe=pe.updateQueue,z=pe.lastBaseUpdate,z!==b&&(z===null?pe.firstBaseUpdate=ce:z.next=ce,pe.lastBaseUpdate=Z))}if(d!==null){var ve=u.baseState;b=0,pe=ce=Z=null,z=d;do{var de=z.lane&-536870913,fe=de!==z.lane;if(fe?(Ye&de)===de:(i&de)===de){de!==0&&de===xr&&(Wo=!0),pe!==null&&(pe=pe.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Oe=e,ke=z;de=t;var lt=a;switch(ke.tag){case 1:if(Oe=ke.payload,typeof Oe=="function"){ve=Oe.call(lt,ve,de);break e}ve=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=ke.payload,de=typeof Oe=="function"?Oe.call(lt,ve,de):Oe,de==null)break e;ve=v({},ve,de);break e;case 2:ma=!0}}de=z.callback,de!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=u.callbacks,fe===null?u.callbacks=[de]:fe.push(de))}else fe={lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},pe===null?(ce=pe=fe,Z=ve):pe=pe.next=fe,b|=de;if(z=z.next,z===null){if(z=u.shared.pending,z===null)break;fe=z,z=fe.next,fe.next=null,u.lastBaseUpdate=fe,u.shared.pending=null}}while(!0);pe===null&&(Z=ve),u.baseState=Z,u.firstBaseUpdate=ce,u.lastBaseUpdate=pe,d===null&&(u.shared.lanes=0),ja|=b,e.lanes=b,e.memoizedState=ve}}function Mf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Lf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mf(a[e],t)}var _r=S(null),Yl=S(0);function Bf(e,t){e=ta,$(Yl,e),$(_r,t),ta=e|t.baseLanes}function eu(){$(Yl,ta),$(_r,_r.current)}function tu(){ta=Yl.current,A(_r),A(Yl)}var cn=S(null),wn=null;function ya(e){var t=e.alternate;$(Tt,Tt.current&1),$(cn,e),wn===null&&(t===null||_r.current!==null||t.memoizedState!==null)&&(wn=e)}function nu(e){$(Tt,Tt.current),$(cn,e),wn===null&&(wn=e)}function $f(e){e.tag===22?($(Tt,Tt.current),$(cn,e),wn===null&&(wn=e)):ba()}function ba(){$(Tt,Tt.current),$(cn,cn.current)}function dn(e){A(cn),wn===e&&(wn=null),A(Tt)}var Tt=S(0);function Fl(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||oc(a)||uc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 Pn=0,Le=null,rt=null,Rt=null,Pl=!1,Nr=!1,Ka=!1,Zl=0,xi=0,Er=null,Yy=0;function wt(){throw Error(o(321))}function au(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!on(e[a],t[a]))return!1;return!0}function ru(e,t,a,i,u,d){return Pn=d,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?jh:bu,Ka=!1,d=a(i,u),Ka=!1,Nr&&(d=qf(t,a,i,u)),Hf(e),d}function Hf(e){V.H=wi;var t=rt!==null&&rt.next!==null;if(Pn=0,Rt=rt=Le=null,Pl=!1,xi=0,Er=null,t)throw Error(o(300));e===null||kt||(e=e.dependencies,e!==null&&Bl(e)&&(kt=!0))}function qf(e,t,a,i){Le=e;var u=0;do{if(Nr&&(Er=null),xi=0,Nr=!1,25<=u)throw Error(o(301));if(u+=1,Rt=rt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}V.H=wh,d=t(a,i)}while(Nr);return d}function Fy(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?Si(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Le.flags|=1024),t}function iu(){var e=Zl!==0;return Zl=0,e}function lu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function su(e){if(Pl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pl=!1}Pn=0,Rt=rt=Le=null,Nr=!1,xi=Zl=0,Er=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?Le.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function Ot(){if(rt===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Rt===null?Le.memoizedState:Rt.next;if(t!==null)Rt=t,rt=e;else{if(e===null)throw Le.alternate===null?Error(o(467)):Error(o(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Rt===null?Le.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function Xl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Si(e){var t=xi;return xi+=1,Er===null&&(Er=[]),e=Rf(Er,e,t),t=Le,(Rt===null?t.memoizedState:Rt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?jh:bu),e}function Ql(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Si(e);if(e.$$typeof===k)return Vt(e)}throw Error(o(438,String(e)))}function ou(e){var t=null,a=Le.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Le.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Xl(),Le.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=ne;return t.index++,a}function Zn(e,t){return typeof t=="function"?t(e):t}function Kl(e){var t=Ot();return uu(t,rt,e)}function uu(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var u=e.baseQueue,d=i.pending;if(d!==null){if(u!==null){var b=u.next;u.next=d.next,d.next=b}t.baseQueue=u=d,i.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var z=b=null,Z=null,ce=t,pe=!1;do{var ve=ce.lane&-536870913;if(ve!==ce.lane?(Ye&ve)===ve:(Pn&ve)===ve){var de=ce.revertLane;if(de===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),ve===xr&&(pe=!0);else if((Pn&de)===de){ce=ce.next,de===xr&&(pe=!0);continue}else ve={lane:0,revertLane:ce.revertLane,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Z===null?(z=Z=ve,b=d):Z=Z.next=ve,Le.lanes|=de,ja|=de;ve=ce.action,Ka&&a(d,ve),d=ce.hasEagerState?ce.eagerState:a(d,ve)}else de={lane:ve,revertLane:ce.revertLane,gesture:ce.gesture,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Z===null?(z=Z=de,b=d):Z=Z.next=de,Le.lanes|=ve,ja|=ve;ce=ce.next}while(ce!==null&&ce!==t);if(Z===null?b=d:Z.next=z,!on(d,e.memoizedState)&&(kt=!0,pe&&(a=Sr,a!==null)))throw a;e.memoizedState=d,e.baseState=b,e.baseQueue=Z,i.lastRenderedState=d}return u===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function cu(e){var t=Ot(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,u=a.pending,d=t.memoizedState;if(u!==null){a.pending=null;var b=u=u.next;do d=e(d,b.action),b=b.next;while(b!==u);on(d,t.memoizedState)||(kt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,i]}function Gf(e,t,a){var i=Le,u=Ot(),d=Ze;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var b=!on((rt||u).memoizedState,a);if(b&&(u.memoizedState=a,kt=!0),u=u.queue,hu(Yf.bind(null,i,u,e),[e]),u.getSnapshot!==t||b||Rt!==null&&Rt.memoizedState.tag&1){if(i.flags|=2048,Tr(9,{destroy:void 0},Vf.bind(null,i,u,a,t),null),st===null)throw Error(o(349));d||(Pn&127)!==0||If(i,t,a)}return a}function If(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Le.updateQueue,t===null?(t=Xl(),Le.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Vf(e,t,a,i){t.value=a,t.getSnapshot=i,Ff(t)&&Pf(e)}function Yf(e,t,a){return a(function(){Ff(t)&&Pf(e)})}function Ff(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!on(e,a)}catch{return!0}}function Pf(e){var t=Ga(e,2);t!==null&&ln(t,e,2)}function du(e){var t=Qt();if(typeof e=="function"){var a=e;if(e=a(),Ka){Pe(!0);try{a()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},t}function Zf(e,t,a,i){return e.baseState=a,uu(e,rt,typeof i=="function"?i:Zn)}function Py(e,t,a,i,u){if(es(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};V.T!==null?a(!0):d.isTransition=!1,i(d),a=t.pending,a===null?(d.next=t.pending=d,Xf(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Xf(e,t){var a=t.action,i=t.payload,u=e.state;if(t.isTransition){var d=V.T,b={};V.T=b;try{var z=a(u,i),Z=V.S;Z!==null&&Z(b,z),Qf(e,t,z)}catch(ce){fu(e,t,ce)}finally{d!==null&&b.types!==null&&(d.types=b.types),V.T=d}}else try{d=a(u,i),Qf(e,t,d)}catch(ce){fu(e,t,ce)}}function Qf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Kf(e,t,i)},function(i){return fu(e,t,i)}):Kf(e,t,a)}function Kf(e,t,a){t.status="fulfilled",t.value=a,Jf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Xf(e,a)))}function fu(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Jf(t),t=t.next;while(t!==i)}e.action=null}function Jf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wf(e,t){return t}function eh(e,t){if(Ze){var a=st.formState;if(a!==null){e:{var i=Le;if(Ze){if(ct){t:{for(var u=ct,d=jn;u.nodeType!==8;){if(!d){u=null;break t}if(u=_n(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){ct=_n(u.nextSibling),i=u.data==="F!";break e}}ha(i)}i=!1}i&&(t=a[0])}}return a=Qt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wf,lastRenderedState:t},a.queue=i,a=bh.bind(null,Le,i),i.dispatch=a,i=du(!1),d=yu.bind(null,Le,!1,i.queue),i=Qt(),u={state:t,dispatch:null,action:e,pending:null},i.queue=u,a=Py.bind(null,Le,u,d,a),u.dispatch=a,i.memoizedState=e,[t,a,!1]}function th(e){var t=Ot();return nh(t,rt,e)}function nh(e,t,a){if(t=uu(e,t,Wf)[0],e=Kl(Zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Si(t)}catch(b){throw b===jr?ql:b}else i=t;t=Ot();var u=t.queue,d=u.dispatch;return a!==t.memoizedState&&(Le.flags|=2048,Tr(9,{destroy:void 0},Zy.bind(null,u,a),null)),[i,d,e]}function Zy(e,t){e.action=t}function ah(e){var t=Ot(),a=rt;if(a!==null)return nh(t,a,e);Ot(),t=t.memoizedState,a=Ot();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Tr(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Le.updateQueue,t===null&&(t=Xl(),Le.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function rh(){return Ot().memoizedState}function Jl(e,t,a,i){var u=Qt();Le.flags|=e,u.memoizedState=Tr(1|t,{destroy:void 0},a,i===void 0?null:i)}function Wl(e,t,a,i){var u=Ot();i=i===void 0?null:i;var d=u.memoizedState.inst;rt!==null&&i!==null&&au(i,rt.memoizedState.deps)?u.memoizedState=Tr(t,d,a,i):(Le.flags|=e,u.memoizedState=Tr(1|t,d,a,i))}function ih(e,t){Jl(8390656,8,e,t)}function hu(e,t){Wl(2048,8,e,t)}function Xy(e){Le.flags|=4;var t=Le.updateQueue;if(t===null)t=Xl(),Le.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function lh(e){var t=Ot().memoizedState;return Xy({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function sh(e,t){return Wl(4,2,e,t)}function oh(e,t){return Wl(4,4,e,t)}function uh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ch(e,t,a){a=a!=null?a.concat([e]):null,Wl(4,4,uh.bind(null,t,e),a)}function pu(){}function dh(e,t){var a=Ot();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&au(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function fh(e,t){var a=Ot();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&au(t,i[1]))return i[0];if(i=e(),Ka){Pe(!0);try{e()}finally{Pe(!1)}}return a.memoizedState=[i,t],i}function mu(e,t,a){return a===void 0||(Pn&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=hp(),Le.lanes|=e,ja|=e,a)}function hh(e,t,a,i){return on(a,t)?a:_r.current!==null?(e=mu(e,a,i),on(e,t)||(kt=!0),e):(Pn&42)===0||(Pn&1073741824)!==0&&(Ye&261930)===0?(kt=!0,e.memoizedState=a):(e=hp(),Le.lanes|=e,ja|=e,t)}function ph(e,t,a,i,u){var d=P.p;P.p=d!==0&&8>d?d:8;var b=V.T,z={};V.T=z,yu(e,!1,t,a);try{var Z=u(),ce=V.S;if(ce!==null&&ce(z,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var pe=Vy(Z,i);ji(e,t,pe,pn(e))}else ji(e,t,i,pn(e))}catch(ve){ji(e,t,{then:function(){},status:"rejected",reason:ve},pn())}finally{P.p=d,b!==null&&z.types!==null&&(b.types=z.types),V.T=b}}function Qy(){}function gu(e,t,a,i){if(e.tag!==5)throw Error(o(476));var u=mh(e).queue;ph(e,u,t,Q,a===null?Qy:function(){return gh(e),a(i)})}function mh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:Q},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function gh(e){var t=mh(e);t.next===null&&(t=e.alternate.memoizedState),ji(e,t.next.queue,{},pn())}function vu(){return Vt($i)}function vh(){return Ot().memoizedState}function yh(){return Ot().memoizedState}function Ky(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=pn();e=ga(a);var i=va(t,e,a);i!==null&&(ln(i,t,a),vi(i,t,a)),t={cache:Fo()},e.payload=t;return}t=t.return}}function Jy(e,t,a){var i=pn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},es(e)?xh(t,a):(a=Uo(e,t,a,i),a!==null&&(ln(a,e,i),Sh(a,t,i)))}function bh(e,t,a){var i=pn();ji(e,t,a,i)}function ji(e,t,a,i){var u={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(es(e))xh(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var b=t.lastRenderedState,z=d(b,a);if(u.hasEagerState=!0,u.eagerState=z,on(z,b))return zl(e,t,u,0),st===null&&Dl(),!1}catch{}if(a=Uo(e,t,u,i),a!==null)return ln(a,e,i),Sh(a,t,i),!0}return!1}function yu(e,t,a,i){if(i={lane:2,revertLane:Qu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},es(e)){if(t)throw Error(o(479))}else t=Uo(e,a,i,2),t!==null&&ln(t,e,2)}function es(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function xh(e,t){Nr=Pl=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Sh(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Jr(e,a)}}var wi={readContext:Vt,use:Ql,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};wi.useEffectEvent=wt;var jh={readContext:Vt,use:Ql,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:ih,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Jl(4194308,4,uh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Jl(4194308,4,e,t)},useInsertionEffect:function(e,t){Jl(4,2,e,t)},useMemo:function(e,t){var a=Qt();t=t===void 0?null:t;var i=e();if(Ka){Pe(!0);try{e()}finally{Pe(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Qt();if(a!==void 0){var u=a(t);if(Ka){Pe(!0);try{a(t)}finally{Pe(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=Jy.bind(null,Le,e),[i.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=du(e);var t=e.queue,a=bh.bind(null,Le,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:pu,useDeferredValue:function(e,t){var a=Qt();return mu(a,e,t)},useTransition:function(){var e=du(!1);return e=ph.bind(null,Le,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Le,u=Qt();if(Ze){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),st===null)throw Error(o(349));(Ye&127)!==0||If(i,t,a)}u.memoizedState=a;var d={value:a,getSnapshot:t};return u.queue=d,ih(Yf.bind(null,i,d,e),[e]),i.flags|=2048,Tr(9,{destroy:void 0},Vf.bind(null,i,d,a,t),null),a},useId:function(){var e=Qt(),t=st.identifierPrefix;if(Ze){var a=Un,i=zn;a=(i&~(1<<32-Me(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Zl++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Yy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vu,useFormState:eh,useActionState:eh,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=yu.bind(null,Le,!0,a),a.dispatch=t,[e,t]},useMemoCache:ou,useCacheRefresh:function(){return Qt().memoizedState=Ky.bind(null,Le)},useEffectEvent:function(e){var t=Qt(),a={impl:e};return t.memoizedState=a,function(){if((We&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},bu={readContext:Vt,use:Ql,useCallback:dh,useContext:Vt,useEffect:hu,useImperativeHandle:ch,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:fh,useReducer:Kl,useRef:rh,useState:function(){return Kl(Zn)},useDebugValue:pu,useDeferredValue:function(e,t){var a=Ot();return hh(a,rt.memoizedState,e,t)},useTransition:function(){var e=Kl(Zn)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Gf,useId:vh,useHostTransitionStatus:vu,useFormState:th,useActionState:th,useOptimistic:function(e,t){var a=Ot();return Zf(a,rt,e,t)},useMemoCache:ou,useCacheRefresh:yh};bu.useEffectEvent=lh;var wh={readContext:Vt,use:Ql,useCallback:dh,useContext:Vt,useEffect:hu,useImperativeHandle:ch,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:fh,useReducer:cu,useRef:rh,useState:function(){return cu(Zn)},useDebugValue:pu,useDeferredValue:function(e,t){var a=Ot();return rt===null?mu(a,e,t):hh(a,rt.memoizedState,e,t)},useTransition:function(){var e=cu(Zn)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:Gf,useId:vh,useHostTransitionStatus:vu,useFormState:ah,useActionState:ah,useOptimistic:function(e,t){var a=Ot();return rt!==null?Zf(a,rt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ou,useCacheRefresh:yh};wh.useEffectEvent=lh;function xu(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Su={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=pn(),u=ga(i);u.payload=t,a!=null&&(u.callback=a),t=va(e,u,i),t!==null&&(ln(t,e,i),vi(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=pn(),u=ga(i);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=va(e,u,i),t!==null&&(ln(t,e,i),vi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=pn(),i=ga(a);i.tag=2,t!=null&&(i.callback=t),t=va(e,i,a),t!==null&&(ln(t,e,a),vi(t,e,a))}};function _h(e,t,a,i,u,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,b):t.prototype&&t.prototype.isPureReactComponent?!ui(a,i)||!ui(u,d):!0}function Nh(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Su.enqueueReplaceState(t,t.state,null)}function Ja(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function Eh(e){kl(e)}function Th(e){console.error(e)}function Oh(e){kl(e)}function ts(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Ch(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function ju(e,t,a){return a=ga(a),a.tag=3,a.payload={element:null},a.callback=function(){ts(e,t)},a}function Ah(e){return e=ga(e),e.tag=3,e}function Rh(e,t,a,i){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var d=i.value;e.payload=function(){return u(d)},e.callback=function(){Ch(t,a,i)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Ch(t,a,i),typeof u!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var z=i.stack;this.componentDidCatch(i.value,{componentStack:z!==null?z:""})})}function Wy(e,t,a,i,u){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&br(t,a,u,!0),a=cn.current,a!==null){switch(a.tag){case 31:case 13:return wn===null?hs():a.alternate===null&&_t===0&&(_t=3),a.flags&=-257,a.flags|=65536,a.lanes=u,i===Gl?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Pu(e,i,u)),!1;case 22:return a.flags|=65536,i===Gl?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Pu(e,i,u)),!1}throw Error(o(435,a.tag))}return Pu(e,i,u),hs(),!1}if(Ze)return t=cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==qo&&(e=Error(o(422),{cause:i}),fi(bn(e,a)))):(i!==qo&&(t=Error(o(423),{cause:i}),fi(bn(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=bn(i,a),u=ju(e.stateNode,i,u),Jo(e,u),_t!==4&&(_t=2)),!1;var d=Error(o(520),{cause:i});if(d=bn(d,a),Ri===null?Ri=[d]:Ri.push(d),_t!==4&&(_t=2),t===null)return!0;i=bn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=ju(a.stateNode,i,e),Jo(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(wa===null||!wa.has(d))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Ah(u),Rh(u,e,a,i),Jo(a,u),!1}a=a.return}while(a!==null);return!1}var wu=Error(o(461)),kt=!1;function Yt(e,t,a,i){t.child=e===null?Uf(t,null,a,i):Qa(t,e.child,a,i)}function kh(e,t,a,i,u){a=a.render;var d=t.ref;if("ref"in i){var b={};for(var z in i)z!=="ref"&&(b[z]=i[z])}else b=i;return Fa(t),i=ru(e,t,a,b,d,u),z=iu(),e!==null&&!kt?(lu(e,t,u),Xn(e,t,u)):(Ze&&z&&$o(t),t.flags|=1,Yt(e,t,i,u),t.child)}function Dh(e,t,a,i,u){if(e===null){var d=a.type;return typeof d=="function"&&!Mo(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,zh(e,t,d,i,u)):(e=Ml(a.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ru(e,u)){var b=d.memoizedProps;if(a=a.compare,a=a!==null?a:ui,a(b,i)&&e.ref===t.ref)return Xn(e,t,u)}return t.flags|=1,e=In(d,i),e.ref=t.ref,e.return=t,t.child=e}function zh(e,t,a,i,u){if(e!==null){var d=e.memoizedProps;if(ui(d,i)&&e.ref===t.ref)if(kt=!1,t.pendingProps=i=d,Ru(e,u))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,Xn(e,t,u)}return _u(e,t,a,i,u)}function Uh(e,t,a,i){var u=i.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(i=t.child=e.child,u=0;i!==null;)u=u|i.lanes|i.childLanes,i=i.sibling;i=u&~d}else i=0,t.child=null;return Mh(e,t,d,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hl(t,d!==null?d.cachePool:null),d!==null?Bf(t,d):eu(),$f(t);else return i=t.lanes=536870912,Mh(e,t,d!==null?d.baseLanes|a:a,a,i)}else d!==null?(Hl(t,d.cachePool),Bf(t,d),ba(),t.memoizedState=null):(e!==null&&Hl(t,null),eu(),ba());return Yt(e,t,u,a),t.child}function _i(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mh(e,t,a,i,u){var d=Zo();return d=d===null?null:{parent:At._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Hl(t,null),eu(),$f(t),e!==null&&br(e,t,i,!0),t.childLanes=u,null}function ns(e,t){return t=rs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lh(e,t,a){return Qa(t,e.child,null,a),e=ns(t,t.pendingProps),e.flags|=2,dn(t),t.memoizedState=null,e}function eb(e,t,a){var i=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ze){if(i.mode==="hidden")return e=ns(t,i),t.lanes=536870912,_i(null,e);if(nu(t),(e=ct)?(e=Xp(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:zn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=xf(e),a.return=t,t.child=a,It=t,ct=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return ns(t,i)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(nu(t),u)if(t.flags&256)t.flags&=-257,t=Lh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(kt||br(e,t,a,!1),u=(a&e.childLanes)!==0,kt||u){if(i=st,i!==null&&(b=Wr(i,a),b!==0&&b!==d.retryLane))throw d.retryLane=b,Ga(e,b),ln(i,e,b),wu;hs(),t=Lh(e,t,a)}else e=d.treeContext,ct=_n(b.nextSibling),It=t,Ze=!0,fa=null,jn=!1,e!==null&&wf(t,e),t=ns(t,i),t.flags|=4096;return t}return e=In(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function as(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function _u(e,t,a,i,u){return Fa(t),a=ru(e,t,a,i,void 0,u),i=iu(),e!==null&&!kt?(lu(e,t,u),Xn(e,t,u)):(Ze&&i&&$o(t),t.flags|=1,Yt(e,t,a,u),t.child)}function Bh(e,t,a,i,u,d){return Fa(t),t.updateQueue=null,a=qf(t,i,a,u),Hf(e),i=iu(),e!==null&&!kt?(lu(e,t,d),Xn(e,t,d)):(Ze&&i&&$o(t),t.flags|=1,Yt(e,t,a,d),t.child)}function $h(e,t,a,i,u){if(Fa(t),t.stateNode===null){var d=mr,b=a.contextType;typeof b=="object"&&b!==null&&(d=Vt(b)),d=new a(i,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Su,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=i,d.state=t.memoizedState,d.refs={},Qo(t),b=a.contextType,d.context=typeof b=="object"&&b!==null?Vt(b):mr,d.state=t.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(xu(t,a,b,i),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&Su.enqueueReplaceState(d,d.state,null),bi(t,i,d,u),yi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){d=t.stateNode;var z=t.memoizedProps,Z=Ja(a,z);d.props=Z;var ce=d.context,pe=a.contextType;b=mr,typeof pe=="object"&&pe!==null&&(b=Vt(pe));var ve=a.getDerivedStateFromProps;pe=typeof ve=="function"||typeof d.getSnapshotBeforeUpdate=="function",z=t.pendingProps!==z,pe||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(z||ce!==b)&&Nh(t,d,i,b),ma=!1;var de=t.memoizedState;d.state=de,bi(t,i,d,u),yi(),ce=t.memoizedState,z||de!==ce||ma?(typeof ve=="function"&&(xu(t,a,ve,i),ce=t.memoizedState),(Z=ma||_h(t,a,Z,i,de,ce,b))?(pe||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=ce),d.props=i,d.state=ce,d.context=b,i=Z):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{d=t.stateNode,Ko(e,t),b=t.memoizedProps,pe=Ja(a,b),d.props=pe,ve=t.pendingProps,de=d.context,ce=a.contextType,Z=mr,typeof ce=="object"&&ce!==null&&(Z=Vt(ce)),z=a.getDerivedStateFromProps,(ce=typeof z=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==ve||de!==Z)&&Nh(t,d,i,Z),ma=!1,de=t.memoizedState,d.state=de,bi(t,i,d,u),yi();var fe=t.memoizedState;b!==ve||de!==fe||ma||e!==null&&e.dependencies!==null&&Bl(e.dependencies)?(typeof z=="function"&&(xu(t,a,z,i),fe=t.memoizedState),(pe=ma||_h(t,a,pe,i,de,fe,Z)||e!==null&&e.dependencies!==null&&Bl(e.dependencies))?(ce||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(i,fe,Z),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(i,fe,Z)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=fe),d.props=i,d.state=fe,d.context=Z,i=pe):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),i=!1)}return d=i,as(e,t),i=(t.flags&128)!==0,d||i?(d=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&i?(t.child=Qa(t,e.child,null,u),t.child=Qa(t,null,a,u)):Yt(e,t,a,u),t.memoizedState=d.state,e=t.child):e=Xn(e,t,u),e}function Hh(e,t,a,i){return Va(),t.flags|=256,Yt(e,t,a,i),t.child}var Nu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Eu(e){return{baseLanes:e,cachePool:Cf()}}function Tu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=hn),e}function qh(e,t,a){var i=t.pendingProps,u=!1,d=(t.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),b&&(u=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ze){if(u?ya(t):ba(),(e=ct)?(e=Xp(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:zn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=xf(e),a.return=t,t.child=a,It=t,ct=null)):e=null,e===null)throw ha(t);return uc(e)?t.lanes=32:t.lanes=536870912,null}var z=i.children;return i=i.fallback,u?(ba(),u=t.mode,z=rs({mode:"hidden",children:z},u),i=Ia(i,u,a,null),z.return=t,i.return=t,z.sibling=i,t.child=z,i=t.child,i.memoizedState=Eu(a),i.childLanes=Tu(e,b,a),t.memoizedState=Nu,_i(null,i)):(ya(t),Ou(t,z))}var Z=e.memoizedState;if(Z!==null&&(z=Z.dehydrated,z!==null)){if(d)t.flags&256?(ya(t),t.flags&=-257,t=Cu(e,t,a)):t.memoizedState!==null?(ba(),t.child=e.child,t.flags|=128,t=null):(ba(),z=i.fallback,u=t.mode,i=rs({mode:"visible",children:i.children},u),z=Ia(z,u,a,null),z.flags|=2,i.return=t,z.return=t,i.sibling=z,t.child=i,Qa(t,e.child,null,a),i=t.child,i.memoizedState=Eu(a),i.childLanes=Tu(e,b,a),t.memoizedState=Nu,t=_i(null,i));else if(ya(t),uc(z)){if(b=z.nextSibling&&z.nextSibling.dataset,b)var ce=b.dgst;b=ce,i=Error(o(419)),i.stack="",i.digest=b,fi({value:i,source:null,stack:null}),t=Cu(e,t,a)}else if(kt||br(e,t,a,!1),b=(a&e.childLanes)!==0,kt||b){if(b=st,b!==null&&(i=Wr(b,a),i!==0&&i!==Z.retryLane))throw Z.retryLane=i,Ga(e,i),ln(b,e,i),wu;oc(z)||hs(),t=Cu(e,t,a)}else oc(z)?(t.flags|=192,t.child=e.child,t=null):(e=Z.treeContext,ct=_n(z.nextSibling),It=t,Ze=!0,fa=null,jn=!1,e!==null&&wf(t,e),t=Ou(t,i.children),t.flags|=4096);return t}return u?(ba(),z=i.fallback,u=t.mode,Z=e.child,ce=Z.sibling,i=In(Z,{mode:"hidden",children:i.children}),i.subtreeFlags=Z.subtreeFlags&65011712,ce!==null?z=In(ce,z):(z=Ia(z,u,a,null),z.flags|=2),z.return=t,i.return=t,i.sibling=z,t.child=i,_i(null,i),i=t.child,z=e.child.memoizedState,z===null?z=Eu(a):(u=z.cachePool,u!==null?(Z=At._currentValue,u=u.parent!==Z?{parent:Z,pool:Z}:u):u=Cf(),z={baseLanes:z.baseLanes|a,cachePool:u}),i.memoizedState=z,i.childLanes=Tu(e,b,a),t.memoizedState=Nu,_i(e.child,i)):(ya(t),a=e.child,e=a.sibling,a=In(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=a,t.memoizedState=null,a)}function Ou(e,t){return t=rs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rs(e,t){return e=un(22,e,null,t),e.lanes=0,e}function Cu(e,t,a){return Qa(t,e.child,null,a),e=Ou(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gh(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Vo(e.return,t,a)}function Au(e,t,a,i,u,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:u,treeForkCount:d}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=i,b.tail=a,b.tailMode=u,b.treeForkCount=d)}function Ih(e,t,a){var i=t.pendingProps,u=i.revealOrder,d=i.tail;i=i.children;var b=Tt.current,z=(b&2)!==0;if(z?(b=b&1|2,t.flags|=128):b&=1,$(Tt,b),Yt(e,t,i,a),i=Ze?di:0,!z&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gh(e,a,t);else if(e.tag===19)Gh(e,a,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}switch(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Fl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),Au(t,!1,u,a,d,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Fl(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Au(t,!0,a,null,d,i);break;case"together":Au(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Xn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),ja|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(br(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=In(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=In(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ru(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bl(e)))}function tb(e,t,a){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),pa(t,At,e.memoizedState.cache),Va();break;case 27:case 5:je(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,nu(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(ya(t),t.flags|=128,null):(a&t.child.childLanes)!==0?qh(e,t,a):(ya(t),e=Xn(e,t,a),e!==null?e.sibling:null);ya(t);break;case 19:var u=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(br(e,t,a,!1),i=(a&t.childLanes)!==0),u){if(i)return Ih(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),$(Tt,Tt.current),i)break;return null;case 22:return t.lanes=0,Uh(e,t,a,t.pendingProps);case 24:pa(t,At,e.memoizedState.cache)}return Xn(e,t,a)}function Vh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!Ru(e,a)&&(t.flags&128)===0)return kt=!1,tb(e,t,a);kt=(e.flags&131072)!==0}else kt=!1,Ze&&(t.flags&1048576)!==0&&jf(t,di,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Za(t.elementType),t.type=e,typeof e=="function")Mo(e)?(i=Ja(e,i),t.tag=1,t=$h(null,t,e,i,a)):(t.tag=0,t=_u(null,t,e,i,a));else{if(e!=null){var u=e.$$typeof;if(u===M){t.tag=11,t=kh(null,t,e,i,a);break e}else if(u===H){t.tag=14,t=Dh(null,t,e,i,a);break e}}throw t=E(e)||e,Error(o(306,t,""))}}return t;case 0:return _u(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,u=Ja(i,t.pendingProps),$h(e,t,i,u,a);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var d=t.memoizedState;u=d.element,Ko(e,t),bi(t,i,null,a);var b=t.memoizedState;if(i=b.cache,pa(t,At,i),i!==d.cache&&Yo(t,[At],a,!0),yi(),i=b.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Hh(e,t,i,a);break e}else if(i!==u){u=bn(Error(o(424)),t),fi(u),t=Hh(e,t,i,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ct=_n(e.firstChild),It=t,Ze=!0,fa=null,jn=!0,a=Uf(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Va(),i===u){t=Xn(e,t,a);break e}Yt(e,t,i,a)}t=t.child}return t;case 26:return as(e,t),e===null?(a=tm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ze||(a=t.type,e=t.pendingProps,i=xs(ye.current).createElement(a),i[Et]=t,i[$t]=e,Ft(i,a,e),Ae(i),t.stateNode=i):t.memoizedState=tm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&Ze&&(i=t.stateNode=Jp(t.type,t.pendingProps,ye.current),It=t,jn=!0,u=ct,Ta(t.type)?(cc=u,ct=_n(i.firstChild)):ct=u),Yt(e,t,t.pendingProps.children,a),as(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ze&&((u=i=ct)&&(i=Rb(i,t.type,t.pendingProps,jn),i!==null?(t.stateNode=i,It=t,ct=_n(i.firstChild),jn=!1,u=!0):u=!1),u||ha(t)),je(t),u=t.type,d=t.pendingProps,b=e!==null?e.memoizedProps:null,i=d.children,ic(u,d)?i=null:b!==null&&ic(u,b)&&(t.flags|=32),t.memoizedState!==null&&(u=ru(e,t,Fy,null,null,a),$i._currentValue=u),as(e,t),Yt(e,t,i,a),t.child;case 6:return e===null&&Ze&&((e=a=ct)&&(a=kb(a,t.pendingProps,jn),a!==null?(t.stateNode=a,It=t,ct=null,e=!0):e=!1),e||ha(t)),null;case 13:return qh(e,t,a);case 4:return Ne(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Qa(t,null,i,a):Yt(e,t,i,a),t.child;case 11:return kh(e,t,t.type,t.pendingProps,a);case 7:return Yt(e,t,t.pendingProps,a),t.child;case 8:return Yt(e,t,t.pendingProps.children,a),t.child;case 12:return Yt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,pa(t,t.type,i.value),Yt(e,t,i.children,a),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,Fa(t),u=Vt(u),i=i(u),t.flags|=1,Yt(e,t,i,a),t.child;case 14:return Dh(e,t,t.type,t.pendingProps,a);case 15:return zh(e,t,t.type,t.pendingProps,a);case 19:return Ih(e,t,a);case 31:return eb(e,t,a);case 22:return Uh(e,t,a,t.pendingProps);case 24:return Fa(t),i=Vt(At),e===null?(u=Zo(),u===null&&(u=st,d=Fo(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),t.memoizedState={parent:i,cache:u},Qo(t),pa(t,At,u)):((e.lanes&a)!==0&&(Ko(e,t),bi(t,null,null,a),yi()),u=e.memoizedState,d=t.memoizedState,u.parent!==i?(u={parent:i,cache:i},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),pa(t,At,i)):(i=d.cache,pa(t,At,i),i!==u.cache&&Yo(t,[At],a,!0))),Yt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Qn(e){e.flags|=4}function ku(e,t,a,i,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(vp())e.flags|=8192;else throw Xa=Gl,Xo}else e.flags&=-16777217}function Yh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!lm(t))if(vp())e.flags|=8192;else throw Xa=Gl,Xo}function is(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Dn():536870912,e.lanes|=t,Rr|=t)}function Ni(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function nb(e,t,a){var i=t.pendingProps;switch(Ho(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Fn(At),oe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(yr(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Go())),dt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Qn(t),d!==null?(dt(t),Yh(t,d)):(dt(t),ku(t,u,null,i,a))):d?d!==e.memoizedState?(Qn(t),dt(t),Yh(t,d)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Qn(t),dt(t),ku(t,u,e,i,a)),null;case 27:if(Ee(t),a=ye.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Qn(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return dt(t),null}e=K.current,yr(t)?_f(t):(e=Jp(u,i,a),t.stateNode=e,Qn(t))}return dt(t),null;case 5:if(Ee(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Qn(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return dt(t),null}if(d=K.current,yr(t))_f(t);else{var b=xs(ye.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof i.is=="string"?b.createElement("select",{is:i.is}):b.createElement("select"),i.multiple?d.multiple=!0:i.size&&(d.size=i.size);break;default:d=typeof i.is=="string"?b.createElement(u,{is:i.is}):b.createElement(u)}}d[Et]=t,d[$t]=i;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)d.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=d;e:switch(Ft(d,u,i),u){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Qn(t)}}return dt(t),ku(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Qn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=ye.current,yr(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,u=It,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[Et]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||qp(e.nodeValue,a)),e||ha(t,!0)}else e=xs(e).createTextNode(i),e[Et]=t,t.stateNode=e}return dt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=yr(t),a!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Et]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else a=Go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(dn(t),t):(dn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return dt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=yr(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Et]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),u=!1}else u=Go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(dn(t),t):(dn(t),null)}return dn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==u&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),is(t,t.updateQueue),dt(t),null);case 4:return oe(),e===null&&ec(t.stateNode.containerInfo),dt(t),null;case 10:return Fn(t.type),dt(t),null;case 19:if(A(Tt),i=t.memoizedState,i===null)return dt(t),null;if(u=(t.flags&128)!==0,d=i.rendering,d===null)if(u)Ni(i,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Fl(e),d!==null){for(t.flags|=128,Ni(i,!1),e=d.updateQueue,t.updateQueue=e,is(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)bf(a,e),a=a.sibling;return $(Tt,Tt.current&1|2),Ze&&Vn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&we()>cs&&(t.flags|=128,u=!0,Ni(i,!1),t.lanes=4194304)}else{if(!u)if(e=Fl(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,is(t,e),Ni(i,!0),i.tail===null&&i.tailMode==="hidden"&&!d.alternate&&!Ze)return dt(t),null}else 2*we()-i.renderingStartTime>cs&&a!==536870912&&(t.flags|=128,u=!0,Ni(i,!1),t.lanes=4194304);i.isBackwards?(d.sibling=t.child,t.child=d):(e=i.last,e!==null?e.sibling=d:t.child=d,i.last=d)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=we(),e.sibling=null,a=Tt.current,$(Tt,u?a&1|2:a&1),Ze&&Vn(t,i.treeForkCount),e):(dt(t),null);case 22:case 23:return dn(t),tu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),a=t.updateQueue,a!==null&&is(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&A(Pa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Fn(At),dt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function ab(e,t){switch(Ho(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(At),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(dn(t),t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(Tt),null;case 4:return oe(),null;case 10:return Fn(t.type),null;case 22:case 23:return dn(t),tu(),e!==null&&A(Pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fn(At),null;case 25:return null;default:return null}}function Fh(e,t){switch(Ho(t),t.tag){case 3:Fn(At),oe();break;case 26:case 27:case 5:Ee(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&dn(t);break;case 13:dn(t);break;case 19:A(Tt);break;case 10:Fn(t.type);break;case 22:case 23:dn(t),tu(),e!==null&&A(Pa);break;case 24:Fn(At)}}function Ei(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){i=void 0;var d=a.create,b=a.inst;i=d(),b.destroy=i}a=a.next}while(a!==u)}}catch(z){at(t,t.return,z)}}function xa(e,t,a){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var d=u.next;i=d;do{if((i.tag&e)===e){var b=i.inst,z=b.destroy;if(z!==void 0){b.destroy=void 0,u=t;var Z=a,ce=z;try{ce()}catch(pe){at(u,Z,pe)}}}i=i.next}while(i!==d)}}catch(pe){at(t,t.return,pe)}}function Ph(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Lf(t,a)}catch(i){at(e,e.return,i)}}}function Zh(e,t,a){a.props=Ja(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){at(e,t,i)}}function Ti(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(u){at(e,t,u)}}function Mn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(u){at(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){at(e,t,u)}else a.current=null}function Xh(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(u){at(e,e.return,u)}}function Du(e,t,a){try{var i=e.stateNode;Nb(i,e.type,a,t),i[$t]=t}catch(u){at(e,e.return,u)}}function Qh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ta(e.type)||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qh(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.tag===27&&Ta(e.type)||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 Uu(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=qn));else if(i!==4&&(i===27&&Ta(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Uu(e,t,a),e=e.sibling;e!==null;)Uu(e,t,a),e=e.sibling}function ls(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Ta(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ls(e,t,a),e=e.sibling;e!==null;)ls(e,t,a),e=e.sibling}function Kh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ft(t,i,a),t[Et]=e,t[$t]=a}catch(d){at(e,e.return,d)}}var Kn=!1,Dt=!1,Mu=!1,Jh=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function rb(e,t){if(e=e.containerInfo,ac=Ts,e=cf(e),Co(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var u=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var b=0,z=-1,Z=-1,ce=0,pe=0,ve=e,de=null;t:for(;;){for(var fe;ve!==a||u!==0&&ve.nodeType!==3||(z=b+u),ve!==d||i!==0&&ve.nodeType!==3||(Z=b+i),ve.nodeType===3&&(b+=ve.nodeValue.length),(fe=ve.firstChild)!==null;)de=ve,ve=fe;for(;;){if(ve===e)break t;if(de===a&&++ce===u&&(z=b),de===d&&++pe===i&&(Z=b),(fe=ve.nextSibling)!==null)break;ve=de,de=ve.parentNode}ve=fe}a=z===-1||Z===-1?null:{start:z,end:Z}}else a=null}a=a||{start:0,end:0}}else a=null;for(rc={focusedElem:e,selectionRange:a},Ts=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,u=d.memoizedProps,d=d.memoizedState,i=a.stateNode;try{var Oe=Ja(a.type,u);e=i.getSnapshotBeforeUpdate(Oe,d),i.__reactInternalSnapshotBeforeUpdate=e}catch(ke){at(a,a.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)sc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":sc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ht=e;break}Ht=t.return}}function Wh(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:Wn(e,a),i&4&&Ei(5,a);break;case 1:if(Wn(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(b){at(a,a.return,b)}else{var u=Ja(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){at(a,a.return,b)}}i&64&&Ph(a),i&512&&Ti(a,a.return);break;case 3:if(Wn(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Lf(e,t)}catch(b){at(a,a.return,b)}}break;case 27:t===null&&i&4&&Kh(a);case 26:case 5:Wn(e,a),t===null&&i&4&&Xh(a),i&512&&Ti(a,a.return);break;case 12:Wn(e,a);break;case 31:Wn(e,a),i&4&&np(e,a);break;case 13:Wn(e,a),i&4&&ap(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=hb.bind(null,a),Db(e,a))));break;case 22:if(i=a.memoizedState!==null||Kn,!i){t=t!==null&&t.memoizedState!==null||Dt,u=Kn;var d=Dt;Kn=i,(Dt=t)&&!d?ea(e,a,(a.subtreeFlags&8772)!==0):Wn(e,a),Kn=u,Dt=d}break;case 30:break;default:Wn(e,a)}}function ep(e){var t=e.alternate;t!==null&&(e.alternate=null,ep(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mt=null,tn=!1;function Jn(e,t,a){for(a=a.child;a!==null;)tp(e,t,a),a=a.sibling}function tp(e,t,a){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Xe,a)}catch{}switch(a.tag){case 26:Dt||Mn(a,t),Jn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Dt||Mn(a,t);var i=mt,u=tn;Ta(a.type)&&(mt=a.stateNode,tn=!1),Jn(e,t,a),Mi(a.stateNode),mt=i,tn=u;break;case 5:Dt||Mn(a,t);case 6:if(i=mt,u=tn,mt=null,Jn(e,t,a),mt=i,tn=u,mt!==null)if(tn)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(d){at(a,t,d)}else try{mt.removeChild(a.stateNode)}catch(d){at(a,t,d)}break;case 18:mt!==null&&(tn?(e=mt,Pp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),$r(e)):Pp(mt,a.stateNode));break;case 4:i=mt,u=tn,mt=a.stateNode.containerInfo,tn=!0,Jn(e,t,a),mt=i,tn=u;break;case 0:case 11:case 14:case 15:xa(2,a,t),Dt||xa(4,a,t),Jn(e,t,a);break;case 1:Dt||(Mn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Zh(a,t,i)),Jn(e,t,a);break;case 21:Jn(e,t,a);break;case 22:Dt=(i=Dt)||a.memoizedState!==null,Jn(e,t,a),Dt=i;break;default:Jn(e,t,a)}}function np(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$r(e)}catch(a){at(t,t.return,a)}}}function ap(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$r(e)}catch(a){at(t,t.return,a)}}function ib(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jh),t;default:throw Error(o(435,e.tag))}}function ss(e,t){var a=ib(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var u=pb.bind(null,e,i);i.then(u,u)}})}function nn(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var u=a[i],d=e,b=t,z=b;e:for(;z!==null;){switch(z.tag){case 27:if(Ta(z.type)){mt=z.stateNode,tn=!1;break e}break;case 5:mt=z.stateNode,tn=!1;break e;case 3:case 4:mt=z.stateNode.containerInfo,tn=!0;break e}z=z.return}if(mt===null)throw Error(o(160));tp(d,b,u),mt=null,tn=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rp(t,e),t=t.sibling}var Cn=null;function rp(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),an(e),i&4&&(xa(3,e,e.return),Ei(3,e),xa(5,e,e.return));break;case 1:nn(t,e),an(e),i&512&&(Dt||a===null||Mn(a,a.return)),i&64&&Kn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var u=Cn;if(nn(t,e),an(e),i&512&&(Dt||a===null||Mn(a,a.return)),i&4){var d=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":d=u.getElementsByTagName("title")[0],(!d||d[ia]||d[Et]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(i),u.head.insertBefore(d,u.querySelector("head > title"))),Ft(d,i,a),d[Et]=e,Ae(d),i=d;break e;case"link":var b=rm("link","href",u).get(i+(a.href||""));if(b){for(var z=0;z<b.length;z++)if(d=b[z],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(z,1);break t}}d=u.createElement(i),Ft(d,i,a),u.head.appendChild(d);break;case"meta":if(b=rm("meta","content",u).get(i+(a.content||""))){for(z=0;z<b.length;z++)if(d=b[z],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(z,1);break t}}d=u.createElement(i),Ft(d,i,a),u.head.appendChild(d);break;default:throw Error(o(468,i))}d[Et]=e,Ae(d),i=d}e.stateNode=i}else im(u,e.type,e.stateNode);else e.stateNode=am(u,i,e.memoizedProps);else d!==i?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,i===null?im(u,e.type,e.stateNode):am(u,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Du(e,e.memoizedProps,a.memoizedProps)}break;case 27:nn(t,e),an(e),i&512&&(Dt||a===null||Mn(a,a.return)),a!==null&&i&4&&Du(e,e.memoizedProps,a.memoizedProps);break;case 5:if(nn(t,e),an(e),i&512&&(Dt||a===null||Mn(a,a.return)),e.flags&32){u=e.stateNode;try{or(u,"")}catch(Oe){at(e,e.return,Oe)}}i&4&&e.stateNode!=null&&(u=e.memoizedProps,Du(e,u,a!==null?a.memoizedProps:u)),i&1024&&(Mu=!0);break;case 6:if(nn(t,e),an(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(Oe){at(e,e.return,Oe)}}break;case 3:if(ws=null,u=Cn,Cn=Ss(t.containerInfo),nn(t,e),Cn=u,an(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{$r(t.containerInfo)}catch(Oe){at(e,e.return,Oe)}Mu&&(Mu=!1,ip(e));break;case 4:i=Cn,Cn=Ss(e.stateNode.containerInfo),nn(t,e),an(e),Cn=i;break;case 12:nn(t,e),an(e);break;case 31:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ss(e,i)));break;case 13:nn(t,e),an(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(us=we()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ss(e,i)));break;case 22:u=e.memoizedState!==null;var Z=a!==null&&a.memoizedState!==null,ce=Kn,pe=Dt;if(Kn=ce||u,Dt=pe||Z,nn(t,e),Dt=pe,Kn=ce,an(e),i&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||Z||Kn||Dt||Wa(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){Z=a=t;try{if(d=Z.stateNode,u)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{z=Z.stateNode;var ve=Z.memoizedProps.style,de=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;z.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(Oe){at(Z,Z.return,Oe)}}}else if(t.tag===6){if(a===null){Z=t;try{Z.stateNode.nodeValue=u?"":Z.memoizedProps}catch(Oe){at(Z,Z.return,Oe)}}}else if(t.tag===18){if(a===null){Z=t;try{var fe=Z.stateNode;u?Zp(fe,!0):Zp(Z.stateNode,!1)}catch(Oe){at(Z,Z.return,Oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,ss(e,a))));break;case 19:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ss(e,i)));break;case 30:break;case 21:break;default:nn(t,e),an(e)}}function an(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Qh(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var u=a.stateNode,d=zu(e);ls(e,d,u);break;case 5:var b=a.stateNode;a.flags&32&&(or(b,""),a.flags&=-33);var z=zu(e);ls(e,z,b);break;case 3:case 4:var Z=a.stateNode.containerInfo,ce=zu(e);Uu(e,ce,Z);break;default:throw Error(o(161))}}catch(pe){at(e,e.return,pe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ip(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ip(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wh(e,t.alternate,t),t=t.sibling}function Wa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xa(4,t,t.return),Wa(t);break;case 1:Mn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Zh(t,t.return,a),Wa(t);break;case 27:Mi(t.stateNode);case 26:case 5:Mn(t,t.return),Wa(t);break;case 22:t.memoizedState===null&&Wa(t);break;case 30:Wa(t);break;default:Wa(t)}e=e.sibling}}function ea(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,u=e,d=t,b=d.flags;switch(d.tag){case 0:case 11:case 15:ea(u,d,a),Ei(4,d);break;case 1:if(ea(u,d,a),i=d,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(ce){at(i,i.return,ce)}if(i=d,u=i.updateQueue,u!==null){var z=i.stateNode;try{var Z=u.shared.hiddenCallbacks;if(Z!==null)for(u.shared.hiddenCallbacks=null,u=0;u<Z.length;u++)Mf(Z[u],z)}catch(ce){at(i,i.return,ce)}}a&&b&64&&Ph(d),Ti(d,d.return);break;case 27:Kh(d);case 26:case 5:ea(u,d,a),a&&i===null&&b&4&&Xh(d),Ti(d,d.return);break;case 12:ea(u,d,a);break;case 31:ea(u,d,a),a&&b&4&&np(u,d);break;case 13:ea(u,d,a),a&&b&4&&ap(u,d);break;case 22:d.memoizedState===null&&ea(u,d,a),Ti(d,d.return);break;case 30:break;default:ea(u,d,a)}t=t.sibling}}function Lu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&hi(a))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e))}function An(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lp(e,t,a,i),t=t.sibling}function lp(e,t,a,i){var u=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,a,i),u&2048&&Ei(9,t);break;case 1:An(e,t,a,i);break;case 3:An(e,t,a,i),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e)));break;case 12:if(u&2048){An(e,t,a,i),e=t.stateNode;try{var d=t.memoizedProps,b=d.id,z=d.onPostCommit;typeof z=="function"&&z(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Z){at(t,t.return,Z)}}else An(e,t,a,i);break;case 31:An(e,t,a,i);break;case 13:An(e,t,a,i);break;case 23:break;case 22:d=t.stateNode,b=t.alternate,t.memoizedState!==null?d._visibility&2?An(e,t,a,i):Oi(e,t):d._visibility&2?An(e,t,a,i):(d._visibility|=2,Or(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Lu(b,t);break;case 24:An(e,t,a,i),u&2048&&Bu(t.alternate,t);break;default:An(e,t,a,i)}}function Or(e,t,a,i,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,b=t,z=a,Z=i,ce=b.flags;switch(b.tag){case 0:case 11:case 15:Or(d,b,z,Z,u),Ei(8,b);break;case 23:break;case 22:var pe=b.stateNode;b.memoizedState!==null?pe._visibility&2?Or(d,b,z,Z,u):Oi(d,b):(pe._visibility|=2,Or(d,b,z,Z,u)),u&&ce&2048&&Lu(b.alternate,b);break;case 24:Or(d,b,z,Z,u),u&&ce&2048&&Bu(b.alternate,b);break;default:Or(d,b,z,Z,u)}t=t.sibling}}function Oi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,u=i.flags;switch(i.tag){case 22:Oi(a,i),u&2048&&Lu(i.alternate,i);break;case 24:Oi(a,i),u&2048&&Bu(i.alternate,i);break;default:Oi(a,i)}t=t.sibling}}var Ci=8192;function Cr(e,t,a){if(e.subtreeFlags&Ci)for(e=e.child;e!==null;)sp(e,t,a),e=e.sibling}function sp(e,t,a){switch(e.tag){case 26:Cr(e,t,a),e.flags&Ci&&e.memoizedState!==null&&Yb(a,Cn,e.memoizedState,e.memoizedProps);break;case 5:Cr(e,t,a);break;case 3:case 4:var i=Cn;Cn=Ss(e.stateNode.containerInfo),Cr(e,t,a),Cn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Ci,Ci=16777216,Cr(e,t,a),Ci=i):Cr(e,t,a));break;default:Cr(e,t,a)}}function op(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ai(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];Ht=i,cp(i,e)}op(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)up(e),e=e.sibling}function up(e){switch(e.tag){case 0:case 11:case 15:Ai(e),e.flags&2048&&xa(9,e,e.return);break;case 3:Ai(e);break;case 12:Ai(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,os(e)):Ai(e);break;default:Ai(e)}}function os(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];Ht=i,cp(i,e)}op(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xa(8,t,t.return),os(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,os(t));break;default:os(t)}e=e.sibling}}function cp(e,t){for(;Ht!==null;){var a=Ht;switch(a.tag){case 0:case 11:case 15:xa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:hi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,Ht=i;else e:for(a=e;Ht!==null;){i=Ht;var u=i.sibling,d=i.return;if(ep(i),i===a){Ht=null;break e}if(u!==null){u.return=d,Ht=u;break e}Ht=d}}}var lb={getCacheForType:function(e){var t=Vt(At),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Vt(At).controller.signal}},sb=typeof WeakMap=="function"?WeakMap:Map,We=0,st=null,Ie=null,Ye=0,nt=0,fn=null,Sa=!1,Ar=!1,$u=!1,ta=0,_t=0,ja=0,er=0,Hu=0,hn=0,Rr=0,Ri=null,rn=null,qu=!1,us=0,dp=0,cs=1/0,ds=null,wa=null,Mt=0,_a=null,kr=null,na=0,Gu=0,Iu=null,fp=null,ki=0,Vu=null;function pn(){return(We&2)!==0&&Ye!==0?Ye&-Ye:V.T!==null?Qu():vl()}function hp(){if(hn===0)if((Ye&536870912)===0||Ze){var e=St;St<<=1,(St&3932160)===0&&(St=262144),hn=e}else hn=536870912;return e=cn.current,e!==null&&(e.flags|=32),hn}function ln(e,t,a){(e===st&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Dr(e,0),Na(e,Ye,hn,!1)),Ut(e,a),((We&2)===0||e!==st)&&(e===st&&((We&2)===0&&(er|=a),_t===4&&Na(e,Ye,hn,!1)),Ln(e))}function pp(e,t,a){if((We&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Bt(e,t),u=i?cb(e,t):Fu(e,t,!0),d=i;do{if(u===0){Ar&&!i&&Na(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!ob(a)){u=Fu(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var z=e;u=Ri;var Z=z.current.memoizedState.isDehydrated;if(Z&&(Dr(z,b).flags|=256),b=Fu(z,b,!1),b!==2){if($u&&!Z){z.errorRecoveryDisabledLanes|=d,er|=d,u=4;break e}d=rn,rn=u,d!==null&&(rn===null?rn=d:rn.push.apply(rn,d))}u=b}if(d=!1,u!==2)continue}}if(u===1){Dr(e,0),Na(e,t,0,!0);break}e:{switch(i=e,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Na(i,t,hn,!Sa);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=us+300-we(),10<u)){if(Na(i,t,hn,!Sa),Gt(i,0,!0)!==0)break e;na=t,i.timeoutHandle=Yp(mp.bind(null,i,a,rn,ds,qu,t,hn,er,Rr,Sa,d,"Throttled",-0,0),u);break e}mp(i,a,rn,ds,qu,t,hn,er,Rr,Sa,d,null,-0,0)}}break}while(!0);Ln(e)}function mp(e,t,a,i,u,d,b,z,Z,ce,pe,ve,de,fe){if(e.timeoutHandle=-1,ve=t.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qn},sp(t,d,ve);var Oe=(d&62914560)===d?us-we():(d&4194048)===d?dp-we():0;if(Oe=Fb(ve,Oe),Oe!==null){na=d,e.cancelPendingCommit=Oe(wp.bind(null,e,t,d,a,i,u,b,z,Z,pe,ve,null,de,fe)),Na(e,d,b,!ce);return}}wp(e,t,d,a,i,u,b,z,Z)}function ob(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var u=a[i],d=u.getSnapshot;u=u.value;try{if(!on(d(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Na(e,t,a,i){t&=~Hu,t&=~er,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var u=t;0<u;){var d=31-Me(u),b=1<<d;i[d]=-1,u&=~b}a!==0&&Ge(e,a,t)}function fs(){return(We&6)===0?(Di(0),!1):!0}function Yu(){if(Ie!==null){if(nt===0)var e=Ie.return;else e=Ie,Yn=Ya=null,su(e),wr=null,mi=0,e=Ie;for(;e!==null;)Fh(e.alternate,e),e=e.return;Ie=null}}function Dr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Ob(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),na=0,Yu(),st=e,Ie=a=In(e.current,null),Ye=t,nt=0,fn=null,Sa=!1,Ar=Bt(e,t),$u=!1,Rr=hn=Hu=er=ja=_t=0,rn=Ri=null,qu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var u=31-Me(i),d=1<<u;t|=e[u],i&=~d}return ta=t,Dl(),a}function gp(e,t){Le=null,V.H=wi,t===jr||t===ql?(t=kf(),nt=3):t===Xo?(t=kf(),nt=4):nt=t===wu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fn=t,Ie===null&&(_t=1,ts(e,bn(t,e.current)))}function vp(){var e=cn.current;return e===null?!0:(Ye&4194048)===Ye?wn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===wn:!1}function yp(){var e=V.H;return V.H=wi,e===null?wi:e}function bp(){var e=V.A;return V.A=lb,e}function hs(){_t=4,Sa||(Ye&4194048)!==Ye&&cn.current!==null||(Ar=!0),(ja&134217727)===0&&(er&134217727)===0||st===null||Na(st,Ye,hn,!1)}function Fu(e,t,a){var i=We;We|=2;var u=yp(),d=bp();(st!==e||Ye!==t)&&(ds=null,Dr(e,t)),t=!1;var b=_t;e:do try{if(nt!==0&&Ie!==null){var z=Ie,Z=fn;switch(nt){case 8:Yu(),b=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(t=!0);var ce=nt;if(nt=0,fn=null,zr(e,z,Z,ce),a&&Ar){b=0;break e}break;default:ce=nt,nt=0,fn=null,zr(e,z,Z,ce)}}ub(),b=_t;break}catch(pe){gp(e,pe)}while(!0);return t&&e.shellSuspendCounter++,Yn=Ya=null,We=i,V.H=u,V.A=d,Ie===null&&(st=null,Ye=0,Dl()),b}function ub(){for(;Ie!==null;)xp(Ie)}function cb(e,t){var a=We;We|=2;var i=yp(),u=bp();st!==e||Ye!==t?(ds=null,cs=we()+500,Dr(e,t)):Ar=Bt(e,t);e:do try{if(nt!==0&&Ie!==null){t=Ie;var d=fn;t:switch(nt){case 1:nt=0,fn=null,zr(e,t,d,1);break;case 2:case 9:if(Af(d)){nt=0,fn=null,Sp(t);break}t=function(){nt!==2&&nt!==9||st!==e||(nt=7),Ln(e)},d.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:Af(d)?(nt=0,fn=null,Sp(t)):(nt=0,fn=null,zr(e,t,d,7));break;case 5:var b=null;switch(Ie.tag){case 26:b=Ie.memoizedState;case 5:case 27:var z=Ie;if(b?lm(b):z.stateNode.complete){nt=0,fn=null;var Z=z.sibling;if(Z!==null)Ie=Z;else{var ce=z.return;ce!==null?(Ie=ce,ps(ce)):Ie=null}break t}}nt=0,fn=null,zr(e,t,d,5);break;case 6:nt=0,fn=null,zr(e,t,d,6);break;case 8:Yu(),_t=6;break e;default:throw Error(o(462))}}db();break}catch(pe){gp(e,pe)}while(!0);return Yn=Ya=null,V.H=i,V.A=u,We=a,Ie!==null?0:(st=null,Ye=0,Dl(),_t)}function db(){for(;Ie!==null&&!te();)xp(Ie)}function xp(e){var t=Vh(e.alternate,e,ta);e.memoizedProps=e.pendingProps,t===null?ps(e):Ie=t}function Sp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Bh(a,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=Bh(a,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:su(t);default:Fh(a,t),t=Ie=bf(t,ta),t=Vh(a,t,ta)}e.memoizedProps=e.pendingProps,t===null?ps(e):Ie=t}function zr(e,t,a,i){Yn=Ya=null,su(t),wr=null,mi=0;var u=t.return;try{if(Wy(e,u,t,a,Ye)){_t=1,ts(e,bn(a,e.current)),Ie=null;return}}catch(d){if(u!==null)throw Ie=u,d;_t=1,ts(e,bn(a,e.current)),Ie=null;return}t.flags&32768?(Ze||i===1?e=!0:Ar||(Ye&536870912)!==0?e=!1:(Sa=e=!0,(i===2||i===9||i===3||i===6)&&(i=cn.current,i!==null&&i.tag===13&&(i.flags|=16384))),jp(t,e)):ps(t)}function ps(e){var t=e;do{if((t.flags&32768)!==0){jp(t,Sa);return}e=t.return;var a=nb(t.alternate,t,ta);if(a!==null){Ie=a;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);_t===0&&(_t=5)}function jp(e,t){do{var a=ab(e.alternate,e);if(a!==null){a.flags&=32767,Ie=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ie=e;return}Ie=e=a}while(e!==null);_t=6,Ie=null}function wp(e,t,a,i,u,d,b,z,Z){e.cancelPendingCommit=null;do ms();while(Mt!==0);if((We&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=zo,ze(e,a,d,b,z,Z),e===st&&(Ie=st=null,Ye=0),kr=t,_a=e,na=a,Gu=d,Iu=u,fp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mb(De,function(){return Op(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null,u=P.p,P.p=2,b=We,We|=4;try{rb(e,t,a)}finally{We=b,P.p=u,V.T=i}}Mt=1,_p(),Np(),Ep()}}function _p(){if(Mt===1){Mt=0;var e=_a,t=kr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=V.T,V.T=null;var i=P.p;P.p=2;var u=We;We|=4;try{rp(t,e);var d=rc,b=cf(e.containerInfo),z=d.focusedElem,Z=d.selectionRange;if(b!==z&&z&&z.ownerDocument&&uf(z.ownerDocument.documentElement,z)){if(Z!==null&&Co(z)){var ce=Z.start,pe=Z.end;if(pe===void 0&&(pe=ce),"selectionStart"in z)z.selectionStart=ce,z.selectionEnd=Math.min(pe,z.value.length);else{var ve=z.ownerDocument||document,de=ve&&ve.defaultView||window;if(de.getSelection){var fe=de.getSelection(),Oe=z.textContent.length,ke=Math.min(Z.start,Oe),lt=Z.end===void 0?ke:Math.min(Z.end,Oe);!fe.extend&&ke>lt&&(b=lt,lt=ke,ke=b);var le=of(z,ke),ee=of(z,lt);if(le&&ee&&(fe.rangeCount!==1||fe.anchorNode!==le.node||fe.anchorOffset!==le.offset||fe.focusNode!==ee.node||fe.focusOffset!==ee.offset)){var ue=ve.createRange();ue.setStart(le.node,le.offset),fe.removeAllRanges(),ke>lt?(fe.addRange(ue),fe.extend(ee.node,ee.offset)):(ue.setEnd(ee.node,ee.offset),fe.addRange(ue))}}}}for(ve=[],fe=z;fe=fe.parentNode;)fe.nodeType===1&&ve.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ve.length;z++){var me=ve[z];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}Ts=!!ac,rc=ac=null}finally{We=u,P.p=i,V.T=a}}e.current=t,Mt=2}}function Np(){if(Mt===2){Mt=0;var e=_a,t=kr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=V.T,V.T=null;var i=P.p;P.p=2;var u=We;We|=4;try{Wh(e,t.alternate,t)}finally{We=u,P.p=i,V.T=a}}Mt=3}}function Ep(){if(Mt===4||Mt===3){Mt=0,xe();var e=_a,t=kr,a=na,i=fp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,kr=_a=null,Tp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(wa=null),ei(a),t=t.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Xe,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=V.T,u=P.p,P.p=2,V.T=null;try{for(var d=e.onRecoverableError,b=0;b<i.length;b++){var z=i[b];d(z.value,{componentStack:z.stack})}}finally{V.T=t,P.p=u}}(na&3)!==0&&ms(),Ln(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Vu?ki++:(ki=0,Vu=e):ki=0,Di(0)}}function Tp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hi(t)))}function ms(){return _p(),Np(),Ep(),Op()}function Op(){if(Mt!==5)return!1;var e=_a,t=Gu;Gu=0;var a=ei(na),i=V.T,u=P.p;try{P.p=32>a?32:a,V.T=null,a=Iu,Iu=null;var d=_a,b=na;if(Mt=0,kr=_a=null,na=0,(We&6)!==0)throw Error(o(331));var z=We;if(We|=4,up(d.current),lp(d,d.current,b,a),We=z,Di(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Xe,d)}catch{}return!0}finally{P.p=u,V.T=i,Tp(e,t)}}function Cp(e,t,a){t=bn(a,t),t=ju(e.stateNode,t,2),e=va(e,t,2),e!==null&&(Ut(e,2),Ln(e))}function at(e,t,a){if(e.tag===3)Cp(e,e,a);else for(;t!==null;){if(t.tag===3){Cp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(wa===null||!wa.has(i))){e=bn(a,e),a=Ah(2),i=va(t,a,2),i!==null&&(Rh(a,i,t,e),Ut(i,2),Ln(i));break}}t=t.return}}function Pu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new sb;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(a)||($u=!0,u.add(a),e=fb.bind(null,e,t,a),t.then(e,e))}function fb(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,st===e&&(Ye&a)===a&&(_t===4||_t===3&&(Ye&62914560)===Ye&&300>we()-us?(We&2)===0&&Dr(e,0):Hu|=a,Rr===Ye&&(Rr=0)),Ln(e)}function Ap(e,t){t===0&&(t=Dn()),e=Ga(e,t),e!==null&&(Ut(e,t),Ln(e))}function hb(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ap(e,a)}function pb(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),Ap(e,a)}function mb(e,t){return ge(e,t)}var gs=null,Ur=null,Zu=!1,vs=!1,Xu=!1,Ea=0;function Ln(e){e!==Ur&&e.next===null&&(Ur===null?gs=Ur=e:Ur=Ur.next=e),vs=!0,Zu||(Zu=!0,vb())}function Di(e,t){if(!Xu&&vs){Xu=!0;do for(var a=!1,i=gs;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var d=0;else{var b=i.suspendedLanes,z=i.pingedLanes;d=(1<<31-Me(42|e)+1)-1,d&=u&~(b&~z),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,zp(i,d))}else d=Ye,d=Gt(i,i===st?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(d&3)===0||Bt(i,d)||(a=!0,zp(i,d));i=i.next}while(a);Xu=!1}}function gb(){Rp()}function Rp(){vs=Zu=!1;var e=0;Ea!==0&&Tb()&&(e=Ea);for(var t=we(),a=null,i=gs;i!==null;){var u=i.next,d=kp(i,t);d===0?(i.next=null,a===null?gs=u:a.next=u,u===null&&(Ur=a)):(a=i,(e!==0||(d&3)!==0)&&(vs=!0)),i=u}Mt!==0&&Mt!==5||Di(e),Ea!==0&&(Ea=0)}function kp(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-Me(d),z=1<<b,Z=u[b];Z===-1?((z&a)===0||(z&i)!==0)&&(u[b]=pt(z,t)):Z<=t&&(e.expiredLanes|=z),d&=~z}if(t=st,a=Ye,a=Gt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&he(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Bt(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&he(i),ei(a)){case 2:case 8:a=qe;break;case 32:a=De;break;case 268435456:a=Nt;break;default:a=De}return i=Dp.bind(null,e),a=ge(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&he(i),e.callbackPriority=2,e.callbackNode=null,2}function Dp(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(ms()&&e.callbackNode!==a)return null;var i=Ye;return i=Gt(e,e===st?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(pp(e,i,t),kp(e,we()),e.callbackNode!=null&&e.callbackNode===a?Dp.bind(null,e):null)}function zp(e,t){if(ms())return null;pp(e,t,!0)}function vb(){Cb(function(){(We&6)!==0?ge(Te,gb):Rp()})}function Qu(){if(Ea===0){var e=xr;e===0&&(e=et,et<<=1,(et&261888)===0&&(et=256)),Ea=e}return Ea}function Up(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Nl(""+e)}function Mp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function yb(e,t,a,i,u){if(t==="submit"&&a&&a.stateNode===u){var d=Up((u[$t]||null).action),b=i.submitter;b&&(t=(t=b[$t]||null)?Up(t.formAction):b.getAttribute("formAction"),t!==null&&(d=t,b=null));var z=new Cl("action","action",null,i,u);e.push({event:z,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Ea!==0){var Z=b?Mp(u,b):new FormData(u);gu(a,{pending:!0,data:Z,method:u.method,action:d},null,Z)}}else typeof d=="function"&&(z.preventDefault(),Z=b?Mp(u,b):new FormData(u),gu(a,{pending:!0,data:Z,method:u.method,action:d},d,Z))},currentTarget:u}]})}}for(var Ku=0;Ku<Do.length;Ku++){var Ju=Do[Ku],bb=Ju.toLowerCase(),xb=Ju[0].toUpperCase()+Ju.slice(1);On(bb,"on"+xb)}On(hf,"onAnimationEnd"),On(pf,"onAnimationIteration"),On(mf,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(My,"onTransitionRun"),On(Ly,"onTransitionStart"),On(By,"onTransitionCancel"),On(gf,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),jt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jt("onBeforeInput",["compositionend","keypress","textInput","paste"]),jt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="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(" "),Sb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zi));function Lp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],u=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var b=i.length-1;0<=b;b--){var z=i[b],Z=z.instance,ce=z.currentTarget;if(z=z.listener,Z!==d&&u.isPropagationStopped())break e;d=z,u.currentTarget=ce;try{d(u)}catch(pe){kl(pe)}u.currentTarget=null,d=Z}else for(b=0;b<i.length;b++){if(z=i[b],Z=z.instance,ce=z.currentTarget,z=z.listener,Z!==d&&u.isPropagationStopped())break e;d=z,u.currentTarget=ce;try{d(u)}catch(pe){kl(pe)}u.currentTarget=null,d=Z}}}}function Ve(e,t){var a=t[ti];a===void 0&&(a=t[ti]=new Set);var i=e+"__bubble";a.has(i)||(Bp(t,e,2,!1),a.add(i))}function Wu(e,t,a){var i=0;t&&(i|=4),Bp(a,e,i,t)}var ys="_reactListening"+Math.random().toString(36).slice(2);function ec(e){if(!e[ys]){e[ys]=!0,tt.forEach(function(a){a!=="selectionchange"&&(Sb.has(a)||Wu(a,!1,e),Wu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ys]||(t[ys]=!0,Wu("selectionchange",!1,t))}}function Bp(e,t,a,i){switch(hm(t)){case 2:var u=Xb;break;case 8:u=Qb;break;default:u=mc}a=u.bind(null,t,a,e),u=void 0,!xo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function tc(e,t,a,i,u){var d=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var b=i.tag;if(b===3||b===4){var z=i.stateNode.containerInfo;if(z===u)break;if(b===4)for(b=i.return;b!==null;){var Z=b.tag;if((Z===3||Z===4)&&b.stateNode.containerInfo===u)return;b=b.return}for(;z!==null;){if(b=la(z),b===null)return;if(Z=b.tag,Z===5||Z===6||Z===26||Z===27){i=d=b;continue e}z=z.parentNode}}i=i.return}Gd(function(){var ce=d,pe=yo(a),ve=[];e:{var de=vf.get(e);if(de!==void 0){var fe=Cl,Oe=e;switch(e){case"keypress":if(Tl(a)===0)break e;case"keydown":case"keyup":fe=py;break;case"focusin":Oe="focus",fe=_o;break;case"focusout":Oe="blur",fe=_o;break;case"beforeblur":case"afterblur":fe=_o;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=Yd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=ny;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=vy;break;case hf:case pf:case mf:fe=iy;break;case gf:fe=by;break;case"scroll":case"scrollend":fe=ey;break;case"wheel":fe=Sy;break;case"copy":case"cut":case"paste":fe=sy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=Pd;break;case"toggle":case"beforetoggle":fe=wy}var ke=(t&4)!==0,lt=!ke&&(e==="scroll"||e==="scrollend"),le=ke?de!==null?de+"Capture":null:de;ke=[];for(var ee=ce,ue;ee!==null;){var me=ee;if(ue=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ue===null||le===null||(me=ni(ee,le),me!=null&&ke.push(Ui(ee,me,ue))),lt)break;ee=ee.return}0<ke.length&&(de=new fe(de,Oe,null,a,pe),ve.push({event:de,listeners:ke}))}}if((t&7)===0){e:{if(de=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",de&&a!==vo&&(Oe=a.relatedTarget||a.fromElement)&&(la(Oe)||Oe[ra]))break e;if((fe||de)&&(de=pe.window===pe?pe:(de=pe.ownerDocument)?de.defaultView||de.parentWindow:window,fe?(Oe=a.relatedTarget||a.toElement,fe=ce,Oe=Oe?la(Oe):null,Oe!==null&&(lt=h(Oe),ke=Oe.tag,Oe!==lt||ke!==5&&ke!==27&&ke!==6)&&(Oe=null)):(fe=null,Oe=ce),fe!==Oe)){if(ke=Yd,me="onMouseLeave",le="onMouseEnter",ee="mouse",(e==="pointerout"||e==="pointerover")&&(ke=Pd,me="onPointerLeave",le="onPointerEnter",ee="pointer"),lt=fe==null?de:Ba(fe),ue=Oe==null?de:Ba(Oe),de=new ke(me,ee+"leave",fe,a,pe),de.target=lt,de.relatedTarget=ue,me=null,la(pe)===ce&&(ke=new ke(le,ee+"enter",Oe,a,pe),ke.target=ue,ke.relatedTarget=lt,me=ke),lt=me,fe&&Oe)t:{for(ke=jb,le=fe,ee=Oe,ue=0,me=le;me;me=ke(me))ue++;me=0;for(var Re=ee;Re;Re=ke(Re))me++;for(;0<ue-me;)le=ke(le),ue--;for(;0<me-ue;)ee=ke(ee),me--;for(;ue--;){if(le===ee||ee!==null&&le===ee.alternate){ke=le;break t}le=ke(le),ee=ke(ee)}ke=null}else ke=null;fe!==null&&$p(ve,de,fe,ke,!1),Oe!==null&&lt!==null&&$p(ve,lt,Oe,ke,!0)}}e:{if(de=ce?Ba(ce):window,fe=de.nodeName&&de.nodeName.toLowerCase(),fe==="select"||fe==="input"&&de.type==="file")var Qe=tf;else if(Wd(de))if(nf)Qe=Dy;else{Qe=Ry;var Ce=Ay}else fe=de.nodeName,!fe||fe.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ce&&go(ce.elementType)&&(Qe=tf):Qe=ky;if(Qe&&(Qe=Qe(e,ce))){ef(ve,Qe,a,pe);break e}Ce&&Ce(e,de,ce),e==="focusout"&&ce&&de.type==="number"&&ce.memoizedProps.value!=null&&mo(de,"number",de.value)}switch(Ce=ce?Ba(ce):window,e){case"focusin":(Wd(Ce)||Ce.contentEditable==="true")&&(fr=Ce,Ao=ce,ci=null);break;case"focusout":ci=Ao=fr=null;break;case"mousedown":Ro=!0;break;case"contextmenu":case"mouseup":case"dragend":Ro=!1,df(ve,a,pe);break;case"selectionchange":if(Uy)break;case"keydown":case"keyup":df(ve,a,pe)}var Be;if(Eo)e:{switch(e){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else dr?Kd(e,a)&&(Fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Fe="onCompositionStart");Fe&&(Zd&&a.locale!=="ko"&&(dr||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&dr&&(Be=Id()):(ca=pe,So="value"in ca?ca.value:ca.textContent,dr=!0)),Ce=bs(ce,Fe),0<Ce.length&&(Fe=new Fd(Fe,e,null,a,pe),ve.push({event:Fe,listeners:Ce}),Be?Fe.data=Be:(Be=Jd(a),Be!==null&&(Fe.data=Be)))),(Be=Ny?Ey(e,a):Ty(e,a))&&(Fe=bs(ce,"onBeforeInput"),0<Fe.length&&(Ce=new Fd("onBeforeInput","beforeinput",null,a,pe),ve.push({event:Ce,listeners:Fe}),Ce.data=Be)),yb(ve,e,ce,a,pe)}Lp(ve,t)})}function Ui(e,t,a){return{instance:e,listener:t,currentTarget:a}}function bs(e,t){for(var a=t+"Capture",i=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=ni(e,a),u!=null&&i.unshift(Ui(e,u,d)),u=ni(e,t),u!=null&&i.push(Ui(e,u,d))),e.tag===3)return i;e=e.return}return[]}function jb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $p(e,t,a,i,u){for(var d=t._reactName,b=[];a!==null&&a!==i;){var z=a,Z=z.alternate,ce=z.stateNode;if(z=z.tag,Z!==null&&Z===i)break;z!==5&&z!==26&&z!==27||ce===null||(Z=ce,u?(ce=ni(a,d),ce!=null&&b.unshift(Ui(a,ce,Z))):u||(ce=ni(a,d),ce!=null&&b.push(Ui(a,ce,Z)))),a=a.return}b.length!==0&&e.push({event:t,listeners:b})}var wb=/\r\n?/g,_b=/\u0000|\uFFFD/g;function Hp(e){return(typeof e=="string"?e:""+e).replace(wb,`
9
+ `).replace(_b,"")}function qp(e,t){return t=Hp(t),Hp(e)===t}function it(e,t,a,i,u,d){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||or(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&or(e,""+i);break;case"className":ua(e,"class",i);break;case"tabIndex":ua(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ua(e,a,i);break;case"style":Hd(e,i,d);break;case"data":if(t!=="object"){ua(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Nl(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&it(e,t,"name",u.name,u,null),it(e,t,"formEncType",u.formEncType,u,null),it(e,t,"formMethod",u.formMethod,u,null),it(e,t,"formTarget",u.formTarget,u,null)):(it(e,t,"encType",u.encType,u,null),it(e,t,"method",u.method,u,null),it(e,t,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Nl(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=qn);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=Nl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Ve("beforetoggle",e),Ve("toggle",e),gn(e,"popover",i);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":gn(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Jv.get(a)||a,gn(e,a,i))}}function nc(e,t,a,i,u,d){switch(a){case"style":Hd(e,i,d);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?or(e,i):(typeof i=="number"||typeof i=="bigint")&&or(e,""+i);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"onClick":i!=null&&(e.onclick=qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yt.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),d=e[$t]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof i=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,u);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):gn(e,a,i)}}}function Ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",e),Ve("load",e);var i=!1,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var b=a[d];if(b!=null)switch(d){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,d,b,a,null)}}u&&it(e,t,"srcSet",a.srcSet,a,null),i&&it(e,t,"src",a.src,a,null);return;case"input":Ve("invalid",e);var z=d=b=u=null,Z=null,ce=null;for(i in a)if(a.hasOwnProperty(i)){var pe=a[i];if(pe!=null)switch(i){case"name":u=pe;break;case"type":b=pe;break;case"checked":Z=pe;break;case"defaultChecked":ce=pe;break;case"value":d=pe;break;case"defaultValue":z=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,t));break;default:it(e,t,i,pe,a,null)}}Md(e,d,z,Z,ce,b,u,!1);return;case"select":Ve("invalid",e),i=b=d=null;for(u in a)if(a.hasOwnProperty(u)&&(z=a[u],z!=null))switch(u){case"value":d=z;break;case"defaultValue":b=z;break;case"multiple":i=z;default:it(e,t,u,z,a,null)}t=d,a=b,e.multiple=!!i,t!=null?sr(e,!!i,t,!1):a!=null&&sr(e,!!i,a,!0);return;case"textarea":Ve("invalid",e),d=u=i=null;for(b in a)if(a.hasOwnProperty(b)&&(z=a[b],z!=null))switch(b){case"value":i=z;break;case"defaultValue":u=z;break;case"children":d=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(91));break;default:it(e,t,b,z,a,null)}Bd(e,i,u,d);return;case"option":for(Z in a)a.hasOwnProperty(Z)&&(i=a[Z],i!=null)&&(Z==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":it(e,t,Z,i,a,null));return;case"dialog":Ve("beforetoggle",e),Ve("toggle",e),Ve("cancel",e),Ve("close",e);break;case"iframe":case"object":Ve("load",e);break;case"video":case"audio":for(i=0;i<zi.length;i++)Ve(zi[i],e);break;case"image":Ve("error",e),Ve("load",e);break;case"details":Ve("toggle",e);break;case"embed":case"source":case"link":Ve("error",e),Ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ce in a)if(a.hasOwnProperty(ce)&&(i=a[ce],i!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,ce,i,a,null)}return;default:if(go(t)){for(pe in a)a.hasOwnProperty(pe)&&(i=a[pe],i!==void 0&&nc(e,t,pe,i,a,void 0));return}}for(z in a)a.hasOwnProperty(z)&&(i=a[z],i!=null&&it(e,t,z,i,a,null))}function Nb(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,b=null,z=null,Z=null,ce=null,pe=null;for(fe in a){var ve=a[fe];if(a.hasOwnProperty(fe)&&ve!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Z=ve;default:i.hasOwnProperty(fe)||it(e,t,fe,null,i,ve)}}for(var de in i){var fe=i[de];if(ve=a[de],i.hasOwnProperty(de)&&(fe!=null||ve!=null))switch(de){case"type":d=fe;break;case"name":u=fe;break;case"checked":ce=fe;break;case"defaultChecked":pe=fe;break;case"value":b=fe;break;case"defaultValue":z=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:fe!==ve&&it(e,t,de,fe,i,ve)}}po(e,b,z,Z,ce,pe,d,u);return;case"select":fe=b=z=de=null;for(d in a)if(Z=a[d],a.hasOwnProperty(d)&&Z!=null)switch(d){case"value":break;case"multiple":fe=Z;default:i.hasOwnProperty(d)||it(e,t,d,null,i,Z)}for(u in i)if(d=i[u],Z=a[u],i.hasOwnProperty(u)&&(d!=null||Z!=null))switch(u){case"value":de=d;break;case"defaultValue":z=d;break;case"multiple":b=d;default:d!==Z&&it(e,t,u,d,i,Z)}t=z,a=b,i=fe,de!=null?sr(e,!!a,de,!1):!!i!=!!a&&(t!=null?sr(e,!!a,t,!0):sr(e,!!a,a?[]:"",!1));return;case"textarea":fe=de=null;for(z in a)if(u=a[z],a.hasOwnProperty(z)&&u!=null&&!i.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:it(e,t,z,null,i,u)}for(b in i)if(u=i[b],d=a[b],i.hasOwnProperty(b)&&(u!=null||d!=null))switch(b){case"value":de=u;break;case"defaultValue":fe=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&it(e,t,b,u,i,d)}Ld(e,de,fe);return;case"option":for(var Oe in a)de=a[Oe],a.hasOwnProperty(Oe)&&de!=null&&!i.hasOwnProperty(Oe)&&(Oe==="selected"?e.selected=!1:it(e,t,Oe,null,i,de));for(Z in i)de=i[Z],fe=a[Z],i.hasOwnProperty(Z)&&de!==fe&&(de!=null||fe!=null)&&(Z==="selected"?e.selected=de&&typeof de!="function"&&typeof de!="symbol":it(e,t,Z,de,i,fe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in a)de=a[ke],a.hasOwnProperty(ke)&&de!=null&&!i.hasOwnProperty(ke)&&it(e,t,ke,null,i,de);for(ce in i)if(de=i[ce],fe=a[ce],i.hasOwnProperty(ce)&&de!==fe&&(de!=null||fe!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:it(e,t,ce,de,i,fe)}return;default:if(go(t)){for(var lt in a)de=a[lt],a.hasOwnProperty(lt)&&de!==void 0&&!i.hasOwnProperty(lt)&&nc(e,t,lt,void 0,i,de);for(pe in i)de=i[pe],fe=a[pe],!i.hasOwnProperty(pe)||de===fe||de===void 0&&fe===void 0||nc(e,t,pe,de,i,fe);return}}for(var le in a)de=a[le],a.hasOwnProperty(le)&&de!=null&&!i.hasOwnProperty(le)&&it(e,t,le,null,i,de);for(ve in i)de=i[ve],fe=a[ve],!i.hasOwnProperty(ve)||de===fe||de==null&&fe==null||it(e,t,ve,de,i,fe)}function Gp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Eb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var u=a[i],d=u.transferSize,b=u.initiatorType,z=u.duration;if(d&&z&&Gp(b)){for(b=0,z=u.responseEnd,i+=1;i<a.length;i++){var Z=a[i],ce=Z.startTime;if(ce>z)break;var pe=Z.transferSize,ve=Z.initiatorType;pe&&Gp(ve)&&(Z=Z.responseEnd,b+=pe*(Z<z?1:(z-ce)/(Z-ce)))}if(--i,t+=8*(d+b)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ac=null,rc=null;function xs(e){return e.nodeType===9?e:e.ownerDocument}function Ip(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Vp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ic(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var lc=null;function Tb(){var e=window.event;return e&&e.type==="popstate"?e===lc?!1:(lc=e,!0):(lc=null,!1)}var Yp=typeof setTimeout=="function"?setTimeout:void 0,Ob=typeof clearTimeout=="function"?clearTimeout:void 0,Fp=typeof Promise=="function"?Promise:void 0,Cb=typeof queueMicrotask=="function"?queueMicrotask:typeof Fp<"u"?function(e){return Fp.resolve(null).then(e).catch(Ab)}:Yp;function Ab(e){setTimeout(function(){throw e})}function Ta(e){return e==="head"}function Pp(e,t){var a=t,i=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(u),$r(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Mi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Mi(a);for(var d=a.firstChild;d;){var b=d.nextSibling,z=d.nodeName;d[ia]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=b}}else a==="body"&&Mi(e.ownerDocument.body);a=u}while(a);$r(t)}function Zp(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function sc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":sc(a),lr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Rb(e,t,a,i){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[ia])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function kb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=_n(e.nextSibling),e===null))return null;return e}function Xp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function oc(e){return e.data==="$?"||e.data==="$~"}function uc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Db(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function _n(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var cc=null;function Qp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return _n(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Kp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Jp(e,t,a){switch(t=xs(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lr(e)}var Nn=new Map,Wp=new Set;function Ss(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var aa=P.d;P.d={f:zb,r:Ub,D:Mb,C:Lb,L:Bb,m:$b,X:qb,S:Hb,M:Gb};function zb(){var e=aa.f(),t=fs();return e||t}function Ub(e){var t=sa(e);t!==null&&t.tag===5&&t.type==="form"?gh(t):aa.r(e)}var Mr=typeof document>"u"?null:document;function em(e,t,a){var i=Mr;if(i&&typeof t=="string"&&t){var u=vn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Wp.has(u)||(Wp.add(u),e={rel:e,crossOrigin:a,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),Ft(t,"link",e),Ae(t),i.head.appendChild(t)))}}function Mb(e){aa.D(e),em("dns-prefetch",e,null)}function Lb(e,t){aa.C(e,t),em("preconnect",e,t)}function Bb(e,t,a){aa.L(e,t,a);var i=Mr;if(i&&e&&t){var u='link[rel="preload"][as="'+vn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+vn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+vn(a.imageSizes)+'"]')):u+='[href="'+vn(e)+'"]';var d=u;switch(t){case"style":d=Lr(e);break;case"script":d=Br(e)}Nn.has(d)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Nn.set(d,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(Li(d))||t==="script"&&i.querySelector(Bi(d))||(t=i.createElement("link"),Ft(t,"link",e),Ae(t),i.head.appendChild(t)))}}function $b(e,t){aa.m(e,t);var a=Mr;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+vn(i)+'"][href="'+vn(e)+'"]',d=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Br(e)}if(!Nn.has(d)&&(e=v({rel:"modulepreload",href:e},t),Nn.set(d,e),a.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Bi(d)))return}i=a.createElement("link"),Ft(i,"link",e),Ae(i),a.head.appendChild(i)}}}function Hb(e,t,a){aa.S(e,t,a);var i=Mr;if(i&&e){var u=Se(i).hoistableStyles,d=Lr(e);t=t||"default";var b=u.get(d);if(!b){var z={loading:0,preload:null};if(b=i.querySelector(Li(d)))z.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Nn.get(d))&&dc(e,a);var Z=b=i.createElement("link");Ae(Z),Ft(Z,"link",e),Z._p=new Promise(function(ce,pe){Z.onload=ce,Z.onerror=pe}),Z.addEventListener("load",function(){z.loading|=1}),Z.addEventListener("error",function(){z.loading|=2}),z.loading|=4,js(b,t,i)}b={type:"stylesheet",instance:b,count:1,state:z},u.set(d,b)}}}function qb(e,t){aa.X(e,t);var a=Mr;if(a&&e){var i=Se(a).hoistableScripts,u=Br(e),d=i.get(u);d||(d=a.querySelector(Bi(u)),d||(e=v({src:e,async:!0},t),(t=Nn.get(u))&&fc(e,t),d=a.createElement("script"),Ae(d),Ft(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(u,d))}}function Gb(e,t){aa.M(e,t);var a=Mr;if(a&&e){var i=Se(a).hoistableScripts,u=Br(e),d=i.get(u);d||(d=a.querySelector(Bi(u)),d||(e=v({src:e,async:!0,type:"module"},t),(t=Nn.get(u))&&fc(e,t),d=a.createElement("script"),Ae(d),Ft(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(u,d))}}function tm(e,t,a,i){var u=(u=ye.current)?Ss(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Lr(a.href),a=Se(u).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Lr(a.href);var d=Se(u).hoistableStyles,b=d.get(e);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=u.querySelector(Li(e)))&&!d._p&&(b.instance=d,b.state.loading=5),Nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Nn.set(e,a),d||Ib(u,e,a,b.state))),t&&i===null)throw Error(o(528,""));return b}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Br(a),a=Se(u).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Lr(e){return'href="'+vn(e)+'"'}function Li(e){return'link[rel="stylesheet"]['+e+"]"}function nm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Ib(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ft(t,"link",a),Ae(t),e.head.appendChild(t))}function Br(e){return'[src="'+vn(e)+'"]'}function Bi(e){return"script[async]"+e}function am(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+vn(a.href)+'"]');if(i)return t.instance=i,Ae(i),i;var u=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ae(i),Ft(i,"style",u),js(i,a.precedence,e),t.instance=i;case"stylesheet":u=Lr(a.href);var d=e.querySelector(Li(u));if(d)return t.state.loading|=4,t.instance=d,Ae(d),d;i=nm(a),(u=Nn.get(u))&&dc(i,u),d=(e.ownerDocument||e).createElement("link"),Ae(d);var b=d;return b._p=new Promise(function(z,Z){b.onload=z,b.onerror=Z}),Ft(d,"link",i),t.state.loading|=4,js(d,a.precedence,e),t.instance=d;case"script":return d=Br(a.src),(u=e.querySelector(Bi(d)))?(t.instance=u,Ae(u),u):(i=a,(u=Nn.get(d))&&(i=v({},a),fc(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),Ae(u),Ft(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,js(i,a.precedence,e));return t.instance}function js(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,d=u,b=0;b<i.length;b++){var z=i[b];if(z.dataset.precedence===t)d=z;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function dc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ws=null;function rm(e,t,a){if(ws===null){var i=new Map,u=ws=new Map;u.set(a,i)}else u=ws,i=u.get(a),i||(i=new Map,u.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var d=a[u];if(!(d[ia]||d[Et]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(t)||"";b=e+b;var z=i.get(b);z?z.push(d):i.set(b,[d])}}return i}function im(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Vb(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function lm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Yb(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Lr(i.href),d=t.querySelector(Li(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_s.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Ae(d);return}d=t.ownerDocument||t,i=nm(i),(u=Nn.get(u))&&dc(i,u),d=d.createElement("link"),Ae(d);var b=d;b._p=new Promise(function(z,Z){b.onload=z,b.onerror=Z}),Ft(d,"link",i),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=_s.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var hc=0;function Fb(e,t){return e.stylesheets&&e.count===0&&Es(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Es(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&hc===0&&(hc=62500*Eb());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Es(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>hc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(u)}}:null}function _s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Es(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ns=null;function Es(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ns=new Map,t.forEach(Pb,e),Ns=null,_s.call(e))}function Pb(e,t){if(!(t.state.loading&4)){var a=Ns.get(e);if(a)var i=a.get(null);else{a=new Map,Ns.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var b=u[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),i=b)}i&&a.set(null,i)}u=t.instance,b=u.getAttribute("data-precedence"),d=a.get(b)||i,d===i&&a.set(null,u),a.set(b,u),this.count++,i=_s.bind(this),u.addEventListener("load",i),u.addEventListener("error",i),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var $i={$$typeof:k,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function Zb(e,t,a,i,u,d,b,z,Z){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Hn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hn(0),this.hiddenUpdates=Hn(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function sm(e,t,a,i,u,d,b,z,Z,ce,pe,ve){return e=new Zb(e,t,a,b,Z,ce,pe,ve,z),t=1,d===!0&&(t|=24),d=un(3,null,null,t),e.current=d,d.stateNode=e,t=Fo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:i,isDehydrated:a,cache:t},Qo(d),e}function om(e){return e?(e=mr,e):mr}function um(e,t,a,i,u,d){u=om(u),i.context===null?i.context=u:i.pendingContext=u,i=ga(t),i.payload={element:a},d=d===void 0?null:d,d!==null&&(i.callback=d),a=va(e,i,t),a!==null&&(ln(a,e,t),vi(a,e,t))}function cm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function pc(e,t){cm(e,t),(e=e.alternate)&&cm(e,t)}function dm(e){if(e.tag===13||e.tag===31){var t=Ga(e,67108864);t!==null&&ln(t,e,67108864),pc(e,67108864)}}function fm(e){if(e.tag===13||e.tag===31){var t=pn();t=La(t);var a=Ga(e,t);a!==null&&ln(a,e,t),pc(e,t)}}var Ts=!0;function Xb(e,t,a,i){var u=V.T;V.T=null;var d=P.p;try{P.p=2,mc(e,t,a,i)}finally{P.p=d,V.T=u}}function Qb(e,t,a,i){var u=V.T;V.T=null;var d=P.p;try{P.p=8,mc(e,t,a,i)}finally{P.p=d,V.T=u}}function mc(e,t,a,i){if(Ts){var u=gc(i);if(u===null)tc(e,t,i,Os,a),pm(e,i);else if(Jb(u,e,t,a,i))i.stopPropagation();else if(pm(e,i),t&4&&-1<Kb.indexOf(e)){for(;u!==null;){var d=sa(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=vt(d.pendingLanes);if(b!==0){var z=d;for(z.pendingLanes|=2,z.entangledLanes|=2;b;){var Z=1<<31-Me(b);z.entanglements[1]|=Z,b&=~Z}Ln(d),(We&6)===0&&(cs=we()+500,Di(0))}}break;case 31:case 13:z=Ga(d,2),z!==null&&ln(z,d,2),fs(),pc(d,2)}if(d=gc(i),d===null&&tc(e,t,i,Os,a),d===u)break;u=d}u!==null&&i.stopPropagation()}else tc(e,t,i,null,a)}}function gc(e){return e=yo(e),vc(e)}var Os=null;function vc(e){if(Os=null,e=la(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=f(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Os=e,null}function hm(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(be()){case Te:return 2;case qe:return 8;case De:case ht:return 32;case Nt:return 268435456;default:return 32}default:return 32}}var yc=!1,Oa=null,Ca=null,Aa=null,Hi=new Map,qi=new Map,Ra=[],Kb="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".split(" ");function pm(e,t){switch(e){case"focusin":case"focusout":Oa=null;break;case"dragenter":case"dragleave":Ca=null;break;case"mouseover":case"mouseout":Aa=null;break;case"pointerover":case"pointerout":Hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function Gi(e,t,a,i,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:d,targetContainers:[u]},t!==null&&(t=sa(t),t!==null&&dm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Jb(e,t,a,i,u){switch(t){case"focusin":return Oa=Gi(Oa,e,t,a,i,u),!0;case"dragenter":return Ca=Gi(Ca,e,t,a,i,u),!0;case"mouseover":return Aa=Gi(Aa,e,t,a,i,u),!0;case"pointerover":var d=u.pointerId;return Hi.set(d,Gi(Hi.get(d)||null,e,t,a,i,u)),!0;case"gotpointercapture":return d=u.pointerId,qi.set(d,Gi(qi.get(d)||null,e,t,a,i,u)),!0}return!1}function mm(e){var t=la(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=f(a),t!==null){e.blockedOn=t,yl(e.priority,function(){fm(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,yl(e.priority,function(){fm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Cs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=gc(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);vo=i,a.target.dispatchEvent(i),vo=null}else return t=sa(a),t!==null&&dm(t),e.blockedOn=a,!1;t.shift()}return!0}function gm(e,t,a){Cs(e)&&a.delete(t)}function Wb(){yc=!1,Oa!==null&&Cs(Oa)&&(Oa=null),Ca!==null&&Cs(Ca)&&(Ca=null),Aa!==null&&Cs(Aa)&&(Aa=null),Hi.forEach(gm),qi.forEach(gm)}function As(e,t){e.blockedOn===t&&(e.blockedOn=null,yc||(yc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Wb)))}var Rs=null;function vm(e){Rs!==e&&(Rs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Rs===e&&(Rs=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],u=e[t+2];if(typeof i!="function"){if(vc(i||a)===null)continue;break}var d=sa(a);d!==null&&(e.splice(t,3),t-=3,gu(d,{pending:!0,data:u,method:a.method,action:i},i,u))}}))}function $r(e){function t(Z){return As(Z,e)}Oa!==null&&As(Oa,e),Ca!==null&&As(Ca,e),Aa!==null&&As(Aa,e),Hi.forEach(t),qi.forEach(t);for(var a=0;a<Ra.length;a++){var i=Ra[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Ra.length&&(a=Ra[0],a.blockedOn===null);)mm(a),a.blockedOn===null&&Ra.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var u=a[i],d=a[i+1],b=u[$t]||null;if(typeof d=="function")b||vm(a);else if(b){var z=null;if(d&&d.hasAttribute("formAction")){if(u=d,b=d[$t]||null)z=b.formAction;else if(vc(u)!==null)continue}else z=b.action;typeof z=="function"?a[i+1]=z:(a.splice(i,3),i-=3),vm(a)}}}function ym(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return u=b})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function bc(e){this._internalRoot=e}ks.prototype.render=bc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=pn();um(a,i,e,t,null,null)},ks.prototype.unmount=bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;um(e.current,2,null,e,null,null),fs(),t[ra]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=vl();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ra.length&&t!==0&&t<Ra[a].priority;a++);Ra.splice(a,0,e),a===0&&mm(e)}};var bm=l.version;if(bm!=="19.2.8")throw Error(o(527,bm,"19.2.8"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var ex={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ds.isDisabled&&Ds.supportsFiber)try{Xe=Ds.inject(ex),ut=Ds}catch{}}return Vi.createRoot=function(e,t){if(!c(e))throw Error(o(299));var a=!1,i="",u=Eh,d=Th,b=Oh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=sm(e,1,!1,null,null,a,i,null,u,d,b,ym),e[ra]=t.current,ec(e),new bc(t)},Vi.hydrateRoot=function(e,t,a){if(!c(e))throw Error(o(299));var i=!1,u="",d=Eh,b=Th,z=Oh,Z=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(z=a.onRecoverableError),a.formState!==void 0&&(Z=a.formState)),t=sm(e,1,!0,t,a??null,i,u,Z,d,b,z,ym),t.context=om(null),a=t.current,i=pn(),i=La(i),u=ga(i),u.callback=null,va(a,u,i),a=i,t.current.lanes=a,Ut(t,a),Ln(t),e[ra]=t.current,ec(e),new ks(t)},Vi.version="19.2.8",Vi}var Cm;function cx(){if(Cm)return jc.exports;Cm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),jc.exports=ux(),jc.exports}var dx=cx();const fx={en:{overview:"Overview",testCases:"Test Cases",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"New project",projects:"Projects",files:"Files",settings:"Project settings",localWorkspace:"Local workspace",storedHere:"Projects are stored on this device",activeTarget:"Active project target",savedProject:"Saved project",newWorkspace:"New local workspace",scoutWebsite:"Scout a website",targetUrl:"Target URL",startPath:"Start Path",scopePath:"Scope Path",maxPages:"Max pages",maxDepth:"Max depth",language:"Test Case Language",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"Limit exploration to a specific page or path.",startPathHelp:"The page path where exploration should begin, such as /admin/users.",scopePathHelp:"Keep exploration under this path, such as /admin.",startPathHint:"Where to continue exploring after login",scopePathHint:"Limits exploration to this section",explore:"Explore",currentPageOnly:"Current page only",thisSection:"This section",entireSite:"Entire site",targetedGuideTitle:"How to use Targeted Exploration",targetedGuideTargetUrl:"Enter the main URL of the system you want LazyScout to explore.",targetedGuideStartPath:"Enter the path where exploration should begin, such as",targetedGuideScopePath:"Set a boundary such as",targetedGuideScopePathEnd:"so the flow does not move to other areas.",targetedGuideCurrentPage:"explores one page",targetedGuideThisSection:"explores only the scope",targetedGuideEntireSite:"explores the whole website",targetedGuideExample:"Example: Target URL = your system, Start Path = /admin/users, Scope Path = /admin, choose This section.",search:"Search",addCase:"Add Test Case",screenshot:"Screenshot",delete:"Delete",export:"Export CSV",activeProjectTarget:"Active project target",currentProject:"Current project",scoutDescription:"Enter a URL and let Playwright discover pages, controls, forms and UI states automatically.",scouting:"Scouting…",optional:"optional",targetUrlHelp:"The main website URL that LazyScout should open and explore, such as https://example.com.",maxPagesHelp:"Maximum number of pages Scout will inspect. Higher values may take longer.",maxDepthHelp:"Link depth from the starting page. 0 means one page; 1 means pages linked from it.",testLanguageHelp:"Language used for generated Test Case titles and details.",maxPagesDescription:"Maximum number of pages to inspect",maxDepthDescription:"Link depth to follow from the target page",testLanguageDescription:"Language used for generated Test Case details",safetyNotice:"Playwright stays within the same origin and avoids actions that can change or delete data.",includeApiChecks:"Include API checks from XHR/fetch",waitAfterNavigation:"Wait after navigation",debugMode:"Debug mode",scoutAgain:"Scout again",regenerateProject:"Regenerate this project?",regenerateWarning:"Scout Site will replace the current discovered pages and generated Test Cases for this project.",regenerateHint:"Export any Test Cases you want to keep before confirming. Project Settings will remain unchanged.",cancel:"Cancel",expandScout:"Expand Scout form",collapseScout:"Collapse Scout form",help:"Help"},th:{overview:"ภาพรวม",testCases:"Test Case",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"โปรเจกต์ใหม่",projects:"โปรเจกต์",files:"ไฟล์",settings:"ตั้งค่าโปรเจกต์",localWorkspace:"พื้นที่ทำงานในเครื่อง",storedHere:"โปรเจกต์ถูกเก็บไว้ในอุปกรณ์นี้",activeTarget:"เว็บไซต์ของโปรเจกต์",savedProject:"บันทึกแล้ว",newWorkspace:"พื้นที่ทำงานใหม่",scoutWebsite:"สำรวจเว็บไซต์",targetUrl:"URL เป้าหมาย",startPath:"จุดเริ่มต้น (Path)",scopePath:"ขอบเขต (Path)",maxPages:"จำนวนหน้าสูงสุด",maxDepth:"ระดับความลึก",language:"ภาษาของ Test Case",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"กำหนดขอบเขตการสำรวจเฉพาะหน้า หรือเฉพาะ path ที่ต้องการ",startPathHelp:"หน้าเริ่มต้นภายในเว็บไซต์ เช่น /admin/users ใช้เมื่ออยากเริ่มจากหน้าลึก ๆ",scopePathHelp:"จำกัดการสำรวจให้อยู่ใต้ path นี้ เช่น /admin จะไม่ออกไปสำรวจส่วนอื่นของเว็บ",startPathHint:"หน้าที่ต้องการให้เริ่มสำรวจหลังเข้าสู่ระบบ",scopePathHint:"จำกัดการสำรวจให้อยู่ในส่วนนี้",explore:"ขอบเขตการสำรวจ",currentPageOnly:"สำรวจหน้าเดียว",thisSection:"สำรวจเฉพาะส่วนนี้",entireSite:"สำรวจทั้งเว็บไซต์",targetedGuideTitle:"วิธีใช้ Targeted Exploration",targetedGuideTargetUrl:"ใส่ URL หลักของระบบที่ต้องการให้ LazyScout สำรวจ",targetedGuideStartPath:"ใส่ path ที่ต้องการให้เริ่ม เช่น",targetedGuideScopePath:"ใส่ขอบเขต เช่น",targetedGuideScopePathEnd:"เพื่อไม่ให้ flow โยกไปหน้าอื่น",targetedGuideCurrentPage:"สำรวจเพียงหน้าเดียว",targetedGuideThisSection:"สำรวจเฉพาะ scope",targetedGuideEntireSite:"สำรวจทั้งเว็บไซต์",targetedGuideExample:"ตัวอย่าง: Target URL = ระบบของคุณ, Start Path = /admin/users, Scope Path = /admin, เลือก This section",search:"ค้นหา",addCase:"เพิ่ม Test Case",screenshot:"Screenshot",delete:"ลบ",export:"Export CSV",activeProjectTarget:"เว็บไซต์เป้าหมายของโปรเจกต์",currentProject:"โปรเจกต์ปัจจุบัน",scoutDescription:"ใส่ URL แล้วให้ Playwright ค้นหาหน้า ปุ่ม ฟอร์ม และสถานะ UI โดยอัตโนมัติ",scouting:"กำลังสำรวจ…",optional:"ไม่บังคับ",targetUrlHelp:"URL หลักของเว็บไซต์ที่ต้องการให้ LazyScout เปิดและสำรวจ เช่น https://example.com",maxPagesHelp:"จำนวนหน้าสูงสุดที่ Scout จะสำรวจ ค่ายิ่งมากอาจใช้เวลานานขึ้น",maxDepthHelp:"ระดับความลึกของลิงก์จากหน้าเริ่มต้น 0 คือหน้าเดียว และ 1 คือหน้าที่ลิงก์จากหน้านั้น",testLanguageHelp:"ภาษาที่ใช้สร้างชื่อและรายละเอียดของ Test Case",maxPagesDescription:"จำนวนหน้าสูงสุดที่จะสำรวจ",maxDepthDescription:"ระดับความลึกของลิงก์จากหน้าเป้าหมาย",testLanguageDescription:"ภาษาที่ใช้สร้างรายละเอียด Test Case",safetyNotice:"Playwright จะอยู่ภายใน origin เดียวกัน และหลีกเลี่ยงการกระทำที่อาจเปลี่ยนแปลงหรือลบข้อมูล",includeApiChecks:"รวม API checks จาก XHR/fetch",waitAfterNavigation:"รอหลังเปลี่ยนหน้า",debugMode:"โหมด Debug",scoutAgain:"สำรวจอีกครั้ง",regenerateProject:"ต้องการสร้างข้อมูลของโปรเจกต์นี้ใหม่หรือไม่?",regenerateWarning:"Scout Site จะเขียนทับหน้าที่ค้นพบและ Test Case ที่สร้างไว้ของโปรเจกต์นี้",regenerateHint:"Export Test Case ที่ต้องการเก็บไว้ก่อนยืนยัน ส่วน Project Settings จะยังคงเดิม",cancel:"ยกเลิก",expandScout:"ขยายฟอร์ม Scout",collapseScout:"พับฟอร์ม Scout",help:"คำอธิบาย"}},Zg=F.createContext(null);function hx({children:n}){const[l,s]=F.useState(()=>localStorage.getItem("lazyscout-language")||"en");F.useEffect(()=>{localStorage.setItem("lazyscout-language",l),document.documentElement.lang=l},[l]);const o=F.useMemo(()=>({language:l,setLanguage:s,toggleLanguage:()=>s(c=>c==="en"?"th":"en"),t:c=>fx[l][c]}),[l]);return r.jsx(Zg.Provider,{value:o,children:n})}function io(){const n=F.useContext(Zg);if(!n)throw new Error("useLanguage must be used inside LanguageProvider");return n}const Xg="lazyscout-test-case-language";function px(){const n=localStorage.getItem(Xg);return n==="th"||n==="en"?n:"en"}function tr({text:n}){const{t:l}=io(),[s,o]=F.useState(!1);return r.jsxs("span",{className:`help-tip ${s?"is-open":""}`,children:[r.jsx("button",{type:"button","aria-label":l("help"),"aria-expanded":s,title:n,onClick:c=>{c.preventDefault(),c.stopPropagation(),o(h=>!h)},children:"?"}),r.jsx("span",{className:"help-tip-popover",role:"tooltip",children:n})]})}function mx({loading:n,initialUrl:l="",hasExistingData:s=!1,initialLanguage:o,onLanguageChange:c,onAnalyze:h}){const{t:f}=io(),[p,m]=F.useState(l),[g,w]=F.useState(20),[v,x]=F.useState(3),[y,C]=F.useState(o??px),[N,j]=F.useState(!1),[T,O]=F.useState(750),[k,M]=F.useState(""),[R,B]=F.useState(""),[H,ae]=F.useState("site"),[W,ne]=F.useState(!1),[se,q]=F.useState(!1),[G,E]=F.useState(!1),X=(()=>{try{return new URL(l).hostname}catch{return"Current project"}})();function V(Q){if(Q.preventDefault(),!(!p.trim()||n)){if(s){E(!0);return}P()}}function P(){const Q=Math.min(100,Math.max(1,g===""?20:g)),D=Math.min(10,Math.max(0,v===""?3:v));h(p.trim(),Q,D,y,N,T,k.trim()||void 0,R.trim()||void 0,H,W),E(!1)}return r.jsxs("form",{onSubmit:V,className:l?"project-scout-card":"new-project-card",children:[l&&r.jsxs("div",{className:"project-target-heading",children:[r.jsx("span",{className:"target-glow",children:"◎"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("activeProjectTarget")}),r.jsx("h2",{children:X}),r.jsx("span",{children:l})]}),r.jsxs("span",{className:"target-status",children:[r.jsx("i",{})," ",f("savedProject")]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${se?"is-collapsed":""}`,onClick:()=>q(Q=>!Q),"aria-label":f(se?"expandScout":"collapseScout"),title:f(se?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),!l&&r.jsxs("div",{className:"new-project-hero",children:[r.jsx("span",{className:"scout-orbit",children:"✦"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("localWorkspace")}),r.jsx("h2",{children:f("scoutWebsite")}),r.jsx("p",{children:f("scoutDescription")})]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${se?"is-collapsed":""}`,onClick:()=>q(Q=>!Q),"aria-label":f(se?"expandScout":"collapseScout"),title:f(se?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),r.jsxs("div",{className:`scout-form-body ${se?"is-collapsed":""}`,children:[r.jsxs("div",{className:"scout-form-grid",children:[r.jsxs("div",{className:"scout-url-field",children:[r.jsxs("label",{className:"field-label",htmlFor:"target-url",children:[f("targetUrl"),r.jsx(tr,{text:f("targetUrlHelp")})]}),r.jsx("input",{id:"target-url",className:"field",value:p,onChange:Q=>m(Q.target.value),placeholder:"https://example.com",autoComplete:"off",disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-pages",children:[f("maxPages"),r.jsx(tr,{text:f("maxPagesHelp")})]}),r.jsx("input",{id:"max-pages",className:"field",type:"number",min:1,max:100,value:g,onChange:Q=>w(Q.target.value===""?"":Math.min(100,Math.max(1,Number(Q.target.value)))),disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-depth",children:[f("maxDepth"),r.jsx(tr,{text:f("maxDepthHelp")})]}),r.jsx("input",{id:"max-depth",className:"field",type:"number",min:0,max:10,value:v,onChange:Q=>x(Q.target.value===""?"":Math.min(10,Math.max(0,Number(Q.target.value)))),disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"test-language",children:[f("language"),r.jsx(tr,{text:f("testLanguageHelp")})]}),r.jsxs("select",{id:"test-language",className:"field",value:y,onChange:Q=>{const D=Q.target.value;C(D),localStorage.setItem(Xg,D),c?.(D)},disabled:n,children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsx("button",{type:"submit",className:"btn btn-primary scout-submit",disabled:n||!p.trim(),children:f(n?"scouting":"scoutSite")})]}),!l&&r.jsxs("div",{className:"scout-options-help",children:[r.jsxs("span",{children:[r.jsx("b",{children:f("maxPages")})," ",f("maxPagesDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("maxDepth")})," ",f("maxDepthDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("language")})," ",f("testLanguageDescription")]})]}),r.jsx("p",{className:"mt-3 text-xs text-slate-500",children:f("safetyNotice")}),r.jsxs("div",{className:"mt-3 border-t border-slate-100 pt-3",children:[r.jsxs("p",{className:"text-xs font-semibold text-slate-700 mb-2",children:[f("targetedExploration")," ",r.jsx(tr,{text:f("targetedExplorationHelp")})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"start-path",children:[f("startPath"),r.jsx(tr,{text:f("startPathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"start-path",className:"field text-sm",value:k,onChange:Q=>M(Q.target.value),placeholder:"/admin/users",autoComplete:"off",disabled:n}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("startPathHint")})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"scope-path",children:[f("scopePath"),r.jsx(tr,{text:f("scopePathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"scope-path",className:"field text-sm",value:R,onChange:Q=>B(Q.target.value),placeholder:"/admin",autoComplete:"off",disabled:n}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("scopePathHint")})]})]}),r.jsxs("div",{className:"mt-3",children:[r.jsx("label",{className:"field-label text-xs",children:f("explore")}),r.jsxs("div",{className:"flex gap-4 mt-1",children:[r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"current-page",checked:H==="current-page",onChange:()=>ae("current-page"),disabled:n}),f("currentPageOnly")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"scope",checked:H==="scope",onChange:()=>ae("scope"),disabled:n}),f("thisSection")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"site",checked:H==="site",onChange:()=>ae("site"),disabled:n}),f("entireSite")]})]})]})]}),r.jsxs("details",{className:"scout-guide",children:[r.jsx("summary",{children:f("targetedGuideTitle")}),r.jsxs("div",{className:"scout-guide-body",children:[r.jsx("img",{src:"/lazyscout-icon-v2.png",alt:"LazyScout"}),r.jsxs("div",{children:[r.jsxs("p",{children:[r.jsx("b",{children:f("targetUrl")})," ",f("targetedGuideTargetUrl")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("startPath")})," ",f("targetedGuideStartPath")," ",r.jsx("code",{children:"/admin/users"})]}),r.jsxs("p",{children:[r.jsx("b",{children:f("scopePath")})," ",f("targetedGuideScopePath")," ",r.jsx("code",{children:"/admin"})," ",f("targetedGuideScopePathEnd")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("currentPageOnly")})," ",f("targetedGuideCurrentPage")," · ",r.jsx("b",{children:f("thisSection")})," ",f("targetedGuideThisSection")," · ",r.jsx("b",{children:f("entireSite")})," ",f("targetedGuideEntireSite")]}),r.jsx("p",{className:"text-slate-500",children:f("targetedGuideExample")})]})]})]}),r.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-4 border-t border-slate-100 pt-3 text-xs text-slate-600",children:[r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:N,onChange:Q=>j(Q.target.checked),className:"h-4 w-4",disabled:n})," ",f("includeApiChecks")]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[f("waitAfterNavigation")," ",r.jsx("input",{className:"field w-24",type:"number",min:0,max:5e3,step:250,value:T,onChange:Q=>O(Q.target.value===""?0:Number(Q.target.value)),disabled:n})," ","ms"]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:W,onChange:Q=>ne(Q.target.checked),className:"h-4 w-4",disabled:n})," ",f("debugMode")]})]})]}),G&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal scout-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"scout-confirm-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("scoutAgain")}),r.jsx("h2",{id:"scout-confirm-title",children:f("regenerateProject")})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>E(!1),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:f("regenerateWarning")}),r.jsx("p",{className:"text-sm text-slate-500",children:f("regenerateHint")})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>E(!1),children:f("cancel")}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:P,children:f("scoutSite")})]})]})})]})}function Ec({message:n,hint:l}){return r.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[r.jsx("p",{className:"text-sm font-semibold text-red-700",children:n}),l&&r.jsx("p",{className:"mt-1 text-sm text-red-600",children:l})]})}function gx({result:n,activeUrl:l,onSelect:s}){const[o,c]=F.useState(!1),h=n.pages.reduce((f,p)=>{const m=new URL(p.finalUrl).pathname||"/";return(f[m]??=[]).push(p),f},{});return r.jsxs("aside",{className:`workspace-panel workspace-tree ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsx("button",{type:"button",className:"tree-panel-toggle",onClick:()=>c(f=>!f),"aria-label":o?"ขยาย Explorer":"พับ Explorer",title:o?"ขยาย Explorer":"พับ Explorer",children:o?"›":"‹"}),r.jsxs("div",{className:"tree-panel-heading",children:[r.jsx("p",{className:"eyebrow",children:"Explorer"}),r.jsx("h2",{children:"State Tree"})]}),r.jsx("span",{className:"status-dot status-pass",title:"scan complete"})]}),!o&&r.jsxs("div",{className:"tree-meta",children:[r.jsxs("span",{children:[n.pages.length," pages"]}),r.jsxs("span",{children:[n.actionGraph.states.length," states"]})]}),!o&&r.jsx("div",{className:"tree-list",children:Object.entries(h).map(([f,p])=>r.jsxs("div",{className:"tree-branch",children:[r.jsxs("div",{className:"tree-path",children:[r.jsx("span",{className:"tree-chevron",children:"⌄"}),r.jsx("span",{className:"tree-folder",children:"●"}),f]}),p.map(m=>r.jsxs("button",{type:"button",onClick:()=>s(m.finalUrl),className:`tree-node ${l===m.finalUrl?"is-active":""}`,children:[r.jsx("span",{className:"tree-node-icon",children:m.state?.visibleDialogs.length?"◈":"◇"}),r.jsx("span",{className:"truncate",children:m.state?.visibleDialogs[0]??(m.title||"Untitled page")}),r.jsx("span",{className:"tree-node-count",children:m.buttons.length})]},m.state?.id??m.finalUrl))]},f))}),!o&&r.jsxs("div",{className:"tree-footer",children:[r.jsx("span",{className:"status-dot status-pass"})," Safe exploration only",r.jsx("br",{}),r.jsx("span",{className:"status-dot status-warn"})," Destructive actions blocked"]})]})}const Qg=["password","passwd","token","access_token","refresh_token","api_key","apikey","authorization","cookie","set-cookie","secret","client_secret","session","sessionid"];Qg.map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");Qg.filter(n=>n!=="authorization").map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");const Kg=["delete","remove","destroy","erase","drop","reset","purchase","buy","checkout","pay","payment","transfer","withdraw","refund","submit order","place order","confirm payment","confirm order","deactivate","disable account","delete account","close account","unsubscribe","cancel subscription","revoke access","reset database","ลบ","ชำระเงิน","จ่าย","โอน","ซื้อ","สั่งซื้อ","ยืนยันการชำระ"],vx=100,yx=80;function Jg(n){if(!Array.isArray(n))return[];const l=n.filter(s=>typeof s=="string").map(s=>s.trim().toLowerCase().slice(0,yx)).filter(Boolean);return[...new Set(l)].slice(0,vx)}function Hr(n){const l=n.name||n.label||n.text||n.placeholder;return l&&n.role?`${n.role} "${l}"`:l?`"${l}"`:n.cssSelector?`element (${n.cssSelector})`:"element"}function pl(n){if(n.description)return n.description;switch(n.type){case"navigate":return`Navigate to ${n.url}`;case"click":return`Click ${Hr(n.target)}`;case"fill":return`Enter "${n.value}" in ${Hr(n.target)}`;case"select":return`Select "${n.option}" from ${Hr(n.target)}`;case"check":return`${n.checked?"Check":"Uncheck"} ${Hr(n.target)}`;case"wait":return`Wait for ${n.mode}: ${n.value}`;case"assertVisible":return`Verify that ${Hr(n.target)} is visible`;case"assertText":return n.target?`Verify that ${Hr(n.target)} shows "${n.text}"`:`Verify that the page shows "${n.text}"`;case"assertUrl":return`Verify that the URL contains "${n.urlContains}"`;case"manual":return n.description}}function bx(n){return n.map((l,s)=>`${s+1}. ${pl(l)}`).join(`
10
+ `)}function ud(n,l){return`TC-${n}-${String(l).padStart(3,"0")}`}function cd(n,l){return`TD-${n}-${String(l).padStart(3,"0")}`}function xx(n="MANUAL",l=cd("MANUAL",1),s=""){return{id:l,module:n,sourceUrl:s,field:"",inputType:"text",required:!1,validValue:"",invalidValue:""}}function Sx(n="MANUAL",l=ud("MANUAL",1),s=""){return{id:l,module:n,title:"New test case",preconditions:[],steps:[],expectedResult:"",type:"positive",priority:"medium",automationStatus:"manual",status:"pending",sourceUrl:s}}const jx={positive:"bg-emerald-100 text-emerald-800",negative:"bg-rose-100 text-rose-800",validation:"bg-amber-100 text-amber-800"},wx={high:"bg-red-100 text-red-800",medium:"bg-blue-100 text-blue-800",low:"bg-slate-100 text-slate-700"},_x={ready:"bg-emerald-100 text-emerald-800","needs-data":"bg-amber-100 text-amber-800","needs-review":"bg-orange-100 text-orange-800",manual:"bg-slate-200 text-slate-700"};function Nx({value:n}){return r.jsx("span",{className:`badge ${jx[n]}`,children:n})}function Ex({value:n}){return r.jsx("span",{className:`badge ${wx[n]}`,children:n})}function Tx({value:n}){return r.jsx("span",{className:`badge ${_x[n]}`,children:n})}function Ox({testCase:n,onEdit:l,onClose:s}){return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:o=>o.target===o.currentTarget&&s(),children:r.jsxs("section",{className:"modern-modal test-detail-modal",role:"dialog","aria-modal":"true","aria-labelledby":"test-case-detail-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test Case detail"}),r.jsx("h2",{id:"test-case-detail-title",children:n.id}),r.jsx("p",{children:n.title})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:s,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"test-detail-body",children:[r.jsxs("div",{className:"test-detail-meta",children:[r.jsx(Nx,{value:n.type}),r.jsx(Ex,{value:n.priority}),r.jsx(Tx,{value:n.automationStatus}),r.jsx("span",{className:"badge bg-slate-100 text-slate-600",children:n.folder??n.module})]}),(n.tags?.length||n.requirements?.length)&&r.jsxs("section",{className:"traceability-meta",children:[n.tags?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Tags"}),n.tags.map(o=>r.jsx("span",{className:"tag-chip",children:o},o))]}):null,n.requirements?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Requirements / Tickets"}),n.requirements.map(o=>r.jsx("span",{className:"requirement-chip",children:o},o))]}):null]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Preconditions"}),n.preconditions.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ul",{className:"list-inside list-disc space-y-1 text-sm text-slate-700",children:n.preconditions.map((o,c)=>r.jsx("li",{children:o},c))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Steps"}),n.steps.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ol",{className:"space-y-2 text-sm text-slate-700",children:n.steps.map((o,c)=>r.jsxs("li",{className:"test-detail-step",children:[r.jsx("span",{children:c+1}),r.jsxs("div",{children:[pl(o),r.jsxs("small",{children:["[",o.type,"]"]})]})]},c))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Expected Result"}),r.jsx("p",{className:"text-sm text-slate-700",children:n.expectedResult||"—"})]}),n.notes&&r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Notes from Generator"}),r.jsx("p",{className:"text-sm text-slate-500",children:n.notes})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Source URL"}),r.jsx("p",{className:"break-all text-xs text-slate-500",children:n.sourceUrl})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:l,children:"Edit Test Case"})]})]})})}function Cx({testCase:n,onSave:l,onCancel:s}){const[o,c]=F.useState({...n}),[h,f]=F.useState(n.preconditions.join(`
11
+ `)),[p,m]=F.useState((n.tags??[]).join(", ")),[g,w]=F.useState((n.requirements??[]).join(", "));F.useEffect(()=>{function j(T){T.key==="Escape"&&s()}return document.addEventListener("keydown",j),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",j),document.body.style.overflow=""}},[s]);function v(j){c(T=>({...T,...j}))}function x(j,T){c(O=>({...O,steps:O.steps.map((k,M)=>M===j?{...k,description:T}:k)}))}function y(j){c(T=>({...T,steps:T.steps.filter((O,k)=>k!==j)}))}function C(){c(j=>({...j,steps:[...j.steps,{type:"manual",description:"New step"}]}))}function N(){l({...o,preconditions:h.split(`
12
+ `).map(j=>j.trim()).filter(Boolean),tags:Am(p),requirements:Am(g)})}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:j=>j.target===j.currentTarget&&s(),children:r.jsxs("div",{className:"modern-modal test-case-editor-modal",children:[r.jsxs("div",{className:"card-title flex shrink-0 items-center justify-between",children:[r.jsxs("span",{children:["Edit ",o.id]}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:s,"aria-label":"Close editor",children:"✕"})]}),r.jsxs("div",{className:"test-case-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-module",children:"Module"}),r.jsx("input",{id:"edit-module",className:"field",value:o.module,onChange:j=>v({module:j.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-id",children:"TC ID"}),r.jsx("input",{id:"edit-id",className:"field font-mono",value:o.id,onChange:j=>v({id:j.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-folder",children:"Folder"}),r.jsx("input",{id:"edit-folder",className:"field",value:o.folder??o.module,onChange:j=>v({folder:j.target.value})})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-title",children:"Title"}),r.jsx("input",{id:"edit-title",className:"field",value:o.title,onChange:j=>v({title:j.target.value})})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-type",children:"Type"}),r.jsxs("select",{id:"edit-type",className:"field",value:o.type,onChange:j=>v({type:j.target.value}),children:[r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-priority",children:"Priority"}),r.jsxs("select",{id:"edit-priority",className:"field",value:o.priority,onChange:j=>v({priority:j.target.value}),children:[r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-automation",children:"Automation Status"}),r.jsxs("select",{id:"edit-automation",className:"field",value:o.automationStatus,onChange:j=>v({automationStatus:j.target.value}),children:[r.jsx("option",{value:"ready",children:"ready"}),r.jsx("option",{value:"needs-data",children:"needs-data"}),r.jsx("option",{value:"needs-review",children:"needs-review"}),r.jsx("option",{value:"manual",children:"manual"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-preconditions",children:"Preconditions (one per line)"}),r.jsx("textarea",{id:"edit-preconditions",className:"field h-20",value:h,onChange:j=>f(j.target.value)})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-tags",children:"Tags (comma separated)"}),r.jsx("input",{id:"edit-tags",className:"field",value:p,onChange:j=>m(j.target.value),placeholder:"smoke, regression, critical"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-requirements",children:"Requirements / Tickets"}),r.jsx("textarea",{id:"edit-requirements",className:"field min-h-10 resize-y leading-5",value:g,onChange:j=>w(j.target.value),placeholder:"JIRA-123, https://tracker.example/456",rows:2})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[r.jsx("span",{className:"field-label mb-0",children:"Steps"}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:C,children:"+ Add step"})]}),r.jsxs("div",{className:"space-y-2",children:[o.steps.map((j,T)=>r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsxs("span",{className:"w-5 text-xs text-slate-400",children:[T+1,"."]}),r.jsx("input",{className:"field min-w-0",value:pl(j),onChange:O=>x(T,O.target.value)}),r.jsx("span",{className:"w-24 shrink-0 font-mono text-xs text-slate-400",children:j.type}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>y(T),children:"Delete"})]},T)),o.steps.length===0&&r.jsx("p",{className:"text-sm text-slate-400",children:"No steps yet."})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-expected",children:"Expected Result"}),r.jsx("textarea",{id:"edit-expected",className:"field h-20",value:o.expectedResult,onChange:j=>v({expectedResult:j.target.value})})]})]}),r.jsxs("div",{className:"test-case-editor-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Save"})]})]})})}function Am(n){return n.split(/[,;\n]/).map(l=>l.trim()).filter(Boolean)}function qr({value:n,editValue:l=n,options:s,multiline:o=!1,onSave:c}){const[h,f]=F.useState(!1),[p,m]=F.useState(l);if(F.useEffect(()=>{h||m(l)},[h,l]),!h)return r.jsx("span",{className:"inline-edit-value",title:"Double-click to edit",onDoubleClick:()=>f(!0),children:n||"—"});const g=()=>{f(!1),p!==l&&c(p)},w={autoFocus:!0,value:p,onChange:v=>m(v.target.value),onBlur:g,onKeyDown:v=>{v.key==="Enter"&&g(),v.key==="Escape"&&(m(l),f(!1))},onClick:v=>v.stopPropagation()};return o&&!s?r.jsx("textarea",{...w,className:"inline-edit-textarea",rows:5}):s?r.jsx("select",{...w,className:"inline-edit-input",children:s.map(v=>r.jsx("option",{children:v},v))}):r.jsx("input",{...w,className:"inline-edit-input"})}function Yi({value:n,onSave:l}){const[s,o]=F.useState(!1),[c,h]=F.useState(n),f=F.useRef(null),p=F.useRef(null);if(F.useEffect(()=>{s||h(n)},[s,n]),!s)return r.jsx("span",{className:"inline-edit-value",title:"Double-click to edit title",onDoubleClick:()=>o(!0),dangerouslySetInnerHTML:{__html:n||"—"}});const m=()=>{const x=window.getSelection();x?.rangeCount&&(f.current=x.getRangeAt(0).cloneRange())},g=()=>{const x=window.getSelection();f.current&&x&&(x.removeAllRanges(),x.addRange(f.current))},w=(x,y)=>{g(),document.execCommand(x,!1,y),p.current?.focus(),m()},v=x=>{h(x.innerHTML),o(!1),l(x.innerHTML)};return r.jsxs("div",{className:"rich-text-editor",onClick:x=>x.stopPropagation(),children:[r.jsxs("div",{className:"rich-text-toolbar",children:[r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>w("bold"),children:"B"}),r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>w("italic"),children:"I"}),r.jsx("input",{type:"color",defaultValue:"#1e293b",onMouseDown:()=>m(),onChange:x=>w("foreColor",x.target.value),"aria-label":"Text color"}),r.jsxs("select",{defaultValue:"3",onMouseDown:()=>m(),onChange:x=>w("fontSize",x.target.value),"aria-label":"Text size",children:[r.jsx("option",{value:"2",children:"Small"}),r.jsx("option",{value:"3",children:"Normal"}),r.jsx("option",{value:"5",children:"Large"}),r.jsx("option",{value:"7",children:"Huge"})]})]}),r.jsx("div",{className:"rich-text-content",ref:p,contentEditable:!0,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:{__html:c},onBlur:x=>{x.relatedTarget&&p.current?.parentElement?.contains(x.relatedTarget)||v(x.currentTarget)},onMouseUp:m,onKeyUp:m,onKeyDown:x=>{x.key==="Escape"&&(h(n),o(!1))}})]})}function Ax({testCases:n,selectedIds:l,activeId:s,onToggleSelect:o,onToggleAll:c,onOpen:h,onEdit:f,onDelete:p,onReorder:m,onUpdateCell:g,executionStatuses:w={}}){const[v,x]=F.useState(),[y,C]=F.useState(),[N,j]=F.useState(),[T,O]=F.useState({}),k=F.useRef(null),M=n.length>0&&n.every(R=>l.includes(R.id));return F.useEffect(()=>{function R(H){k.current&&!k.current.contains(H.target)&&j(void 0)}function B(H){H.key==="Escape"&&j(void 0)}return document.addEventListener("pointerdown",R),document.addEventListener("keydown",B),()=>{document.removeEventListener("pointerdown",R),document.removeEventListener("keydown",B)}},[]),n.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:"No Test Cases match the current filters."}):r.jsx("div",{className:"test-case-table-scroll border border-slate-200",children:r.jsxs("table",{className:"test-case-table border-collapse",style:{minWidth:"2200px",width:"max-content"},children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-10",children:"Move"}),r.jsx("th",{className:"table-head w-10",children:r.jsx("input",{type:"checkbox",checked:M,onChange:()=>c(M?[]:n.map(R=>R.id)),"aria-label":"Select all"})}),r.jsx("th",{className:"table-head w-32",children:"TC ID"}),r.jsx("th",{className:"table-head w-28",children:"Folder"}),r.jsx("th",{className:"table-head",children:"Title"}),r.jsx("th",{className:"table-head w-24",children:"Type"}),r.jsx("th",{className:"table-head w-24",children:"Priority"}),r.jsx("th",{className:"table-head w-56",children:"Steps"}),r.jsx("th",{className:"table-head",children:"Expected Result"}),r.jsx("th",{className:"table-head w-32",children:"Automation"}),r.jsx("th",{className:"table-head w-48",children:"Preconditions"}),r.jsx("th",{className:"table-head w-48",children:"Notes"}),r.jsx("th",{className:"table-head w-40",children:"Tags"}),r.jsx("th",{className:"table-head w-32",children:"Status"}),r.jsx("th",{className:"table-head w-28 text-center",children:"Actions"})]})}),r.jsx("tbody",{children:n.map(R=>r.jsxs("tr",{onDragOver:B=>{B.preventDefault(),C(R.id)},onDrop:B=>{B.preventDefault(),v&&m(v,R.id),x(void 0),C(void 0)},onDragEnd:()=>{x(void 0),C(void 0)},className:`border-b border-slate-100 hover:bg-blue-50 ${y===R.id?"bg-indigo-50 ring-2 ring-inset ring-indigo-300":""} ${s===R.id?"bg-blue-50":""}`,children:[r.jsx("td",{className:"table-cell drag-handle",draggable:!0,onDragStart:()=>x(R.id),onClick:B=>B.stopPropagation(),title:"Drag to reorder",children:"⠿"}),r.jsx("td",{className:"table-cell",onClick:B=>B.stopPropagation(),children:r.jsx("input",{type:"checkbox",checked:l.includes(R.id),onChange:()=>o(R.id),"aria-label":`Select ${R.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs",children:R.id}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:R.folder??R.module,onSave:B=>g(R.id,"folder",B)})}),r.jsxs("td",{className:"table-cell font-medium text-slate-900",children:[r.jsx(Yi,{value:R.title,onSave:B=>g(R.id,"title",B)}),(R.tags?.length||R.requirements?.length)&&r.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[R.tags?.slice(0,3).map(B=>r.jsx("span",{className:"tag-chip",children:B},B)),R.requirements?.slice(0,2).map(B=>r.jsx("span",{className:"requirement-chip",children:B},B))]})]}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:R.type,options:["positive","negative","validation"],onSave:B=>g(R.id,"type",B)})}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:R.priority,options:["high","medium","low"],onSave:B=>g(R.id,"priority",B)})}),r.jsxs("td",{className:"table-cell min-w-56",children:[r.jsx(Yi,{value:R.steps.map((B,H)=>`${H+1}. ${pl(B)}`).join(`
13
13
  `),onSave:B=>g(R.id,"steps",B)}),r.jsx("button",{type:"button",className:"mt-2 rounded border border-indigo-200 bg-indigo-50 px-2 py-1 text-[10px] font-semibold text-indigo-700 hover:bg-indigo-100",onClick:B=>{B.stopPropagation(),h(R)},children:"ดู Steps"})]}),r.jsx("td",{className:"table-cell max-w-md text-slate-600",children:r.jsx(Yi,{value:R.expectedResult,onSave:B=>g(R.id,"expectedResult",B)})}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:R.automationStatus,options:["ready","needs-data","needs-review","manual"],onSave:B=>g(R.id,"automationStatus",B)})}),r.jsx("td",{className:"table-cell min-w-48",children:r.jsx(Yi,{value:R.preconditions.join(`
14
- `),onSave:B=>g(R.id,"preconditions",B)})}),r.jsx("td",{className:"table-cell min-w-48",children:r.jsx(Yi,{value:R.notes??"",onSave:B=>g(R.id,"notes",B)})}),r.jsx("td",{className:"table-cell min-w-40",children:r.jsx(qr,{value:(R.tags??[]).join(", "),onSave:B=>g(R.id,"tags",B)})}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:T[R.id]??w[R.id]??R.status??(R.automationStatus==="ready"?"passed":"pending"),options:["pending","passed","failed"],onSave:B=>{const H=B;O(ae=>({...ae,[R.id]:H})),g(R.id,"status",H)}})}),r.jsx("td",{className:"table-cell text-center",onClick:B=>B.stopPropagation(),children:r.jsxs("div",{className:"action-menu-wrap",ref:N===R.id?k:void 0,children:[r.jsx("button",{type:"button",className:"action-menu-trigger","aria-label":`Actions for ${R.id}`,"aria-expanded":N===R.id,onClick:()=>j(B=>B===R.id?void 0:R.id),children:"⋯"}),N===R.id&&r.jsxs("div",{className:"action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{h(R),j(void 0)},children:"View Test Case"}),r.jsx("button",{type:"button",onClick:()=>{f(R),j(void 0)},children:"Edit"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p(R.id),j(void 0)},children:"Delete"})]})]})})]},R.id))})]})})}function Rx({filters:a,modules:l,totalCount:s,visibleCount:o,selectedCount:c,exporting:h,onFiltersChange:f,onAdd:p,onImportScreenshot:m,onImport:g,onDeleteSelected:w,onExport:v}){const x=y=>f({...a,...y});return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"search",children:"Search"}),r.jsx("input",{id:"search",className:"field",value:a.search,onChange:y=>x({search:y.target.value}),placeholder:"Search ID, title, expected result, steps, tags or requirements"})]}),r.jsxs("div",{className:"w-48",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-module",children:"Folder / Module"}),r.jsx("input",{id:"filter-module",className:"field",list:"module-options",value:a.module==="all"?"":a.module,onChange:y=>x({module:y.target.value||"all"}),placeholder:"Search or select folder"}),r.jsx("datalist",{id:"module-options",children:l.map(y=>r.jsx("option",{value:y},y))})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-type",children:"Type"}),r.jsxs("select",{id:"filter-type",className:"field",value:a.type,onChange:y=>x({type:y.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-priority",children:"Priority"}),r.jsxs("select",{id:"filter-priority",className:"field",value:a.priority,onChange:y=>x({priority:y.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:p,children:"+ Add Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:"⇧ Import"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:"▣ Screenshot"}),r.jsxs("button",{type:"button",className:"btn btn-danger",onClick:w,disabled:c===0,children:["Delete (",c,")"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:v,disabled:h,children:h?"Exporting…":"Export CSV"})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:["Showing ",o," of ",s," Test Cases",c>0&&` · ${c} selected`]})]})}function kx({testCases:a}){const l=F.useMemo(()=>{const c=new Map;for(const h of a)for(const f of h.requirements??[])c.set(f,[...c.get(f)??[],h]);return[...c.entries()].sort(([h],[f])=>h.localeCompare(f))},[a]),s=a.filter(c=>(c.requirements?.length??0)>0).length,o=a.length-s;return a.length?r.jsxs("section",{className:"traceability-summary",children:[r.jsxs("div",{className:"traceability-summary-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Requirements traceability"}),r.jsx("h3",{children:"Coverage at a glance"})]}),r.jsxs("span",{children:[l.length," requirements"]})]}),r.jsxs("div",{className:"traceability-kpis",children:[r.jsxs("div",{children:[r.jsx("b",{children:s}),r.jsx("span",{children:"Linked cases"})]}),r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:"Without requirement"})]}),r.jsxs("div",{children:[r.jsxs("b",{children:[l.length?Math.round(s/a.length*100):0,"%"]}),r.jsx("span",{children:"Case coverage"})]})]}),l.length?r.jsxs("div",{className:"traceability-list",children:[l.slice(0,8).map(([c,h])=>r.jsxs("div",{children:[r.jsx("span",{title:c,children:c}),r.jsxs("b",{children:[h.length," case",h.length===1?"":"s"]})]},c)),l.length>8&&r.jsxs("small",{children:["+ ",l.length-8," more requirements"]})]}):r.jsx("p",{className:"traceability-empty",children:"Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here."})]}):null}function Dx({rows:a,onUpdate:l,onDelete:s}){return a.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:"No Test Data matches the current filters."}):r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-32",children:"TD ID"}),r.jsx("th",{className:"table-head w-28",children:"Module"}),r.jsx("th",{className:"table-head w-44",children:"Field"}),r.jsx("th",{className:"table-head w-28",children:"Input Type"}),r.jsx("th",{className:"table-head w-20",children:"Required"}),r.jsx("th",{className:"table-head",children:"Valid Value"}),r.jsx("th",{className:"table-head",children:"Invalid Value"}),r.jsx("th",{className:"table-head",children:"Note"}),r.jsx("th",{className:"table-head w-20",children:"Actions"})]})}),r.jsx("tbody",{children:a.map(o=>r.jsxs("tr",{className:"border-b border-slate-100 hover:bg-slate-50",children:[r.jsx("td",{className:"table-cell font-mono text-xs",children:o.id}),r.jsx("td",{className:"table-cell",children:o.module}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.field,onChange:c=>l(o.id,{...o,field:c.target.value}),"aria-label":`Field for ${o.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs text-slate-500",children:o.inputType}),r.jsx("td",{className:"table-cell text-center",children:r.jsx("input",{type:"checkbox",checked:o.required,onChange:c=>l(o.id,{...o,required:c.target.checked}),"aria-label":`Required for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.validValue,onChange:c=>l(o.id,{...o,validValue:c.target.value}),"aria-label":`Valid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.invalidValue,onChange:c=>l(o.id,{...o,invalidValue:c.target.value}),"aria-label":`Invalid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.note??"",onChange:c=>l(o.id,{...o,note:c.target.value}),"aria-label":`Note for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>s(o.id),children:"Delete"})})]},o.id))})]})})}function zx({search:a,module:l,modules:s,totalCount:o,visibleCount:c,exporting:h,onSearchChange:f,onModuleChange:p,onAdd:m,onExport:g}){return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"data-search",children:"Search"}),r.jsx("input",{id:"data-search",className:"field",value:a,onChange:w=>f(w.target.value),placeholder:"Search field, value or note"})]}),r.jsxs("div",{className:"w-40",children:[r.jsx("label",{className:"field-label",htmlFor:"data-module",children:"Module"}),r.jsxs("select",{id:"data-module",className:"field",value:l,onChange:w=>p(w.target.value),children:[r.jsx("option",{value:"all",children:"All"}),s.map(w=>r.jsx("option",{value:w,children:w},w))]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:"+ Add Row"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:g,disabled:h,children:h?"Exporting…":"Export CSV"})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:["Showing ",c," of ",o," rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together."]})]})}function Rm(a){const l=["import { test, expect } from '@playwright/test'","",`test('${Lt(a.title)}', async ({ page }) => {`];for(const s of a.steps)l.push(` ${Ux(s)}`);return l.push("})",""),l.join(`
15
- `)}function nr(a){const l=a.role&&a.name?`page.getByRole(${Lt(a.role)}, { name: ${Lt(a.name)} })`:a.label?`page.getByLabel(${Lt(a.label)}, { exact: true })`:a.testId?`page.getByTestId(${Lt(a.testId)})`:a.placeholder?`page.getByPlaceholder(${Lt(a.placeholder)})`:a.text?`page.getByText(${Lt(a.text)})`:`page.locator(${Lt(a.cssSelector??"")})`,s=a.contextTestId?`page.getByTestId(${Lt(a.contextTestId)})`:a.contextSelector?`page.locator(${Lt(a.contextSelector)})`:void 0,o=s?a.contextText?`${s}.filter({ hasText: ${Lt(a.contextText)} }).${l.slice(5)}`:`${s}.${l.slice(5)}`:l;return a.nth===void 0?o:`${o}.nth(${a.nth})`}function Ux(a){switch(a.type){case"navigate":return`await page.goto(${Lt(a.url)})`;case"click":return`await ${nr(a.target)}.click()`;case"fill":return`await ${nr(a.target)}.fill(${Lt(Mx(a))})`;case"select":return`await ${nr(a.target)}.selectOption(${Lt(a.option)})`;case"check":return`await ${nr(a.target)}.${a.checked?"check":"uncheck"}()`;case"wait":return a.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(a.value)||0))})`:a.mode==="url"?`await expect(page).toHaveURL(new RegExp(${Lt(a.value)}))`:a.mode==="text"?`await expect(page).toContainText(${Lt(a.value)})`:`await expect(${nr(a.target)}).toBeVisible()`;case"assertVisible":return`await expect(${nr(a.target)}).toBeVisible()`;case"assertText":return a.target?`await expect(${nr(a.target)}).toContainText(${Lt(a.text)})`:`await expect(page).toContainText(${Lt(a.text)})`;case"assertUrl":return`await expect(page).toHaveURL(new RegExp(${Lt(a.urlContains)}))`;case"manual":return`// TODO: ${a.description}`}}function Mx(a){const l=`${a.target.name??""} ${a.target.label??""} ${a.target.placeholder??""}`.toLowerCase();return l.includes("password")||l.includes("รหัสผ่าน")?"{{TEST_PASSWORD}}":l.includes("email")||l.includes("อีเมล")?"{{TEST_EMAIL}}":l.includes("username")||l.includes("user name")||l.includes("ชื่อผู้ใช้")?"{{TEST_USERNAME}}":a.value}const Lt=a=>JSON.stringify(a);function km(a){const l=[`describe(${Zt(a.module)}, () => {`,` it(${Zt(a.title)}, () => {`];for(const s of a.steps)l.push(` ${Lx(s)}`);return l.push(" })","})",""),l.join(`
16
- `)}function ar(a){const l=a.role&&a.name?`cy.contains(${Zt(a.role)}, ${Zt(a.name)})`:a.label?`cy.get('label').contains(${Zt(a.label)}).invoke('attr', 'for').then((id) => cy.get('#' + id))`:a.placeholder?`cy.get(${Zt(`[placeholder="${a.placeholder}"]`)})`:a.text?`cy.contains(${Zt(a.text)})`:`cy.get(${Zt(a.cssSelector??"")})`;return a.nth===void 0?l:`${l}.eq(${a.nth})`}function Lx(a){switch(a.type){case"navigate":return`cy.visit(${Zt(a.url)})`;case"click":return`${ar(a.target)}.click()`;case"fill":return`${ar(a.target)}.clear().type(${Zt(Bx(a))})`;case"select":return`${ar(a.target)}.select(${Zt(a.option)})`;case"check":return`${ar(a.target)}.${a.checked?"check":"uncheck"}()`;case"wait":return a.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(a.value)||0))})`:a.mode==="url"?`cy.url().should('include', ${Zt(a.value)})`:a.mode==="text"?`cy.contains(${Zt(a.value)}).should('be.visible')`:`${ar(a.target)}.should('be.visible')`;case"assertVisible":return`${ar(a.target)}.should('be.visible')`;case"assertText":return a.target?`${ar(a.target)}.should('contain.text', ${Zt(a.text)})`:`cy.contains(${Zt(a.text)}).should('be.visible')`;case"assertUrl":return`cy.url().should('include', ${Zt(a.urlContains)})`;case"manual":return`// TODO: ${a.description}`}}function Bx(a){const l=`${a.target.name??""} ${a.target.label??""} ${a.target.placeholder??""}`.toLowerCase();return l.includes("password")||l.includes("รหัสผ่าน")?"{{TEST_PASSWORD}}":l.includes("email")||l.includes("อีเมล")?"{{TEST_EMAIL}}":l.includes("username")||l.includes("user name")||l.includes("ชื่อผู้ใช้")?"{{TEST_USERNAME}}":a.value}const Zt=a=>JSON.stringify(a);function $x(a){const l=a.steps.map(c=>Hx(a,c)),s=a.steps.find(c=>c.type==="assert"),o=s?.type==="assert"&&s.assertion.type==="text"?`The page shows "${s.assertion.value}".`:s?.type==="assert"&&s.assertion.type==="url"?`The URL contains "${s.assertion.value}".`:s?.type==="assert"?"The expected element is visible.":"Needs Review";return{id:`TC-FLOW-${a.id.slice(-8).toUpperCase()}`,module:"FLOW",title:a.name,preconditions:a.description?[a.description]:[],steps:l,expectedResult:o,type:"positive",priority:"medium",automationStatus:l.length?"ready":"needs-review",status:"pending",sourceUrl:a.baseUrl,notes:s?void 0:"Guided Flow has no assertion — expected result needs review."}}function Hx(a,l){switch(l.type){case"navigate":return{type:"navigate",url:new URL(l.path,a.baseUrl).toString()};case"click":return{type:"click",target:l.target};case"fill":return{type:"fill",target:l.target,value:l.valueRef?`{{${l.valueRef}}}`:l.value??""};case"select":return{type:"select",target:l.target,option:l.option};case"check":return{type:"check",target:l.target,checked:l.checked};case"wait":return{type:"wait",mode:l.mode,value:l.value,target:l.target};case"assert":return l.assertion.type==="visible"?{type:"assertVisible",target:l.assertion.target}:l.assertion.type==="text"?{type:"assertText",text:l.assertion.value}:{type:"assertUrl",urlContains:l.assertion.value}}}function qx(a){const l=["import { test, expect } from '@playwright/test'","",`test(${JSON.stringify(a.name)}, async ({ page }) => {`];for(const s of a.steps)l.push(` ${Gx(a,s)}`);return l.push("})",""),l.join(`
17
- `)}function Gx(a,l){switch(l.type){case"navigate":return`await page.goto(${JSON.stringify(new URL(l.path,a.baseUrl).toString())})`;case"click":return`await ${Gr(l.target)}.click()`;case"fill":return`await ${Gr(l.target)}.fill(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`await ${Gr(l.target)}.selectOption(${JSON.stringify(l.option)})`;case"check":return`await ${Gr(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`await expect(page).toHaveURL(new RegExp(${JSON.stringify(l.value)}))`:l.mode==="text"?`await expect(page).toContainText(${JSON.stringify(l.value)})`:`await expect(${Gr(l.target)}).toBeVisible()`;case"assert":return l.assertion.type==="visible"?`await expect(${Gr(l.assertion.target)}).toBeVisible()`:l.assertion.type==="text"?`await expect(page.getByText(${JSON.stringify(l.assertion.value)})).toBeVisible()`:`await expect(page).toHaveURL(new RegExp(${JSON.stringify(l.assertion.value)}))`}}function Gr(a){return a.strategy==="role"||a.role&&a.name?`page.getByRole(${JSON.stringify(a.role??"generic")}, { name: ${JSON.stringify(a.name??a.value??"")}${a.exact?", exact: true":""} })`:a.strategy==="label"||a.label?`page.getByLabel(${JSON.stringify(a.label??a.value??"")}, { exact: true })`:a.strategy==="placeholder"||a.placeholder?`page.getByPlaceholder(${JSON.stringify(a.placeholder??a.value??"")})`:a.strategy==="testid"||a.testId?`page.getByTestId(${JSON.stringify(a.testId??a.value??"")})`:a.strategy==="text"||a.text?`page.getByText(${JSON.stringify(a.text??a.value??"")})`:`page.locator(${JSON.stringify(a.cssSelector??a.value??"")})`}function Ix(a){const l=[`describe(${JSON.stringify(a.name)}, () => {`,` it(${JSON.stringify(a.name)}, () => {`];for(const s of a.steps)l.push(` ${Vx(a,s)}`);return l.push(" })","})",""),l.join(`
18
- `)}function Vx(a,l){switch(l.type){case"navigate":return`cy.visit(${JSON.stringify(new URL(l.path,a.baseUrl).toString())})`;case"click":return`${Ir(l.target)}.click()`;case"fill":return`${Ir(l.target)}.clear().type(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`${Ir(l.target)}.select(${JSON.stringify(l.option)})`;case"check":return`${Ir(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`cy.url().should('include', ${JSON.stringify(l.value)})`:l.mode==="text"?`cy.contains(${JSON.stringify(l.value)}).should('be.visible')`:`${Ir(l.target)}.should('be.visible')`;case"assert":return l.assertion.type==="visible"?`${Ir(l.assertion.target)}.should('be.visible')`:l.assertion.type==="text"?`cy.contains(${JSON.stringify(l.assertion.value)}).should('be.visible')`:`cy.url().should('include', ${JSON.stringify(l.assertion.value)})`}}function Ir(a){return a.strategy==="role"||a.role&&a.name?`cy.contains(${JSON.stringify(a.name??a.value??"")})`:a.strategy==="label"||a.label?`cy.get('label').contains(${JSON.stringify(a.label??a.value??"")})`:a.strategy==="placeholder"||a.placeholder?`cy.get(${JSON.stringify(`[placeholder="${a.placeholder??a.value??""}"]`)})`:a.strategy==="testid"||a.testId?`cy.get(${JSON.stringify(`[data-testid="${a.testId??a.value??""}"]`)})`:a.strategy==="text"||a.text?`cy.contains(${JSON.stringify(a.text??a.value??"")})`:`cy.get(${JSON.stringify(a.cssSelector??a.value??"")})`}class ir extends Error{code;hint;constructor(l,s,o){super(s),this.name="ApiError",this.code=l,this.hint=o}}async function Ma(a){try{const l=await a.json();if(l?.error?.message)return new ir(l.error.code,l.error.message,l.error.hint)}catch{}return new ir("unknown",`The server returned status ${a.status}.`)}async function Yx(a){let l;try{l=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch{throw new ir("server-unreachable","Could not reach the LazyScout API.",'Check that "npm run dev:server" is running.')}if(!l.ok)throw await Ma(l);return await l.json()}async function Fx(){const a=await fetch("/api/versions");if(!a.ok)throw await Ma(a);return await a.json()}async function Px(a){const l=await fetch("/api/versions/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:a})});if(!l.ok)throw await Ma(l);return await l.json()}async function Zx(a,l=[]){const s=await fetch("/api/export/csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:a,testData:l})});if(!s.ok)throw await Ma(s);const o=await s.blob(),c=URL.createObjectURL(o),h=document.createElement("a");h.href=c,h.download=`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(h),h.click(),h.remove(),URL.revokeObjectURL(c)}async function Xx(a,l="playwright",s,o,c,h,f,p){const m=await fetch("/api/automation/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:a,framework:l,code:s,secrets:o,runId:c,projectId:h,blockedKeywords:f}),signal:p});if(!m.ok)throw await Ma(m);return await m.json()}async function Qx(){return gt("/api/workspace")}async function Dm(a){await gt(`/api/workspace/projects/${encodeURIComponent(a.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}async function Kx(a){await gt(`/api/workspace/projects/${encodeURIComponent(a)}`,{method:"DELETE"})}async function Jx(a,l){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function Wx(a){return gt(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/status`)}async function e0(a){return gt(`/api/workspace/projects/${encodeURIComponent(a)}/guided-flows`)}async function t0(a,l){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/guided-flows`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({flows:l})})}async function n0(a,l,s,o){return gt("/api/guided-flows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flow:a,projectId:l,secrets:s,runId:o})})}async function a0(a){return gt("/api/guided-flows/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:a})})}async function r0(a){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session`,{method:"DELETE"})}async function i0(a,l){return gt(`/api/recorder/${encodeURIComponent(a)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function zm(a){return gt(`/api/recorder/${encodeURIComponent(a)}`)}async function l0(a){return gt(`/api/recorder/${encodeURIComponent(a)}/stop`,{method:"POST"})}async function Um(a){return gt(`/api/recorder/${encodeURIComponent(a)}`,{method:"DELETE"})}async function s0(){await gt("/api/workspace/open",{method:"POST"})}async function o0(a){return gt(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots`)}async function Mm(a,l){return gt(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function u0(a,l){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots/${encodeURIComponent(l)}`,{method:"DELETE"})}async function c0(a){return gt(`/api/workspace/projects/${encodeURIComponent(a)}/automation`)}async function Tc(a,l){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/automation`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function d0(a,l,s){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/reports`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,html:s})})}async function f0(a){return gt(`/api/workspace/projects/${encodeURIComponent(a)}/bugs`)}async function Lm(a,l){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/bugs/${encodeURIComponent(l.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function h0(a,l){await gt(`/api/workspace/projects/${encodeURIComponent(a)}/bugs/${encodeURIComponent(l)}`,{method:"DELETE"})}async function gt(a,l){const s=await fetch(a,l);if(!s.ok)throw await Ma(s);return await s.json()}async function p0(a){await fetch("/api/automation/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:a}),keepalive:!0})}async function m0(a){const l=await fetch("/api/load-test/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!l.ok)throw await Ma(l);return await l.json()}async function g0(a,l,s=!1){const o=await fetch("/api/api-check/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiCheck:a,secrets:l,allowUnsafe:s})});if(!o.ok)throw await Ma(o);return await o.json()}function Bm(a,l){(l==null||l>a.length)&&(l=a.length);for(var s=0,o=Array(l);s<l;s++)o[s]=a[s];return o}function v0(a){if(Array.isArray(a))return a}function y0(a,l,s){return(l=N0(l))in a?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a}function b0(a,l){var s=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(a)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function x0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $m(a,l){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Hm(a){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?$m(Object(s),!0).forEach(function(o){y0(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):$m(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function S0(a,l){if(a==null)return{};var s,o,c=j0(a,l);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(a);for(o=0;o<h.length;o++)s=h[o],l.indexOf(s)===-1&&{}.propertyIsEnumerable.call(a,s)&&(c[s]=a[s])}return c}function j0(a,l){if(a==null)return{};var s={};for(var o in a)if({}.hasOwnProperty.call(a,o)){if(l.indexOf(o)!==-1)continue;s[o]=a[o]}return s}function w0(a,l){return v0(a)||b0(a,l)||E0(a,l)||x0()}function _0(a,l){if(typeof a!="object"||!a)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var o=s.call(a,l);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(a)}function N0(a){var l=_0(a,"string");return typeof l=="symbol"?l:l+""}function E0(a,l){if(a){if(typeof a=="string")return Bm(a,l);var s={}.toString.call(a).slice(8,-1);return s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set"?Array.from(a):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Bm(a,l):void 0}}function T0(a,l,s){return l in a?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a}function qm(a,l){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Gm(a){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?qm(Object(s),!0).forEach(function(o){T0(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):qm(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function O0(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return function(o){return l.reduceRight(function(c,h){return h(c)},o)}}function Qi(a){return function l(){for(var s=this,o=arguments.length,c=new Array(o),h=0;h<o;h++)c[h]=arguments[h];return c.length>=a.length?a.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return l.apply(s,[].concat(c,p))}}}function Xs(a){return{}.toString.call(a).includes("Object")}function A0(a){return!Object.keys(a).length}function el(a){return typeof a=="function"}function C0(a,l){return Object.prototype.hasOwnProperty.call(a,l)}function R0(a,l){return Xs(l)||Ua("changeType"),Object.keys(l).some(function(s){return!C0(a,s)})&&Ua("changeField"),l}function k0(a){el(a)||Ua("selectorType")}function D0(a){el(a)||Xs(a)||Ua("handlerType"),Xs(a)&&Object.values(a).some(function(l){return!el(l)})&&Ua("handlersType")}function z0(a){a||Ua("initialIsRequired"),Xs(a)||Ua("initialType"),A0(a)&&Ua("initialContent")}function U0(a,l){throw new Error(a[l]||a.default)}var M0={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Ua=Qi(U0)(M0),Us={changes:R0,selector:k0,handler:D0,initial:z0};function L0(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Us.initial(a),Us.handler(l);var s={current:a},o=Qi(H0)(s,l),c=Qi($0)(s),h=Qi(Us.changes)(a),f=Qi(B0)(s);function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(w){return w};return Us.selector(g),g(s.current)}function m(g){O0(o,c,h,f)(g)}return[p,m]}function B0(a,l){return el(l)?l(a.current):l}function $0(a,l){return a.current=Gm(Gm({},a.current),l),l}function H0(a,l,s){return el(l)?l(a.current):Object.keys(s).forEach(function(o){var c;return(c=l[o])===null||c===void 0?void 0:c.call(l,a.current[o])}),s}var q0={create:L0},G0={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function I0(a){return function l(){for(var s=this,o=arguments.length,c=new Array(o),h=0;h<o;h++)c[h]=arguments[h];return c.length>=a.length?a.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return l.apply(s,[].concat(c,p))}}}function V0(a){return{}.toString.call(a).includes("Object")}function Y0(a){return a||Im("configIsRequired"),V0(a)||Im("configType"),a.urls?(F0(),{paths:{vs:a.urls.monacoBase}}):a}function F0(){console.warn(Wg.deprecation)}function P0(a,l){throw new Error(a[l]||a.default)}var Wg={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
14
+ `),onSave:B=>g(R.id,"preconditions",B)})}),r.jsx("td",{className:"table-cell min-w-48",children:r.jsx(Yi,{value:R.notes??"",onSave:B=>g(R.id,"notes",B)})}),r.jsx("td",{className:"table-cell min-w-40",children:r.jsx(qr,{value:(R.tags??[]).join(", "),onSave:B=>g(R.id,"tags",B)})}),r.jsx("td",{className:"table-cell",children:r.jsx(qr,{value:T[R.id]??w[R.id]??R.status??(R.automationStatus==="ready"?"passed":"pending"),options:["pending","passed","failed"],onSave:B=>{const H=B;O(ae=>({...ae,[R.id]:H})),g(R.id,"status",H)}})}),r.jsx("td",{className:"table-cell text-center",onClick:B=>B.stopPropagation(),children:r.jsxs("div",{className:"action-menu-wrap",ref:N===R.id?k:void 0,children:[r.jsx("button",{type:"button",className:"action-menu-trigger","aria-label":`Actions for ${R.id}`,"aria-expanded":N===R.id,onClick:()=>j(B=>B===R.id?void 0:R.id),children:"⋯"}),N===R.id&&r.jsxs("div",{className:"action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{h(R),j(void 0)},children:"View Test Case"}),r.jsx("button",{type:"button",onClick:()=>{f(R),j(void 0)},children:"Edit"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p(R.id),j(void 0)},children:"Delete"})]})]})})]},R.id))})]})})}function Rx({filters:n,modules:l,totalCount:s,visibleCount:o,selectedCount:c,exporting:h,onFiltersChange:f,onAdd:p,onImportScreenshot:m,onImport:g,onDeleteSelected:w,onExport:v}){const x=y=>f({...n,...y});return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"search",children:"Search"}),r.jsx("input",{id:"search",className:"field",value:n.search,onChange:y=>x({search:y.target.value}),placeholder:"Search ID, title, expected result, steps, tags or requirements"})]}),r.jsxs("div",{className:"w-48",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-module",children:"Folder / Module"}),r.jsx("input",{id:"filter-module",className:"field",list:"module-options",value:n.module==="all"?"":n.module,onChange:y=>x({module:y.target.value||"all"}),placeholder:"Search or select folder"}),r.jsx("datalist",{id:"module-options",children:l.map(y=>r.jsx("option",{value:y},y))})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-type",children:"Type"}),r.jsxs("select",{id:"filter-type",className:"field",value:n.type,onChange:y=>x({type:y.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-priority",children:"Priority"}),r.jsxs("select",{id:"filter-priority",className:"field",value:n.priority,onChange:y=>x({priority:y.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:p,children:"+ Add Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:"⇧ Import"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:"▣ Screenshot"}),r.jsxs("button",{type:"button",className:"btn btn-danger",onClick:w,disabled:c===0,children:["Delete (",c,")"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:v,disabled:h,children:h?"Exporting…":"Export CSV"})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:["Showing ",o," of ",s," Test Cases",c>0&&` · ${c} selected`]})]})}function kx({testCases:n}){const l=F.useMemo(()=>{const c=new Map;for(const h of n)for(const f of h.requirements??[])c.set(f,[...c.get(f)??[],h]);return[...c.entries()].sort(([h],[f])=>h.localeCompare(f))},[n]),s=n.filter(c=>(c.requirements?.length??0)>0).length,o=n.length-s;return n.length?r.jsxs("section",{className:"traceability-summary",children:[r.jsxs("div",{className:"traceability-summary-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Requirements traceability"}),r.jsx("h3",{children:"Coverage at a glance"})]}),r.jsxs("span",{children:[l.length," requirements"]})]}),r.jsxs("div",{className:"traceability-kpis",children:[r.jsxs("div",{children:[r.jsx("b",{children:s}),r.jsx("span",{children:"Linked cases"})]}),r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:"Without requirement"})]}),r.jsxs("div",{children:[r.jsxs("b",{children:[l.length?Math.round(s/n.length*100):0,"%"]}),r.jsx("span",{children:"Case coverage"})]})]}),l.length?r.jsxs("div",{className:"traceability-list",children:[l.slice(0,8).map(([c,h])=>r.jsxs("div",{children:[r.jsx("span",{title:c,children:c}),r.jsxs("b",{children:[h.length," case",h.length===1?"":"s"]})]},c)),l.length>8&&r.jsxs("small",{children:["+ ",l.length-8," more requirements"]})]}):r.jsx("p",{className:"traceability-empty",children:"Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here."})]}):null}function Dx({rows:n,onUpdate:l,onDelete:s}){return n.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:"No Test Data matches the current filters."}):r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-32",children:"TD ID"}),r.jsx("th",{className:"table-head w-28",children:"Module"}),r.jsx("th",{className:"table-head w-44",children:"Field"}),r.jsx("th",{className:"table-head w-28",children:"Input Type"}),r.jsx("th",{className:"table-head w-20",children:"Required"}),r.jsx("th",{className:"table-head",children:"Valid Value"}),r.jsx("th",{className:"table-head",children:"Invalid Value"}),r.jsx("th",{className:"table-head",children:"Note"}),r.jsx("th",{className:"table-head w-20",children:"Actions"})]})}),r.jsx("tbody",{children:n.map(o=>r.jsxs("tr",{className:"border-b border-slate-100 hover:bg-slate-50",children:[r.jsx("td",{className:"table-cell font-mono text-xs",children:o.id}),r.jsx("td",{className:"table-cell",children:o.module}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.field,onChange:c=>l(o.id,{...o,field:c.target.value}),"aria-label":`Field for ${o.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs text-slate-500",children:o.inputType}),r.jsx("td",{className:"table-cell text-center",children:r.jsx("input",{type:"checkbox",checked:o.required,onChange:c=>l(o.id,{...o,required:c.target.checked}),"aria-label":`Required for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.validValue,onChange:c=>l(o.id,{...o,validValue:c.target.value}),"aria-label":`Valid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.invalidValue,onChange:c=>l(o.id,{...o,invalidValue:c.target.value}),"aria-label":`Invalid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.note??"",onChange:c=>l(o.id,{...o,note:c.target.value}),"aria-label":`Note for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>s(o.id),children:"Delete"})})]},o.id))})]})})}function zx({search:n,module:l,modules:s,totalCount:o,visibleCount:c,exporting:h,onSearchChange:f,onModuleChange:p,onAdd:m,onExport:g}){return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"data-search",children:"Search"}),r.jsx("input",{id:"data-search",className:"field",value:n,onChange:w=>f(w.target.value),placeholder:"Search field, value or note"})]}),r.jsxs("div",{className:"w-40",children:[r.jsx("label",{className:"field-label",htmlFor:"data-module",children:"Module"}),r.jsxs("select",{id:"data-module",className:"field",value:l,onChange:w=>p(w.target.value),children:[r.jsx("option",{value:"all",children:"All"}),s.map(w=>r.jsx("option",{value:w,children:w},w))]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:"+ Add Row"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:g,disabled:h,children:h?"Exporting…":"Export CSV"})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:["Showing ",c," of ",o," rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together."]})]})}function Rm(n){const l=["import { test, expect } from '@playwright/test'","",`test('${qt(n.title)}', async ({ page }) => {`];for(const s of n.steps)l.push(` ${Ux(s)}`);return l.push("})",""),l.join(`
15
+ `)}function nr(n){const l=n.role&&n.name?`page.getByRole(${qt(n.role)}, { name: ${qt(n.name)} })`:n.label?`page.getByLabel(${qt(n.label)}, { exact: true })`:n.testId?`page.getByTestId(${qt(n.testId)})`:n.placeholder?`page.getByPlaceholder(${qt(n.placeholder)})`:n.text?`page.getByText(${qt(n.text)})`:`page.locator(${Bx(Lx(n.cssSelector??""))})`,s=n.contextTestId?`page.getByTestId(${qt(n.contextTestId)})`:n.contextSelector?`page.locator(${qt(n.contextSelector)})`:void 0,o=s?n.contextText?`${s}.filter({ hasText: ${qt(n.contextText)} }).${l.slice(5)}`:`${s}.${l.slice(5)}`:l;return n.nth===void 0?o:`${o}.nth(${n.nth})`}function Ux(n){switch(n.type){case"navigate":return`await page.goto(${qt(n.url)})`;case"click":return`await ${nr(n.target)}.click()`;case"fill":return`await ${nr(n.target)}.fill(${qt(Mx(n))})`;case"select":return`await ${nr(n.target)}.selectOption(${qt(n.option)})`;case"check":return`await ${nr(n.target)}.${n.checked?"check":"uncheck"}()`;case"wait":return n.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(n.value)||0))})`:n.mode==="url"?`await page.waitForURL(new RegExp(${qt(n.value)}))`:n.mode==="text"?`await expect(page).toContainText(${qt(n.value)})`:`await expect(${nr(n.target)}).toBeVisible()`;case"assertVisible":return`await expect(${nr(n.target)}).toBeVisible()`;case"assertText":return n.target?`await expect(${nr(n.target)}).toContainText(${qt(n.text)})`:`await expect(page).toContainText(${qt(n.text)})`;case"assertUrl":return`await expect(page).toHaveURL(new RegExp(${qt(n.urlContains)}))`;case"manual":return`// TODO: ${n.description}`}}function Mx(n){const l=`${n.target.name??""} ${n.target.label??""} ${n.target.placeholder??""}`.toLowerCase();return l.includes("password")||l.includes("รหัสผ่าน")?"{{TEST_PASSWORD}}":l.includes("email")||l.includes("อีเมล")?"{{TEST_EMAIL}}":l.includes("username")||l.includes("user name")||l.includes("ชื่อผู้ใช้")?"{{TEST_USERNAME}}":n.value}const qt=n=>JSON.stringify(n);function Lx(n){return n.replace(/\\(["'])/g,"$1")}function Bx(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function km(n){const l=[`describe(${Zt(n.module)}, () => {`,` it(${Zt(n.title)}, () => {`];for(const s of n.steps)l.push(` ${$x(s)}`);return l.push(" })","})",""),l.join(`
16
+ `)}function ar(n){const l=n.role&&n.name?`cy.contains(${Zt(n.role)}, ${Zt(n.name)})`:n.label?`cy.get('label').contains(${Zt(n.label)}).invoke('attr', 'for').then((id) => cy.get('#' + id))`:n.placeholder?`cy.get(${Zt(`[placeholder="${n.placeholder}"]`)})`:n.text?`cy.contains(${Zt(n.text)})`:`cy.get(${Zt(n.cssSelector??"")})`;return n.nth===void 0?l:`${l}.eq(${n.nth})`}function $x(n){switch(n.type){case"navigate":return`cy.visit(${Zt(n.url)})`;case"click":return`${ar(n.target)}.click()`;case"fill":return`${ar(n.target)}.clear().type(${Zt(Hx(n))})`;case"select":return`${ar(n.target)}.select(${Zt(n.option)})`;case"check":return`${ar(n.target)}.${n.checked?"check":"uncheck"}()`;case"wait":return n.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(n.value)||0))})`:n.mode==="url"?`cy.url().should('include', ${Zt(n.value)})`:n.mode==="text"?`cy.contains(${Zt(n.value)}).should('be.visible')`:`${ar(n.target)}.should('be.visible')`;case"assertVisible":return`${ar(n.target)}.should('be.visible')`;case"assertText":return n.target?`${ar(n.target)}.should('contain.text', ${Zt(n.text)})`:`cy.contains(${Zt(n.text)}).should('be.visible')`;case"assertUrl":return`cy.url().should('include', ${Zt(n.urlContains)})`;case"manual":return`// TODO: ${n.description}`}}function Hx(n){const l=`${n.target.name??""} ${n.target.label??""} ${n.target.placeholder??""}`.toLowerCase();return l.includes("password")||l.includes("รหัสผ่าน")?"{{TEST_PASSWORD}}":l.includes("email")||l.includes("อีเมล")?"{{TEST_EMAIL}}":l.includes("username")||l.includes("user name")||l.includes("ชื่อผู้ใช้")?"{{TEST_USERNAME}}":n.value}const Zt=n=>JSON.stringify(n);function qx(n){const l=n.steps.map(c=>Gx(n,c)),s=n.steps.find(c=>c.type==="assert"),o=s?.type==="assert"&&s.assertion.type==="text"?`The page shows "${s.assertion.value}".`:s?.type==="assert"&&s.assertion.type==="url"?`The URL contains "${s.assertion.value}".`:s?.type==="assert"?"The expected element is visible.":"Needs Review";return{id:`TC-FLOW-${n.id.slice(-8).toUpperCase()}`,module:"FLOW",title:n.name,preconditions:n.description?[n.description]:[],steps:l,expectedResult:o,type:"positive",priority:"medium",automationStatus:l.length?"ready":"needs-review",status:"pending",sourceUrl:n.baseUrl,notes:s?void 0:"Guided Flow has no assertion — expected result needs review."}}function Gx(n,l){switch(l.type){case"navigate":return{type:"navigate",url:new URL(l.path,n.baseUrl).toString()};case"click":return{type:"click",target:l.target};case"fill":return{type:"fill",target:l.target,value:l.valueRef?`{{${l.valueRef}}}`:l.value??""};case"select":return{type:"select",target:l.target,option:l.option};case"check":return{type:"check",target:l.target,checked:l.checked};case"wait":return{type:"wait",mode:l.mode,value:l.value,target:l.target};case"assert":return l.assertion.type==="visible"?{type:"assertVisible",target:l.assertion.target}:l.assertion.type==="text"?{type:"assertText",text:l.assertion.value}:{type:"assertUrl",urlContains:l.assertion.value}}}function Ix(n){const l=["import { test, expect } from '@playwright/test'","",`test(${JSON.stringify(n.name)}, async ({ page }) => {`];for(const s of n.steps)l.push(` ${Vx(n,s)}`);return l.push("})",""),l.join(`
17
+ `)}function Vx(n,l){switch(l.type){case"navigate":return`await page.goto(${JSON.stringify(new URL(l.path,n.baseUrl).toString())})`;case"click":return`await ${Gr(l.target)}.click()`;case"fill":return`await ${Gr(l.target)}.fill(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`await ${Gr(l.target)}.selectOption(${JSON.stringify(l.option)})`;case"check":return`await ${Gr(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`await page.waitForURL(new RegExp(${JSON.stringify(l.value)}))`:l.mode==="text"?`await expect(page).toContainText(${JSON.stringify(l.value)})`:`await expect(${Gr(l.target)}).toBeVisible()`;case"assert":return l.assertion.type==="visible"?`await expect(${Gr(l.assertion.target)}).toBeVisible()`:l.assertion.type==="text"?`await expect(page.getByText(${JSON.stringify(l.assertion.value)})).toBeVisible()`:`await expect(page).toHaveURL(new RegExp(${JSON.stringify(l.assertion.value)}))`}}function Gr(n){return n.strategy==="role"||n.role&&n.name?`page.getByRole(${JSON.stringify(n.role??"generic")}, { name: ${JSON.stringify(n.name??n.value??"")}${n.exact?", exact: true":""} })`:n.strategy==="label"||n.label?`page.getByLabel(${JSON.stringify(n.label??n.value??"")}, { exact: true })`:n.strategy==="placeholder"||n.placeholder?`page.getByPlaceholder(${JSON.stringify(n.placeholder??n.value??"")})`:n.strategy==="testid"||n.testId?`page.getByTestId(${JSON.stringify(n.testId??n.value??"")})`:n.strategy==="text"||n.text?`page.getByText(${JSON.stringify(n.text??n.value??"")})`:`page.locator(${Fx(Yx(n.cssSelector??n.value??""))})`}function Yx(n){return n.replace(/\\(["'])/g,"$1")}function Fx(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function Px(n){const l=[`describe(${JSON.stringify(n.name)}, () => {`,` it(${JSON.stringify(n.name)}, () => {`];for(const s of n.steps)l.push(` ${Zx(n,s)}`);return l.push(" })","})",""),l.join(`
18
+ `)}function Zx(n,l){switch(l.type){case"navigate":return`cy.visit(${JSON.stringify(new URL(l.path,n.baseUrl).toString())})`;case"click":return`${Ir(l.target)}.click()`;case"fill":return`${Ir(l.target)}.clear().type(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`${Ir(l.target)}.select(${JSON.stringify(l.option)})`;case"check":return`${Ir(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`cy.url().should('include', ${JSON.stringify(l.value)})`:l.mode==="text"?`cy.contains(${JSON.stringify(l.value)}).should('be.visible')`:`${Ir(l.target)}.should('be.visible')`;case"assert":return l.assertion.type==="visible"?`${Ir(l.assertion.target)}.should('be.visible')`:l.assertion.type==="text"?`cy.contains(${JSON.stringify(l.assertion.value)}).should('be.visible')`:`cy.url().should('include', ${JSON.stringify(l.assertion.value)})`}}function Ir(n){return n.strategy==="role"||n.role&&n.name?`cy.contains(${JSON.stringify(n.name??n.value??"")})`:n.strategy==="label"||n.label?`cy.get('label').contains(${JSON.stringify(n.label??n.value??"")})`:n.strategy==="placeholder"||n.placeholder?`cy.get(${JSON.stringify(`[placeholder="${n.placeholder??n.value??""}"]`)})`:n.strategy==="testid"||n.testId?`cy.get(${JSON.stringify(`[data-testid="${n.testId??n.value??""}"]`)})`:n.strategy==="text"||n.text?`cy.contains(${JSON.stringify(n.text??n.value??"")})`:`cy.get(${JSON.stringify(n.cssSelector??n.value??"")})`}class ir extends Error{code;hint;constructor(l,s,o){super(s),this.name="ApiError",this.code=l,this.hint=o}}async function Ma(n){try{const l=await n.json();if(l?.error?.message)return new ir(l.error.code,l.error.message,l.error.hint)}catch{}return new ir("unknown",`The server returned status ${n.status}.`)}async function Xx(n){let l;try{l=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch{throw new ir("server-unreachable","Could not reach the LazyScout API.",'Check that "npm run dev:server" is running.')}if(!l.ok)throw await Ma(l);return await l.json()}async function Qx(){const n=await fetch("/api/versions");if(!n.ok)throw await Ma(n);return await n.json()}async function Kx(n){const l=await fetch("/api/versions/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:n})});if(!l.ok)throw await Ma(l);return await l.json()}async function Jx(n,l=[]){const s=await fetch("/api/export/csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:n,testData:l})});if(!s.ok)throw await Ma(s);const o=await s.blob(),c=URL.createObjectURL(o),h=document.createElement("a");h.href=c,h.download=`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(h),h.click(),h.remove(),URL.revokeObjectURL(c)}async function Wx(n,l="playwright",s,o,c,h,f,p){const m=await fetch("/api/automation/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:n,framework:l,code:s,secrets:o,runId:c,projectId:h,blockedKeywords:f}),signal:p});if(!m.ok)throw await Ma(m);return await m.json()}async function e0(){return gt("/api/workspace")}async function Dm(n){await gt(`/api/workspace/projects/${encodeURIComponent(n.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}async function t0(n){await gt(`/api/workspace/projects/${encodeURIComponent(n)}`,{method:"DELETE"})}async function n0(n,l){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function a0(n){return gt(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/status`)}async function r0(n){return gt(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`)}async function i0(n,l){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({flows:l})})}async function l0(n,l,s,o){return gt("/api/guided-flows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flow:n,projectId:l,secrets:s,runId:o})})}async function s0(n){return gt("/api/guided-flows/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n})})}async function o0(n){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"DELETE"})}async function u0(n,l){return gt(`/api/recorder/${encodeURIComponent(n)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function zm(n){return gt(`/api/recorder/${encodeURIComponent(n)}`)}async function c0(n){return gt(`/api/recorder/${encodeURIComponent(n)}/stop`,{method:"POST"})}async function Um(n){return gt(`/api/recorder/${encodeURIComponent(n)}`,{method:"DELETE"})}async function d0(){await gt("/api/workspace/open",{method:"POST"})}async function f0(n){return gt(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`)}async function Mm(n,l){return gt(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function h0(n,l){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots/${encodeURIComponent(l)}`,{method:"DELETE"})}async function p0(n){return gt(`/api/workspace/projects/${encodeURIComponent(n)}/automation`)}async function Tc(n,l){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/automation`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function m0(n,l,s){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/reports`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,html:s})})}async function g0(n){return gt(`/api/workspace/projects/${encodeURIComponent(n)}/bugs`)}async function Lm(n,l){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(l.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function v0(n,l){await gt(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(l)}`,{method:"DELETE"})}async function gt(n,l){const s=await fetch(n,l);if(!s.ok)throw await Ma(s);return await s.json()}async function y0(n){await fetch("/api/automation/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n}),keepalive:!0})}async function b0(n){const l=await fetch("/api/load-test/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw await Ma(l);return await l.json()}async function x0(n,l,s=!1){const o=await fetch("/api/api-check/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiCheck:n,secrets:l,allowUnsafe:s})});if(!o.ok)throw await Ma(o);return await o.json()}function Bm(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=Array(l);s<l;s++)o[s]=n[s];return o}function S0(n){if(Array.isArray(n))return n}function j0(n,l,s){return(l=C0(l))in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function w0(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function _0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $m(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),s.push.apply(s,o)}return s}function Hm(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?$m(Object(s),!0).forEach(function(o){j0(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):$m(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function N0(n,l){if(n==null)return{};var s,o,c=E0(n,l);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(o=0;o<h.length;o++)s=h[o],l.indexOf(s)===-1&&{}.propertyIsEnumerable.call(n,s)&&(c[s]=n[s])}return c}function E0(n,l){if(n==null)return{};var s={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(l.indexOf(o)!==-1)continue;s[o]=n[o]}return s}function T0(n,l){return S0(n)||w0(n,l)||A0(n,l)||_0()}function O0(n,l){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function C0(n){var l=O0(n,"string");return typeof l=="symbol"?l:l+""}function A0(n,l){if(n){if(typeof n=="string")return Bm(n,l);var s={}.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Bm(n,l):void 0}}function R0(n,l,s){return l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function qm(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),s.push.apply(s,o)}return s}function Gm(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?qm(Object(s),!0).forEach(function(o){R0(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):qm(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function k0(){for(var n=arguments.length,l=new Array(n),s=0;s<n;s++)l[s]=arguments[s];return function(o){return l.reduceRight(function(c,h){return h(c)},o)}}function Qi(n){return function l(){for(var s=this,o=arguments.length,c=new Array(o),h=0;h<o;h++)c[h]=arguments[h];return c.length>=n.length?n.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return l.apply(s,[].concat(c,p))}}}function Xs(n){return{}.toString.call(n).includes("Object")}function D0(n){return!Object.keys(n).length}function el(n){return typeof n=="function"}function z0(n,l){return Object.prototype.hasOwnProperty.call(n,l)}function U0(n,l){return Xs(l)||Ua("changeType"),Object.keys(l).some(function(s){return!z0(n,s)})&&Ua("changeField"),l}function M0(n){el(n)||Ua("selectorType")}function L0(n){el(n)||Xs(n)||Ua("handlerType"),Xs(n)&&Object.values(n).some(function(l){return!el(l)})&&Ua("handlersType")}function B0(n){n||Ua("initialIsRequired"),Xs(n)||Ua("initialType"),D0(n)&&Ua("initialContent")}function $0(n,l){throw new Error(n[l]||n.default)}var H0={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Ua=Qi($0)(H0),Us={changes:U0,selector:M0,handler:L0,initial:B0};function q0(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Us.initial(n),Us.handler(l);var s={current:n},o=Qi(V0)(s,l),c=Qi(I0)(s),h=Qi(Us.changes)(n),f=Qi(G0)(s);function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(w){return w};return Us.selector(g),g(s.current)}function m(g){k0(o,c,h,f)(g)}return[p,m]}function G0(n,l){return el(l)?l(n.current):l}function I0(n,l){return n.current=Gm(Gm({},n.current),l),l}function V0(n,l,s){return el(l)?l(n.current):Object.keys(s).forEach(function(o){var c;return(c=l[o])===null||c===void 0?void 0:c.call(l,n.current[o])}),s}var Y0={create:q0},F0={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function P0(n){return function l(){for(var s=this,o=arguments.length,c=new Array(o),h=0;h<o;h++)c[h]=arguments[h];return c.length>=n.length?n.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return l.apply(s,[].concat(c,p))}}}function Z0(n){return{}.toString.call(n).includes("Object")}function X0(n){return n||Im("configIsRequired"),Z0(n)||Im("configType"),n.urls?(Q0(),{paths:{vs:n.urls.monacoBase}}):n}function Q0(){console.warn(Wg.deprecation)}function K0(n,l){throw new Error(n[l]||n.default)}var Wg={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
20
20
  You are using deprecated way of configuration.
21
21
 
22
22
  Instead of using
@@ -25,34 +25,34 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
25
25
  monaco.config({ paths: { vs: '...' } })
26
26
 
27
27
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
28
- `},Im=I0(P0)(Wg),Z0={config:Y0},X0=function(){for(var l=arguments.length,s=new Array(l),o=0;o<l;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(h,f){return f(h)},c)}};function ev(a,l){return Object.keys(l).forEach(function(s){l[s]instanceof Object&&a[s]&&Object.assign(l[s],ev(a[s],l[s]))}),Hm(Hm({},a),l)}var Q0={type:"cancelation",msg:"operation is manually canceled"};function Oc(a){var l=!1,s=new Promise(function(o,c){a.then(function(h){return l?c(Q0):o(h)}),a.catch(c)});return s.cancel=function(){return l=!0},s}var K0=["monaco"],J0=q0.create({config:G0,isInitialized:!1,resolve:null,reject:null,monaco:null}),tv=w0(J0,2),ml=tv[0],lo=tv[1];function W0(a){var l=Z0.config(a),s=l.monaco,o=S0(l,K0);lo(function(c){return{config:ev(c.config,o),monaco:s}})}function e1(){var a=ml(function(l){var s=l.monaco,o=l.isInitialized,c=l.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!a.isInitialized){if(lo({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),Oc(Ac);if(window.monaco&&window.monaco.editor)return nv(window.monaco),a.resolve(window.monaco),Oc(Ac);X0(t1,a1)(r1)}return Oc(Ac)}function t1(a){return document.body.appendChild(a)}function n1(a){var l=document.createElement("script");return a&&(l.src=a),l}function a1(a){var l=ml(function(o){var c=o.config,h=o.reject;return{config:c,reject:h}}),s=n1("".concat(l.config.paths.vs,"/loader.js"));return s.onload=function(){return a()},s.onerror=l.reject,s}function r1(){var a=ml(function(s){var o=s.config,c=s.resolve,h=s.reject;return{config:o,resolve:c,reject:h}}),l=window.require;l.config(a.config),l(["vs/editor/editor.main"],function(s){var o=s.m||s;nv(o),a.resolve(o)},function(s){a.reject(s)})}function nv(a){ml().monaco||lo({monaco:a})}function i1(){return ml(function(a){var l=a.monaco;return l})}var Ac=new Promise(function(a,l){return lo({resolve:a,reject:l})}),av={config:W0,init:e1,__getMonacoInstance:i1},l1={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Cc=l1,s1={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},o1=s1;function u1({children:a}){return Zr.createElement("div",{style:o1.container},a)}var c1=u1,d1=c1;function f1({width:a,height:l,isEditorReady:s,loading:o,_ref:c,className:h,wrapperProps:f}){return Zr.createElement("section",{style:{...Cc.wrapper,width:a,height:l},...f},!s&&Zr.createElement(d1,null,o),Zr.createElement("div",{ref:c,style:{...Cc.fullWidth,...!s&&Cc.hide},className:h}))}var h1=f1,rv=F.memo(h1);function p1(a){F.useEffect(a,[])}var iv=p1;function m1(a,l,s=!0){let o=F.useRef(!0);F.useEffect(o.current||!s?()=>{o.current=!1}:a,l)}var mn=m1;function Ji(){}function Fr(a,l,s,o){return g1(a,o)||v1(a,l,s,o)}function g1(a,l){return a.editor.getModel(lv(a,l))}function v1(a,l,s,o){return a.editor.createModel(l,s,o?lv(a,o):void 0)}function lv(a,l){return a.Uri.parse(l)}function y1({original:a,modified:l,language:s,originalLanguage:o,modifiedLanguage:c,originalModelPath:h,modifiedModelPath:f,keepCurrentOriginalModel:p=!1,keepCurrentModifiedModel:m=!1,theme:g="light",loading:w="Loading...",options:v={},height:x="100%",width:y="100%",className:A,wrapperProps:N={},beforeMount:j=Ji,onMount:T=Ji}){let[O,k]=F.useState(!1),[M,R]=F.useState(!0),B=F.useRef(null),H=F.useRef(null),ae=F.useRef(null),W=F.useRef(T),ne=F.useRef(j),se=F.useRef(!1);iv(()=>{let X=av.init();return X.then(V=>(H.current=V)&&R(!1)).catch(V=>V?.type!=="cancelation"&&console.error("Monaco initialization: error:",V)),()=>B.current?E():X.cancel()}),mn(()=>{if(B.current&&H.current){let X=B.current.getOriginalEditor(),V=Fr(H.current,a||"",o||s||"text",h||"");V!==X.getModel()&&X.setModel(V)}},[h],O),mn(()=>{if(B.current&&H.current){let X=B.current.getModifiedEditor(),V=Fr(H.current,l||"",c||s||"text",f||"");V!==X.getModel()&&X.setModel(V)}},[f],O),mn(()=>{let X=B.current.getModifiedEditor();X.getOption(H.current.editor.EditorOption.readOnly)?X.setValue(l||""):l!==X.getValue()&&(X.executeEdits("",[{range:X.getModel().getFullModelRange(),text:l||"",forceMoveMarkers:!0}]),X.pushUndoStop())},[l],O),mn(()=>{B.current?.getModel()?.original.setValue(a||"")},[a],O),mn(()=>{let{original:X,modified:V}=B.current.getModel();H.current.editor.setModelLanguage(X,o||s||"text"),H.current.editor.setModelLanguage(V,c||s||"text")},[s,o,c],O),mn(()=>{H.current?.editor.setTheme(g)},[g],O),mn(()=>{B.current?.updateOptions(v)},[v],O);let q=F.useCallback(()=>{if(!H.current)return;ne.current(H.current);let X=Fr(H.current,a||"",o||s||"text",h||""),V=Fr(H.current,l||"",c||s||"text",f||"");B.current?.setModel({original:X,modified:V})},[s,l,c,a,o,h,f]),G=F.useCallback(()=>{!se.current&&ae.current&&(B.current=H.current.editor.createDiffEditor(ae.current,{automaticLayout:!0,...v}),q(),H.current?.editor.setTheme(g),k(!0),se.current=!0)},[v,g,q]);F.useEffect(()=>{O&&W.current(B.current,H.current)},[O]),F.useEffect(()=>{!M&&!O&&G()},[M,O,G]);function E(){let X=B.current?.getModel();p||X?.original?.dispose(),m||X?.modified?.dispose(),B.current?.dispose()}return Zr.createElement(rv,{width:y,height:x,isEditorReady:O,loading:w,_ref:ae,className:A,wrapperProps:N})}var b1=y1;F.memo(b1);function x1(a){let l=F.useRef();return F.useEffect(()=>{l.current=a},[a]),l.current}var S1=x1,Ms=new Map;function j1({defaultValue:a,defaultLanguage:l,defaultPath:s,value:o,language:c,path:h,theme:f="light",line:p,loading:m="Loading...",options:g={},overrideServices:w={},saveViewState:v=!0,keepCurrentModel:x=!1,width:y="100%",height:A="100%",className:N,wrapperProps:j={},beforeMount:T=Ji,onMount:O=Ji,onChange:k,onValidate:M=Ji}){let[R,B]=F.useState(!1),[H,ae]=F.useState(!0),W=F.useRef(null),ne=F.useRef(null),se=F.useRef(null),q=F.useRef(O),G=F.useRef(T),E=F.useRef(),X=F.useRef(o),V=S1(h),P=F.useRef(!1),Q=F.useRef(!1);iv(()=>{let S=av.init();return S.then(C=>(W.current=C)&&ae(!1)).catch(C=>C?.type!=="cancelation"&&console.error("Monaco initialization: error:",C)),()=>ne.current?I():S.cancel()}),mn(()=>{let S=Fr(W.current,a||o||"",l||c||"",h||s||"");S!==ne.current?.getModel()&&(v&&Ms.set(V,ne.current?.saveViewState()),ne.current?.setModel(S),v&&ne.current?.restoreViewState(Ms.get(h)))},[h],R),mn(()=>{ne.current?.updateOptions(g)},[g],R),mn(()=>{!ne.current||o===void 0||(ne.current.getOption(W.current.editor.EditorOption.readOnly)?ne.current.setValue(o):o!==ne.current.getValue()&&(Q.current=!0,ne.current.executeEdits("",[{range:ne.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ne.current.pushUndoStop(),Q.current=!1))},[o],R),mn(()=>{let S=ne.current?.getModel();S&&c&&W.current?.editor.setModelLanguage(S,c)},[c],R),mn(()=>{p!==void 0&&ne.current?.revealLine(p)},[p],R),mn(()=>{W.current?.editor.setTheme(f)},[f],R);let D=F.useCallback(()=>{if(!(!se.current||!W.current)&&!P.current){G.current(W.current);let S=h||s,C=Fr(W.current,o||a||"",l||c||"",S||"");ne.current=W.current?.editor.create(se.current,{model:C,automaticLayout:!0,...g},w),v&&ne.current.restoreViewState(Ms.get(S)),W.current.editor.setTheme(f),p!==void 0&&ne.current.revealLine(p),B(!0),P.current=!0}},[a,l,s,o,c,h,g,w,v,f,p]);F.useEffect(()=>{R&&q.current(ne.current,W.current)},[R]),F.useEffect(()=>{!H&&!R&&D()},[H,R,D]),X.current=o,F.useEffect(()=>{R&&k&&(E.current?.dispose(),E.current=ne.current?.onDidChangeModelContent(S=>{Q.current||k(ne.current.getValue(),S)}))},[R,k]),F.useEffect(()=>{if(R){let S=W.current.editor.onDidChangeMarkers(C=>{let $=ne.current.getModel()?.uri;if($&&C.find(K=>K.path===$.path)){let K=W.current.editor.getModelMarkers({resource:$});M?.(K)}});return()=>{S?.dispose()}}return()=>{}},[R,M]);function I(){E.current?.dispose(),x?v&&Ms.set(h,ne.current.saveViewState()):ne.current.getModel()?.dispose(),ne.current.dispose()}return Zr.createElement(rv,{width:y,height:A,isEditorReady:R,loading:m,_ref:se,className:N,wrapperProps:j})}var w1=j1,_1=F.memo(w1),N1=_1;function Vm({value:a,framework:l,onChange:s,height:o="calc(100vh - 420px)"}){function c(h,f){const p="typescript",m=l==="playwright"?["page.goto()","page.getByRole()","page.getByLabel()","page.getByText()","page.locator()","page.waitForTimeout()",'await page.screenshot({ path: "evidence.png", fullPage: true })',"expect(page).toHaveURL()","expect(locator).toBeVisible()","expect(locator).toContainText()"]:["cy.visit()","cy.findByRole()","cy.get()","cy.contains()","cy.wait()","cy.url().should()","locator.should('be.visible')","locator.should('contain.text')"],g=f.languages.registerCompletionItemProvider(p,{triggerCharacters:[".","("],provideCompletionItems:(w,v)=>{const x=w.getWordUntilPosition(v),y=w.getLineContent(v.lineNumber).slice(0,v.column-1).toLowerCase(),A={startLineNumber:v.lineNumber,endLineNumber:v.lineNumber,startColumn:x.startColumn,endColumn:v.column},N=E1(y,l);return{suggestions:[...m.map(j=>({label:j,kind:f.languages.CompletionItemKind.Method,insertText:j,range:A,detail:l==="playwright"?"Playwright API":"Cypress API"})),...N.map(j=>({...j,kind:f.languages.CompletionItemKind.Snippet,range:A}))]}}});h.onDidDispose(()=>g.dispose())}return r.jsx(N1,{height:o,theme:"vs-dark",language:"typescript",value:a,onChange:h=>s(h??""),onMount:c,options:{automaticLayout:!0,minimap:{enabled:!0},fontSize:13,lineNumbers:"on",folding:!0,wordWrap:"off",tabSize:2,insertSpaces:!0,scrollBeyondLastLine:!1,smoothScrolling:!0,suggestOnTriggerCharacters:!0,quickSuggestions:!0,padding:{top:16,bottom:16}}})}function E1(a,l){const s=l==="playwright",o=[];return/กรอก|พิมพ์|fill|type|input/i.test(a)&&o.push({label:"กรอกข้อมูลในช่อง (fill)",insertText:s?"await page.getByLabel('${1:Email}').fill('${2:value}')":"cy.findByLabelText('${1:Email}').type('${2:value}')",detail:"เดาจากคำสั่งกรอก/พิมพ์"}),/คลิก|กด|click|press|ปุ่ม/i.test(a)&&o.push({label:"คลิกปุ่ม (click)",insertText:s?"await page.getByRole('button', { name: '${1:Login}' }).click()":"cy.findByRole('button', { name: '${1:Login}' }).click()",detail:"เดาจากคำสั่งคลิก/กดปุ่ม"}),/เปิดหน้า|ไปที่|navigate|visit|goto/i.test(a)&&o.push({label:"เปิดหน้า URL (navigate)",insertText:s?"await page.goto('${1:https://example.com}')":"cy.visit('${1:https://example.com}')",detail:"เดาจากคำสั่งเปิดหน้า"}),/ตรวจสอบ|เช็ค|assert|expect|verify|เห็นข้อความ|ข้อความ/i.test(a)&&o.push({label:"ตรวจสอบข้อความ (assert text)",insertText:s?"await expect(page.getByText('${1:Success}')).toBeVisible()":"cy.contains('${1:Success}').should('be.visible')",detail:"เดาจากคำสั่งตรวจสอบ"}),o}function T1({sourceUrl:a,onUse:l}){const s=a||"http://localhost:5500/login",o=`await page.goto("${s}")
28
+ `},Im=P0(K0)(Wg),J0={config:X0},W0=function(){for(var l=arguments.length,s=new Array(l),o=0;o<l;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(h,f){return f(h)},c)}};function ev(n,l){return Object.keys(l).forEach(function(s){l[s]instanceof Object&&n[s]&&Object.assign(l[s],ev(n[s],l[s]))}),Hm(Hm({},n),l)}var e1={type:"cancelation",msg:"operation is manually canceled"};function Oc(n){var l=!1,s=new Promise(function(o,c){n.then(function(h){return l?c(e1):o(h)}),n.catch(c)});return s.cancel=function(){return l=!0},s}var t1=["monaco"],n1=Y0.create({config:F0,isInitialized:!1,resolve:null,reject:null,monaco:null}),tv=T0(n1,2),ml=tv[0],lo=tv[1];function a1(n){var l=J0.config(n),s=l.monaco,o=N0(l,t1);lo(function(c){return{config:ev(c.config,o),monaco:s}})}function r1(){var n=ml(function(l){var s=l.monaco,o=l.isInitialized,c=l.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!n.isInitialized){if(lo({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),Oc(Cc);if(window.monaco&&window.monaco.editor)return nv(window.monaco),n.resolve(window.monaco),Oc(Cc);W0(i1,s1)(o1)}return Oc(Cc)}function i1(n){return document.body.appendChild(n)}function l1(n){var l=document.createElement("script");return n&&(l.src=n),l}function s1(n){var l=ml(function(o){var c=o.config,h=o.reject;return{config:c,reject:h}}),s=l1("".concat(l.config.paths.vs,"/loader.js"));return s.onload=function(){return n()},s.onerror=l.reject,s}function o1(){var n=ml(function(s){var o=s.config,c=s.resolve,h=s.reject;return{config:o,resolve:c,reject:h}}),l=window.require;l.config(n.config),l(["vs/editor/editor.main"],function(s){var o=s.m||s;nv(o),n.resolve(o)},function(s){n.reject(s)})}function nv(n){ml().monaco||lo({monaco:n})}function u1(){return ml(function(n){var l=n.monaco;return l})}var Cc=new Promise(function(n,l){return lo({resolve:n,reject:l})}),av={config:a1,init:r1,__getMonacoInstance:u1},c1={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Ac=c1,d1={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},f1=d1;function h1({children:n}){return Zr.createElement("div",{style:f1.container},n)}var p1=h1,m1=p1;function g1({width:n,height:l,isEditorReady:s,loading:o,_ref:c,className:h,wrapperProps:f}){return Zr.createElement("section",{style:{...Ac.wrapper,width:n,height:l},...f},!s&&Zr.createElement(m1,null,o),Zr.createElement("div",{ref:c,style:{...Ac.fullWidth,...!s&&Ac.hide},className:h}))}var v1=g1,rv=F.memo(v1);function y1(n){F.useEffect(n,[])}var iv=y1;function b1(n,l,s=!0){let o=F.useRef(!0);F.useEffect(o.current||!s?()=>{o.current=!1}:n,l)}var mn=b1;function Ji(){}function Fr(n,l,s,o){return x1(n,o)||S1(n,l,s,o)}function x1(n,l){return n.editor.getModel(lv(n,l))}function S1(n,l,s,o){return n.editor.createModel(l,s,o?lv(n,o):void 0)}function lv(n,l){return n.Uri.parse(l)}function j1({original:n,modified:l,language:s,originalLanguage:o,modifiedLanguage:c,originalModelPath:h,modifiedModelPath:f,keepCurrentOriginalModel:p=!1,keepCurrentModifiedModel:m=!1,theme:g="light",loading:w="Loading...",options:v={},height:x="100%",width:y="100%",className:C,wrapperProps:N={},beforeMount:j=Ji,onMount:T=Ji}){let[O,k]=F.useState(!1),[M,R]=F.useState(!0),B=F.useRef(null),H=F.useRef(null),ae=F.useRef(null),W=F.useRef(T),ne=F.useRef(j),se=F.useRef(!1);iv(()=>{let X=av.init();return X.then(V=>(H.current=V)&&R(!1)).catch(V=>V?.type!=="cancelation"&&console.error("Monaco initialization: error:",V)),()=>B.current?E():X.cancel()}),mn(()=>{if(B.current&&H.current){let X=B.current.getOriginalEditor(),V=Fr(H.current,n||"",o||s||"text",h||"");V!==X.getModel()&&X.setModel(V)}},[h],O),mn(()=>{if(B.current&&H.current){let X=B.current.getModifiedEditor(),V=Fr(H.current,l||"",c||s||"text",f||"");V!==X.getModel()&&X.setModel(V)}},[f],O),mn(()=>{let X=B.current.getModifiedEditor();X.getOption(H.current.editor.EditorOption.readOnly)?X.setValue(l||""):l!==X.getValue()&&(X.executeEdits("",[{range:X.getModel().getFullModelRange(),text:l||"",forceMoveMarkers:!0}]),X.pushUndoStop())},[l],O),mn(()=>{B.current?.getModel()?.original.setValue(n||"")},[n],O),mn(()=>{let{original:X,modified:V}=B.current.getModel();H.current.editor.setModelLanguage(X,o||s||"text"),H.current.editor.setModelLanguage(V,c||s||"text")},[s,o,c],O),mn(()=>{H.current?.editor.setTheme(g)},[g],O),mn(()=>{B.current?.updateOptions(v)},[v],O);let q=F.useCallback(()=>{if(!H.current)return;ne.current(H.current);let X=Fr(H.current,n||"",o||s||"text",h||""),V=Fr(H.current,l||"",c||s||"text",f||"");B.current?.setModel({original:X,modified:V})},[s,l,c,n,o,h,f]),G=F.useCallback(()=>{!se.current&&ae.current&&(B.current=H.current.editor.createDiffEditor(ae.current,{automaticLayout:!0,...v}),q(),H.current?.editor.setTheme(g),k(!0),se.current=!0)},[v,g,q]);F.useEffect(()=>{O&&W.current(B.current,H.current)},[O]),F.useEffect(()=>{!M&&!O&&G()},[M,O,G]);function E(){let X=B.current?.getModel();p||X?.original?.dispose(),m||X?.modified?.dispose(),B.current?.dispose()}return Zr.createElement(rv,{width:y,height:x,isEditorReady:O,loading:w,_ref:ae,className:C,wrapperProps:N})}var w1=j1;F.memo(w1);function _1(n){let l=F.useRef();return F.useEffect(()=>{l.current=n},[n]),l.current}var N1=_1,Ms=new Map;function E1({defaultValue:n,defaultLanguage:l,defaultPath:s,value:o,language:c,path:h,theme:f="light",line:p,loading:m="Loading...",options:g={},overrideServices:w={},saveViewState:v=!0,keepCurrentModel:x=!1,width:y="100%",height:C="100%",className:N,wrapperProps:j={},beforeMount:T=Ji,onMount:O=Ji,onChange:k,onValidate:M=Ji}){let[R,B]=F.useState(!1),[H,ae]=F.useState(!0),W=F.useRef(null),ne=F.useRef(null),se=F.useRef(null),q=F.useRef(O),G=F.useRef(T),E=F.useRef(),X=F.useRef(o),V=N1(h),P=F.useRef(!1),Q=F.useRef(!1);iv(()=>{let S=av.init();return S.then(A=>(W.current=A)&&ae(!1)).catch(A=>A?.type!=="cancelation"&&console.error("Monaco initialization: error:",A)),()=>ne.current?I():S.cancel()}),mn(()=>{let S=Fr(W.current,n||o||"",l||c||"",h||s||"");S!==ne.current?.getModel()&&(v&&Ms.set(V,ne.current?.saveViewState()),ne.current?.setModel(S),v&&ne.current?.restoreViewState(Ms.get(h)))},[h],R),mn(()=>{ne.current?.updateOptions(g)},[g],R),mn(()=>{!ne.current||o===void 0||(ne.current.getOption(W.current.editor.EditorOption.readOnly)?ne.current.setValue(o):o!==ne.current.getValue()&&(Q.current=!0,ne.current.executeEdits("",[{range:ne.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ne.current.pushUndoStop(),Q.current=!1))},[o],R),mn(()=>{let S=ne.current?.getModel();S&&c&&W.current?.editor.setModelLanguage(S,c)},[c],R),mn(()=>{p!==void 0&&ne.current?.revealLine(p)},[p],R),mn(()=>{W.current?.editor.setTheme(f)},[f],R);let D=F.useCallback(()=>{if(!(!se.current||!W.current)&&!P.current){G.current(W.current);let S=h||s,A=Fr(W.current,o||n||"",l||c||"",S||"");ne.current=W.current?.editor.create(se.current,{model:A,automaticLayout:!0,...g},w),v&&ne.current.restoreViewState(Ms.get(S)),W.current.editor.setTheme(f),p!==void 0&&ne.current.revealLine(p),B(!0),P.current=!0}},[n,l,s,o,c,h,g,w,v,f,p]);F.useEffect(()=>{R&&q.current(ne.current,W.current)},[R]),F.useEffect(()=>{!H&&!R&&D()},[H,R,D]),X.current=o,F.useEffect(()=>{R&&k&&(E.current?.dispose(),E.current=ne.current?.onDidChangeModelContent(S=>{Q.current||k(ne.current.getValue(),S)}))},[R,k]),F.useEffect(()=>{if(R){let S=W.current.editor.onDidChangeMarkers(A=>{let $=ne.current.getModel()?.uri;if($&&A.find(K=>K.path===$.path)){let K=W.current.editor.getModelMarkers({resource:$});M?.(K)}});return()=>{S?.dispose()}}return()=>{}},[R,M]);function I(){E.current?.dispose(),x?v&&Ms.set(h,ne.current.saveViewState()):ne.current.getModel()?.dispose(),ne.current.dispose()}return Zr.createElement(rv,{width:y,height:C,isEditorReady:R,loading:m,_ref:se,className:N,wrapperProps:j})}var T1=E1,O1=F.memo(T1),C1=O1;function Vm({value:n,framework:l,onChange:s,height:o="calc(100vh - 420px)"}){function c(h,f){const p="typescript",m=l==="playwright"?["page.goto()","page.getByRole()","page.getByLabel()","page.getByText()","page.locator()","page.waitForTimeout()",'await page.screenshot({ path: "evidence.png", fullPage: true })',"expect(page).toHaveURL()","expect(locator).toBeVisible()","expect(locator).toContainText()"]:["cy.visit()","cy.findByRole()","cy.get()","cy.contains()","cy.wait()","cy.url().should()","locator.should('be.visible')","locator.should('contain.text')"],g=f.languages.registerCompletionItemProvider(p,{triggerCharacters:[".","("],provideCompletionItems:(w,v)=>{const x=w.getWordUntilPosition(v),y=w.getLineContent(v.lineNumber).slice(0,v.column-1).toLowerCase(),C={startLineNumber:v.lineNumber,endLineNumber:v.lineNumber,startColumn:x.startColumn,endColumn:v.column},N=A1(y,l);return{suggestions:[...m.map(j=>({label:j,kind:f.languages.CompletionItemKind.Method,insertText:j,range:C,detail:l==="playwright"?"Playwright API":"Cypress API"})),...N.map(j=>({...j,kind:f.languages.CompletionItemKind.Snippet,range:C}))]}}});h.onDidDispose(()=>g.dispose())}return r.jsx(C1,{height:o,theme:"vs-dark",language:"typescript",value:n,onChange:h=>s(h??""),onMount:c,options:{automaticLayout:!0,minimap:{enabled:!0},fontSize:13,lineNumbers:"on",folding:!0,wordWrap:"off",tabSize:2,insertSpaces:!0,scrollBeyondLastLine:!1,smoothScrolling:!0,suggestOnTriggerCharacters:!0,quickSuggestions:!0,padding:{top:16,bottom:16}}})}function A1(n,l){const s=l==="playwright",o=[];return/กรอก|พิมพ์|fill|type|input/i.test(n)&&o.push({label:"กรอกข้อมูลในช่อง (fill)",insertText:s?"await page.getByLabel('${1:Email}').fill('${2:value}')":"cy.findByLabelText('${1:Email}').type('${2:value}')",detail:"เดาจากคำสั่งกรอก/พิมพ์"}),/คลิก|กด|click|press|ปุ่ม/i.test(n)&&o.push({label:"คลิกปุ่ม (click)",insertText:s?"await page.getByRole('button', { name: '${1:Login}' }).click()":"cy.findByRole('button', { name: '${1:Login}' }).click()",detail:"เดาจากคำสั่งคลิก/กดปุ่ม"}),/เปิดหน้า|ไปที่|navigate|visit|goto/i.test(n)&&o.push({label:"เปิดหน้า URL (navigate)",insertText:s?"await page.goto('${1:https://example.com}')":"cy.visit('${1:https://example.com}')",detail:"เดาจากคำสั่งเปิดหน้า"}),/ตรวจสอบ|เช็ค|assert|expect|verify|เห็นข้อความ|ข้อความ/i.test(n)&&o.push({label:"ตรวจสอบข้อความ (assert text)",insertText:s?"await expect(page.getByText('${1:Success}')).toBeVisible()":"cy.contains('${1:Success}').should('be.visible')",detail:"เดาจากคำสั่งตรวจสอบ"}),o}function R1({sourceUrl:n,onUse:l}){const s=n||"http://localhost:5500/login",o=`await page.goto("${s}")
29
29
  await page.getByLabel("Email address").fill("{{TEST_EMAIL}}")
30
30
  await page.getByLabel("Password").fill("{{TEST_PASSWORD}}")
31
31
  await page.getByRole("button", { name: "Login" }).click()
32
32
  await expect(page).toHaveURL(new RegExp("/dashboard"))`,c=`await page.goto("${s}")
33
33
  await page.getByLabel("Password").fill("wrong-password")
34
34
  await page.getByRole("button", { name: "Login" }).click()
35
- await expect(page.getByRole("alert")).toContainText("Invalid password")`;return r.jsxs("section",{className:"qa-guidance",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Beginner guide"}),r.jsx("h3",{children:"What should I add next?"}),r.jsx("p",{children:"Use a template, then replace labels and expected results with what you observed."})]}),r.jsxs("div",{className:"qa-guidance-actions",children:[r.jsxs("button",{type:"button",onClick:()=>l(o),children:[r.jsx("b",{children:"Login success"}),r.jsx("span",{children:"Fill credentials and verify the next URL"})]}),r.jsxs("button",{type:"button",onClick:()=>l(c),children:[r.jsx("b",{children:"Login validation"}),r.jsx("span",{children:"Try an invalid password and assert the alert"})]}),r.jsx("span",{children:"For uploads, create a draft first and choose a safe test file before running."})]})]})}function O1({stopped:a=!1}){return r.jsx("svg",{className:"run-button-icon",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:a?r.jsx("rect",{x:"5.25",y:"5.25",width:"9.5",height:"9.5",rx:"2",fill:"currentColor"}):r.jsx("path",{d:"M6.2 3.95a1.15 1.15 0 0 1 1.75-.97l7.05 5.03a1.2 1.2 0 0 1 0 1.98l-7.05 5.03a1.15 1.15 0 0 1-1.75-.97V3.95Z",fill:"currentColor"})})}function Rc({children:a,stopped:l=!1,onClick:s,disabled:o=!1}){return r.jsxs("button",{type:"button",className:`btn ${l?"btn-danger":"btn-dark"} run-button`,onClick:s,disabled:o,children:[r.jsx(O1,{stopped:l}),r.jsx("span",{children:a})]})}function A1({testCases:a,projectId:l="active",secrets:s,blockedKeywords:o,onRunStatus:c,onRunResult:h}){const[f,p]=F.useState("playwright"),m=a.find(Y=>/submit|login|sign in|เข้าสู่ระบบ|ล็อกอิน/i.test(`${Y.title} ${Y.module}`))??a[0],[g,w]=F.useState(m?.id??""),[v,x]=F.useState(()=>a.map(Y=>Y.id)),[y,A]=F.useState(!1),[N,j]=F.useState(!1),[T,O]=F.useState(""),[k,M]=F.useState(),[R,B]=F.useState([]),[H,ae]=F.useState(!1),[W,ne]=F.useState(!1),[se,q]=F.useState("all"),G=F.useRef(void 0),E=F.useRef(!1),[X,V]=F.useState({}),P=a.find(Y=>Y.id===g)??a[0],Q=F.useMemo(()=>[{value:"all",label:"All folders and tags"},...[...new Set(a.map(Y=>Y.folder??Y.module))].sort().map(Y=>({value:`folder:${Y}`,label:`Folder: ${Y}`})),...[...new Set(a.flatMap(Y=>Y.tags??[]))].sort().map(Y=>({value:`tag:${Y}`,label:`Tag: ${Y}`}))],[a]),D=F.useMemo(()=>se==="all"?a:a.filter(Y=>se.startsWith("folder:")?(Y.folder??Y.module)===se.slice(7):(Y.tags??[]).includes(se.slice(4))),[se,a]),I=D.filter(Y=>v.includes(Y.id)).length;F.useEffect(()=>{a.some(Y=>Y.id===g)||w(m?.id??"")},[m?.id,g,a]),F.useEffect(()=>{V({}),(async()=>{const Y=await c0(l),re=`lazyscout.automation.${l}`;let L={};try{L=JSON.parse(localStorage.getItem(re)??"{}")}catch{}const U={...L,...Y};Object.keys(L).length&&(await Tc(l,U),localStorage.removeItem(re)),V(U)})().catch(()=>V({}))},[l]),F.useEffect(()=>{x(a.map(Y=>Y.id))},[a]),F.useEffect(()=>{const Y=L=>{y&&(L.key==="F5"||(L.ctrlKey||L.metaKey)&&L.key.toLowerCase()==="r")&&(L.preventDefault(),ne(!0))},re=L=>{if(!y)return;const U=G.current;U&&navigator.sendBeacon("/api/automation/stop",new Blob([JSON.stringify({runId:U.runId})],{type:"application/json"})),L.preventDefault(),L.returnValue=""};return window.addEventListener("keydown",Y),window.addEventListener("beforeunload",re),()=>{window.removeEventListener("keydown",Y),window.removeEventListener("beforeunload",re)}},[y]);const S=F.useMemo(()=>P?f==="playwright"?Rm(P):km(P):"",[f,P]),C=P?`${f}:${P.id}`:"",$=X[C]??S;function K(){O($),j(!0)}function ie(){const Y={...X,[C]:T};V(Y),Tc(l,Y),j(!1)}function ye(){const Y={...X};delete Y[C],V(Y),Tc(l,Y),j(!1)}function _e(Y){const re=`${f}:${Y.id}`;return X[re]??(f==="playwright"?Rm(Y):km(Y))}async function Ne(Y,re){const L=crypto.randomUUID(),U=new AbortController;G.current={runId:L,controller:U};try{const J=await Xx(Y,f,re,s,L,l,o,U.signal);return c?.(Y.id,J.status==="passed"?"passed":J.status==="failed"?"failed":"pending"),h?.(Y.id,J),J}catch(J){const ge=E.current||J instanceof DOMException&&J.name==="AbortError",he={status:ge?"stopped":"failed",framework:f,logs:[{timestamp:new Date().toISOString(),level:ge?"warn":"fail",message:ge?"Run stopped by user.":J instanceof Error?J.message:String(J)}]};return c?.(Y.id,ge?"pending":"failed"),h?.(Y.id,he),he}finally{G.current?.runId===L&&(G.current=void 0)}}async function oe(){E.current=!0;const Y=G.current;Y&&(Y.controller.abort(),p0(Y.runId).catch(()=>{})),ae(!1),ne(!1),B(re=>[...re,{timestamp:new Date().toISOString(),level:"warn",message:"Stop requested. Closing the active Playwright session…"}])}async function je(){if(!P||y)return;E.current=!1,A(!0),M("running"),B([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --case ${P.id}`},{timestamp:new Date().toISOString(),level:"info",message:`Starting Playwright runner: ${P.title}`},{timestamp:new Date().toISOString(),level:"info",message:"Preparing browser context and test steps…"},{timestamp:new Date().toISOString(),level:"info",message:"Running generated automation source…"}]);const Y=await Ne(P,$);M(Y.status),B(re=>[...re,...Y.logs]),A(!1)}async function Ee(){if(y)return;const Y=D.filter(L=>v.includes(L.id)).slice(0,50);if(E.current=!1,A(!0),M("running"),B([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --all --project ${l}`},{timestamp:new Date().toISOString(),level:"info",message:`Selected cases: ${Y.length}/${D.length} in current filter · Run budget: 50 cases`}]),Y.length===0){B(L=>[...L,{timestamp:new Date().toISOString(),level:"warn",message:"No test cases selected. Nothing to run."}]),M("pending"),A(!1);return}let re=!1;for(const L of Y){if(E.current)break;const U=await Ne(L,_e(L));if(U.status==="failed"&&(re=!0),B(J=>[...J,...U.logs]),U.status==="stopped")break}M(E.current?"stopped":re?"failed":"passed"),A(!1)}function $e(){navigator.clipboard?.writeText($)}function He(){const Y=new Blob([$],{type:"text/plain"}),re=URL.createObjectURL(Y),L=document.createElement("a");L.href=re,L.download=`${P?.id??"lazyscout-test"}.${f==="playwright"?"spec.ts":"cy.ts"}`,L.click(),URL.revokeObjectURL(re)}function _(){oe(),window.location.reload()}return r.jsxs("section",{className:"automation-page",children:[r.jsxs("div",{className:"automation-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation workspace"}),r.jsx("h2",{children:"Generated Tests"}),r.jsx("p",{children:"Edit the generated file per Test Case, then run one case or selected cases."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{className:"automation-run-filter",value:se,disabled:y,onChange:Y=>q(Y.target.value),children:Q.map(Y=>r.jsx("option",{value:Y.value,children:Y.label},Y.value))}),r.jsxs("span",{className:"automation-selected-count",children:[I,"/",D.length," selected"]}),y?r.jsx(Rc,{stopped:!0,onClick:()=>ae(!0),children:"Stop run"}):r.jsx(Rc,{onClick:Ee,children:"Run selected cases"})]})]}),r.jsx(T1,{sourceUrl:P?.sourceUrl,onUse:Y=>{O(Y),j(!0)}}),r.jsxs("div",{className:"automation-layout",children:[r.jsxs("aside",{className:"automation-case-list",children:[r.jsxs("div",{className:"automation-filter-head",children:[r.jsxs("span",{className:"field-label",children:["Test files (",D.length,"/",a.length,")"]}),r.jsx("span",{children:se==="all"?"All":"Filtered"})]}),D.map(Y=>r.jsxs("button",{type:"button",className:P?.id===Y.id?"selected":"",onClick:()=>{w(Y.id),j(!1)},children:[r.jsx("input",{type:"checkbox",checked:v.includes(Y.id),onChange:re=>{re.stopPropagation(),x(L=>re.target.checked?[...L,Y.id]:L.filter(U=>U!==Y.id))},onClick:re=>re.stopPropagation(),"aria-label":`Run ${Y.id}`}),r.jsx("span",{className:"case-file-icon",children:X[`playwright:${Y.id}`]||X[`cypress:${Y.id}`]?"●":"○"}),r.jsxs("span",{children:[r.jsx("b",{children:Y.id}),r.jsx("small",{children:Y.title}),Y.tags?.length?r.jsx("em",{className:"automation-tag",children:Y.tags.slice(0,2).join(" · ")}):null]})]},Y.id))]}),r.jsxs("div",{className:"automation-editor",children:[r.jsxs("div",{className:"automation-toolbar",children:[r.jsxs("select",{className:"field",value:f,onChange:Y=>p(Y.target.value),disabled:y,children:[r.jsx("option",{value:"playwright",children:"Playwright"}),r.jsx("option",{value:"cypress",children:"Cypress"})]}),r.jsx("span",{className:"automation-source",children:P?.sourceUrl}),r.jsxs("div",{className:"ml-auto flex gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:K,disabled:N||y,children:"Edit code"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:ye,disabled:y,children:"Regenerate"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:$e,children:"Copy"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:He,children:"Save file"}),r.jsx(Rc,{onClick:je,disabled:y||!P,children:"Run"})]})]}),N?r.jsxs("div",{className:"code-edit-area",children:[r.jsx(Vm,{value:T,framework:f,onChange:O}),r.jsxs("div",{className:"code-edit-actions",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>j(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ie,children:"Save code"})]})]}):r.jsx("pre",{className:"automation-code",children:$||"No Test Cases are available to generate."}),k&&r.jsxs("div",{className:"terminal-panel",children:[r.jsxs("div",{className:"terminal-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," CLI output"]}),r.jsx("b",{className:k==="passed"?"terminal-pass":k==="failed"?"terminal-fail":"terminal-warn",children:k.toUpperCase()})]}),r.jsx("div",{className:"terminal-body",children:R.map((Y,re)=>r.jsxs("div",{className:`terminal-line terminal-${Y.level}`,children:[r.jsx("span",{children:new Date(Y.timestamp).toLocaleTimeString()}),Y.message,Y.durationMs!==void 0&&r.jsxs("em",{children:[Y.durationMs,"ms"]})]},`${Y.timestamp}-${re}`))})]})]})]}),H&&r.jsx(Ym,{title:"Stop the running tests?",message:"The active Playwright session will be closed. Remaining selected Test Cases will not run.",confirmLabel:"Stop run",onCancel:()=>ae(!1),onConfirm:()=>{oe()}}),W&&r.jsx(Ym,{title:"Stop tests and refresh?",message:"Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases.",confirmLabel:"Stop and refresh",onCancel:()=>ne(!1),onConfirm:_}),N&&r.jsx("div",{className:"modern-modal-backdrop code-editor-backdrop",children:r.jsxs("section",{className:"modern-modal code-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"code-editor-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation source"}),r.jsxs("h2",{id:"code-editor-title",children:["Edit ",f==="playwright"?"Playwright":"Cypress"," code"]}),r.jsxs("p",{children:[P?.id," · ",P?.title]})]}),r.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close editor",onClick:()=>j(!1),children:"×"})]}),r.jsx("div",{className:"code-editor-modal-body",children:r.jsx(Vm,{value:T,framework:f,onChange:O,height:"100%"})}),r.jsxs("footer",{className:"modal-footer code-editor-modal-footer",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>j(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ie,children:"Save code"})]})]})})]})}function Ym({title:a,message:l,confirmLabel:s,onCancel:o,onConfirm:c}){return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal run-confirm-modal",role:"dialog","aria-modal":"true",children:[r.jsx("div",{className:"modal-header",children:r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Running tests"}),r.jsx("h2",{children:a}),r.jsx("p",{children:l})]})}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Keep running"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:c,children:s})]})]})})}function C1({result:a}){const[l,s]=F.useState("events"),[o,c]=F.useState(!1),[h,f]=F.useState(a.runEvents);async function p(){if(!o){s("terminal"),c(!0),f([]);for(const g of a.runEvents)await new Promise(w=>window.setTimeout(w,120)),f(w=>[...w,g]);c(!1)}}const m=o||h.length<a.runEvents.length?h:a.runEvents;return r.jsxs("section",{className:"scout-log-card",children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright Scout Log"}),r.jsx("h2",{children:"Scout Log"})]}),r.jsxs("span",{className:"run-live",children:[r.jsx("i",{})," DONE"]})]}),r.jsxs("div",{className:"scout-log-tabs",children:[r.jsx("button",{type:"button",className:l==="events"?"active":"",onClick:()=>s("events"),children:"◉ Event Stream"}),r.jsx("button",{type:"button",className:l==="terminal"?"active":"",onClick:()=>s("terminal"),children:"›_ CLI Terminal"})]}),r.jsxs("div",{className:"run-summary",children:[r.jsxs("div",{children:[r.jsxs("strong",{children:[a.stats.durationMs,"ms"]}),r.jsx("span",{children:"duration"})]}),r.jsxs("div",{children:[r.jsx("strong",{children:a.stats.pagesVisited}),r.jsx("span",{children:"pages"})]}),r.jsxs("div",{children:[r.jsx("strong",{className:a.stats.urlsSkipped?"text-amber-600":"",children:a.stats.urlsSkipped}),r.jsx("span",{children:"skipped"})]})]}),l==="terminal"?r.jsxs("div",{className:"scout-cli-terminal",children:[r.jsxs("div",{className:"scout-cli-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," Playwright CLI output"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("b",{children:o?"RUNNING":"COMPLETED"}),r.jsx("button",{type:"button",className:"cli-run-button",onClick:p,disabled:o,children:o?"Running…":"▶ Run again"})]})]}),r.jsxs("div",{className:"scout-cli-body",children:[r.jsxs("div",{children:[r.jsx("em",{children:"$"})," npx playwright scout ",a.startUrl]}),m.map((g,w)=>r.jsxs("div",{className:g.result==="failed"?"cli-fail":g.result==="warning"||g.result==="blocked"?"cli-warn":"cli-pass",children:[r.jsx("em",{children:"›"})," ",g.message]},`cli-${g.timestamp}-${w}`)),o&&r.jsx("div",{className:"cli-cursor",children:"▌"})]})]}):r.jsx("div",{className:"run-events",children:a.runEvents.map((g,w)=>r.jsxs("div",{className:"run-event",children:[r.jsx("div",{className:`event-marker event-${g.result}`}),r.jsxs("div",{className:"run-event-body",children:[r.jsxs("div",{className:"run-event-top",children:[r.jsx("span",{children:new Date(g.timestamp).toLocaleTimeString()}),r.jsx("b",{children:g.eventType})]}),r.jsx("p",{children:g.message}),g.currentUrl&&r.jsx("small",{children:new URL(g.currentUrl).pathname})]})]},`${g.timestamp}-${w}`))}),r.jsxs("div",{className:"inspector-foot",children:[r.jsx("span",{className:"status-dot status-pass"})," Scout completed · Playwright events captured"]})]})}function R1({checks:a,secrets:l}){const[s,o]=F.useState(),[c,h]=F.useState({}),[f,p]=F.useState();async function m(g,w=!1){o(g.id);try{const v=await g0(g,l,w);h(x=>({...x,[g.id]:`${v.status.toUpperCase()} · ${v.message}`}))}catch(v){h(x=>({...x,[g.id]:v instanceof Error?v.message:String(v)}))}finally{o(void 0)}}return r.jsxs("div",{className:"api-checks",children:[r.jsxs("div",{className:"api-checks-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Network validation"}),r.jsx("h3",{children:"Test API"}),r.jsx("p",{children:"Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured."})]}),r.jsxs("span",{className:"status-badge status-badge-pass",children:[a.length," observed"]})]}),a.length===0?r.jsxs("div",{className:"empty-state",children:["Run Analyze with ",r.jsx("b",{children:"Include API checks from XHR/fetch"})," enabled to collect the API requests used by the page."]}):r.jsx("div",{className:"api-table",children:a.map(g=>r.jsxs("div",{className:"api-row",children:[r.jsx("span",{className:"api-method",children:g.method}),r.jsxs("div",{children:[r.jsx("b",{children:g.id}),r.jsx("p",{children:g.url}),r.jsx("small",{children:g.note??`Observed HTTP ${g.observedStatus??"—"} · ${g.durationMs??0}ms`})]}),r.jsx("span",{className:`status-badge ${g.status==="observed"?"status-badge-pass":"status-badge-warn"}`,children:g.status}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>["GET","HEAD","OPTIONS"].includes(g.method.toUpperCase())?void m(g):p(g),disabled:s===g.id,children:s===g.id?"Checking…":"Run API"}),c[g.id]&&r.jsx("div",{className:"api-result",children:c[g.id]})]},g.id))}),f&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal",role:"dialog","aria-modal":"true","aria-labelledby":"unsafe-api-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Protected API action"}),r.jsxs("h2",{id:"unsafe-api-title",children:["Run ",f.method.toUpperCase()," once?"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>p(void 0),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:"This request can create, update, or delete data. LazyScout will send it only once for this run."}),r.jsx("code",{className:"block break-all",children:f.url})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(void 0),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{p(void 0),m(f,!0)},children:"Run once"})]})]})})]})}function Fm({view:a,onChange:l,counts:s}){const{t:o}=io(),c=[["overview",o("overview"),"⌂"],["testcases",`${o("testCases")} ${s.cases}`,"✓"],["automation",o("automation"),"↗"],["scoutlog",o("scoutLog"),"◉"],["explorer",o("explorer"),"⌘"],["loadtest","Load Test","⚡"]];return r.jsx("nav",{className:"workspace-nav",children:c.map(([h,f,p])=>r.jsxs("button",{type:"button",className:a===h?"is-active":"",onClick:()=>l(h),children:[r.jsx("span",{children:p}),f,h==="explorer"&&r.jsx("small",{children:s.states})]},h))})}function k1({projects:a,activeProjectId:l,result:s,collapsed:o,onToggleCollapsed:c,onSelect:h,onNew:f,onDelete:p,onRename:m,onSettings:g,workspaceRoot:w,onOpenWorkspace:v}){const{language:x,toggleLanguage:y,t:A}=io(),[N,j]=F.useState(),[T,O]=F.useState(),[k,M]=F.useState("");return r.jsxs("aside",{className:`workspace-sidebar ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"sidebar-brand",children:[r.jsx("span",{className:"brand-mark",children:"LS"}),r.jsx("b",{children:"LazyScout"}),r.jsx("button",{type:"button",className:"sidebar-collapse",onClick:c,title:o?"Expand sidebar":"Collapse sidebar",children:o?"›":"‹"})]}),r.jsxs("button",{type:"button",className:"new-project-btn",onClick:f,title:A("newProject"),children:[r.jsx("span",{children:"+"}),r.jsx("em",{children:A("newProject")})]}),r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:A("projects")}),r.jsx("b",{children:a.length})]}),r.jsx("div",{className:"project-list",children:a.map(R=>r.jsx("div",{className:`project-item ${R.id===l?"active":""}`,children:T===R.id?r.jsxs("form",{className:"project-rename",onSubmit:B=>{B.preventDefault(),m(R.id,k),O(void 0)},children:[r.jsx("input",{autoFocus:!0,value:k,onChange:B=>M(B.target.value),onKeyDown:B=>{B.key==="Escape"&&O(void 0)}}),r.jsx("button",{type:"submit",children:"Save"}),r.jsx("button",{type:"button",onClick:()=>O(void 0),children:"×"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:()=>h(R.id),title:R.targetUrl?`${R.name}
36
- ${R.targetUrl}`:R.name,children:[r.jsx("span",{className:"project-icon",children:"◈"}),r.jsxs("span",{className:"project-copy",children:[r.jsx("b",{children:R.name}),r.jsx("small",{children:R.targetUrl||"Manual suite"})]})]}),r.jsxs("div",{className:"project-actions",children:[r.jsx("button",{type:"button",className:"project-more",title:"Project actions",onClick:()=>j(B=>B===R.id?void 0:R.id),children:"⋯"}),N===R.id&&r.jsxs("div",{className:"project-action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{O(R.id),M(R.name),j(void 0)},children:"Rename"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p(R.id),j(void 0)},children:"Delete"})]})]})]})},R.id))}),s&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:A("files")}),r.jsx("b",{children:s.pages.length})]}),r.jsx("div",{className:"file-list",children:s.pages.map(R=>r.jsxs("div",{className:"file-item",title:R.finalUrl,children:[r.jsx("span",{children:"◫"}),r.jsx("span",{className:"file-name",children:new URL(R.finalUrl).pathname==="/"?"index":new URL(R.finalUrl).pathname.slice(1)}),r.jsx("small",{children:R.state?.fingerprint.slice(-4)})]},R.finalUrl))})]}),l&&r.jsxs("button",{type:"button",className:"sidebar-settings",onClick:g,title:A("settings"),children:[r.jsx("span",{children:"⚙"}),r.jsx("em",{children:A("settings")})]}),r.jsx("div",{className:"sidebar-bottom",children:r.jsxs("div",{className:"workspace-language-row",children:[r.jsxs("button",{type:"button",className:"workspace-copy",onClick:v,title:w,children:[r.jsx("span",{className:"status-dot status-pass"})," ",r.jsx("b",{children:A("localWorkspace")}),r.jsx("small",{children:w||A("storedHere")})]}),r.jsx("button",{type:"button",className:"language-circle",onClick:y,title:x==="en"?"Switch to Thai":"Switch to English (US)","aria-label":"Switch language",children:x==="en"?"EN":"TH"})]})})]})}function D1(a){return sv(a,!0)}function z1(a){return sv(a,!1)}function sv(a,l){const s=`<!doctype html><html><head><meta charset="utf-8"><title>LazyScout Quality Report</title><style>${L1}</style></head><body>${U1(a)}</body></html>`,o=window.open("","_blank","width=1100,height=820");return o&&(o.document.open(),o.document.write(s),o.document.close(),l&&window.setTimeout(()=>{o.focus(),o.print()},350)),s}function U1(a){const l=[["Test Cases",a.testCases,`${a.pages} pages explored`],["Pass",a.passed,"Execution result"],["Failed",a.failed,"Execution result"],["Requirements",a.requirementCount,`${a.linkedCases}/${a.testCases} cases linked`]],s=a.failedCases.length?`<section class="failures"><div class="head"><div><p>FOLLOW-UP</p><h2>Failed Test Cases & logs</h2></div><em>${a.failedCases.length} failed</em></div>${a.failedCases.map(o=>`<article><div><b>${kn(o.id)} · ${kn(o.title)}</b><small>${kn(o.folder||"UNASSIGNED")}</small></div><pre>${o.logs.length?kn(o.logs.join(`
37
- `)):"No run log was captured for this case."}</pre></article>`).join("")}</section>`:"";return`<main><header><div><div class="brand">LS <span>LazyScout</span></div><p>QUALITY REPORT</p><h1>Quality overview</h1><small>${kn(a.origin)} · Generated ${kn(a.generatedAt)}</small></div><div class="report-state">${a.pending} pending execution</div></header><section class="metrics">${l.map(([o,c,h])=>`<article><span>${o}</span><b>${c}</b><small>${h}</small></article>`).join("")}</section><section class="grid"><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Execution status</h2></div><em>Donut chart</em></div>${Pm(a.status,"Test Cases")}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Priority</h2></div><em>Column chart</em></div>${M1(a.priority)}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Test type</h2></div><em>Bar chart</em></div>${Zm(a.testType)}</article><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Automation readiness</h2></div><em>Donut chart</em></div>${Pm(a.readiness,"Cases")}</article><article class="card wide"><div class="head"><div><p>HIERARCHY</p><h2>Folder coverage</h2></div><em>Top 10</em></div>${Zm(a.modules)}</article></section>${s}<footer>LazyScout · Local QA workspace</footer></main>`}function Pm(a,l){const s=a.reduce((h,f)=>h+f.value,0);let o=0;return`<div class="donut-wrap"><div class="donut" style="background:conic-gradient(${a.map(h=>{const f=s?o/s*100:0;o+=h.value;const p=s?o/s*100:0;return`${h.color} ${f}% ${p}%`}).join(", ")||"#e2e8f0 0 100%"})"><div><b>${s}</b><span>${l}</span></div></div><div class="legend">${a.map(h=>`<div><i style="background:${h.color}"></i><span title="${kn(h.label)}">${kn(Td(h.label))}</span><b>${h.value}</b></div>`).join("")}</div></div>`}function M1(a){const l=Math.max(...a.map(o=>o.value),1),s=a.reduce((o,c)=>o+c.value,0)||1;return`<div class="columns"><div class="axis"><span>100%</span><span>75%</span><span>50%</span><span>25%</span><span>0%</span></div><div class="column-area" style="grid-template-columns:repeat(${Math.max(a.length,1)},minmax(0,1fr))">${a.map(o=>`<div class="column"><div class="column-track"><i style="height:${o.value/l*100}%;background:${o.color}"></i></div><b>${o.value} <small>${Math.round(o.value/s*100)}%</small></b><span>${kn(Td(o.label))}</span></div>`).join("")}</div></div>`}function Zm(a){const l=Math.max(...a.map(s=>s.value),1);return`<div class="bars">${a.map(s=>`<div><span title="${kn(s.label)}">${kn(Td(s.label))}</span><section><i style="width:${s.value/l*100}%;background:${s.color}"></i></section><b>${s.value}</b></div>`).join("")}</div>`}function Td(a){return a.length>10?`${a.slice(0,10)}...`:a}function kn(a){return String(a).replace(/[&<>'"]/g,l=>({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"})[l]??l)}const L1="@page{size:A4 landscape;margin:12mm}*{box-sizing:border-box}body{margin:0;color:#182238;font:12px Inter,Arial,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact}main{max-width:1120px;margin:auto}header{display:flex;justify-content:space-between;align-items:start;padding-bottom:18px;border-bottom:1px solid #e2e8f0}.brand{font-size:18px;font-weight:800;color:#fff;background:#2563eb;border-radius:7px;display:inline-flex;gap:9px;align-items:center;padding:6px 9px}.brand span{color:#182238}header p{margin:15px 0 3px;font-size:9px;letter-spacing:1.4px;color:#64748b;font-weight:700}h1{margin:0;font-size:26px}header small{display:block;margin-top:6px;color:#64748b}.report-state{border-radius:999px;padding:7px 10px;background:#fffbeb;color:#b45309;font-weight:700}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.metrics article,.card,.failures{border:1px solid #e2e8f0;border-radius:10px;background:#fff}.metrics article{padding:13px}.metrics span,.metrics small{display:block;color:#64748b}.metrics b{display:block;margin:8px 0 2px;font-size:27px}.metrics small{font-size:10px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.card{padding:15px;min-height:230px}.card.wide{grid-column:1/3;min-height:180px}.head{display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #f1f5f9;padding-bottom:10px}.head p{margin:0;color:#64748b;font-size:9px;font-weight:700;letter-spacing:1px}.head h2{margin:4px 0 0;font-size:14px}.head em{font-style:normal;background:#f1f5f9;border-radius:999px;padding:4px 7px;color:#64748b;font-size:9px}.donut-wrap{height:165px;display:flex;align-items:center;justify-content:center;gap:30px}.donut{width:124px;height:124px;border-radius:50%;display:flex;align-items:center;justify-content:center}.donut>div{width:68px;height:68px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut b{font-size:21px}.donut span{font-size:9px;color:#64748b}.legend{min-width:140px}.legend div{display:grid;grid-template-columns:9px 1fr auto;gap:7px;align-items:center;margin:8px 0}.legend i{width:8px;height:8px;border-radius:50%}.legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.columns{display:grid;grid-template-columns:34px 1fr;gap:5px;height:165px;margin-top:10px}.axis{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:25px;text-align:right;font-size:8px;color:#94a3b8}.column-area{display:grid;gap:6px;align-items:end;border-bottom:1px solid #cbd5e1;background:repeating-linear-gradient(to bottom,transparent 0 calc(25% - 1px),#e2e8f0 calc(25% - 1px) 25%)}.column{min-width:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:3px}.column-track{height:112px;width:100%;max-width:34px;background:#f1f5f9;display:flex;align-items:end;border-radius:4px 4px 0 0}.column-track i{width:100%;display:block;border-radius:4px 4px 0 0}.column b{font-size:10px;white-space:nowrap}.column small{font-size:8px;color:#94a3b8}.column>span{width:100%;font-size:8px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.bars{margin-top:18px}.bars>div{display:grid;grid-template-columns:85px 1fr 28px;gap:9px;align-items:center;margin:9px 0}.bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.bars section{height:9px;border-radius:99px;background:#f1f5f9;overflow:hidden}.bars i{display:block;height:100%;border-radius:99px}.bars b{text-align:right}.failures{margin-top:12px;padding:15px}.failures article{padding:10px 0;border-bottom:1px solid #f1f5f9}.failures article:last-child{border:0}.failures b,.failures small{display:block}.failures small{margin-top:3px;color:#64748b;font-size:10px}.failures pre{margin:8px 0 0;max-height:110px;overflow:auto;white-space:pre-wrap;border-radius:6px;background:#0b1120;padding:9px;color:#dbeafe;font:9px ui-monospace,monospace}footer{margin-top:18px;border-top:1px solid #e2e8f0;padding-top:10px;color:#94a3b8;font-size:10px}";function B1({result:a,testCases:l,executionStatuses:s={},runResults:o={},projectId:c}){const[h,f]=F.useState(!1),[p,m]=F.useState({status:!0,priority:!0,type:!0,automation:!0,modules:!0,trend:!0}),[g,w]=F.useState({status:"donut",priority:"column",type:"bar",automation:"donut",modules:"treemap",trend:"line"}),v=G=>s[G.id]??G.status??(G.automationStatus==="ready"?"passed":"pending"),x={passed:l.filter(G=>v(G)==="passed").length,failed:l.filter(G=>v(G)==="failed").length,pending:l.filter(G=>v(G)==="pending").length},y=Ls(l,G=>G.priority),A=Ls(l,G=>G.type),N=Ls(l,G=>G.automationStatus),j=Ls(l,G=>(G.folder??G.module)||"UNASSIGNED"),T=F.useMemo(()=>Y1(a),[a]),O=[{label:"Pass",value:x.passed,color:"#10b981"},{label:"Failed",value:x.failed,color:"#ef4444"},{label:"Pending",value:x.pending,color:"#f59e0b"}],k=[{label:"High",value:y.high??0,color:"#ef4444"},{label:"Medium",value:y.medium??0,color:"#f59e0b"},{label:"Low",value:y.low??0,color:"#3b82f6"}],M=[{label:"Positive",value:A.positive??0,color:"#10b981"},{label:"Negative",value:A.negative??0,color:"#ef4444"},{label:"Validation",value:A.validation??0,color:"#6366f1"}],R=[{label:"Ready",value:N.ready??0,color:"#3b82f6"},{label:"Needs review",value:N["needs-review"]??0,color:"#f59e0b"},{label:"Needs data",value:N["needs-data"]??0,color:"#8b5cf6"},{label:"Manual",value:N.manual??0,color:"#64748b"}],B=Object.entries(j).map(([G,E],X)=>({label:G,value:E,color:Xm[X%Xm.length]})),H=l.filter(G=>(G.requirements?.length??0)>0).length,ae=new Set(l.flatMap(G=>G.requirements??[])).size,W={origin:a.origin,generatedAt:new Date().toLocaleString(),pages:a.pages.length,testCases:l.length,passed:x.passed,failed:x.failed,pending:x.pending,needsReview:N["needs-review"]??0,linkedCases:H,requirementCount:ae,status:O,priority:k,testType:M,readiness:R,modules:uv(B),failedCases:l.filter(G=>v(G)==="failed").map(G=>({id:G.id,title:G.title,folder:G.folder??G.module,logs:(o[G.id]?.logs??[]).slice(-8).map(E=>`${new Date(E.timestamp).toLocaleTimeString()} ${E.message}`)}))},ne=G=>m(E=>({...E,[G]:!E[G]})),se=(G,E)=>w(X=>({...X,[G]:E})),q=G=>{const E=G?D1(W):z1(W);c&&d0(c,G?"quality-report-print.html":"quality-report.html",E)};return r.jsxs("div",{className:"dashboard-view",children:[r.jsxs("div",{className:"dashboard-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Project dashboard"}),r.jsx("h2",{children:"Quality overview"}),r.jsxs("p",{children:["Coverage and readiness for ",r.jsx("b",{children:a.origin})]})]}),r.jsxs("div",{className:"dashboard-actions",children:[r.jsxs("span",{className:"status-badge status-badge-warn",children:[x.pending," pending execution"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>f(G=>!G),children:"Customize"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>q(!1),children:"HTML report"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>q(!0),children:"Export PDF"})]})]}),h&&r.jsxs("div",{className:"dashboard-customize",children:[r.jsx("b",{children:"Dashboard layout"}),r.jsx("span",{children:"Show or hide charts"}),["status","priority","type","automation","modules","trend"].map(G=>r.jsxs("label",{children:[r.jsx("input",{type:"checkbox",checked:p[G],onChange:()=>ne(G)})," ",$1(G)]},G))]}),r.jsxs("div",{className:"dashboard-metrics",children:[r.jsx(Fi,{label:"Test Cases",value:l.length,hint:`${a.pages.length} pages explored`,tone:"blue"}),r.jsx(Fi,{label:"Pass",value:x.passed,hint:"Execution result",tone:"green"}),r.jsx(Fi,{label:"Failed",value:x.failed,hint:"Execution result",tone:"red"}),r.jsx(Fi,{label:"Need Review",value:N["needs-review"]??0,hint:"Tester decision needed",tone:"amber"}),r.jsx(Fi,{label:"Requirements",value:ae,hint:`${H}/${l.length} cases linked`,tone:"blue"})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.status&&r.jsx(Vr,{eyebrow:"Composition",title:"Execution status",panel:"status",kind:g.status,onChange:se,children:Pi(g.status,O,"Test Cases")}),p.priority&&r.jsx(Vr,{eyebrow:"Comparison",title:"Priority",panel:"priority",kind:g.priority,onChange:se,children:Pi(g.priority,k,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.type&&r.jsx(Vr,{eyebrow:"Comparison",title:"Test type",panel:"type",kind:g.type,onChange:se,children:Pi(g.type,M,"Cases")}),p.automation&&r.jsx(Vr,{eyebrow:"Composition",title:"Automation readiness",panel:"automation",kind:g.automation,onChange:se,children:Pi(g.automation,R,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.modules&&r.jsx(Vr,{eyebrow:"Hierarchy",title:"Folder coverage",panel:"modules",kind:g.modules,onChange:se,children:Pi(g.modules,B,"Cases")}),p.trend&&r.jsx(Vr,{eyebrow:"Trend",title:"Scout discovery",panel:"trend",kind:g.trend,onChange:se,children:g.trend==="line"?r.jsx(V1,{points:T.slice(-dd)}):r.jsx(ov,{items:T.slice(-dd).map((G,E)=>({label:`Step ${E+1}`,value:G,color:"#4f46e5"}))})})]})]})}function Vr({eyebrow:a,title:l,panel:s,kind:o,onChange:c,children:h}){return r.jsxs("section",{className:"dashboard-card",children:[r.jsxs("div",{className:"dashboard-card-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:a}),r.jsx("h3",{children:l})]}),r.jsxs("label",{className:"chart-selector",children:[r.jsx("span",{children:"Chart"}),r.jsx("select",{value:o,onChange:f=>c(s,f.target.value),children:F1[s].map(f=>r.jsx("option",{value:f,children:H1(f)},f))})]})]}),h]})}function Fi({label:a,value:l,hint:s,tone:o}){return r.jsxs("div",{className:`dashboard-metric tone-${o}`,children:[r.jsx("span",{children:a}),r.jsx("strong",{children:l}),r.jsx("small",{children:s})]})}function Ls(a,l){return a.reduce((s,o)=>{const c=l(o);return s[c]=(s[c]??0)+1,s},{})}function $1(a){return{status:"Execution status",priority:"Priority comparison",type:"Test type comparison",automation:"Automation readiness",modules:"Folder treemap",trend:"Scout trend"}[a]}function H1(a){return{bar:"Bar chart",column:"Column chart",donut:"Donut chart",treemap:"Treemap",line:"Line chart"}[a]}function Pi(a,l,s){const o=uv(l);return a==="donut"?r.jsx(q1,{slices:o,totalLabel:s,compact:o.length>3}):a==="column"?r.jsx(ov,{items:o}):a==="treemap"?r.jsx(I1,{items:o}):r.jsx(G1,{items:o})}function q1({slices:a,totalLabel:l,compact:s=!1}){const o=a.reduce((f,p)=>f+p.value,0);let c=0;const h=a.map(f=>{const p=o?c/o*100:0;c+=f.value;const m=o?c/o*100:0;return`${f.color} ${p}% ${m}%`}).join(", ");return r.jsxs("div",{className:`donut-chart ${s?"is-compact":""}`,children:[r.jsx("div",{className:"donut-ring",style:{background:o?`conic-gradient(${h})`:"#e2e8f0"},children:r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:l})]})}),r.jsx("div",{className:"donut-legend",children:a.map(f=>r.jsxs("div",{children:[r.jsx("i",{style:{background:f.color}}),r.jsx("span",{title:f.label,children:so(f.label)}),r.jsx("b",{children:f.value})]},f.label))})]})}function ov({items:a}){const l=Math.max(...a.map(o=>o.value),1),s=a.reduce((o,c)=>o+c.value,0)||1;return r.jsxs("div",{className:"column-chart-wrap",children:[r.jsxs("div",{className:"column-axis","aria-hidden":"true",children:[r.jsx("span",{children:"100%"}),r.jsx("span",{children:"75%"}),r.jsx("span",{children:"50%"}),r.jsx("span",{children:"25%"}),r.jsx("span",{children:"0%"})]}),r.jsxs("div",{className:"column-chart",style:{gridTemplateColumns:`repeat(${Math.max(a.length,1)}, minmax(0, 1fr))`},children:[r.jsx("div",{className:"column-grid","aria-hidden":"true"}),a.map(o=>r.jsxs("div",{className:"column-item",title:o.label,children:[r.jsx("div",{className:"column-track",children:r.jsx("i",{style:{height:`${o.value/l*100}%`,background:o.color}})}),r.jsxs("div",{className:"column-value",children:[r.jsx("b",{children:o.value}),r.jsxs("small",{children:[Math.round(o.value/s*100),"%"]})]}),r.jsx("span",{children:so(o.label)})]},o.label))]})]})}function G1({items:a}){const l=Math.max(...a.map(s=>s.value),1);return r.jsx("div",{className:"bar-chart",children:a.map(s=>r.jsxs("div",{className:"bar-row",children:[r.jsx("span",{title:s.label,children:so(s.label)}),r.jsx("div",{children:r.jsx("i",{style:{width:`${s.value/l*100}%`,background:s.color}})}),r.jsx("b",{children:s.value})]},s.label))})}function I1({items:a}){return r.jsx("div",{className:"treemap",children:a.length?a.map(l=>r.jsxs("div",{style:{flexGrow:l.value,background:l.color},title:`${l.label}: ${l.value}`,children:[r.jsx("b",{children:so(l.label)}),r.jsxs("span",{children:[l.value," cases"]})]},l.label)):r.jsx("p",{children:"No folders found."})})}function V1({points:a}){const l=Math.max(...a,1),s=Math.max(a.length-1,1),o=a.map((c,h)=>`${h/s*100},${100-c/l*82-9}`).join(" ");return r.jsxs("div",{className:"line-chart",children:[r.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",role:"img","aria-label":"Cumulative Scout discovery trend",children:[r.jsx("line",{x1:"0",y1:"91",x2:"100",y2:"91"}),r.jsx("polyline",{points:o})]}),r.jsxs("div",{className:"line-chart-meta",children:[r.jsx("span",{children:"Start"}),r.jsxs("b",{children:[a[a.length-1]??0," discoveries"]}),r.jsx("span",{children:"Complete"})]})]})}function Y1(a){let l=0;const s=[0];for(const o of a.runEvents)(o.eventType==="page-discovered"||o.eventType==="state-discovered"||o.eventType==="action-discovered")&&(l++,s.push(l));return s.length>1?s:[0,a.pages.length]}const Xm=["#2563eb","#7c3aed","#0891b2","#059669","#d97706","#db2777","#475569"],F1={status:["donut","bar","column"],priority:["column","bar","donut"],type:["bar","column","donut"],automation:["donut","bar","column"],modules:["treemap","bar","column","donut"],trend:["line","column"]},dd=10;function uv(a){return[...a].sort((l,s)=>s.value-l.value).slice(0,dd)}function so(a){return a.length>10?`${a.slice(0,10)}...`:a}const P1=["navigate","click","fill","select","check","wait","assert"],Z1="https://lazyscout.lazyscout.workers.dev/guided-flow.html";function X1({flows:a,baseUrl:l,projectId:s,secrets:o,onSave:c,onGenerateTestCase:h}){const[f,p]=F.useState(),[m,g]=F.useState(),[w,v]=F.useState("click"),[x,y]=F.useState(!1),[A,N]=F.useState(!1),[j,T]=F.useState(),[O,k]=F.useState(),[M,R]=F.useState(),[B,H]=F.useState();F.useEffect(()=>{if(!a.length)return;const $=a.find(K=>K.id===f)??a[0];p($.id),g($)},[a]);const ae=a.findIndex($=>$.id===m?.id),W=!!(m?.baseUrl&&m.steps.length);function ne(){const $=new Date().toISOString(),K={id:crypto.randomUUID(),name:"New Guided Flow",description:"",baseUrl:l||"http://localhost:5173",steps:[{id:crypto.randomUUID(),type:"navigate",path:"/"}],createdAt:$,updatedAt:$};p(K.id),g(K),k(void 0)}function se($){g(K=>K&&{...K,...$,updatedAt:new Date().toISOString()})}function q($,K){if(!m)return;const ie=m.steps.map((ye,_e)=>_e===$?K:ye);se({steps:ie})}function G(){m&&se({steps:[...m.steps,K1(w)]})}function E($){m&&se({steps:m.steps.filter((K,ie)=>ie!==$)})}function X($,K){if(!m)return;const ie=$+K;if(ie<0||ie>=m.steps.length)return;const ye=[...m.steps],[_e]=ye.splice($,1);ye.splice(ie,0,_e),se({steps:ye})}async function V(){if(m){y(!0);try{const $=ae<0?[...a,m]:a.map(K=>K.id===m.id?m:K);await c($)}finally{y(!1)}}}async function P(){if(!m)return;const $={...m,id:crypto.randomUUID(),name:`${m.name} Copy`,steps:m.steps.map(K=>({...K,id:crypto.randomUUID()})),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};await c([...a,$]),p($.id),g($)}async function Q(){if(!m)return;const $=a.filter(K=>K.id!==m.id);y(!0);try{await c($),p($[0]?.id),g($[0])}finally{y(!1)}}async function D(){if(B)try{B==="save"?await V():await Q(),H(void 0)}catch{}}async function I(){if(!m||!W||A)return;N(!0),k(void 0);const $=crypto.randomUUID();T($);try{k(await n0(m,s,o,$))}catch(K){k({status:"failed",framework:"playwright",runId:$,logs:[{timestamp:new Date().toISOString(),level:"fail",message:K instanceof Error?K.message:String(K)}],stepStatuses:m.steps.map(ie=>({id:ie.id,status:"pending"}))})}finally{N(!1),T(void 0)}}async function S(){j&&await a0(j)}const C=F.useMemo(()=>new Map(O?.stepStatuses.map($=>[$.id,$.status])),[O]);return r.jsxs("div",{className:"guided-flow-panel",children:[r.jsxs("div",{className:"guided-flow-intro",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Tester-defined execution"}),r.jsx("h2",{children:"Guided Flow"}),r.jsx("p",{children:"Auto Scout finds the paths. Guided Scout follows yours."})]}),r.jsxs("div",{className:"guided-flow-intro-actions",children:[r.jsxs("a",{className:"guided-flow-guide-link",href:Z1,target:"_blank",rel:"noreferrer","aria-label":"Open the visual Guided Flow guide",title:"Open visual Guided Flow guide",children:[r.jsx("span",{"aria-hidden":"true",children:"▤"}),"Guided Flow Guide"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ne,children:"+ New Flow"})]})]}),r.jsxs("section",{className:"hidden","aria-hidden":"true",children:[r.jsxs("div",{className:"guided-flow-guide-grid",children:[r.jsxs("div",{children:[r.jsx("strong",{children:"Inputs without a label"}),r.jsxs("p",{children:["Use CSS with a stable id or name. Example: ",r.jsx("code",{children:"input#username"}),"."]})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Buttons"}),r.jsx("p",{children:"Prefer Role + accessible name, or CSS when the button has a stable id."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Labels"}),r.jsx("p",{children:"Use Label when the input has a real HTML label. It is also useful for validation checks."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Login example"}),r.jsx("pre",{children:`Fill · CSS · #username · TEST_USERNAME
35
+ await expect(page.getByRole("alert")).toContainText("Invalid password")`;return r.jsxs("section",{className:"qa-guidance",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Beginner guide"}),r.jsx("h3",{children:"What should I add next?"}),r.jsx("p",{children:"Use a template, then replace labels and expected results with what you observed."})]}),r.jsxs("div",{className:"qa-guidance-actions",children:[r.jsxs("button",{type:"button",onClick:()=>l(o),children:[r.jsx("b",{children:"Login success"}),r.jsx("span",{children:"Fill credentials and verify the next URL"})]}),r.jsxs("button",{type:"button",onClick:()=>l(c),children:[r.jsx("b",{children:"Login validation"}),r.jsx("span",{children:"Try an invalid password and assert the alert"})]}),r.jsx("span",{children:"For uploads, create a draft first and choose a safe test file before running."})]})]})}function k1({stopped:n=!1}){return r.jsx("svg",{className:"run-button-icon",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:n?r.jsx("rect",{x:"5.25",y:"5.25",width:"9.5",height:"9.5",rx:"2",fill:"currentColor"}):r.jsx("path",{d:"M6.2 3.95a1.15 1.15 0 0 1 1.75-.97l7.05 5.03a1.2 1.2 0 0 1 0 1.98l-7.05 5.03a1.15 1.15 0 0 1-1.75-.97V3.95Z",fill:"currentColor"})})}function Rc({children:n,stopped:l=!1,onClick:s,disabled:o=!1}){return r.jsxs("button",{type:"button",className:`btn ${l?"btn-danger":"btn-dark"} run-button`,onClick:s,disabled:o,children:[r.jsx(k1,{stopped:l}),r.jsx("span",{children:n})]})}function D1({testCases:n,projectId:l="active",secrets:s,blockedKeywords:o,onRunStatus:c,onRunResult:h}){const[f,p]=F.useState("playwright"),m=n.find(Y=>/submit|login|sign in|เข้าสู่ระบบ|ล็อกอิน/i.test(`${Y.title} ${Y.module}`))??n[0],[g,w]=F.useState(m?.id??""),[v,x]=F.useState(()=>n.map(Y=>Y.id)),[y,C]=F.useState(!1),[N,j]=F.useState(!1),[T,O]=F.useState(""),[k,M]=F.useState(),[R,B]=F.useState([]),[H,ae]=F.useState(!1),[W,ne]=F.useState(!1),[se,q]=F.useState("all"),G=F.useRef(void 0),E=F.useRef(!1),[X,V]=F.useState({}),P=n.find(Y=>Y.id===g)??n[0],Q=F.useMemo(()=>[{value:"all",label:"All folders and tags"},...[...new Set(n.map(Y=>Y.folder??Y.module))].sort().map(Y=>({value:`folder:${Y}`,label:`Folder: ${Y}`})),...[...new Set(n.flatMap(Y=>Y.tags??[]))].sort().map(Y=>({value:`tag:${Y}`,label:`Tag: ${Y}`}))],[n]),D=F.useMemo(()=>se==="all"?n:n.filter(Y=>se.startsWith("folder:")?(Y.folder??Y.module)===se.slice(7):(Y.tags??[]).includes(se.slice(4))),[se,n]),I=D.filter(Y=>v.includes(Y.id)).length;F.useEffect(()=>{n.some(Y=>Y.id===g)||w(m?.id??"")},[m?.id,g,n]),F.useEffect(()=>{V({}),(async()=>{const Y=await p0(l),re=`lazyscout.automation.${l}`;let L={};try{L=JSON.parse(localStorage.getItem(re)??"{}")}catch{}const U={...L,...Y};Object.keys(L).length&&(await Tc(l,U),localStorage.removeItem(re)),V(U)})().catch(()=>V({}))},[l]),F.useEffect(()=>{x(n.map(Y=>Y.id))},[n]),F.useEffect(()=>{const Y=L=>{y&&(L.key==="F5"||(L.ctrlKey||L.metaKey)&&L.key.toLowerCase()==="r")&&(L.preventDefault(),ne(!0))},re=L=>{if(!y)return;const U=G.current;U&&navigator.sendBeacon("/api/automation/stop",new Blob([JSON.stringify({runId:U.runId})],{type:"application/json"})),L.preventDefault(),L.returnValue=""};return window.addEventListener("keydown",Y),window.addEventListener("beforeunload",re),()=>{window.removeEventListener("keydown",Y),window.removeEventListener("beforeunload",re)}},[y]);const S=F.useMemo(()=>P?f==="playwright"?Rm(P):km(P):"",[f,P]),A=P?`${f}:${P.id}`:"",$=X[A]??S;function K(){O($),j(!0)}function ie(){const Y={...X,[A]:T};V(Y),Tc(l,Y),j(!1)}function ye(){const Y={...X};delete Y[A],V(Y),Tc(l,Y),j(!1)}function _e(Y){const re=`${f}:${Y.id}`;return X[re]??(f==="playwright"?Rm(Y):km(Y))}async function Ne(Y,re){const L=crypto.randomUUID(),U=new AbortController;G.current={runId:L,controller:U};try{const J=await Wx(Y,f,re,s,L,l,o,U.signal);return c?.(Y.id,J.status==="passed"?"passed":J.status==="failed"?"failed":"pending"),h?.(Y.id,J),J}catch(J){const ge=E.current||J instanceof DOMException&&J.name==="AbortError",he={status:ge?"stopped":"failed",framework:f,logs:[{timestamp:new Date().toISOString(),level:ge?"warn":"fail",message:ge?"Run stopped by user.":J instanceof Error?J.message:String(J)}]};return c?.(Y.id,ge?"pending":"failed"),h?.(Y.id,he),he}finally{G.current?.runId===L&&(G.current=void 0)}}async function oe(){E.current=!0;const Y=G.current;Y&&(Y.controller.abort(),y0(Y.runId).catch(()=>{})),ae(!1),ne(!1),B(re=>[...re,{timestamp:new Date().toISOString(),level:"warn",message:"Stop requested. Closing the active Playwright session…"}])}async function je(){if(!P||y)return;E.current=!1,C(!0),M("running"),B([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --case ${P.id}`},{timestamp:new Date().toISOString(),level:"info",message:`Starting Playwright runner: ${P.title}`},{timestamp:new Date().toISOString(),level:"info",message:"Preparing browser context and test steps…"},{timestamp:new Date().toISOString(),level:"info",message:"Running generated automation source…"}]);const Y=await Ne(P,$);M(Y.status),B(re=>[...re,...Y.logs]),C(!1)}async function Ee(){if(y)return;const Y=D.filter(L=>v.includes(L.id)).slice(0,50);if(E.current=!1,C(!0),M("running"),B([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --all --project ${l}`},{timestamp:new Date().toISOString(),level:"info",message:`Selected cases: ${Y.length}/${D.length} in current filter · Run budget: 50 cases`}]),Y.length===0){B(L=>[...L,{timestamp:new Date().toISOString(),level:"warn",message:"No test cases selected. Nothing to run."}]),M("pending"),C(!1);return}let re=!1;for(const L of Y){if(E.current)break;const U=await Ne(L,_e(L));if(U.status==="failed"&&(re=!0),B(J=>[...J,...U.logs]),U.status==="stopped")break}M(E.current?"stopped":re?"failed":"passed"),C(!1)}function $e(){navigator.clipboard?.writeText($)}function He(){const Y=new Blob([$],{type:"text/plain"}),re=URL.createObjectURL(Y),L=document.createElement("a");L.href=re,L.download=`${P?.id??"lazyscout-test"}.${f==="playwright"?"spec.ts":"cy.ts"}`,L.click(),URL.revokeObjectURL(re)}function _(){oe(),window.location.reload()}return r.jsxs("section",{className:"automation-page",children:[r.jsxs("div",{className:"automation-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation workspace"}),r.jsx("h2",{children:"Generated Tests"}),r.jsx("p",{children:"Edit the generated file per Test Case, then run one case or selected cases."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{className:"automation-run-filter",value:se,disabled:y,onChange:Y=>q(Y.target.value),children:Q.map(Y=>r.jsx("option",{value:Y.value,children:Y.label},Y.value))}),r.jsxs("span",{className:"automation-selected-count",children:[I,"/",D.length," selected"]}),y?r.jsx(Rc,{stopped:!0,onClick:()=>ae(!0),children:"Stop run"}):r.jsx(Rc,{onClick:Ee,children:"Run selected cases"})]})]}),r.jsx(R1,{sourceUrl:P?.sourceUrl,onUse:Y=>{O(Y),j(!0)}}),r.jsxs("div",{className:"automation-layout",children:[r.jsxs("aside",{className:"automation-case-list",children:[r.jsxs("div",{className:"automation-filter-head",children:[r.jsxs("span",{className:"field-label",children:["Test files (",D.length,"/",n.length,")"]}),r.jsx("span",{children:se==="all"?"All":"Filtered"})]}),D.map(Y=>r.jsxs("button",{type:"button",className:P?.id===Y.id?"selected":"",onClick:()=>{w(Y.id),j(!1)},children:[r.jsx("input",{type:"checkbox",checked:v.includes(Y.id),onChange:re=>{re.stopPropagation(),x(L=>re.target.checked?[...L,Y.id]:L.filter(U=>U!==Y.id))},onClick:re=>re.stopPropagation(),"aria-label":`Run ${Y.id}`}),r.jsx("span",{className:"case-file-icon",children:X[`playwright:${Y.id}`]||X[`cypress:${Y.id}`]?"●":"○"}),r.jsxs("span",{children:[r.jsx("b",{children:Y.id}),r.jsx("small",{children:Y.title}),Y.tags?.length?r.jsx("em",{className:"automation-tag",children:Y.tags.slice(0,2).join(" · ")}):null]})]},Y.id))]}),r.jsxs("div",{className:"automation-editor",children:[r.jsxs("div",{className:"automation-toolbar",children:[r.jsxs("select",{className:"field",value:f,onChange:Y=>p(Y.target.value),disabled:y,children:[r.jsx("option",{value:"playwright",children:"Playwright"}),r.jsx("option",{value:"cypress",children:"Cypress"})]}),r.jsx("span",{className:"automation-source",children:P?.sourceUrl}),r.jsxs("div",{className:"ml-auto flex gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:K,disabled:N||y,children:"Edit code"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:ye,disabled:y,children:"Regenerate"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:$e,children:"Copy"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:He,children:"Save file"}),r.jsx(Rc,{onClick:je,disabled:y||!P,children:"Run"})]})]}),N?r.jsxs("div",{className:"code-edit-area",children:[r.jsx(Vm,{value:T,framework:f,onChange:O}),r.jsxs("div",{className:"code-edit-actions",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>j(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ie,children:"Save code"})]})]}):r.jsx("pre",{className:"automation-code",children:$||"No Test Cases are available to generate."}),k&&r.jsxs("div",{className:"terminal-panel",children:[r.jsxs("div",{className:"terminal-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," CLI output"]}),r.jsx("b",{className:k==="passed"?"terminal-pass":k==="failed"?"terminal-fail":"terminal-warn",children:k.toUpperCase()})]}),r.jsx("div",{className:"terminal-body",children:R.map((Y,re)=>r.jsxs("div",{className:`terminal-line terminal-${Y.level}`,children:[r.jsx("span",{children:new Date(Y.timestamp).toLocaleTimeString()}),Y.message,Y.durationMs!==void 0&&r.jsxs("em",{children:[Y.durationMs,"ms"]})]},`${Y.timestamp}-${re}`))})]})]})]}),H&&r.jsx(Ym,{title:"Stop the running tests?",message:"The active Playwright session will be closed. Remaining selected Test Cases will not run.",confirmLabel:"Stop run",onCancel:()=>ae(!1),onConfirm:()=>{oe()}}),W&&r.jsx(Ym,{title:"Stop tests and refresh?",message:"Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases.",confirmLabel:"Stop and refresh",onCancel:()=>ne(!1),onConfirm:_}),N&&r.jsx("div",{className:"modern-modal-backdrop code-editor-backdrop",children:r.jsxs("section",{className:"modern-modal code-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"code-editor-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation source"}),r.jsxs("h2",{id:"code-editor-title",children:["Edit ",f==="playwright"?"Playwright":"Cypress"," code"]}),r.jsxs("p",{children:[P?.id," · ",P?.title]})]}),r.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close editor",onClick:()=>j(!1),children:"×"})]}),r.jsx("div",{className:"code-editor-modal-body",children:r.jsx(Vm,{value:T,framework:f,onChange:O,height:"100%"})}),r.jsxs("footer",{className:"modal-footer code-editor-modal-footer",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>j(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ie,children:"Save code"})]})]})})]})}function Ym({title:n,message:l,confirmLabel:s,onCancel:o,onConfirm:c}){return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal run-confirm-modal",role:"dialog","aria-modal":"true",children:[r.jsx("div",{className:"modal-header",children:r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Running tests"}),r.jsx("h2",{children:n}),r.jsx("p",{children:l})]})}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Keep running"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:c,children:s})]})]})})}function z1({result:n}){const[l,s]=F.useState("events"),[o,c]=F.useState(!1),[h,f]=F.useState(n.runEvents);async function p(){if(!o){s("terminal"),c(!0),f([]);for(const g of n.runEvents)await new Promise(w=>window.setTimeout(w,120)),f(w=>[...w,g]);c(!1)}}const m=o||h.length<n.runEvents.length?h:n.runEvents;return r.jsxs("section",{className:"scout-log-card",children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright Scout Log"}),r.jsx("h2",{children:"Scout Log"})]}),r.jsxs("span",{className:"run-live",children:[r.jsx("i",{})," DONE"]})]}),r.jsxs("div",{className:"scout-log-tabs",children:[r.jsx("button",{type:"button",className:l==="events"?"active":"",onClick:()=>s("events"),children:"◉ Event Stream"}),r.jsx("button",{type:"button",className:l==="terminal"?"active":"",onClick:()=>s("terminal"),children:"›_ CLI Terminal"})]}),r.jsxs("div",{className:"run-summary",children:[r.jsxs("div",{children:[r.jsxs("strong",{children:[n.stats.durationMs,"ms"]}),r.jsx("span",{children:"duration"})]}),r.jsxs("div",{children:[r.jsx("strong",{children:n.stats.pagesVisited}),r.jsx("span",{children:"pages"})]}),r.jsxs("div",{children:[r.jsx("strong",{className:n.stats.urlsSkipped?"text-amber-600":"",children:n.stats.urlsSkipped}),r.jsx("span",{children:"skipped"})]})]}),l==="terminal"?r.jsxs("div",{className:"scout-cli-terminal",children:[r.jsxs("div",{className:"scout-cli-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," Playwright CLI output"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("b",{children:o?"RUNNING":"COMPLETED"}),r.jsx("button",{type:"button",className:"cli-run-button",onClick:p,disabled:o,children:o?"Running…":"▶ Run again"})]})]}),r.jsxs("div",{className:"scout-cli-body",children:[r.jsxs("div",{children:[r.jsx("em",{children:"$"})," npx playwright scout ",n.startUrl]}),m.map((g,w)=>r.jsxs("div",{className:g.result==="failed"?"cli-fail":g.result==="warning"||g.result==="blocked"?"cli-warn":"cli-pass",children:[r.jsx("em",{children:"›"})," ",g.message]},`cli-${g.timestamp}-${w}`)),o&&r.jsx("div",{className:"cli-cursor",children:"▌"})]})]}):r.jsx("div",{className:"run-events",children:n.runEvents.map((g,w)=>r.jsxs("div",{className:"run-event",children:[r.jsx("div",{className:`event-marker event-${g.result}`}),r.jsxs("div",{className:"run-event-body",children:[r.jsxs("div",{className:"run-event-top",children:[r.jsx("span",{children:new Date(g.timestamp).toLocaleTimeString()}),r.jsx("b",{children:g.eventType})]}),r.jsx("p",{children:g.message}),g.currentUrl&&r.jsx("small",{children:new URL(g.currentUrl).pathname})]})]},`${g.timestamp}-${w}`))}),r.jsxs("div",{className:"inspector-foot",children:[r.jsx("span",{className:"status-dot status-pass"})," Scout completed · Playwright events captured"]})]})}function U1({checks:n,secrets:l}){const[s,o]=F.useState(),[c,h]=F.useState({}),[f,p]=F.useState();async function m(g,w=!1){o(g.id);try{const v=await x0(g,l,w);h(x=>({...x,[g.id]:`${v.status.toUpperCase()} · ${v.message}`}))}catch(v){h(x=>({...x,[g.id]:v instanceof Error?v.message:String(v)}))}finally{o(void 0)}}return r.jsxs("div",{className:"api-checks",children:[r.jsxs("div",{className:"api-checks-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Network validation"}),r.jsx("h3",{children:"Test API"}),r.jsx("p",{children:"Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured."})]}),r.jsxs("span",{className:"status-badge status-badge-pass",children:[n.length," observed"]})]}),n.length===0?r.jsxs("div",{className:"empty-state",children:["Run Analyze with ",r.jsx("b",{children:"Include API checks from XHR/fetch"})," enabled to collect the API requests used by the page."]}):r.jsx("div",{className:"api-table",children:n.map(g=>r.jsxs("div",{className:"api-row",children:[r.jsx("span",{className:"api-method",children:g.method}),r.jsxs("div",{children:[r.jsx("b",{children:g.id}),r.jsx("p",{children:g.url}),r.jsx("small",{children:g.note??`Observed HTTP ${g.observedStatus??"—"} · ${g.durationMs??0}ms`})]}),r.jsx("span",{className:`status-badge ${g.status==="observed"?"status-badge-pass":"status-badge-warn"}`,children:g.status}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>["GET","HEAD","OPTIONS"].includes(g.method.toUpperCase())?void m(g):p(g),disabled:s===g.id,children:s===g.id?"Checking…":"Run API"}),c[g.id]&&r.jsx("div",{className:"api-result",children:c[g.id]})]},g.id))}),f&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal",role:"dialog","aria-modal":"true","aria-labelledby":"unsafe-api-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Protected API action"}),r.jsxs("h2",{id:"unsafe-api-title",children:["Run ",f.method.toUpperCase()," once?"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>p(void 0),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:"This request can create, update, or delete data. LazyScout will send it only once for this run."}),r.jsx("code",{className:"block break-all",children:f.url})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(void 0),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{p(void 0),m(f,!0)},children:"Run once"})]})]})})]})}function Fm({view:n,onChange:l,counts:s}){const{t:o}=io(),c=[["overview",o("overview"),"⌂"],["testcases",`${o("testCases")} ${s.cases}`,"✓"],["automation",o("automation"),"↗"],["scoutlog",o("scoutLog"),"◉"],["explorer",o("explorer"),"⌘"],["loadtest","Load Test","⚡"]];return r.jsx("nav",{className:"workspace-nav",children:c.map(([h,f,p])=>r.jsxs("button",{type:"button",className:n===h?"is-active":"",onClick:()=>l(h),children:[r.jsx("span",{children:p}),f,h==="explorer"&&r.jsx("small",{children:s.states})]},h))})}function M1({projects:n,activeProjectId:l,result:s,collapsed:o,onToggleCollapsed:c,onSelect:h,onNew:f,onDelete:p,onRename:m,onSettings:g,workspaceRoot:w,onOpenWorkspace:v}){const{language:x,toggleLanguage:y,t:C}=io(),[N,j]=F.useState(),[T,O]=F.useState(),[k,M]=F.useState("");return r.jsxs("aside",{className:`workspace-sidebar ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"sidebar-brand",children:[r.jsx("span",{className:"brand-mark",children:"LS"}),r.jsx("b",{children:"LazyScout"}),r.jsx("button",{type:"button",className:"sidebar-collapse",onClick:c,title:o?"Expand sidebar":"Collapse sidebar",children:o?"›":"‹"})]}),r.jsxs("button",{type:"button",className:"new-project-btn",onClick:f,title:C("newProject"),children:[r.jsx("span",{children:"+"}),r.jsx("em",{children:C("newProject")})]}),r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:C("projects")}),r.jsx("b",{children:n.length})]}),r.jsx("div",{className:"project-list",children:n.map(R=>r.jsx("div",{className:`project-item ${R.id===l?"active":""}`,children:T===R.id?r.jsxs("form",{className:"project-rename",onSubmit:B=>{B.preventDefault(),m(R.id,k),O(void 0)},children:[r.jsx("input",{autoFocus:!0,value:k,onChange:B=>M(B.target.value),onKeyDown:B=>{B.key==="Escape"&&O(void 0)}}),r.jsx("button",{type:"submit",children:"Save"}),r.jsx("button",{type:"button",onClick:()=>O(void 0),children:"×"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:()=>h(R.id),title:R.targetUrl?`${R.name}
36
+ ${R.targetUrl}`:R.name,children:[r.jsx("span",{className:"project-icon",children:"◈"}),r.jsxs("span",{className:"project-copy",children:[r.jsx("b",{children:R.name}),r.jsx("small",{children:R.targetUrl||"Manual suite"})]})]}),r.jsxs("div",{className:"project-actions",children:[r.jsx("button",{type:"button",className:"project-more",title:"Project actions",onClick:()=>j(B=>B===R.id?void 0:R.id),children:"⋯"}),N===R.id&&r.jsxs("div",{className:"project-action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{O(R.id),M(R.name),j(void 0)},children:"Rename"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p(R.id),j(void 0)},children:"Delete"})]})]})]})},R.id))}),s&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:C("files")}),r.jsx("b",{children:s.pages.length})]}),r.jsx("div",{className:"file-list",children:s.pages.map(R=>r.jsxs("div",{className:"file-item",title:R.finalUrl,children:[r.jsx("span",{children:"◫"}),r.jsx("span",{className:"file-name",children:new URL(R.finalUrl).pathname==="/"?"index":new URL(R.finalUrl).pathname.slice(1)}),r.jsx("small",{children:R.state?.fingerprint.slice(-4)})]},R.finalUrl))})]}),l&&r.jsxs("button",{type:"button",className:"sidebar-settings",onClick:g,title:C("settings"),children:[r.jsx("span",{children:"⚙"}),r.jsx("em",{children:C("settings")})]}),r.jsx("div",{className:"sidebar-bottom",children:r.jsxs("div",{className:"workspace-language-row",children:[r.jsxs("button",{type:"button",className:"workspace-copy",onClick:v,title:w,children:[r.jsx("span",{className:"status-dot status-pass"})," ",r.jsx("b",{children:C("localWorkspace")}),r.jsx("small",{children:w||C("storedHere")})]}),r.jsx("button",{type:"button",className:"language-circle",onClick:y,title:x==="en"?"Switch to Thai":"Switch to English (US)","aria-label":"Switch language",children:x==="en"?"EN":"TH"})]})})]})}function L1(n){return sv(n,!0)}function B1(n){return sv(n,!1)}function sv(n,l){const s=`<!doctype html><html><head><meta charset="utf-8"><title>LazyScout Quality Report</title><style>${q1}</style></head><body>${$1(n)}</body></html>`,o=window.open("","_blank","width=1100,height=820");return o&&(o.document.open(),o.document.write(s),o.document.close(),l&&window.setTimeout(()=>{o.focus(),o.print()},350)),s}function $1(n){const l=[["Test Cases",n.testCases,`${n.pages} pages explored`],["Pass",n.passed,"Execution result"],["Failed",n.failed,"Execution result"],["Requirements",n.requirementCount,`${n.linkedCases}/${n.testCases} cases linked`]],s=n.failedCases.length?`<section class="failures"><div class="head"><div><p>FOLLOW-UP</p><h2>Failed Test Cases & logs</h2></div><em>${n.failedCases.length} failed</em></div>${n.failedCases.map(o=>`<article><div><b>${kn(o.id)} · ${kn(o.title)}</b><small>${kn(o.folder||"UNASSIGNED")}</small></div><pre>${o.logs.length?kn(o.logs.join(`
37
+ `)):"No run log was captured for this case."}</pre></article>`).join("")}</section>`:"";return`<main><header><div><div class="brand">LS <span>LazyScout</span></div><p>QUALITY REPORT</p><h1>Quality overview</h1><small>${kn(n.origin)} · Generated ${kn(n.generatedAt)}</small></div><div class="report-state">${n.pending} pending execution</div></header><section class="metrics">${l.map(([o,c,h])=>`<article><span>${o}</span><b>${c}</b><small>${h}</small></article>`).join("")}</section><section class="grid"><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Execution status</h2></div><em>Donut chart</em></div>${Pm(n.status,"Test Cases")}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Priority</h2></div><em>Column chart</em></div>${H1(n.priority)}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Test type</h2></div><em>Bar chart</em></div>${Zm(n.testType)}</article><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Automation readiness</h2></div><em>Donut chart</em></div>${Pm(n.readiness,"Cases")}</article><article class="card wide"><div class="head"><div><p>HIERARCHY</p><h2>Folder coverage</h2></div><em>Top 10</em></div>${Zm(n.modules)}</article></section>${s}<footer>LazyScout · Local QA workspace</footer></main>`}function Pm(n,l){const s=n.reduce((h,f)=>h+f.value,0);let o=0;return`<div class="donut-wrap"><div class="donut" style="background:conic-gradient(${n.map(h=>{const f=s?o/s*100:0;o+=h.value;const p=s?o/s*100:0;return`${h.color} ${f}% ${p}%`}).join(", ")||"#e2e8f0 0 100%"})"><div><b>${s}</b><span>${l}</span></div></div><div class="legend">${n.map(h=>`<div><i style="background:${h.color}"></i><span title="${kn(h.label)}">${kn(Td(h.label))}</span><b>${h.value}</b></div>`).join("")}</div></div>`}function H1(n){const l=Math.max(...n.map(o=>o.value),1),s=n.reduce((o,c)=>o+c.value,0)||1;return`<div class="columns"><div class="axis"><span>100%</span><span>75%</span><span>50%</span><span>25%</span><span>0%</span></div><div class="column-area" style="grid-template-columns:repeat(${Math.max(n.length,1)},minmax(0,1fr))">${n.map(o=>`<div class="column"><div class="column-track"><i style="height:${o.value/l*100}%;background:${o.color}"></i></div><b>${o.value} <small>${Math.round(o.value/s*100)}%</small></b><span>${kn(Td(o.label))}</span></div>`).join("")}</div></div>`}function Zm(n){const l=Math.max(...n.map(s=>s.value),1);return`<div class="bars">${n.map(s=>`<div><span title="${kn(s.label)}">${kn(Td(s.label))}</span><section><i style="width:${s.value/l*100}%;background:${s.color}"></i></section><b>${s.value}</b></div>`).join("")}</div>`}function Td(n){return n.length>10?`${n.slice(0,10)}...`:n}function kn(n){return String(n).replace(/[&<>'"]/g,l=>({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"})[l]??l)}const q1="@page{size:A4 landscape;margin:12mm}*{box-sizing:border-box}body{margin:0;color:#182238;font:12px Inter,Arial,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact}main{max-width:1120px;margin:auto}header{display:flex;justify-content:space-between;align-items:start;padding-bottom:18px;border-bottom:1px solid #e2e8f0}.brand{font-size:18px;font-weight:800;color:#fff;background:#2563eb;border-radius:7px;display:inline-flex;gap:9px;align-items:center;padding:6px 9px}.brand span{color:#182238}header p{margin:15px 0 3px;font-size:9px;letter-spacing:1.4px;color:#64748b;font-weight:700}h1{margin:0;font-size:26px}header small{display:block;margin-top:6px;color:#64748b}.report-state{border-radius:999px;padding:7px 10px;background:#fffbeb;color:#b45309;font-weight:700}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.metrics article,.card,.failures{border:1px solid #e2e8f0;border-radius:10px;background:#fff}.metrics article{padding:13px}.metrics span,.metrics small{display:block;color:#64748b}.metrics b{display:block;margin:8px 0 2px;font-size:27px}.metrics small{font-size:10px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.card{padding:15px;min-height:230px}.card.wide{grid-column:1/3;min-height:180px}.head{display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #f1f5f9;padding-bottom:10px}.head p{margin:0;color:#64748b;font-size:9px;font-weight:700;letter-spacing:1px}.head h2{margin:4px 0 0;font-size:14px}.head em{font-style:normal;background:#f1f5f9;border-radius:999px;padding:4px 7px;color:#64748b;font-size:9px}.donut-wrap{height:165px;display:flex;align-items:center;justify-content:center;gap:30px}.donut{width:124px;height:124px;border-radius:50%;display:flex;align-items:center;justify-content:center}.donut>div{width:68px;height:68px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut b{font-size:21px}.donut span{font-size:9px;color:#64748b}.legend{min-width:140px}.legend div{display:grid;grid-template-columns:9px 1fr auto;gap:7px;align-items:center;margin:8px 0}.legend i{width:8px;height:8px;border-radius:50%}.legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.columns{display:grid;grid-template-columns:34px 1fr;gap:5px;height:165px;margin-top:10px}.axis{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:25px;text-align:right;font-size:8px;color:#94a3b8}.column-area{display:grid;gap:6px;align-items:end;border-bottom:1px solid #cbd5e1;background:repeating-linear-gradient(to bottom,transparent 0 calc(25% - 1px),#e2e8f0 calc(25% - 1px) 25%)}.column{min-width:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:3px}.column-track{height:112px;width:100%;max-width:34px;background:#f1f5f9;display:flex;align-items:end;border-radius:4px 4px 0 0}.column-track i{width:100%;display:block;border-radius:4px 4px 0 0}.column b{font-size:10px;white-space:nowrap}.column small{font-size:8px;color:#94a3b8}.column>span{width:100%;font-size:8px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.bars{margin-top:18px}.bars>div{display:grid;grid-template-columns:85px 1fr 28px;gap:9px;align-items:center;margin:9px 0}.bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.bars section{height:9px;border-radius:99px;background:#f1f5f9;overflow:hidden}.bars i{display:block;height:100%;border-radius:99px}.bars b{text-align:right}.failures{margin-top:12px;padding:15px}.failures article{padding:10px 0;border-bottom:1px solid #f1f5f9}.failures article:last-child{border:0}.failures b,.failures small{display:block}.failures small{margin-top:3px;color:#64748b;font-size:10px}.failures pre{margin:8px 0 0;max-height:110px;overflow:auto;white-space:pre-wrap;border-radius:6px;background:#0b1120;padding:9px;color:#dbeafe;font:9px ui-monospace,monospace}footer{margin-top:18px;border-top:1px solid #e2e8f0;padding-top:10px;color:#94a3b8;font-size:10px}";function G1({result:n,testCases:l,executionStatuses:s={},runResults:o={},projectId:c}){const[h,f]=F.useState(!1),[p,m]=F.useState({status:!0,priority:!0,type:!0,automation:!0,modules:!0,trend:!0}),[g,w]=F.useState({status:"donut",priority:"column",type:"bar",automation:"donut",modules:"treemap",trend:"line"}),v=G=>s[G.id]??G.status??(G.automationStatus==="ready"?"passed":"pending"),x={passed:l.filter(G=>v(G)==="passed").length,failed:l.filter(G=>v(G)==="failed").length,pending:l.filter(G=>v(G)==="pending").length},y=Ls(l,G=>G.priority),C=Ls(l,G=>G.type),N=Ls(l,G=>G.automationStatus),j=Ls(l,G=>(G.folder??G.module)||"UNASSIGNED"),T=F.useMemo(()=>X1(n),[n]),O=[{label:"Pass",value:x.passed,color:"#10b981"},{label:"Failed",value:x.failed,color:"#ef4444"},{label:"Pending",value:x.pending,color:"#f59e0b"}],k=[{label:"High",value:y.high??0,color:"#ef4444"},{label:"Medium",value:y.medium??0,color:"#f59e0b"},{label:"Low",value:y.low??0,color:"#3b82f6"}],M=[{label:"Positive",value:C.positive??0,color:"#10b981"},{label:"Negative",value:C.negative??0,color:"#ef4444"},{label:"Validation",value:C.validation??0,color:"#6366f1"}],R=[{label:"Ready",value:N.ready??0,color:"#3b82f6"},{label:"Needs review",value:N["needs-review"]??0,color:"#f59e0b"},{label:"Needs data",value:N["needs-data"]??0,color:"#8b5cf6"},{label:"Manual",value:N.manual??0,color:"#64748b"}],B=Object.entries(j).map(([G,E],X)=>({label:G,value:E,color:Xm[X%Xm.length]})),H=l.filter(G=>(G.requirements?.length??0)>0).length,ae=new Set(l.flatMap(G=>G.requirements??[])).size,W={origin:n.origin,generatedAt:new Date().toLocaleString(),pages:n.pages.length,testCases:l.length,passed:x.passed,failed:x.failed,pending:x.pending,needsReview:N["needs-review"]??0,linkedCases:H,requirementCount:ae,status:O,priority:k,testType:M,readiness:R,modules:uv(B),failedCases:l.filter(G=>v(G)==="failed").map(G=>({id:G.id,title:G.title,folder:G.folder??G.module,logs:(o[G.id]?.logs??[]).slice(-8).map(E=>`${new Date(E.timestamp).toLocaleTimeString()} ${E.message}`)}))},ne=G=>m(E=>({...E,[G]:!E[G]})),se=(G,E)=>w(X=>({...X,[G]:E})),q=G=>{const E=G?L1(W):B1(W);c&&m0(c,G?"quality-report-print.html":"quality-report.html",E)};return r.jsxs("div",{className:"dashboard-view",children:[r.jsxs("div",{className:"dashboard-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Project dashboard"}),r.jsx("h2",{children:"Quality overview"}),r.jsxs("p",{children:["Coverage and readiness for ",r.jsx("b",{children:n.origin})]})]}),r.jsxs("div",{className:"dashboard-actions",children:[r.jsxs("span",{className:"status-badge status-badge-warn",children:[x.pending," pending execution"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>f(G=>!G),children:"Customize"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>q(!1),children:"HTML report"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>q(!0),children:"Export PDF"})]})]}),h&&r.jsxs("div",{className:"dashboard-customize",children:[r.jsx("b",{children:"Dashboard layout"}),r.jsx("span",{children:"Show or hide charts"}),["status","priority","type","automation","modules","trend"].map(G=>r.jsxs("label",{children:[r.jsx("input",{type:"checkbox",checked:p[G],onChange:()=>ne(G)})," ",I1(G)]},G))]}),r.jsxs("div",{className:"dashboard-metrics",children:[r.jsx(Fi,{label:"Test Cases",value:l.length,hint:`${n.pages.length} pages explored`,tone:"blue"}),r.jsx(Fi,{label:"Pass",value:x.passed,hint:"Execution result",tone:"green"}),r.jsx(Fi,{label:"Failed",value:x.failed,hint:"Execution result",tone:"red"}),r.jsx(Fi,{label:"Need Review",value:N["needs-review"]??0,hint:"Tester decision needed",tone:"amber"}),r.jsx(Fi,{label:"Requirements",value:ae,hint:`${H}/${l.length} cases linked`,tone:"blue"})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.status&&r.jsx(Vr,{eyebrow:"Composition",title:"Execution status",panel:"status",kind:g.status,onChange:se,children:Pi(g.status,O,"Test Cases")}),p.priority&&r.jsx(Vr,{eyebrow:"Comparison",title:"Priority",panel:"priority",kind:g.priority,onChange:se,children:Pi(g.priority,k,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.type&&r.jsx(Vr,{eyebrow:"Comparison",title:"Test type",panel:"type",kind:g.type,onChange:se,children:Pi(g.type,M,"Cases")}),p.automation&&r.jsx(Vr,{eyebrow:"Composition",title:"Automation readiness",panel:"automation",kind:g.automation,onChange:se,children:Pi(g.automation,R,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.modules&&r.jsx(Vr,{eyebrow:"Hierarchy",title:"Folder coverage",panel:"modules",kind:g.modules,onChange:se,children:Pi(g.modules,B,"Cases")}),p.trend&&r.jsx(Vr,{eyebrow:"Trend",title:"Scout discovery",panel:"trend",kind:g.trend,onChange:se,children:g.trend==="line"?r.jsx(Z1,{points:T.slice(-dd)}):r.jsx(ov,{items:T.slice(-dd).map((G,E)=>({label:`Step ${E+1}`,value:G,color:"#4f46e5"}))})})]})]})}function Vr({eyebrow:n,title:l,panel:s,kind:o,onChange:c,children:h}){return r.jsxs("section",{className:"dashboard-card",children:[r.jsxs("div",{className:"dashboard-card-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:n}),r.jsx("h3",{children:l})]}),r.jsxs("label",{className:"chart-selector",children:[r.jsx("span",{children:"Chart"}),r.jsx("select",{value:o,onChange:f=>c(s,f.target.value),children:Q1[s].map(f=>r.jsx("option",{value:f,children:V1(f)},f))})]})]}),h]})}function Fi({label:n,value:l,hint:s,tone:o}){return r.jsxs("div",{className:`dashboard-metric tone-${o}`,children:[r.jsx("span",{children:n}),r.jsx("strong",{children:l}),r.jsx("small",{children:s})]})}function Ls(n,l){return n.reduce((s,o)=>{const c=l(o);return s[c]=(s[c]??0)+1,s},{})}function I1(n){return{status:"Execution status",priority:"Priority comparison",type:"Test type comparison",automation:"Automation readiness",modules:"Folder treemap",trend:"Scout trend"}[n]}function V1(n){return{bar:"Bar chart",column:"Column chart",donut:"Donut chart",treemap:"Treemap",line:"Line chart"}[n]}function Pi(n,l,s){const o=uv(l);return n==="donut"?r.jsx(Y1,{slices:o,totalLabel:s,compact:o.length>3}):n==="column"?r.jsx(ov,{items:o}):n==="treemap"?r.jsx(P1,{items:o}):r.jsx(F1,{items:o})}function Y1({slices:n,totalLabel:l,compact:s=!1}){const o=n.reduce((f,p)=>f+p.value,0);let c=0;const h=n.map(f=>{const p=o?c/o*100:0;c+=f.value;const m=o?c/o*100:0;return`${f.color} ${p}% ${m}%`}).join(", ");return r.jsxs("div",{className:`donut-chart ${s?"is-compact":""}`,children:[r.jsx("div",{className:"donut-ring",style:{background:o?`conic-gradient(${h})`:"#e2e8f0"},children:r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:l})]})}),r.jsx("div",{className:"donut-legend",children:n.map(f=>r.jsxs("div",{children:[r.jsx("i",{style:{background:f.color}}),r.jsx("span",{title:f.label,children:so(f.label)}),r.jsx("b",{children:f.value})]},f.label))})]})}function ov({items:n}){const l=Math.max(...n.map(o=>o.value),1),s=n.reduce((o,c)=>o+c.value,0)||1;return r.jsxs("div",{className:"column-chart-wrap",children:[r.jsxs("div",{className:"column-axis","aria-hidden":"true",children:[r.jsx("span",{children:"100%"}),r.jsx("span",{children:"75%"}),r.jsx("span",{children:"50%"}),r.jsx("span",{children:"25%"}),r.jsx("span",{children:"0%"})]}),r.jsxs("div",{className:"column-chart",style:{gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`},children:[r.jsx("div",{className:"column-grid","aria-hidden":"true"}),n.map(o=>r.jsxs("div",{className:"column-item",title:o.label,children:[r.jsx("div",{className:"column-track",children:r.jsx("i",{style:{height:`${o.value/l*100}%`,background:o.color}})}),r.jsxs("div",{className:"column-value",children:[r.jsx("b",{children:o.value}),r.jsxs("small",{children:[Math.round(o.value/s*100),"%"]})]}),r.jsx("span",{children:so(o.label)})]},o.label))]})]})}function F1({items:n}){const l=Math.max(...n.map(s=>s.value),1);return r.jsx("div",{className:"bar-chart",children:n.map(s=>r.jsxs("div",{className:"bar-row",children:[r.jsx("span",{title:s.label,children:so(s.label)}),r.jsx("div",{children:r.jsx("i",{style:{width:`${s.value/l*100}%`,background:s.color}})}),r.jsx("b",{children:s.value})]},s.label))})}function P1({items:n}){return r.jsx("div",{className:"treemap",children:n.length?n.map(l=>r.jsxs("div",{style:{flexGrow:l.value,background:l.color},title:`${l.label}: ${l.value}`,children:[r.jsx("b",{children:so(l.label)}),r.jsxs("span",{children:[l.value," cases"]})]},l.label)):r.jsx("p",{children:"No folders found."})})}function Z1({points:n}){const l=Math.max(...n,1),s=Math.max(n.length-1,1),o=n.map((c,h)=>`${h/s*100},${100-c/l*82-9}`).join(" ");return r.jsxs("div",{className:"line-chart",children:[r.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",role:"img","aria-label":"Cumulative Scout discovery trend",children:[r.jsx("line",{x1:"0",y1:"91",x2:"100",y2:"91"}),r.jsx("polyline",{points:o})]}),r.jsxs("div",{className:"line-chart-meta",children:[r.jsx("span",{children:"Start"}),r.jsxs("b",{children:[n[n.length-1]??0," discoveries"]}),r.jsx("span",{children:"Complete"})]})]})}function X1(n){let l=0;const s=[0];for(const o of n.runEvents)(o.eventType==="page-discovered"||o.eventType==="state-discovered"||o.eventType==="action-discovered")&&(l++,s.push(l));return s.length>1?s:[0,n.pages.length]}const Xm=["#2563eb","#7c3aed","#0891b2","#059669","#d97706","#db2777","#475569"],Q1={status:["donut","bar","column"],priority:["column","bar","donut"],type:["bar","column","donut"],automation:["donut","bar","column"],modules:["treemap","bar","column","donut"],trend:["line","column"]},dd=10;function uv(n){return[...n].sort((l,s)=>s.value-l.value).slice(0,dd)}function so(n){return n.length>10?`${n.slice(0,10)}...`:n}const K1=["navigate","click","fill","select","check","wait","assert"],J1="https://lazyscout.lazyscout.workers.dev/guided-flow.html";function W1({flows:n,baseUrl:l,projectId:s,secrets:o,onSave:c,onGenerateTestCase:h}){const[f,p]=F.useState(),[m,g]=F.useState(),[w,v]=F.useState("click"),[x,y]=F.useState(!1),[C,N]=F.useState(!1),[j,T]=F.useState(),[O,k]=F.useState(),[M,R]=F.useState(),[B,H]=F.useState();F.useEffect(()=>{if(!n.length)return;const $=n.find(K=>K.id===f)??n[0];p($.id),g($)},[n]);const ae=n.findIndex($=>$.id===m?.id),W=!!(m?.baseUrl&&m.steps.length);function ne(){const $=new Date().toISOString(),K={id:crypto.randomUUID(),name:"New Guided Flow",description:"",baseUrl:l||"http://localhost:5173",steps:[{id:crypto.randomUUID(),type:"navigate",path:"/"}],createdAt:$,updatedAt:$};p(K.id),g(K),k(void 0)}function se($){g(K=>K&&{...K,...$,updatedAt:new Date().toISOString()})}function q($,K){if(!m)return;const ie=m.steps.map((ye,_e)=>_e===$?K:ye);se({steps:ie})}function G(){m&&se({steps:[...m.steps,tS(w)]})}function E($){m&&se({steps:m.steps.filter((K,ie)=>ie!==$)})}function X($,K){if(!m)return;const ie=$+K;if(ie<0||ie>=m.steps.length)return;const ye=[...m.steps],[_e]=ye.splice($,1);ye.splice(ie,0,_e),se({steps:ye})}async function V(){if(m){y(!0);try{const $=ae<0?[...n,m]:n.map(K=>K.id===m.id?m:K);await c($)}finally{y(!1)}}}async function P(){if(!m)return;const $={...m,id:crypto.randomUUID(),name:`${m.name} Copy`,steps:m.steps.map(K=>({...K,id:crypto.randomUUID()})),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};await c([...n,$]),p($.id),g($)}async function Q(){if(!m)return;const $=n.filter(K=>K.id!==m.id);y(!0);try{await c($),p($[0]?.id),g($[0])}finally{y(!1)}}async function D(){if(B)try{B==="save"?await V():await Q(),H(void 0)}catch{}}async function I(){if(!m||!W||C)return;N(!0),k(void 0);const $=crypto.randomUUID();T($);try{k(await l0(m,s,o,$))}catch(K){k({status:"failed",framework:"playwright",runId:$,logs:[{timestamp:new Date().toISOString(),level:"fail",message:K instanceof Error?K.message:String(K)}],stepStatuses:m.steps.map(ie=>({id:ie.id,status:"pending"}))})}finally{N(!1),T(void 0)}}async function S(){j&&await s0(j)}const A=F.useMemo(()=>new Map(O?.stepStatuses.map($=>[$.id,$.status])),[O]);return r.jsxs("div",{className:"guided-flow-panel",children:[r.jsxs("div",{className:"guided-flow-intro",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Tester-defined execution"}),r.jsx("h2",{children:"Guided Flow"}),r.jsx("p",{children:"Auto Scout finds the paths. Guided Scout follows yours."})]}),r.jsxs("div",{className:"guided-flow-intro-actions",children:[r.jsxs("a",{className:"guided-flow-guide-link",href:J1,target:"_blank",rel:"noreferrer","aria-label":"Open the visual Guided Flow guide",title:"Open visual Guided Flow guide",children:[r.jsx("span",{"aria-hidden":"true",children:"▤"}),"Guided Flow Guide"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ne,children:"+ New Flow"})]})]}),r.jsxs("section",{className:"hidden","aria-hidden":"true",children:[r.jsxs("div",{className:"guided-flow-guide-grid",children:[r.jsxs("div",{children:[r.jsx("strong",{children:"Inputs without a label"}),r.jsxs("p",{children:["Use CSS with a stable id or name. Example: ",r.jsx("code",{children:"input#username"}),"."]})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Buttons"}),r.jsx("p",{children:"Prefer Role + accessible name, or CSS when the button has a stable id."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Labels"}),r.jsx("p",{children:"Use Label when the input has a real HTML label. It is also useful for validation checks."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Login example"}),r.jsx("pre",{children:`Fill · CSS · #username · TEST_USERNAME
38
38
  Fill · CSS · #password · TEST_PASSWORD
39
- Click · CSS · #submit`})]})]}),r.jsxs("div",{className:"guided-flow-guide-steps",children:[r.jsx("strong",{children:"First time using Guided Flow?"}),r.jsxs("ol",{children:[r.jsx("li",{children:"Open the target page in your browser and inspect the element you want to test."}),r.jsxs("li",{children:["If it has an id, choose ",r.jsx("b",{children:"CSS"}),". If it is a named button, choose ",r.jsx("b",{children:"Role"}),"."]}),r.jsxs("li",{children:["Enter only the selector value, for example ",r.jsx("code",{children:"#username"}),", not the whole HTML tag."]}),r.jsxs("li",{children:["For usernames and passwords, leave Value empty and use ",r.jsx("b",{children:"Value reference"}),"."]}),r.jsx("li",{children:"Save the Flow, run it, then use the CLI error to adjust only the failing step."})]})]}),r.jsxs("div",{className:"guided-flow-guide-decision",children:[r.jsx("b",{children:"Not sure which locator to choose?"}),r.jsx("span",{children:"id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child"})]})]}),r.jsxs("div",{className:"guided-flow-layout",children:[r.jsxs("aside",{className:"guided-flow-list",children:[r.jsxs("div",{className:"guided-flow-list-head",children:[r.jsx("b",{children:"Guided Flows"}),r.jsx("span",{children:a.length})]}),a.map($=>r.jsxs("button",{type:"button",className:$.id===m?.id?"is-active":"",onClick:()=>{p($.id),g($),k(void 0)},children:[r.jsx("strong",{children:$.name}),r.jsxs("small",{children:[$.steps.length," steps"]})]},$.id)),!a.length&&r.jsx("p",{className:"guided-flow-empty",children:"Create a flow to define a deterministic path."})]}),m?r.jsxs("main",{className:"guided-flow-editor",children:[r.jsxs("div",{className:"guided-flow-fields",children:[r.jsxs("label",{children:["Flow name",r.jsx("input",{className:"field",value:m.name,onChange:$=>se({name:$.target.value})})]}),r.jsxs("label",{children:["Base URL",r.jsx("input",{className:"field",value:m.baseUrl,onChange:$=>se({baseUrl:$.target.value})})]}),r.jsxs("label",{className:"guided-flow-wide",children:["Description",r.jsx("textarea",{className:"field",rows:2,value:m.description??"",onChange:$=>se({description:$.target.value})})]})]}),r.jsxs("div",{className:"guided-flow-section-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Flow Steps"}),r.jsx("span",{children:"Execute only the steps defined here."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:P,children:"Duplicate"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>H("delete"),children:"Delete"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>H("save"),disabled:x,children:x?"Saving…":"Save Flow"})]})]}),r.jsx("div",{className:"guided-flow-steps",children:m.steps.map(($,K)=>r.jsx(J1,{index:K,step:$,status:C.get($.id),onChange:ie=>q(K,ie),onDelete:()=>E(K),onMove:X},$.id))}),r.jsxs("div",{className:"guided-flow-add",children:[r.jsx("select",{className:"field",value:w,onChange:$=>v($.target.value),children:P1.map($=>r.jsx("option",{children:$},$))}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:G,children:"+ Add Step"})]}),r.jsxs("div",{className:"guided-flow-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!W||A,onClick:I,children:A?"Running…":"Run Flow"}),A&&r.jsx("button",{type:"button",className:"btn btn-danger",onClick:S,children:"Stop"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>R({framework:"playwright",source:qx(m)}),children:"Generate Playwright"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>R({framework:"cypress",source:Ix(m)}),children:"Generate Cypress"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>h($x(m)),children:"Generate Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!0,title:"Record Flow is planned for a future release",children:"Record Flow · Planned"})]}),M&&r.jsxs("section",{className:"guided-flow-code",children:[r.jsxs("header",{children:[r.jsxs("b",{children:[M.framework==="playwright"?"Playwright":"Cypress"," generated source"]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>R(void 0),"aria-label":"Close generated code",children:"×"})]}),r.jsx("pre",{children:M.source})]}),O&&r.jsxs("section",{className:"guided-flow-run",children:[r.jsx("header",{children:r.jsxs("b",{children:["Run result: ",O.status]})}),r.jsx("div",{className:"guided-flow-log",children:O.logs.map(($,K)=>r.jsx("code",{className:`cli-${$.level}`,children:$.message},`${$.timestamp}-${K}`))})]})]}):r.jsxs("div",{className:"guided-flow-empty-state",children:[r.jsx("b",{children:"No Guided Flow selected"}),r.jsx("span",{children:"Define a path and LazyScout will follow it only."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ne,children:"Create Guided Flow"})]})]}),B&&m&&r.jsx(Q1,{action:B,flowName:m.name,busy:x,onCancel:()=>H(void 0),onConfirm:D})]})}function Q1({action:a,flowName:l,busy:s,onCancel:o,onConfirm:c}){const h=a==="delete";return r.jsx("div",{className:"guided-flow-confirm-backdrop",role:"presentation",onMouseDown:o,children:r.jsxs("section",{className:"guided-flow-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"guided-flow-confirm-title",onMouseDown:f=>f.stopPropagation(),children:[r.jsx("span",{className:"guided-flow-confirm-icon"+(h?" is-delete":""),"aria-hidden":"true",children:h?"×":"✓"}),r.jsx("p",{className:"eyebrow",children:h?"Remove Guided Flow":"Save Guided Flow"}),r.jsx("h3",{id:"guided-flow-confirm-title",children:h?"Delete this Flow?":"Save your changes?"}),r.jsx("p",{children:h?'"'+l+'" will be removed from this local Project. This action cannot be undone.':'"'+l+'" will be saved to this local Project and will be ready to run.'}),r.jsxs("footer",{children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,disabled:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn "+(h?"btn-danger":"btn-primary"),onClick:c,disabled:s,children:s?"Saving…":h?"Delete Flow":"Save Flow"})]})]})})}function Pr(){return{strategy:"role",role:"button",name:"Button"}}function K1(a){const l=crypto.randomUUID();return a==="navigate"?{id:l,type:a,path:"/"}:a==="click"?{id:l,type:a,target:Pr()}:a==="fill"?{id:l,type:a,target:{...Pr(),role:"textbox"},value:""}:a==="select"?{id:l,type:a,target:{...Pr(),role:"combobox"},option:""}:a==="check"?{id:l,type:a,target:{...Pr(),role:"checkbox"},checked:!0}:a==="wait"?{id:l,type:a,mode:"timeout",value:"750"}:{id:l,type:a,assertion:{type:"text",value:""}}}function J1({index:a,step:l,status:s,onChange:o,onDelete:c,onMove:h}){return r.jsxs("article",{className:`guided-flow-step ${s?`is-${s}`:""}`,children:[r.jsxs("header",{children:[r.jsx("span",{className:"guided-flow-step-number",children:a+1}),r.jsx("b",{children:l.type}),s&&r.jsx("em",{children:s}),r.jsxs("div",{className:"guided-flow-step-actions",children:[r.jsx("button",{type:"button",onClick:()=>h(a,-1),disabled:a===0,children:"↑"}),r.jsx("button",{type:"button",onClick:()=>h(a,1),children:"↓"}),r.jsx("button",{type:"button",onClick:c,children:"Delete"})]})]}),r.jsx(W1,{step:l,onChange:o})]})}function W1({step:a,onChange:l}){return a.type==="navigate"?r.jsxs("label",{children:["Path",r.jsx("input",{className:"field",value:a.path,onChange:s=>l({...a,path:s.target.value})})]}):a.type==="click"||a.type==="fill"||a.type==="select"||a.type==="check"?r.jsxs(r.Fragment,{children:[r.jsx(kc,{target:a.target,onChange:s=>l({...a,target:s})}),a.type==="fill"&&r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:a.value??"",onChange:s=>l({...a,value:s.target.value,valueRef:void 0})})]}),r.jsxs("label",{children:["Value reference",r.jsx("input",{className:"field",placeholder:"TEST_USERNAME",value:a.valueRef??"",onChange:s=>l({...a,valueRef:s.target.value||void 0,value:s.target.value?void 0:a.value})}),r.jsxs("small",{className:"guided-flow-field-help",children:["Use a Project Settings variable such as ",r.jsx("code",{children:"TEST_USERNAME"})," or ",r.jsx("code",{children:"TEST_PASSWORD"}),". Do not put real credentials in Value."]})]})]}),a.type==="select"&&r.jsxs("label",{children:["Option",r.jsx("input",{className:"field",value:a.option,onChange:s=>l({...a,option:s.target.value})})]}),a.type==="check"&&r.jsxs("label",{className:"guided-flow-check",children:[r.jsx("input",{type:"checkbox",checked:a.checked,onChange:s=>l({...a,checked:s.target.checked})})," ","Checked"]})]}):a.type==="wait"?r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Wait type",r.jsxs("select",{className:"field",value:a.mode,onChange:s=>l({...a,mode:s.target.value}),children:[r.jsx("option",{value:"timeout",children:"Timeout"}),r.jsx("option",{value:"url",children:"URL"}),r.jsx("option",{value:"text",children:"Text"}),r.jsx("option",{value:"visible",children:"Element visible"})]})]}),r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:a.value,onChange:s=>l({...a,value:s.target.value})})]}),a.mode==="visible"&&r.jsx(kc,{target:a.target??Pr(),onChange:s=>l({...a,target:s})})]}):r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Assertion",r.jsxs("select",{className:"field",value:a.assertion.type,onChange:s=>l({...a,assertion:s.target.value==="visible"?{type:"visible",target:Pr()}:{type:s.target.value,value:""}}),children:[r.jsx("option",{value:"visible",children:"Element visible"}),r.jsx("option",{value:"text",children:"Text visible"}),r.jsx("option",{value:"url",children:"URL contains"})]})]}),a.assertion.type==="visible"?r.jsx(kc,{target:a.assertion.target,onChange:s=>l({...a,assertion:{type:"visible",target:s}})}):r.jsxs("label",{children:["Expected value",r.jsx("input",{className:"field",value:a.assertion.value,onChange:s=>l({...a,assertion:a.assertion.type==="text"?{type:"text",value:s.target.value}:{type:"url",value:s.target.value}})})]})]})}function kc({target:a,onChange:l}){const s=a.strategy==="role"?a.name??"":a[a.strategy==="testid"?"testId":a.strategy==="css"?"cssSelector":a.strategy];return r.jsxs("div",{className:"guided-flow-target",children:[r.jsxs("label",{children:["Locator",r.jsxs("select",{className:"field",value:a.strategy,onChange:o=>l({strategy:o.target.value,value:""}),children:[r.jsx("option",{value:"role",children:"Role"}),r.jsx("option",{value:"label",children:"Label"}),r.jsx("option",{value:"placeholder",children:"Placeholder"}),r.jsx("option",{value:"text",children:"Text"}),r.jsx("option",{value:"testid",children:"Test ID"}),r.jsx("option",{value:"css",children:"CSS"})]}),r.jsx("small",{className:"guided-flow-field-help",children:eS(a.strategy)})]}),a.strategy==="role"&&r.jsxs("label",{children:["Role",r.jsx("input",{className:"field",value:a.role??"",onChange:o=>l({...a,role:o.target.value})})]}),r.jsxs("label",{children:[a.strategy==="role"?"Accessible name":"Value",r.jsx("input",{className:"field",value:s??"",placeholder:Qm(a.strategy),onChange:o=>l(tS(a,o.target.value))}),r.jsxs("small",{className:"guided-flow-field-help",children:["Example: ",r.jsx("code",{children:Qm(a.strategy)})]})]})]})}function eS(a){return a==="css"?"Best for inputs/buttons with a stable id, name, or data attribute.":a==="role"?"Best for buttons, links, checkboxes, and controls with a clear accessible name.":a==="label"?"Use only when the input has a real HTML label. Useful for validation checks.":a==="placeholder"?"Use when the input has a stable placeholder attribute.":a==="testid"?"Best when the application provides a stable data-testid attribute.":"Use for visible text assertions or text-based controls when no stronger locator exists."}function Qm(a){return a==="css"?'#username or input[name="email"]':a==="role"?"Submit":a==="label"?"Email":a==="placeholder"?"Search products":a==="testid"?"save-button":"Welcome back"}function tS(a,l){return a.strategy==="role"?{...a,name:l}:a.strategy==="testid"?{...a,testId:l}:a.strategy==="css"?{...a,cssSelector:l}:{...a,[a.strategy]:l}}function nS({result:a,testCaseCount:l,flows:s,baseUrl:o,projectId:c,secrets:h,onSaveFlows:f,onGenerateTestCase:p,onAddToFlow:m,onClose:g,onOpenCases:w}){const[v,x]=F.useState("state-flow"),[y,A]=F.useState("auto-scout"),[N,j]=F.useState(),[T,O]=F.useState(),[k,M]=F.useState(1),R=a.actionGraph.states.find(H=>H.id===N),B=a.actionGraph.edges.find(H=>H.id===T);return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:H=>H.target===H.currentTarget&&g(),children:r.jsxs("section",{className:"modern-modal explorer-flow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"flow-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Website explorer"}),r.jsx("h2",{id:"flow-title",children:"UI State Explorer"}),r.jsx("p",{children:a.origin})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:g,"aria-label":"Close explorer",children:"×"})]}),r.jsxs("div",{className:"explorer-main-tabs",role:"tablist","aria-label":"Explorer mode",children:[r.jsx("button",{type:"button",className:y==="auto-scout"?"active":"",onClick:()=>A("auto-scout"),children:"Auto Scout"}),r.jsx("button",{type:"button",className:y==="guided-flow"?"active":"",onClick:()=>A("guided-flow"),children:"Guided Flow"})]}),y==="guided-flow"?r.jsx(X1,{flows:s,baseUrl:o,projectId:c,secrets:h,onSave:f,onGenerateTestCase:p}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"explorer-hero",children:[r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:l}),r.jsx("span",{children:"draft test cases"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:a.stats.pagesVisited}),r.jsx("span",{children:"pages discovered"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:a.actionGraph.states.length}),r.jsx("span",{children:"UI states observed"})]})]}),r.jsxs("div",{className:"explorer-view-tabs",role:"tablist","aria-label":"Explorer view",children:[r.jsx("button",{type:"button",className:v==="site-map"?"active":"",onClick:()=>x("site-map"),children:"Site Map"}),r.jsxs("button",{type:"button",className:v==="state-flow"?"active":"",onClick:()=>x("state-flow"),children:["State Flow ",r.jsx("span",{children:a.actionGraph.edges.length})]})]}),v==="site-map"?r.jsx(aS,{result:a,onSelect:H=>{j(H.id),x("state-flow")}}):r.jsxs("div",{className:"state-flow-layout",children:[r.jsx(rS,{states:a.actionGraph.states,edges:a.actionGraph.edges,selectedStateId:N,selectedEdgeId:T,zoom:k,onZoom:M,onState:H=>{j(H),O(void 0)},onEdge:H=>{O(H),j(void 0)}}),r.jsx(iS,{state:R,edge:B,states:a.actionGraph.states,onAddToFlow:m})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"flow-safety",children:[a.actionGraph.blockedActionKeys.length," unsafe actions blocked"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:w,children:"Review Test Cases"})]})]})})}function aS({result:a,onSelect:l}){const s=F.useMemo(()=>{const o=new Map;for(const c of a.actionGraph.states){const h=o.get(c.url)??[];h.push(c),o.set(c.url,h)}return[...o.entries()]},[a.actionGraph.states]);return r.jsx("div",{className:"site-map-list",children:s.map(([o,c])=>r.jsxs("section",{children:[r.jsx("h3",{children:new URL(o).pathname||"/"}),r.jsx("small",{children:o}),c.map(h=>r.jsxs("button",{type:"button",onClick:()=>l(h),children:[r.jsx("i",{className:`state-type-${h.type}`})," ",r.jsx("span",{children:h.name||h.title||"Observed state"}),r.jsx("em",{children:h.type})]},h.id))]},o))})}function rS({states:a,edges:l,selectedStateId:s,selectedEdgeId:o,zoom:c,onZoom:h,onState:f,onEdge:p}){const m=[...new Map(a.map(j=>[j.url,a.filter(T=>T.url===j.url)])).values()],g=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(m.length)))),w=Math.ceil(m.length/g),x=Math.max(1,...m.map(j=>j.length))*130+90,y=new Map;m.forEach((j,T)=>{const O=T%g,k=Math.floor(T/g);j.forEach((M,R)=>{y.set(M.id,{x:150+O*300,y:115+k*x+R*130})})});const A=g*300+80,N=Math.max(320,w*x+40);return r.jsxs("div",{className:"state-flow-canvas",children:[r.jsxs("div",{className:"flow-toolbar",children:[r.jsxs("span",{children:[a.length," states · ",l.length," transitions"]}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>h(Math.max(.6,c-.15)),children:"−"}),r.jsx("button",{type:"button",onClick:()=>h(Math.min(1.4,c+.15)),children:"+"}),r.jsx("button",{type:"button",onClick:()=>h(1),children:"Fit"})]})]}),r.jsx("div",{className:"flow-viewport",children:r.jsxs("svg",{width:A*c,height:N*c,viewBox:`0 0 ${A} ${N}`,"aria-label":"UI state flow graph",children:[r.jsx("defs",{children:r.jsx("marker",{id:"flow-arrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:r.jsx("path",{d:"M0,0 L8,4 L0,8 Z",fill:"#94a3b8"})})}),m.map((j,T)=>{const O=T%g,k=Math.floor(T/g),M=20+O*300,R=35+k*x;return r.jsxs("g",{className:"flow-page-group",children:[r.jsx("rect",{x:M,y:R,width:"260",height:x-20,rx:"14"}),r.jsx("text",{x:M+14,y:R+22,className:"flow-page-label",children:Dc(new URL(j[0].url).pathname||"/",30)})]},j[0].url)}),l.map(j=>{const T=y.get(j.fromStateId),O=j.toStateId?y.get(j.toStateId):void 0;if(!T||!O)return null;const k=j.id===o;return r.jsxs("g",{onClick:()=>p(j.id),className:"flow-edge",children:[r.jsx("path",{className:k?"selected":"",d:`M ${T.x} ${T.y+38} C ${T.x} ${T.y+95}, ${O.x} ${O.y-95}, ${O.x} ${O.y-38}`,markerEnd:"url(#flow-arrow)"}),r.jsx("title",{children:j.action.description})]},j.id)}),a.map(j=>{const T=y.get(j.id),O=j.id===s;return r.jsxs("g",{onClick:()=>f(j.id),className:"flow-node",children:[r.jsx("rect",{className:O?"selected":"",x:T.x-112,y:T.y-38,width:"224",height:"76",rx:"12"}),r.jsx("text",{x:T.x-94,y:T.y-11,className:"flow-node-type",children:j.type.toUpperCase()}),r.jsx("text",{x:T.x-94,y:T.y+12,className:"flow-node-name",children:Dc(j.name||j.title||j.url,27)}),r.jsx("text",{x:T.x-94,y:T.y+28,className:"flow-node-url",children:Dc(new URL(j.url).pathname||"/",31)}),r.jsx("title",{children:j.name||j.title||j.url})]},j.id)})]})})]})}function iS({state:a,edge:l,states:s,onAddToFlow:o}){if(!a&&!l)return r.jsxs("aside",{className:"flow-inspector empty",children:[r.jsx("b",{children:"Select a state or transition"}),r.jsx("span",{children:"Click a node to view observed UI. Click a line to inspect the action that created it."})]});if(l){const c=s.find(f=>f.id===l.fromStateId),h=s.find(f=>f.id===l.toStateId);return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"Transition detail"}),r.jsx("h3",{children:l.action.description}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Action type"}),r.jsx("dd",{children:l.action.type}),r.jsx("dt",{children:"Status"}),r.jsx("dd",{children:l.status}),r.jsx("dt",{children:"Safety"}),r.jsx("dd",{children:l.action.safe?"Safe action":l.action.reason||"Blocked"}),r.jsx("dt",{children:"From"}),r.jsx("dd",{children:c?.name||c?.url}),r.jsx("dt",{children:"To"}),r.jsx("dd",{children:h?.name||"Not observed"}),l.action.locator&&r.jsxs(r.Fragment,{children:[r.jsx("dt",{children:"Locator"}),r.jsxs("dd",{children:[l.action.locator.role,": ",l.action.locator.name]})]}),l.action.locator&&r.jsx("button",{type:"button",className:"btn btn-secondary mt-3",onClick:()=>o({id:crypto.randomUUID(),type:"click",target:lS(l.action.locator)}),children:"Add to Guided Flow"})]})]})}return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"State detail"}),r.jsx("h3",{children:a.name||a.title||"Observed state"}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Type"}),r.jsx("dd",{children:a.type}),r.jsx("dt",{children:"URL"}),r.jsx("dd",{className:"break-all",children:a.url}),r.jsx("dt",{children:"Fingerprint"}),r.jsxs("dd",{className:"font-mono",children:[a.fingerprint.slice(0,18),"…"]}),r.jsx("dt",{children:"Discovered"}),r.jsx("dd",{children:a.discoveredAt?new Date(a.discoveredAt).toLocaleString():"Previous scan"})]}),r.jsxs("section",{children:[r.jsx("b",{children:"Observed UI"}),r.jsx("p",{children:a.headings.slice(0,3).join(" · ")||"No headings recorded"}),r.jsx("p",{children:a.visibleDialogs.length?`Dialog: ${a.visibleDialogs.join(", ")}`:`${a.controls.length} controls observed`}),a.validationMessages?.length?r.jsxs("p",{children:["Validation: ",a.validationMessages.join(" · ")]}):null]})]})}function lS(a){return a.role?{strategy:"role",role:a.role,name:a.name??""}:a.label?{strategy:"label",label:a.label}:a.placeholder?{strategy:"placeholder",placeholder:a.placeholder}:a.testId?{strategy:"testid",testId:a.testId}:{strategy:"text",text:a.name??""}}function Dc(a,l){return a.length>l?`${a.slice(0,l-1)}…`:a}const sS=1e3,oS=3,zc=a=>({projectId:a,status:"idle",startUrl:"",startedAt:"",steps:[]});function uS(a){const[l,s]=F.useState(()=>zc(a??"")),[o,c]=F.useState(!1),[h,f]=F.useState(),[p,m]=F.useState(!1);F.useEffect(()=>{if(!a)return;let y=!0;return s(zc(a)),f(void 0),m(!1),zm(a).then(A=>{if(A.status==="stopped"){Um(a).catch(()=>{});return}y&&A.status==="recording"&&s(A)}).catch(()=>{}),()=>{y=!1}},[a]);const g=l.status==="recording"&&!p;F.useEffect(()=>{if(!a||!g)return;let y=!0,A=!1,N=0;const j=setInterval(()=>{A||(A=!0,zm(a).then(T=>{N=0,y&&s(T)}).catch(()=>{N+=1,N>=oS&&y&&(f("Lost contact with the recorder. Stop and start it again."),m(!0))}).finally(()=>{A=!1}))},sS);return()=>{y=!1,clearInterval(j)}},[a,g]);const w=F.useCallback(async y=>{if(a){c(!0),f(void 0),m(!1);try{s(await i0(a,y))}catch(A){f(A instanceof Error?A.message:"The recorder could not be started.")}finally{c(!1)}}},[a]),v=F.useCallback(async()=>{if(a){c(!0);try{s(await l0(a))}catch(y){f(y instanceof Error?y.message:"The recorder could not be stopped.")}finally{c(!1)}}},[a]),x=F.useCallback(()=>{s(zc(a??"")),f(void 0),m(!1),a&&Um(a).catch(()=>{})},[a]);return{state:l,recording:g,busy:o,error:h,start:w,stop:v,reset:x}}const cS="{{TEST_PASSWORD}}",Km="Recorded login";function dS({projectId:a,targetUrl:l,onSaveRecording:s}){const{state:o,recording:c,busy:h,error:f,start:p,stop:m,reset:g}=uS(a),[w,v]=F.useState(Km),x=o.steps,y=o.status==="stopped"&&x.length>0,A=()=>{g(),v(Km)},N=()=>{s(x,w.trim()||"Recorded flow",o.startUrl||l),A()};return r.jsxs("div",{className:"settings-notice settings-notice-stacked recorder-panel",children:[r.jsx("b",{children:"Record a flow"}),r.jsxs("span",{children:["Opens a browser and turns your own clicks and typing into Test Steps. Passwords are never read: a password field is always recorded as ",r.jsx("code",{children:cS}),"."]}),f&&r.jsx("p",{className:"recorder-error",children:f}),!c&&!y&&r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:h,onClick:()=>{p(l)},children:h?"Starting…":"Start recording"}),c&&r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"recorder-status",children:[r.jsx("span",{className:"recorder-dot","aria-hidden":"true"}),"Recording in ",o.browserLabel??"the browser"," — ",x.length," step",x.length===1?"":"s",". Close the window or press Stop when you are done."]}),r.jsx("button",{type:"button",className:"btn btn-danger",disabled:h,onClick:()=>{m()},children:h?"Stopping…":"Stop recording"})]}),x.length>0&&r.jsx("ol",{className:"recorder-steps",children:x.map((j,T)=>r.jsxs("li",{children:[r.jsx("span",{className:"recorder-step-index",children:T+1}),r.jsx("span",{children:pl(j)})]},`${T}-${j.type}`))}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"recorder-title",children:[r.jsx("span",{children:"Test Case title"}),r.jsx("input",{value:w,onChange:j=>v(j.target.value),placeholder:"Recorded login"})]}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Save as Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:A,children:"Discard"})]})]}),o.status==="stopped"&&x.length===0&&r.jsx("p",{className:"recorder-status",children:"No steps were recorded. Start again and interact with the page."})]})}const Jm=a=>a.join(`
40
- `),fS=a=>a.split(/[\n,]/).map(l=>l.trim());function hS({filter:a,onChange:l}){const[s,o]=F.useState(()=>Jm(a.keywords)),c=(h,f=a.enabled)=>{o(h),l({enabled:f,keywords:fS(h)})};return r.jsxs("div",{className:"settings-notice settings-notice-stacked click-filter-panel",children:[r.jsxs("b",{children:["Click safeguards ",a.enabled?"ON":"OFF"]}),r.jsx("span",{children:"Suggested destructive actions are blocked by default. Explorer skips them and an Automation run stops instead of clicking. Sign-out actions are always blocked."}),r.jsxs("label",{className:"settings-toggle",children:[r.jsx("input",{type:"checkbox",checked:a.enabled,onChange:h=>l({...a,enabled:h.target.checked})}),r.jsx("span",{children:"Block controls whose label contains one of these words"})]}),a.enabled&&r.jsxs(r.Fragment,{children:[r.jsx("textarea",{className:"click-filter-input",rows:5,value:s,onChange:h=>c(h.target.value),placeholder:`delete
39
+ Click · CSS · #submit`})]})]}),r.jsxs("div",{className:"guided-flow-guide-steps",children:[r.jsx("strong",{children:"First time using Guided Flow?"}),r.jsxs("ol",{children:[r.jsx("li",{children:"Open the target page in your browser and inspect the element you want to test."}),r.jsxs("li",{children:["If it has an id, choose ",r.jsx("b",{children:"CSS"}),". If it is a named button, choose ",r.jsx("b",{children:"Role"}),"."]}),r.jsxs("li",{children:["Enter only the selector value, for example ",r.jsx("code",{children:"#username"}),", not the whole HTML tag."]}),r.jsxs("li",{children:["For usernames and passwords, leave Value empty and use ",r.jsx("b",{children:"Value reference"}),"."]}),r.jsx("li",{children:"Save the Flow, run it, then use the CLI error to adjust only the failing step."})]})]}),r.jsxs("div",{className:"guided-flow-guide-decision",children:[r.jsx("b",{children:"Not sure which locator to choose?"}),r.jsx("span",{children:"id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child"})]})]}),r.jsxs("div",{className:"guided-flow-layout",children:[r.jsxs("aside",{className:"guided-flow-list",children:[r.jsxs("div",{className:"guided-flow-list-head",children:[r.jsx("b",{children:"Guided Flows"}),r.jsx("span",{children:n.length})]}),n.map($=>r.jsxs("button",{type:"button",className:$.id===m?.id?"is-active":"",onClick:()=>{p($.id),g($),k(void 0)},children:[r.jsx("strong",{children:$.name}),r.jsxs("small",{children:[$.steps.length," steps"]})]},$.id)),!n.length&&r.jsx("p",{className:"guided-flow-empty",children:"Create a flow to define a deterministic path."})]}),m?r.jsxs("main",{className:"guided-flow-editor",children:[r.jsxs("div",{className:"guided-flow-fields",children:[r.jsxs("label",{children:["Flow name",r.jsx("input",{className:"field",value:m.name,onChange:$=>se({name:$.target.value})})]}),r.jsxs("label",{children:["Base URL",r.jsx("input",{className:"field",value:m.baseUrl,onChange:$=>se({baseUrl:$.target.value})})]}),r.jsxs("label",{className:"guided-flow-wide",children:["Description",r.jsx("textarea",{className:"field",rows:2,value:m.description??"",onChange:$=>se({description:$.target.value})})]})]}),r.jsxs("div",{className:"guided-flow-section-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Flow Steps"}),r.jsx("span",{children:"Execute only the steps defined here."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:P,children:"Duplicate"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>H("delete"),children:"Delete"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>H("save"),disabled:x,children:x?"Saving…":"Save Flow"})]})]}),r.jsx("div",{className:"guided-flow-steps",children:m.steps.map(($,K)=>r.jsx(nS,{index:K,step:$,status:A.get($.id),onChange:ie=>q(K,ie),onDelete:()=>E(K),onMove:X},$.id))}),r.jsxs("div",{className:"guided-flow-add",children:[r.jsx("select",{className:"field",value:w,onChange:$=>v($.target.value),children:K1.map($=>r.jsx("option",{children:$},$))}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:G,children:"+ Add Step"})]}),r.jsxs("div",{className:"guided-flow-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!W||C,onClick:I,children:C?"Running…":"Run Flow"}),C&&r.jsx("button",{type:"button",className:"btn btn-danger",onClick:S,children:"Stop"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>R({framework:"playwright",source:Ix(m)}),children:"Generate Playwright"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>R({framework:"cypress",source:Px(m)}),children:"Generate Cypress"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>h(qx(m)),children:"Generate Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!0,title:"Record Flow is planned for a future release",children:"Record Flow · Planned"})]}),M&&r.jsxs("section",{className:"guided-flow-code",children:[r.jsxs("header",{children:[r.jsxs("b",{children:[M.framework==="playwright"?"Playwright":"Cypress"," generated source"]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>R(void 0),"aria-label":"Close generated code",children:"×"})]}),r.jsx("pre",{children:M.source})]}),O&&r.jsxs("section",{className:"guided-flow-run",children:[r.jsx("header",{children:r.jsxs("b",{children:["Run result: ",O.status]})}),r.jsx("div",{className:"guided-flow-log",children:O.logs.map(($,K)=>r.jsx("code",{className:`cli-${$.level}`,children:$.message},`${$.timestamp}-${K}`))})]})]}):r.jsxs("div",{className:"guided-flow-empty-state",children:[r.jsx("b",{children:"No Guided Flow selected"}),r.jsx("span",{children:"Define a path and LazyScout will follow it only."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ne,children:"Create Guided Flow"})]})]}),B&&m&&r.jsx(eS,{action:B,flowName:m.name,busy:x,onCancel:()=>H(void 0),onConfirm:D})]})}function eS({action:n,flowName:l,busy:s,onCancel:o,onConfirm:c}){const h=n==="delete";return r.jsx("div",{className:"guided-flow-confirm-backdrop",role:"presentation",onMouseDown:o,children:r.jsxs("section",{className:"guided-flow-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"guided-flow-confirm-title",onMouseDown:f=>f.stopPropagation(),children:[r.jsx("span",{className:"guided-flow-confirm-icon"+(h?" is-delete":""),"aria-hidden":"true",children:h?"×":"✓"}),r.jsx("p",{className:"eyebrow",children:h?"Remove Guided Flow":"Save Guided Flow"}),r.jsx("h3",{id:"guided-flow-confirm-title",children:h?"Delete this Flow?":"Save your changes?"}),r.jsx("p",{children:h?'"'+l+'" will be removed from this local Project. This action cannot be undone.':'"'+l+'" will be saved to this local Project and will be ready to run.'}),r.jsxs("footer",{children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,disabled:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn "+(h?"btn-danger":"btn-primary"),onClick:c,disabled:s,children:s?"Saving…":h?"Delete Flow":"Save Flow"})]})]})})}function Pr(){return{strategy:"role",role:"button",name:"Button"}}function tS(n){const l=crypto.randomUUID();return n==="navigate"?{id:l,type:n,path:"/"}:n==="click"?{id:l,type:n,target:Pr()}:n==="fill"?{id:l,type:n,target:{...Pr(),role:"textbox"},value:""}:n==="select"?{id:l,type:n,target:{...Pr(),role:"combobox"},option:""}:n==="check"?{id:l,type:n,target:{...Pr(),role:"checkbox"},checked:!0}:n==="wait"?{id:l,type:n,mode:"timeout",value:"750"}:{id:l,type:n,assertion:{type:"text",value:""}}}function nS({index:n,step:l,status:s,onChange:o,onDelete:c,onMove:h}){return r.jsxs("article",{className:`guided-flow-step ${s?`is-${s}`:""}`,children:[r.jsxs("header",{children:[r.jsx("span",{className:"guided-flow-step-number",children:n+1}),r.jsx("b",{children:l.type}),s&&r.jsx("em",{children:s}),r.jsxs("div",{className:"guided-flow-step-actions",children:[r.jsx("button",{type:"button",onClick:()=>h(n,-1),disabled:n===0,children:"↑"}),r.jsx("button",{type:"button",onClick:()=>h(n,1),children:"↓"}),r.jsx("button",{type:"button",onClick:c,children:"Delete"})]})]}),r.jsx(aS,{step:l,onChange:o})]})}function aS({step:n,onChange:l}){return n.type==="navigate"?r.jsxs("label",{children:["Path",r.jsx("input",{className:"field",value:n.path,onChange:s=>l({...n,path:s.target.value})})]}):n.type==="click"||n.type==="fill"||n.type==="select"||n.type==="check"?r.jsxs(r.Fragment,{children:[r.jsx(kc,{target:n.target,onChange:s=>l({...n,target:s})}),n.type==="fill"&&r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:n.value??"",onChange:s=>l({...n,value:s.target.value,valueRef:void 0})})]}),r.jsxs("label",{children:["Value reference",r.jsx("input",{className:"field",placeholder:"TEST_USERNAME",value:n.valueRef??"",onChange:s=>l({...n,valueRef:s.target.value||void 0,value:s.target.value?void 0:n.value})}),r.jsxs("small",{className:"guided-flow-field-help",children:["Use a Project Settings variable such as ",r.jsx("code",{children:"TEST_USERNAME"})," or ",r.jsx("code",{children:"TEST_PASSWORD"}),". Do not put real credentials in Value."]})]})]}),n.type==="select"&&r.jsxs("label",{children:["Option",r.jsx("input",{className:"field",value:n.option,onChange:s=>l({...n,option:s.target.value})})]}),n.type==="check"&&r.jsxs("label",{className:"guided-flow-check",children:[r.jsx("input",{type:"checkbox",checked:n.checked,onChange:s=>l({...n,checked:s.target.checked})})," ","Checked"]})]}):n.type==="wait"?r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Wait type",r.jsxs("select",{className:"field",value:n.mode,onChange:s=>l({...n,mode:s.target.value}),children:[r.jsx("option",{value:"timeout",children:"Wait for timeout"}),r.jsx("option",{value:"url",children:"Wait for URL"}),r.jsx("option",{value:"text",children:"Wait for text"}),r.jsx("option",{value:"visible",children:"Wait for element visible"})]})]}),r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:n.value,onChange:s=>l({...n,value:s.target.value})})]}),n.mode==="visible"&&r.jsx(kc,{target:n.target??Pr(),onChange:s=>l({...n,target:s})})]}):r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Assertion",r.jsxs("select",{className:"field",value:n.assertion.type,onChange:s=>l({...n,assertion:s.target.value==="visible"?{type:"visible",target:Pr()}:{type:s.target.value,value:""}}),children:[r.jsx("option",{value:"visible",children:"Element visible"}),r.jsx("option",{value:"text",children:"Text visible"}),r.jsx("option",{value:"url",children:"URL contains"})]})]}),n.assertion.type==="visible"?r.jsx(kc,{target:n.assertion.target,onChange:s=>l({...n,assertion:{type:"visible",target:s}})}):r.jsxs("label",{children:["Expected value",r.jsx("input",{className:"field",value:n.assertion.value,onChange:s=>l({...n,assertion:n.assertion.type==="text"?{type:"text",value:s.target.value}:{type:"url",value:s.target.value}})})]})]})}function kc({target:n,onChange:l}){const s=n.strategy==="role"?n.name??"":n[n.strategy==="testid"?"testId":n.strategy==="css"?"cssSelector":n.strategy];return r.jsxs("div",{className:"guided-flow-target",children:[r.jsxs("label",{children:["Locator",r.jsxs("select",{className:"field",value:n.strategy,onChange:o=>l({strategy:o.target.value,value:""}),children:[r.jsx("option",{value:"role",children:"Role"}),r.jsx("option",{value:"label",children:"Label"}),r.jsx("option",{value:"placeholder",children:"Placeholder"}),r.jsx("option",{value:"text",children:"Text"}),r.jsx("option",{value:"testid",children:"Test ID"}),r.jsx("option",{value:"css",children:"CSS"})]}),r.jsx("small",{className:"guided-flow-field-help",children:rS(n.strategy)})]}),n.strategy==="role"&&r.jsxs("label",{children:["Role",r.jsx("input",{className:"field",value:n.role??"",onChange:o=>l({...n,role:o.target.value})})]}),r.jsxs("label",{children:[n.strategy==="role"?"Accessible name":"Value",r.jsx("input",{className:"field",value:s??"",placeholder:Qm(n.strategy),onChange:o=>l(iS(n,o.target.value))}),r.jsxs("small",{className:"guided-flow-field-help",children:["Example: ",r.jsx("code",{children:Qm(n.strategy)})]})]})]})}function rS(n){return n==="css"?"Best for inputs/buttons with a stable id, name, or data attribute. Enter quotes without backslashes.":n==="role"?"Best for buttons, links, checkboxes, and controls with a clear accessible name.":n==="label"?"Use only when the input has a real HTML label. Useful for validation checks.":n==="placeholder"?"Use when the input has a stable placeholder attribute.":n==="testid"?"Best when the application provides a stable data-testid attribute.":"Use for visible text assertions or text-based controls when no stronger locator exists."}function Qm(n){return n==="css"?'#username or input[name="email"]':n==="role"?"Submit":n==="label"?"Email":n==="placeholder"?"Search products":n==="testid"?"save-button":"Welcome back"}function iS(n,l){return n.strategy==="role"?{...n,name:l}:n.strategy==="testid"?{...n,testId:l}:n.strategy==="css"?{...n,cssSelector:l.replace(/\\(["'])/g,"$1")}:{...n,[n.strategy]:l}}function lS({result:n,testCaseCount:l,flows:s,baseUrl:o,projectId:c,secrets:h,onSaveFlows:f,onGenerateTestCase:p,onAddToFlow:m,onClose:g,onOpenCases:w}){const[v,x]=F.useState("state-flow"),[y,C]=F.useState("auto-scout"),[N,j]=F.useState(),[T,O]=F.useState(),[k,M]=F.useState(1),R=n.actionGraph.states.find(H=>H.id===N),B=n.actionGraph.edges.find(H=>H.id===T);return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:H=>H.target===H.currentTarget&&g(),children:r.jsxs("section",{className:"modern-modal explorer-flow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"flow-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Website explorer"}),r.jsx("h2",{id:"flow-title",children:"UI State Explorer"}),r.jsx("p",{children:n.origin})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:g,"aria-label":"Close explorer",children:"×"})]}),r.jsxs("div",{className:"explorer-main-tabs",role:"tablist","aria-label":"Explorer mode",children:[r.jsx("button",{type:"button",className:y==="auto-scout"?"active":"",onClick:()=>C("auto-scout"),children:"Auto Scout"}),r.jsx("button",{type:"button",className:y==="guided-flow"?"active":"",onClick:()=>C("guided-flow"),children:"Guided Flow"})]}),y==="guided-flow"?r.jsx(W1,{flows:s,baseUrl:o,projectId:c,secrets:h,onSave:f,onGenerateTestCase:p}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"explorer-hero",children:[r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:l}),r.jsx("span",{children:"draft test cases"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:n.stats.pagesVisited}),r.jsx("span",{children:"pages discovered"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:n.actionGraph.states.length}),r.jsx("span",{children:"UI states observed"})]})]}),r.jsxs("div",{className:"explorer-view-tabs",role:"tablist","aria-label":"Explorer view",children:[r.jsx("button",{type:"button",className:v==="site-map"?"active":"",onClick:()=>x("site-map"),children:"Site Map"}),r.jsxs("button",{type:"button",className:v==="state-flow"?"active":"",onClick:()=>x("state-flow"),children:["State Flow ",r.jsx("span",{children:n.actionGraph.edges.length})]})]}),v==="site-map"?r.jsx(sS,{result:n,onSelect:H=>{j(H.id),x("state-flow")}}):r.jsxs("div",{className:"state-flow-layout",children:[r.jsx(oS,{states:n.actionGraph.states,edges:n.actionGraph.edges,selectedStateId:N,selectedEdgeId:T,zoom:k,onZoom:M,onState:H=>{j(H),O(void 0)},onEdge:H=>{O(H),j(void 0)}}),r.jsx(uS,{state:R,edge:B,states:n.actionGraph.states,onAddToFlow:m})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"flow-safety",children:[n.actionGraph.blockedActionKeys.length," unsafe actions blocked"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:w,children:"Review Test Cases"})]})]})})}function sS({result:n,onSelect:l}){const s=F.useMemo(()=>{const o=new Map;for(const c of n.actionGraph.states){const h=o.get(c.url)??[];h.push(c),o.set(c.url,h)}return[...o.entries()]},[n.actionGraph.states]);return r.jsx("div",{className:"site-map-list",children:s.map(([o,c])=>r.jsxs("section",{children:[r.jsx("h3",{children:new URL(o).pathname||"/"}),r.jsx("small",{children:o}),c.map(h=>r.jsxs("button",{type:"button",onClick:()=>l(h),children:[r.jsx("i",{className:`state-type-${h.type}`})," ",r.jsx("span",{children:h.name||h.title||"Observed state"}),r.jsx("em",{children:h.type})]},h.id))]},o))})}function oS({states:n,edges:l,selectedStateId:s,selectedEdgeId:o,zoom:c,onZoom:h,onState:f,onEdge:p}){const m=[...new Map(n.map(j=>[j.url,n.filter(T=>T.url===j.url)])).values()],g=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(m.length)))),w=Math.ceil(m.length/g),x=Math.max(1,...m.map(j=>j.length))*130+90,y=new Map;m.forEach((j,T)=>{const O=T%g,k=Math.floor(T/g);j.forEach((M,R)=>{y.set(M.id,{x:150+O*300,y:115+k*x+R*130})})});const C=g*300+80,N=Math.max(320,w*x+40);return r.jsxs("div",{className:"state-flow-canvas",children:[r.jsxs("div",{className:"flow-toolbar",children:[r.jsxs("span",{children:[n.length," states · ",l.length," transitions"]}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>h(Math.max(.6,c-.15)),children:"−"}),r.jsx("button",{type:"button",onClick:()=>h(Math.min(1.4,c+.15)),children:"+"}),r.jsx("button",{type:"button",onClick:()=>h(1),children:"Fit"})]})]}),r.jsx("div",{className:"flow-viewport",children:r.jsxs("svg",{width:C*c,height:N*c,viewBox:`0 0 ${C} ${N}`,"aria-label":"UI state flow graph",children:[r.jsx("defs",{children:r.jsx("marker",{id:"flow-arrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:r.jsx("path",{d:"M0,0 L8,4 L0,8 Z",fill:"#94a3b8"})})}),m.map((j,T)=>{const O=T%g,k=Math.floor(T/g),M=20+O*300,R=35+k*x;return r.jsxs("g",{className:"flow-page-group",children:[r.jsx("rect",{x:M,y:R,width:"260",height:x-20,rx:"14"}),r.jsx("text",{x:M+14,y:R+22,className:"flow-page-label",children:Dc(new URL(j[0].url).pathname||"/",30)})]},j[0].url)}),l.map(j=>{const T=y.get(j.fromStateId),O=j.toStateId?y.get(j.toStateId):void 0;if(!T||!O)return null;const k=j.id===o;return r.jsxs("g",{onClick:()=>p(j.id),className:"flow-edge",children:[r.jsx("path",{className:k?"selected":"",d:`M ${T.x} ${T.y+38} C ${T.x} ${T.y+95}, ${O.x} ${O.y-95}, ${O.x} ${O.y-38}`,markerEnd:"url(#flow-arrow)"}),r.jsx("title",{children:j.action.description})]},j.id)}),n.map(j=>{const T=y.get(j.id),O=j.id===s;return r.jsxs("g",{onClick:()=>f(j.id),className:"flow-node",children:[r.jsx("rect",{className:O?"selected":"",x:T.x-112,y:T.y-38,width:"224",height:"76",rx:"12"}),r.jsx("text",{x:T.x-94,y:T.y-11,className:"flow-node-type",children:j.type.toUpperCase()}),r.jsx("text",{x:T.x-94,y:T.y+12,className:"flow-node-name",children:Dc(j.name||j.title||j.url,27)}),r.jsx("text",{x:T.x-94,y:T.y+28,className:"flow-node-url",children:Dc(new URL(j.url).pathname||"/",31)}),r.jsx("title",{children:j.name||j.title||j.url})]},j.id)})]})})]})}function uS({state:n,edge:l,states:s,onAddToFlow:o}){if(!n&&!l)return r.jsxs("aside",{className:"flow-inspector empty",children:[r.jsx("b",{children:"Select a state or transition"}),r.jsx("span",{children:"Click a node to view observed UI. Click a line to inspect the action that created it."})]});if(l){const c=s.find(f=>f.id===l.fromStateId),h=s.find(f=>f.id===l.toStateId);return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"Transition detail"}),r.jsx("h3",{children:l.action.description}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Action type"}),r.jsx("dd",{children:l.action.type}),r.jsx("dt",{children:"Status"}),r.jsx("dd",{children:l.status}),r.jsx("dt",{children:"Safety"}),r.jsx("dd",{children:l.action.safe?"Safe action":l.action.reason||"Blocked"}),r.jsx("dt",{children:"From"}),r.jsx("dd",{children:c?.name||c?.url}),r.jsx("dt",{children:"To"}),r.jsx("dd",{children:h?.name||"Not observed"}),l.action.locator&&r.jsxs(r.Fragment,{children:[r.jsx("dt",{children:"Locator"}),r.jsxs("dd",{children:[l.action.locator.role,": ",l.action.locator.name]})]}),l.action.locator&&r.jsx("button",{type:"button",className:"btn btn-secondary mt-3",onClick:()=>o({id:crypto.randomUUID(),type:"click",target:cS(l.action.locator)}),children:"Add to Guided Flow"})]})]})}return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"State detail"}),r.jsx("h3",{children:n.name||n.title||"Observed state"}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Type"}),r.jsx("dd",{children:n.type}),r.jsx("dt",{children:"URL"}),r.jsx("dd",{className:"break-all",children:n.url}),r.jsx("dt",{children:"Fingerprint"}),r.jsxs("dd",{className:"font-mono",children:[n.fingerprint.slice(0,18),"…"]}),r.jsx("dt",{children:"Discovered"}),r.jsx("dd",{children:n.discoveredAt?new Date(n.discoveredAt).toLocaleString():"Previous scan"})]}),r.jsxs("section",{children:[r.jsx("b",{children:"Observed UI"}),r.jsx("p",{children:n.headings.slice(0,3).join(" · ")||"No headings recorded"}),r.jsx("p",{children:n.visibleDialogs.length?`Dialog: ${n.visibleDialogs.join(", ")}`:`${n.controls.length} controls observed`}),n.validationMessages?.length?r.jsxs("p",{children:["Validation: ",n.validationMessages.join(" · ")]}):null]})]})}function cS(n){return n.role?{strategy:"role",role:n.role,name:n.name??""}:n.label?{strategy:"label",label:n.label}:n.placeholder?{strategy:"placeholder",placeholder:n.placeholder}:n.testId?{strategy:"testid",testId:n.testId}:{strategy:"text",text:n.name??""}}function Dc(n,l){return n.length>l?`${n.slice(0,l-1)}…`:n}const dS=1e3,fS=3,zc=n=>({projectId:n,status:"idle",startUrl:"",startedAt:"",steps:[]});function hS(n){const[l,s]=F.useState(()=>zc(n??"")),[o,c]=F.useState(!1),[h,f]=F.useState(),[p,m]=F.useState(!1);F.useEffect(()=>{if(!n)return;let y=!0;return s(zc(n)),f(void 0),m(!1),zm(n).then(C=>{if(C.status==="stopped"){Um(n).catch(()=>{});return}y&&C.status==="recording"&&s(C)}).catch(()=>{}),()=>{y=!1}},[n]);const g=l.status==="recording"&&!p;F.useEffect(()=>{if(!n||!g)return;let y=!0,C=!1,N=0;const j=setInterval(()=>{C||(C=!0,zm(n).then(T=>{N=0,y&&s(T)}).catch(()=>{N+=1,N>=fS&&y&&(f("Lost contact with the recorder. Stop and start it again."),m(!0))}).finally(()=>{C=!1}))},dS);return()=>{y=!1,clearInterval(j)}},[n,g]);const w=F.useCallback(async y=>{if(n){c(!0),f(void 0),m(!1);try{s(await u0(n,y))}catch(C){f(C instanceof Error?C.message:"The recorder could not be started.")}finally{c(!1)}}},[n]),v=F.useCallback(async()=>{if(n){c(!0);try{s(await c0(n))}catch(y){f(y instanceof Error?y.message:"The recorder could not be stopped.")}finally{c(!1)}}},[n]),x=F.useCallback(()=>{s(zc(n??"")),f(void 0),m(!1),n&&Um(n).catch(()=>{})},[n]);return{state:l,recording:g,busy:o,error:h,start:w,stop:v,reset:x}}const pS="{{TEST_PASSWORD}}",Km="Recorded login";function mS({projectId:n,targetUrl:l,onSaveRecording:s}){const{state:o,recording:c,busy:h,error:f,start:p,stop:m,reset:g}=hS(n),[w,v]=F.useState(Km),x=o.steps,y=o.status==="stopped"&&x.length>0,C=()=>{g(),v(Km)},N=()=>{s(x,w.trim()||"Recorded flow",o.startUrl||l),C()};return r.jsxs("div",{className:"settings-notice settings-notice-stacked recorder-panel",children:[r.jsx("b",{children:"Record a flow"}),r.jsxs("span",{children:["Opens a browser and turns your own clicks and typing into Test Steps. Passwords are never read: a password field is always recorded as ",r.jsx("code",{children:pS}),"."]}),f&&r.jsx("p",{className:"recorder-error",children:f}),!c&&!y&&r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:h,onClick:()=>{p(l)},children:h?"Starting…":"Start recording"}),c&&r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"recorder-status",children:[r.jsx("span",{className:"recorder-dot","aria-hidden":"true"}),"Recording in ",o.browserLabel??"the browser"," — ",x.length," step",x.length===1?"":"s",". Close the window or press Stop when you are done."]}),r.jsx("button",{type:"button",className:"btn btn-danger",disabled:h,onClick:()=>{m()},children:h?"Stopping…":"Stop recording"})]}),x.length>0&&r.jsx("ol",{className:"recorder-steps",children:x.map((j,T)=>r.jsxs("li",{children:[r.jsx("span",{className:"recorder-step-index",children:T+1}),r.jsx("span",{children:pl(j)})]},`${T}-${j.type}`))}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"recorder-title",children:[r.jsx("span",{children:"Test Case title"}),r.jsx("input",{value:w,onChange:j=>v(j.target.value),placeholder:"Recorded login"})]}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Save as Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:C,children:"Discard"})]})]}),o.status==="stopped"&&x.length===0&&r.jsx("p",{className:"recorder-status",children:"No steps were recorded. Start again and interact with the page."})]})}const Jm=n=>n.join(`
40
+ `),gS=n=>n.split(/[\n,]/).map(l=>l.trim());function vS({filter:n,onChange:l}){const[s,o]=F.useState(()=>Jm(n.keywords)),c=(h,f=n.enabled)=>{o(h),l({enabled:f,keywords:gS(h)})};return r.jsxs("div",{className:"settings-notice settings-notice-stacked click-filter-panel",children:[r.jsxs("b",{children:["Click safeguards ",n.enabled?"ON":"OFF"]}),r.jsx("span",{children:"Suggested destructive actions are blocked by default. Explorer skips them and an Automation run stops instead of clicking. Sign-out actions are always blocked."}),r.jsxs("label",{className:"settings-toggle",children:[r.jsx("input",{type:"checkbox",checked:n.enabled,onChange:h=>l({...n,enabled:h.target.checked})}),r.jsx("span",{children:"Block controls whose label contains one of these words"})]}),n.enabled&&r.jsxs(r.Fragment,{children:[r.jsx("textarea",{className:"click-filter-input",rows:5,value:s,onChange:h=>c(h.target.value),placeholder:`delete
41
41
  ชำระเงิน
42
- transfer`}),r.jsx("p",{className:"click-filter-help",children:"One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control."}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>c(Jm([...new Set([...a.keywords,...Kg])])),children:"Add suggested words"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>c(""),children:"Clear list"})]})]})]})}function pS({projectName:a,projectId:l,targetUrl:s,secrets:o,onSave:c,onClear:h,onClose:f,onSaveRecording:p,clickFilter:m,onChangeClickFilter:g}){const[w,v]=F.useState(o),[x,y]=F.useState(),[A,N]=F.useState(!1),[j,T]=F.useState(!1),[O,k]=F.useState(!1),M=(B,H)=>v(ae=>({...ae,[B]:H||void 0}));async function R(){if(l){N(!0);try{y(await Wx(l))}catch{y(void 0)}finally{N(!1)}}}return F.useEffect(()=>{R()},[l]),r.jsx("div",{className:"modal-backdrop",role:"presentation",onMouseDown:B=>{B.target===B.currentTarget&&f()},children:r.jsxs("section",{className:"modal-card project-settings-modal",role:"dialog","aria-modal":"true","aria-labelledby":"project-settings-title",children:[r.jsxs("div",{className:"modal-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Project settings"}),r.jsx("h2",{id:"project-settings-title",children:"Test credentials"}),r.jsxs("p",{children:[a??"Current project"," · Used by Automation and Test API"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsxs("div",{className:"settings-notice",children:[r.jsx("b",{children:"Memory only"}),r.jsx("span",{children:"Values stay in this browser tab, are cleared on refresh and are never written to Test Cases or logs."})]}),r.jsxs("div",{className:"settings-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Email"}),r.jsx("input",{type:"email",value:w.email??"",onChange:B=>M("email",B.target.value),placeholder:"Test email",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Username"}),r.jsx("input",{value:w.username??"",onChange:B=>M("username",B.target.value),placeholder:"Test username",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Password"}),r.jsx("input",{type:"password",value:w.password??"",onChange:B=>M("password",B.target.value),placeholder:"Test password",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"API Token"}),r.jsx("input",{type:"password",value:w.apiToken??"",onChange:B=>M("apiToken",B.target.value),placeholder:"API token",autoComplete:"off"})]})]}),r.jsxs("p",{className:"settings-help",children:["Use ",r.jsx("code",{children:"{{TEST_PASSWORD}}"}),", ",r.jsx("code",{children:"{{TEST_EMAIL}}"}),", ",r.jsx("code",{children:"{{TEST_USERNAME}}"})," ","or ",r.jsx("code",{children:"{{API_TOKEN}}"})," in a Test Case. Values are passed to the runner only while it runs."]}),r.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[r.jsx("b",{children:"How to connect credentials to Guided Flow"}),r.jsxs("span",{children:["In a Fill step, leave Value empty and put ",r.jsx("code",{children:"TEST_USERNAME"}),", ",r.jsx("code",{children:"TEST_PASSWORD"}),", or"," ",r.jsx("code",{children:"TEST_EMAIL"})," in Value reference. LazyScout replaces the reference only during the run."]})]}),l&&s&&r.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[r.jsx("b",{children:"Google / SSO session"}),r.jsx("span",{children:"Open a separate LazyScout browser, sign in manually, then close that browser. Future Automation runs use this Project profile."}),r.jsxs("div",{className:"auth-session-status","aria-live":"polite",children:[r.jsx("span",{className:`auth-session-dot ${x?.cookieStoreDetected?"is-ready":x?.profileExists?"is-profile":""}`}),r.jsxs("div",{children:[r.jsx("b",{children:x?.cookieStoreDetected?"Browser profile saved":x?.profileExists?"Browser profile created — login not verified":"No saved browser profile yet"}),r.jsx("small",{children:x?.lastModifiedAt?`Last changed ${new Date(x.lastModifiedAt).toLocaleString()}`:"Open the login browser to create this Project profile."})]})]}),r.jsxs("div",{className:"auth-session-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:j,onClick:async()=>{T(!0);try{await Jx(l,s),await R()}finally{T(!1)}},children:j?"Opening browser…":"Open login browser"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:A,onClick:()=>{R()},children:A?"Checking…":"Refresh session status"}),O?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>{await r0(l),k(!1),await R()},children:"Confirm clear"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>k(!1),children:"Cancel"})]}):r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>k(!0),children:"Clear saved session"})]}),r.jsxs("small",{className:"auth-session-hint",children:["Profile saved confirms that browser data exists. To verify Google / SSO is still valid, Scout the authenticated Start Path, such as ",r.jsx("code",{children:"/dashboard"}),"."]})]}),r.jsx(hS,{filter:m,onChange:g}),l&&s&&p&&r.jsx(dS,{projectId:l,targetUrl:s,onSaveRecording:p})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary mr-auto",onClick:()=>{h(),v({})},children:"Clear secrets"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:f,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{c(w),f()},children:"Save settings"})]})]})})}var Uc={exports:{}},Wm;function mS(){return Wm||(Wm=1,(function(a){var l=(function(s){var o=Object.prototype,c=o.hasOwnProperty,h=Object.defineProperty||function(D,I,S){D[I]=S.value},f,p=typeof Symbol=="function"?Symbol:{},m=p.iterator||"@@iterator",g=p.asyncIterator||"@@asyncIterator",w=p.toStringTag||"@@toStringTag";function v(D,I,S){return Object.defineProperty(D,I,{value:S,enumerable:!0,configurable:!0,writable:!0}),D[I]}try{v({},"")}catch{v=function(I,S,C){return I[S]=C}}function x(D,I,S,C){var $=I&&I.prototype instanceof k?I:k,K=Object.create($.prototype),ie=new V(C||[]);return h(K,"_invoke",{value:q(D,S,ie)}),K}s.wrap=x;function y(D,I,S){try{return{type:"normal",arg:D.call(I,S)}}catch(C){return{type:"throw",arg:C}}}var A="suspendedStart",N="suspendedYield",j="executing",T="completed",O={};function k(){}function M(){}function R(){}var B={};v(B,m,function(){return this});var H=Object.getPrototypeOf,ae=H&&H(H(P([])));ae&&ae!==o&&c.call(ae,m)&&(B=ae);var W=R.prototype=k.prototype=Object.create(B);M.prototype=R,h(W,"constructor",{value:R,configurable:!0}),h(R,"constructor",{value:M,configurable:!0}),M.displayName=v(R,w,"GeneratorFunction");function ne(D){["next","throw","return"].forEach(function(I){v(D,I,function(S){return this._invoke(I,S)})})}s.isGeneratorFunction=function(D){var I=typeof D=="function"&&D.constructor;return I?I===M||(I.displayName||I.name)==="GeneratorFunction":!1},s.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,R):(D.__proto__=R,v(D,w,"GeneratorFunction")),D.prototype=Object.create(W),D},s.awrap=function(D){return{__await:D}};function se(D,I){function S(K,ie,ye,_e){var Ne=y(D[K],D,ie);if(Ne.type==="throw")_e(Ne.arg);else{var oe=Ne.arg,je=oe.value;return je&&typeof je=="object"&&c.call(je,"__await")?I.resolve(je.__await).then(function(Ee){S("next",Ee,ye,_e)},function(Ee){S("throw",Ee,ye,_e)}):I.resolve(je).then(function(Ee){oe.value=Ee,ye(oe)},function(Ee){return S("throw",Ee,ye,_e)})}}var C;function $(K,ie){function ye(){return new I(function(_e,Ne){S(K,ie,_e,Ne)})}return C=C?C.then(ye,ye):ye()}h(this,"_invoke",{value:$})}ne(se.prototype),v(se.prototype,g,function(){return this}),s.AsyncIterator=se,s.async=function(D,I,S,C,$){$===void 0&&($=Promise);var K=new se(x(D,I,S,C),$);return s.isGeneratorFunction(I)?K:K.next().then(function(ie){return ie.done?ie.value:K.next()})};function q(D,I,S){var C=A;return function(K,ie){if(C===j)throw new Error("Generator is already running");if(C===T){if(K==="throw")throw ie;return Q()}for(S.method=K,S.arg=ie;;){var ye=S.delegate;if(ye){var _e=G(ye,S);if(_e){if(_e===O)continue;return _e}}if(S.method==="next")S.sent=S._sent=S.arg;else if(S.method==="throw"){if(C===A)throw C=T,S.arg;S.dispatchException(S.arg)}else S.method==="return"&&S.abrupt("return",S.arg);C=j;var Ne=y(D,I,S);if(Ne.type==="normal"){if(C=S.done?T:N,Ne.arg===O)continue;return{value:Ne.arg,done:S.done}}else Ne.type==="throw"&&(C=T,S.method="throw",S.arg=Ne.arg)}}}function G(D,I){var S=I.method,C=D.iterator[S];if(C===f)return I.delegate=null,S==="throw"&&D.iterator.return&&(I.method="return",I.arg=f,G(D,I),I.method==="throw")||S!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+S+"' method")),O;var $=y(C,D.iterator,I.arg);if($.type==="throw")return I.method="throw",I.arg=$.arg,I.delegate=null,O;var K=$.arg;if(!K)return I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,O;if(K.done)I[D.resultName]=K.value,I.next=D.nextLoc,I.method!=="return"&&(I.method="next",I.arg=f);else return K;return I.delegate=null,O}ne(W),v(W,w,"Generator"),v(W,m,function(){return this}),v(W,"toString",function(){return"[object Generator]"});function E(D){var I={tryLoc:D[0]};1 in D&&(I.catchLoc=D[1]),2 in D&&(I.finallyLoc=D[2],I.afterLoc=D[3]),this.tryEntries.push(I)}function X(D){var I=D.completion||{};I.type="normal",delete I.arg,D.completion=I}function V(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(E,this),this.reset(!0)}s.keys=function(D){var I=Object(D),S=[];for(var C in I)S.push(C);return S.reverse(),function $(){for(;S.length;){var K=S.pop();if(K in I)return $.value=K,$.done=!1,$}return $.done=!0,$}};function P(D){if(D){var I=D[m];if(I)return I.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var S=-1,C=function $(){for(;++S<D.length;)if(c.call(D,S))return $.value=D[S],$.done=!1,$;return $.value=f,$.done=!0,$};return C.next=C}}return{next:Q}}s.values=P;function Q(){return{value:f,done:!0}}return V.prototype={constructor:V,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(X),!D)for(var I in this)I.charAt(0)==="t"&&c.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=f)},stop:function(){this.done=!0;var D=this.tryEntries[0],I=D.completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var I=this;function S(_e,Ne){return K.type="throw",K.arg=D,I.next=_e,Ne&&(I.method="next",I.arg=f),!!Ne}for(var C=this.tryEntries.length-1;C>=0;--C){var $=this.tryEntries[C],K=$.completion;if($.tryLoc==="root")return S("end");if($.tryLoc<=this.prev){var ie=c.call($,"catchLoc"),ye=c.call($,"finallyLoc");if(ie&&ye){if(this.prev<$.catchLoc)return S($.catchLoc,!0);if(this.prev<$.finallyLoc)return S($.finallyLoc)}else if(ie){if(this.prev<$.catchLoc)return S($.catchLoc,!0)}else if(ye){if(this.prev<$.finallyLoc)return S($.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(D,I){for(var S=this.tryEntries.length-1;S>=0;--S){var C=this.tryEntries[S];if(C.tryLoc<=this.prev&&c.call(C,"finallyLoc")&&this.prev<C.finallyLoc){var $=C;break}}$&&(D==="break"||D==="continue")&&$.tryLoc<=I&&I<=$.finallyLoc&&($=null);var K=$?$.completion:{};return K.type=D,K.arg=I,$?(this.method="next",this.next=$.finallyLoc,O):this.complete(K)},complete:function(D,I){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&I&&(this.next=I),O},finish:function(D){for(var I=this.tryEntries.length-1;I>=0;--I){var S=this.tryEntries[I];if(S.finallyLoc===D)return this.complete(S.completion,S.afterLoc),X(S),O}},catch:function(D){for(var I=this.tryEntries.length-1;I>=0;--I){var S=this.tryEntries[I];if(S.tryLoc===D){var C=S.completion;if(C.type==="throw"){var $=C.arg;X(S)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(D,I,S){return this.delegate={iterator:P(D),resultName:I,nextLoc:S},this.method==="next"&&(this.arg=f),O}},s})(a.exports);try{regeneratorRuntime=l}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=l:Function("r","regeneratorRuntime = r")(l)}})(Uc)),Uc.exports}var Mc,eg;function Od(){return eg||(eg=1,Mc=(a,l)=>`${a}-${l}-${Math.random().toString(16).slice(3,8)}`),Mc}var Lc,tg;function cv(){if(tg)return Lc;tg=1;const a=Od();let l=0;return Lc=({id:s,action:o,payload:c={}})=>{let h=s;return typeof h>"u"&&(h=a("Job",l),l+=1),{id:h,action:o,payload:c}},Lc}var Zi={},ng;function Ad(){if(ng)return Zi;ng=1;let a=!1;return Zi.logging=a,Zi.setLogging=l=>{a=l},Zi.log=(...l)=>a?console.log.apply(this,l):null,Zi}var Bc,ag;function gS(){if(ag)return Bc;ag=1;const a=cv(),{log:l}=Ad(),s=Od();let o=0;return Bc=()=>{const c=s("Scheduler",o),h={},f={};let p=[];o+=1;const m=()=>p.length,g=()=>Object.keys(h).length,w=()=>{if(p.length!==0){const N=Object.keys(h);for(let j=0;j<N.length;j+=1)if(typeof f[N[j]]>"u"){p[0](h[N[j]]);break}}},v=(N,j)=>new Promise((T,O)=>{const k=a({action:N,payload:j});p.push(async M=>{p.shift(),f[M.id]=k;try{T(await M[N].apply(this,[...j,k.id]))}catch(R){O(R)}finally{delete f[M.id],w()}}),l(`[${c}]: Add ${k.id} to JobQueue`),l(`[${c}]: JobQueue length=${p.length}`),w()});return{addWorker:N=>(h[N.id]=N,l(`[${c}]: Add ${N.id}`),l(`[${c}]: Number of workers=${g()}`),w(),N.id),addJob:async(N,...j)=>{if(g()===0)throw Error(`[${c}]: You need to have at least one worker before adding jobs`);return v(N,j)},terminate:async()=>{Object.keys(h).forEach(async N=>{await h[N].terminate()}),p=[]},getQueueLen:m,getNumWorkers:g}},Bc}function Ki(a){throw new Error('Could not dynamically require "'+a+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $c,rg;function vS(){return rg||(rg=1,$c=a=>{const l={};return typeof WorkerGlobalScope<"u"?l.type="webworker":typeof document=="object"?l.type="browser":typeof process=="object"&&typeof Ki=="function"&&(l.type="node"),typeof a>"u"?l:l[a]}),$c}var Hc,ig;function yS(){if(ig)return Hc;ig=1;const l=vS()("type")==="browser"?s=>new URL(s,window.location.href).href:s=>s;return Hc=s=>{const o={...s};return["corePath","workerPath","langPath"].forEach(c=>{s[c]&&(o[c]=l(o[c]))}),o},Hc}var qc,lg;function dv(){return lg||(lg=1,qc={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),qc}const bS="7.0.0",xS={version:bS};var Gc,sg;function SS(){return sg||(sg=1,Gc={workerBlobURL:!0,logger:()=>{}}),Gc}var Ic,og;function jS(){if(og)return Ic;og=1;const a=xS.version;return Ic={...SS(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${a}/dist/worker.min.js`},Ic}var Vc,ug;function wS(){return ug||(ug=1,Vc=({workerPath:a,workerBlobURL:l})=>{let s;if(Blob&&URL&&l){const o=new Blob([`importScripts("${a}");`],{type:"application/javascript"});s=new Worker(URL.createObjectURL(o))}else s=new Worker(a);return s}),Vc}var Yc,cg;function _S(){return cg||(cg=1,Yc=a=>{a.terminate()}),Yc}var Fc,dg;function NS(){return dg||(dg=1,Fc=(a,l)=>{a.onmessage=({data:s})=>{l(s)}}),Fc}var Pc,fg;function ES(){return fg||(fg=1,Pc=async(a,l)=>{a.postMessage(l)}),Pc}var Zc,hg;function TS(){if(hg)return Zc;hg=1;const a=s=>new Promise((o,c)=>{const h=new FileReader;h.onload=()=>{o(h.result)},h.onerror=({target:{error:{code:f}}})=>{c(Error(`File could not be read! Code=${f}`))},h.readAsArrayBuffer(s)}),l=async s=>{let o=s;if(typeof s>"u")return"undefined";if(typeof s=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(s)?o=atob(s.split(",")[1]).split("").map(c=>c.charCodeAt(0)):o=await(await fetch(s)).arrayBuffer();else if(typeof HTMLElement<"u"&&s instanceof HTMLElement)s.tagName==="IMG"&&(o=await l(s.src)),s.tagName==="VIDEO"&&(o=await l(s.poster)),s.tagName==="CANVAS"&&await new Promise(c=>{s.toBlob(async h=>{o=await a(h),c()})});else if(typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas){const c=await s.convertToBlob();o=await a(c)}else(s instanceof File||s instanceof Blob)&&(o=await a(s));return new Uint8Array(o)};return Zc=l,Zc}var Xc,pg;function OS(){if(pg)return Xc;pg=1;const a=jS(),l=wS(),s=_S(),o=NS(),c=ES(),h=TS();return Xc={defaultOptions:a,spawnWorker:l,terminateWorker:s,onMessage:o,send:c,loadImage:h},Xc}var Qc,mg;function fv(){if(mg)return Qc;mg=1;const a=yS(),l=cv(),{log:s}=Ad(),o=Od(),c=dv(),{defaultOptions:h,spawnWorker:f,terminateWorker:p,onMessage:m,loadImage:g,send:w}=OS();let v=0;return Qc=async(x="eng",y=c.LSTM_ONLY,A={},N={})=>{const j=o("Worker",v),{logger:T,errorHandler:O,...k}=a({...h,...A}),M={},R=typeof x=="string"?x.split("+"):x;let B=y,H=N;const ae=[c.DEFAULT,c.LSTM_ONLY].includes(y)&&!k.legacyCore;let W,ne;const se=new Promise((oe,je)=>{ne=oe,W=je}),q=oe=>{W(oe.message)};let G=f(k);G.onerror=q,v+=1;const E=({id:oe,action:je,payload:Ee})=>new Promise(($e,He)=>{s(`[${j}]: Start ${oe}, action=${je}`);const _=`${je}-${oe}`;M[_]={resolve:$e,reject:He},w(G,{workerId:j,jobId:oe,action:je,payload:Ee})}),X=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),V=oe=>E(l({id:oe,action:"load",payload:{options:{lstmOnly:ae,corePath:k.corePath,logging:k.logging}}})),P=(oe,je,Ee)=>E(l({id:Ee,action:"FS",payload:{method:"writeFile",args:[oe,je]}})),Q=(oe,je)=>E(l({id:je,action:"FS",payload:{method:"readFile",args:[oe,{encoding:"utf8"}]}})),D=(oe,je)=>E(l({id:je,action:"FS",payload:{method:"unlink",args:[oe]}})),I=(oe,je,Ee)=>E(l({id:Ee,action:"FS",payload:{method:oe,args:je}})),S=(oe,je)=>E(l({id:je,action:"loadLanguage",payload:{langs:oe,options:{langPath:k.langPath,dataPath:k.dataPath,cachePath:k.cachePath,cacheMethod:k.cacheMethod,gzip:k.gzip,lstmOnly:[c.DEFAULT,c.LSTM_ONLY].includes(B)&&!k.legacyLang}}})),C=(oe,je,Ee,$e)=>E(l({id:$e,action:"initialize",payload:{langs:oe,oem:je,config:Ee}})),$=(oe="eng",je,Ee,$e)=>{if(ae&&[c.TESSERACT_ONLY,c.TESSERACT_LSTM_COMBINED].includes(je))throw Error("Legacy model requested but code missing.");const He=je||B;B=He;const _=Ee||H;H=_;const re=(typeof oe=="string"?oe.split("+"):oe).filter(L=>!R.includes(L));return R.push(...re),re.length>0?S(re,$e).then(()=>C(oe,He,_,$e)):C(oe,He,_,$e)},K=(oe={},je)=>E(l({id:je,action:"setParameters",payload:{params:oe}})),ie=async(oe,je={},Ee={text:!0},$e)=>E(l({id:$e,action:"recognize",payload:{image:await g(oe),options:je,output:Ee}})),ye=async(oe,je)=>{if(ae)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return E(l({id:je,action:"detect",payload:{image:await g(oe)}}))},_e=async()=>(G!==null&&(p(G),G=null),Promise.resolve());m(G,({workerId:oe,jobId:je,status:Ee,action:$e,data:He})=>{const _=`${$e}-${je}`;if(Ee==="resolve")s(`[${oe}]: Complete ${je}`),M[_].resolve({jobId:je,data:He}),delete M[_];else if(Ee==="reject")if(M[_].reject(He),delete M[_],$e==="load"&&W(He),O)O(He);else throw Error(He);else Ee==="progress"&&T({...He,userJobId:je})});const Ne={id:j,worker:G,load:X,writeText:P,readText:Q,removeFile:D,FS:I,reinitialize:$,setParameters:K,recognize:ie,detect:ye,terminate:_e};return V().then(()=>S(x)).then(()=>C(x,y,N)).then(()=>ne(Ne)).catch(()=>{}),se},Qc}var Kc,gg;function AS(){if(gg)return Kc;gg=1;const a=fv();return Kc={recognize:async(o,c,h)=>{const f=await a(c,1,h);return f.recognize(o).finally(async()=>{await f.terminate()})},detect:async(o,c)=>{const h=await a("osd",0,c);return h.detect(o).finally(async()=>{await h.terminate()})}},Kc}var Jc,vg;function CS(){return vg||(vg=1,Jc={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}),Jc}var Wc,yg;function RS(){return yg||(yg=1,Wc={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}),Wc}var ed,bg;function kS(){if(bg)return ed;bg=1,mS();const a=gS(),l=fv(),s=AS(),o=CS(),c=dv(),h=RS(),{setLogging:f}=Ad();return ed={languages:o,OEM:c,PSM:h,createScheduler:a,createWorker:l,setLogging:f,...s},ed}var DS=kS();const zS=[{id:"visual",title:"Visual check",description:"Compare text, colors and layout with the image"},{id:"text",title:"Text check",description:"Create steps for text read from the image"},{id:"manual",title:"Manual checklist",description:"Create a checklist for a Tester to review"}],hv="lazyscout-test-case-language";function US(){const a=localStorage.getItem(hv);return a==="th"||a==="en"?a:"en"}function MS({sourceUrl:a,initialLanguage:l,onLanguageChange:s,existingCases:o,onImport:c,onClose:h}){const[f,p]=F.useState(""),[m,g]=F.useState(""),[w,v]=F.useState("Screenshot screen"),[x,y]=F.useState("visual"),[A,N]=F.useState(l??US),[j,T]=F.useState(""),[O,k]=F.useState([]),[M,R]=F.useState(""),[B,H]=F.useState(!1);function ae(G){!G||!G.type.startsWith("image/")||(g(G.name),p(URL.createObjectURL(G)),R("Ready to read the image."))}async function W(){if(!f||B)return;H(!0),R("Reading Thai and English from the image…");const G=await DS.createWorker("tha+eng");try{const X=(await G.recognize(f)).data.text.trim();T(X),k(X.split(/\r?\n/).map(V=>V.trim()).filter(V=>V.length>1).slice(0,12).map((V,P)=>P)),R("Reading complete. Review and edit the text before creating Test Cases.")}catch(E){R(E instanceof Error?E.message:"OCR failed.")}finally{await G.terminate(),H(!1)}}function ne(){const G=j.split(/\r?\n/).map(C=>C.trim()).filter(C=>C.length>1).slice(0,12),E=(O.length?O.map(C=>G[C]).filter(Boolean):G).slice(0,8),X="SCREENSHOT",V=new Set(o.map(C=>C.id));let P=1;const Q=()=>{let C=`TC-${X}-${String(P).padStart(3,"0")}`;for(;V.has(C);)C=`TC-${X}-${String(++P).padStart(3,"0")}`;return V.add(C),P++,C},D=E.slice(0,8).map(C=>({type:"assertText",text:C,description:A==="th"?`ตรวจสอบว่าหน้าเว็บแสดงข้อความ "${C}"`:`Verify that "${C}" is visible on the page`})),I={module:X,preconditions:A==="th"?["เปิดหน้าที่ต้องการตรวจสอบให้ตรงกับภาพอ้างอิง"]:["Open the page that matches the screenshot reference"],sourceUrl:a||m,priority:"medium",automationStatus:"needs-review",type:"validation",notes:A==="th"?`สร้างจากภาพ ${m||"อ้างอิง"} · โปรดตรวจทานก่อนนำไปใช้งานจริง`:`Created from ${m||"reference"} · Review before production use`},S=[];(x==="visual"||x==="manual")&&S.push({...I,id:Q(),title:A==="th"?`ตรวจสอบว่า ${w} แสดงผลตรงตามภาพอ้างอิง`:`${w} matches the screenshot reference`,steps:[{type:"navigate",url:a||"about:blank",description:A==="th"?"เปิดหน้าที่ต้องการตรวจสอบ":"Open the page to inspect"},{type:"manual",description:A==="th"?"เปรียบเทียบโครงร่าง ระยะห่าง สี และตำแหน่งขององค์ประกอบกับภาพอ้างอิง":"Compare layout, spacing, colors and element positions with the screenshot"}],expectedResult:A==="th"?"โครงร่างและองค์ประกอบที่มองเห็นบนหน้าเว็บตรงกับภาพอ้างอิง":"The page layout and visible elements match the screenshot reference."}),(x==="visual"||x==="text")&&S.push({...I,id:Q(),title:A==="th"?`ตรวจสอบข้อความสำคัญทั้งหมดบน ${w}`:`${w} shows all important text`,steps:D,expectedResult:A==="th"?"ข้อความสำคัญบนหน้าจอแสดงครบถ้วนและอ่านได้ชัดเจน":"Important on-screen text is complete and readable."}),c(S),h()}const se=j.split(/\r?\n/).map(G=>G.trim()).filter(G=>G.length>1).slice(0,12),q=O.length||se.length;return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:G=>G.target===G.currentTarget&&h(),children:r.jsxs("section",{className:"modern-modal screenshot-importer",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Create Test Cases from an image"}),r.jsx("h2",{children:"Screenshot → Test Case"}),r.jsx("p",{children:"Follow three steps to create Draft Test Cases for review."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:h,children:"×"})]}),r.jsxs("div",{className:"screenshot-import-body",children:[r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"1"}),r.jsxs("div",{children:[r.jsx("b",{children:"Choose a Test Case pattern"}),r.jsx("p",{children:"Pick the pattern that matches what you need to check."})]})]}),r.jsx("div",{className:"pattern-grid",children:zS.map(G=>r.jsxs("button",{type:"button",className:`pattern-card ${x===G.id?"is-selected":""}`,onClick:()=>y(G.id),children:[r.jsx("b",{children:G.title}),r.jsx("span",{children:G.description})]},G.id))}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"2"}),r.jsxs("div",{children:[r.jsx("b",{children:"Upload a Screenshot"}),r.jsx("p",{children:"PNG, JPG and WEBP are supported."})]})]}),r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:G=>ae(G.target.files?.[0])}),r.jsx("strong",{children:m||"Click to choose an image"}),r.jsx("span",{children:"or drop a file here"})]}),f&&r.jsxs("div",{className:"screenshot-preview",children:[r.jsx("img",{src:f,alt:"Screenshot preview"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:W,disabled:B,children:B?"Reading…":"Read text from image"})]}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"3"}),r.jsxs("div",{children:[r.jsx("b",{children:"Review text and create cases"}),r.jsx("p",{children:"You can edit OCR text before importing."})]})]}),r.jsxs("label",{className:"field-label",children:["Screen name",r.jsx("input",{className:"field mt-1",value:w,onChange:G=>v(G.target.value)})]}),r.jsxs("label",{className:"field-label",children:["Test Case language",r.jsxs("select",{className:"field mt-1",value:A,onChange:G=>{const E=G.target.value;N(E),localStorage.setItem(hv,E),s?.(E)},children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsxs("label",{className:"field-label",children:["Text detected",r.jsx("textarea",{className:"field screenshot-ocr",value:j,onChange:G=>{T(G.target.value),k([])},placeholder:"Read text from the image, or type it yourself"})]}),se.length>0&&r.jsxs("div",{className:"import-preview",children:[r.jsxs("b",{children:["Choose OCR lines to create assertions (",q," selected)"]}),r.jsx("table",{children:r.jsx("tbody",{children:se.map((G,E)=>{const X=O.length===0||O.includes(E);return r.jsxs("tr",{children:[r.jsx("td",{children:r.jsx("input",{type:"checkbox",checked:X,onChange:()=>k(V=>{const P=V.length===0?se.map((Q,D)=>D):V;return P.includes(E)?P.filter(Q=>Q!==E):[...P,E]})})}),r.jsx("td",{children:G})]},`${E}-${G}`)})})})]}),r.jsxs("div",{className:"import-summary",children:[r.jsx("b",{children:"Draft preview"}),r.jsxs("span",{children:[x==="visual"||x==="manual"?"1 visual comparison case":"",x==="visual"?" + ":"",x==="visual"||x==="text"?`1 text verification case with ${q} assertion(s)`:""]})]}),r.jsx("p",{className:"screenshot-status",children:M})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"mr-auto text-xs text-slate-500",children:["Results are marked ",r.jsx("b",{children:"needs-review"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ne,disabled:!j.trim()&&x!=="manual",children:"Create Draft Test Cases"})]})]})})}const LS=/^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;function BS(a){const l={},s={},o=a(),c=a.toString(),h=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).split(",").map(p=>p.trim());for(const p of h)if(!LS.test(p))throw new Error(`Invalid dependency name: ${p}`);let f=0;for(;f<o.length;){let p=h[f],m=o[f];typeof m=="function"?l[p]=$S(m,p):s[p]=m,f++}return{functions:l,variables:s}}function $S(a,l){const s=a.toString();if(a.prototype)if(s.indexOf("[native code]")>=0){const o=s.indexOf(" ",8)+1,c=s.indexOf("(",o);return s.slice(o,c)}else{let o=s;for(const c in a.prototype)o+=";"+l+".prototype."+c+"="+a.prototype[c].toString();return o}else return s}function HS(a,l,s,o,c,h){let f=!1,p;const m=()=>{p.stop()},g=(v,x)=>{try{p.ingest(v,x)}catch(y){throw m(),y}};return{start:(v,x)=>{if(f)throw new Error("Was started");f=!0;const y=c(),A=y&&y._,N=A||IS(l,v);A||h({_:N});const[j,T]=N;p=a(j,()=>{const M=c();if(M)return M.other},M=>{h(Object.assign(Object.assign({},c()),{other:M}))},s,o),T&&g(T,x)},stop:m,ingest:g}}const qS="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",GS=")(postMessage)}";function IS(a,l){const[s,o]=VS(l);return[s+";"+qS+a.toString()+GS,o]}function VS(a){let l={},s={};for(const c of a){const{functions:h,variables:f}=BS(c);l=Object.assign(Object.assign({},l),h),s=Object.assign(Object.assign({},s),f)}return[Object.keys(l).map(c=>c+"="+l[c]).join(";"),s]}function YS(a,l,s,o,c,h){let f=!1,p=!1,m=[];const g=void 0;let w=()=>[],v=()=>[],x,y;const A=X=>xg[X],N=(X,V)=>{xg[X]=V},j=()=>{if(!f)throw new Error("Not started")},T=()=>{if(f)throw new Error("Was started")},O=()=>{if(p)throw new Error("Was stopped")},k=()=>{if(x)throw new Error("Has alias")},M=X=>{if(typeof X!="function")throw new TypeError("Argument must be a function")};let R;if(typeof l=="string"){if(x=l,y=A(x),!y||!y.$)throw new Error("Not found");R=y.$[0],m=y.$[1],w=y.$[2],v=y.$[3],y.$[4]}else R=l;M(R);let B;const H=X=>{O(),T(),M(X),m.push(X)},ae=()=>{O(),T(),H(()=>[R,v,o]),f=!0,B.start(m,g)},W=()=>{p=!0,B.stop()},ne=X=>{B.ingest([Date.now(),X],w(...X))};let se;const q=Object.assign({inputLatency:se,outputLatency:se,addDependencies(X){k(),H(X)},inputTransferList:X=>{O(),T(),k(),M(X),w=X},outputTransferList:X=>{O(),T(),k(),M(X),v=X},alias(X){O(),T(),k(),x=X,N(x,{$:[R,m,w,v]})},start:ae,stop:W},s(ae,W,f,p,ne,j,T,O));return B=HS(a,X=>{let V=-1,P=-1;const D=o(R,I=>{X([V,P,Date.now(),I],v(I))});return([I,S])=>(V=I,P=Date.now(),D(S))},X=>{p||c(X)},([X,V,P,Q])=>{p||(X!==-1&&(q.inputLatency=V-X),q.outputLatency=Date.now()-P,h(Q))},()=>{if(x){const X=A(x);if(X)return X.other}},X=>{x&&N(x,Object.assign(Object.assign({},A(x)),{other:X}))}),q}const xg={};function FS(a,l){let s,o;return YS(a,l,(m,g,w,v,x,y,A,N)=>({call(...j){if(N(),y(),s||o)throw new Error("Previous call not finished");return new Promise((T,O)=>{s=T,o=O,x(j)})},callOnce(...j){return m(),this.call(...j).finally(g)}}),(m,g)=>{const w=v=>v!==null&&typeof v=="object"&&typeof v.then=="function";return v=>{const x=m(...v);w(x)?x.then(g):g(x)}},m=>{if(o)o(m),s=void 0,o=void 0;else throw new Error("`reject` callback not found")},m=>{if(s)s(m),s=void 0,o=void 0;else throw new Error("`resolve` callback not found")})}function PS(a,l,s,o,c){let h=l();h||(h=ZS(a),s(h));const f=new Worker(h);return f.onmessage=p=>{const m=p.data,g=m?m[pv]:void 0;if(g){const w=new Error(g[0]);w.stack=g[1];let v=2;for(;v<g.length;)w[g[v][0]]=g[v][1],v++;o(w),f.terminate()}else c(m)},{stop:f.terminate.bind(f),ingest:f.postMessage.bind(f)}}function ZS(a){return URL.createObjectURL(new Blob([a+";"+XS],{type:"text/javascript"}))}const pv="$err$",XS="self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({"+pv+':[err.message,err.stack].concat(Object.keys(err).map(function(k){return[k,err[k]]}))})};var postMessage = self.postMessage;addEventListener("error",function(evt) {onErr(evt.error, evt.message)});addEventListener("unhandledrejection",function(evt) {evt.preventDefault();onErr(evt.reason, String(evt.reason))})';function QS(a){return FS(PS,a)}function fd(a){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},fd(a)}function KS(a){var l=String.fromCharCode,s=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,c={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(c).forEach(function(O){c[O.toUpperCase()]=c[O]});function h(O,k,M,R){return R?s.call(c,R)?c[R]:"&"+R+";":l(k||parseInt(M,16))}function f(O){return O.length>3&&O.indexOf("&")!==-1?O.replace(o,h):O}var p="non-whitespace outside of root node";function m(O){return new Error(O)}function g(O){return"missing namespace for prefix <"+O+">"}function w(O){return{get:O,enumerable:!0}}function v(O){var k={},M;for(M in O)k[M]=O[M];return k}var x=Symbol("nameCache");function y(O){return O+"$uri"}function A(O){var k={},M,R;for(M in O)R=O[M],k[R]=R,k[y(R)]=M;return k}function N(){return{line:0,column:0}}function j(O){throw O}function T(O){if(!this)return new T(O);var k=O&&O.proxy,M,R,B,H,ae=j,W,ne,se,q,G=N,E=!1,X=!1,V="",P=!1,Q=!1,D=null,I=!1,S,C,$,K;function ie(oe){oe instanceof Error||(oe=m(oe)),D=oe,ae(oe,G)}function ye(oe){W&&(oe instanceof Error||(oe=m(oe)),W(oe,G))}this.on=function(oe,je){if(typeof je!="function")throw m("required args <name, cb>");switch(oe){case"openTag":R=je;break;case"text":M=je;break;case"closeTag":B=je;break;case"error":ae=je;break;case"warn":W=je;break;case"cdata":H=je;break;case"attention":q=je;break;case"question":se=je;break;case"comment":ne=je;break;default:throw m("unsupported event: "+oe)}return this},this.ns=function(oe){if(typeof oe>"u"&&(oe={}),fd(oe)!=="object")throw m("required args <nsMap={}>");var je={},Ee;for(Ee in oe)je[Ee]=oe[Ee];return Q=!0,K=je,this};function _e(){S=Q?[]:null,C=Q?A(K):null,$=[],G=N,I=!1,D=null,X=!1,V=""}this.parse=function(oe){if(typeof oe!="string")throw m("required args <xml=string>");if(E)throw m("parse during stream; call end() first");return _e(),Ne(oe),G=N,I=!1,D},this.write=function(oe){if(typeof oe!="string")throw m("required args <xml=string>");return E||(_e(),E=!0),D||(V=Ne(V+oe,!0)||""),this},this.end=function(){return E||_e(),E=!1,D||Ne(V),V="",G=N,I=!1,D},this.stop=function(){I=!0};function Ne(oe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=null,$e=null,He,_=0,Y=!1,re=!1,L=0,U=0,J,ge,he,te,xe,we,be,Te,qe,De="",ht=0,Nt;function Bt(Pe,Me){var At=Pe.indexOf(":");if(At===-1)return Pe;var xt=C[Pe.substring(0,At)];return xt?Me===xt?Pe.substr(At+1):xt+Pe.substr(At):(ye(g(Pe.substring(0,At))),null)}function Jt(){if(Nt!==null)return Nt;var Pe,Me,At=Q&&C.xmlns,xt=Q&&P?[]:null,Je=ht,et=De,St=et.length,zt,vt,Gt,$t,pt,Dn={},Hn=new Set,Ut,ze,Ge;e:for(;Je<St;Je++)if(Ut=!1,ze=et.charCodeAt(Je),!(ze===32||ze<14&&ze>8)){for((ze<65||ze>122||ze>90&&ze<97)&&ze!==95&&ze!==58&&(ye("illegal first char attribute name"),Ut=!0),Ge=Je+1;Ge<St;Ge++)if(ze=et.charCodeAt(Ge),!(ze>96&&ze<123||ze>64&&ze<91||ze>47&&ze<59||ze===46||ze===45||ze===95)){if(ze===32||ze<14&&ze>8){ye("missing attribute value"),Je=Ge;continue e}if(ze===61)break;ye("illegal attribute name char"),Ut=!0}if(pt=et.substring(Je,Ge),pt==="xmlns:xmlns"&&(ye("illegal declaration of xmlns"),Ut=!0),ze=et.charCodeAt(Ge+1),ze===34)Ge=et.indexOf('"',Je=Ge+2),Ge===-1&&(Ge=et.indexOf("'",Je),Ge!==-1&&(ye("attribute value quote missmatch"),Ut=!0));else if(ze===39)Ge=et.indexOf("'",Je=Ge+2),Ge===-1&&(Ge=et.indexOf('"',Je),Ge!==-1&&(ye("attribute value quote missmatch"),Ut=!0));else for(ye("missing attribute value quotes"),Ut=!0,Ge=Ge+1;Ge<St&&(ze=et.charCodeAt(Ge+1),!(ze===32||ze<14&&ze>8));Ge++);for(Ge===-1&&(ye("missing closing quotes"),Ge=St,Ut=!0),Ut||(Gt=et.substring(Je,Ge)),Je=Ge;Ge+1<St&&(ze=et.charCodeAt(Ge+1),!(ze===32||ze<14&&ze>8));Ge++)Je===Ge&&(ye("illegal character after attribute end"),Ut=!0);if(Je=Ge+1,Ut)continue e;if(Hn.has(pt)){ye("attribute <"+pt+"> already defined");continue}if(Hn.add(pt),!Q){Dn[pt]=Gt;continue}if(P){if(vt=pt==="xmlns"?"xmlns":pt.charCodeAt(0)===120&&pt.substr(0,6)==="xmlns:"?pt.substr(6):null,vt!==null){if(Pe=f(Gt),Me=y(vt),$t=K[Pe],!$t){if(vt==="xmlns"||Me in C&&C[Me]!==Pe)do $t="ns"+_++;while(typeof C[$t]<"u");else $t=vt;K[Pe]=$t}C[vt]!==$t&&(zt||(C=v(C),zt=!0),C[vt]=$t,vt==="xmlns"&&(C[y($t)]=Pe,At=$t),C[Me]=Pe),Dn[pt]=Gt;continue}xt.push(pt,Gt);continue}pt=Bt(pt,At),pt!==null&&(Dn[pt]=Gt)}if(P)for(Je=0,St=xt.length;Je<St;Je++)pt=Bt(xt[Je++],At),Gt=xt[Je],pt!==null&&(Dn[pt]=Gt);return Nt=Dn}function Xe(){for(var Pe=/(\r\n|\r|\n)/g,Me=0,At=0,xt=0,Je=U,et,St;L>=xt&&(et=Pe.exec(oe),!(!et||(Je=et[0].length+et.index,Je>L)));)Me+=1,xt=Je;return L==-1?(At=Je,St=oe.substring(U)):U===0?St=oe.substring(U,L):(At=L-xt,St=U==-1?oe.substring(L):oe.substring(L,U+1)),{data:St,line:Me,column:At}}for(G=Xe,k&&(qe=Object.create({},{name:w(function(){return be}),originalName:w(function(){return Te}),attrs:w(Jt),ns:w(function(){return C})}));U!==-1;){if(oe.charCodeAt(U)===60?L=U:L=oe.indexOf("<",U),L===-1){if(je)return oe.substring(U);if($.length)return ie("unexpected end of file");if(!X)return ie("missing start tag");U<oe.length&&oe.substring(U).trim()&&ye(p);return}if(X||(X=!0),U!==L){if($.length){if(M&&(M(oe.substring(U,L),f,G),I))return}else if(oe.substring(U,L).trim()&&(ye(p),I))return}if(te=oe.charCodeAt(L+1),te===33){if(he=oe.charCodeAt(L+2),he===91&&oe.substr(L+3,6)==="CDATA["){if(U=oe.indexOf("]]>",L),U===-1)return je?oe.substring(L):ie("unclosed cdata");if(H&&(H(oe.substring(L+9,U),G),I))return;U+=3;continue}if(he===45&&oe.charCodeAt(L+3)===45){if(U=oe.indexOf("-->",L),U===-1)return je?oe.substring(L):ie("unclosed comment");if(ne&&(ne(oe.substring(L+4,U),f,G),I))return;U+=3;continue}}if(te===63){if(U=oe.indexOf("?>",L),U===-1)return je?oe.substring(L):ie("unclosed question");if(se&&(se(oe.substring(L,U+2),G),I))return;U+=2;continue}for(J=L+1;;J++){if(xe=oe.charCodeAt(J),isNaN(xe))return je?oe.substring(L):(U=-1,ie("unclosed tag"));if(xe===34)he=oe.indexOf('"',J+1),J=he!==-1?he:J;else if(xe===39)he=oe.indexOf("'",J+1),J=he!==-1?he:J;else if(xe===62){U=J;break}}if(te===33){if(q&&(q(oe.substring(L,U+1),f,G),I))return;U+=1;continue}if(Nt={},te===47){if(Y=!1,re=!0,!$.length)return ie("missing open tag");if(J=be=$.pop(),he=L+2+J.length,oe.substring(L+2,he)!==J)return ie("closing tag mismatch");for(;he<U;he++)if(te=oe.charCodeAt(he),!(te===32||te>8&&te<14))return ie("close tag")}else{if(oe.charCodeAt(U-1)===47?(J=be=oe.substring(L+1,U-1),Y=!0,re=!0):(J=be=oe.substring(L+1,U),Y=!0,re=!1),!(te>96&&te<123||te>64&&te<91||te===95||te===58))return ie("illegal first char nodeName");for(he=1,ge=J.length;he<ge;he++)if(te=J.charCodeAt(he),!(te>96&&te<123||te>64&&te<91||te>47&&te<59||te===45||te===95||te==46)){if(te===32||te<14&&te>8){be=J.substring(0,he),Nt=null;break}return ie("invalid nodeName")}re||$.push(be)}if(Q){He=C,Y&&(re||S.push(He),Nt===null&&(P=J.indexOf("xmlns",he)!==-1)&&(ht=he,De=J,Jt(),P=!1)),Te=be,$e!==C&&(Ee=C[x],Ee===void 0&&(Ee=C[x]={}),$e=C);var ut=Ee[be];if(ut!==void 0)be=ut;else{if(te=be.indexOf(":"),te!==-1){if(we=C[be.substring(0,te)],!we)return ie("missing namespace on <"+Te+">");be=be.substr(te+1)}else we=C.xmlns;we&&(be=we+":"+be),Ee[Te]=be}}if(Y&&(ht=he,De=J,R&&(k?R(qe,f,re,G):R(be,Jt,f,re,G),I)))return;if(re){if(B&&(B(k?qe:be,f,Y,G),I))return;Q&&(Y?C=He:C=S.pop())}U+=1}}}return new T(a)}function JS(a,l,s,o){var c=!1,h=function(){if(c)throw new Error("Errored")},f,p=new KS,m=function(x){h(),p.write(x)},g=function(){h(),p.end(),f()},w=new Promise(function(v,x){f=v;var y=function(O){throw c=!0,O},A=function(O,k){o&&o(k(O),a)},N=function(O,k,M,R,B){if(l){var H=k();for(var ae in H)H[td(ae,!0)]=M(H[ae]);l(td(O),H,a)}},j=function(O){s&&s(td(O),a)};p.on("error",y),p.on("text",A),p.on("openTag",N),p.on("closeTag",j)});return{promise:w,write:m,end:g}}function td(a,l){for(var s=0;s<a.length;){if(a[s]===":"&&!(l&&s===5&&a.slice(0,5)==="xmlns"))return a.slice(s+1);s++}return a}function hd(a){"@babel/helpers - typeof";return hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},hd(a)}function WS(a,l,s){return Object.defineProperty(a,"prototype",{writable:!1}),a}function ej(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function tj(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(l&&l.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),l&&tl(a,l)}function nj(a){var l=mv();return function(){var o=nl(a),c;if(l){var h=nl(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return aj(this,c)}}function aj(a,l){if(l&&(hd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rj(a)}function rj(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function pd(a){var l=typeof Map=="function"?new Map:void 0;return pd=function(o){if(o===null||!ij(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Hs(o,arguments,nl(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),tl(c,o)},pd(a)}function Hs(a,l,s){return mv()?Hs=Reflect.construct.bind():Hs=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&tl(g,f.prototype),g},Hs.apply(null,arguments)}function mv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ij(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function tl(a,l){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},tl(a,l)}function nl(a){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},nl(a)}var Wi=(function(a){tj(s,a);var l=nj(s);function s(o){var c;return ej(this,s),c=l.call(this,o),c.name="InvalidSpreadsheetError",c}return WS(s)})(pd(Error));function lj(a,l,s,o,c,h){var f=JS(l,s,o,c);return h?p(f,a,h):(f.write(a),f.end()),f.promise.then(function(m){return m},function(m){var g=new Wi(m.message);throw g.stack=m.stack,g.cause=m,g});function p(m,g,w,v){var x=7,y=64*1024,A=y,N=function(){var O=Date.now();if(g.length>A){m.write(g.slice(0,A)),w&&w(!1),g=g.slice(A);var k=Date.now()-O;return k<x*.5?A*=2:k>x&&(A/=2),!0}else return m.write(g),m.end(),w&&w(!0),!1},j=function T(){N()&&T()};j()}}var Sg={},sj=(function(a,l,s,o,c){var h=new Worker(Sg[l]||(Sg[l]=URL.createObjectURL(new Blob([a+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return h.onmessage=function(f){var p=f.data,m=p.$e$;if(m){var g=new Error(m[0]);g.code=m[1],g.stack=m[2],c(g,null)}else c(null,p)},h.postMessage(s,o),h}),Kt=Uint8Array,rr=Uint16Array,gv=Int32Array,Cd=new Kt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Rd=new Kt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),vv=new Kt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yv=function(a,l){for(var s=new rr(31),o=0;o<31;++o)s[o]=l+=1<<a[o-1];for(var c=new gv(s[30]),o=1;o<30;++o)for(var h=s[o];h<s[o+1];++h)c[h]=h-s[o]<<5|o;return{b:s,r:c}},bv=yv(Cd,2),kd=bv.b,oj=bv.r;kd[28]=258,oj[258]=28;var uj=yv(Rd,0),xv=uj.b,Qs=new rr(32768);for(var ft=0;ft<32768;++ft){var Da=(ft&43690)>>1|(ft&21845)<<1;Da=(Da&52428)>>2|(Da&13107)<<2,Da=(Da&61680)>>4|(Da&3855)<<4,Qs[ft]=((Da&65280)>>8|(Da&255)<<8)>>1}var Xr=(function(a,l,s){for(var o=a.length,c=0,h=new rr(l);c<o;++c)a[c]&&++h[a[c]-1];var f=new rr(l);for(c=1;c<l;++c)f[c]=f[c-1]+h[c-1]<<1;var p;if(s){p=new rr(1<<l);var m=15-l;for(c=0;c<o;++c)if(a[c])for(var g=c<<4|a[c],w=l-a[c],v=f[a[c]-1]++<<w,x=v|(1<<w)-1;v<=x;++v)p[Qs[v]>>m]=g}else for(p=new rr(o),c=0;c<o;++c)a[c]&&(p[c]=Qs[f[a[c]-1]++]>>15-a[c]);return p}),gl=new Kt(288);for(var ft=0;ft<144;++ft)gl[ft]=8;for(var ft=144;ft<256;++ft)gl[ft]=9;for(var ft=256;ft<280;++ft)gl[ft]=7;for(var ft=280;ft<288;++ft)gl[ft]=8;var Sv=new Kt(32);for(var ft=0;ft<32;++ft)Sv[ft]=5;var jv=Xr(gl,9,1),wv=Xr(Sv,5,1),qs=function(a){for(var l=a[0],s=1;s<a.length;++s)a[s]>l&&(l=a[s]);return l},En=function(a,l,s){var o=l/8|0;return(a[o]|a[o+1]<<8)>>(l&7)&s},Gs=function(a,l){var s=l/8|0;return(a[s]|a[s+1]<<8|a[s+2]<<16)>>(l&7)},_v=function(a){return(a+7)/8|0},oo=function(a,l,s){return(l==null||l<0)&&(l=0),(s==null||s>a.length)&&(s=a.length),new Kt(a.subarray(l,s))},Nv=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Xt=function(a,l,s){var o=new Error(l||Nv[a]);if(o.code=a,Error.captureStackTrace&&Error.captureStackTrace(o,Xt),!s)throw o;return o},Ev=function(a,l,s,o){var c=a.length,h=o?o.length:0;if(!c||l.f&&!l.l)return s||new Kt(0);var f=!s,p=f||l.i!=2,m=l.i;f&&(s=new Kt(c*3));var g=function(Ee){var $e=s.length;if(Ee>$e){var He=new Kt(Math.max($e*2,Ee));He.set(s),s=He}},w=l.f||0,v=l.p||0,x=l.b||0,y=l.l,A=l.d,N=l.m,j=l.n,T=c*8;do{if(!y){w=En(a,v,1);var O=En(a,v+1,3);if(v+=3,O)if(O==1)y=jv,A=wv,N=9,j=5;else if(O==2){var B=En(a,v,31)+257,H=En(a,v+10,15)+4,ae=B+En(a,v+5,31)+1;v+=14;for(var W=new Kt(ae),ne=new Kt(19),se=0;se<H;++se)ne[vv[se]]=En(a,v+se*3,7);v+=H*3;for(var q=qs(ne),G=(1<<q)-1,E=Xr(ne,q,1),se=0;se<ae;){var X=E[En(a,v,G)];v+=X&15;var k=X>>4;if(k<16)W[se++]=k;else{var V=0,P=0;for(k==16?(P=3+En(a,v,3),v+=2,V=W[se-1]):k==17?(P=3+En(a,v,7),v+=3):k==18&&(P=11+En(a,v,127),v+=7);P--;)W[se++]=V}}var Q=W.subarray(0,B),D=W.subarray(B);N=qs(Q),j=qs(D),y=Xr(Q,N,1),A=Xr(D,j,1)}else Xt(1);else{var k=_v(v)+4,M=a[k-4]|a[k-3]<<8,R=k+M;if(R>c){m&&Xt(0);break}p&&g(x+M),s.set(a.subarray(k,R),x),l.b=x+=M,l.p=v=R*8,l.f=w;continue}if(v>T){m&&Xt(0);break}}p&&g(x+131072);for(var I=(1<<N)-1,S=(1<<j)-1,C=v;;C=v){var V=y[Gs(a,v)&I],$=V>>4;if(v+=V&15,v>T){m&&Xt(0);break}if(V||Xt(2),$<256)s[x++]=$;else if($==256){C=v,y=null;break}else{var K=$-254;if($>264){var se=$-257,ie=Cd[se];K=En(a,v,(1<<ie)-1)+kd[se],v+=ie}var ye=A[Gs(a,v)&S],_e=ye>>4;ye||Xt(3),v+=ye&15;var D=xv[_e];if(_e>3){var ie=Rd[_e];D+=Gs(a,v)&(1<<ie)-1,v+=ie}if(v>T){m&&Xt(0);break}p&&g(x+131072);var Ne=x+K;if(x<D){var oe=h-D,je=Math.min(D,Ne);for(oe+x<0&&Xt(3);x<je;++x)s[x]=o[oe+x]}for(;x<Ne;++x)s[x]=s[x-D]}}l.l=y,l.p=C,l.b=x,l.f=w,y&&(w=1,l.m=N,l.d=A,l.n=j)}while(!w);return x!=s.length&&f?oo(s,0,x):s.subarray(0,x)},cj=new Kt(0),dj=function(a,l){var s={};for(var o in a)s[o]=a[o];for(var o in l)s[o]=l[o];return s},jg=function(a,l,s){for(var o=a(),c=a.toString(),h=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).replace(/\s+/g,"").split(","),f=0;f<o.length;++f){var p=o[f],m=h[f];if(typeof p=="function"){l+=";"+m+"=";var g=p.toString();if(p.prototype)if(g.indexOf("[native code]")!=-1){var w=g.indexOf(" ",8)+1;l+=g.slice(w,g.indexOf("(",w))}else{l+=g;for(var v in p.prototype)l+=";"+m+".prototype."+v+"="+p.prototype[v].toString()}else l+=g}else s[m]=p}return l},Bs=[],fj=function(a){var l=[];for(var s in a)a[s].buffer&&l.push((a[s]=new a[s].constructor(a[s])).buffer);return l},hj=function(a,l,s,o){if(!Bs[s]){for(var c="",h={},f=a.length-1,p=0;p<f;++p)c=jg(a[p],c,h);Bs[s]={c:jg(a[f],c,h),e:h}}var m=dj({},Bs[s].e);return sj(Bs[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+l.toString()+"}",s,m,fj(m),o)},pj=function(){return[Kt,rr,gv,Cd,Rd,vv,kd,xv,jv,wv,Qs,Nv,Xr,qs,En,Gs,_v,oo,Xt,Ev,Dd,Tv,Ov]},Tv=function(a){return postMessage(a,[a.buffer])},Ov=function(a){return a&&{out:a.size&&new Kt(a.size),dictionary:a.dictionary}},mj=function(a,l,s,o,c,h){var f=hj(s,o,c,function(p,m){f.terminate(),h(p,m)});return f.postMessage([a,l],l.consume?[a.buffer]:[]),function(){f.terminate()}},Bn=function(a,l){return a[l]|a[l+1]<<8},Tn=function(a,l){return(a[l]|a[l+1]<<8|a[l+2]<<16|a[l+3]<<24)>>>0},nd=function(a,l){return Tn(a,l)+Tn(a,l+4)*4294967296};function gj(a,l,s){return s||(s=l,l={}),typeof s!="function"&&Xt(7),mj(a,l,[pj],function(o){return Tv(Dd(o.data[0],Ov(o.data[1])))},1,s)}function Dd(a,l){return Ev(a,{i:2},l&&l.out,l&&l.dictionary)}var md=typeof TextDecoder<"u"&&new TextDecoder,vj=0;try{md.decode(cj,{stream:!0}),vj=1}catch{}var yj=function(a){for(var l="",s=0;;){var o=a[s++],c=(o>127)+(o>223)+(o>239);if(s+c>a.length)return{s:l,r:oo(a,s-1)};c?c==3?(o=((o&15)<<18|(a[s++]&63)<<12|(a[s++]&63)<<6|a[s++]&63)-65536,l+=String.fromCharCode(55296|o>>10,56320|o&1023)):c&1?l+=String.fromCharCode((o&31)<<6|a[s++]&63):l+=String.fromCharCode((o&15)<<12|(a[s++]&63)<<6|a[s++]&63):l+=String.fromCharCode(o)}};function Av(a,l){if(l){for(var s="",o=0;o<a.length;o+=16384)s+=String.fromCharCode.apply(null,a.subarray(o,o+16384));return s}else{if(md)return md.decode(a);var c=yj(a),h=c.s,s=c.r;return s.length&&Xt(8),h}}var bj=function(a,l){return l+30+Bn(a,l+26)+Bn(a,l+28)},xj=function(a,l,s){var o=Bn(a,l+28),c=Bn(a,l+30),h=Av(a.subarray(l+46,l+46+o),!(Bn(a,l+8)&2048)),f=l+46+o,p=Sj(a,f,c,s,Tn(a,l+20),Tn(a,l+24),Tn(a,l+42)),m=p[0],g=p[1],w=p[2];return[Bn(a,l+10),m,g,h,f+c+Bn(a,l+32),w]},Sj=function(a,l,s,o,c,h,f){var p=c==4294967295,m=h==4294967295,g=f==4294967295,w=l+s,v=p+m+g;if(o&&v){for(;l+4<w;l+=4+Bn(a,l+2))if(Bn(a,l)==1)return[p?nd(a,l+4+8*m):c,m?nd(a,l+4):h,g?nd(a,l+4+8*(m+p)):f,1];o<2&&Xt(13)}return[c,h,f,0]},wg=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(a){a()};function jj(a,l,s){s||(s=l,l={}),typeof s!="function"&&Xt(7);var o=[],c=function(){for(var j=0;j<o.length;++j)o[j]()},h={},f=function(j,T){wg(function(){s(j,T)})};wg(function(){f=s});for(var p=a.length-22;Tn(a,p)!=101010256;--p)if(!p||a.length-p>65558)return f(Xt(13,0,1),null),c;var m=Bn(a,p+8);if(m){var g=m,w=Tn(a,p+16),v=Tn(a,p-20)==117853008;if(v){var x=Tn(a,p-12);v=Tn(a,x)==101075792,v&&(g=m=Tn(a,x+32),w=Tn(a,x+48))}for(var y=l&&l.filter,A=function(j){var T=xj(a,w,v),O=T[0],k=T[1],M=T[2],R=T[3],B=T[4],H=T[5],ae=bj(a,H);w=B;var W=function(se,q){se?(c(),f(se,null)):(q&&(h[R]=q),--m||f(null,h))};if(!y||y({name:R,size:k,originalSize:M,compression:O}))if(!O)W(null,oo(a,ae,ae+k));else if(O==8){var ne=a.subarray(ae,ae+k);if(M<524288||k>.8*M)try{W(null,Dd(ne,{out:new Kt(M)}))}catch(se){W(se,null)}else o.push(gj(ne,{size:M},W))}else W(Xt(14,"unknown compression type "+O,1),null);else W(null,null)},N=0;N<g;++N)A(N)}else f(null,{});return c}function gd(a){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},gd(a)}function wj(a,l,s){return Object.defineProperty(a,"prototype",{writable:!1}),a}function _j(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function Nj(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(l&&l.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),l&&al(a,l)}function Ej(a){var l=Cv();return function(){var o=rl(a),c;if(l){var h=rl(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return Tj(this,c)}}function Tj(a,l){if(l&&(gd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oj(a)}function Oj(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function vd(a){var l=typeof Map=="function"?new Map:void 0;return vd=function(o){if(o===null||!Aj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Is(o,arguments,rl(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),al(c,o)},vd(a)}function Is(a,l,s){return Cv()?Is=Reflect.construct.bind():Is=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&al(g,f.prototype),g},Is.apply(null,arguments)}function Cv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Aj(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function al(a,l){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},al(a,l)}function rl(a){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},rl(a)}var Rv=(function(a){Nj(s,a);var l=Ej(s);function s(){return _j(this,s),l.apply(this,arguments)}return wj(s)})(vd(Error));function kv(a){var l=new Rv(a.message);return a.stack&&(l.stack=a.stack),Error.captureStackTrace&&Error.captureStackTrace(l,kv),l.cause=a,l}function Cj(a,l){return Rj(a,l,kj,!0)}function Rj(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=l.filter,o=arguments.length>2?arguments[2]:void 0;return o(new Uint8Array(a),{filter:function(h){return s?s({path:h.name}):!0}}).then(function(c){return c},function(c){throw Dj(c)?kv(c):c})}function kj(a){return new Promise(function(l,s){jj(a,function(o,c){o?s(o):l(c)})})}function Dj(a){return typeof a.code=="number"}function yd(a){"@babel/helpers - typeof";return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},yd(a)}function zj(a,l,s){return Object.defineProperty(a,"prototype",{writable:!1}),a}function Uj(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function Mj(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(l&&l.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),l&&il(a,l)}function Lj(a){var l=Dv();return function(){var o=ll(a),c;if(l){var h=ll(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return Bj(this,c)}}function Bj(a,l){if(l&&(yd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $j(a)}function $j(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function bd(a){var l=typeof Map=="function"?new Map:void 0;return bd=function(o){if(o===null||!Hj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Vs(o,arguments,ll(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),il(c,o)},bd(a)}function Vs(a,l,s){return Dv()?Vs=Reflect.construct.bind():Vs=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&il(g,f.prototype),g},Vs.apply(null,arguments)}function Dv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hj(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function il(a,l){return il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},il(a,l)}function ll(a){return ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},ll(a)}var qj={XLS_FILE_NOT_SUPPORTED:"You passed a legacy `.xls` file. Only `.xlsx` files are supported",FILE_NOT_SUPPORTED:"Doesn't look like an `.xlsx` file",INVALID_ZIP:"Couldn't unzip `.xlsx` file contents",NO_DATA:"No data"},Ks=(function(a){Mj(s,a);var l=Lj(s);function s(o,c){var h;return Uj(this,s),h=l.call(this,qj[o]||o),h.code=o,h.name="InvalidInputError",h.cause=c,h}return zj(s)})(bd(Error));function Gj(a){var l=a.path;return l.endsWith(".xml")||l.endsWith(".xml.rels")}var Ij=[80,75],zv=[208,207,17,224],Ys=[Ij,zv],Vj=Ys.indexOf(zv);function Yj(){var a,l=Fj(Ys),s=0;return function(o){if(isNaN(a)){var c;l=l.filter(function(h){if(o===Ys[h][s])return Ys[h].length===s+1&&(c=h),!0}),l.length===1?a=c:l.length===0&&(a=-1)}return s++,a}}function Fj(a){for(var l=[],s=0;s<a.length;)l.push(s),s++;return l}function Pj(a,l){var s=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s)return(s=s.call(a)).next.bind(s);if(Array.isArray(a)||(s=Zj(a))||l){s&&(a=s);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
43
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zj(a,l){if(a){if(typeof a=="string")return _g(a,l);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return _g(a,l)}}function _g(a,l){(l==null||l>a.length)&&(l=a.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=a[s];return o}function Xj(a){for(var l=Yj(),s=Pj(a),o;!(o=s()).done;){var c=o.value;if(Qj(c,l))return}Kj(a.length)}function Qj(a,l){var s=l(a);if(s!==void 0){if(s===Vj)throw new Ks("XLS_FILE_NOT_SUPPORTED");if(s<0)throw new Ks("FILE_NOT_SUPPORTED");return!0}}function Kj(a){throw new Ks(a===0?"NO_DATA":"FILE_NOT_SUPPORTED")}var Fs;function za(a){var l=Date.now(),s=typeof global<"u"?!!global.READ_EXCEL_FILE_CHECKPOINTS:typeof window<"u"?!!window.READ_EXCEL_FILE_CHECKPOINTS:!1;s&&(Fs&&console.log(" -",l-Fs,"ms"),console.log("*",a)),Fs=l}function Jj(){Fs=void 0}function Wj(a){return Jj(),za("unpack files"),a instanceof File||a instanceof Blob?a.arrayBuffer().then(Ng):Promise.resolve(a).then(Ng)}function Ng(a){return Xj(new Uint8Array(a)),Cj(a,{filter:Gj}).then(function(l){return l},function(l){throw l instanceof Rv?new Ks("INVALID_ZIP",l.cause):l})}function ew(a,l){var s=o();return l(a,s,h,null,null).then(function(){return c(s)});function o(){return{workbookPr:void 0,sheets:[]}}function c(f){return{epoch1904:f.workbookPr?f.workbookPr.epoch1904:!1,sheets:f.sheets}}function h(f,p,m){f==="workbookPr"?m.workbookPr||(m.workbookPr={epoch1904:p.date1904==="1"}):f==="sheet"&&p.name&&m.sheets.push({id:Number(p.sheetId),name:p.name,relationId:p.id})}}function tw(a,l){var s="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",o="http://purl.oclc.org/ooxml/officeDocument/relationships/",c=h();return l(a,c,p,null,null).then(function(){return c});function h(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function f(w){return w}function p(w,v,x){w==="Relationship"&&m(x,v.Id,v.Type,v.Target)}function m(w,v,x,y){switch(x){case s+"styles":case o+"styles":w.styles=g(y);break;case s+"sharedStrings":case o+"sharedStrings":w.sharedStrings=g(y);break;case s+"worksheet":case o+"worksheet":w.sheets[v]=g(y);break}}function g(w){return w[0]==="/"?w.slice(1):"xl/"+w}}function sl(a){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},sl(a)}var nw=["xfId"];function Eg(a,l){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Tg(a){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Eg(Object(s),!0).forEach(function(o){aw(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Eg(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function aw(a,l,s){return l=rw(l),l in a?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a}function rw(a){var l=iw(a,"string");return sl(l)==="symbol"?l:String(l)}function iw(a,l){if(sl(a)!=="object"||a===null)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var o=s.call(a,l);if(sl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(a)}function lw(a,l){if(a==null)return{};var s=sw(a,l),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(a);for(c=0;c<h.length;c++)o=h[c],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function sw(a,l){if(a==null)return{};var s={},o=Object.keys(a),c,h;for(h=0;h<o.length;h++)c=o[h],!(l.indexOf(c)>=0)&&(s[c]=a[c]);return s}function ow(a,l){var s=o();return l(a,s,h,f,null).then(function(){return c(s)});function o(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function c(m){return m.styles.map(function(g){if(g.xfId){var w=g.xfId,v=lw(g,nw);return Tg(Tg({},m.baseStyles[w]),v)}else return g})}function h(m,g,w){if(m==="numFmt")w.numberFormats[g.numFmtId]={id:Number(g.numFmtId),template:g.formatCode};else if(m==="cellStyleXfs")w.cellStyleXfs=!0;else if(m==="cellXfs")w.cellXfs=!0;else if(m==="xf"){if(w.cellStyleXfs)w.baseStyles.push(p(g));else if(w.cellXfs){var v=p(g,w.numberFormats);g.xfId&&(v.xfId=Number(g.xfId)),w.styles.push(v)}}}function f(m,g){m==="cellStyleXfs"?g.cellStyleXfs=!1:m==="cellXfs"&&(g.cellXfs=!1)}function p(m,g){var w={},v=m.numFmtId;return v&&(g&&g[v]?w.numberFormat=g[v]:w.numberFormat={id:Number(v)}),w}}function uw(a,l){var s=o();return l(a,s,h,f,p).then(function(){return c(s)});function o(){return{si:void 0,strings:[]}}function c(x){return x.strings}function h(x,y,A){x==="si"?A.si=m():A.si&&g(x,y,A.si)}function f(x,y){x==="si"?(y.strings.push(y.si.string),y.si=void 0):y.si&&w(x,y.si)}function p(x,y){y.si&&v(x,y.si)}function m(){return{t:!1,r:!1,rPh:!1,string:""}}function g(x,y,A){x==="t"?A.t=!0:x==="r"?A.r=!0:x==="rPh"&&(A.rPh=!0)}function w(x,y){x==="t"?y.t=!1:x==="r"?y.r=!1:x==="rPh"&&(y.rPh=!1)}function v(x,y){y.rPh||y.t&&(y.r?y.string+=x:y.string=x)}}function cw(a,l){var s=17,o=1,c=1,h=1440*60*1e3,f=365;l&&(a+=4*f+o+c);var p=o+c+70*f+s;return Math.floor((a-p)*h)}var dw=/^\[\$-[^\]]+\]/,fw=/;@$/,ad={};function hw(a){if(a in ad)return ad[a];a=a.toLowerCase(),a=a.replace(dw,""),a=a.replace(fw,"");var l=a.split(/\W+/),s=l.length===0?!1:l.every(function(o){return pw.indexOf(o)>=0});return ad[a]=s,s}var pw=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function mw(a,l,s){return a.numberFormat?!!(yw.indexOf(a.numberFormat.id)>=0||l&&a.numberFormat.template===l||s&&a.numberFormat.template&&hw(a.numberFormat.template)):!1}var gw=[14,15,16,17,18,19,20,21,22,45,46,47],rd=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Og=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],vw=[71,72,73,74,75,76,77,78,79,80,81],yw=gw.concat(rd).concat(Og.filter(function(a){return rd.indexOf(a)<0})).concat(vw.filter(function(a){return rd.indexOf(a)<0}).filter(function(a){return Og.indexOf(a)<0}));function bw(a,l){return ww(a)||jw(a,l)||Sw(a,l)||xw()}function xw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
44
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sw(a,l){if(a){if(typeof a=="string")return Ag(a,l);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Ag(a,l)}}function Ag(a,l){(l==null||l>a.length)&&(l=a.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=a[s];return o}function jw(a,l){var s=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(a)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function ww(a){if(Array.isArray(a))return a}var _w=null,Qr=[null,_w];function Nw(a,l,s,o,c){var h=bw(c,6),f=h[0],p=h[1],m=h[2],g=h[3],w=h[4],v=h[5];switch(a||"n"){case"str":return s===void 0?"VALUE_MISSING":s?["s",s]:Qr;case"inlineStr":return o===void 0?"VALUE_MISSING":["s",o];case"s":if(!s)return"VALUE_MISSING";var x=Number(s);return isNaN(x)||f[x]===void 0?"VALUE_INVALID":["s",f[x]];case"b":return s?s==="1"?["b",!0]:s==="0"?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return s?["e",s]:"VALUE_MISSING";case"d":if(!s)return Qr;var y=new Date(s);return isNaN(y.valueOf())?"VALUE_INVALID":["d",y.getTime()];case"n":if(!s)return Qr;if(l){var A=Number(l);if(isNaN(A)||p[A]===void 0)return"FORMAT_INVALID";if(mw(p[A],g,w)){var N=Number(s);return isNaN(N)?"VALUE_INVALID":["d",cw(N,m)]}}if(v)return["n",s];var j=Number(s);return isNaN(j)?"VALUE_INVALID":["n",j];default:return"TYPE_INVALID"}}function Cg(a){for(var l=0,s=0;s<a.length;){var o=a.charCodeAt(s);if(o>=48&&o<=57){var c=Number(a.slice(s));return isNaN(c)&&Rg(a),[c,l]}l*=26,l+=a.charCodeAt(s)-64,s++}Rg(a)}function Rg(a){throw new Error('<c r="'.concat(a,'">'))}function Ew(a,l){return Aw(a)||Ow(a,l)||Uv(a,l)||Tw()}function Tw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
45
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ow(a,l){var s=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(a)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function Aw(a){if(Array.isArray(a))return a}function Cw(a,l){var s=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s)return(s=s.call(a)).next.bind(s);if(Array.isArray(a)||(s=Uv(a))||l){s&&(a=s);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
46
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uv(a,l){if(a){if(typeof a=="string")return kg(a,l);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return kg(a,l)}}function kg(a,l){(l==null||l>a.length)&&(l=a.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=a[s];return o}var id=null;function Rw(a,l,s){var o=s.sharedStrings,c=s.styles,h=s.epoch1904,f=s.options,p=[o,c,h,f.dateFormat,f.smartDateParser!==!1,f.parseNumber],m=[],g=[],w=v();return l(a,w,O,k,M,T).then(function(){var Q=w.sheetData,D=Q.rowCount,I=Q.columnCount,S=Q.dataRowCount,C=Q.dataColumnCount;if(S<D&&(m=m.slice(0,S)),C<I)for(var $=0;$<m.length;)m[$].length>C&&(m[$]=m[$].slice(0,C)),$++;for(var K=Cw(m),ie;!(ie=K()).done;)for(var ye=ie.value;ye.length<C;)ye.push(id);return m});function v(){return{dimension:void 0,sheetData:void 0}}function x(Q){return Q.sheetData.rows}function y(Q,D){Q.sheetData.rowIndexShift+=Q.sheetData.rows.length-D.length,Q.sheetData.rows=D}function A(Q){return Q.sheetData.errors}function N(Q,D){Q.sheetData.errors=D}function j(Q){var D=Q.row,I=Q.column,S=Q.error;throw new Wi("<c/> at row ".concat(D,", col ").concat(I,": ").concat(S))}function T(Q){var D=x(w),I=A(w);if(Q)m=m.concat(D),g=g.concat(I),g.length>0&&j(g[0]);else if(D.length>1){var S=D.slice(0,-1);m=m.concat(S),g=g.concat(I),y(w,D.slice(-1)),N(w,[])}}function O(Q,D,I){Q==="dimension"?I.dimension=R(D.ref):Q==="sheetData"?I.sheetData=B():I.sheetData&&H(Q,D,I.sheetData)}function k(Q,D){D.sheetData&&ae(Q,D.sheetData)}function M(Q,D){D.sheetData&&W(Q,D.sheetData)}function R(Q){var D=Q.split(":").map(Cg);return D.length===1&&(D=[D[0],D[0]]),D}function B(){return{c:void 0,rows:[],row:void 0,rowNumber:void 0,rowIndexShift:0,cursor:[0,0],rowCount:0,columnCount:0,dataRowCount:0,dataColumnCount:0,errors:[]}}function H(Q,D,I){Q==="row"?(D.r&&(I.rowNumber=Number(D.r)),I.row=[]):Q==="c"?(I.c=E(),I.c.attributes=D):I.c&&X(Q,D,I.c)}function ae(Q,D){if(Q==="row"){if(D.rowNumber){var I=D.rowIndexShift+D.rows.length;if(D.rowNumber<=I)throw new Wi("Out-of-place <row/> number ".concat(D.rowNumber," follows <row/> number ").concat(I));for(;D.rowNumber>D.rowIndexShift+D.rows.length+1;)D.rows.push([])}D.rows.push(D.row),D.row.length>0&&(D.dataRowCount=D.rowNumber),D.rowNumber>D.rowCount&&(D.rowCount=D.rowNumber),D.row=void 0,D.rowNumber=void 0}else if(Q==="c"){var S=ne(D.c);if(S.row<D.cursor[0]||S.row===D.cursor[0]&&S.column<=D.cursor[1])throw new Wi("Out-of-place <c/> at row ".concat(S.row," col ").concat(S.column," follows <c/> at row ").concat(D.cursor[0]," col ").concat(D.cursor[1]));if(D.cursor[0]=S.row,D.cursor[1]=S.column,D.rowNumber||(D.rowNumber=S.row),S.error)j(S),D.errors.push(S);else if(S.value!==id){for(;S.column>D.row.length+1;)D.row.push(id);D.row.push(S.value),S.column>D.dataColumnCount&&(D.dataColumnCount=S.column)}S.column>D.columnCount&&(D.columnCount=S.column),D.c=void 0}else D.c&&V(Q,D.c)}function W(Q,D){D.c&&P(Q,D.c)}function ne(Q){var D=Q.attributes,I=Q.inlineString,S=Q.vText,C=Cg(D.r),$=Ew(C,2),K=$[0],ie=$[1],ye=se(D.t,D.s,S,I,p,f.trim!==!1);return typeof ye=="string"?{row:K,column:ie,error:ye}:{row:K,column:ie,value:G(ye[1],ye[0])}}function se(Q,D,I,S,C,$){var K=q(Q,D,I,S,C);return Array.isArray(K)&&K[0]==="s"&&($&&(K[1]=K[1].trim()),K[1]==="")?Qr:K}function q(Q,D,I,S,C){var $=Nw(Q,D,I,S,C);if($==="VALUE_MISSING")switch(Q||"n"){case"str":case"inlineStr":case"s":case"b":return Qr}return Q==="e"?Qr:$}function G(Q,D){return D==="n"?f.parseNumber?f.parseNumber(Q):Q:D==="d"?new Date(Q):Q}function E(){return{v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0}}function X(Q,D,I){Q==="v"?I.v=!0:Q==="is"?(I.is=!0,I.inlineString=""):Q==="t"?I.t=!0:Q==="r"?I.r=!0:Q==="rPh"&&(I.rPh=!0)}function V(Q,D){Q==="v"?(D.v=!1,D.vText||(D.vText="")):Q==="is"?D.is=!1:Q==="t"?D.t=!1:Q==="r"?D.r=!1:Q==="rPh"&&(D.rPh=!1)}function P(Q,D){D.v?D.vText=Q:D.is&&(D.rPh||D.t&&(D.r?D.inlineString+=Q:D.inlineString=Q))}}function kw(a){za("convert files to strings");for(var l={},s=0,o=Object.keys(a);s<o.length;s++){var c=o[s];l[c]=Dw(a[c])}return l}function Dw(a){return typeof TextDecoder<"u"?new TextDecoder().decode(a):Av(a)}function xd(a){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},xd(a)}function zw(a){return xd(a)==="object"&&typeof a.then=="function"}function Sd(a){"@babel/helpers - typeof";return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Sd(a)}function Uw(a,l,s){return Object.defineProperty(a,"prototype",{writable:!1}),a}function Mw(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function Lw(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(l&&l.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),l&&ol(a,l)}function Bw(a){var l=Mv();return function(){var o=ul(a),c;if(l){var h=ul(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return $w(this,c)}}function $w(a,l){if(l&&(Sd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hw(a)}function Hw(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function jd(a){var l=typeof Map=="function"?new Map:void 0;return jd=function(o){if(o===null||!qw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Ps(o,arguments,ul(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),ol(c,o)},jd(a)}function Ps(a,l,s){return Mv()?Ps=Reflect.construct.bind():Ps=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&ol(g,f.prototype),g},Ps.apply(null,arguments)}function Mv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qw(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function ol(a,l){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},ol(a,l)}function ul(a){return ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},ul(a)}var Dg=(function(a){Lw(s,a);var l=Bw(s);function s(o){var c;return Mw(this,s),c=l.call(this,o),c.name="SheetNotFoundError",c}return Uw(s)})(jd(Error));function cl(a){"@babel/helpers - typeof";return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},cl(a)}function Lv(a,l){var s=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s)return(s=s.call(a)).next.bind(s);if(Array.isArray(a)||(s=Gw(a))||l){s&&(a=s);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
47
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gw(a,l){if(a){if(typeof a=="string")return zg(a,l);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return zg(a,l)}}function zg(a,l){(l==null||l>a.length)&&(l=a.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=a[s];return o}function Ug(a,l){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Js(a){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Ug(Object(s),!0).forEach(function(o){Ws(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Ug(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function Ws(a,l,s){return l=Iw(l),l in a?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a}function Iw(a){var l=Vw(a,"string");return cl(l)==="symbol"?l:String(l)}function Vw(a,l){if(cl(a)!=="object"||a===null)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var o=s.call(a,l);if(cl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(a)}function Yw(a,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=kw(l);return za("parse spreadsheet info and file paths"),ld(Xw(),o,a).then(function(c){var h=c.spreadsheetInfo,f=c.filePaths;return za('parse "shared strings" and "styles"'),ld(Qw(f),o,a).then(function(p){var m=p.sharedStrings,g=p.styles,w=s.sheets?s.sheets.map(function(v){return Pw(v,h.sheets)}):h.sheets.map(function(v){return v.relationId});return za("parse sheet".concat(w.length===1?"":"s"," data")),ld(Kw(f,w,{sharedStrings:m,styles:g,epoch1904:h.epoch1904,options:s}),o,a).then(function(v){return za("end"),w.map(function(x){return{sheet:Zw(x,h.sheets),data:v[x]}})})})})}function Fw(a,l,s,o){return o&&o.parseNumber||(o=Js(Js({},o),{},{parseNumber:null})),Yw(l,s,o)}function Pw(a,l){if(typeof a=="string"){for(var s=Lv(l),o;!(o=s()).done;){var c=o.value;if(c.name===a)return c.relationId}throw new Dg('Sheet "'.concat(a,'" not found. Available sheets: ').concat(l.map(function(h){var f=h.name;return'"'.concat(f,'"')}).join(", ")))}else{if(a<=l.length)return l[a-1].relationId;throw new Dg("Sheet number out of bounds: ".concat(a,". Available sheets count: ").concat(l.length))}}function Zw(a,l){for(var s=Lv(l),o;!(o=s()).done;){var c=o.value;if(c.relationId===a)return c.name}throw new Error("Sheet relation ID not found: ".concat(a))}function Xw(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:tw},"xl/workbook.xml":{name:"spreadsheetInfo",parse:ew}}}function Qw(a){var l;return l={},Ws(l,a.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:uw,fallback:[]}),Ws(l,a.styles||"xl/styles.xml",{name:"styles",parse:ow,fallback:{}}),l}function Kw(a,l,s){return Object.keys(a.sheets).filter(function(o){return l.includes(o)}).reduce(function(o,c){return Js(Js({},o),{},Ws({},a.sheets[c],{name:c,parse:function(f,p){return Rw(f,p,s)}}))},{})}function ld(a,l,s){for(var o={},c=function(){var x=f[h],y=a[x];o[y.name]=l[x]===void 0?y.fallback===void 0?(function(){throw new Wi('"'.concat(x,'" file not found inside the `.xlsx` file'))})():y.fallback:y.parse(l[x],s)},h=0,f=Object.keys(a);h<f.length;h++)c();for(var p=[],m=function(){var x=w[g];zw(o[x])&&p.push(o[x].then(function(y){o[x]=y}))},g=0,w=Object.keys(o);g<w.length;g++)m();return p.length>0?Promise.all(p).then(function(){return o}):o}function wd(a){"@babel/helpers - typeof";return wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},wd(a)}function Jw(a,l,s){return Object.defineProperty(a,"prototype",{writable:!1}),a}function Ww(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function e2(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(l&&l.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),l&&dl(a,l)}function t2(a){var l=Bv();return function(){var o=fl(a),c;if(l){var h=fl(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return n2(this,c)}}function n2(a,l){if(l&&(wd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a2(a)}function a2(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _d(a){var l=typeof Map=="function"?new Map:void 0;return _d=function(o){if(o===null||!r2(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Zs(o,arguments,fl(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),dl(c,o)},_d(a)}function Zs(a,l,s){return Bv()?Zs=Reflect.construct.bind():Zs=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&dl(g,f.prototype),g},Zs.apply(null,arguments)}function Bv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function r2(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function dl(a,l){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},dl(a,l)}function fl(a){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},fl(a)}var $n=(function(a){e2(s,a);var l=t2(s);function s(o){var c;return Ww(this,s),c=l.call(this,"invalid"),c.reason=o,c}return Jw(s)})(_d(Error));function i2(a){if(typeof a=="string"){var l=a;if(a=Number(a),String(a)!==l)throw new $n("not_a_number")}if(typeof a!="number")throw new $n("not_a_number");if(isNaN(a))throw new $n("invalid_number");if(!isFinite(a))throw new $n("out_of_bounds");return a}function l2(a){if(typeof a=="string")return a;if(typeof a=="number"){if(isNaN(a))throw new $n("invalid_number");if(!isFinite(a))throw new $n("out_of_bounds");return String(a)}throw new $n("not_a_string")}function s2(a){if(typeof a=="boolean")return a;throw new $n("not_a_boolean")}function o2(a){if(a instanceof Date){if(isNaN(a.valueOf()))throw new $n("out_of_bounds");return a}throw new $n("not_a_date")}var u2={}.constructor;function $v(a){return a!=null&&a.constructor===u2}function Kr(a){"@babel/helpers - typeof";return Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Kr(a)}function c2(a,l){return qv(a)||d2(a,l)||zd(a,l)||Hv()}function d2(a,l){var s=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(a)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function f2(a){return qv(a)||h2(a)||zd(a)||Hv()}function Hv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
48
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h2(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function qv(a){if(Array.isArray(a))return a}function Mg(a,l){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function eo(a){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Mg(Object(s),!0).forEach(function(o){p2(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Mg(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function p2(a,l,s){return l=m2(l),l in a?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a}function m2(a){var l=g2(a,"string");return Kr(l)==="symbol"?l:String(l)}function g2(a,l){if(Kr(a)!=="object"||a===null)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var o=s.call(a,l);if(Kr(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(a)}function Gv(a,l){var s=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(s)return(s=s.call(a)).next.bind(s);if(Array.isArray(a)||(s=zd(a))||l){s&&(a=s);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
49
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zd(a,l){if(a){if(typeof a=="string")return Lg(a,l);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Lg(a,l)}}function Lg(a,l){(l==null||l>a.length)&&(l=a.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=a[s];return o}var to=null;function v2(a,l,s){za("parse sheet data using schema");for(var o=[],c=[],h=y2(a,l),f=0,p=Gv(h),m;!(m=p()).done;){var g=m.value,w=g.object,v=g.errors;v?c=c.concat(v.map(function(x){return eo(eo({},x),{},{row:f+1})})):o.push(w),f++}return za("end"),c.length>0?{errors:c}:{objects:o}}function y2(a,l,s){A2(l);var o=k2(),c=f2(a),h=c[0],f=c.slice(1);return f.map(function(p){return b2(p,l,h,o)})}function b2(a,l,s,o){var c={schema:l},h=Iv(a,c,void 0,s,o),f=h.value,p=h.isEmptyValue,m=h.errors,g=h.children,w={value:D2,isEmptyValue:p,errors:m,isRequired:void 0},v=Fv(c,f,p,m,g,w.isRequired,w.value,w.isEmptyValue,w.errors,s);return m||v?{errors:(m||[]).concat(v||[])}:{object:Yv(f,p,void 0,o)}}function x2(a,l,s,o,c){for(var h={},f=!0,p=[],m=[],g=0,w=Object.keys(l);g<w.length;g++){var v=w[g],x=Iv(a,l[v],Bg(v,s),o,c);x.errors?p=p.concat(x.errors):(h[v]=Yv(x.value,x.isEmptyValue,Bg(v,s),c),f&&!x.isEmptyValue&&(f=!1)),m.push(eo(eo({},x),{},{schemaEntry:l[v]}))}return p.length>0?{errors:p,children:m}:{value:h,isEmptyValue:f,children:m}}function Iv(a,l,s,o,c){var h=l.column?o.indexOf(l.column):void 0,f=l.column?h<0:void 0,p=l.column?f?{value:c.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:S2(a[h],l,h,c):x2(a,l.schema,s,o,c),m=p.value,g=p.isEmptyValue,w=p.errors,v=p.children;return w?{errors:w,children:v}:{value:m,isEmptyValue:g,children:v}}function S2(a,l,s,o){var c=j2(a,l,o),h=c.value,f=c.isEmptyValue,p=c.error,m=c.reason;if(p){var g=Pv({error:p,reason:m,column:l.column,columnIndex:s,valueType:l.type,value:a});return{errors:[g]}}return{value:h,isEmptyValue:f}}function j2(a,l,s){return a===void 0?{value:s.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:a===to?{value:s.propertyValueWhenCellIsEmpty,isEmptyValue:!0}:Array.isArray(l.type)?w2(a,l,s):Vv(a,l)}function w2(a,l,s){if(typeof a!="string")return{error:"not_a_string"};var o=!0,c=[],h=[],f=T2(a,s.separatorCharacter).map(function(p){if(!(c.length>0)){if(!p){c.push("invalid"),h.push("syntax");return}var m=Vv(p,l),g=m.value,w=m.isEmptyValue,v=m.error,x=m.reason;if(v){c.push(v),h.push(x);return}return o&&!w&&(o=!1),g}});return c.length>0?{error:c[0],reason:h[0]}:{value:f,isEmptyValue:o}}function Vv(a,l,s){if(a===to)return{value:a,isEmptyValue:!0};var o;if(l.type?o=N2(a,Array.isArray(l.type)?l.type[0]:l.type):o={value:a},o.error)return o;if(a===to)return{value:a,isEmptyValue:!0};if(l.oneOf){var c=_2(o.value,l.oneOf);if(c)return c}if(l.validate)try{l.validate(o.value)}catch(h){return{error:h.message}}return{value:o.value,isEmptyValue:C2(o.value)}}function _2(a,l){if(l.indexOf(a)<0)return{error:"invalid",reason:"unknown"}}function N2(a,l){switch(l){case String:return Xi(a,l2);case Number:return Xi(a,i2);case Date:return Xi(a,o2);case Boolean:return Xi(a,s2);default:if(typeof l!="function")throw new Error("Unsupported schema `type`: ".concat(l&&l.name||l));return Xi(a,l)}}function Xi(a,l){try{var s=l(a);return s===void 0?{value:to}:{value:s}}catch(c){var o={error:c.message};return c.reason&&(o.reason=c.reason),o}}function E2(a,l,s){for(var o=0,c="";s+o<a.length;){var h=a[s+o];if(h===l)return[c,o];c+=h,o++}return[c,o]}function T2(a,l){for(var s=[],o=0;o<a.length;){var c=E2(a,l,o),h=c2(c,2),f=h[0],p=h[1];o+=p+l.length,s.push(f.trim())}return s}function Yv(a,l,s,o){if(l){if($v(a))return o.transformEmptyObject(a,{path:s});if(Array.isArray(a))return o.transformEmptyArray(a,{path:s})}return a}function Bg(a,l){return"".concat(l?l+".":"").concat(a)}function Fv(a,l,s,o,c,h,f,p,m,g){var w=[],v=O2(a,h,f,p,m);if(v&&s&&w.push(Pv({error:"required",column:a.column,columnIndex:g.indexOf(a.column),valueType:a.type,value:l})),c)for(var x=Gv(c),y;!(y=x()).done;){var A=y.value,N=Fv(A.schemaEntry,A.value,A.isEmptyValue,A.errors,A.children,v,l,s,o,g);N&&(w=w.concat(N))}if(w.length>0)return w}function O2(a,l,s,o,c){return l===!1&&(o||c)?!1:a.required&&(typeof a.required=="boolean"?a.required:c?!1:a.required(s))}function Pv(a){var l=a.column,s=a.columnIndex,o=a.valueType,c=a.value,h=a.error,f=a.reason,p={error:h,column:l,columnIndex:s,value:c};return f&&(p.reason=f),o&&(p.type=o),p}function A2(a){for(var l=0,s=Object.keys(a);l<s.length;l++){var o=s[l],c=a[o];if(Kr(c.type)==="object"&&!Array.isArray(c.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!c.schema&&!c.column)throw new Error('"column" not defined for schema entry "'.concat(o,'".'))}Zv(a,void 0)}function Zv(a,l){if(l!==void 0&&l!==!1)throw new Error("In a schema, a nested object can have a `required` property but the only allowed value is `undefined` or `false`. Otherwise, a \"required\" error for a nested object would have to include a specific `column` title and a nested object doesn't have one. You've specified the following `required`: ".concat(l));for(var s=0,o=Object.keys(a);s<o.length;s++){var c=o[s];if($v(a[c].schema)){if(a[c].column)throw new Error("In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: ".concat(c,`. Schema:
50
- `).concat(JSON.stringify(a[c],null,2)));Zv(a[c].schema,a[c].required)}}}function C2(a){return a==null}var R2={propertyValueWhenColumnIsMissing:void 0,propertyValueWhenCellIsEmpty:null,transformEmptyObject:function(){return null},transformEmptyArray:function(){return null},separatorCharacter:","};function k2(a){return R2}var D2={};function hl(a){"@babel/helpers - typeof";return hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},hl(a)}var z2=["schema"];function $g(a,l){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Hg(a){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?$g(Object(s),!0).forEach(function(o){U2(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):$g(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function U2(a,l,s){return l=M2(l),l in a?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a}function M2(a){var l=L2(a,"string");return hl(l)==="symbol"?l:String(l)}function L2(a,l){if(hl(a)!=="object"||a===null)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var o=s.call(a,l);if(hl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(a)}function B2(a,l){if(a==null)return{};var s=$2(a,l),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(a);for(c=0;c<h.length;c++)o=h[c],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function $2(a,l){if(a==null)return{};var s={},o=Object.keys(a),c,h;for(h=0;h<o.length;h++)c=o[h],!(l.indexOf(c)>=0)&&(s[c]=a[c]);return s}function H2(a,l,s,o,c){var h={},f=h.schema,p=B2(h,z2);return Fw(a,l,s,Hg(Hg({},p),{},{sheets:[1]})).then(function(m){var g=m[0].data;return f?v2(g,f):g})}function q2(a,l,s){return Wj(a).then(function(o){return H2(QS,lj,o)})}function G2({existingCases:a,sourceUrl:l,onImport:s,onClose:o}){const[c,h]=F.useState(""),[f,p]=F.useState([]),[m,g]=F.useState(""),[w,v]=F.useState(!1);async function x(y){if(!(!y||w)){v(!0),g(""),h(y.name);try{const A=await I2(y),N=Y2(A,a,l);if(!N.length)throw new Error("No valid Test Cases were found. Check that the file contains TC_ID or Title.");p(N)}catch(A){p([]),g(A instanceof Error?A.message:"Could not read the file.")}finally{v(!1)}}}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:y=>y.target===y.currentTarget&&o(),children:r.jsxs("section",{className:"modern-modal import-testcase-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Import Test Cases"}),r.jsx("h2",{children:"Bring an existing suite into LazyScout"}),r.jsx("p",{children:"CSV, XLSX and JSON are supported. Fields are mapped automatically."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"import-testcase-body",children:[r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:".csv,.xlsx,.json",onChange:y=>{x(y.target.files?.[0])}}),r.jsx("strong",{children:w?"Reading file…":c||"Choose a CSV, XLSX or JSON file"}),r.jsx("span",{children:"Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result"})]}),m&&r.jsx("p",{className:"import-error",children:m}),f.length>0&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"import-summary",children:[r.jsxs("b",{children:[f.length," Test Cases ready to import"]}),r.jsx("span",{children:"Duplicate IDs are replaced with a new TC-IMPORT ID."})]}),r.jsxs("div",{className:"import-preview",children:[r.jsxs("table",{children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"TC ID"}),r.jsx("th",{children:"Folder"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Tags"}),r.jsx("th",{children:"Requirements"})]})}),r.jsx("tbody",{children:f.slice(0,10).map(y=>r.jsxs("tr",{children:[r.jsx("td",{children:y.id}),r.jsx("td",{children:y.folder??y.module}),r.jsx("td",{children:y.title}),r.jsx("td",{children:(y.tags??[]).join(", ")||"—"}),r.jsx("td",{children:(y.requirements??[]).join(", ")||"—"})]},y.id))})]}),f.length>10&&r.jsxs("p",{children:["Previewing 10 of ",f.length," Test Cases."]})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",disabled:!f.length,onClick:()=>{s(f),o()},children:["Import ",f.length||""," Test Cases"]})]})]})})}async function I2(a){const l=a.name.split(".").pop()?.toLowerCase();if(l==="json"){const s=JSON.parse(await a.text());return(Array.isArray(s)?s:s&&typeof s=="object"&&Array.isArray(s.testCases)?s.testCases:[]).filter(c=>!!c&&typeof c=="object")}if(l==="csv")return qg(V2(await a.text()));if(l==="xlsx")return qg(await q2(a));throw new Error("Supported formats are CSV, XLSX and JSON.")}function qg(a){const[l,...s]=a;if(!l)return[];const o=l.map(c=>String(c??"").trim());return s.filter(c=>c.some(h=>h!=null&&String(h).trim())).map(c=>Object.fromEntries(o.map((h,f)=>[h||`Column_${f+1}`,c[f]??""])))}function V2(a){const l=[];let s=[],o="",c=!1;const h=a.replace(/^\uFEFF/,"");for(let f=0;f<h.length;f++){const p=h[f];p==='"'?c&&h[f+1]==='"'?(o+='"',f++):c=!c:p===","&&!c?(s.push(o),o=""):(p===`
42
+ transfer`}),r.jsx("p",{className:"click-filter-help",children:"One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control."}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>c(Jm([...new Set([...n.keywords,...Kg])])),children:"Add suggested words"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>c(""),children:"Clear list"})]})]})]})}function yS({projectName:n,projectId:l,targetUrl:s,secrets:o,onSave:c,onClear:h,onClose:f,onSaveRecording:p,clickFilter:m,onChangeClickFilter:g}){const[w,v]=F.useState(o),[x,y]=F.useState(),[C,N]=F.useState(!1),[j,T]=F.useState(!1),[O,k]=F.useState(!1),M=(B,H)=>v(ae=>({...ae,[B]:H||void 0}));async function R(){if(l){N(!0);try{y(await a0(l))}catch{y(void 0)}finally{N(!1)}}}return F.useEffect(()=>{R()},[l]),r.jsx("div",{className:"modal-backdrop",role:"presentation",onMouseDown:B=>{B.target===B.currentTarget&&f()},children:r.jsxs("section",{className:"modal-card project-settings-modal",role:"dialog","aria-modal":"true","aria-labelledby":"project-settings-title",children:[r.jsxs("div",{className:"modal-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Project settings"}),r.jsx("h2",{id:"project-settings-title",children:"Test credentials"}),r.jsxs("p",{children:[n??"Current project"," · Used by Automation and Test API"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsxs("div",{className:"settings-notice",children:[r.jsx("b",{children:"Memory only"}),r.jsx("span",{children:"Values stay in this browser tab, are cleared on refresh and are never written to Test Cases or logs."})]}),r.jsxs("div",{className:"settings-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Email"}),r.jsx("input",{type:"email",value:w.email??"",onChange:B=>M("email",B.target.value),placeholder:"Test email",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Username"}),r.jsx("input",{value:w.username??"",onChange:B=>M("username",B.target.value),placeholder:"Test username",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Password"}),r.jsx("input",{type:"password",value:w.password??"",onChange:B=>M("password",B.target.value),placeholder:"Test password",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"API Token"}),r.jsx("input",{type:"password",value:w.apiToken??"",onChange:B=>M("apiToken",B.target.value),placeholder:"API token",autoComplete:"off"})]})]}),r.jsxs("p",{className:"settings-help",children:["Use ",r.jsx("code",{children:"{{TEST_PASSWORD}}"}),", ",r.jsx("code",{children:"{{TEST_EMAIL}}"}),", ",r.jsx("code",{children:"{{TEST_USERNAME}}"})," ","or ",r.jsx("code",{children:"{{API_TOKEN}}"})," in a Test Case. Values are passed to the runner only while it runs."]}),r.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[r.jsx("b",{children:"How to connect credentials to Guided Flow"}),r.jsxs("span",{children:["In a Fill step, leave Value empty and put ",r.jsx("code",{children:"TEST_USERNAME"}),", ",r.jsx("code",{children:"TEST_PASSWORD"}),", or"," ",r.jsx("code",{children:"TEST_EMAIL"})," in Value reference. LazyScout replaces the reference only during the run."]})]}),l&&s&&r.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[r.jsx("b",{children:"Google / SSO session"}),r.jsx("span",{children:"Open a separate LazyScout browser, sign in manually, then close that browser. Future Automation runs use this Project profile."}),r.jsxs("div",{className:"auth-session-status","aria-live":"polite",children:[r.jsx("span",{className:`auth-session-dot ${x?.cookieStoreDetected?"is-ready":x?.profileExists?"is-profile":""}`}),r.jsxs("div",{children:[r.jsx("b",{children:x?.cookieStoreDetected?"Browser profile saved":x?.profileExists?"Browser profile created — login not verified":"No saved browser profile yet"}),r.jsx("small",{children:x?.lastModifiedAt?`Last changed ${new Date(x.lastModifiedAt).toLocaleString()}`:"Open the login browser to create this Project profile."})]})]}),r.jsxs("div",{className:"auth-session-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:j,onClick:async()=>{T(!0);try{await n0(l,s),await R()}finally{T(!1)}},children:j?"Opening browser…":"Open login browser"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:C,onClick:()=>{R()},children:C?"Checking…":"Refresh session status"}),O?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>{await o0(l),k(!1),await R()},children:"Confirm clear"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>k(!1),children:"Cancel"})]}):r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>k(!0),children:"Clear saved session"})]}),r.jsxs("small",{className:"auth-session-hint",children:["Profile saved confirms that browser data exists. To verify Google / SSO is still valid, Scout the authenticated Start Path, such as ",r.jsx("code",{children:"/dashboard"}),"."]})]}),r.jsx(vS,{filter:m,onChange:g}),l&&s&&p&&r.jsx(mS,{projectId:l,targetUrl:s,onSaveRecording:p})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary mr-auto",onClick:()=>{h(),v({})},children:"Clear secrets"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:f,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{c(w),f()},children:"Save settings"})]})]})})}var Uc={exports:{}},Wm;function bS(){return Wm||(Wm=1,(function(n){var l=(function(s){var o=Object.prototype,c=o.hasOwnProperty,h=Object.defineProperty||function(D,I,S){D[I]=S.value},f,p=typeof Symbol=="function"?Symbol:{},m=p.iterator||"@@iterator",g=p.asyncIterator||"@@asyncIterator",w=p.toStringTag||"@@toStringTag";function v(D,I,S){return Object.defineProperty(D,I,{value:S,enumerable:!0,configurable:!0,writable:!0}),D[I]}try{v({},"")}catch{v=function(I,S,A){return I[S]=A}}function x(D,I,S,A){var $=I&&I.prototype instanceof k?I:k,K=Object.create($.prototype),ie=new V(A||[]);return h(K,"_invoke",{value:q(D,S,ie)}),K}s.wrap=x;function y(D,I,S){try{return{type:"normal",arg:D.call(I,S)}}catch(A){return{type:"throw",arg:A}}}var C="suspendedStart",N="suspendedYield",j="executing",T="completed",O={};function k(){}function M(){}function R(){}var B={};v(B,m,function(){return this});var H=Object.getPrototypeOf,ae=H&&H(H(P([])));ae&&ae!==o&&c.call(ae,m)&&(B=ae);var W=R.prototype=k.prototype=Object.create(B);M.prototype=R,h(W,"constructor",{value:R,configurable:!0}),h(R,"constructor",{value:M,configurable:!0}),M.displayName=v(R,w,"GeneratorFunction");function ne(D){["next","throw","return"].forEach(function(I){v(D,I,function(S){return this._invoke(I,S)})})}s.isGeneratorFunction=function(D){var I=typeof D=="function"&&D.constructor;return I?I===M||(I.displayName||I.name)==="GeneratorFunction":!1},s.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,R):(D.__proto__=R,v(D,w,"GeneratorFunction")),D.prototype=Object.create(W),D},s.awrap=function(D){return{__await:D}};function se(D,I){function S(K,ie,ye,_e){var Ne=y(D[K],D,ie);if(Ne.type==="throw")_e(Ne.arg);else{var oe=Ne.arg,je=oe.value;return je&&typeof je=="object"&&c.call(je,"__await")?I.resolve(je.__await).then(function(Ee){S("next",Ee,ye,_e)},function(Ee){S("throw",Ee,ye,_e)}):I.resolve(je).then(function(Ee){oe.value=Ee,ye(oe)},function(Ee){return S("throw",Ee,ye,_e)})}}var A;function $(K,ie){function ye(){return new I(function(_e,Ne){S(K,ie,_e,Ne)})}return A=A?A.then(ye,ye):ye()}h(this,"_invoke",{value:$})}ne(se.prototype),v(se.prototype,g,function(){return this}),s.AsyncIterator=se,s.async=function(D,I,S,A,$){$===void 0&&($=Promise);var K=new se(x(D,I,S,A),$);return s.isGeneratorFunction(I)?K:K.next().then(function(ie){return ie.done?ie.value:K.next()})};function q(D,I,S){var A=C;return function(K,ie){if(A===j)throw new Error("Generator is already running");if(A===T){if(K==="throw")throw ie;return Q()}for(S.method=K,S.arg=ie;;){var ye=S.delegate;if(ye){var _e=G(ye,S);if(_e){if(_e===O)continue;return _e}}if(S.method==="next")S.sent=S._sent=S.arg;else if(S.method==="throw"){if(A===C)throw A=T,S.arg;S.dispatchException(S.arg)}else S.method==="return"&&S.abrupt("return",S.arg);A=j;var Ne=y(D,I,S);if(Ne.type==="normal"){if(A=S.done?T:N,Ne.arg===O)continue;return{value:Ne.arg,done:S.done}}else Ne.type==="throw"&&(A=T,S.method="throw",S.arg=Ne.arg)}}}function G(D,I){var S=I.method,A=D.iterator[S];if(A===f)return I.delegate=null,S==="throw"&&D.iterator.return&&(I.method="return",I.arg=f,G(D,I),I.method==="throw")||S!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+S+"' method")),O;var $=y(A,D.iterator,I.arg);if($.type==="throw")return I.method="throw",I.arg=$.arg,I.delegate=null,O;var K=$.arg;if(!K)return I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,O;if(K.done)I[D.resultName]=K.value,I.next=D.nextLoc,I.method!=="return"&&(I.method="next",I.arg=f);else return K;return I.delegate=null,O}ne(W),v(W,w,"Generator"),v(W,m,function(){return this}),v(W,"toString",function(){return"[object Generator]"});function E(D){var I={tryLoc:D[0]};1 in D&&(I.catchLoc=D[1]),2 in D&&(I.finallyLoc=D[2],I.afterLoc=D[3]),this.tryEntries.push(I)}function X(D){var I=D.completion||{};I.type="normal",delete I.arg,D.completion=I}function V(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(E,this),this.reset(!0)}s.keys=function(D){var I=Object(D),S=[];for(var A in I)S.push(A);return S.reverse(),function $(){for(;S.length;){var K=S.pop();if(K in I)return $.value=K,$.done=!1,$}return $.done=!0,$}};function P(D){if(D){var I=D[m];if(I)return I.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var S=-1,A=function $(){for(;++S<D.length;)if(c.call(D,S))return $.value=D[S],$.done=!1,$;return $.value=f,$.done=!0,$};return A.next=A}}return{next:Q}}s.values=P;function Q(){return{value:f,done:!0}}return V.prototype={constructor:V,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(X),!D)for(var I in this)I.charAt(0)==="t"&&c.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=f)},stop:function(){this.done=!0;var D=this.tryEntries[0],I=D.completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var I=this;function S(_e,Ne){return K.type="throw",K.arg=D,I.next=_e,Ne&&(I.method="next",I.arg=f),!!Ne}for(var A=this.tryEntries.length-1;A>=0;--A){var $=this.tryEntries[A],K=$.completion;if($.tryLoc==="root")return S("end");if($.tryLoc<=this.prev){var ie=c.call($,"catchLoc"),ye=c.call($,"finallyLoc");if(ie&&ye){if(this.prev<$.catchLoc)return S($.catchLoc,!0);if(this.prev<$.finallyLoc)return S($.finallyLoc)}else if(ie){if(this.prev<$.catchLoc)return S($.catchLoc,!0)}else if(ye){if(this.prev<$.finallyLoc)return S($.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(D,I){for(var S=this.tryEntries.length-1;S>=0;--S){var A=this.tryEntries[S];if(A.tryLoc<=this.prev&&c.call(A,"finallyLoc")&&this.prev<A.finallyLoc){var $=A;break}}$&&(D==="break"||D==="continue")&&$.tryLoc<=I&&I<=$.finallyLoc&&($=null);var K=$?$.completion:{};return K.type=D,K.arg=I,$?(this.method="next",this.next=$.finallyLoc,O):this.complete(K)},complete:function(D,I){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&I&&(this.next=I),O},finish:function(D){for(var I=this.tryEntries.length-1;I>=0;--I){var S=this.tryEntries[I];if(S.finallyLoc===D)return this.complete(S.completion,S.afterLoc),X(S),O}},catch:function(D){for(var I=this.tryEntries.length-1;I>=0;--I){var S=this.tryEntries[I];if(S.tryLoc===D){var A=S.completion;if(A.type==="throw"){var $=A.arg;X(S)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(D,I,S){return this.delegate={iterator:P(D),resultName:I,nextLoc:S},this.method==="next"&&(this.arg=f),O}},s})(n.exports);try{regeneratorRuntime=l}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=l:Function("r","regeneratorRuntime = r")(l)}})(Uc)),Uc.exports}var Mc,eg;function Od(){return eg||(eg=1,Mc=(n,l)=>`${n}-${l}-${Math.random().toString(16).slice(3,8)}`),Mc}var Lc,tg;function cv(){if(tg)return Lc;tg=1;const n=Od();let l=0;return Lc=({id:s,action:o,payload:c={}})=>{let h=s;return typeof h>"u"&&(h=n("Job",l),l+=1),{id:h,action:o,payload:c}},Lc}var Zi={},ng;function Cd(){if(ng)return Zi;ng=1;let n=!1;return Zi.logging=n,Zi.setLogging=l=>{n=l},Zi.log=(...l)=>n?console.log.apply(this,l):null,Zi}var Bc,ag;function xS(){if(ag)return Bc;ag=1;const n=cv(),{log:l}=Cd(),s=Od();let o=0;return Bc=()=>{const c=s("Scheduler",o),h={},f={};let p=[];o+=1;const m=()=>p.length,g=()=>Object.keys(h).length,w=()=>{if(p.length!==0){const N=Object.keys(h);for(let j=0;j<N.length;j+=1)if(typeof f[N[j]]>"u"){p[0](h[N[j]]);break}}},v=(N,j)=>new Promise((T,O)=>{const k=n({action:N,payload:j});p.push(async M=>{p.shift(),f[M.id]=k;try{T(await M[N].apply(this,[...j,k.id]))}catch(R){O(R)}finally{delete f[M.id],w()}}),l(`[${c}]: Add ${k.id} to JobQueue`),l(`[${c}]: JobQueue length=${p.length}`),w()});return{addWorker:N=>(h[N.id]=N,l(`[${c}]: Add ${N.id}`),l(`[${c}]: Number of workers=${g()}`),w(),N.id),addJob:async(N,...j)=>{if(g()===0)throw Error(`[${c}]: You need to have at least one worker before adding jobs`);return v(N,j)},terminate:async()=>{Object.keys(h).forEach(async N=>{await h[N].terminate()}),p=[]},getQueueLen:m,getNumWorkers:g}},Bc}function Ki(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $c,rg;function SS(){return rg||(rg=1,$c=n=>{const l={};return typeof WorkerGlobalScope<"u"?l.type="webworker":typeof document=="object"?l.type="browser":typeof process=="object"&&typeof Ki=="function"&&(l.type="node"),typeof n>"u"?l:l[n]}),$c}var Hc,ig;function jS(){if(ig)return Hc;ig=1;const l=SS()("type")==="browser"?s=>new URL(s,window.location.href).href:s=>s;return Hc=s=>{const o={...s};return["corePath","workerPath","langPath"].forEach(c=>{s[c]&&(o[c]=l(o[c]))}),o},Hc}var qc,lg;function dv(){return lg||(lg=1,qc={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),qc}const wS="7.0.0",_S={version:wS};var Gc,sg;function NS(){return sg||(sg=1,Gc={workerBlobURL:!0,logger:()=>{}}),Gc}var Ic,og;function ES(){if(og)return Ic;og=1;const n=_S.version;return Ic={...NS(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${n}/dist/worker.min.js`},Ic}var Vc,ug;function TS(){return ug||(ug=1,Vc=({workerPath:n,workerBlobURL:l})=>{let s;if(Blob&&URL&&l){const o=new Blob([`importScripts("${n}");`],{type:"application/javascript"});s=new Worker(URL.createObjectURL(o))}else s=new Worker(n);return s}),Vc}var Yc,cg;function OS(){return cg||(cg=1,Yc=n=>{n.terminate()}),Yc}var Fc,dg;function CS(){return dg||(dg=1,Fc=(n,l)=>{n.onmessage=({data:s})=>{l(s)}}),Fc}var Pc,fg;function AS(){return fg||(fg=1,Pc=async(n,l)=>{n.postMessage(l)}),Pc}var Zc,hg;function RS(){if(hg)return Zc;hg=1;const n=s=>new Promise((o,c)=>{const h=new FileReader;h.onload=()=>{o(h.result)},h.onerror=({target:{error:{code:f}}})=>{c(Error(`File could not be read! Code=${f}`))},h.readAsArrayBuffer(s)}),l=async s=>{let o=s;if(typeof s>"u")return"undefined";if(typeof s=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(s)?o=atob(s.split(",")[1]).split("").map(c=>c.charCodeAt(0)):o=await(await fetch(s)).arrayBuffer();else if(typeof HTMLElement<"u"&&s instanceof HTMLElement)s.tagName==="IMG"&&(o=await l(s.src)),s.tagName==="VIDEO"&&(o=await l(s.poster)),s.tagName==="CANVAS"&&await new Promise(c=>{s.toBlob(async h=>{o=await n(h),c()})});else if(typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas){const c=await s.convertToBlob();o=await n(c)}else(s instanceof File||s instanceof Blob)&&(o=await n(s));return new Uint8Array(o)};return Zc=l,Zc}var Xc,pg;function kS(){if(pg)return Xc;pg=1;const n=ES(),l=TS(),s=OS(),o=CS(),c=AS(),h=RS();return Xc={defaultOptions:n,spawnWorker:l,terminateWorker:s,onMessage:o,send:c,loadImage:h},Xc}var Qc,mg;function fv(){if(mg)return Qc;mg=1;const n=jS(),l=cv(),{log:s}=Cd(),o=Od(),c=dv(),{defaultOptions:h,spawnWorker:f,terminateWorker:p,onMessage:m,loadImage:g,send:w}=kS();let v=0;return Qc=async(x="eng",y=c.LSTM_ONLY,C={},N={})=>{const j=o("Worker",v),{logger:T,errorHandler:O,...k}=n({...h,...C}),M={},R=typeof x=="string"?x.split("+"):x;let B=y,H=N;const ae=[c.DEFAULT,c.LSTM_ONLY].includes(y)&&!k.legacyCore;let W,ne;const se=new Promise((oe,je)=>{ne=oe,W=je}),q=oe=>{W(oe.message)};let G=f(k);G.onerror=q,v+=1;const E=({id:oe,action:je,payload:Ee})=>new Promise(($e,He)=>{s(`[${j}]: Start ${oe}, action=${je}`);const _=`${je}-${oe}`;M[_]={resolve:$e,reject:He},w(G,{workerId:j,jobId:oe,action:je,payload:Ee})}),X=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),V=oe=>E(l({id:oe,action:"load",payload:{options:{lstmOnly:ae,corePath:k.corePath,logging:k.logging}}})),P=(oe,je,Ee)=>E(l({id:Ee,action:"FS",payload:{method:"writeFile",args:[oe,je]}})),Q=(oe,je)=>E(l({id:je,action:"FS",payload:{method:"readFile",args:[oe,{encoding:"utf8"}]}})),D=(oe,je)=>E(l({id:je,action:"FS",payload:{method:"unlink",args:[oe]}})),I=(oe,je,Ee)=>E(l({id:Ee,action:"FS",payload:{method:oe,args:je}})),S=(oe,je)=>E(l({id:je,action:"loadLanguage",payload:{langs:oe,options:{langPath:k.langPath,dataPath:k.dataPath,cachePath:k.cachePath,cacheMethod:k.cacheMethod,gzip:k.gzip,lstmOnly:[c.DEFAULT,c.LSTM_ONLY].includes(B)&&!k.legacyLang}}})),A=(oe,je,Ee,$e)=>E(l({id:$e,action:"initialize",payload:{langs:oe,oem:je,config:Ee}})),$=(oe="eng",je,Ee,$e)=>{if(ae&&[c.TESSERACT_ONLY,c.TESSERACT_LSTM_COMBINED].includes(je))throw Error("Legacy model requested but code missing.");const He=je||B;B=He;const _=Ee||H;H=_;const re=(typeof oe=="string"?oe.split("+"):oe).filter(L=>!R.includes(L));return R.push(...re),re.length>0?S(re,$e).then(()=>A(oe,He,_,$e)):A(oe,He,_,$e)},K=(oe={},je)=>E(l({id:je,action:"setParameters",payload:{params:oe}})),ie=async(oe,je={},Ee={text:!0},$e)=>E(l({id:$e,action:"recognize",payload:{image:await g(oe),options:je,output:Ee}})),ye=async(oe,je)=>{if(ae)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return E(l({id:je,action:"detect",payload:{image:await g(oe)}}))},_e=async()=>(G!==null&&(p(G),G=null),Promise.resolve());m(G,({workerId:oe,jobId:je,status:Ee,action:$e,data:He})=>{const _=`${$e}-${je}`;if(Ee==="resolve")s(`[${oe}]: Complete ${je}`),M[_].resolve({jobId:je,data:He}),delete M[_];else if(Ee==="reject")if(M[_].reject(He),delete M[_],$e==="load"&&W(He),O)O(He);else throw Error(He);else Ee==="progress"&&T({...He,userJobId:je})});const Ne={id:j,worker:G,load:X,writeText:P,readText:Q,removeFile:D,FS:I,reinitialize:$,setParameters:K,recognize:ie,detect:ye,terminate:_e};return V().then(()=>S(x)).then(()=>A(x,y,N)).then(()=>ne(Ne)).catch(()=>{}),se},Qc}var Kc,gg;function DS(){if(gg)return Kc;gg=1;const n=fv();return Kc={recognize:async(o,c,h)=>{const f=await n(c,1,h);return f.recognize(o).finally(async()=>{await f.terminate()})},detect:async(o,c)=>{const h=await n("osd",0,c);return h.detect(o).finally(async()=>{await h.terminate()})}},Kc}var Jc,vg;function zS(){return vg||(vg=1,Jc={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}),Jc}var Wc,yg;function US(){return yg||(yg=1,Wc={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}),Wc}var ed,bg;function MS(){if(bg)return ed;bg=1,bS();const n=xS(),l=fv(),s=DS(),o=zS(),c=dv(),h=US(),{setLogging:f}=Cd();return ed={languages:o,OEM:c,PSM:h,createScheduler:n,createWorker:l,setLogging:f,...s},ed}var LS=MS();const BS=[{id:"visual",title:"Visual check",description:"Compare text, colors and layout with the image"},{id:"text",title:"Text check",description:"Create steps for text read from the image"},{id:"manual",title:"Manual checklist",description:"Create a checklist for a Tester to review"}],hv="lazyscout-test-case-language";function $S(){const n=localStorage.getItem(hv);return n==="th"||n==="en"?n:"en"}function HS({sourceUrl:n,initialLanguage:l,onLanguageChange:s,existingCases:o,onImport:c,onClose:h}){const[f,p]=F.useState(""),[m,g]=F.useState(""),[w,v]=F.useState("Screenshot screen"),[x,y]=F.useState("visual"),[C,N]=F.useState(l??$S),[j,T]=F.useState(""),[O,k]=F.useState([]),[M,R]=F.useState(""),[B,H]=F.useState(!1);function ae(G){!G||!G.type.startsWith("image/")||(g(G.name),p(URL.createObjectURL(G)),R("Ready to read the image."))}async function W(){if(!f||B)return;H(!0),R("Reading Thai and English from the image…");const G=await LS.createWorker("tha+eng");try{const X=(await G.recognize(f)).data.text.trim();T(X),k(X.split(/\r?\n/).map(V=>V.trim()).filter(V=>V.length>1).slice(0,12).map((V,P)=>P)),R("Reading complete. Review and edit the text before creating Test Cases.")}catch(E){R(E instanceof Error?E.message:"OCR failed.")}finally{await G.terminate(),H(!1)}}function ne(){const G=j.split(/\r?\n/).map(A=>A.trim()).filter(A=>A.length>1).slice(0,12),E=(O.length?O.map(A=>G[A]).filter(Boolean):G).slice(0,8),X="SCREENSHOT",V=new Set(o.map(A=>A.id));let P=1;const Q=()=>{let A=`TC-${X}-${String(P).padStart(3,"0")}`;for(;V.has(A);)A=`TC-${X}-${String(++P).padStart(3,"0")}`;return V.add(A),P++,A},D=E.slice(0,8).map(A=>({type:"assertText",text:A,description:C==="th"?`ตรวจสอบว่าหน้าเว็บแสดงข้อความ "${A}"`:`Verify that "${A}" is visible on the page`})),I={module:X,preconditions:C==="th"?["เปิดหน้าที่ต้องการตรวจสอบให้ตรงกับภาพอ้างอิง"]:["Open the page that matches the screenshot reference"],sourceUrl:n||m,priority:"medium",automationStatus:"needs-review",type:"validation",notes:C==="th"?`สร้างจากภาพ ${m||"อ้างอิง"} · โปรดตรวจทานก่อนนำไปใช้งานจริง`:`Created from ${m||"reference"} · Review before production use`},S=[];(x==="visual"||x==="manual")&&S.push({...I,id:Q(),title:C==="th"?`ตรวจสอบว่า ${w} แสดงผลตรงตามภาพอ้างอิง`:`${w} matches the screenshot reference`,steps:[{type:"navigate",url:n||"about:blank",description:C==="th"?"เปิดหน้าที่ต้องการตรวจสอบ":"Open the page to inspect"},{type:"manual",description:C==="th"?"เปรียบเทียบโครงร่าง ระยะห่าง สี และตำแหน่งขององค์ประกอบกับภาพอ้างอิง":"Compare layout, spacing, colors and element positions with the screenshot"}],expectedResult:C==="th"?"โครงร่างและองค์ประกอบที่มองเห็นบนหน้าเว็บตรงกับภาพอ้างอิง":"The page layout and visible elements match the screenshot reference."}),(x==="visual"||x==="text")&&S.push({...I,id:Q(),title:C==="th"?`ตรวจสอบข้อความสำคัญทั้งหมดบน ${w}`:`${w} shows all important text`,steps:D,expectedResult:C==="th"?"ข้อความสำคัญบนหน้าจอแสดงครบถ้วนและอ่านได้ชัดเจน":"Important on-screen text is complete and readable."}),c(S),h()}const se=j.split(/\r?\n/).map(G=>G.trim()).filter(G=>G.length>1).slice(0,12),q=O.length||se.length;return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:G=>G.target===G.currentTarget&&h(),children:r.jsxs("section",{className:"modern-modal screenshot-importer",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Create Test Cases from an image"}),r.jsx("h2",{children:"Screenshot → Test Case"}),r.jsx("p",{children:"Follow three steps to create Draft Test Cases for review."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:h,children:"×"})]}),r.jsxs("div",{className:"screenshot-import-body",children:[r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"1"}),r.jsxs("div",{children:[r.jsx("b",{children:"Choose a Test Case pattern"}),r.jsx("p",{children:"Pick the pattern that matches what you need to check."})]})]}),r.jsx("div",{className:"pattern-grid",children:BS.map(G=>r.jsxs("button",{type:"button",className:`pattern-card ${x===G.id?"is-selected":""}`,onClick:()=>y(G.id),children:[r.jsx("b",{children:G.title}),r.jsx("span",{children:G.description})]},G.id))}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"2"}),r.jsxs("div",{children:[r.jsx("b",{children:"Upload a Screenshot"}),r.jsx("p",{children:"PNG, JPG and WEBP are supported."})]})]}),r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:G=>ae(G.target.files?.[0])}),r.jsx("strong",{children:m||"Click to choose an image"}),r.jsx("span",{children:"or drop a file here"})]}),f&&r.jsxs("div",{className:"screenshot-preview",children:[r.jsx("img",{src:f,alt:"Screenshot preview"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:W,disabled:B,children:B?"Reading…":"Read text from image"})]}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"3"}),r.jsxs("div",{children:[r.jsx("b",{children:"Review text and create cases"}),r.jsx("p",{children:"You can edit OCR text before importing."})]})]}),r.jsxs("label",{className:"field-label",children:["Screen name",r.jsx("input",{className:"field mt-1",value:w,onChange:G=>v(G.target.value)})]}),r.jsxs("label",{className:"field-label",children:["Test Case language",r.jsxs("select",{className:"field mt-1",value:C,onChange:G=>{const E=G.target.value;N(E),localStorage.setItem(hv,E),s?.(E)},children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsxs("label",{className:"field-label",children:["Text detected",r.jsx("textarea",{className:"field screenshot-ocr",value:j,onChange:G=>{T(G.target.value),k([])},placeholder:"Read text from the image, or type it yourself"})]}),se.length>0&&r.jsxs("div",{className:"import-preview",children:[r.jsxs("b",{children:["Choose OCR lines to create assertions (",q," selected)"]}),r.jsx("table",{children:r.jsx("tbody",{children:se.map((G,E)=>{const X=O.length===0||O.includes(E);return r.jsxs("tr",{children:[r.jsx("td",{children:r.jsx("input",{type:"checkbox",checked:X,onChange:()=>k(V=>{const P=V.length===0?se.map((Q,D)=>D):V;return P.includes(E)?P.filter(Q=>Q!==E):[...P,E]})})}),r.jsx("td",{children:G})]},`${E}-${G}`)})})})]}),r.jsxs("div",{className:"import-summary",children:[r.jsx("b",{children:"Draft preview"}),r.jsxs("span",{children:[x==="visual"||x==="manual"?"1 visual comparison case":"",x==="visual"?" + ":"",x==="visual"||x==="text"?`1 text verification case with ${q} assertion(s)`:""]})]}),r.jsx("p",{className:"screenshot-status",children:M})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"mr-auto text-xs text-slate-500",children:["Results are marked ",r.jsx("b",{children:"needs-review"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:ne,disabled:!j.trim()&&x!=="manual",children:"Create Draft Test Cases"})]})]})})}const qS=/^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;function GS(n){const l={},s={},o=n(),c=n.toString(),h=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).split(",").map(p=>p.trim());for(const p of h)if(!qS.test(p))throw new Error(`Invalid dependency name: ${p}`);let f=0;for(;f<o.length;){let p=h[f],m=o[f];typeof m=="function"?l[p]=IS(m,p):s[p]=m,f++}return{functions:l,variables:s}}function IS(n,l){const s=n.toString();if(n.prototype)if(s.indexOf("[native code]")>=0){const o=s.indexOf(" ",8)+1,c=s.indexOf("(",o);return s.slice(o,c)}else{let o=s;for(const c in n.prototype)o+=";"+l+".prototype."+c+"="+n.prototype[c].toString();return o}else return s}function VS(n,l,s,o,c,h){let f=!1,p;const m=()=>{p.stop()},g=(v,x)=>{try{p.ingest(v,x)}catch(y){throw m(),y}};return{start:(v,x)=>{if(f)throw new Error("Was started");f=!0;const y=c(),C=y&&y._,N=C||PS(l,v);C||h({_:N});const[j,T]=N;p=n(j,()=>{const M=c();if(M)return M.other},M=>{h(Object.assign(Object.assign({},c()),{other:M}))},s,o),T&&g(T,x)},stop:m,ingest:g}}const YS="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",FS=")(postMessage)}";function PS(n,l){const[s,o]=ZS(l);return[s+";"+YS+n.toString()+FS,o]}function ZS(n){let l={},s={};for(const c of n){const{functions:h,variables:f}=GS(c);l=Object.assign(Object.assign({},l),h),s=Object.assign(Object.assign({},s),f)}return[Object.keys(l).map(c=>c+"="+l[c]).join(";"),s]}function XS(n,l,s,o,c,h){let f=!1,p=!1,m=[];const g=void 0;let w=()=>[],v=()=>[],x,y;const C=X=>xg[X],N=(X,V)=>{xg[X]=V},j=()=>{if(!f)throw new Error("Not started")},T=()=>{if(f)throw new Error("Was started")},O=()=>{if(p)throw new Error("Was stopped")},k=()=>{if(x)throw new Error("Has alias")},M=X=>{if(typeof X!="function")throw new TypeError("Argument must be a function")};let R;if(typeof l=="string"){if(x=l,y=C(x),!y||!y.$)throw new Error("Not found");R=y.$[0],m=y.$[1],w=y.$[2],v=y.$[3],y.$[4]}else R=l;M(R);let B;const H=X=>{O(),T(),M(X),m.push(X)},ae=()=>{O(),T(),H(()=>[R,v,o]),f=!0,B.start(m,g)},W=()=>{p=!0,B.stop()},ne=X=>{B.ingest([Date.now(),X],w(...X))};let se;const q=Object.assign({inputLatency:se,outputLatency:se,addDependencies(X){k(),H(X)},inputTransferList:X=>{O(),T(),k(),M(X),w=X},outputTransferList:X=>{O(),T(),k(),M(X),v=X},alias(X){O(),T(),k(),x=X,N(x,{$:[R,m,w,v]})},start:ae,stop:W},s(ae,W,f,p,ne,j,T,O));return B=VS(n,X=>{let V=-1,P=-1;const D=o(R,I=>{X([V,P,Date.now(),I],v(I))});return([I,S])=>(V=I,P=Date.now(),D(S))},X=>{p||c(X)},([X,V,P,Q])=>{p||(X!==-1&&(q.inputLatency=V-X),q.outputLatency=Date.now()-P,h(Q))},()=>{if(x){const X=C(x);if(X)return X.other}},X=>{x&&N(x,Object.assign(Object.assign({},C(x)),{other:X}))}),q}const xg={};function QS(n,l){let s,o;return XS(n,l,(m,g,w,v,x,y,C,N)=>({call(...j){if(N(),y(),s||o)throw new Error("Previous call not finished");return new Promise((T,O)=>{s=T,o=O,x(j)})},callOnce(...j){return m(),this.call(...j).finally(g)}}),(m,g)=>{const w=v=>v!==null&&typeof v=="object"&&typeof v.then=="function";return v=>{const x=m(...v);w(x)?x.then(g):g(x)}},m=>{if(o)o(m),s=void 0,o=void 0;else throw new Error("`reject` callback not found")},m=>{if(s)s(m),s=void 0,o=void 0;else throw new Error("`resolve` callback not found")})}function KS(n,l,s,o,c){let h=l();h||(h=JS(n),s(h));const f=new Worker(h);return f.onmessage=p=>{const m=p.data,g=m?m[pv]:void 0;if(g){const w=new Error(g[0]);w.stack=g[1];let v=2;for(;v<g.length;)w[g[v][0]]=g[v][1],v++;o(w),f.terminate()}else c(m)},{stop:f.terminate.bind(f),ingest:f.postMessage.bind(f)}}function JS(n){return URL.createObjectURL(new Blob([n+";"+WS],{type:"text/javascript"}))}const pv="$err$",WS="self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({"+pv+':[err.message,err.stack].concat(Object.keys(err).map(function(k){return[k,err[k]]}))})};var postMessage = self.postMessage;addEventListener("error",function(evt) {onErr(evt.error, evt.message)});addEventListener("unhandledrejection",function(evt) {evt.preventDefault();onErr(evt.reason, String(evt.reason))})';function ej(n){return QS(KS,n)}function fd(n){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},fd(n)}function tj(n){var l=String.fromCharCode,s=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,c={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(c).forEach(function(O){c[O.toUpperCase()]=c[O]});function h(O,k,M,R){return R?s.call(c,R)?c[R]:"&"+R+";":l(k||parseInt(M,16))}function f(O){return O.length>3&&O.indexOf("&")!==-1?O.replace(o,h):O}var p="non-whitespace outside of root node";function m(O){return new Error(O)}function g(O){return"missing namespace for prefix <"+O+">"}function w(O){return{get:O,enumerable:!0}}function v(O){var k={},M;for(M in O)k[M]=O[M];return k}var x=Symbol("nameCache");function y(O){return O+"$uri"}function C(O){var k={},M,R;for(M in O)R=O[M],k[R]=R,k[y(R)]=M;return k}function N(){return{line:0,column:0}}function j(O){throw O}function T(O){if(!this)return new T(O);var k=O&&O.proxy,M,R,B,H,ae=j,W,ne,se,q,G=N,E=!1,X=!1,V="",P=!1,Q=!1,D=null,I=!1,S,A,$,K;function ie(oe){oe instanceof Error||(oe=m(oe)),D=oe,ae(oe,G)}function ye(oe){W&&(oe instanceof Error||(oe=m(oe)),W(oe,G))}this.on=function(oe,je){if(typeof je!="function")throw m("required args <name, cb>");switch(oe){case"openTag":R=je;break;case"text":M=je;break;case"closeTag":B=je;break;case"error":ae=je;break;case"warn":W=je;break;case"cdata":H=je;break;case"attention":q=je;break;case"question":se=je;break;case"comment":ne=je;break;default:throw m("unsupported event: "+oe)}return this},this.ns=function(oe){if(typeof oe>"u"&&(oe={}),fd(oe)!=="object")throw m("required args <nsMap={}>");var je={},Ee;for(Ee in oe)je[Ee]=oe[Ee];return Q=!0,K=je,this};function _e(){S=Q?[]:null,A=Q?C(K):null,$=[],G=N,I=!1,D=null,X=!1,V=""}this.parse=function(oe){if(typeof oe!="string")throw m("required args <xml=string>");if(E)throw m("parse during stream; call end() first");return _e(),Ne(oe),G=N,I=!1,D},this.write=function(oe){if(typeof oe!="string")throw m("required args <xml=string>");return E||(_e(),E=!0),D||(V=Ne(V+oe,!0)||""),this},this.end=function(){return E||_e(),E=!1,D||Ne(V),V="",G=N,I=!1,D},this.stop=function(){I=!0};function Ne(oe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=null,$e=null,He,_=0,Y=!1,re=!1,L=0,U=0,J,ge,he,te,xe,we,be,Te,qe,De="",ht=0,Nt;function Lt(Pe,Me){var Ct=Pe.indexOf(":");if(Ct===-1)return Pe;var xt=A[Pe.substring(0,Ct)];return xt?Me===xt?Pe.substr(Ct+1):xt+Pe.substr(Ct):(ye(g(Pe.substring(0,Ct))),null)}function Jt(){if(Nt!==null)return Nt;var Pe,Me,Ct=Q&&A.xmlns,xt=Q&&P?[]:null,Je=ht,et=De,St=et.length,zt,vt,Gt,Bt,pt,Dn={},Hn=new Set,Ut,ze,Ge;e:for(;Je<St;Je++)if(Ut=!1,ze=et.charCodeAt(Je),!(ze===32||ze<14&&ze>8)){for((ze<65||ze>122||ze>90&&ze<97)&&ze!==95&&ze!==58&&(ye("illegal first char attribute name"),Ut=!0),Ge=Je+1;Ge<St;Ge++)if(ze=et.charCodeAt(Ge),!(ze>96&&ze<123||ze>64&&ze<91||ze>47&&ze<59||ze===46||ze===45||ze===95)){if(ze===32||ze<14&&ze>8){ye("missing attribute value"),Je=Ge;continue e}if(ze===61)break;ye("illegal attribute name char"),Ut=!0}if(pt=et.substring(Je,Ge),pt==="xmlns:xmlns"&&(ye("illegal declaration of xmlns"),Ut=!0),ze=et.charCodeAt(Ge+1),ze===34)Ge=et.indexOf('"',Je=Ge+2),Ge===-1&&(Ge=et.indexOf("'",Je),Ge!==-1&&(ye("attribute value quote missmatch"),Ut=!0));else if(ze===39)Ge=et.indexOf("'",Je=Ge+2),Ge===-1&&(Ge=et.indexOf('"',Je),Ge!==-1&&(ye("attribute value quote missmatch"),Ut=!0));else for(ye("missing attribute value quotes"),Ut=!0,Ge=Ge+1;Ge<St&&(ze=et.charCodeAt(Ge+1),!(ze===32||ze<14&&ze>8));Ge++);for(Ge===-1&&(ye("missing closing quotes"),Ge=St,Ut=!0),Ut||(Gt=et.substring(Je,Ge)),Je=Ge;Ge+1<St&&(ze=et.charCodeAt(Ge+1),!(ze===32||ze<14&&ze>8));Ge++)Je===Ge&&(ye("illegal character after attribute end"),Ut=!0);if(Je=Ge+1,Ut)continue e;if(Hn.has(pt)){ye("attribute <"+pt+"> already defined");continue}if(Hn.add(pt),!Q){Dn[pt]=Gt;continue}if(P){if(vt=pt==="xmlns"?"xmlns":pt.charCodeAt(0)===120&&pt.substr(0,6)==="xmlns:"?pt.substr(6):null,vt!==null){if(Pe=f(Gt),Me=y(vt),Bt=K[Pe],!Bt){if(vt==="xmlns"||Me in A&&A[Me]!==Pe)do Bt="ns"+_++;while(typeof A[Bt]<"u");else Bt=vt;K[Pe]=Bt}A[vt]!==Bt&&(zt||(A=v(A),zt=!0),A[vt]=Bt,vt==="xmlns"&&(A[y(Bt)]=Pe,Ct=Bt),A[Me]=Pe),Dn[pt]=Gt;continue}xt.push(pt,Gt);continue}pt=Lt(pt,Ct),pt!==null&&(Dn[pt]=Gt)}if(P)for(Je=0,St=xt.length;Je<St;Je++)pt=Lt(xt[Je++],Ct),Gt=xt[Je],pt!==null&&(Dn[pt]=Gt);return Nt=Dn}function Xe(){for(var Pe=/(\r\n|\r|\n)/g,Me=0,Ct=0,xt=0,Je=U,et,St;L>=xt&&(et=Pe.exec(oe),!(!et||(Je=et[0].length+et.index,Je>L)));)Me+=1,xt=Je;return L==-1?(Ct=Je,St=oe.substring(U)):U===0?St=oe.substring(U,L):(Ct=L-xt,St=U==-1?oe.substring(L):oe.substring(L,U+1)),{data:St,line:Me,column:Ct}}for(G=Xe,k&&(qe=Object.create({},{name:w(function(){return be}),originalName:w(function(){return Te}),attrs:w(Jt),ns:w(function(){return A})}));U!==-1;){if(oe.charCodeAt(U)===60?L=U:L=oe.indexOf("<",U),L===-1){if(je)return oe.substring(U);if($.length)return ie("unexpected end of file");if(!X)return ie("missing start tag");U<oe.length&&oe.substring(U).trim()&&ye(p);return}if(X||(X=!0),U!==L){if($.length){if(M&&(M(oe.substring(U,L),f,G),I))return}else if(oe.substring(U,L).trim()&&(ye(p),I))return}if(te=oe.charCodeAt(L+1),te===33){if(he=oe.charCodeAt(L+2),he===91&&oe.substr(L+3,6)==="CDATA["){if(U=oe.indexOf("]]>",L),U===-1)return je?oe.substring(L):ie("unclosed cdata");if(H&&(H(oe.substring(L+9,U),G),I))return;U+=3;continue}if(he===45&&oe.charCodeAt(L+3)===45){if(U=oe.indexOf("-->",L),U===-1)return je?oe.substring(L):ie("unclosed comment");if(ne&&(ne(oe.substring(L+4,U),f,G),I))return;U+=3;continue}}if(te===63){if(U=oe.indexOf("?>",L),U===-1)return je?oe.substring(L):ie("unclosed question");if(se&&(se(oe.substring(L,U+2),G),I))return;U+=2;continue}for(J=L+1;;J++){if(xe=oe.charCodeAt(J),isNaN(xe))return je?oe.substring(L):(U=-1,ie("unclosed tag"));if(xe===34)he=oe.indexOf('"',J+1),J=he!==-1?he:J;else if(xe===39)he=oe.indexOf("'",J+1),J=he!==-1?he:J;else if(xe===62){U=J;break}}if(te===33){if(q&&(q(oe.substring(L,U+1),f,G),I))return;U+=1;continue}if(Nt={},te===47){if(Y=!1,re=!0,!$.length)return ie("missing open tag");if(J=be=$.pop(),he=L+2+J.length,oe.substring(L+2,he)!==J)return ie("closing tag mismatch");for(;he<U;he++)if(te=oe.charCodeAt(he),!(te===32||te>8&&te<14))return ie("close tag")}else{if(oe.charCodeAt(U-1)===47?(J=be=oe.substring(L+1,U-1),Y=!0,re=!0):(J=be=oe.substring(L+1,U),Y=!0,re=!1),!(te>96&&te<123||te>64&&te<91||te===95||te===58))return ie("illegal first char nodeName");for(he=1,ge=J.length;he<ge;he++)if(te=J.charCodeAt(he),!(te>96&&te<123||te>64&&te<91||te>47&&te<59||te===45||te===95||te==46)){if(te===32||te<14&&te>8){be=J.substring(0,he),Nt=null;break}return ie("invalid nodeName")}re||$.push(be)}if(Q){He=A,Y&&(re||S.push(He),Nt===null&&(P=J.indexOf("xmlns",he)!==-1)&&(ht=he,De=J,Jt(),P=!1)),Te=be,$e!==A&&(Ee=A[x],Ee===void 0&&(Ee=A[x]={}),$e=A);var ut=Ee[be];if(ut!==void 0)be=ut;else{if(te=be.indexOf(":"),te!==-1){if(we=A[be.substring(0,te)],!we)return ie("missing namespace on <"+Te+">");be=be.substr(te+1)}else we=A.xmlns;we&&(be=we+":"+be),Ee[Te]=be}}if(Y&&(ht=he,De=J,R&&(k?R(qe,f,re,G):R(be,Jt,f,re,G),I)))return;if(re){if(B&&(B(k?qe:be,f,Y,G),I))return;Q&&(Y?A=He:A=S.pop())}U+=1}}}return new T(n)}function nj(n,l,s,o){var c=!1,h=function(){if(c)throw new Error("Errored")},f,p=new tj,m=function(x){h(),p.write(x)},g=function(){h(),p.end(),f()},w=new Promise(function(v,x){f=v;var y=function(O){throw c=!0,O},C=function(O,k){o&&o(k(O),n)},N=function(O,k,M,R,B){if(l){var H=k();for(var ae in H)H[td(ae,!0)]=M(H[ae]);l(td(O),H,n)}},j=function(O){s&&s(td(O),n)};p.on("error",y),p.on("text",C),p.on("openTag",N),p.on("closeTag",j)});return{promise:w,write:m,end:g}}function td(n,l){for(var s=0;s<n.length;){if(n[s]===":"&&!(l&&s===5&&n.slice(0,5)==="xmlns"))return n.slice(s+1);s++}return n}function hd(n){"@babel/helpers - typeof";return hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},hd(n)}function aj(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function rj(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function ij(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&tl(n,l)}function lj(n){var l=mv();return function(){var o=nl(n),c;if(l){var h=nl(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return sj(this,c)}}function sj(n,l){if(l&&(hd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oj(n)}function oj(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function pd(n){var l=typeof Map=="function"?new Map:void 0;return pd=function(o){if(o===null||!uj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Hs(o,arguments,nl(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),tl(c,o)},pd(n)}function Hs(n,l,s){return mv()?Hs=Reflect.construct.bind():Hs=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&tl(g,f.prototype),g},Hs.apply(null,arguments)}function mv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uj(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function tl(n,l){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},tl(n,l)}function nl(n){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},nl(n)}var Wi=(function(n){ij(s,n);var l=lj(s);function s(o){var c;return rj(this,s),c=l.call(this,o),c.name="InvalidSpreadsheetError",c}return aj(s)})(pd(Error));function cj(n,l,s,o,c,h){var f=nj(l,s,o,c);return h?p(f,n,h):(f.write(n),f.end()),f.promise.then(function(m){return m},function(m){var g=new Wi(m.message);throw g.stack=m.stack,g.cause=m,g});function p(m,g,w,v){var x=7,y=64*1024,C=y,N=function(){var O=Date.now();if(g.length>C){m.write(g.slice(0,C)),w&&w(!1),g=g.slice(C);var k=Date.now()-O;return k<x*.5?C*=2:k>x&&(C/=2),!0}else return m.write(g),m.end(),w&&w(!0),!1},j=function T(){N()&&T()};j()}}var Sg={},dj=(function(n,l,s,o,c){var h=new Worker(Sg[l]||(Sg[l]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return h.onmessage=function(f){var p=f.data,m=p.$e$;if(m){var g=new Error(m[0]);g.code=m[1],g.stack=m[2],c(g,null)}else c(null,p)},h.postMessage(s,o),h}),Kt=Uint8Array,rr=Uint16Array,gv=Int32Array,Ad=new Kt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Rd=new Kt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),vv=new Kt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yv=function(n,l){for(var s=new rr(31),o=0;o<31;++o)s[o]=l+=1<<n[o-1];for(var c=new gv(s[30]),o=1;o<30;++o)for(var h=s[o];h<s[o+1];++h)c[h]=h-s[o]<<5|o;return{b:s,r:c}},bv=yv(Ad,2),kd=bv.b,fj=bv.r;kd[28]=258,fj[258]=28;var hj=yv(Rd,0),xv=hj.b,Qs=new rr(32768);for(var ft=0;ft<32768;++ft){var Da=(ft&43690)>>1|(ft&21845)<<1;Da=(Da&52428)>>2|(Da&13107)<<2,Da=(Da&61680)>>4|(Da&3855)<<4,Qs[ft]=((Da&65280)>>8|(Da&255)<<8)>>1}var Xr=(function(n,l,s){for(var o=n.length,c=0,h=new rr(l);c<o;++c)n[c]&&++h[n[c]-1];var f=new rr(l);for(c=1;c<l;++c)f[c]=f[c-1]+h[c-1]<<1;var p;if(s){p=new rr(1<<l);var m=15-l;for(c=0;c<o;++c)if(n[c])for(var g=c<<4|n[c],w=l-n[c],v=f[n[c]-1]++<<w,x=v|(1<<w)-1;v<=x;++v)p[Qs[v]>>m]=g}else for(p=new rr(o),c=0;c<o;++c)n[c]&&(p[c]=Qs[f[n[c]-1]++]>>15-n[c]);return p}),gl=new Kt(288);for(var ft=0;ft<144;++ft)gl[ft]=8;for(var ft=144;ft<256;++ft)gl[ft]=9;for(var ft=256;ft<280;++ft)gl[ft]=7;for(var ft=280;ft<288;++ft)gl[ft]=8;var Sv=new Kt(32);for(var ft=0;ft<32;++ft)Sv[ft]=5;var jv=Xr(gl,9,1),wv=Xr(Sv,5,1),qs=function(n){for(var l=n[0],s=1;s<n.length;++s)n[s]>l&&(l=n[s]);return l},En=function(n,l,s){var o=l/8|0;return(n[o]|n[o+1]<<8)>>(l&7)&s},Gs=function(n,l){var s=l/8|0;return(n[s]|n[s+1]<<8|n[s+2]<<16)>>(l&7)},_v=function(n){return(n+7)/8|0},oo=function(n,l,s){return(l==null||l<0)&&(l=0),(s==null||s>n.length)&&(s=n.length),new Kt(n.subarray(l,s))},Nv=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Xt=function(n,l,s){var o=new Error(l||Nv[n]);if(o.code=n,Error.captureStackTrace&&Error.captureStackTrace(o,Xt),!s)throw o;return o},Ev=function(n,l,s,o){var c=n.length,h=o?o.length:0;if(!c||l.f&&!l.l)return s||new Kt(0);var f=!s,p=f||l.i!=2,m=l.i;f&&(s=new Kt(c*3));var g=function(Ee){var $e=s.length;if(Ee>$e){var He=new Kt(Math.max($e*2,Ee));He.set(s),s=He}},w=l.f||0,v=l.p||0,x=l.b||0,y=l.l,C=l.d,N=l.m,j=l.n,T=c*8;do{if(!y){w=En(n,v,1);var O=En(n,v+1,3);if(v+=3,O)if(O==1)y=jv,C=wv,N=9,j=5;else if(O==2){var B=En(n,v,31)+257,H=En(n,v+10,15)+4,ae=B+En(n,v+5,31)+1;v+=14;for(var W=new Kt(ae),ne=new Kt(19),se=0;se<H;++se)ne[vv[se]]=En(n,v+se*3,7);v+=H*3;for(var q=qs(ne),G=(1<<q)-1,E=Xr(ne,q,1),se=0;se<ae;){var X=E[En(n,v,G)];v+=X&15;var k=X>>4;if(k<16)W[se++]=k;else{var V=0,P=0;for(k==16?(P=3+En(n,v,3),v+=2,V=W[se-1]):k==17?(P=3+En(n,v,7),v+=3):k==18&&(P=11+En(n,v,127),v+=7);P--;)W[se++]=V}}var Q=W.subarray(0,B),D=W.subarray(B);N=qs(Q),j=qs(D),y=Xr(Q,N,1),C=Xr(D,j,1)}else Xt(1);else{var k=_v(v)+4,M=n[k-4]|n[k-3]<<8,R=k+M;if(R>c){m&&Xt(0);break}p&&g(x+M),s.set(n.subarray(k,R),x),l.b=x+=M,l.p=v=R*8,l.f=w;continue}if(v>T){m&&Xt(0);break}}p&&g(x+131072);for(var I=(1<<N)-1,S=(1<<j)-1,A=v;;A=v){var V=y[Gs(n,v)&I],$=V>>4;if(v+=V&15,v>T){m&&Xt(0);break}if(V||Xt(2),$<256)s[x++]=$;else if($==256){A=v,y=null;break}else{var K=$-254;if($>264){var se=$-257,ie=Ad[se];K=En(n,v,(1<<ie)-1)+kd[se],v+=ie}var ye=C[Gs(n,v)&S],_e=ye>>4;ye||Xt(3),v+=ye&15;var D=xv[_e];if(_e>3){var ie=Rd[_e];D+=Gs(n,v)&(1<<ie)-1,v+=ie}if(v>T){m&&Xt(0);break}p&&g(x+131072);var Ne=x+K;if(x<D){var oe=h-D,je=Math.min(D,Ne);for(oe+x<0&&Xt(3);x<je;++x)s[x]=o[oe+x]}for(;x<Ne;++x)s[x]=s[x-D]}}l.l=y,l.p=A,l.b=x,l.f=w,y&&(w=1,l.m=N,l.d=C,l.n=j)}while(!w);return x!=s.length&&f?oo(s,0,x):s.subarray(0,x)},pj=new Kt(0),mj=function(n,l){var s={};for(var o in n)s[o]=n[o];for(var o in l)s[o]=l[o];return s},jg=function(n,l,s){for(var o=n(),c=n.toString(),h=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).replace(/\s+/g,"").split(","),f=0;f<o.length;++f){var p=o[f],m=h[f];if(typeof p=="function"){l+=";"+m+"=";var g=p.toString();if(p.prototype)if(g.indexOf("[native code]")!=-1){var w=g.indexOf(" ",8)+1;l+=g.slice(w,g.indexOf("(",w))}else{l+=g;for(var v in p.prototype)l+=";"+m+".prototype."+v+"="+p.prototype[v].toString()}else l+=g}else s[m]=p}return l},Bs=[],gj=function(n){var l=[];for(var s in n)n[s].buffer&&l.push((n[s]=new n[s].constructor(n[s])).buffer);return l},vj=function(n,l,s,o){if(!Bs[s]){for(var c="",h={},f=n.length-1,p=0;p<f;++p)c=jg(n[p],c,h);Bs[s]={c:jg(n[f],c,h),e:h}}var m=mj({},Bs[s].e);return dj(Bs[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+l.toString()+"}",s,m,gj(m),o)},yj=function(){return[Kt,rr,gv,Ad,Rd,vv,kd,xv,jv,wv,Qs,Nv,Xr,qs,En,Gs,_v,oo,Xt,Ev,Dd,Tv,Ov]},Tv=function(n){return postMessage(n,[n.buffer])},Ov=function(n){return n&&{out:n.size&&new Kt(n.size),dictionary:n.dictionary}},bj=function(n,l,s,o,c,h){var f=vj(s,o,c,function(p,m){f.terminate(),h(p,m)});return f.postMessage([n,l],l.consume?[n.buffer]:[]),function(){f.terminate()}},Bn=function(n,l){return n[l]|n[l+1]<<8},Tn=function(n,l){return(n[l]|n[l+1]<<8|n[l+2]<<16|n[l+3]<<24)>>>0},nd=function(n,l){return Tn(n,l)+Tn(n,l+4)*4294967296};function xj(n,l,s){return s||(s=l,l={}),typeof s!="function"&&Xt(7),bj(n,l,[yj],function(o){return Tv(Dd(o.data[0],Ov(o.data[1])))},1,s)}function Dd(n,l){return Ev(n,{i:2},l&&l.out,l&&l.dictionary)}var md=typeof TextDecoder<"u"&&new TextDecoder,Sj=0;try{md.decode(pj,{stream:!0}),Sj=1}catch{}var jj=function(n){for(var l="",s=0;;){var o=n[s++],c=(o>127)+(o>223)+(o>239);if(s+c>n.length)return{s:l,r:oo(n,s-1)};c?c==3?(o=((o&15)<<18|(n[s++]&63)<<12|(n[s++]&63)<<6|n[s++]&63)-65536,l+=String.fromCharCode(55296|o>>10,56320|o&1023)):c&1?l+=String.fromCharCode((o&31)<<6|n[s++]&63):l+=String.fromCharCode((o&15)<<12|(n[s++]&63)<<6|n[s++]&63):l+=String.fromCharCode(o)}};function Cv(n,l){if(l){for(var s="",o=0;o<n.length;o+=16384)s+=String.fromCharCode.apply(null,n.subarray(o,o+16384));return s}else{if(md)return md.decode(n);var c=jj(n),h=c.s,s=c.r;return s.length&&Xt(8),h}}var wj=function(n,l){return l+30+Bn(n,l+26)+Bn(n,l+28)},_j=function(n,l,s){var o=Bn(n,l+28),c=Bn(n,l+30),h=Cv(n.subarray(l+46,l+46+o),!(Bn(n,l+8)&2048)),f=l+46+o,p=Nj(n,f,c,s,Tn(n,l+20),Tn(n,l+24),Tn(n,l+42)),m=p[0],g=p[1],w=p[2];return[Bn(n,l+10),m,g,h,f+c+Bn(n,l+32),w]},Nj=function(n,l,s,o,c,h,f){var p=c==4294967295,m=h==4294967295,g=f==4294967295,w=l+s,v=p+m+g;if(o&&v){for(;l+4<w;l+=4+Bn(n,l+2))if(Bn(n,l)==1)return[p?nd(n,l+4+8*m):c,m?nd(n,l+4):h,g?nd(n,l+4+8*(m+p)):f,1];o<2&&Xt(13)}return[c,h,f,0]},wg=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n()};function Ej(n,l,s){s||(s=l,l={}),typeof s!="function"&&Xt(7);var o=[],c=function(){for(var j=0;j<o.length;++j)o[j]()},h={},f=function(j,T){wg(function(){s(j,T)})};wg(function(){f=s});for(var p=n.length-22;Tn(n,p)!=101010256;--p)if(!p||n.length-p>65558)return f(Xt(13,0,1),null),c;var m=Bn(n,p+8);if(m){var g=m,w=Tn(n,p+16),v=Tn(n,p-20)==117853008;if(v){var x=Tn(n,p-12);v=Tn(n,x)==101075792,v&&(g=m=Tn(n,x+32),w=Tn(n,x+48))}for(var y=l&&l.filter,C=function(j){var T=_j(n,w,v),O=T[0],k=T[1],M=T[2],R=T[3],B=T[4],H=T[5],ae=wj(n,H);w=B;var W=function(se,q){se?(c(),f(se,null)):(q&&(h[R]=q),--m||f(null,h))};if(!y||y({name:R,size:k,originalSize:M,compression:O}))if(!O)W(null,oo(n,ae,ae+k));else if(O==8){var ne=n.subarray(ae,ae+k);if(M<524288||k>.8*M)try{W(null,Dd(ne,{out:new Kt(M)}))}catch(se){W(se,null)}else o.push(xj(ne,{size:M},W))}else W(Xt(14,"unknown compression type "+O,1),null);else W(null,null)},N=0;N<g;++N)C(N)}else f(null,{});return c}function gd(n){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},gd(n)}function Tj(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function Oj(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function Cj(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&al(n,l)}function Aj(n){var l=Av();return function(){var o=rl(n),c;if(l){var h=rl(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return Rj(this,c)}}function Rj(n,l){if(l&&(gd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kj(n)}function kj(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function vd(n){var l=typeof Map=="function"?new Map:void 0;return vd=function(o){if(o===null||!Dj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Is(o,arguments,rl(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),al(c,o)},vd(n)}function Is(n,l,s){return Av()?Is=Reflect.construct.bind():Is=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&al(g,f.prototype),g},Is.apply(null,arguments)}function Av(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dj(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function al(n,l){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},al(n,l)}function rl(n){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},rl(n)}var Rv=(function(n){Cj(s,n);var l=Aj(s);function s(){return Oj(this,s),l.apply(this,arguments)}return Tj(s)})(vd(Error));function kv(n){var l=new Rv(n.message);return n.stack&&(l.stack=n.stack),Error.captureStackTrace&&Error.captureStackTrace(l,kv),l.cause=n,l}function zj(n,l){return Uj(n,l,Mj,!0)}function Uj(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=l.filter,o=arguments.length>2?arguments[2]:void 0;return o(new Uint8Array(n),{filter:function(h){return s?s({path:h.name}):!0}}).then(function(c){return c},function(c){throw Lj(c)?kv(c):c})}function Mj(n){return new Promise(function(l,s){Ej(n,function(o,c){o?s(o):l(c)})})}function Lj(n){return typeof n.code=="number"}function yd(n){"@babel/helpers - typeof";return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},yd(n)}function Bj(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function $j(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function Hj(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&il(n,l)}function qj(n){var l=Dv();return function(){var o=ll(n),c;if(l){var h=ll(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return Gj(this,c)}}function Gj(n,l){if(l&&(yd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ij(n)}function Ij(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function bd(n){var l=typeof Map=="function"?new Map:void 0;return bd=function(o){if(o===null||!Vj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Vs(o,arguments,ll(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),il(c,o)},bd(n)}function Vs(n,l,s){return Dv()?Vs=Reflect.construct.bind():Vs=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&il(g,f.prototype),g},Vs.apply(null,arguments)}function Dv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vj(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function il(n,l){return il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},il(n,l)}function ll(n){return ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},ll(n)}var Yj={XLS_FILE_NOT_SUPPORTED:"You passed a legacy `.xls` file. Only `.xlsx` files are supported",FILE_NOT_SUPPORTED:"Doesn't look like an `.xlsx` file",INVALID_ZIP:"Couldn't unzip `.xlsx` file contents",NO_DATA:"No data"},Ks=(function(n){Hj(s,n);var l=qj(s);function s(o,c){var h;return $j(this,s),h=l.call(this,Yj[o]||o),h.code=o,h.name="InvalidInputError",h.cause=c,h}return Bj(s)})(bd(Error));function Fj(n){var l=n.path;return l.endsWith(".xml")||l.endsWith(".xml.rels")}var Pj=[80,75],zv=[208,207,17,224],Ys=[Pj,zv],Zj=Ys.indexOf(zv);function Xj(){var n,l=Qj(Ys),s=0;return function(o){if(isNaN(n)){var c;l=l.filter(function(h){if(o===Ys[h][s])return Ys[h].length===s+1&&(c=h),!0}),l.length===1?n=c:l.length===0&&(n=-1)}return s++,n}}function Qj(n){for(var l=[],s=0;s<n.length;)l.push(s),s++;return l}function Kj(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=Jj(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
43
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jj(n,l){if(n){if(typeof n=="string")return _g(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return _g(n,l)}}function _g(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Wj(n){for(var l=Xj(),s=Kj(n),o;!(o=s()).done;){var c=o.value;if(ew(c,l))return}tw(n.length)}function ew(n,l){var s=l(n);if(s!==void 0){if(s===Zj)throw new Ks("XLS_FILE_NOT_SUPPORTED");if(s<0)throw new Ks("FILE_NOT_SUPPORTED");return!0}}function tw(n){throw new Ks(n===0?"NO_DATA":"FILE_NOT_SUPPORTED")}var Fs;function za(n){var l=Date.now(),s=typeof global<"u"?!!global.READ_EXCEL_FILE_CHECKPOINTS:typeof window<"u"?!!window.READ_EXCEL_FILE_CHECKPOINTS:!1;s&&(Fs&&console.log(" -",l-Fs,"ms"),console.log("*",n)),Fs=l}function nw(){Fs=void 0}function aw(n){return nw(),za("unpack files"),n instanceof File||n instanceof Blob?n.arrayBuffer().then(Ng):Promise.resolve(n).then(Ng)}function Ng(n){return Wj(new Uint8Array(n)),zj(n,{filter:Fj}).then(function(l){return l},function(l){throw l instanceof Rv?new Ks("INVALID_ZIP",l.cause):l})}function rw(n,l){var s=o();return l(n,s,h,null,null).then(function(){return c(s)});function o(){return{workbookPr:void 0,sheets:[]}}function c(f){return{epoch1904:f.workbookPr?f.workbookPr.epoch1904:!1,sheets:f.sheets}}function h(f,p,m){f==="workbookPr"?m.workbookPr||(m.workbookPr={epoch1904:p.date1904==="1"}):f==="sheet"&&p.name&&m.sheets.push({id:Number(p.sheetId),name:p.name,relationId:p.id})}}function iw(n,l){var s="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",o="http://purl.oclc.org/ooxml/officeDocument/relationships/",c=h();return l(n,c,p,null,null).then(function(){return c});function h(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function f(w){return w}function p(w,v,x){w==="Relationship"&&m(x,v.Id,v.Type,v.Target)}function m(w,v,x,y){switch(x){case s+"styles":case o+"styles":w.styles=g(y);break;case s+"sharedStrings":case o+"sharedStrings":w.sharedStrings=g(y);break;case s+"worksheet":case o+"worksheet":w.sheets[v]=g(y);break}}function g(w){return w[0]==="/"?w.slice(1):"xl/"+w}}function sl(n){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},sl(n)}var lw=["xfId"];function Eg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),s.push.apply(s,o)}return s}function Tg(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Eg(Object(s),!0).forEach(function(o){sw(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Eg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function sw(n,l,s){return l=ow(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function ow(n){var l=uw(n,"string");return sl(l)==="symbol"?l:String(l)}function uw(n,l){if(sl(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(sl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function cw(n,l){if(n==null)return{};var s=dw(n,l),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(c=0;c<h.length;c++)o=h[c],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function dw(n,l){if(n==null)return{};var s={},o=Object.keys(n),c,h;for(h=0;h<o.length;h++)c=o[h],!(l.indexOf(c)>=0)&&(s[c]=n[c]);return s}function fw(n,l){var s=o();return l(n,s,h,f,null).then(function(){return c(s)});function o(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function c(m){return m.styles.map(function(g){if(g.xfId){var w=g.xfId,v=cw(g,lw);return Tg(Tg({},m.baseStyles[w]),v)}else return g})}function h(m,g,w){if(m==="numFmt")w.numberFormats[g.numFmtId]={id:Number(g.numFmtId),template:g.formatCode};else if(m==="cellStyleXfs")w.cellStyleXfs=!0;else if(m==="cellXfs")w.cellXfs=!0;else if(m==="xf"){if(w.cellStyleXfs)w.baseStyles.push(p(g));else if(w.cellXfs){var v=p(g,w.numberFormats);g.xfId&&(v.xfId=Number(g.xfId)),w.styles.push(v)}}}function f(m,g){m==="cellStyleXfs"?g.cellStyleXfs=!1:m==="cellXfs"&&(g.cellXfs=!1)}function p(m,g){var w={},v=m.numFmtId;return v&&(g&&g[v]?w.numberFormat=g[v]:w.numberFormat={id:Number(v)}),w}}function hw(n,l){var s=o();return l(n,s,h,f,p).then(function(){return c(s)});function o(){return{si:void 0,strings:[]}}function c(x){return x.strings}function h(x,y,C){x==="si"?C.si=m():C.si&&g(x,y,C.si)}function f(x,y){x==="si"?(y.strings.push(y.si.string),y.si=void 0):y.si&&w(x,y.si)}function p(x,y){y.si&&v(x,y.si)}function m(){return{t:!1,r:!1,rPh:!1,string:""}}function g(x,y,C){x==="t"?C.t=!0:x==="r"?C.r=!0:x==="rPh"&&(C.rPh=!0)}function w(x,y){x==="t"?y.t=!1:x==="r"?y.r=!1:x==="rPh"&&(y.rPh=!1)}function v(x,y){y.rPh||y.t&&(y.r?y.string+=x:y.string=x)}}function pw(n,l){var s=17,o=1,c=1,h=1440*60*1e3,f=365;l&&(n+=4*f+o+c);var p=o+c+70*f+s;return Math.floor((n-p)*h)}var mw=/^\[\$-[^\]]+\]/,gw=/;@$/,ad={};function vw(n){if(n in ad)return ad[n];n=n.toLowerCase(),n=n.replace(mw,""),n=n.replace(gw,"");var l=n.split(/\W+/),s=l.length===0?!1:l.every(function(o){return yw.indexOf(o)>=0});return ad[n]=s,s}var yw=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function bw(n,l,s){return n.numberFormat?!!(jw.indexOf(n.numberFormat.id)>=0||l&&n.numberFormat.template===l||s&&n.numberFormat.template&&vw(n.numberFormat.template)):!1}var xw=[14,15,16,17,18,19,20,21,22,45,46,47],rd=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Og=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Sw=[71,72,73,74,75,76,77,78,79,80,81],jw=xw.concat(rd).concat(Og.filter(function(n){return rd.indexOf(n)<0})).concat(Sw.filter(function(n){return rd.indexOf(n)<0}).filter(function(n){return Og.indexOf(n)<0}));function ww(n,l){return Tw(n)||Ew(n,l)||Nw(n,l)||_w()}function _w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
44
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nw(n,l){if(n){if(typeof n=="string")return Cg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Cg(n,l)}}function Cg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Ew(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function Tw(n){if(Array.isArray(n))return n}var Ow=null,Qr=[null,Ow];function Cw(n,l,s,o,c){var h=ww(c,6),f=h[0],p=h[1],m=h[2],g=h[3],w=h[4],v=h[5];switch(n||"n"){case"str":return s===void 0?"VALUE_MISSING":s?["s",s]:Qr;case"inlineStr":return o===void 0?"VALUE_MISSING":["s",o];case"s":if(!s)return"VALUE_MISSING";var x=Number(s);return isNaN(x)||f[x]===void 0?"VALUE_INVALID":["s",f[x]];case"b":return s?s==="1"?["b",!0]:s==="0"?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return s?["e",s]:"VALUE_MISSING";case"d":if(!s)return Qr;var y=new Date(s);return isNaN(y.valueOf())?"VALUE_INVALID":["d",y.getTime()];case"n":if(!s)return Qr;if(l){var C=Number(l);if(isNaN(C)||p[C]===void 0)return"FORMAT_INVALID";if(bw(p[C],g,w)){var N=Number(s);return isNaN(N)?"VALUE_INVALID":["d",pw(N,m)]}}if(v)return["n",s];var j=Number(s);return isNaN(j)?"VALUE_INVALID":["n",j];default:return"TYPE_INVALID"}}function Ag(n){for(var l=0,s=0;s<n.length;){var o=n.charCodeAt(s);if(o>=48&&o<=57){var c=Number(n.slice(s));return isNaN(c)&&Rg(n),[c,l]}l*=26,l+=n.charCodeAt(s)-64,s++}Rg(n)}function Rg(n){throw new Error('<c r="'.concat(n,'">'))}function Aw(n,l){return Dw(n)||kw(n,l)||Uv(n,l)||Rw()}function Rw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
45
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kw(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function Dw(n){if(Array.isArray(n))return n}function zw(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=Uv(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
46
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uv(n,l){if(n){if(typeof n=="string")return kg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return kg(n,l)}}function kg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}var id=null;function Uw(n,l,s){var o=s.sharedStrings,c=s.styles,h=s.epoch1904,f=s.options,p=[o,c,h,f.dateFormat,f.smartDateParser!==!1,f.parseNumber],m=[],g=[],w=v();return l(n,w,O,k,M,T).then(function(){var Q=w.sheetData,D=Q.rowCount,I=Q.columnCount,S=Q.dataRowCount,A=Q.dataColumnCount;if(S<D&&(m=m.slice(0,S)),A<I)for(var $=0;$<m.length;)m[$].length>A&&(m[$]=m[$].slice(0,A)),$++;for(var K=zw(m),ie;!(ie=K()).done;)for(var ye=ie.value;ye.length<A;)ye.push(id);return m});function v(){return{dimension:void 0,sheetData:void 0}}function x(Q){return Q.sheetData.rows}function y(Q,D){Q.sheetData.rowIndexShift+=Q.sheetData.rows.length-D.length,Q.sheetData.rows=D}function C(Q){return Q.sheetData.errors}function N(Q,D){Q.sheetData.errors=D}function j(Q){var D=Q.row,I=Q.column,S=Q.error;throw new Wi("<c/> at row ".concat(D,", col ").concat(I,": ").concat(S))}function T(Q){var D=x(w),I=C(w);if(Q)m=m.concat(D),g=g.concat(I),g.length>0&&j(g[0]);else if(D.length>1){var S=D.slice(0,-1);m=m.concat(S),g=g.concat(I),y(w,D.slice(-1)),N(w,[])}}function O(Q,D,I){Q==="dimension"?I.dimension=R(D.ref):Q==="sheetData"?I.sheetData=B():I.sheetData&&H(Q,D,I.sheetData)}function k(Q,D){D.sheetData&&ae(Q,D.sheetData)}function M(Q,D){D.sheetData&&W(Q,D.sheetData)}function R(Q){var D=Q.split(":").map(Ag);return D.length===1&&(D=[D[0],D[0]]),D}function B(){return{c:void 0,rows:[],row:void 0,rowNumber:void 0,rowIndexShift:0,cursor:[0,0],rowCount:0,columnCount:0,dataRowCount:0,dataColumnCount:0,errors:[]}}function H(Q,D,I){Q==="row"?(D.r&&(I.rowNumber=Number(D.r)),I.row=[]):Q==="c"?(I.c=E(),I.c.attributes=D):I.c&&X(Q,D,I.c)}function ae(Q,D){if(Q==="row"){if(D.rowNumber){var I=D.rowIndexShift+D.rows.length;if(D.rowNumber<=I)throw new Wi("Out-of-place <row/> number ".concat(D.rowNumber," follows <row/> number ").concat(I));for(;D.rowNumber>D.rowIndexShift+D.rows.length+1;)D.rows.push([])}D.rows.push(D.row),D.row.length>0&&(D.dataRowCount=D.rowNumber),D.rowNumber>D.rowCount&&(D.rowCount=D.rowNumber),D.row=void 0,D.rowNumber=void 0}else if(Q==="c"){var S=ne(D.c);if(S.row<D.cursor[0]||S.row===D.cursor[0]&&S.column<=D.cursor[1])throw new Wi("Out-of-place <c/> at row ".concat(S.row," col ").concat(S.column," follows <c/> at row ").concat(D.cursor[0]," col ").concat(D.cursor[1]));if(D.cursor[0]=S.row,D.cursor[1]=S.column,D.rowNumber||(D.rowNumber=S.row),S.error)j(S),D.errors.push(S);else if(S.value!==id){for(;S.column>D.row.length+1;)D.row.push(id);D.row.push(S.value),S.column>D.dataColumnCount&&(D.dataColumnCount=S.column)}S.column>D.columnCount&&(D.columnCount=S.column),D.c=void 0}else D.c&&V(Q,D.c)}function W(Q,D){D.c&&P(Q,D.c)}function ne(Q){var D=Q.attributes,I=Q.inlineString,S=Q.vText,A=Ag(D.r),$=Aw(A,2),K=$[0],ie=$[1],ye=se(D.t,D.s,S,I,p,f.trim!==!1);return typeof ye=="string"?{row:K,column:ie,error:ye}:{row:K,column:ie,value:G(ye[1],ye[0])}}function se(Q,D,I,S,A,$){var K=q(Q,D,I,S,A);return Array.isArray(K)&&K[0]==="s"&&($&&(K[1]=K[1].trim()),K[1]==="")?Qr:K}function q(Q,D,I,S,A){var $=Cw(Q,D,I,S,A);if($==="VALUE_MISSING")switch(Q||"n"){case"str":case"inlineStr":case"s":case"b":return Qr}return Q==="e"?Qr:$}function G(Q,D){return D==="n"?f.parseNumber?f.parseNumber(Q):Q:D==="d"?new Date(Q):Q}function E(){return{v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0}}function X(Q,D,I){Q==="v"?I.v=!0:Q==="is"?(I.is=!0,I.inlineString=""):Q==="t"?I.t=!0:Q==="r"?I.r=!0:Q==="rPh"&&(I.rPh=!0)}function V(Q,D){Q==="v"?(D.v=!1,D.vText||(D.vText="")):Q==="is"?D.is=!1:Q==="t"?D.t=!1:Q==="r"?D.r=!1:Q==="rPh"&&(D.rPh=!1)}function P(Q,D){D.v?D.vText=Q:D.is&&(D.rPh||D.t&&(D.r?D.inlineString+=Q:D.inlineString=Q))}}function Mw(n){za("convert files to strings");for(var l={},s=0,o=Object.keys(n);s<o.length;s++){var c=o[s];l[c]=Lw(n[c])}return l}function Lw(n){return typeof TextDecoder<"u"?new TextDecoder().decode(n):Cv(n)}function xd(n){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},xd(n)}function Bw(n){return xd(n)==="object"&&typeof n.then=="function"}function Sd(n){"@babel/helpers - typeof";return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Sd(n)}function $w(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function Hw(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function qw(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&ol(n,l)}function Gw(n){var l=Mv();return function(){var o=ul(n),c;if(l){var h=ul(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return Iw(this,c)}}function Iw(n,l){if(l&&(Sd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vw(n)}function Vw(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jd(n){var l=typeof Map=="function"?new Map:void 0;return jd=function(o){if(o===null||!Yw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Ps(o,arguments,ul(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),ol(c,o)},jd(n)}function Ps(n,l,s){return Mv()?Ps=Reflect.construct.bind():Ps=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&ol(g,f.prototype),g},Ps.apply(null,arguments)}function Mv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yw(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function ol(n,l){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},ol(n,l)}function ul(n){return ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},ul(n)}var Dg=(function(n){qw(s,n);var l=Gw(s);function s(o){var c;return Hw(this,s),c=l.call(this,o),c.name="SheetNotFoundError",c}return $w(s)})(jd(Error));function cl(n){"@babel/helpers - typeof";return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},cl(n)}function Lv(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=Fw(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
47
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fw(n,l){if(n){if(typeof n=="string")return zg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return zg(n,l)}}function zg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Ug(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),s.push.apply(s,o)}return s}function Js(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Ug(Object(s),!0).forEach(function(o){Ws(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Ug(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function Ws(n,l,s){return l=Pw(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function Pw(n){var l=Zw(n,"string");return cl(l)==="symbol"?l:String(l)}function Zw(n,l){if(cl(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(cl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function Xw(n,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=Mw(l);return za("parse spreadsheet info and file paths"),ld(Ww(),o,n).then(function(c){var h=c.spreadsheetInfo,f=c.filePaths;return za('parse "shared strings" and "styles"'),ld(e2(f),o,n).then(function(p){var m=p.sharedStrings,g=p.styles,w=s.sheets?s.sheets.map(function(v){return Kw(v,h.sheets)}):h.sheets.map(function(v){return v.relationId});return za("parse sheet".concat(w.length===1?"":"s"," data")),ld(t2(f,w,{sharedStrings:m,styles:g,epoch1904:h.epoch1904,options:s}),o,n).then(function(v){return za("end"),w.map(function(x){return{sheet:Jw(x,h.sheets),data:v[x]}})})})})}function Qw(n,l,s,o){return o&&o.parseNumber||(o=Js(Js({},o),{},{parseNumber:null})),Xw(l,s,o)}function Kw(n,l){if(typeof n=="string"){for(var s=Lv(l),o;!(o=s()).done;){var c=o.value;if(c.name===n)return c.relationId}throw new Dg('Sheet "'.concat(n,'" not found. Available sheets: ').concat(l.map(function(h){var f=h.name;return'"'.concat(f,'"')}).join(", ")))}else{if(n<=l.length)return l[n-1].relationId;throw new Dg("Sheet number out of bounds: ".concat(n,". Available sheets count: ").concat(l.length))}}function Jw(n,l){for(var s=Lv(l),o;!(o=s()).done;){var c=o.value;if(c.relationId===n)return c.name}throw new Error("Sheet relation ID not found: ".concat(n))}function Ww(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:iw},"xl/workbook.xml":{name:"spreadsheetInfo",parse:rw}}}function e2(n){var l;return l={},Ws(l,n.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:hw,fallback:[]}),Ws(l,n.styles||"xl/styles.xml",{name:"styles",parse:fw,fallback:{}}),l}function t2(n,l,s){return Object.keys(n.sheets).filter(function(o){return l.includes(o)}).reduce(function(o,c){return Js(Js({},o),{},Ws({},n.sheets[c],{name:c,parse:function(f,p){return Uw(f,p,s)}}))},{})}function ld(n,l,s){for(var o={},c=function(){var x=f[h],y=n[x];o[y.name]=l[x]===void 0?y.fallback===void 0?(function(){throw new Wi('"'.concat(x,'" file not found inside the `.xlsx` file'))})():y.fallback:y.parse(l[x],s)},h=0,f=Object.keys(n);h<f.length;h++)c();for(var p=[],m=function(){var x=w[g];Bw(o[x])&&p.push(o[x].then(function(y){o[x]=y}))},g=0,w=Object.keys(o);g<w.length;g++)m();return p.length>0?Promise.all(p).then(function(){return o}):o}function wd(n){"@babel/helpers - typeof";return wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},wd(n)}function n2(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function a2(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function r2(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&dl(n,l)}function i2(n){var l=Bv();return function(){var o=fl(n),c;if(l){var h=fl(this).constructor;c=Reflect.construct(o,arguments,h)}else c=o.apply(this,arguments);return l2(this,c)}}function l2(n,l){if(l&&(wd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s2(n)}function s2(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _d(n){var l=typeof Map=="function"?new Map:void 0;return _d=function(o){if(o===null||!o2(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,c)}function c(){return Zs(o,arguments,fl(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),dl(c,o)},_d(n)}function Zs(n,l,s){return Bv()?Zs=Reflect.construct.bind():Zs=function(c,h,f){var p=[null];p.push.apply(p,h);var m=Function.bind.apply(c,p),g=new m;return f&&dl(g,f.prototype),g},Zs.apply(null,arguments)}function Bv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function o2(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function dl(n,l){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},dl(n,l)}function fl(n){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},fl(n)}var $n=(function(n){r2(s,n);var l=i2(s);function s(o){var c;return a2(this,s),c=l.call(this,"invalid"),c.reason=o,c}return n2(s)})(_d(Error));function u2(n){if(typeof n=="string"){var l=n;if(n=Number(n),String(n)!==l)throw new $n("not_a_number")}if(typeof n!="number")throw new $n("not_a_number");if(isNaN(n))throw new $n("invalid_number");if(!isFinite(n))throw new $n("out_of_bounds");return n}function c2(n){if(typeof n=="string")return n;if(typeof n=="number"){if(isNaN(n))throw new $n("invalid_number");if(!isFinite(n))throw new $n("out_of_bounds");return String(n)}throw new $n("not_a_string")}function d2(n){if(typeof n=="boolean")return n;throw new $n("not_a_boolean")}function f2(n){if(n instanceof Date){if(isNaN(n.valueOf()))throw new $n("out_of_bounds");return n}throw new $n("not_a_date")}var h2={}.constructor;function $v(n){return n!=null&&n.constructor===h2}function Kr(n){"@babel/helpers - typeof";return Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Kr(n)}function p2(n,l){return qv(n)||m2(n,l)||zd(n,l)||Hv()}function m2(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,c,h,f,p=[],m=!0,g=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(m=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);m=!0);}catch(w){g=!0,c=w}finally{try{if(!m&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function g2(n){return qv(n)||v2(n)||zd(n)||Hv()}function Hv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
48
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v2(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function qv(n){if(Array.isArray(n))return n}function Mg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),s.push.apply(s,o)}return s}function eo(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Mg(Object(s),!0).forEach(function(o){y2(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Mg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function y2(n,l,s){return l=b2(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function b2(n){var l=x2(n,"string");return Kr(l)==="symbol"?l:String(l)}function x2(n,l){if(Kr(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(Kr(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function Gv(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=zd(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
49
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zd(n,l){if(n){if(typeof n=="string")return Lg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Lg(n,l)}}function Lg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}var to=null;function S2(n,l,s){za("parse sheet data using schema");for(var o=[],c=[],h=j2(n,l),f=0,p=Gv(h),m;!(m=p()).done;){var g=m.value,w=g.object,v=g.errors;v?c=c.concat(v.map(function(x){return eo(eo({},x),{},{row:f+1})})):o.push(w),f++}return za("end"),c.length>0?{errors:c}:{objects:o}}function j2(n,l,s){D2(l);var o=M2(),c=g2(n),h=c[0],f=c.slice(1);return f.map(function(p){return w2(p,l,h,o)})}function w2(n,l,s,o){var c={schema:l},h=Iv(n,c,void 0,s,o),f=h.value,p=h.isEmptyValue,m=h.errors,g=h.children,w={value:L2,isEmptyValue:p,errors:m,isRequired:void 0},v=Fv(c,f,p,m,g,w.isRequired,w.value,w.isEmptyValue,w.errors,s);return m||v?{errors:(m||[]).concat(v||[])}:{object:Yv(f,p,void 0,o)}}function _2(n,l,s,o,c){for(var h={},f=!0,p=[],m=[],g=0,w=Object.keys(l);g<w.length;g++){var v=w[g],x=Iv(n,l[v],Bg(v,s),o,c);x.errors?p=p.concat(x.errors):(h[v]=Yv(x.value,x.isEmptyValue,Bg(v,s),c),f&&!x.isEmptyValue&&(f=!1)),m.push(eo(eo({},x),{},{schemaEntry:l[v]}))}return p.length>0?{errors:p,children:m}:{value:h,isEmptyValue:f,children:m}}function Iv(n,l,s,o,c){var h=l.column?o.indexOf(l.column):void 0,f=l.column?h<0:void 0,p=l.column?f?{value:c.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:N2(n[h],l,h,c):_2(n,l.schema,s,o,c),m=p.value,g=p.isEmptyValue,w=p.errors,v=p.children;return w?{errors:w,children:v}:{value:m,isEmptyValue:g,children:v}}function N2(n,l,s,o){var c=E2(n,l,o),h=c.value,f=c.isEmptyValue,p=c.error,m=c.reason;if(p){var g=Pv({error:p,reason:m,column:l.column,columnIndex:s,valueType:l.type,value:n});return{errors:[g]}}return{value:h,isEmptyValue:f}}function E2(n,l,s){return n===void 0?{value:s.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:n===to?{value:s.propertyValueWhenCellIsEmpty,isEmptyValue:!0}:Array.isArray(l.type)?T2(n,l,s):Vv(n,l)}function T2(n,l,s){if(typeof n!="string")return{error:"not_a_string"};var o=!0,c=[],h=[],f=R2(n,s.separatorCharacter).map(function(p){if(!(c.length>0)){if(!p){c.push("invalid"),h.push("syntax");return}var m=Vv(p,l),g=m.value,w=m.isEmptyValue,v=m.error,x=m.reason;if(v){c.push(v),h.push(x);return}return o&&!w&&(o=!1),g}});return c.length>0?{error:c[0],reason:h[0]}:{value:f,isEmptyValue:o}}function Vv(n,l,s){if(n===to)return{value:n,isEmptyValue:!0};var o;if(l.type?o=C2(n,Array.isArray(l.type)?l.type[0]:l.type):o={value:n},o.error)return o;if(n===to)return{value:n,isEmptyValue:!0};if(l.oneOf){var c=O2(o.value,l.oneOf);if(c)return c}if(l.validate)try{l.validate(o.value)}catch(h){return{error:h.message}}return{value:o.value,isEmptyValue:z2(o.value)}}function O2(n,l){if(l.indexOf(n)<0)return{error:"invalid",reason:"unknown"}}function C2(n,l){switch(l){case String:return Xi(n,c2);case Number:return Xi(n,u2);case Date:return Xi(n,f2);case Boolean:return Xi(n,d2);default:if(typeof l!="function")throw new Error("Unsupported schema `type`: ".concat(l&&l.name||l));return Xi(n,l)}}function Xi(n,l){try{var s=l(n);return s===void 0?{value:to}:{value:s}}catch(c){var o={error:c.message};return c.reason&&(o.reason=c.reason),o}}function A2(n,l,s){for(var o=0,c="";s+o<n.length;){var h=n[s+o];if(h===l)return[c,o];c+=h,o++}return[c,o]}function R2(n,l){for(var s=[],o=0;o<n.length;){var c=A2(n,l,o),h=p2(c,2),f=h[0],p=h[1];o+=p+l.length,s.push(f.trim())}return s}function Yv(n,l,s,o){if(l){if($v(n))return o.transformEmptyObject(n,{path:s});if(Array.isArray(n))return o.transformEmptyArray(n,{path:s})}return n}function Bg(n,l){return"".concat(l?l+".":"").concat(n)}function Fv(n,l,s,o,c,h,f,p,m,g){var w=[],v=k2(n,h,f,p,m);if(v&&s&&w.push(Pv({error:"required",column:n.column,columnIndex:g.indexOf(n.column),valueType:n.type,value:l})),c)for(var x=Gv(c),y;!(y=x()).done;){var C=y.value,N=Fv(C.schemaEntry,C.value,C.isEmptyValue,C.errors,C.children,v,l,s,o,g);N&&(w=w.concat(N))}if(w.length>0)return w}function k2(n,l,s,o,c){return l===!1&&(o||c)?!1:n.required&&(typeof n.required=="boolean"?n.required:c?!1:n.required(s))}function Pv(n){var l=n.column,s=n.columnIndex,o=n.valueType,c=n.value,h=n.error,f=n.reason,p={error:h,column:l,columnIndex:s,value:c};return f&&(p.reason=f),o&&(p.type=o),p}function D2(n){for(var l=0,s=Object.keys(n);l<s.length;l++){var o=s[l],c=n[o];if(Kr(c.type)==="object"&&!Array.isArray(c.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!c.schema&&!c.column)throw new Error('"column" not defined for schema entry "'.concat(o,'".'))}Zv(n,void 0)}function Zv(n,l){if(l!==void 0&&l!==!1)throw new Error("In a schema, a nested object can have a `required` property but the only allowed value is `undefined` or `false`. Otherwise, a \"required\" error for a nested object would have to include a specific `column` title and a nested object doesn't have one. You've specified the following `required`: ".concat(l));for(var s=0,o=Object.keys(n);s<o.length;s++){var c=o[s];if($v(n[c].schema)){if(n[c].column)throw new Error("In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: ".concat(c,`. Schema:
50
+ `).concat(JSON.stringify(n[c],null,2)));Zv(n[c].schema,n[c].required)}}}function z2(n){return n==null}var U2={propertyValueWhenColumnIsMissing:void 0,propertyValueWhenCellIsEmpty:null,transformEmptyObject:function(){return null},transformEmptyArray:function(){return null},separatorCharacter:","};function M2(n){return U2}var L2={};function hl(n){"@babel/helpers - typeof";return hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},hl(n)}var B2=["schema"];function $g(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),s.push.apply(s,o)}return s}function Hg(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?$g(Object(s),!0).forEach(function(o){$2(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):$g(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function $2(n,l,s){return l=H2(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function H2(n){var l=q2(n,"string");return hl(l)==="symbol"?l:String(l)}function q2(n,l){if(hl(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(hl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function G2(n,l){if(n==null)return{};var s=I2(n,l),o,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(c=0;c<h.length;c++)o=h[c],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function I2(n,l){if(n==null)return{};var s={},o=Object.keys(n),c,h;for(h=0;h<o.length;h++)c=o[h],!(l.indexOf(c)>=0)&&(s[c]=n[c]);return s}function V2(n,l,s,o,c){var h={},f=h.schema,p=G2(h,B2);return Qw(n,l,s,Hg(Hg({},p),{},{sheets:[1]})).then(function(m){var g=m[0].data;return f?S2(g,f):g})}function Y2(n,l,s){return aw(n).then(function(o){return V2(ej,cj,o)})}function F2({existingCases:n,sourceUrl:l,onImport:s,onClose:o}){const[c,h]=F.useState(""),[f,p]=F.useState([]),[m,g]=F.useState(""),[w,v]=F.useState(!1);async function x(y){if(!(!y||w)){v(!0),g(""),h(y.name);try{const C=await P2(y),N=X2(C,n,l);if(!N.length)throw new Error("No valid Test Cases were found. Check that the file contains TC_ID or Title.");p(N)}catch(C){p([]),g(C instanceof Error?C.message:"Could not read the file.")}finally{v(!1)}}}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:y=>y.target===y.currentTarget&&o(),children:r.jsxs("section",{className:"modern-modal import-testcase-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Import Test Cases"}),r.jsx("h2",{children:"Bring an existing suite into LazyScout"}),r.jsx("p",{children:"CSV, XLSX and JSON are supported. Fields are mapped automatically."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"import-testcase-body",children:[r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:".csv,.xlsx,.json",onChange:y=>{x(y.target.files?.[0])}}),r.jsx("strong",{children:w?"Reading file…":c||"Choose a CSV, XLSX or JSON file"}),r.jsx("span",{children:"Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result"})]}),m&&r.jsx("p",{className:"import-error",children:m}),f.length>0&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"import-summary",children:[r.jsxs("b",{children:[f.length," Test Cases ready to import"]}),r.jsx("span",{children:"Duplicate IDs are replaced with a new TC-IMPORT ID."})]}),r.jsxs("div",{className:"import-preview",children:[r.jsxs("table",{children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"TC ID"}),r.jsx("th",{children:"Folder"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Tags"}),r.jsx("th",{children:"Requirements"})]})}),r.jsx("tbody",{children:f.slice(0,10).map(y=>r.jsxs("tr",{children:[r.jsx("td",{children:y.id}),r.jsx("td",{children:y.folder??y.module}),r.jsx("td",{children:y.title}),r.jsx("td",{children:(y.tags??[]).join(", ")||"—"}),r.jsx("td",{children:(y.requirements??[]).join(", ")||"—"})]},y.id))})]}),f.length>10&&r.jsxs("p",{children:["Previewing 10 of ",f.length," Test Cases."]})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",disabled:!f.length,onClick:()=>{s(f),o()},children:["Import ",f.length||""," Test Cases"]})]})]})})}async function P2(n){const l=n.name.split(".").pop()?.toLowerCase();if(l==="json"){const s=JSON.parse(await n.text());return(Array.isArray(s)?s:s&&typeof s=="object"&&Array.isArray(s.testCases)?s.testCases:[]).filter(c=>!!c&&typeof c=="object")}if(l==="csv")return qg(Z2(await n.text()));if(l==="xlsx")return qg(await Y2(n));throw new Error("Supported formats are CSV, XLSX and JSON.")}function qg(n){const[l,...s]=n;if(!l)return[];const o=l.map(c=>String(c??"").trim());return s.filter(c=>c.some(h=>h!=null&&String(h).trim())).map(c=>Object.fromEntries(o.map((h,f)=>[h||`Column_${f+1}`,c[f]??""])))}function Z2(n){const l=[];let s=[],o="",c=!1;const h=n.replace(/^\uFEFF/,"");for(let f=0;f<h.length;f++){const p=h[f];p==='"'?c&&h[f+1]==='"'?(o+='"',f++):c=!c:p===","&&!c?(s.push(o),o=""):(p===`
51
51
  `||p==="\r")&&!c?(p==="\r"&&h[f+1]===`
52
- `&&f++,s.push(o),s.some(m=>m.trim())&&l.push(s),s=[],o=""):o+=p}if(s.push(o),s.some(f=>f.trim())&&l.push(s),c)throw new Error("CSV contains an unclosed quoted value.");return l}function Y2(a,l,s){const o=new Set(l.map(f=>f.id));let c=1;const h=()=>{let f=`TC-IMPORT-${String(c).padStart(3,"0")}`;for(;o.has(f);)f=`TC-IMPORT-${String(++c).padStart(3,"0")}`;return o.add(f),c++,f};return a.map(f=>{const p=Rn(f,"TC_ID","ID","TEST_CASE_ID"),m=Rn(f,"TITLE","TEST_CASE","NAME");if(!m&&!p)return null;const g=!p||o.has(p)?h():p;o.add(g);const w=Rn(f,"MODULE")||"IMPORTED",v=$s(f,"TEST_STEPS","STEPS").map(x=>({type:"manual",description:x}));return{id:g,module:w,folder:Rn(f,"FOLDER")||w,tags:$s(f,"TAGS","TAG"),requirements:$s(f,"REQUIREMENTS","REQUIREMENT","TICKET","TICKETS"),title:m||g,preconditions:$s(f,"PRECONDITIONS","PRECONDITION"),steps:v.length?v:[{type:"manual",description:"Review imported steps"}],expectedResult:Rn(f,"EXPECTED_RESULT","EXPECTED RESULT","EXPECTED")||"Review expected result",type:F2(Rn(f,"TYPE")),priority:P2(Rn(f,"PRIORITY")),automationStatus:Z2(Rn(f,"AUTOMATION_STATUS","AUTOMATION")),sourceUrl:Rn(f,"SOURCE_URL","SOURCE URL","URL")||s||"Imported file",notes:Rn(f,"NOTES","NOTE")||"Imported into LazyScout"}}).filter(f=>!!f)}function Gg(a){return a.toUpperCase().replace(/[^A-Z0-9]/g,"")}function Rn(a,...l){const s=new Map(Object.entries(a).map(([o,c])=>[Gg(o),String(c??"").trim()]));for(const o of l){const c=s.get(Gg(o));if(c)return c}return""}function $s(a,...l){return Rn(a,...l).split(/[\n,;|]/).map(s=>s.replace(/^\s*\d+[.)-]?\s*/,"").trim()).filter(Boolean)}function F2(a){return a.toLowerCase()==="negative"?"negative":a.toLowerCase()==="validation"?"validation":"positive"}function P2(a){return a.toLowerCase()==="high"?"high":a.toLowerCase()==="low"?"low":"medium"}function Z2(a){return["ready","needs-data","needs-review","manual"].includes(a)?a:"needs-review"}function X2(a){return a?new Intl.DateTimeFormat(void 0,{dateStyle:"medium"}).format(new Date(a)):"Published on npm"}function Q2(){const[a,l]=F.useState(),[s,o]=F.useState(!0),[c,h]=F.useState(),[f,p]=F.useState(),[m,g]=F.useState(),[w,v]=F.useState(),[x,y]=F.useState();async function A(){o(!0),h(void 0);try{l(await Fx())}catch(T){h(T instanceof Error?T.message:"Could not check npm versions.")}finally{o(!1)}}F.useEffect(()=>{A()},[]);async function N(T){await navigator.clipboard.writeText(`npm install -g lazyscout@${T}`),y(T),window.setTimeout(()=>y(O=>O===T?void 0:O),1600)}async function j(T){g(T),p(void 0),v(void 0),h(void 0);try{v(await Px(T))}catch(O){h(O instanceof ir&&O.hint?`${O.message} ${O.hint}`:O instanceof Error?O.message:"Could not install this version.")}finally{g(void 0)}}return r.jsxs("section",{className:"version-center",children:[r.jsxs("header",{className:"version-center-head",children:[r.jsx("div",{className:"version-center-icon",children:"V"}),r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Version Center"}),r.jsx("h3",{children:"Choose your LazyScout version"}),r.jsx("p",{children:"Install the latest release or switch to an earlier published version before opening a workspace."})]}),r.jsx("button",{type:"button",className:"version-refresh",onClick:()=>{A()},disabled:s,children:s?"Checking…":"Check again"})]}),s&&!a?r.jsxs("div",{className:"version-loading",children:[r.jsx("span",{className:"scout-spinner"})," Checking npm Registry…"]}):a?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"version-summary",children:[r.jsxs("div",{children:[r.jsx("small",{children:"Running now"}),r.jsxs("strong",{children:["v",a.currentVersion]})]}),r.jsx("span",{className:"version-summary-arrow",children:"→"}),r.jsxs("div",{children:[r.jsx("small",{children:"Latest release"}),r.jsx("strong",{children:a.latestVersion?`v${a.latestVersion}`:"Unavailable"})]}),r.jsx("span",{className:`version-state ${a.updateAvailable?"has-update":""}`,children:a.updateAvailable?"Update available":"Up to date"})]}),r.jsx("div",{className:"version-list","aria-label":"Published LazyScout versions",children:a.versions.slice(0,3).map(T=>{const O=T.version===a.currentVersion,k=T.version===f,M=T.version===m;return r.jsxs("div",{className:`version-row ${O?"is-current":""}`,children:[r.jsxs("div",{className:"version-number",children:[r.jsxs("span",{children:["v",T.version]}),r.jsx("small",{children:X2(T.publishedAt)})]}),r.jsxs("div",{className:"version-tags",children:[T.tags.map(R=>r.jsx("span",{children:R},R)),O&&r.jsx("span",{className:"current",children:"running"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary version-copy",onClick:()=>{N(T.version)},children:x===T.version?"Copied":"Copy command"}),r.jsx("button",{type:"button",className:"btn btn-primary version-install",disabled:O||!!m,onClick:()=>p(k?void 0:T.version),children:O?"Current":M?"Installing…":"Install"}),k&&r.jsxs("div",{className:"version-confirm",children:[r.jsxs("span",{children:["Install ",r.jsxs("b",{children:["v",T.version]})," globally? Restart LazyScout after installation to use it."]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(void 0),children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>{j(T.version)},children:["Install v",T.version]})]})]},T.version)})})]}):null,a&&!a.registryAvailable&&r.jsxs("div",{className:"version-message warning",children:["npm Registry is unavailable. ",a.error]}),c&&r.jsx("div",{className:"version-message error",children:c}),w&&r.jsxs("div",{className:"version-message success",children:[r.jsxs("b",{children:["LazyScout v",w.installedVersion," installed."]}),r.jsx("span",{children:"Close the current LazyScout terminal and run `lazyscout` again to switch versions."})]})]})}function K2({projects:a,onScout:l,onEmpty:s,onOpenProject:o,onClose:c}){const[h,f]=F.useState(""),[p,m]=F.useState(a[0]?.id??""),g=h.trim()||"Untitled Test Suite";return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:w=>w.target===w.currentTarget&&c(),children:r.jsxs("section",{className:"modern-modal new-project-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"New Project"}),r.jsx("h2",{children:"Start a QA workspace"}),r.jsx("p",{children:"Choose whether to scout a website now or import an existing Test Case suite."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:c,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"new-project-modal-body",children:[r.jsx(Q2,{}),r.jsxs("label",{children:[r.jsx("span",{children:"Project name"}),r.jsx("input",{className:"field",value:h,onChange:w=>f(w.target.value),placeholder:"Example: Storefront regression",autoFocus:!0})]}),r.jsxs("div",{className:"new-project-choices",children:[r.jsxs("button",{type:"button",onClick:()=>l(g),children:[r.jsx("span",{className:"new-project-choice-icon scout",children:"◉"}),r.jsxs("span",{children:[r.jsx("b",{children:"Scout a website"}),r.jsx("small",{children:"Enter a URL, then let Playwright discover pages and create a first Test Case suite."})]}),r.jsx("em",{children:"→"})]}),a.length?r.jsxs("div",{className:"existing-project-choice",children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"↗"}),r.jsxs("div",{children:[r.jsx("b",{children:"Open existing project"}),r.jsx("small",{children:"Continue a local workspace."}),r.jsx("select",{className:"field",value:p,onChange:w=>m(w.target.value),children:a.map(w=>r.jsx("option",{value:w.id,children:w.name},w.id))})]})]}):r.jsxs("button",{type:"button",onClick:()=>s(g),children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"⇧"}),r.jsxs("span",{children:[r.jsx("b",{children:"Empty project"}),r.jsx("small",{children:"Create a blank suite for CSV, XLSX, or JSON import. You can add Test Cases manually too."})]}),r.jsx("em",{children:"→"})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:c,children:"Cancel"}),a.length>0&&r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!p,onClick:()=>p&&o(p),children:"Open project"})]})]})})}var sd={exports:{}};var Ig;function J2(){return Ig||(Ig=1,(function(a,l){(function(s){a.exports=s()})(function(){return(function s(o,c,h){function f(g,w){if(!c[g]){if(!o[g]){var v=typeof Ki=="function"&&Ki;if(!w&&v)return v(g,!0);if(p)return p(g,!0);var x=new Error("Cannot find module '"+g+"'");throw x.code="MODULE_NOT_FOUND",x}var y=c[g]={exports:{}};o[g][0].call(y.exports,function(A){var N=o[g][1][A];return f(N||A)},y,y.exports,s,o,c,h)}return c[g].exports}for(var p=typeof Ki=="function"&&Ki,m=0;m<h.length;m++)f(h[m]);return f})({1:[function(s,o,c){var h=s("./utils"),f=s("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(m){for(var g,w,v,x,y,A,N,j=[],T=0,O=m.length,k=O,M=h.getTypeOf(m)!=="string";T<m.length;)k=O-T,v=M?(g=m[T++],w=T<O?m[T++]:0,T<O?m[T++]:0):(g=m.charCodeAt(T++),w=T<O?m.charCodeAt(T++):0,T<O?m.charCodeAt(T++):0),x=g>>2,y=(3&g)<<4|w>>4,A=1<k?(15&w)<<2|v>>6:64,N=2<k?63&v:64,j.push(p.charAt(x)+p.charAt(y)+p.charAt(A)+p.charAt(N));return j.join("")},c.decode=function(m){var g,w,v,x,y,A,N=0,j=0,T="data:";if(m.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var O,k=3*(m=m.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(m.charAt(m.length-1)===p.charAt(64)&&k--,m.charAt(m.length-2)===p.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(O=f.uint8array?new Uint8Array(0|k):new Array(0|k);N<m.length;)g=p.indexOf(m.charAt(N++))<<2|(x=p.indexOf(m.charAt(N++)))>>4,w=(15&x)<<4|(y=p.indexOf(m.charAt(N++)))>>2,v=(3&y)<<6|(A=p.indexOf(m.charAt(N++))),O[j++]=g,y!==64&&(O[j++]=w),A!==64&&(O[j++]=v);return O}},{"./support":30,"./utils":32}],2:[function(s,o,c){var h=s("./external"),f=s("./stream/DataWorker"),p=s("./stream/Crc32Probe"),m=s("./stream/DataLengthProbe");function g(w,v,x,y,A){this.compressedSize=w,this.uncompressedSize=v,this.crc32=x,this.compression=y,this.compressedContent=A}g.prototype={getContentWorker:function(){var w=new f(h.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),v=this;return w.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),w},getCompressedWorker:function(){return new f(h.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},g.createWorkerFrom=function(w,v,x){return w.pipe(new p).pipe(new m("uncompressedSize")).pipe(v.compressWorker(x)).pipe(new m("compressedSize")).withStreamInfo("compression",v)},o.exports=g},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,o,c){var h=s("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(){return new h("STORE compression")},uncompressWorker:function(){return new h("STORE decompression")}},c.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,o,c){var h=s("./utils"),f=(function(){for(var p,m=[],g=0;g<256;g++){p=g;for(var w=0;w<8;w++)p=1&p?3988292384^p>>>1:p>>>1;m[g]=p}return m})();o.exports=function(p,m){return p!==void 0&&p.length?h.getTypeOf(p)!=="string"?(function(g,w,v,x){var y=f,A=x+v;g^=-1;for(var N=x;N<A;N++)g=g>>>8^y[255&(g^w[N])];return-1^g})(0|m,p,p.length,0):(function(g,w,v,x){var y=f,A=x+v;g^=-1;for(var N=x;N<A;N++)g=g>>>8^y[255&(g^w.charCodeAt(N))];return-1^g})(0|m,p,p.length,0):0}},{"./utils":32}],5:[function(s,o,c){c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(s,o,c){var h=null;h=typeof Promise<"u"?Promise:s("lie"),o.exports={Promise:h}},{lie:37}],7:[function(s,o,c){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",f=s("pako"),p=s("./utils"),m=s("./stream/GenericWorker"),g=h?"uint8array":"array";function w(v,x){m.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=x,this.meta={}}c.magic="\b\0",p.inherits(w,m),w.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(g,v.data),!1)},w.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},w.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},w.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(x){v.push({data:x,meta:v.meta})}},c.compressWorker=function(v){return new w("Deflate",v)},c.uncompressWorker=function(){return new w("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,o,c){function h(y,A){var N,j="";for(N=0;N<A;N++)j+=String.fromCharCode(255&y),y>>>=8;return j}function f(y,A,N,j,T,O){var k,M,R=y.file,B=y.compression,H=O!==g.utf8encode,ae=p.transformTo("string",O(R.name)),W=p.transformTo("string",g.utf8encode(R.name)),ne=R.comment,se=p.transformTo("string",O(ne)),q=p.transformTo("string",g.utf8encode(ne)),G=W.length!==R.name.length,E=q.length!==ne.length,X="",V="",P="",Q=R.dir,D=R.date,I={crc32:0,compressedSize:0,uncompressedSize:0};A&&!N||(I.crc32=y.crc32,I.compressedSize=y.compressedSize,I.uncompressedSize=y.uncompressedSize);var S=0;A&&(S|=8),H||!G&&!E||(S|=2048);var C=0,$=0;Q&&(C|=16),T==="UNIX"?($=798,C|=(function(ie,ye){var _e=ie;return ie||(_e=ye?16893:33204),(65535&_e)<<16})(R.unixPermissions,Q)):($=20,C|=(function(ie){return 63&(ie||0)})(R.dosPermissions)),k=D.getUTCHours(),k<<=6,k|=D.getUTCMinutes(),k<<=5,k|=D.getUTCSeconds()/2,M=D.getUTCFullYear()-1980,M<<=4,M|=D.getUTCMonth()+1,M<<=5,M|=D.getUTCDate(),G&&(V=h(1,1)+h(w(ae),4)+W,X+="up"+h(V.length,2)+V),E&&(P=h(1,1)+h(w(se),4)+q,X+="uc"+h(P.length,2)+P);var K="";return K+=`
53
- \0`,K+=h(S,2),K+=B.magic,K+=h(k,2),K+=h(M,2),K+=h(I.crc32,4),K+=h(I.compressedSize,4),K+=h(I.uncompressedSize,4),K+=h(ae.length,2),K+=h(X.length,2),{fileRecord:v.LOCAL_FILE_HEADER+K+ae+X,dirRecord:v.CENTRAL_FILE_HEADER+h($,2)+K+h(se.length,2)+"\0\0\0\0"+h(C,4)+h(j,4)+ae+X+se}}var p=s("../utils"),m=s("../stream/GenericWorker"),g=s("../utf8"),w=s("../crc32"),v=s("../signature");function x(y,A,N,j){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=A,this.zipPlatform=N,this.encodeFileName=j,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(x,m),x.prototype.push=function(y){var A=y.meta.percent||0,N=this.entriesCount,j=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,m.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:N?(A+100*(N-j-1))/N:100}}))},x.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var A=this.streamFiles&&!y.file.dir;if(A){var N=f(y,A,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(y){this.accumulate=!1;var A=this.streamFiles&&!y.file.dir,N=f(y,A,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),A)this.push({data:(function(j){return v.DATA_DESCRIPTOR+h(j.crc32,4)+h(j.compressedSize,4)+h(j.uncompressedSize,4)})(y),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var y=this.bytesWritten,A=0;A<this.dirRecords.length;A++)this.push({data:this.dirRecords[A],meta:{percent:100}});var N=this.bytesWritten-y,j=(function(T,O,k,M,R){var B=p.transformTo("string",R(M));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+h(T,2)+h(T,2)+h(O,4)+h(k,4)+h(B.length,2)+B})(this.dirRecords.length,N,y,this.zipComment,this.encodeFileName);this.push({data:j,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(y){this._sources.push(y);var A=this;return y.on("data",function(N){A.processChunk(N)}),y.on("end",function(){A.closedSource(A.previous.streamInfo),A._sources.length?A.prepareNextSource():A.end()}),y.on("error",function(N){A.error(N)}),this},x.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(y){var A=this._sources;if(!m.prototype.error.call(this,y))return!1;for(var N=0;N<A.length;N++)try{A[N].error(y)}catch{}return!0},x.prototype.lock=function(){m.prototype.lock.call(this);for(var y=this._sources,A=0;A<y.length;A++)y[A].lock()},o.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,o,c){var h=s("../compressions"),f=s("./ZipFileWorker");c.generateWorker=function(p,m,g){var w=new f(m.streamFiles,g,m.platform,m.encodeFileName),v=0;try{p.forEach(function(x,y){v++;var A=(function(O,k){var M=O||k,R=h[M];if(!R)throw new Error(M+" is not a valid compression method !");return R})(y.options.compression,m.compression),N=y.options.compressionOptions||m.compressionOptions||{},j=y.dir,T=y.date;y._compressWorker(A,N).withStreamInfo("file",{name:x,dir:j,date:T,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(w)}),w.entriesCount=v}catch(x){w.error(x)}return w}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,o,c){function h(){if(!(this instanceof h))return new h;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var f=new h;for(var p in this)typeof this[p]!="function"&&(f[p]=this[p]);return f}}(h.prototype=s("./object")).loadAsync=s("./load"),h.support=s("./support"),h.defaults=s("./defaults"),h.version="3.10.1",h.loadAsync=function(f,p){return new h().loadAsync(f,p)},h.external=s("./external"),o.exports=h},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,o,c){var h=s("./utils"),f=s("./external"),p=s("./utf8"),m=s("./zipEntries"),g=s("./stream/Crc32Probe"),w=s("./nodejsUtils");function v(x){return new f.Promise(function(y,A){var N=x.decompressed.getContentWorker().pipe(new g);N.on("error",function(j){A(j)}).on("end",function(){N.streamInfo.crc32!==x.decompressed.crc32?A(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}o.exports=function(x,y){var A=this;return y=h.extend(y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:p.utf8decode}),w.isNode&&w.isStream(x)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):h.prepareContent("the loaded zip file",x,!0,y.optimizedBinaryString,y.base64).then(function(N){var j=new m(y);return j.load(N),j}).then(function(N){var j=[f.Promise.resolve(N)],T=N.files;if(y.checkCRC32)for(var O=0;O<T.length;O++)j.push(v(T[O]));return f.Promise.all(j)}).then(function(N){for(var j=N.shift(),T=j.files,O=0;O<T.length;O++){var k=T[O],M=k.fileNameStr,R=h.resolve(k.fileNameStr);A.file(R,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:y.createFolders}),k.dir||(A.file(R).unsafeOriginalName=M)}return j.zipComment.length&&(A.comment=j.zipComment),A})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,o,c){var h=s("../utils"),f=s("../stream/GenericWorker");function p(m,g){f.call(this,"Nodejs stream input adapter for "+m),this._upstreamEnded=!1,this._bindStream(g)}h.inherits(p,f),p.prototype._bindStream=function(m){var g=this;(this._stream=m).pause(),m.on("data",function(w){g.push({data:w,meta:{percent:0}})}).on("error",function(w){g.isPaused?this.generatedError=w:g.error(w)}).on("end",function(){g.isPaused?g._upstreamEnded=!0:g.end()})},p.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=p},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,o,c){var h=s("readable-stream").Readable;function f(p,m,g){h.call(this,m),this._helper=p;var w=this;p.on("data",function(v,x){w.push(v)||w._helper.pause(),g&&g(x)}).on("error",function(v){w.emit("error",v)}).on("end",function(){w.push(null)})}s("../utils").inherits(f,h),f.prototype._read=function(){this._helper.resume()},o.exports=f},{"../utils":32,"readable-stream":16}],14:[function(s,o,c){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(h,f){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(h,f);if(typeof h=="number")throw new Error('The "data" argument must not be a number');return new Buffer(h,f)},allocBuffer:function(h){if(Buffer.alloc)return Buffer.alloc(h);var f=new Buffer(h);return f.fill(0),f},isBuffer:function(h){return Buffer.isBuffer(h)},isStream:function(h){return h&&typeof h.on=="function"&&typeof h.pause=="function"&&typeof h.resume=="function"}}},{}],15:[function(s,o,c){function h(R,B,H){var ae,W=p.getTypeOf(B),ne=p.extend(H||{},w);ne.date=ne.date||new Date,ne.compression!==null&&(ne.compression=ne.compression.toUpperCase()),typeof ne.unixPermissions=="string"&&(ne.unixPermissions=parseInt(ne.unixPermissions,8)),ne.unixPermissions&&16384&ne.unixPermissions&&(ne.dir=!0),ne.dosPermissions&&16&ne.dosPermissions&&(ne.dir=!0),ne.dir&&(R=T(R)),ne.createFolders&&(ae=j(R))&&O.call(this,ae,!0);var se=W==="string"&&ne.binary===!1&&ne.base64===!1;H&&H.binary!==void 0||(ne.binary=!se),(B instanceof v&&B.uncompressedSize===0||ne.dir||!B||B.length===0)&&(ne.base64=!1,ne.binary=!0,B="",ne.compression="STORE",W="string");var q=null;q=B instanceof v||B instanceof m?B:A.isNode&&A.isStream(B)?new N(R,B):p.prepareContent(R,B,ne.binary,ne.optimizedBinaryString,ne.base64);var G=new x(R,q,ne);this.files[R]=G}var f=s("./utf8"),p=s("./utils"),m=s("./stream/GenericWorker"),g=s("./stream/StreamHelper"),w=s("./defaults"),v=s("./compressedObject"),x=s("./zipObject"),y=s("./generate"),A=s("./nodejsUtils"),N=s("./nodejs/NodejsStreamInputAdapter"),j=function(R){R.slice(-1)==="/"&&(R=R.substring(0,R.length-1));var B=R.lastIndexOf("/");return 0<B?R.substring(0,B):""},T=function(R){return R.slice(-1)!=="/"&&(R+="/"),R},O=function(R,B){return B=B!==void 0?B:w.createFolders,R=T(R),this.files[R]||h.call(this,R,null,{dir:!0,createFolders:B}),this.files[R]};function k(R){return Object.prototype.toString.call(R)==="[object RegExp]"}var M={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(R){var B,H,ae;for(B in this.files)ae=this.files[B],(H=B.slice(this.root.length,B.length))&&B.slice(0,this.root.length)===this.root&&R(H,ae)},filter:function(R){var B=[];return this.forEach(function(H,ae){R(H,ae)&&B.push(ae)}),B},file:function(R,B,H){if(arguments.length!==1)return R=this.root+R,h.call(this,R,B,H),this;if(k(R)){var ae=R;return this.filter(function(ne,se){return!se.dir&&ae.test(ne)})}var W=this.files[this.root+R];return W&&!W.dir?W:null},folder:function(R){if(!R)return this;if(k(R))return this.filter(function(W,ne){return ne.dir&&R.test(W)});var B=this.root+R,H=O.call(this,B),ae=this.clone();return ae.root=H.name,ae},remove:function(R){R=this.root+R;var B=this.files[R];if(B||(R.slice(-1)!=="/"&&(R+="/"),B=this.files[R]),B&&!B.dir)delete this.files[R];else for(var H=this.filter(function(W,ne){return ne.name.slice(0,R.length)===R}),ae=0;ae<H.length;ae++)delete this.files[H[ae].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(R){var B,H={};try{if((H=p.extend(R||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:f.utf8encode})).type=H.type.toLowerCase(),H.compression=H.compression.toUpperCase(),H.type==="binarystring"&&(H.type="string"),!H.type)throw new Error("No output type specified.");p.checkSupport(H.type),H.platform!=="darwin"&&H.platform!=="freebsd"&&H.platform!=="linux"&&H.platform!=="sunos"||(H.platform="UNIX"),H.platform==="win32"&&(H.platform="DOS");var ae=H.comment||this.comment||"";B=y.generateWorker(this,H,ae)}catch(W){(B=new m("error")).error(W)}return new g(B,H.type||"string",H.mimeType)},generateAsync:function(R,B){return this.generateInternalStream(R).accumulate(B)},generateNodeStream:function(R,B){return(R=R||{}).type||(R.type="nodebuffer"),this.generateInternalStream(R).toNodejsStream(B)}};o.exports=M},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,o,c){o.exports=s("stream")},{stream:void 0}],17:[function(s,o,c){var h=s("./DataReader");function f(p){h.call(this,p);for(var m=0;m<this.data.length;m++)p[m]=255&p[m]}s("../utils").inherits(f,h),f.prototype.byteAt=function(p){return this.data[this.zero+p]},f.prototype.lastIndexOfSignature=function(p){for(var m=p.charCodeAt(0),g=p.charCodeAt(1),w=p.charCodeAt(2),v=p.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===m&&this.data[x+1]===g&&this.data[x+2]===w&&this.data[x+3]===v)return x-this.zero;return-1},f.prototype.readAndCheckSignature=function(p){var m=p.charCodeAt(0),g=p.charCodeAt(1),w=p.charCodeAt(2),v=p.charCodeAt(3),x=this.readData(4);return m===x[0]&&g===x[1]&&w===x[2]&&v===x[3]},f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],18:[function(s,o,c){var h=s("../utils");function f(p){this.data=p,this.length=p.length,this.index=0,this.zero=0}f.prototype={checkOffset:function(p){this.checkIndex(this.index+p)},checkIndex:function(p){if(this.length<this.zero+p||p<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+p+"). Corrupted zip ?")},setIndex:function(p){this.checkIndex(p),this.index=p},skip:function(p){this.setIndex(this.index+p)},byteAt:function(){},readInt:function(p){var m,g=0;for(this.checkOffset(p),m=this.index+p-1;m>=this.index;m--)g=(g<<8)+this.byteAt(m);return this.index+=p,g},readString:function(p){return h.transformTo("string",this.readData(p))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var p=this.readInt(4);return new Date(Date.UTC(1980+(p>>25&127),(p>>21&15)-1,p>>16&31,p>>11&31,p>>5&63,(31&p)<<1))}},o.exports=f},{"../utils":32}],19:[function(s,o,c){var h=s("./Uint8ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,o,c){var h=s("./DataReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.byteAt=function(p){return this.data.charCodeAt(this.zero+p)},f.prototype.lastIndexOfSignature=function(p){return this.data.lastIndexOf(p)-this.zero},f.prototype.readAndCheckSignature=function(p){return p===this.readData(4)},f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],21:[function(s,o,c){var h=s("./ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(s,o,c){var h=s("../utils"),f=s("../support"),p=s("./ArrayReader"),m=s("./StringReader"),g=s("./NodeBufferReader"),w=s("./Uint8ArrayReader");o.exports=function(v){var x=h.getTypeOf(v);return h.checkSupport(x),x!=="string"||f.uint8array?x==="nodebuffer"?new g(v):f.uint8array?new w(h.transformTo("uint8array",v)):new p(h.transformTo("array",v)):new m(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,o,c){c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,o,c){var h=s("./GenericWorker"),f=s("../utils");function p(m){h.call(this,"ConvertWorker to "+m),this.destType=m}f.inherits(p,h),p.prototype.processChunk=function(m){this.push({data:f.transformTo(this.destType,m.data),meta:m.meta})},o.exports=p},{"../utils":32,"./GenericWorker":28}],25:[function(s,o,c){var h=s("./GenericWorker"),f=s("../crc32");function p(){h.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(p,h),p.prototype.processChunk=function(m){this.streamInfo.crc32=f(m.data,this.streamInfo.crc32||0),this.push(m)},o.exports=p},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,o,c){var h=s("../utils"),f=s("./GenericWorker");function p(m){f.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}h.inherits(p,f),p.prototype.processChunk=function(m){if(m){var g=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=g+m.data.length}f.prototype.processChunk.call(this,m)},o.exports=p},{"../utils":32,"./GenericWorker":28}],27:[function(s,o,c){var h=s("../utils"),f=s("./GenericWorker");function p(m){f.call(this,"DataWorker");var g=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(w){g.dataIsReady=!0,g.data=w,g.max=w&&w.length||0,g.type=h.getTypeOf(w),g.isPaused||g._tickAndRepeat()},function(w){g.error(w)})}h.inherits(p,f),p.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,h.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(h.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},p.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,g=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,g);break;case"uint8array":m=this.data.subarray(this.index,g);break;case"array":case"nodebuffer":m=this.data.slice(this.index,g)}return this.index=g,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=p},{"../utils":32,"./GenericWorker":28}],28:[function(s,o,c){function h(f){this.name=f||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}h.prototype={push:function(f){this.emit("data",f)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(f){this.emit("error",f)}return!0},error:function(f){return!this.isFinished&&(this.isPaused?this.generatedError=f:(this.isFinished=!0,this.emit("error",f),this.previous&&this.previous.error(f),this.cleanUp()),!0)},on:function(f,p){return this._listeners[f].push(p),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(f,p){if(this._listeners[f])for(var m=0;m<this._listeners[f].length;m++)this._listeners[f][m].call(this,p)},pipe:function(f){return f.registerPrevious(this)},registerPrevious:function(f){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=f.streamInfo,this.mergeStreamInfo(),this.previous=f;var p=this;return f.on("data",function(m){p.processChunk(m)}),f.on("end",function(){p.end()}),f.on("error",function(m){p.error(m)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var f=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),f=!0),this.previous&&this.previous.resume(),!f},flush:function(){},processChunk:function(f){this.push(f)},withStreamInfo:function(f,p){return this.extraStreamInfo[f]=p,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var f in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,f)&&(this.streamInfo[f]=this.extraStreamInfo[f])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var f="Worker "+this.name;return this.previous?this.previous+" -> "+f:f}},o.exports=h},{}],29:[function(s,o,c){var h=s("../utils"),f=s("./ConvertWorker"),p=s("./GenericWorker"),m=s("../base64"),g=s("../support"),w=s("../external"),v=null;if(g.nodestream)try{v=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(A,N){return new w.Promise(function(j,T){var O=[],k=A._internalType,M=A._outputType,R=A._mimeType;A.on("data",function(B,H){O.push(B),N&&N(H)}).on("error",function(B){O=[],T(B)}).on("end",function(){try{var B=(function(H,ae,W){switch(H){case"blob":return h.newBlob(h.transformTo("arraybuffer",ae),W);case"base64":return m.encode(ae);default:return h.transformTo(H,ae)}})(M,(function(H,ae){var W,ne=0,se=null,q=0;for(W=0;W<ae.length;W++)q+=ae[W].length;switch(H){case"string":return ae.join("");case"array":return Array.prototype.concat.apply([],ae);case"uint8array":for(se=new Uint8Array(q),W=0;W<ae.length;W++)se.set(ae[W],ne),ne+=ae[W].length;return se;case"nodebuffer":return Buffer.concat(ae);default:throw new Error("concat : unsupported type '"+H+"'")}})(k,O),R);j(B)}catch(H){T(H)}O=[]}).resume()})}function y(A,N,j){var T=N;switch(N){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=N,this._mimeType=j,h.checkSupport(T),this._worker=A.pipe(new f(T)),A.lock()}catch(O){this._worker=new p("error"),this._worker.error(O)}}y.prototype={accumulate:function(A){return x(this,A)},on:function(A,N){var j=this;return A==="data"?this._worker.on(A,function(T){N.call(j,T.data,T.meta)}):this._worker.on(A,function(){h.delay(N,arguments,j)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(A){if(h.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},A)}},o.exports=y},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,o,c){if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",c.nodebuffer=typeof Buffer<"u",c.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")c.blob=!1;else{var h=new ArrayBuffer(0);try{c.blob=new Blob([h],{type:"application/zip"}).size===0}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);f.append(h),c.blob=f.getBlob("application/zip").size===0}catch{c.blob=!1}}}try{c.nodestream=!!s("readable-stream").Readable}catch{c.nodestream=!1}},{"readable-stream":16}],31:[function(s,o,c){for(var h=s("./utils"),f=s("./support"),p=s("./nodejsUtils"),m=s("./stream/GenericWorker"),g=new Array(256),w=0;w<256;w++)g[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;g[254]=g[254]=1;function v(){m.call(this,"utf-8 decode"),this.leftOver=null}function x(){m.call(this,"utf-8 encode")}c.utf8encode=function(y){return f.nodebuffer?p.newBufferFrom(y,"utf-8"):(function(A){var N,j,T,O,k,M=A.length,R=0;for(O=0;O<M;O++)(64512&(j=A.charCodeAt(O)))==55296&&O+1<M&&(64512&(T=A.charCodeAt(O+1)))==56320&&(j=65536+(j-55296<<10)+(T-56320),O++),R+=j<128?1:j<2048?2:j<65536?3:4;for(N=f.uint8array?new Uint8Array(R):new Array(R),O=k=0;k<R;O++)(64512&(j=A.charCodeAt(O)))==55296&&O+1<M&&(64512&(T=A.charCodeAt(O+1)))==56320&&(j=65536+(j-55296<<10)+(T-56320),O++),j<128?N[k++]=j:(j<2048?N[k++]=192|j>>>6:(j<65536?N[k++]=224|j>>>12:(N[k++]=240|j>>>18,N[k++]=128|j>>>12&63),N[k++]=128|j>>>6&63),N[k++]=128|63&j);return N})(y)},c.utf8decode=function(y){return f.nodebuffer?h.transformTo("nodebuffer",y).toString("utf-8"):(function(A){var N,j,T,O,k=A.length,M=new Array(2*k);for(N=j=0;N<k;)if((T=A[N++])<128)M[j++]=T;else if(4<(O=g[T]))M[j++]=65533,N+=O-1;else{for(T&=O===2?31:O===3?15:7;1<O&&N<k;)T=T<<6|63&A[N++],O--;1<O?M[j++]=65533:T<65536?M[j++]=T:(T-=65536,M[j++]=55296|T>>10&1023,M[j++]=56320|1023&T)}return M.length!==j&&(M.subarray?M=M.subarray(0,j):M.length=j),h.applyFromCharCode(M)})(y=h.transformTo(f.uint8array?"uint8array":"array",y))},h.inherits(v,m),v.prototype.processChunk=function(y){var A=h.transformTo(f.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var N=A;(A=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),A.set(N,this.leftOver.length)}else A=this.leftOver.concat(A);this.leftOver=null}var j=(function(O,k){var M;for((k=k||O.length)>O.length&&(k=O.length),M=k-1;0<=M&&(192&O[M])==128;)M--;return M<0||M===0?k:M+g[O[M]]>k?M:k})(A),T=A;j!==A.length&&(f.uint8array?(T=A.subarray(0,j),this.leftOver=A.subarray(j,A.length)):(T=A.slice(0,j),this.leftOver=A.slice(j,A.length))),this.push({data:c.utf8decode(T),meta:y.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=v,h.inherits(x,m),x.prototype.processChunk=function(y){this.push({data:c.utf8encode(y.data),meta:y.meta})},c.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,o,c){var h=s("./support"),f=s("./base64"),p=s("./nodejsUtils"),m=s("./external");function g(N){return N}function w(N,j){for(var T=0;T<N.length;++T)j[T]=255&N.charCodeAt(T);return j}s("setimmediate"),c.newBlob=function(N,j){c.checkSupport("blob");try{return new Blob([N],{type:j})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(N),T.getBlob(j)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(N,j,T){var O=[],k=0,M=N.length;if(M<=T)return String.fromCharCode.apply(null,N);for(;k<M;)j==="array"||j==="nodebuffer"?O.push(String.fromCharCode.apply(null,N.slice(k,Math.min(k+T,M)))):O.push(String.fromCharCode.apply(null,N.subarray(k,Math.min(k+T,M)))),k+=T;return O.join("")},stringifyByChar:function(N){for(var j="",T=0;T<N.length;T++)j+=String.fromCharCode(N[T]);return j},applyCanBeUsed:{uint8array:(function(){try{return h.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return h.nodebuffer&&String.fromCharCode.apply(null,p.allocBuffer(1)).length===1}catch{return!1}})()}};function x(N){var j=65536,T=c.getTypeOf(N),O=!0;if(T==="uint8array"?O=v.applyCanBeUsed.uint8array:T==="nodebuffer"&&(O=v.applyCanBeUsed.nodebuffer),O)for(;1<j;)try{return v.stringifyByChunk(N,T,j)}catch{j=Math.floor(j/2)}return v.stringifyByChar(N)}function y(N,j){for(var T=0;T<N.length;T++)j[T]=N[T];return j}c.applyFromCharCode=x;var A={};A.string={string:g,array:function(N){return w(N,new Array(N.length))},arraybuffer:function(N){return A.string.uint8array(N).buffer},uint8array:function(N){return w(N,new Uint8Array(N.length))},nodebuffer:function(N){return w(N,p.allocBuffer(N.length))}},A.array={string:x,array:g,arraybuffer:function(N){return new Uint8Array(N).buffer},uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(N)}},A.arraybuffer={string:function(N){return x(new Uint8Array(N))},array:function(N){return y(new Uint8Array(N),new Array(N.byteLength))},arraybuffer:g,uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(new Uint8Array(N))}},A.uint8array={string:x,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return N.buffer},uint8array:g,nodebuffer:function(N){return p.newBufferFrom(N)}},A.nodebuffer={string:x,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return A.nodebuffer.uint8array(N).buffer},uint8array:function(N){return y(N,new Uint8Array(N.length))},nodebuffer:g},c.transformTo=function(N,j){if(j=j||"",!N)return j;c.checkSupport(N);var T=c.getTypeOf(j);return A[T][N](j)},c.resolve=function(N){for(var j=N.split("/"),T=[],O=0;O<j.length;O++){var k=j[O];k==="."||k===""&&O!==0&&O!==j.length-1||(k===".."?T.pop():T.push(k))}return T.join("/")},c.getTypeOf=function(N){return typeof N=="string"?"string":Object.prototype.toString.call(N)==="[object Array]"?"array":h.nodebuffer&&p.isBuffer(N)?"nodebuffer":h.uint8array&&N instanceof Uint8Array?"uint8array":h.arraybuffer&&N instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(N){if(!h[N.toLowerCase()])throw new Error(N+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(N){var j,T,O="";for(T=0;T<(N||"").length;T++)O+="\\x"+((j=N.charCodeAt(T))<16?"0":"")+j.toString(16).toUpperCase();return O},c.delay=function(N,j,T){setImmediate(function(){N.apply(T||null,j||[])})},c.inherits=function(N,j){function T(){}T.prototype=j.prototype,N.prototype=new T},c.extend=function(){var N,j,T={};for(N=0;N<arguments.length;N++)for(j in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],j)&&T[j]===void 0&&(T[j]=arguments[N][j]);return T},c.prepareContent=function(N,j,T,O,k){return m.Promise.resolve(j).then(function(M){return h.blob&&(M instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(M))!==-1)&&typeof FileReader<"u"?new m.Promise(function(R,B){var H=new FileReader;H.onload=function(ae){R(ae.target.result)},H.onerror=function(ae){B(ae.target.error)},H.readAsArrayBuffer(M)}):M}).then(function(M){var R=c.getTypeOf(M);return R?(R==="arraybuffer"?M=c.transformTo("uint8array",M):R==="string"&&(k?M=f.decode(M):T&&O!==!0&&(M=(function(B){return w(B,h.uint8array?new Uint8Array(B.length):new Array(B.length))})(M))),M):m.Promise.reject(new Error("Can't read the data of '"+N+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,o,c){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./signature"),m=s("./zipEntry"),g=s("./support");function w(v){this.files=[],this.loadOptions=v}w.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var x=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(x)+", expected "+f.pretty(v)+")")}},isSignature:function(v,x){var y=this.reader.index;this.reader.setIndex(v);var A=this.reader.readString(4)===x;return this.reader.setIndex(y),A},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var v=this.reader.readData(this.zipCommentLength),x=g.uint8array?"uint8array":"array",y=f.transformTo(x,v);this.zipComment=this.loadOptions.decodeFileName(y)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var v,x,y,A=this.zip64EndOfCentralSize-44;0<A;)v=this.reader.readInt(2),x=this.reader.readInt(4),y=this.reader.readData(x),this.zip64ExtensibleData[v]={id:v,length:x,value:y}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var v,x;for(v=0;v<this.files.length;v++)x=this.files[v],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(p.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(p.CENTRAL_FILE_HEADER);)(v=new m({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(v);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var v=this.reader.lastIndexOfSignature(p.CENTRAL_DIRECTORY_END);if(v<0)throw this.isSignature(0,p.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(v);var x=v;if(this.checkSignature(p.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,(v=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(v),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,p.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var A=x-y;if(0<A)this.isSignature(x,p.CENTRAL_FILE_HEADER)||(this.reader.zero=A);else if(A<0)throw new Error("Corrupted zip: missing "+Math.abs(A)+" bytes.")},prepareReader:function(v){this.reader=h(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=w},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,o,c){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./compressedObject"),m=s("./crc32"),g=s("./utf8"),w=s("./compressions"),v=s("./support");function x(y,A){this.options=y,this.loadOptions=A}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var A,N;if(y.skip(22),this.fileNameLength=y.readInt(2),N=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.skip(N),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((A=(function(j){for(var T in w)if(Object.prototype.hasOwnProperty.call(w,T)&&w[T].magic===j)return w[T];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new p(this.compressedSize,this.uncompressedSize,this.crc32,A,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var A=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(A),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=h(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var A,N,j,T=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<T;)A=y.readInt(2),N=y.readInt(2),j=y.readData(N),this.extraFields[A]={id:A,length:N,value:j};y.setIndex(T)},handleUTF8:function(){var y=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=g.utf8decode(this.fileName),this.fileCommentStr=g.utf8decode(this.fileComment);else{var A=this.findExtraFieldUnicodePath();if(A!==null)this.fileNameStr=A;else{var N=f.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(N)}var j=this.findExtraFieldUnicodeComment();if(j!==null)this.fileCommentStr=j;else{var T=f.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var A=h(y.value);return A.readInt(1)!==1||m(this.fileName)!==A.readInt(4)?null:g.utf8decode(A.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var A=h(y.value);return A.readInt(1)!==1||m(this.fileComment)!==A.readInt(4)?null:g.utf8decode(A.readData(y.length-5))}return null}},o.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,o,c){function h(A,N,j){this.name=A,this.dir=j.dir,this.date=j.date,this.comment=j.comment,this.unixPermissions=j.unixPermissions,this.dosPermissions=j.dosPermissions,this._data=N,this._dataBinary=j.binary,this.options={compression:j.compression,compressionOptions:j.compressionOptions}}var f=s("./stream/StreamHelper"),p=s("./stream/DataWorker"),m=s("./utf8"),g=s("./compressedObject"),w=s("./stream/GenericWorker");h.prototype={internalStream:function(A){var N=null,j="string";try{if(!A)throw new Error("No output type specified.");var T=(j=A.toLowerCase())==="string"||j==="text";j!=="binarystring"&&j!=="text"||(j="string"),N=this._decompressWorker();var O=!this._dataBinary;O&&!T&&(N=N.pipe(new m.Utf8EncodeWorker)),!O&&T&&(N=N.pipe(new m.Utf8DecodeWorker))}catch(k){(N=new w("error")).error(k)}return new f(N,j,"")},async:function(A,N){return this.internalStream(A).accumulate(N)},nodeStream:function(A,N){return this.internalStream(A||"nodebuffer").toNodejsStream(N)},_compressWorker:function(A,N){if(this._data instanceof g&&this._data.compression.magic===A.magic)return this._data.getCompressedWorker();var j=this._decompressWorker();return this._dataBinary||(j=j.pipe(new m.Utf8EncodeWorker)),g.createWorkerFrom(j,A,N)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof w?this._data:new p(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],x=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<v.length;y++)h.prototype[v[y]]=x;o.exports=h},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,o,c){(function(h){var f,p,m=h.MutationObserver||h.WebKitMutationObserver;if(m){var g=0,w=new m(A),v=h.document.createTextNode("");w.observe(v,{characterData:!0}),f=function(){v.data=g=++g%2}}else if(h.setImmediate||h.MessageChannel===void 0)f="document"in h&&"onreadystatechange"in h.document.createElement("script")?function(){var N=h.document.createElement("script");N.onreadystatechange=function(){A(),N.onreadystatechange=null,N.parentNode.removeChild(N),N=null},h.document.documentElement.appendChild(N)}:function(){setTimeout(A,0)};else{var x=new h.MessageChannel;x.port1.onmessage=A,f=function(){x.port2.postMessage(0)}}var y=[];function A(){var N,j;p=!0;for(var T=y.length;T;){for(j=y,y=[],N=-1;++N<T;)j[N]();T=y.length}p=!1}o.exports=function(N){y.push(N)!==1||p||f()}}).call(this,typeof zs<"u"?zs:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,o,c){var h=s("immediate");function f(){}var p={},m=["REJECTED"],g=["FULFILLED"],w=["PENDING"];function v(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,T!==f&&N(this,T)}function x(T,O,k){this.promise=T,typeof O=="function"&&(this.onFulfilled=O,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function y(T,O,k){h(function(){var M;try{M=O(k)}catch(R){return p.reject(T,R)}M===T?p.reject(T,new TypeError("Cannot resolve promise with itself")):p.resolve(T,M)})}function A(T){var O=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof O=="function")return function(){O.apply(T,arguments)}}function N(T,O){var k=!1;function M(H){k||(k=!0,p.reject(T,H))}function R(H){k||(k=!0,p.resolve(T,H))}var B=j(function(){O(R,M)});B.status==="error"&&M(B.value)}function j(T,O){var k={};try{k.value=T(O),k.status="success"}catch(M){k.status="error",k.value=M}return k}(o.exports=v).prototype.finally=function(T){if(typeof T!="function")return this;var O=this.constructor;return this.then(function(k){return O.resolve(T()).then(function(){return k})},function(k){return O.resolve(T()).then(function(){throw k})})},v.prototype.catch=function(T){return this.then(null,T)},v.prototype.then=function(T,O){if(typeof T!="function"&&this.state===g||typeof O!="function"&&this.state===m)return this;var k=new this.constructor(f);return this.state!==w?y(k,this.state===g?T:O,this.outcome):this.queue.push(new x(k,T,O)),k},x.prototype.callFulfilled=function(T){p.resolve(this.promise,T)},x.prototype.otherCallFulfilled=function(T){y(this.promise,this.onFulfilled,T)},x.prototype.callRejected=function(T){p.reject(this.promise,T)},x.prototype.otherCallRejected=function(T){y(this.promise,this.onRejected,T)},p.resolve=function(T,O){var k=j(A,O);if(k.status==="error")return p.reject(T,k.value);var M=k.value;if(M)N(T,M);else{T.state=g,T.outcome=O;for(var R=-1,B=T.queue.length;++R<B;)T.queue[R].callFulfilled(O)}return T},p.reject=function(T,O){T.state=m,T.outcome=O;for(var k=-1,M=T.queue.length;++k<M;)T.queue[k].callRejected(O);return T},v.resolve=function(T){return T instanceof this?T:p.resolve(new this(f),T)},v.reject=function(T){var O=new this(f);return p.reject(O,T)},v.all=function(T){var O=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=T.length,M=!1;if(!k)return this.resolve([]);for(var R=new Array(k),B=0,H=-1,ae=new this(f);++H<k;)W(T[H],H);return ae;function W(ne,se){O.resolve(ne).then(function(q){R[se]=q,++B!==k||M||(M=!0,p.resolve(ae,R))},function(q){M||(M=!0,p.reject(ae,q))})}},v.race=function(T){var O=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=T.length,M=!1;if(!k)return this.resolve([]);for(var R=-1,B=new this(f);++R<k;)H=T[R],O.resolve(H).then(function(ae){M||(M=!0,p.resolve(B,ae))},function(ae){M||(M=!0,p.reject(B,ae))});var H;return B}},{immediate:36}],38:[function(s,o,c){var h={};(0,s("./lib/utils/common").assign)(h,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),o.exports=h},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,o,c){var h=s("./zlib/deflate"),f=s("./utils/common"),p=s("./utils/strings"),m=s("./zlib/messages"),g=s("./zlib/zstream"),w=Object.prototype.toString,v=0,x=-1,y=0,A=8;function N(T){if(!(this instanceof N))return new N(T);this.options=f.assign({level:x,method:A,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},T||{});var O=this.options;O.raw&&0<O.windowBits?O.windowBits=-O.windowBits:O.gzip&&0<O.windowBits&&O.windowBits<16&&(O.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var k=h.deflateInit2(this.strm,O.level,O.method,O.windowBits,O.memLevel,O.strategy);if(k!==v)throw new Error(m[k]);if(O.header&&h.deflateSetHeader(this.strm,O.header),O.dictionary){var M;if(M=typeof O.dictionary=="string"?p.string2buf(O.dictionary):w.call(O.dictionary)==="[object ArrayBuffer]"?new Uint8Array(O.dictionary):O.dictionary,(k=h.deflateSetDictionary(this.strm,M))!==v)throw new Error(m[k]);this._dict_set=!0}}function j(T,O){var k=new N(O);if(k.push(T,!0),k.err)throw k.msg||m[k.err];return k.result}N.prototype.push=function(T,O){var k,M,R=this.strm,B=this.options.chunkSize;if(this.ended)return!1;M=O===~~O?O:O===!0?4:0,typeof T=="string"?R.input=p.string2buf(T):w.call(T)==="[object ArrayBuffer]"?R.input=new Uint8Array(T):R.input=T,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new f.Buf8(B),R.next_out=0,R.avail_out=B),(k=h.deflate(R,M))!==1&&k!==v)return this.onEnd(k),!(this.ended=!0);R.avail_out!==0&&(R.avail_in!==0||M!==4&&M!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(R.output,R.next_out))):this.onData(f.shrinkBuf(R.output,R.next_out)))}while((0<R.avail_in||R.avail_out===0)&&k!==1);return M===4?(k=h.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===v):M!==2||(this.onEnd(v),!(R.avail_out=0))},N.prototype.onData=function(T){this.chunks.push(T)},N.prototype.onEnd=function(T){T===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},c.Deflate=N,c.deflate=j,c.deflateRaw=function(T,O){return(O=O||{}).raw=!0,j(T,O)},c.gzip=function(T,O){return(O=O||{}).gzip=!0,j(T,O)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,o,c){var h=s("./zlib/inflate"),f=s("./utils/common"),p=s("./utils/strings"),m=s("./zlib/constants"),g=s("./zlib/messages"),w=s("./zlib/zstream"),v=s("./zlib/gzheader"),x=Object.prototype.toString;function y(N){if(!(this instanceof y))return new y(N);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},N||{});var j=this.options;j.raw&&0<=j.windowBits&&j.windowBits<16&&(j.windowBits=-j.windowBits,j.windowBits===0&&(j.windowBits=-15)),!(0<=j.windowBits&&j.windowBits<16)||N&&N.windowBits||(j.windowBits+=32),15<j.windowBits&&j.windowBits<48&&(15&j.windowBits)==0&&(j.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var T=h.inflateInit2(this.strm,j.windowBits);if(T!==m.Z_OK)throw new Error(g[T]);this.header=new v,h.inflateGetHeader(this.strm,this.header)}function A(N,j){var T=new y(j);if(T.push(N,!0),T.err)throw T.msg||g[T.err];return T.result}y.prototype.push=function(N,j){var T,O,k,M,R,B,H=this.strm,ae=this.options.chunkSize,W=this.options.dictionary,ne=!1;if(this.ended)return!1;O=j===~~j?j:j===!0?m.Z_FINISH:m.Z_NO_FLUSH,typeof N=="string"?H.input=p.binstring2buf(N):x.call(N)==="[object ArrayBuffer]"?H.input=new Uint8Array(N):H.input=N,H.next_in=0,H.avail_in=H.input.length;do{if(H.avail_out===0&&(H.output=new f.Buf8(ae),H.next_out=0,H.avail_out=ae),(T=h.inflate(H,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&W&&(B=typeof W=="string"?p.string2buf(W):x.call(W)==="[object ArrayBuffer]"?new Uint8Array(W):W,T=h.inflateSetDictionary(this.strm,B)),T===m.Z_BUF_ERROR&&ne===!0&&(T=m.Z_OK,ne=!1),T!==m.Z_STREAM_END&&T!==m.Z_OK)return this.onEnd(T),!(this.ended=!0);H.next_out&&(H.avail_out!==0&&T!==m.Z_STREAM_END&&(H.avail_in!==0||O!==m.Z_FINISH&&O!==m.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=p.utf8border(H.output,H.next_out),M=H.next_out-k,R=p.buf2string(H.output,k),H.next_out=M,H.avail_out=ae-M,M&&f.arraySet(H.output,H.output,k,M,0),this.onData(R)):this.onData(f.shrinkBuf(H.output,H.next_out)))),H.avail_in===0&&H.avail_out===0&&(ne=!0)}while((0<H.avail_in||H.avail_out===0)&&T!==m.Z_STREAM_END);return T===m.Z_STREAM_END&&(O=m.Z_FINISH),O===m.Z_FINISH?(T=h.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===m.Z_OK):O!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(H.avail_out=0))},y.prototype.onData=function(N){this.chunks.push(N)},y.prototype.onEnd=function(N){N===m.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg},c.Inflate=y,c.inflate=A,c.inflateRaw=function(N,j){return(j=j||{}).raw=!0,A(N,j)},c.ungzip=A},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,o,c){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";c.assign=function(m){for(var g=Array.prototype.slice.call(arguments,1);g.length;){var w=g.shift();if(w){if(typeof w!="object")throw new TypeError(w+"must be non-object");for(var v in w)w.hasOwnProperty(v)&&(m[v]=w[v])}}return m},c.shrinkBuf=function(m,g){return m.length===g?m:m.subarray?m.subarray(0,g):(m.length=g,m)};var f={arraySet:function(m,g,w,v,x){if(g.subarray&&m.subarray)m.set(g.subarray(w,w+v),x);else for(var y=0;y<v;y++)m[x+y]=g[w+y]},flattenChunks:function(m){var g,w,v,x,y,A;for(g=v=0,w=m.length;g<w;g++)v+=m[g].length;for(A=new Uint8Array(v),g=x=0,w=m.length;g<w;g++)y=m[g],A.set(y,x),x+=y.length;return A}},p={arraySet:function(m,g,w,v,x){for(var y=0;y<v;y++)m[x+y]=g[w+y]},flattenChunks:function(m){return[].concat.apply([],m)}};c.setTyped=function(m){m?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,f)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,p))},c.setTyped(h)},{}],42:[function(s,o,c){var h=s("./common"),f=!0,p=!0;try{String.fromCharCode.apply(null,[0])}catch{f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{p=!1}for(var m=new h.Buf8(256),g=0;g<256;g++)m[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;function w(v,x){if(x<65537&&(v.subarray&&p||!v.subarray&&f))return String.fromCharCode.apply(null,h.shrinkBuf(v,x));for(var y="",A=0;A<x;A++)y+=String.fromCharCode(v[A]);return y}m[254]=m[254]=1,c.string2buf=function(v){var x,y,A,N,j,T=v.length,O=0;for(N=0;N<T;N++)(64512&(y=v.charCodeAt(N)))==55296&&N+1<T&&(64512&(A=v.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(A-56320),N++),O+=y<128?1:y<2048?2:y<65536?3:4;for(x=new h.Buf8(O),N=j=0;j<O;N++)(64512&(y=v.charCodeAt(N)))==55296&&N+1<T&&(64512&(A=v.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(A-56320),N++),y<128?x[j++]=y:(y<2048?x[j++]=192|y>>>6:(y<65536?x[j++]=224|y>>>12:(x[j++]=240|y>>>18,x[j++]=128|y>>>12&63),x[j++]=128|y>>>6&63),x[j++]=128|63&y);return x},c.buf2binstring=function(v){return w(v,v.length)},c.binstring2buf=function(v){for(var x=new h.Buf8(v.length),y=0,A=x.length;y<A;y++)x[y]=v.charCodeAt(y);return x},c.buf2string=function(v,x){var y,A,N,j,T=x||v.length,O=new Array(2*T);for(y=A=0;y<T;)if((N=v[y++])<128)O[A++]=N;else if(4<(j=m[N]))O[A++]=65533,y+=j-1;else{for(N&=j===2?31:j===3?15:7;1<j&&y<T;)N=N<<6|63&v[y++],j--;1<j?O[A++]=65533:N<65536?O[A++]=N:(N-=65536,O[A++]=55296|N>>10&1023,O[A++]=56320|1023&N)}return w(O,A)},c.utf8border=function(v,x){var y;for((x=x||v.length)>v.length&&(x=v.length),y=x-1;0<=y&&(192&v[y])==128;)y--;return y<0||y===0?x:y+m[v[y]]>x?y:x}},{"./common":41}],43:[function(s,o,c){o.exports=function(h,f,p,m){for(var g=65535&h|0,w=h>>>16&65535|0,v=0;p!==0;){for(p-=v=2e3<p?2e3:p;w=w+(g=g+f[m++]|0)|0,--v;);g%=65521,w%=65521}return g|w<<16|0}},{}],44:[function(s,o,c){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(s,o,c){var h=(function(){for(var f,p=[],m=0;m<256;m++){f=m;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;p[m]=f}return p})();o.exports=function(f,p,m,g){var w=h,v=g+m;f^=-1;for(var x=g;x<v;x++)f=f>>>8^w[255&(f^p[x])];return-1^f}},{}],46:[function(s,o,c){var h,f=s("../utils/common"),p=s("./trees"),m=s("./adler32"),g=s("./crc32"),w=s("./messages"),v=0,x=4,y=0,A=-2,N=-1,j=4,T=2,O=8,k=9,M=286,R=30,B=19,H=2*M+1,ae=15,W=3,ne=258,se=ne+W+1,q=42,G=113,E=1,X=2,V=3,P=4;function Q(_,Y){return _.msg=w[Y],Y}function D(_){return(_<<1)-(4<_?9:0)}function I(_){for(var Y=_.length;0<=--Y;)_[Y]=0}function S(_){var Y=_.state,re=Y.pending;re>_.avail_out&&(re=_.avail_out),re!==0&&(f.arraySet(_.output,Y.pending_buf,Y.pending_out,re,_.next_out),_.next_out+=re,Y.pending_out+=re,_.total_out+=re,_.avail_out-=re,Y.pending-=re,Y.pending===0&&(Y.pending_out=0))}function C(_,Y){p._tr_flush_block(_,0<=_.block_start?_.block_start:-1,_.strstart-_.block_start,Y),_.block_start=_.strstart,S(_.strm)}function $(_,Y){_.pending_buf[_.pending++]=Y}function K(_,Y){_.pending_buf[_.pending++]=Y>>>8&255,_.pending_buf[_.pending++]=255&Y}function ie(_,Y){var re,L,U=_.max_chain_length,J=_.strstart,ge=_.prev_length,he=_.nice_match,te=_.strstart>_.w_size-se?_.strstart-(_.w_size-se):0,xe=_.window,we=_.w_mask,be=_.prev,Te=_.strstart+ne,qe=xe[J+ge-1],De=xe[J+ge];_.prev_length>=_.good_match&&(U>>=2),he>_.lookahead&&(he=_.lookahead);do if(xe[(re=Y)+ge]===De&&xe[re+ge-1]===qe&&xe[re]===xe[J]&&xe[++re]===xe[J+1]){J+=2,re++;do;while(xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&J<Te);if(L=ne-(Te-J),J=Te-ne,ge<L){if(_.match_start=Y,he<=(ge=L))break;qe=xe[J+ge-1],De=xe[J+ge]}}while((Y=be[Y&we])>te&&--U!=0);return ge<=_.lookahead?ge:_.lookahead}function ye(_){var Y,re,L,U,J,ge,he,te,xe,we,be=_.w_size;do{if(U=_.window_size-_.lookahead-_.strstart,_.strstart>=be+(be-se)){for(f.arraySet(_.window,_.window,be,be,0),_.match_start-=be,_.strstart-=be,_.block_start-=be,Y=re=_.hash_size;L=_.head[--Y],_.head[Y]=be<=L?L-be:0,--re;);for(Y=re=be;L=_.prev[--Y],_.prev[Y]=be<=L?L-be:0,--re;);U+=be}if(_.strm.avail_in===0)break;if(ge=_.strm,he=_.window,te=_.strstart+_.lookahead,xe=U,we=void 0,we=ge.avail_in,xe<we&&(we=xe),re=we===0?0:(ge.avail_in-=we,f.arraySet(he,ge.input,ge.next_in,we,te),ge.state.wrap===1?ge.adler=m(ge.adler,he,we,te):ge.state.wrap===2&&(ge.adler=g(ge.adler,he,we,te)),ge.next_in+=we,ge.total_in+=we,we),_.lookahead+=re,_.lookahead+_.insert>=W)for(J=_.strstart-_.insert,_.ins_h=_.window[J],_.ins_h=(_.ins_h<<_.hash_shift^_.window[J+1])&_.hash_mask;_.insert&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[J+W-1])&_.hash_mask,_.prev[J&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=J,J++,_.insert--,!(_.lookahead+_.insert<W)););}while(_.lookahead<se&&_.strm.avail_in!==0)}function _e(_,Y){for(var re,L;;){if(_.lookahead<se){if(ye(_),_.lookahead<se&&Y===v)return E;if(_.lookahead===0)break}if(re=0,_.lookahead>=W&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),re!==0&&_.strstart-re<=_.w_size-se&&(_.match_length=ie(_,re)),_.match_length>=W)if(L=p._tr_tally(_,_.strstart-_.match_start,_.match_length-W),_.lookahead-=_.match_length,_.match_length<=_.max_lazy_match&&_.lookahead>=W){for(_.match_length--;_.strstart++,_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart,--_.match_length!=0;);_.strstart++}else _.strstart+=_.match_length,_.match_length=0,_.ins_h=_.window[_.strstart],_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+1])&_.hash_mask;else L=p._tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++;if(L&&(C(_,!1),_.strm.avail_out===0))return E}return _.insert=_.strstart<W-1?_.strstart:W-1,Y===x?(C(_,!0),_.strm.avail_out===0?V:P):_.last_lit&&(C(_,!1),_.strm.avail_out===0)?E:X}function Ne(_,Y){for(var re,L,U;;){if(_.lookahead<se){if(ye(_),_.lookahead<se&&Y===v)return E;if(_.lookahead===0)break}if(re=0,_.lookahead>=W&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),_.prev_length=_.match_length,_.prev_match=_.match_start,_.match_length=W-1,re!==0&&_.prev_length<_.max_lazy_match&&_.strstart-re<=_.w_size-se&&(_.match_length=ie(_,re),_.match_length<=5&&(_.strategy===1||_.match_length===W&&4096<_.strstart-_.match_start)&&(_.match_length=W-1)),_.prev_length>=W&&_.match_length<=_.prev_length){for(U=_.strstart+_.lookahead-W,L=p._tr_tally(_,_.strstart-1-_.prev_match,_.prev_length-W),_.lookahead-=_.prev_length-1,_.prev_length-=2;++_.strstart<=U&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),--_.prev_length!=0;);if(_.match_available=0,_.match_length=W-1,_.strstart++,L&&(C(_,!1),_.strm.avail_out===0))return E}else if(_.match_available){if((L=p._tr_tally(_,0,_.window[_.strstart-1]))&&C(_,!1),_.strstart++,_.lookahead--,_.strm.avail_out===0)return E}else _.match_available=1,_.strstart++,_.lookahead--}return _.match_available&&(L=p._tr_tally(_,0,_.window[_.strstart-1]),_.match_available=0),_.insert=_.strstart<W-1?_.strstart:W-1,Y===x?(C(_,!0),_.strm.avail_out===0?V:P):_.last_lit&&(C(_,!1),_.strm.avail_out===0)?E:X}function oe(_,Y,re,L,U){this.good_length=_,this.max_lazy=Y,this.nice_length=re,this.max_chain=L,this.func=U}function je(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=O,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new f.Buf16(2*H),this.dyn_dtree=new f.Buf16(2*(2*R+1)),this.bl_tree=new f.Buf16(2*(2*B+1)),I(this.dyn_ltree),I(this.dyn_dtree),I(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new f.Buf16(ae+1),this.heap=new f.Buf16(2*M+1),I(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*M+1),I(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ee(_){var Y;return _&&_.state?(_.total_in=_.total_out=0,_.data_type=T,(Y=_.state).pending=0,Y.pending_out=0,Y.wrap<0&&(Y.wrap=-Y.wrap),Y.status=Y.wrap?q:G,_.adler=Y.wrap===2?0:1,Y.last_flush=v,p._tr_init(Y),y):Q(_,A)}function $e(_){var Y=Ee(_);return Y===y&&(function(re){re.window_size=2*re.w_size,I(re.head),re.max_lazy_match=h[re.level].max_lazy,re.good_match=h[re.level].good_length,re.nice_match=h[re.level].nice_length,re.max_chain_length=h[re.level].max_chain,re.strstart=0,re.block_start=0,re.lookahead=0,re.insert=0,re.match_length=re.prev_length=W-1,re.match_available=0,re.ins_h=0})(_.state),Y}function He(_,Y,re,L,U,J){if(!_)return A;var ge=1;if(Y===N&&(Y=6),L<0?(ge=0,L=-L):15<L&&(ge=2,L-=16),U<1||k<U||re!==O||L<8||15<L||Y<0||9<Y||J<0||j<J)return Q(_,A);L===8&&(L=9);var he=new je;return(_.state=he).strm=_,he.wrap=ge,he.gzhead=null,he.w_bits=L,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=U+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+W-1)/W),he.window=new f.Buf8(2*he.w_size),he.head=new f.Buf16(he.hash_size),he.prev=new f.Buf16(he.w_size),he.lit_bufsize=1<<U+6,he.pending_buf_size=4*he.lit_bufsize,he.pending_buf=new f.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=Y,he.strategy=J,he.method=re,$e(_)}h=[new oe(0,0,0,0,function(_,Y){var re=65535;for(re>_.pending_buf_size-5&&(re=_.pending_buf_size-5);;){if(_.lookahead<=1){if(ye(_),_.lookahead===0&&Y===v)return E;if(_.lookahead===0)break}_.strstart+=_.lookahead,_.lookahead=0;var L=_.block_start+re;if((_.strstart===0||_.strstart>=L)&&(_.lookahead=_.strstart-L,_.strstart=L,C(_,!1),_.strm.avail_out===0)||_.strstart-_.block_start>=_.w_size-se&&(C(_,!1),_.strm.avail_out===0))return E}return _.insert=0,Y===x?(C(_,!0),_.strm.avail_out===0?V:P):(_.strstart>_.block_start&&(C(_,!1),_.strm.avail_out),E)}),new oe(4,4,8,4,_e),new oe(4,5,16,8,_e),new oe(4,6,32,32,_e),new oe(4,4,16,16,Ne),new oe(8,16,32,32,Ne),new oe(8,16,128,128,Ne),new oe(8,32,128,256,Ne),new oe(32,128,258,1024,Ne),new oe(32,258,258,4096,Ne)],c.deflateInit=function(_,Y){return He(_,Y,O,15,8,0)},c.deflateInit2=He,c.deflateReset=$e,c.deflateResetKeep=Ee,c.deflateSetHeader=function(_,Y){return _&&_.state?_.state.wrap!==2?A:(_.state.gzhead=Y,y):A},c.deflate=function(_,Y){var re,L,U,J;if(!_||!_.state||5<Y||Y<0)return _?Q(_,A):A;if(L=_.state,!_.output||!_.input&&_.avail_in!==0||L.status===666&&Y!==x)return Q(_,_.avail_out===0?-5:A);if(L.strm=_,re=L.last_flush,L.last_flush=Y,L.status===q)if(L.wrap===2)_.adler=0,$(L,31),$(L,139),$(L,8),L.gzhead?($(L,(L.gzhead.text?1:0)+(L.gzhead.hcrc?2:0)+(L.gzhead.extra?4:0)+(L.gzhead.name?8:0)+(L.gzhead.comment?16:0)),$(L,255&L.gzhead.time),$(L,L.gzhead.time>>8&255),$(L,L.gzhead.time>>16&255),$(L,L.gzhead.time>>24&255),$(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),$(L,255&L.gzhead.os),L.gzhead.extra&&L.gzhead.extra.length&&($(L,255&L.gzhead.extra.length),$(L,L.gzhead.extra.length>>8&255)),L.gzhead.hcrc&&(_.adler=g(_.adler,L.pending_buf,L.pending,0)),L.gzindex=0,L.status=69):($(L,0),$(L,0),$(L,0),$(L,0),$(L,0),$(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),$(L,3),L.status=G);else{var ge=O+(L.w_bits-8<<4)<<8;ge|=(2<=L.strategy||L.level<2?0:L.level<6?1:L.level===6?2:3)<<6,L.strstart!==0&&(ge|=32),ge+=31-ge%31,L.status=G,K(L,ge),L.strstart!==0&&(K(L,_.adler>>>16),K(L,65535&_.adler)),_.adler=1}if(L.status===69)if(L.gzhead.extra){for(U=L.pending;L.gzindex<(65535&L.gzhead.extra.length)&&(L.pending!==L.pending_buf_size||(L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),S(_),U=L.pending,L.pending!==L.pending_buf_size));)$(L,255&L.gzhead.extra[L.gzindex]),L.gzindex++;L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),L.gzindex===L.gzhead.extra.length&&(L.gzindex=0,L.status=73)}else L.status=73;if(L.status===73)if(L.gzhead.name){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),S(_),U=L.pending,L.pending===L.pending_buf_size)){J=1;break}J=L.gzindex<L.gzhead.name.length?255&L.gzhead.name.charCodeAt(L.gzindex++):0,$(L,J)}while(J!==0);L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),J===0&&(L.gzindex=0,L.status=91)}else L.status=91;if(L.status===91)if(L.gzhead.comment){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),S(_),U=L.pending,L.pending===L.pending_buf_size)){J=1;break}J=L.gzindex<L.gzhead.comment.length?255&L.gzhead.comment.charCodeAt(L.gzindex++):0,$(L,J)}while(J!==0);L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),J===0&&(L.status=103)}else L.status=103;if(L.status===103&&(L.gzhead.hcrc?(L.pending+2>L.pending_buf_size&&S(_),L.pending+2<=L.pending_buf_size&&($(L,255&_.adler),$(L,_.adler>>8&255),_.adler=0,L.status=G)):L.status=G),L.pending!==0){if(S(_),_.avail_out===0)return L.last_flush=-1,y}else if(_.avail_in===0&&D(Y)<=D(re)&&Y!==x)return Q(_,-5);if(L.status===666&&_.avail_in!==0)return Q(_,-5);if(_.avail_in!==0||L.lookahead!==0||Y!==v&&L.status!==666){var he=L.strategy===2?(function(te,xe){for(var we;;){if(te.lookahead===0&&(ye(te),te.lookahead===0)){if(xe===v)return E;break}if(te.match_length=0,we=p._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++,we&&(C(te,!1),te.strm.avail_out===0))return E}return te.insert=0,xe===x?(C(te,!0),te.strm.avail_out===0?V:P):te.last_lit&&(C(te,!1),te.strm.avail_out===0)?E:X})(L,Y):L.strategy===3?(function(te,xe){for(var we,be,Te,qe,De=te.window;;){if(te.lookahead<=ne){if(ye(te),te.lookahead<=ne&&xe===v)return E;if(te.lookahead===0)break}if(te.match_length=0,te.lookahead>=W&&0<te.strstart&&(be=De[Te=te.strstart-1])===De[++Te]&&be===De[++Te]&&be===De[++Te]){qe=te.strstart+ne;do;while(be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&Te<qe);te.match_length=ne-(qe-Te),te.match_length>te.lookahead&&(te.match_length=te.lookahead)}if(te.match_length>=W?(we=p._tr_tally(te,1,te.match_length-W),te.lookahead-=te.match_length,te.strstart+=te.match_length,te.match_length=0):(we=p._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++),we&&(C(te,!1),te.strm.avail_out===0))return E}return te.insert=0,xe===x?(C(te,!0),te.strm.avail_out===0?V:P):te.last_lit&&(C(te,!1),te.strm.avail_out===0)?E:X})(L,Y):h[L.level].func(L,Y);if(he!==V&&he!==P||(L.status=666),he===E||he===V)return _.avail_out===0&&(L.last_flush=-1),y;if(he===X&&(Y===1?p._tr_align(L):Y!==5&&(p._tr_stored_block(L,0,0,!1),Y===3&&(I(L.head),L.lookahead===0&&(L.strstart=0,L.block_start=0,L.insert=0))),S(_),_.avail_out===0))return L.last_flush=-1,y}return Y!==x?y:L.wrap<=0?1:(L.wrap===2?($(L,255&_.adler),$(L,_.adler>>8&255),$(L,_.adler>>16&255),$(L,_.adler>>24&255),$(L,255&_.total_in),$(L,_.total_in>>8&255),$(L,_.total_in>>16&255),$(L,_.total_in>>24&255)):(K(L,_.adler>>>16),K(L,65535&_.adler)),S(_),0<L.wrap&&(L.wrap=-L.wrap),L.pending!==0?y:1)},c.deflateEnd=function(_){var Y;return _&&_.state?(Y=_.state.status)!==q&&Y!==69&&Y!==73&&Y!==91&&Y!==103&&Y!==G&&Y!==666?Q(_,A):(_.state=null,Y===G?Q(_,-3):y):A},c.deflateSetDictionary=function(_,Y){var re,L,U,J,ge,he,te,xe,we=Y.length;if(!_||!_.state||(J=(re=_.state).wrap)===2||J===1&&re.status!==q||re.lookahead)return A;for(J===1&&(_.adler=m(_.adler,Y,we,0)),re.wrap=0,we>=re.w_size&&(J===0&&(I(re.head),re.strstart=0,re.block_start=0,re.insert=0),xe=new f.Buf8(re.w_size),f.arraySet(xe,Y,we-re.w_size,re.w_size,0),Y=xe,we=re.w_size),ge=_.avail_in,he=_.next_in,te=_.input,_.avail_in=we,_.next_in=0,_.input=Y,ye(re);re.lookahead>=W;){for(L=re.strstart,U=re.lookahead-(W-1);re.ins_h=(re.ins_h<<re.hash_shift^re.window[L+W-1])&re.hash_mask,re.prev[L&re.w_mask]=re.head[re.ins_h],re.head[re.ins_h]=L,L++,--U;);re.strstart=L,re.lookahead=W-1,ye(re)}return re.strstart+=re.lookahead,re.block_start=re.strstart,re.insert=re.lookahead,re.lookahead=0,re.match_length=re.prev_length=W-1,re.match_available=0,_.next_in=he,_.input=te,_.avail_in=ge,re.wrap=J,y},c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,o,c){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,o,c){o.exports=function(h,f){var p,m,g,w,v,x,y,A,N,j,T,O,k,M,R,B,H,ae,W,ne,se,q,G,E,X;p=h.state,m=h.next_in,E=h.input,g=m+(h.avail_in-5),w=h.next_out,X=h.output,v=w-(f-h.avail_out),x=w+(h.avail_out-257),y=p.dmax,A=p.wsize,N=p.whave,j=p.wnext,T=p.window,O=p.hold,k=p.bits,M=p.lencode,R=p.distcode,B=(1<<p.lenbits)-1,H=(1<<p.distbits)-1;e:do{k<15&&(O+=E[m++]<<k,k+=8,O+=E[m++]<<k,k+=8),ae=M[O&B];t:for(;;){if(O>>>=W=ae>>>24,k-=W,(W=ae>>>16&255)===0)X[w++]=65535&ae;else{if(!(16&W)){if((64&W)==0){ae=M[(65535&ae)+(O&(1<<W)-1)];continue t}if(32&W){p.mode=12;break e}h.msg="invalid literal/length code",p.mode=30;break e}ne=65535&ae,(W&=15)&&(k<W&&(O+=E[m++]<<k,k+=8),ne+=O&(1<<W)-1,O>>>=W,k-=W),k<15&&(O+=E[m++]<<k,k+=8,O+=E[m++]<<k,k+=8),ae=R[O&H];n:for(;;){if(O>>>=W=ae>>>24,k-=W,!(16&(W=ae>>>16&255))){if((64&W)==0){ae=R[(65535&ae)+(O&(1<<W)-1)];continue n}h.msg="invalid distance code",p.mode=30;break e}if(se=65535&ae,k<(W&=15)&&(O+=E[m++]<<k,(k+=8)<W&&(O+=E[m++]<<k,k+=8)),y<(se+=O&(1<<W)-1)){h.msg="invalid distance too far back",p.mode=30;break e}if(O>>>=W,k-=W,(W=w-v)<se){if(N<(W=se-W)&&p.sane){h.msg="invalid distance too far back",p.mode=30;break e}if(G=T,(q=0)===j){if(q+=A-W,W<ne){for(ne-=W;X[w++]=T[q++],--W;);q=w-se,G=X}}else if(j<W){if(q+=A+j-W,(W-=j)<ne){for(ne-=W;X[w++]=T[q++],--W;);if(q=0,j<ne){for(ne-=W=j;X[w++]=T[q++],--W;);q=w-se,G=X}}}else if(q+=j-W,W<ne){for(ne-=W;X[w++]=T[q++],--W;);q=w-se,G=X}for(;2<ne;)X[w++]=G[q++],X[w++]=G[q++],X[w++]=G[q++],ne-=3;ne&&(X[w++]=G[q++],1<ne&&(X[w++]=G[q++]))}else{for(q=w-se;X[w++]=X[q++],X[w++]=X[q++],X[w++]=X[q++],2<(ne-=3););ne&&(X[w++]=X[q++],1<ne&&(X[w++]=X[q++]))}break}}break}}while(m<g&&w<x);m-=ne=k>>3,O&=(1<<(k-=ne<<3))-1,h.next_in=m,h.next_out=w,h.avail_in=m<g?g-m+5:5-(m-g),h.avail_out=w<x?x-w+257:257-(w-x),p.hold=O,p.bits=k}},{}],49:[function(s,o,c){var h=s("../utils/common"),f=s("./adler32"),p=s("./crc32"),m=s("./inffast"),g=s("./inftrees"),w=1,v=2,x=0,y=-2,A=1,N=852,j=592;function T(q){return(q>>>24&255)+(q>>>8&65280)+((65280&q)<<8)+((255&q)<<24)}function O(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(q){var G;return q&&q.state?(G=q.state,q.total_in=q.total_out=G.total=0,q.msg="",G.wrap&&(q.adler=1&G.wrap),G.mode=A,G.last=0,G.havedict=0,G.dmax=32768,G.head=null,G.hold=0,G.bits=0,G.lencode=G.lendyn=new h.Buf32(N),G.distcode=G.distdyn=new h.Buf32(j),G.sane=1,G.back=-1,x):y}function M(q){var G;return q&&q.state?((G=q.state).wsize=0,G.whave=0,G.wnext=0,k(q)):y}function R(q,G){var E,X;return q&&q.state?(X=q.state,G<0?(E=0,G=-G):(E=1+(G>>4),G<48&&(G&=15)),G&&(G<8||15<G)?y:(X.window!==null&&X.wbits!==G&&(X.window=null),X.wrap=E,X.wbits=G,M(q))):y}function B(q,G){var E,X;return q?(X=new O,(q.state=X).window=null,(E=R(q,G))!==x&&(q.state=null),E):y}var H,ae,W=!0;function ne(q){if(W){var G;for(H=new h.Buf32(512),ae=new h.Buf32(32),G=0;G<144;)q.lens[G++]=8;for(;G<256;)q.lens[G++]=9;for(;G<280;)q.lens[G++]=7;for(;G<288;)q.lens[G++]=8;for(g(w,q.lens,0,288,H,0,q.work,{bits:9}),G=0;G<32;)q.lens[G++]=5;g(v,q.lens,0,32,ae,0,q.work,{bits:5}),W=!1}q.lencode=H,q.lenbits=9,q.distcode=ae,q.distbits=5}function se(q,G,E,X){var V,P=q.state;return P.window===null&&(P.wsize=1<<P.wbits,P.wnext=0,P.whave=0,P.window=new h.Buf8(P.wsize)),X>=P.wsize?(h.arraySet(P.window,G,E-P.wsize,P.wsize,0),P.wnext=0,P.whave=P.wsize):(X<(V=P.wsize-P.wnext)&&(V=X),h.arraySet(P.window,G,E-X,V,P.wnext),(X-=V)?(h.arraySet(P.window,G,E-X,X,0),P.wnext=X,P.whave=P.wsize):(P.wnext+=V,P.wnext===P.wsize&&(P.wnext=0),P.whave<P.wsize&&(P.whave+=V))),0}c.inflateReset=M,c.inflateReset2=R,c.inflateResetKeep=k,c.inflateInit=function(q){return B(q,15)},c.inflateInit2=B,c.inflate=function(q,G){var E,X,V,P,Q,D,I,S,C,$,K,ie,ye,_e,Ne,oe,je,Ee,$e,He,_,Y,re,L,U=0,J=new h.Buf8(4),ge=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!q||!q.state||!q.output||!q.input&&q.avail_in!==0)return y;(E=q.state).mode===12&&(E.mode=13),Q=q.next_out,V=q.output,I=q.avail_out,P=q.next_in,X=q.input,D=q.avail_in,S=E.hold,C=E.bits,$=D,K=I,Y=x;e:for(;;)switch(E.mode){case A:if(E.wrap===0){E.mode=13;break}for(;C<16;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(2&E.wrap&&S===35615){J[E.check=0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0),C=S=0,E.mode=2;break}if(E.flags=0,E.head&&(E.head.done=!1),!(1&E.wrap)||(((255&S)<<8)+(S>>8))%31){q.msg="incorrect header check",E.mode=30;break}if((15&S)!=8){q.msg="unknown compression method",E.mode=30;break}if(C-=4,_=8+(15&(S>>>=4)),E.wbits===0)E.wbits=_;else if(_>E.wbits){q.msg="invalid window size",E.mode=30;break}E.dmax=1<<_,q.adler=E.check=1,E.mode=512&S?10:12,C=S=0;break;case 2:for(;C<16;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(E.flags=S,(255&E.flags)!=8){q.msg="unknown compression method",E.mode=30;break}if(57344&E.flags){q.msg="unknown header flags set",E.mode=30;break}E.head&&(E.head.text=S>>8&1),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0)),C=S=0,E.mode=3;case 3:for(;C<32;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}E.head&&(E.head.time=S),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,J[2]=S>>>16&255,J[3]=S>>>24&255,E.check=p(E.check,J,4,0)),C=S=0,E.mode=4;case 4:for(;C<16;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}E.head&&(E.head.xflags=255&S,E.head.os=S>>8),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0)),C=S=0,E.mode=5;case 5:if(1024&E.flags){for(;C<16;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}E.length=S,E.head&&(E.head.extra_len=S),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0)),C=S=0}else E.head&&(E.head.extra=null);E.mode=6;case 6:if(1024&E.flags&&(D<(ie=E.length)&&(ie=D),ie&&(E.head&&(_=E.head.extra_len-E.length,E.head.extra||(E.head.extra=new Array(E.head.extra_len)),h.arraySet(E.head.extra,X,P,ie,_)),512&E.flags&&(E.check=p(E.check,X,ie,P)),D-=ie,P+=ie,E.length-=ie),E.length))break e;E.length=0,E.mode=7;case 7:if(2048&E.flags){if(D===0)break e;for(ie=0;_=X[P+ie++],E.head&&_&&E.length<65536&&(E.head.name+=String.fromCharCode(_)),_&&ie<D;);if(512&E.flags&&(E.check=p(E.check,X,ie,P)),D-=ie,P+=ie,_)break e}else E.head&&(E.head.name=null);E.length=0,E.mode=8;case 8:if(4096&E.flags){if(D===0)break e;for(ie=0;_=X[P+ie++],E.head&&_&&E.length<65536&&(E.head.comment+=String.fromCharCode(_)),_&&ie<D;);if(512&E.flags&&(E.check=p(E.check,X,ie,P)),D-=ie,P+=ie,_)break e}else E.head&&(E.head.comment=null);E.mode=9;case 9:if(512&E.flags){for(;C<16;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(S!==(65535&E.check)){q.msg="header crc mismatch",E.mode=30;break}C=S=0}E.head&&(E.head.hcrc=E.flags>>9&1,E.head.done=!0),q.adler=E.check=0,E.mode=12;break;case 10:for(;C<32;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}q.adler=E.check=T(S),C=S=0,E.mode=11;case 11:if(E.havedict===0)return q.next_out=Q,q.avail_out=I,q.next_in=P,q.avail_in=D,E.hold=S,E.bits=C,2;q.adler=E.check=1,E.mode=12;case 12:if(G===5||G===6)break e;case 13:if(E.last){S>>>=7&C,C-=7&C,E.mode=27;break}for(;C<3;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}switch(E.last=1&S,C-=1,3&(S>>>=1)){case 0:E.mode=14;break;case 1:if(ne(E),E.mode=20,G!==6)break;S>>>=2,C-=2;break e;case 2:E.mode=17;break;case 3:q.msg="invalid block type",E.mode=30}S>>>=2,C-=2;break;case 14:for(S>>>=7&C,C-=7&C;C<32;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if((65535&S)!=(S>>>16^65535)){q.msg="invalid stored block lengths",E.mode=30;break}if(E.length=65535&S,C=S=0,E.mode=15,G===6)break e;case 15:E.mode=16;case 16:if(ie=E.length){if(D<ie&&(ie=D),I<ie&&(ie=I),ie===0)break e;h.arraySet(V,X,P,ie,Q),D-=ie,P+=ie,I-=ie,Q+=ie,E.length-=ie;break}E.mode=12;break;case 17:for(;C<14;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(E.nlen=257+(31&S),S>>>=5,C-=5,E.ndist=1+(31&S),S>>>=5,C-=5,E.ncode=4+(15&S),S>>>=4,C-=4,286<E.nlen||30<E.ndist){q.msg="too many length or distance symbols",E.mode=30;break}E.have=0,E.mode=18;case 18:for(;E.have<E.ncode;){for(;C<3;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}E.lens[ge[E.have++]]=7&S,S>>>=3,C-=3}for(;E.have<19;)E.lens[ge[E.have++]]=0;if(E.lencode=E.lendyn,E.lenbits=7,re={bits:E.lenbits},Y=g(0,E.lens,0,19,E.lencode,0,E.work,re),E.lenbits=re.bits,Y){q.msg="invalid code lengths set",E.mode=30;break}E.have=0,E.mode=19;case 19:for(;E.have<E.nlen+E.ndist;){for(;oe=(U=E.lencode[S&(1<<E.lenbits)-1])>>>16&255,je=65535&U,!((Ne=U>>>24)<=C);){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(je<16)S>>>=Ne,C-=Ne,E.lens[E.have++]=je;else{if(je===16){for(L=Ne+2;C<L;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(S>>>=Ne,C-=Ne,E.have===0){q.msg="invalid bit length repeat",E.mode=30;break}_=E.lens[E.have-1],ie=3+(3&S),S>>>=2,C-=2}else if(je===17){for(L=Ne+3;C<L;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}C-=Ne,_=0,ie=3+(7&(S>>>=Ne)),S>>>=3,C-=3}else{for(L=Ne+7;C<L;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}C-=Ne,_=0,ie=11+(127&(S>>>=Ne)),S>>>=7,C-=7}if(E.have+ie>E.nlen+E.ndist){q.msg="invalid bit length repeat",E.mode=30;break}for(;ie--;)E.lens[E.have++]=_}}if(E.mode===30)break;if(E.lens[256]===0){q.msg="invalid code -- missing end-of-block",E.mode=30;break}if(E.lenbits=9,re={bits:E.lenbits},Y=g(w,E.lens,0,E.nlen,E.lencode,0,E.work,re),E.lenbits=re.bits,Y){q.msg="invalid literal/lengths set",E.mode=30;break}if(E.distbits=6,E.distcode=E.distdyn,re={bits:E.distbits},Y=g(v,E.lens,E.nlen,E.ndist,E.distcode,0,E.work,re),E.distbits=re.bits,Y){q.msg="invalid distances set",E.mode=30;break}if(E.mode=20,G===6)break e;case 20:E.mode=21;case 21:if(6<=D&&258<=I){q.next_out=Q,q.avail_out=I,q.next_in=P,q.avail_in=D,E.hold=S,E.bits=C,m(q,K),Q=q.next_out,V=q.output,I=q.avail_out,P=q.next_in,X=q.input,D=q.avail_in,S=E.hold,C=E.bits,E.mode===12&&(E.back=-1);break}for(E.back=0;oe=(U=E.lencode[S&(1<<E.lenbits)-1])>>>16&255,je=65535&U,!((Ne=U>>>24)<=C);){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(oe&&(240&oe)==0){for(Ee=Ne,$e=oe,He=je;oe=(U=E.lencode[He+((S&(1<<Ee+$e)-1)>>Ee)])>>>16&255,je=65535&U,!(Ee+(Ne=U>>>24)<=C);){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}S>>>=Ee,C-=Ee,E.back+=Ee}if(S>>>=Ne,C-=Ne,E.back+=Ne,E.length=je,oe===0){E.mode=26;break}if(32&oe){E.back=-1,E.mode=12;break}if(64&oe){q.msg="invalid literal/length code",E.mode=30;break}E.extra=15&oe,E.mode=22;case 22:if(E.extra){for(L=E.extra;C<L;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}E.length+=S&(1<<E.extra)-1,S>>>=E.extra,C-=E.extra,E.back+=E.extra}E.was=E.length,E.mode=23;case 23:for(;oe=(U=E.distcode[S&(1<<E.distbits)-1])>>>16&255,je=65535&U,!((Ne=U>>>24)<=C);){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if((240&oe)==0){for(Ee=Ne,$e=oe,He=je;oe=(U=E.distcode[He+((S&(1<<Ee+$e)-1)>>Ee)])>>>16&255,je=65535&U,!(Ee+(Ne=U>>>24)<=C);){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}S>>>=Ee,C-=Ee,E.back+=Ee}if(S>>>=Ne,C-=Ne,E.back+=Ne,64&oe){q.msg="invalid distance code",E.mode=30;break}E.offset=je,E.extra=15&oe,E.mode=24;case 24:if(E.extra){for(L=E.extra;C<L;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}E.offset+=S&(1<<E.extra)-1,S>>>=E.extra,C-=E.extra,E.back+=E.extra}if(E.offset>E.dmax){q.msg="invalid distance too far back",E.mode=30;break}E.mode=25;case 25:if(I===0)break e;if(ie=K-I,E.offset>ie){if((ie=E.offset-ie)>E.whave&&E.sane){q.msg="invalid distance too far back",E.mode=30;break}ye=ie>E.wnext?(ie-=E.wnext,E.wsize-ie):E.wnext-ie,ie>E.length&&(ie=E.length),_e=E.window}else _e=V,ye=Q-E.offset,ie=E.length;for(I<ie&&(ie=I),I-=ie,E.length-=ie;V[Q++]=_e[ye++],--ie;);E.length===0&&(E.mode=21);break;case 26:if(I===0)break e;V[Q++]=E.length,I--,E.mode=21;break;case 27:if(E.wrap){for(;C<32;){if(D===0)break e;D--,S|=X[P++]<<C,C+=8}if(K-=I,q.total_out+=K,E.total+=K,K&&(q.adler=E.check=E.flags?p(E.check,V,K,Q-K):f(E.check,V,K,Q-K)),K=I,(E.flags?S:T(S))!==E.check){q.msg="incorrect data check",E.mode=30;break}C=S=0}E.mode=28;case 28:if(E.wrap&&E.flags){for(;C<32;){if(D===0)break e;D--,S+=X[P++]<<C,C+=8}if(S!==(4294967295&E.total)){q.msg="incorrect length check",E.mode=30;break}C=S=0}E.mode=29;case 29:Y=1;break e;case 30:Y=-3;break e;case 31:return-4;default:return y}return q.next_out=Q,q.avail_out=I,q.next_in=P,q.avail_in=D,E.hold=S,E.bits=C,(E.wsize||K!==q.avail_out&&E.mode<30&&(E.mode<27||G!==4))&&se(q,q.output,q.next_out,K-q.avail_out)?(E.mode=31,-4):($-=q.avail_in,K-=q.avail_out,q.total_in+=$,q.total_out+=K,E.total+=K,E.wrap&&K&&(q.adler=E.check=E.flags?p(E.check,V,K,q.next_out-K):f(E.check,V,K,q.next_out-K)),q.data_type=E.bits+(E.last?64:0)+(E.mode===12?128:0)+(E.mode===20||E.mode===15?256:0),($==0&&K===0||G===4)&&Y===x&&(Y=-5),Y)},c.inflateEnd=function(q){if(!q||!q.state)return y;var G=q.state;return G.window&&(G.window=null),q.state=null,x},c.inflateGetHeader=function(q,G){var E;return q&&q.state?(2&(E=q.state).wrap)==0?y:((E.head=G).done=!1,x):y},c.inflateSetDictionary=function(q,G){var E,X=G.length;return q&&q.state?(E=q.state).wrap!==0&&E.mode!==11?y:E.mode===11&&f(1,G,X,0)!==E.check?-3:se(q,G,X,X)?(E.mode=31,-4):(E.havedict=1,x):y},c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,o,c){var h=s("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],p=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(w,v,x,y,A,N,j,T){var O,k,M,R,B,H,ae,W,ne,se=T.bits,q=0,G=0,E=0,X=0,V=0,P=0,Q=0,D=0,I=0,S=0,C=null,$=0,K=new h.Buf16(16),ie=new h.Buf16(16),ye=null,_e=0;for(q=0;q<=15;q++)K[q]=0;for(G=0;G<y;G++)K[v[x+G]]++;for(V=se,X=15;1<=X&&K[X]===0;X--);if(X<V&&(V=X),X===0)return A[N++]=20971520,A[N++]=20971520,T.bits=1,0;for(E=1;E<X&&K[E]===0;E++);for(V<E&&(V=E),q=D=1;q<=15;q++)if(D<<=1,(D-=K[q])<0)return-1;if(0<D&&(w===0||X!==1))return-1;for(ie[1]=0,q=1;q<15;q++)ie[q+1]=ie[q]+K[q];for(G=0;G<y;G++)v[x+G]!==0&&(j[ie[v[x+G]]++]=G);if(H=w===0?(C=ye=j,19):w===1?(C=f,$-=257,ye=p,_e-=257,256):(C=m,ye=g,-1),q=E,B=N,Q=G=S=0,M=-1,R=(I=1<<(P=V))-1,w===1&&852<I||w===2&&592<I)return 1;for(;;){for(ae=q-Q,ne=j[G]<H?(W=0,j[G]):j[G]>H?(W=ye[_e+j[G]],C[$+j[G]]):(W=96,0),O=1<<q-Q,E=k=1<<P;A[B+(S>>Q)+(k-=O)]=ae<<24|W<<16|ne|0,k!==0;);for(O=1<<q-1;S&O;)O>>=1;if(O!==0?(S&=O-1,S+=O):S=0,G++,--K[q]==0){if(q===X)break;q=v[x+j[G]]}if(V<q&&(S&R)!==M){for(Q===0&&(Q=V),B+=E,D=1<<(P=q-Q);P+Q<X&&!((D-=K[P+Q])<=0);)P++,D<<=1;if(I+=1<<P,w===1&&852<I||w===2&&592<I)return 1;A[M=S&R]=V<<24|P<<16|B-N|0}}return S!==0&&(A[B+S]=q-Q<<24|64<<16|0),T.bits=V,0}},{"../utils/common":41}],51:[function(s,o,c){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(s,o,c){var h=s("../utils/common"),f=0,p=1;function m(U){for(var J=U.length;0<=--J;)U[J]=0}var g=0,w=29,v=256,x=v+1+w,y=30,A=19,N=2*x+1,j=15,T=16,O=7,k=256,M=16,R=17,B=18,H=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ae=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],se=new Array(2*(x+2));m(se);var q=new Array(2*y);m(q);var G=new Array(512);m(G);var E=new Array(256);m(E);var X=new Array(w);m(X);var V,P,Q,D=new Array(y);function I(U,J,ge,he,te){this.static_tree=U,this.extra_bits=J,this.extra_base=ge,this.elems=he,this.max_length=te,this.has_stree=U&&U.length}function S(U,J){this.dyn_tree=U,this.max_code=0,this.stat_desc=J}function C(U){return U<256?G[U]:G[256+(U>>>7)]}function $(U,J){U.pending_buf[U.pending++]=255&J,U.pending_buf[U.pending++]=J>>>8&255}function K(U,J,ge){U.bi_valid>T-ge?(U.bi_buf|=J<<U.bi_valid&65535,$(U,U.bi_buf),U.bi_buf=J>>T-U.bi_valid,U.bi_valid+=ge-T):(U.bi_buf|=J<<U.bi_valid&65535,U.bi_valid+=ge)}function ie(U,J,ge){K(U,ge[2*J],ge[2*J+1])}function ye(U,J){for(var ge=0;ge|=1&U,U>>>=1,ge<<=1,0<--J;);return ge>>>1}function _e(U,J,ge){var he,te,xe=new Array(j+1),we=0;for(he=1;he<=j;he++)xe[he]=we=we+ge[he-1]<<1;for(te=0;te<=J;te++){var be=U[2*te+1];be!==0&&(U[2*te]=ye(xe[be]++,be))}}function Ne(U){var J;for(J=0;J<x;J++)U.dyn_ltree[2*J]=0;for(J=0;J<y;J++)U.dyn_dtree[2*J]=0;for(J=0;J<A;J++)U.bl_tree[2*J]=0;U.dyn_ltree[2*k]=1,U.opt_len=U.static_len=0,U.last_lit=U.matches=0}function oe(U){8<U.bi_valid?$(U,U.bi_buf):0<U.bi_valid&&(U.pending_buf[U.pending++]=U.bi_buf),U.bi_buf=0,U.bi_valid=0}function je(U,J,ge,he){var te=2*J,xe=2*ge;return U[te]<U[xe]||U[te]===U[xe]&&he[J]<=he[ge]}function Ee(U,J,ge){for(var he=U.heap[ge],te=ge<<1;te<=U.heap_len&&(te<U.heap_len&&je(J,U.heap[te+1],U.heap[te],U.depth)&&te++,!je(J,he,U.heap[te],U.depth));)U.heap[ge]=U.heap[te],ge=te,te<<=1;U.heap[ge]=he}function $e(U,J,ge){var he,te,xe,we,be=0;if(U.last_lit!==0)for(;he=U.pending_buf[U.d_buf+2*be]<<8|U.pending_buf[U.d_buf+2*be+1],te=U.pending_buf[U.l_buf+be],be++,he===0?ie(U,te,J):(ie(U,(xe=E[te])+v+1,J),(we=H[xe])!==0&&K(U,te-=X[xe],we),ie(U,xe=C(--he),ge),(we=ae[xe])!==0&&K(U,he-=D[xe],we)),be<U.last_lit;);ie(U,k,J)}function He(U,J){var ge,he,te,xe=J.dyn_tree,we=J.stat_desc.static_tree,be=J.stat_desc.has_stree,Te=J.stat_desc.elems,qe=-1;for(U.heap_len=0,U.heap_max=N,ge=0;ge<Te;ge++)xe[2*ge]!==0?(U.heap[++U.heap_len]=qe=ge,U.depth[ge]=0):xe[2*ge+1]=0;for(;U.heap_len<2;)xe[2*(te=U.heap[++U.heap_len]=qe<2?++qe:0)]=1,U.depth[te]=0,U.opt_len--,be&&(U.static_len-=we[2*te+1]);for(J.max_code=qe,ge=U.heap_len>>1;1<=ge;ge--)Ee(U,xe,ge);for(te=Te;ge=U.heap[1],U.heap[1]=U.heap[U.heap_len--],Ee(U,xe,1),he=U.heap[1],U.heap[--U.heap_max]=ge,U.heap[--U.heap_max]=he,xe[2*te]=xe[2*ge]+xe[2*he],U.depth[te]=(U.depth[ge]>=U.depth[he]?U.depth[ge]:U.depth[he])+1,xe[2*ge+1]=xe[2*he+1]=te,U.heap[1]=te++,Ee(U,xe,1),2<=U.heap_len;);U.heap[--U.heap_max]=U.heap[1],(function(De,ht){var Nt,Bt,Jt,Xe,ut,Pe,Me=ht.dyn_tree,At=ht.max_code,xt=ht.stat_desc.static_tree,Je=ht.stat_desc.has_stree,et=ht.stat_desc.extra_bits,St=ht.stat_desc.extra_base,zt=ht.stat_desc.max_length,vt=0;for(Xe=0;Xe<=j;Xe++)De.bl_count[Xe]=0;for(Me[2*De.heap[De.heap_max]+1]=0,Nt=De.heap_max+1;Nt<N;Nt++)zt<(Xe=Me[2*Me[2*(Bt=De.heap[Nt])+1]+1]+1)&&(Xe=zt,vt++),Me[2*Bt+1]=Xe,At<Bt||(De.bl_count[Xe]++,ut=0,St<=Bt&&(ut=et[Bt-St]),Pe=Me[2*Bt],De.opt_len+=Pe*(Xe+ut),Je&&(De.static_len+=Pe*(xt[2*Bt+1]+ut)));if(vt!==0){do{for(Xe=zt-1;De.bl_count[Xe]===0;)Xe--;De.bl_count[Xe]--,De.bl_count[Xe+1]+=2,De.bl_count[zt]--,vt-=2}while(0<vt);for(Xe=zt;Xe!==0;Xe--)for(Bt=De.bl_count[Xe];Bt!==0;)At<(Jt=De.heap[--Nt])||(Me[2*Jt+1]!==Xe&&(De.opt_len+=(Xe-Me[2*Jt+1])*Me[2*Jt],Me[2*Jt+1]=Xe),Bt--)}})(U,J),_e(xe,qe,U.bl_count)}function _(U,J,ge){var he,te,xe=-1,we=J[1],be=0,Te=7,qe=4;for(we===0&&(Te=138,qe=3),J[2*(ge+1)+1]=65535,he=0;he<=ge;he++)te=we,we=J[2*(he+1)+1],++be<Te&&te===we||(be<qe?U.bl_tree[2*te]+=be:te!==0?(te!==xe&&U.bl_tree[2*te]++,U.bl_tree[2*M]++):be<=10?U.bl_tree[2*R]++:U.bl_tree[2*B]++,xe=te,qe=(be=0)===we?(Te=138,3):te===we?(Te=6,3):(Te=7,4))}function Y(U,J,ge){var he,te,xe=-1,we=J[1],be=0,Te=7,qe=4;for(we===0&&(Te=138,qe=3),he=0;he<=ge;he++)if(te=we,we=J[2*(he+1)+1],!(++be<Te&&te===we)){if(be<qe)for(;ie(U,te,U.bl_tree),--be!=0;);else te!==0?(te!==xe&&(ie(U,te,U.bl_tree),be--),ie(U,M,U.bl_tree),K(U,be-3,2)):be<=10?(ie(U,R,U.bl_tree),K(U,be-3,3)):(ie(U,B,U.bl_tree),K(U,be-11,7));xe=te,qe=(be=0)===we?(Te=138,3):te===we?(Te=6,3):(Te=7,4)}}m(D);var re=!1;function L(U,J,ge,he){K(U,(g<<1)+(he?1:0),3),(function(te,xe,we,be){oe(te),$(te,we),$(te,~we),h.arraySet(te.pending_buf,te.window,xe,we,te.pending),te.pending+=we})(U,J,ge)}c._tr_init=function(U){re||((function(){var J,ge,he,te,xe,we=new Array(j+1);for(te=he=0;te<w-1;te++)for(X[te]=he,J=0;J<1<<H[te];J++)E[he++]=te;for(E[he-1]=te,te=xe=0;te<16;te++)for(D[te]=xe,J=0;J<1<<ae[te];J++)G[xe++]=te;for(xe>>=7;te<y;te++)for(D[te]=xe<<7,J=0;J<1<<ae[te]-7;J++)G[256+xe++]=te;for(ge=0;ge<=j;ge++)we[ge]=0;for(J=0;J<=143;)se[2*J+1]=8,J++,we[8]++;for(;J<=255;)se[2*J+1]=9,J++,we[9]++;for(;J<=279;)se[2*J+1]=7,J++,we[7]++;for(;J<=287;)se[2*J+1]=8,J++,we[8]++;for(_e(se,x+1,we),J=0;J<y;J++)q[2*J+1]=5,q[2*J]=ye(J,5);V=new I(se,H,v+1,x,j),P=new I(q,ae,0,y,j),Q=new I(new Array(0),W,0,A,O)})(),re=!0),U.l_desc=new S(U.dyn_ltree,V),U.d_desc=new S(U.dyn_dtree,P),U.bl_desc=new S(U.bl_tree,Q),U.bi_buf=0,U.bi_valid=0,Ne(U)},c._tr_stored_block=L,c._tr_flush_block=function(U,J,ge,he){var te,xe,we=0;0<U.level?(U.strm.data_type===2&&(U.strm.data_type=(function(be){var Te,qe=4093624447;for(Te=0;Te<=31;Te++,qe>>>=1)if(1&qe&&be.dyn_ltree[2*Te]!==0)return f;if(be.dyn_ltree[18]!==0||be.dyn_ltree[20]!==0||be.dyn_ltree[26]!==0)return p;for(Te=32;Te<v;Te++)if(be.dyn_ltree[2*Te]!==0)return p;return f})(U)),He(U,U.l_desc),He(U,U.d_desc),we=(function(be){var Te;for(_(be,be.dyn_ltree,be.l_desc.max_code),_(be,be.dyn_dtree,be.d_desc.max_code),He(be,be.bl_desc),Te=A-1;3<=Te&&be.bl_tree[2*ne[Te]+1]===0;Te--);return be.opt_len+=3*(Te+1)+5+5+4,Te})(U),te=U.opt_len+3+7>>>3,(xe=U.static_len+3+7>>>3)<=te&&(te=xe)):te=xe=ge+5,ge+4<=te&&J!==-1?L(U,J,ge,he):U.strategy===4||xe===te?(K(U,2+(he?1:0),3),$e(U,se,q)):(K(U,4+(he?1:0),3),(function(be,Te,qe,De){var ht;for(K(be,Te-257,5),K(be,qe-1,5),K(be,De-4,4),ht=0;ht<De;ht++)K(be,be.bl_tree[2*ne[ht]+1],3);Y(be,be.dyn_ltree,Te-1),Y(be,be.dyn_dtree,qe-1)})(U,U.l_desc.max_code+1,U.d_desc.max_code+1,we+1),$e(U,U.dyn_ltree,U.dyn_dtree)),Ne(U),he&&oe(U)},c._tr_tally=function(U,J,ge){return U.pending_buf[U.d_buf+2*U.last_lit]=J>>>8&255,U.pending_buf[U.d_buf+2*U.last_lit+1]=255&J,U.pending_buf[U.l_buf+U.last_lit]=255&ge,U.last_lit++,J===0?U.dyn_ltree[2*ge]++:(U.matches++,J--,U.dyn_ltree[2*(E[ge]+v+1)]++,U.dyn_dtree[2*C(J)]++),U.last_lit===U.lit_bufsize-1},c._tr_align=function(U){K(U,2,3),ie(U,k,se),(function(J){J.bi_valid===16?($(J,J.bi_buf),J.bi_buf=0,J.bi_valid=0):8<=J.bi_valid&&(J.pending_buf[J.pending++]=255&J.bi_buf,J.bi_buf>>=8,J.bi_valid-=8)})(U)}},{"../utils/common":41}],53:[function(s,o,c){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(s,o,c){(function(h){(function(f,p){if(!f.setImmediate){var m,g,w,v,x=1,y={},A=!1,N=f.document,j=Object.getPrototypeOf&&Object.getPrototypeOf(f);j=j&&j.setTimeout?j:f,m={}.toString.call(f.process)==="[object process]"?function(M){process.nextTick(function(){O(M)})}:(function(){if(f.postMessage&&!f.importScripts){var M=!0,R=f.onmessage;return f.onmessage=function(){M=!1},f.postMessage("","*"),f.onmessage=R,M}})()?(v="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",k,!1):f.attachEvent("onmessage",k),function(M){f.postMessage(v+M,"*")}):f.MessageChannel?((w=new MessageChannel).port1.onmessage=function(M){O(M.data)},function(M){w.port2.postMessage(M)}):N&&"onreadystatechange"in N.createElement("script")?(g=N.documentElement,function(M){var R=N.createElement("script");R.onreadystatechange=function(){O(M),R.onreadystatechange=null,g.removeChild(R),R=null},g.appendChild(R)}):function(M){setTimeout(O,0,M)},j.setImmediate=function(M){typeof M!="function"&&(M=new Function(""+M));for(var R=new Array(arguments.length-1),B=0;B<R.length;B++)R[B]=arguments[B+1];var H={callback:M,args:R};return y[x]=H,m(x),x++},j.clearImmediate=T}function T(M){delete y[M]}function O(M){if(A)setTimeout(O,0,M);else{var R=y[M];if(R){A=!0;try{(function(B){var H=B.callback,ae=B.args;switch(ae.length){case 0:H();break;case 1:H(ae[0]);break;case 2:H(ae[0],ae[1]);break;case 3:H(ae[0],ae[1],ae[2]);break;default:H.apply(p,ae)}})(R)}finally{T(M),A=!1}}}}function k(M){M.source===f&&typeof M.data=="string"&&M.data.indexOf(v)===0&&O(+M.data.slice(v.length))}})(typeof self>"u"?h===void 0?this:h:self)}).call(this,typeof zs<"u"?zs:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(sd)),sd.exports}var W2=J2();const e_=Pg(W2),Vg=()=>({id:`BUG-${Date.now().toString().slice(-6)}`,title:"",severity:"medium",status:"open",actualResult:"",expectedResult:"",stepsToReproduce:"",attachments:[],createdAt:new Date().toISOString()});function t_({reports:a,testCases:l,onSave:s,onDelete:o}){const[c,h]=F.useState(),[f,p]=F.useState(!1);async function m(){p(!0);try{const g=new e_;g.file("bug-reports.csv",r_(a));for(const y of a)for(const A of y.attachments)g.file(`attachments/${no(y.id)}/${no(A.name)}`,A.dataUrl.split(",")[1]??"",{base64:!0});const w=await g.generateAsync({type:"blob"}),v=URL.createObjectURL(w),x=document.createElement("a");x.href=v,x.download=`lazyscout-bug-reports-${new Date().toISOString().slice(0,10)}.zip`,x.click(),URL.revokeObjectURL(v)}finally{p(!1)}}return r.jsxs("section",{className:"bug-reports",children:[r.jsxs("div",{className:"bug-reports-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Defect tracking"}),r.jsx("h3",{children:"Bug Reports"}),r.jsx("p",{children:"Capture reproducible issues and keep screenshots with the local project."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!a.length||f,onClick:()=>{m()},children:f?"Creating ZIP…":"Export ZIP + images"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Vg()),children:"+ Add Bug Report"})]})]}),a.length?r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"bug-report-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"Bug ID"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Test Case"}),r.jsx("th",{children:"Severity"}),r.jsx("th",{children:"Status"}),r.jsx("th",{children:"Evidence"}),r.jsx("th",{children:"Actions"})]})}),r.jsx("tbody",{children:a.map(g=>r.jsxs("tr",{children:[r.jsx("td",{children:g.id}),r.jsxs("td",{children:[r.jsx("b",{children:g.title||"Untitled bug"}),r.jsx("small",{children:new Date(g.createdAt).toLocaleDateString()})]}),r.jsx("td",{children:g.testCaseId||"—"}),r.jsx("td",{children:r.jsx("span",{className:`bug-severity ${g.severity}`,children:g.severity})}),r.jsx("td",{children:r.jsx("span",{className:"bug-status",children:g.status})}),r.jsxs("td",{children:[g.attachments.length," screenshot",g.attachments.length===1?"":"s"]}),r.jsx("td",{children:r.jsxs("div",{className:"flex justify-center gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>h(g),children:"Edit"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>o(g.id),children:"Delete"})]})})]},g.id))})]})}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No Bug Reports yet"}),r.jsx("span",{children:"When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Vg()),children:"Create first Bug Report"})]}),c&&r.jsx(n_,{report:c,testCases:l,onClose:()=>h(void 0),onSave:g=>{s(g),h(void 0)}})]})}function n_({report:a,testCases:l,onSave:s,onClose:o}){const[c,h]=F.useState(a);async function f(p){const m=[...p.target.files??[]].filter(w=>w.type.startsWith("image/")).slice(0,5),g=await Promise.all(m.map(async w=>({name:w.name,type:w.type,dataUrl:await a_(w)})));h(w=>({...w,attachments:[...w.attachments,...g]}))}return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal bug-editor",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Bug Report"}),r.jsx("h2",{children:c.id}),r.jsx("p",{children:"Describe the defect so another person can reproduce it quickly."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,children:"×"})]}),r.jsxs("div",{className:"bug-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_150px_150px]",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Title"}),r.jsx("input",{className:"field",value:c.title,onChange:p=>h({...c,title:p.target.value}),placeholder:"What went wrong?"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Severity"}),r.jsxs("select",{className:"field",value:c.severity,onChange:p=>h({...c,severity:p.target.value}),children:[r.jsx("option",{value:"critical",children:"critical"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Status"}),r.jsxs("select",{className:"field",value:c.status,onChange:p=>h({...c,status:p.target.value}),children:[r.jsx("option",{value:"open",children:"open"}),r.jsx("option",{value:"in-progress",children:"in-progress"}),r.jsx("option",{value:"resolved",children:"resolved"})]})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Related Test Case"}),r.jsxs("select",{className:"field",value:c.testCaseId??"",onChange:p=>h({...c,testCaseId:p.target.value||void 0}),children:[r.jsx("option",{value:"",children:"Not linked"}),l.map(p=>r.jsxs("option",{value:p.id,children:[p.id," · ",p.title]},p.id))]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Steps to reproduce"}),r.jsx("textarea",{className:"field",rows:4,value:c.stepsToReproduce,onChange:p=>h({...c,stepsToReproduce:p.target.value}),placeholder:`1. Open…
52
+ `&&f++,s.push(o),s.some(m=>m.trim())&&l.push(s),s=[],o=""):o+=p}if(s.push(o),s.some(f=>f.trim())&&l.push(s),c)throw new Error("CSV contains an unclosed quoted value.");return l}function X2(n,l,s){const o=new Set(l.map(f=>f.id));let c=1;const h=()=>{let f=`TC-IMPORT-${String(c).padStart(3,"0")}`;for(;o.has(f);)f=`TC-IMPORT-${String(++c).padStart(3,"0")}`;return o.add(f),c++,f};return n.map(f=>{const p=Rn(f,"TC_ID","ID","TEST_CASE_ID"),m=Rn(f,"TITLE","TEST_CASE","NAME");if(!m&&!p)return null;const g=!p||o.has(p)?h():p;o.add(g);const w=Rn(f,"MODULE")||"IMPORTED",v=$s(f,"TEST_STEPS","STEPS").map(x=>({type:"manual",description:x}));return{id:g,module:w,folder:Rn(f,"FOLDER")||w,tags:$s(f,"TAGS","TAG"),requirements:$s(f,"REQUIREMENTS","REQUIREMENT","TICKET","TICKETS"),title:m||g,preconditions:$s(f,"PRECONDITIONS","PRECONDITION"),steps:v.length?v:[{type:"manual",description:"Review imported steps"}],expectedResult:Rn(f,"EXPECTED_RESULT","EXPECTED RESULT","EXPECTED")||"Review expected result",type:Q2(Rn(f,"TYPE")),priority:K2(Rn(f,"PRIORITY")),automationStatus:J2(Rn(f,"AUTOMATION_STATUS","AUTOMATION")),sourceUrl:Rn(f,"SOURCE_URL","SOURCE URL","URL")||s||"Imported file",notes:Rn(f,"NOTES","NOTE")||"Imported into LazyScout"}}).filter(f=>!!f)}function Gg(n){return n.toUpperCase().replace(/[^A-Z0-9]/g,"")}function Rn(n,...l){const s=new Map(Object.entries(n).map(([o,c])=>[Gg(o),String(c??"").trim()]));for(const o of l){const c=s.get(Gg(o));if(c)return c}return""}function $s(n,...l){return Rn(n,...l).split(/[\n,;|]/).map(s=>s.replace(/^\s*\d+[.)-]?\s*/,"").trim()).filter(Boolean)}function Q2(n){return n.toLowerCase()==="negative"?"negative":n.toLowerCase()==="validation"?"validation":"positive"}function K2(n){return n.toLowerCase()==="high"?"high":n.toLowerCase()==="low"?"low":"medium"}function J2(n){return["ready","needs-data","needs-review","manual"].includes(n)?n:"needs-review"}function W2(n){return n?new Intl.DateTimeFormat(void 0,{dateStyle:"medium"}).format(new Date(n)):"Published on npm"}function e_(){const[n,l]=F.useState(),[s,o]=F.useState(!0),[c,h]=F.useState(),[f,p]=F.useState(),[m,g]=F.useState(),[w,v]=F.useState(),[x,y]=F.useState();async function C(){o(!0),h(void 0);try{l(await Qx())}catch(T){h(T instanceof Error?T.message:"Could not check npm versions.")}finally{o(!1)}}F.useEffect(()=>{C()},[]);async function N(T){await navigator.clipboard.writeText(`npm install -g lazyscout@${T}`),y(T),window.setTimeout(()=>y(O=>O===T?void 0:O),1600)}async function j(T){g(T),p(void 0),v(void 0),h(void 0);try{v(await Kx(T))}catch(O){h(O instanceof ir&&O.hint?`${O.message} ${O.hint}`:O instanceof Error?O.message:"Could not install this version.")}finally{g(void 0)}}return r.jsxs("section",{className:"version-center",children:[r.jsxs("header",{className:"version-center-head",children:[r.jsx("div",{className:"version-center-icon",children:"V"}),r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Version Center"}),r.jsx("h3",{children:"Choose your LazyScout version"}),r.jsx("p",{children:"Install the latest release or switch to an earlier published version before opening a workspace."})]}),r.jsx("button",{type:"button",className:"version-refresh",onClick:()=>{C()},disabled:s,children:s?"Checking…":"Check again"})]}),s&&!n?r.jsxs("div",{className:"version-loading",children:[r.jsx("span",{className:"scout-spinner"})," Checking npm Registry…"]}):n?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"version-summary",children:[r.jsxs("div",{children:[r.jsx("small",{children:"Running now"}),r.jsxs("strong",{children:["v",n.currentVersion]})]}),r.jsx("span",{className:"version-summary-arrow",children:"→"}),r.jsxs("div",{children:[r.jsx("small",{children:"Latest release"}),r.jsx("strong",{children:n.latestVersion?`v${n.latestVersion}`:"Unavailable"})]}),r.jsx("span",{className:`version-state ${n.updateAvailable?"has-update":""}`,children:n.updateAvailable?"Update available":"Up to date"})]}),r.jsx("div",{className:"version-list","aria-label":"Published LazyScout versions",children:n.versions.slice(0,3).map(T=>{const O=T.version===n.currentVersion,k=T.version===f,M=T.version===m;return r.jsxs("div",{className:`version-row ${O?"is-current":""}`,children:[r.jsxs("div",{className:"version-number",children:[r.jsxs("span",{children:["v",T.version]}),r.jsx("small",{children:W2(T.publishedAt)})]}),r.jsxs("div",{className:"version-tags",children:[T.tags.map(R=>r.jsx("span",{children:R},R)),O&&r.jsx("span",{className:"current",children:"running"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary version-copy",onClick:()=>{N(T.version)},children:x===T.version?"Copied":"Copy command"}),r.jsx("button",{type:"button",className:"btn btn-primary version-install",disabled:O||!!m,onClick:()=>p(k?void 0:T.version),children:O?"Current":M?"Installing…":"Install"}),k&&r.jsxs("div",{className:"version-confirm",children:[r.jsxs("span",{children:["Install ",r.jsxs("b",{children:["v",T.version]})," globally? Restart LazyScout after installation to use it."]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(void 0),children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>{j(T.version)},children:["Install v",T.version]})]})]},T.version)})})]}):null,n&&!n.registryAvailable&&r.jsxs("div",{className:"version-message warning",children:["npm Registry is unavailable. ",n.error]}),c&&r.jsx("div",{className:"version-message error",children:c}),w&&r.jsxs("div",{className:"version-message success",children:[r.jsxs("b",{children:["LazyScout v",w.installedVersion," installed."]}),r.jsx("span",{children:"Close the current LazyScout terminal and run `lazyscout` again to switch versions."})]})]})}function t_({projects:n,onScout:l,onEmpty:s,onOpenProject:o,onClose:c}){const[h,f]=F.useState(""),[p,m]=F.useState(n[0]?.id??""),g=h.trim()||"Untitled Test Suite";return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:w=>w.target===w.currentTarget&&c(),children:r.jsxs("section",{className:"modern-modal new-project-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"New Project"}),r.jsx("h2",{children:"Start a QA workspace"}),r.jsx("p",{children:"Choose whether to scout a website now or import an existing Test Case suite."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:c,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"new-project-modal-body",children:[r.jsx(e_,{}),r.jsxs("label",{children:[r.jsx("span",{children:"Project name"}),r.jsx("input",{className:"field",value:h,onChange:w=>f(w.target.value),placeholder:"Example: Storefront regression",autoFocus:!0})]}),r.jsxs("div",{className:"new-project-choices",children:[r.jsxs("button",{type:"button",onClick:()=>l(g),children:[r.jsx("span",{className:"new-project-choice-icon scout",children:"◉"}),r.jsxs("span",{children:[r.jsx("b",{children:"Scout a website"}),r.jsx("small",{children:"Enter a URL, then let Playwright discover pages and create a first Test Case suite."})]}),r.jsx("em",{children:"→"})]}),n.length?r.jsxs("div",{className:"existing-project-choice",children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"↗"}),r.jsxs("div",{children:[r.jsx("b",{children:"Open existing project"}),r.jsx("small",{children:"Continue a local workspace."}),r.jsx("select",{className:"field",value:p,onChange:w=>m(w.target.value),children:n.map(w=>r.jsx("option",{value:w.id,children:w.name},w.id))})]})]}):r.jsxs("button",{type:"button",onClick:()=>s(g),children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"⇧"}),r.jsxs("span",{children:[r.jsx("b",{children:"Empty project"}),r.jsx("small",{children:"Create a blank suite for CSV, XLSX, or JSON import. You can add Test Cases manually too."})]}),r.jsx("em",{children:"→"})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:c,children:"Cancel"}),n.length>0&&r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!p,onClick:()=>p&&o(p),children:"Open project"})]})]})})}var sd={exports:{}};var Ig;function n_(){return Ig||(Ig=1,(function(n,l){(function(s){n.exports=s()})(function(){return(function s(o,c,h){function f(g,w){if(!c[g]){if(!o[g]){var v=typeof Ki=="function"&&Ki;if(!w&&v)return v(g,!0);if(p)return p(g,!0);var x=new Error("Cannot find module '"+g+"'");throw x.code="MODULE_NOT_FOUND",x}var y=c[g]={exports:{}};o[g][0].call(y.exports,function(C){var N=o[g][1][C];return f(N||C)},y,y.exports,s,o,c,h)}return c[g].exports}for(var p=typeof Ki=="function"&&Ki,m=0;m<h.length;m++)f(h[m]);return f})({1:[function(s,o,c){var h=s("./utils"),f=s("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(m){for(var g,w,v,x,y,C,N,j=[],T=0,O=m.length,k=O,M=h.getTypeOf(m)!=="string";T<m.length;)k=O-T,v=M?(g=m[T++],w=T<O?m[T++]:0,T<O?m[T++]:0):(g=m.charCodeAt(T++),w=T<O?m.charCodeAt(T++):0,T<O?m.charCodeAt(T++):0),x=g>>2,y=(3&g)<<4|w>>4,C=1<k?(15&w)<<2|v>>6:64,N=2<k?63&v:64,j.push(p.charAt(x)+p.charAt(y)+p.charAt(C)+p.charAt(N));return j.join("")},c.decode=function(m){var g,w,v,x,y,C,N=0,j=0,T="data:";if(m.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var O,k=3*(m=m.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(m.charAt(m.length-1)===p.charAt(64)&&k--,m.charAt(m.length-2)===p.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(O=f.uint8array?new Uint8Array(0|k):new Array(0|k);N<m.length;)g=p.indexOf(m.charAt(N++))<<2|(x=p.indexOf(m.charAt(N++)))>>4,w=(15&x)<<4|(y=p.indexOf(m.charAt(N++)))>>2,v=(3&y)<<6|(C=p.indexOf(m.charAt(N++))),O[j++]=g,y!==64&&(O[j++]=w),C!==64&&(O[j++]=v);return O}},{"./support":30,"./utils":32}],2:[function(s,o,c){var h=s("./external"),f=s("./stream/DataWorker"),p=s("./stream/Crc32Probe"),m=s("./stream/DataLengthProbe");function g(w,v,x,y,C){this.compressedSize=w,this.uncompressedSize=v,this.crc32=x,this.compression=y,this.compressedContent=C}g.prototype={getContentWorker:function(){var w=new f(h.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),v=this;return w.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),w},getCompressedWorker:function(){return new f(h.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},g.createWorkerFrom=function(w,v,x){return w.pipe(new p).pipe(new m("uncompressedSize")).pipe(v.compressWorker(x)).pipe(new m("compressedSize")).withStreamInfo("compression",v)},o.exports=g},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,o,c){var h=s("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(){return new h("STORE compression")},uncompressWorker:function(){return new h("STORE decompression")}},c.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,o,c){var h=s("./utils"),f=(function(){for(var p,m=[],g=0;g<256;g++){p=g;for(var w=0;w<8;w++)p=1&p?3988292384^p>>>1:p>>>1;m[g]=p}return m})();o.exports=function(p,m){return p!==void 0&&p.length?h.getTypeOf(p)!=="string"?(function(g,w,v,x){var y=f,C=x+v;g^=-1;for(var N=x;N<C;N++)g=g>>>8^y[255&(g^w[N])];return-1^g})(0|m,p,p.length,0):(function(g,w,v,x){var y=f,C=x+v;g^=-1;for(var N=x;N<C;N++)g=g>>>8^y[255&(g^w.charCodeAt(N))];return-1^g})(0|m,p,p.length,0):0}},{"./utils":32}],5:[function(s,o,c){c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(s,o,c){var h=null;h=typeof Promise<"u"?Promise:s("lie"),o.exports={Promise:h}},{lie:37}],7:[function(s,o,c){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",f=s("pako"),p=s("./utils"),m=s("./stream/GenericWorker"),g=h?"uint8array":"array";function w(v,x){m.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=x,this.meta={}}c.magic="\b\0",p.inherits(w,m),w.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(g,v.data),!1)},w.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},w.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},w.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(x){v.push({data:x,meta:v.meta})}},c.compressWorker=function(v){return new w("Deflate",v)},c.uncompressWorker=function(){return new w("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,o,c){function h(y,C){var N,j="";for(N=0;N<C;N++)j+=String.fromCharCode(255&y),y>>>=8;return j}function f(y,C,N,j,T,O){var k,M,R=y.file,B=y.compression,H=O!==g.utf8encode,ae=p.transformTo("string",O(R.name)),W=p.transformTo("string",g.utf8encode(R.name)),ne=R.comment,se=p.transformTo("string",O(ne)),q=p.transformTo("string",g.utf8encode(ne)),G=W.length!==R.name.length,E=q.length!==ne.length,X="",V="",P="",Q=R.dir,D=R.date,I={crc32:0,compressedSize:0,uncompressedSize:0};C&&!N||(I.crc32=y.crc32,I.compressedSize=y.compressedSize,I.uncompressedSize=y.uncompressedSize);var S=0;C&&(S|=8),H||!G&&!E||(S|=2048);var A=0,$=0;Q&&(A|=16),T==="UNIX"?($=798,A|=(function(ie,ye){var _e=ie;return ie||(_e=ye?16893:33204),(65535&_e)<<16})(R.unixPermissions,Q)):($=20,A|=(function(ie){return 63&(ie||0)})(R.dosPermissions)),k=D.getUTCHours(),k<<=6,k|=D.getUTCMinutes(),k<<=5,k|=D.getUTCSeconds()/2,M=D.getUTCFullYear()-1980,M<<=4,M|=D.getUTCMonth()+1,M<<=5,M|=D.getUTCDate(),G&&(V=h(1,1)+h(w(ae),4)+W,X+="up"+h(V.length,2)+V),E&&(P=h(1,1)+h(w(se),4)+q,X+="uc"+h(P.length,2)+P);var K="";return K+=`
53
+ \0`,K+=h(S,2),K+=B.magic,K+=h(k,2),K+=h(M,2),K+=h(I.crc32,4),K+=h(I.compressedSize,4),K+=h(I.uncompressedSize,4),K+=h(ae.length,2),K+=h(X.length,2),{fileRecord:v.LOCAL_FILE_HEADER+K+ae+X,dirRecord:v.CENTRAL_FILE_HEADER+h($,2)+K+h(se.length,2)+"\0\0\0\0"+h(A,4)+h(j,4)+ae+X+se}}var p=s("../utils"),m=s("../stream/GenericWorker"),g=s("../utf8"),w=s("../crc32"),v=s("../signature");function x(y,C,N,j){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=C,this.zipPlatform=N,this.encodeFileName=j,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(x,m),x.prototype.push=function(y){var C=y.meta.percent||0,N=this.entriesCount,j=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,m.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:N?(C+100*(N-j-1))/N:100}}))},x.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var C=this.streamFiles&&!y.file.dir;if(C){var N=f(y,C,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(y){this.accumulate=!1;var C=this.streamFiles&&!y.file.dir,N=f(y,C,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),C)this.push({data:(function(j){return v.DATA_DESCRIPTOR+h(j.crc32,4)+h(j.compressedSize,4)+h(j.uncompressedSize,4)})(y),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var y=this.bytesWritten,C=0;C<this.dirRecords.length;C++)this.push({data:this.dirRecords[C],meta:{percent:100}});var N=this.bytesWritten-y,j=(function(T,O,k,M,R){var B=p.transformTo("string",R(M));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+h(T,2)+h(T,2)+h(O,4)+h(k,4)+h(B.length,2)+B})(this.dirRecords.length,N,y,this.zipComment,this.encodeFileName);this.push({data:j,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(y){this._sources.push(y);var C=this;return y.on("data",function(N){C.processChunk(N)}),y.on("end",function(){C.closedSource(C.previous.streamInfo),C._sources.length?C.prepareNextSource():C.end()}),y.on("error",function(N){C.error(N)}),this},x.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(y){var C=this._sources;if(!m.prototype.error.call(this,y))return!1;for(var N=0;N<C.length;N++)try{C[N].error(y)}catch{}return!0},x.prototype.lock=function(){m.prototype.lock.call(this);for(var y=this._sources,C=0;C<y.length;C++)y[C].lock()},o.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,o,c){var h=s("../compressions"),f=s("./ZipFileWorker");c.generateWorker=function(p,m,g){var w=new f(m.streamFiles,g,m.platform,m.encodeFileName),v=0;try{p.forEach(function(x,y){v++;var C=(function(O,k){var M=O||k,R=h[M];if(!R)throw new Error(M+" is not a valid compression method !");return R})(y.options.compression,m.compression),N=y.options.compressionOptions||m.compressionOptions||{},j=y.dir,T=y.date;y._compressWorker(C,N).withStreamInfo("file",{name:x,dir:j,date:T,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(w)}),w.entriesCount=v}catch(x){w.error(x)}return w}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,o,c){function h(){if(!(this instanceof h))return new h;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var f=new h;for(var p in this)typeof this[p]!="function"&&(f[p]=this[p]);return f}}(h.prototype=s("./object")).loadAsync=s("./load"),h.support=s("./support"),h.defaults=s("./defaults"),h.version="3.10.1",h.loadAsync=function(f,p){return new h().loadAsync(f,p)},h.external=s("./external"),o.exports=h},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,o,c){var h=s("./utils"),f=s("./external"),p=s("./utf8"),m=s("./zipEntries"),g=s("./stream/Crc32Probe"),w=s("./nodejsUtils");function v(x){return new f.Promise(function(y,C){var N=x.decompressed.getContentWorker().pipe(new g);N.on("error",function(j){C(j)}).on("end",function(){N.streamInfo.crc32!==x.decompressed.crc32?C(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}o.exports=function(x,y){var C=this;return y=h.extend(y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:p.utf8decode}),w.isNode&&w.isStream(x)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):h.prepareContent("the loaded zip file",x,!0,y.optimizedBinaryString,y.base64).then(function(N){var j=new m(y);return j.load(N),j}).then(function(N){var j=[f.Promise.resolve(N)],T=N.files;if(y.checkCRC32)for(var O=0;O<T.length;O++)j.push(v(T[O]));return f.Promise.all(j)}).then(function(N){for(var j=N.shift(),T=j.files,O=0;O<T.length;O++){var k=T[O],M=k.fileNameStr,R=h.resolve(k.fileNameStr);C.file(R,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:y.createFolders}),k.dir||(C.file(R).unsafeOriginalName=M)}return j.zipComment.length&&(C.comment=j.zipComment),C})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,o,c){var h=s("../utils"),f=s("../stream/GenericWorker");function p(m,g){f.call(this,"Nodejs stream input adapter for "+m),this._upstreamEnded=!1,this._bindStream(g)}h.inherits(p,f),p.prototype._bindStream=function(m){var g=this;(this._stream=m).pause(),m.on("data",function(w){g.push({data:w,meta:{percent:0}})}).on("error",function(w){g.isPaused?this.generatedError=w:g.error(w)}).on("end",function(){g.isPaused?g._upstreamEnded=!0:g.end()})},p.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=p},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,o,c){var h=s("readable-stream").Readable;function f(p,m,g){h.call(this,m),this._helper=p;var w=this;p.on("data",function(v,x){w.push(v)||w._helper.pause(),g&&g(x)}).on("error",function(v){w.emit("error",v)}).on("end",function(){w.push(null)})}s("../utils").inherits(f,h),f.prototype._read=function(){this._helper.resume()},o.exports=f},{"../utils":32,"readable-stream":16}],14:[function(s,o,c){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(h,f){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(h,f);if(typeof h=="number")throw new Error('The "data" argument must not be a number');return new Buffer(h,f)},allocBuffer:function(h){if(Buffer.alloc)return Buffer.alloc(h);var f=new Buffer(h);return f.fill(0),f},isBuffer:function(h){return Buffer.isBuffer(h)},isStream:function(h){return h&&typeof h.on=="function"&&typeof h.pause=="function"&&typeof h.resume=="function"}}},{}],15:[function(s,o,c){function h(R,B,H){var ae,W=p.getTypeOf(B),ne=p.extend(H||{},w);ne.date=ne.date||new Date,ne.compression!==null&&(ne.compression=ne.compression.toUpperCase()),typeof ne.unixPermissions=="string"&&(ne.unixPermissions=parseInt(ne.unixPermissions,8)),ne.unixPermissions&&16384&ne.unixPermissions&&(ne.dir=!0),ne.dosPermissions&&16&ne.dosPermissions&&(ne.dir=!0),ne.dir&&(R=T(R)),ne.createFolders&&(ae=j(R))&&O.call(this,ae,!0);var se=W==="string"&&ne.binary===!1&&ne.base64===!1;H&&H.binary!==void 0||(ne.binary=!se),(B instanceof v&&B.uncompressedSize===0||ne.dir||!B||B.length===0)&&(ne.base64=!1,ne.binary=!0,B="",ne.compression="STORE",W="string");var q=null;q=B instanceof v||B instanceof m?B:C.isNode&&C.isStream(B)?new N(R,B):p.prepareContent(R,B,ne.binary,ne.optimizedBinaryString,ne.base64);var G=new x(R,q,ne);this.files[R]=G}var f=s("./utf8"),p=s("./utils"),m=s("./stream/GenericWorker"),g=s("./stream/StreamHelper"),w=s("./defaults"),v=s("./compressedObject"),x=s("./zipObject"),y=s("./generate"),C=s("./nodejsUtils"),N=s("./nodejs/NodejsStreamInputAdapter"),j=function(R){R.slice(-1)==="/"&&(R=R.substring(0,R.length-1));var B=R.lastIndexOf("/");return 0<B?R.substring(0,B):""},T=function(R){return R.slice(-1)!=="/"&&(R+="/"),R},O=function(R,B){return B=B!==void 0?B:w.createFolders,R=T(R),this.files[R]||h.call(this,R,null,{dir:!0,createFolders:B}),this.files[R]};function k(R){return Object.prototype.toString.call(R)==="[object RegExp]"}var M={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(R){var B,H,ae;for(B in this.files)ae=this.files[B],(H=B.slice(this.root.length,B.length))&&B.slice(0,this.root.length)===this.root&&R(H,ae)},filter:function(R){var B=[];return this.forEach(function(H,ae){R(H,ae)&&B.push(ae)}),B},file:function(R,B,H){if(arguments.length!==1)return R=this.root+R,h.call(this,R,B,H),this;if(k(R)){var ae=R;return this.filter(function(ne,se){return!se.dir&&ae.test(ne)})}var W=this.files[this.root+R];return W&&!W.dir?W:null},folder:function(R){if(!R)return this;if(k(R))return this.filter(function(W,ne){return ne.dir&&R.test(W)});var B=this.root+R,H=O.call(this,B),ae=this.clone();return ae.root=H.name,ae},remove:function(R){R=this.root+R;var B=this.files[R];if(B||(R.slice(-1)!=="/"&&(R+="/"),B=this.files[R]),B&&!B.dir)delete this.files[R];else for(var H=this.filter(function(W,ne){return ne.name.slice(0,R.length)===R}),ae=0;ae<H.length;ae++)delete this.files[H[ae].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(R){var B,H={};try{if((H=p.extend(R||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:f.utf8encode})).type=H.type.toLowerCase(),H.compression=H.compression.toUpperCase(),H.type==="binarystring"&&(H.type="string"),!H.type)throw new Error("No output type specified.");p.checkSupport(H.type),H.platform!=="darwin"&&H.platform!=="freebsd"&&H.platform!=="linux"&&H.platform!=="sunos"||(H.platform="UNIX"),H.platform==="win32"&&(H.platform="DOS");var ae=H.comment||this.comment||"";B=y.generateWorker(this,H,ae)}catch(W){(B=new m("error")).error(W)}return new g(B,H.type||"string",H.mimeType)},generateAsync:function(R,B){return this.generateInternalStream(R).accumulate(B)},generateNodeStream:function(R,B){return(R=R||{}).type||(R.type="nodebuffer"),this.generateInternalStream(R).toNodejsStream(B)}};o.exports=M},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,o,c){o.exports=s("stream")},{stream:void 0}],17:[function(s,o,c){var h=s("./DataReader");function f(p){h.call(this,p);for(var m=0;m<this.data.length;m++)p[m]=255&p[m]}s("../utils").inherits(f,h),f.prototype.byteAt=function(p){return this.data[this.zero+p]},f.prototype.lastIndexOfSignature=function(p){for(var m=p.charCodeAt(0),g=p.charCodeAt(1),w=p.charCodeAt(2),v=p.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===m&&this.data[x+1]===g&&this.data[x+2]===w&&this.data[x+3]===v)return x-this.zero;return-1},f.prototype.readAndCheckSignature=function(p){var m=p.charCodeAt(0),g=p.charCodeAt(1),w=p.charCodeAt(2),v=p.charCodeAt(3),x=this.readData(4);return m===x[0]&&g===x[1]&&w===x[2]&&v===x[3]},f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],18:[function(s,o,c){var h=s("../utils");function f(p){this.data=p,this.length=p.length,this.index=0,this.zero=0}f.prototype={checkOffset:function(p){this.checkIndex(this.index+p)},checkIndex:function(p){if(this.length<this.zero+p||p<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+p+"). Corrupted zip ?")},setIndex:function(p){this.checkIndex(p),this.index=p},skip:function(p){this.setIndex(this.index+p)},byteAt:function(){},readInt:function(p){var m,g=0;for(this.checkOffset(p),m=this.index+p-1;m>=this.index;m--)g=(g<<8)+this.byteAt(m);return this.index+=p,g},readString:function(p){return h.transformTo("string",this.readData(p))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var p=this.readInt(4);return new Date(Date.UTC(1980+(p>>25&127),(p>>21&15)-1,p>>16&31,p>>11&31,p>>5&63,(31&p)<<1))}},o.exports=f},{"../utils":32}],19:[function(s,o,c){var h=s("./Uint8ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,o,c){var h=s("./DataReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.byteAt=function(p){return this.data.charCodeAt(this.zero+p)},f.prototype.lastIndexOfSignature=function(p){return this.data.lastIndexOf(p)-this.zero},f.prototype.readAndCheckSignature=function(p){return p===this.readData(4)},f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],21:[function(s,o,c){var h=s("./ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(s,o,c){var h=s("../utils"),f=s("../support"),p=s("./ArrayReader"),m=s("./StringReader"),g=s("./NodeBufferReader"),w=s("./Uint8ArrayReader");o.exports=function(v){var x=h.getTypeOf(v);return h.checkSupport(x),x!=="string"||f.uint8array?x==="nodebuffer"?new g(v):f.uint8array?new w(h.transformTo("uint8array",v)):new p(h.transformTo("array",v)):new m(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,o,c){c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,o,c){var h=s("./GenericWorker"),f=s("../utils");function p(m){h.call(this,"ConvertWorker to "+m),this.destType=m}f.inherits(p,h),p.prototype.processChunk=function(m){this.push({data:f.transformTo(this.destType,m.data),meta:m.meta})},o.exports=p},{"../utils":32,"./GenericWorker":28}],25:[function(s,o,c){var h=s("./GenericWorker"),f=s("../crc32");function p(){h.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(p,h),p.prototype.processChunk=function(m){this.streamInfo.crc32=f(m.data,this.streamInfo.crc32||0),this.push(m)},o.exports=p},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,o,c){var h=s("../utils"),f=s("./GenericWorker");function p(m){f.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}h.inherits(p,f),p.prototype.processChunk=function(m){if(m){var g=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=g+m.data.length}f.prototype.processChunk.call(this,m)},o.exports=p},{"../utils":32,"./GenericWorker":28}],27:[function(s,o,c){var h=s("../utils"),f=s("./GenericWorker");function p(m){f.call(this,"DataWorker");var g=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(w){g.dataIsReady=!0,g.data=w,g.max=w&&w.length||0,g.type=h.getTypeOf(w),g.isPaused||g._tickAndRepeat()},function(w){g.error(w)})}h.inherits(p,f),p.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,h.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(h.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},p.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,g=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,g);break;case"uint8array":m=this.data.subarray(this.index,g);break;case"array":case"nodebuffer":m=this.data.slice(this.index,g)}return this.index=g,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=p},{"../utils":32,"./GenericWorker":28}],28:[function(s,o,c){function h(f){this.name=f||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}h.prototype={push:function(f){this.emit("data",f)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(f){this.emit("error",f)}return!0},error:function(f){return!this.isFinished&&(this.isPaused?this.generatedError=f:(this.isFinished=!0,this.emit("error",f),this.previous&&this.previous.error(f),this.cleanUp()),!0)},on:function(f,p){return this._listeners[f].push(p),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(f,p){if(this._listeners[f])for(var m=0;m<this._listeners[f].length;m++)this._listeners[f][m].call(this,p)},pipe:function(f){return f.registerPrevious(this)},registerPrevious:function(f){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=f.streamInfo,this.mergeStreamInfo(),this.previous=f;var p=this;return f.on("data",function(m){p.processChunk(m)}),f.on("end",function(){p.end()}),f.on("error",function(m){p.error(m)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var f=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),f=!0),this.previous&&this.previous.resume(),!f},flush:function(){},processChunk:function(f){this.push(f)},withStreamInfo:function(f,p){return this.extraStreamInfo[f]=p,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var f in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,f)&&(this.streamInfo[f]=this.extraStreamInfo[f])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var f="Worker "+this.name;return this.previous?this.previous+" -> "+f:f}},o.exports=h},{}],29:[function(s,o,c){var h=s("../utils"),f=s("./ConvertWorker"),p=s("./GenericWorker"),m=s("../base64"),g=s("../support"),w=s("../external"),v=null;if(g.nodestream)try{v=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(C,N){return new w.Promise(function(j,T){var O=[],k=C._internalType,M=C._outputType,R=C._mimeType;C.on("data",function(B,H){O.push(B),N&&N(H)}).on("error",function(B){O=[],T(B)}).on("end",function(){try{var B=(function(H,ae,W){switch(H){case"blob":return h.newBlob(h.transformTo("arraybuffer",ae),W);case"base64":return m.encode(ae);default:return h.transformTo(H,ae)}})(M,(function(H,ae){var W,ne=0,se=null,q=0;for(W=0;W<ae.length;W++)q+=ae[W].length;switch(H){case"string":return ae.join("");case"array":return Array.prototype.concat.apply([],ae);case"uint8array":for(se=new Uint8Array(q),W=0;W<ae.length;W++)se.set(ae[W],ne),ne+=ae[W].length;return se;case"nodebuffer":return Buffer.concat(ae);default:throw new Error("concat : unsupported type '"+H+"'")}})(k,O),R);j(B)}catch(H){T(H)}O=[]}).resume()})}function y(C,N,j){var T=N;switch(N){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=N,this._mimeType=j,h.checkSupport(T),this._worker=C.pipe(new f(T)),C.lock()}catch(O){this._worker=new p("error"),this._worker.error(O)}}y.prototype={accumulate:function(C){return x(this,C)},on:function(C,N){var j=this;return C==="data"?this._worker.on(C,function(T){N.call(j,T.data,T.meta)}):this._worker.on(C,function(){h.delay(N,arguments,j)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(C){if(h.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},C)}},o.exports=y},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,o,c){if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",c.nodebuffer=typeof Buffer<"u",c.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")c.blob=!1;else{var h=new ArrayBuffer(0);try{c.blob=new Blob([h],{type:"application/zip"}).size===0}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);f.append(h),c.blob=f.getBlob("application/zip").size===0}catch{c.blob=!1}}}try{c.nodestream=!!s("readable-stream").Readable}catch{c.nodestream=!1}},{"readable-stream":16}],31:[function(s,o,c){for(var h=s("./utils"),f=s("./support"),p=s("./nodejsUtils"),m=s("./stream/GenericWorker"),g=new Array(256),w=0;w<256;w++)g[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;g[254]=g[254]=1;function v(){m.call(this,"utf-8 decode"),this.leftOver=null}function x(){m.call(this,"utf-8 encode")}c.utf8encode=function(y){return f.nodebuffer?p.newBufferFrom(y,"utf-8"):(function(C){var N,j,T,O,k,M=C.length,R=0;for(O=0;O<M;O++)(64512&(j=C.charCodeAt(O)))==55296&&O+1<M&&(64512&(T=C.charCodeAt(O+1)))==56320&&(j=65536+(j-55296<<10)+(T-56320),O++),R+=j<128?1:j<2048?2:j<65536?3:4;for(N=f.uint8array?new Uint8Array(R):new Array(R),O=k=0;k<R;O++)(64512&(j=C.charCodeAt(O)))==55296&&O+1<M&&(64512&(T=C.charCodeAt(O+1)))==56320&&(j=65536+(j-55296<<10)+(T-56320),O++),j<128?N[k++]=j:(j<2048?N[k++]=192|j>>>6:(j<65536?N[k++]=224|j>>>12:(N[k++]=240|j>>>18,N[k++]=128|j>>>12&63),N[k++]=128|j>>>6&63),N[k++]=128|63&j);return N})(y)},c.utf8decode=function(y){return f.nodebuffer?h.transformTo("nodebuffer",y).toString("utf-8"):(function(C){var N,j,T,O,k=C.length,M=new Array(2*k);for(N=j=0;N<k;)if((T=C[N++])<128)M[j++]=T;else if(4<(O=g[T]))M[j++]=65533,N+=O-1;else{for(T&=O===2?31:O===3?15:7;1<O&&N<k;)T=T<<6|63&C[N++],O--;1<O?M[j++]=65533:T<65536?M[j++]=T:(T-=65536,M[j++]=55296|T>>10&1023,M[j++]=56320|1023&T)}return M.length!==j&&(M.subarray?M=M.subarray(0,j):M.length=j),h.applyFromCharCode(M)})(y=h.transformTo(f.uint8array?"uint8array":"array",y))},h.inherits(v,m),v.prototype.processChunk=function(y){var C=h.transformTo(f.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var N=C;(C=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),C.set(N,this.leftOver.length)}else C=this.leftOver.concat(C);this.leftOver=null}var j=(function(O,k){var M;for((k=k||O.length)>O.length&&(k=O.length),M=k-1;0<=M&&(192&O[M])==128;)M--;return M<0||M===0?k:M+g[O[M]]>k?M:k})(C),T=C;j!==C.length&&(f.uint8array?(T=C.subarray(0,j),this.leftOver=C.subarray(j,C.length)):(T=C.slice(0,j),this.leftOver=C.slice(j,C.length))),this.push({data:c.utf8decode(T),meta:y.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=v,h.inherits(x,m),x.prototype.processChunk=function(y){this.push({data:c.utf8encode(y.data),meta:y.meta})},c.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,o,c){var h=s("./support"),f=s("./base64"),p=s("./nodejsUtils"),m=s("./external");function g(N){return N}function w(N,j){for(var T=0;T<N.length;++T)j[T]=255&N.charCodeAt(T);return j}s("setimmediate"),c.newBlob=function(N,j){c.checkSupport("blob");try{return new Blob([N],{type:j})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(N),T.getBlob(j)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(N,j,T){var O=[],k=0,M=N.length;if(M<=T)return String.fromCharCode.apply(null,N);for(;k<M;)j==="array"||j==="nodebuffer"?O.push(String.fromCharCode.apply(null,N.slice(k,Math.min(k+T,M)))):O.push(String.fromCharCode.apply(null,N.subarray(k,Math.min(k+T,M)))),k+=T;return O.join("")},stringifyByChar:function(N){for(var j="",T=0;T<N.length;T++)j+=String.fromCharCode(N[T]);return j},applyCanBeUsed:{uint8array:(function(){try{return h.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return h.nodebuffer&&String.fromCharCode.apply(null,p.allocBuffer(1)).length===1}catch{return!1}})()}};function x(N){var j=65536,T=c.getTypeOf(N),O=!0;if(T==="uint8array"?O=v.applyCanBeUsed.uint8array:T==="nodebuffer"&&(O=v.applyCanBeUsed.nodebuffer),O)for(;1<j;)try{return v.stringifyByChunk(N,T,j)}catch{j=Math.floor(j/2)}return v.stringifyByChar(N)}function y(N,j){for(var T=0;T<N.length;T++)j[T]=N[T];return j}c.applyFromCharCode=x;var C={};C.string={string:g,array:function(N){return w(N,new Array(N.length))},arraybuffer:function(N){return C.string.uint8array(N).buffer},uint8array:function(N){return w(N,new Uint8Array(N.length))},nodebuffer:function(N){return w(N,p.allocBuffer(N.length))}},C.array={string:x,array:g,arraybuffer:function(N){return new Uint8Array(N).buffer},uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(N)}},C.arraybuffer={string:function(N){return x(new Uint8Array(N))},array:function(N){return y(new Uint8Array(N),new Array(N.byteLength))},arraybuffer:g,uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(new Uint8Array(N))}},C.uint8array={string:x,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return N.buffer},uint8array:g,nodebuffer:function(N){return p.newBufferFrom(N)}},C.nodebuffer={string:x,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return C.nodebuffer.uint8array(N).buffer},uint8array:function(N){return y(N,new Uint8Array(N.length))},nodebuffer:g},c.transformTo=function(N,j){if(j=j||"",!N)return j;c.checkSupport(N);var T=c.getTypeOf(j);return C[T][N](j)},c.resolve=function(N){for(var j=N.split("/"),T=[],O=0;O<j.length;O++){var k=j[O];k==="."||k===""&&O!==0&&O!==j.length-1||(k===".."?T.pop():T.push(k))}return T.join("/")},c.getTypeOf=function(N){return typeof N=="string"?"string":Object.prototype.toString.call(N)==="[object Array]"?"array":h.nodebuffer&&p.isBuffer(N)?"nodebuffer":h.uint8array&&N instanceof Uint8Array?"uint8array":h.arraybuffer&&N instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(N){if(!h[N.toLowerCase()])throw new Error(N+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(N){var j,T,O="";for(T=0;T<(N||"").length;T++)O+="\\x"+((j=N.charCodeAt(T))<16?"0":"")+j.toString(16).toUpperCase();return O},c.delay=function(N,j,T){setImmediate(function(){N.apply(T||null,j||[])})},c.inherits=function(N,j){function T(){}T.prototype=j.prototype,N.prototype=new T},c.extend=function(){var N,j,T={};for(N=0;N<arguments.length;N++)for(j in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],j)&&T[j]===void 0&&(T[j]=arguments[N][j]);return T},c.prepareContent=function(N,j,T,O,k){return m.Promise.resolve(j).then(function(M){return h.blob&&(M instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(M))!==-1)&&typeof FileReader<"u"?new m.Promise(function(R,B){var H=new FileReader;H.onload=function(ae){R(ae.target.result)},H.onerror=function(ae){B(ae.target.error)},H.readAsArrayBuffer(M)}):M}).then(function(M){var R=c.getTypeOf(M);return R?(R==="arraybuffer"?M=c.transformTo("uint8array",M):R==="string"&&(k?M=f.decode(M):T&&O!==!0&&(M=(function(B){return w(B,h.uint8array?new Uint8Array(B.length):new Array(B.length))})(M))),M):m.Promise.reject(new Error("Can't read the data of '"+N+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,o,c){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./signature"),m=s("./zipEntry"),g=s("./support");function w(v){this.files=[],this.loadOptions=v}w.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var x=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(x)+", expected "+f.pretty(v)+")")}},isSignature:function(v,x){var y=this.reader.index;this.reader.setIndex(v);var C=this.reader.readString(4)===x;return this.reader.setIndex(y),C},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var v=this.reader.readData(this.zipCommentLength),x=g.uint8array?"uint8array":"array",y=f.transformTo(x,v);this.zipComment=this.loadOptions.decodeFileName(y)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var v,x,y,C=this.zip64EndOfCentralSize-44;0<C;)v=this.reader.readInt(2),x=this.reader.readInt(4),y=this.reader.readData(x),this.zip64ExtensibleData[v]={id:v,length:x,value:y}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var v,x;for(v=0;v<this.files.length;v++)x=this.files[v],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(p.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(p.CENTRAL_FILE_HEADER);)(v=new m({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(v);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var v=this.reader.lastIndexOfSignature(p.CENTRAL_DIRECTORY_END);if(v<0)throw this.isSignature(0,p.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(v);var x=v;if(this.checkSignature(p.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,(v=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(v),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,p.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var C=x-y;if(0<C)this.isSignature(x,p.CENTRAL_FILE_HEADER)||(this.reader.zero=C);else if(C<0)throw new Error("Corrupted zip: missing "+Math.abs(C)+" bytes.")},prepareReader:function(v){this.reader=h(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=w},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,o,c){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./compressedObject"),m=s("./crc32"),g=s("./utf8"),w=s("./compressions"),v=s("./support");function x(y,C){this.options=y,this.loadOptions=C}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var C,N;if(y.skip(22),this.fileNameLength=y.readInt(2),N=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.skip(N),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((C=(function(j){for(var T in w)if(Object.prototype.hasOwnProperty.call(w,T)&&w[T].magic===j)return w[T];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new p(this.compressedSize,this.uncompressedSize,this.crc32,C,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var C=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(C),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=h(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var C,N,j,T=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<T;)C=y.readInt(2),N=y.readInt(2),j=y.readData(N),this.extraFields[C]={id:C,length:N,value:j};y.setIndex(T)},handleUTF8:function(){var y=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=g.utf8decode(this.fileName),this.fileCommentStr=g.utf8decode(this.fileComment);else{var C=this.findExtraFieldUnicodePath();if(C!==null)this.fileNameStr=C;else{var N=f.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(N)}var j=this.findExtraFieldUnicodeComment();if(j!==null)this.fileCommentStr=j;else{var T=f.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var C=h(y.value);return C.readInt(1)!==1||m(this.fileName)!==C.readInt(4)?null:g.utf8decode(C.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var C=h(y.value);return C.readInt(1)!==1||m(this.fileComment)!==C.readInt(4)?null:g.utf8decode(C.readData(y.length-5))}return null}},o.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,o,c){function h(C,N,j){this.name=C,this.dir=j.dir,this.date=j.date,this.comment=j.comment,this.unixPermissions=j.unixPermissions,this.dosPermissions=j.dosPermissions,this._data=N,this._dataBinary=j.binary,this.options={compression:j.compression,compressionOptions:j.compressionOptions}}var f=s("./stream/StreamHelper"),p=s("./stream/DataWorker"),m=s("./utf8"),g=s("./compressedObject"),w=s("./stream/GenericWorker");h.prototype={internalStream:function(C){var N=null,j="string";try{if(!C)throw new Error("No output type specified.");var T=(j=C.toLowerCase())==="string"||j==="text";j!=="binarystring"&&j!=="text"||(j="string"),N=this._decompressWorker();var O=!this._dataBinary;O&&!T&&(N=N.pipe(new m.Utf8EncodeWorker)),!O&&T&&(N=N.pipe(new m.Utf8DecodeWorker))}catch(k){(N=new w("error")).error(k)}return new f(N,j,"")},async:function(C,N){return this.internalStream(C).accumulate(N)},nodeStream:function(C,N){return this.internalStream(C||"nodebuffer").toNodejsStream(N)},_compressWorker:function(C,N){if(this._data instanceof g&&this._data.compression.magic===C.magic)return this._data.getCompressedWorker();var j=this._decompressWorker();return this._dataBinary||(j=j.pipe(new m.Utf8EncodeWorker)),g.createWorkerFrom(j,C,N)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof w?this._data:new p(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],x=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<v.length;y++)h.prototype[v[y]]=x;o.exports=h},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,o,c){(function(h){var f,p,m=h.MutationObserver||h.WebKitMutationObserver;if(m){var g=0,w=new m(C),v=h.document.createTextNode("");w.observe(v,{characterData:!0}),f=function(){v.data=g=++g%2}}else if(h.setImmediate||h.MessageChannel===void 0)f="document"in h&&"onreadystatechange"in h.document.createElement("script")?function(){var N=h.document.createElement("script");N.onreadystatechange=function(){C(),N.onreadystatechange=null,N.parentNode.removeChild(N),N=null},h.document.documentElement.appendChild(N)}:function(){setTimeout(C,0)};else{var x=new h.MessageChannel;x.port1.onmessage=C,f=function(){x.port2.postMessage(0)}}var y=[];function C(){var N,j;p=!0;for(var T=y.length;T;){for(j=y,y=[],N=-1;++N<T;)j[N]();T=y.length}p=!1}o.exports=function(N){y.push(N)!==1||p||f()}}).call(this,typeof zs<"u"?zs:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,o,c){var h=s("immediate");function f(){}var p={},m=["REJECTED"],g=["FULFILLED"],w=["PENDING"];function v(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,T!==f&&N(this,T)}function x(T,O,k){this.promise=T,typeof O=="function"&&(this.onFulfilled=O,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function y(T,O,k){h(function(){var M;try{M=O(k)}catch(R){return p.reject(T,R)}M===T?p.reject(T,new TypeError("Cannot resolve promise with itself")):p.resolve(T,M)})}function C(T){var O=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof O=="function")return function(){O.apply(T,arguments)}}function N(T,O){var k=!1;function M(H){k||(k=!0,p.reject(T,H))}function R(H){k||(k=!0,p.resolve(T,H))}var B=j(function(){O(R,M)});B.status==="error"&&M(B.value)}function j(T,O){var k={};try{k.value=T(O),k.status="success"}catch(M){k.status="error",k.value=M}return k}(o.exports=v).prototype.finally=function(T){if(typeof T!="function")return this;var O=this.constructor;return this.then(function(k){return O.resolve(T()).then(function(){return k})},function(k){return O.resolve(T()).then(function(){throw k})})},v.prototype.catch=function(T){return this.then(null,T)},v.prototype.then=function(T,O){if(typeof T!="function"&&this.state===g||typeof O!="function"&&this.state===m)return this;var k=new this.constructor(f);return this.state!==w?y(k,this.state===g?T:O,this.outcome):this.queue.push(new x(k,T,O)),k},x.prototype.callFulfilled=function(T){p.resolve(this.promise,T)},x.prototype.otherCallFulfilled=function(T){y(this.promise,this.onFulfilled,T)},x.prototype.callRejected=function(T){p.reject(this.promise,T)},x.prototype.otherCallRejected=function(T){y(this.promise,this.onRejected,T)},p.resolve=function(T,O){var k=j(C,O);if(k.status==="error")return p.reject(T,k.value);var M=k.value;if(M)N(T,M);else{T.state=g,T.outcome=O;for(var R=-1,B=T.queue.length;++R<B;)T.queue[R].callFulfilled(O)}return T},p.reject=function(T,O){T.state=m,T.outcome=O;for(var k=-1,M=T.queue.length;++k<M;)T.queue[k].callRejected(O);return T},v.resolve=function(T){return T instanceof this?T:p.resolve(new this(f),T)},v.reject=function(T){var O=new this(f);return p.reject(O,T)},v.all=function(T){var O=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=T.length,M=!1;if(!k)return this.resolve([]);for(var R=new Array(k),B=0,H=-1,ae=new this(f);++H<k;)W(T[H],H);return ae;function W(ne,se){O.resolve(ne).then(function(q){R[se]=q,++B!==k||M||(M=!0,p.resolve(ae,R))},function(q){M||(M=!0,p.reject(ae,q))})}},v.race=function(T){var O=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=T.length,M=!1;if(!k)return this.resolve([]);for(var R=-1,B=new this(f);++R<k;)H=T[R],O.resolve(H).then(function(ae){M||(M=!0,p.resolve(B,ae))},function(ae){M||(M=!0,p.reject(B,ae))});var H;return B}},{immediate:36}],38:[function(s,o,c){var h={};(0,s("./lib/utils/common").assign)(h,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),o.exports=h},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,o,c){var h=s("./zlib/deflate"),f=s("./utils/common"),p=s("./utils/strings"),m=s("./zlib/messages"),g=s("./zlib/zstream"),w=Object.prototype.toString,v=0,x=-1,y=0,C=8;function N(T){if(!(this instanceof N))return new N(T);this.options=f.assign({level:x,method:C,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},T||{});var O=this.options;O.raw&&0<O.windowBits?O.windowBits=-O.windowBits:O.gzip&&0<O.windowBits&&O.windowBits<16&&(O.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var k=h.deflateInit2(this.strm,O.level,O.method,O.windowBits,O.memLevel,O.strategy);if(k!==v)throw new Error(m[k]);if(O.header&&h.deflateSetHeader(this.strm,O.header),O.dictionary){var M;if(M=typeof O.dictionary=="string"?p.string2buf(O.dictionary):w.call(O.dictionary)==="[object ArrayBuffer]"?new Uint8Array(O.dictionary):O.dictionary,(k=h.deflateSetDictionary(this.strm,M))!==v)throw new Error(m[k]);this._dict_set=!0}}function j(T,O){var k=new N(O);if(k.push(T,!0),k.err)throw k.msg||m[k.err];return k.result}N.prototype.push=function(T,O){var k,M,R=this.strm,B=this.options.chunkSize;if(this.ended)return!1;M=O===~~O?O:O===!0?4:0,typeof T=="string"?R.input=p.string2buf(T):w.call(T)==="[object ArrayBuffer]"?R.input=new Uint8Array(T):R.input=T,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new f.Buf8(B),R.next_out=0,R.avail_out=B),(k=h.deflate(R,M))!==1&&k!==v)return this.onEnd(k),!(this.ended=!0);R.avail_out!==0&&(R.avail_in!==0||M!==4&&M!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(R.output,R.next_out))):this.onData(f.shrinkBuf(R.output,R.next_out)))}while((0<R.avail_in||R.avail_out===0)&&k!==1);return M===4?(k=h.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===v):M!==2||(this.onEnd(v),!(R.avail_out=0))},N.prototype.onData=function(T){this.chunks.push(T)},N.prototype.onEnd=function(T){T===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},c.Deflate=N,c.deflate=j,c.deflateRaw=function(T,O){return(O=O||{}).raw=!0,j(T,O)},c.gzip=function(T,O){return(O=O||{}).gzip=!0,j(T,O)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,o,c){var h=s("./zlib/inflate"),f=s("./utils/common"),p=s("./utils/strings"),m=s("./zlib/constants"),g=s("./zlib/messages"),w=s("./zlib/zstream"),v=s("./zlib/gzheader"),x=Object.prototype.toString;function y(N){if(!(this instanceof y))return new y(N);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},N||{});var j=this.options;j.raw&&0<=j.windowBits&&j.windowBits<16&&(j.windowBits=-j.windowBits,j.windowBits===0&&(j.windowBits=-15)),!(0<=j.windowBits&&j.windowBits<16)||N&&N.windowBits||(j.windowBits+=32),15<j.windowBits&&j.windowBits<48&&(15&j.windowBits)==0&&(j.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var T=h.inflateInit2(this.strm,j.windowBits);if(T!==m.Z_OK)throw new Error(g[T]);this.header=new v,h.inflateGetHeader(this.strm,this.header)}function C(N,j){var T=new y(j);if(T.push(N,!0),T.err)throw T.msg||g[T.err];return T.result}y.prototype.push=function(N,j){var T,O,k,M,R,B,H=this.strm,ae=this.options.chunkSize,W=this.options.dictionary,ne=!1;if(this.ended)return!1;O=j===~~j?j:j===!0?m.Z_FINISH:m.Z_NO_FLUSH,typeof N=="string"?H.input=p.binstring2buf(N):x.call(N)==="[object ArrayBuffer]"?H.input=new Uint8Array(N):H.input=N,H.next_in=0,H.avail_in=H.input.length;do{if(H.avail_out===0&&(H.output=new f.Buf8(ae),H.next_out=0,H.avail_out=ae),(T=h.inflate(H,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&W&&(B=typeof W=="string"?p.string2buf(W):x.call(W)==="[object ArrayBuffer]"?new Uint8Array(W):W,T=h.inflateSetDictionary(this.strm,B)),T===m.Z_BUF_ERROR&&ne===!0&&(T=m.Z_OK,ne=!1),T!==m.Z_STREAM_END&&T!==m.Z_OK)return this.onEnd(T),!(this.ended=!0);H.next_out&&(H.avail_out!==0&&T!==m.Z_STREAM_END&&(H.avail_in!==0||O!==m.Z_FINISH&&O!==m.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=p.utf8border(H.output,H.next_out),M=H.next_out-k,R=p.buf2string(H.output,k),H.next_out=M,H.avail_out=ae-M,M&&f.arraySet(H.output,H.output,k,M,0),this.onData(R)):this.onData(f.shrinkBuf(H.output,H.next_out)))),H.avail_in===0&&H.avail_out===0&&(ne=!0)}while((0<H.avail_in||H.avail_out===0)&&T!==m.Z_STREAM_END);return T===m.Z_STREAM_END&&(O=m.Z_FINISH),O===m.Z_FINISH?(T=h.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===m.Z_OK):O!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(H.avail_out=0))},y.prototype.onData=function(N){this.chunks.push(N)},y.prototype.onEnd=function(N){N===m.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg},c.Inflate=y,c.inflate=C,c.inflateRaw=function(N,j){return(j=j||{}).raw=!0,C(N,j)},c.ungzip=C},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,o,c){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";c.assign=function(m){for(var g=Array.prototype.slice.call(arguments,1);g.length;){var w=g.shift();if(w){if(typeof w!="object")throw new TypeError(w+"must be non-object");for(var v in w)w.hasOwnProperty(v)&&(m[v]=w[v])}}return m},c.shrinkBuf=function(m,g){return m.length===g?m:m.subarray?m.subarray(0,g):(m.length=g,m)};var f={arraySet:function(m,g,w,v,x){if(g.subarray&&m.subarray)m.set(g.subarray(w,w+v),x);else for(var y=0;y<v;y++)m[x+y]=g[w+y]},flattenChunks:function(m){var g,w,v,x,y,C;for(g=v=0,w=m.length;g<w;g++)v+=m[g].length;for(C=new Uint8Array(v),g=x=0,w=m.length;g<w;g++)y=m[g],C.set(y,x),x+=y.length;return C}},p={arraySet:function(m,g,w,v,x){for(var y=0;y<v;y++)m[x+y]=g[w+y]},flattenChunks:function(m){return[].concat.apply([],m)}};c.setTyped=function(m){m?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,f)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,p))},c.setTyped(h)},{}],42:[function(s,o,c){var h=s("./common"),f=!0,p=!0;try{String.fromCharCode.apply(null,[0])}catch{f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{p=!1}for(var m=new h.Buf8(256),g=0;g<256;g++)m[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;function w(v,x){if(x<65537&&(v.subarray&&p||!v.subarray&&f))return String.fromCharCode.apply(null,h.shrinkBuf(v,x));for(var y="",C=0;C<x;C++)y+=String.fromCharCode(v[C]);return y}m[254]=m[254]=1,c.string2buf=function(v){var x,y,C,N,j,T=v.length,O=0;for(N=0;N<T;N++)(64512&(y=v.charCodeAt(N)))==55296&&N+1<T&&(64512&(C=v.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(C-56320),N++),O+=y<128?1:y<2048?2:y<65536?3:4;for(x=new h.Buf8(O),N=j=0;j<O;N++)(64512&(y=v.charCodeAt(N)))==55296&&N+1<T&&(64512&(C=v.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(C-56320),N++),y<128?x[j++]=y:(y<2048?x[j++]=192|y>>>6:(y<65536?x[j++]=224|y>>>12:(x[j++]=240|y>>>18,x[j++]=128|y>>>12&63),x[j++]=128|y>>>6&63),x[j++]=128|63&y);return x},c.buf2binstring=function(v){return w(v,v.length)},c.binstring2buf=function(v){for(var x=new h.Buf8(v.length),y=0,C=x.length;y<C;y++)x[y]=v.charCodeAt(y);return x},c.buf2string=function(v,x){var y,C,N,j,T=x||v.length,O=new Array(2*T);for(y=C=0;y<T;)if((N=v[y++])<128)O[C++]=N;else if(4<(j=m[N]))O[C++]=65533,y+=j-1;else{for(N&=j===2?31:j===3?15:7;1<j&&y<T;)N=N<<6|63&v[y++],j--;1<j?O[C++]=65533:N<65536?O[C++]=N:(N-=65536,O[C++]=55296|N>>10&1023,O[C++]=56320|1023&N)}return w(O,C)},c.utf8border=function(v,x){var y;for((x=x||v.length)>v.length&&(x=v.length),y=x-1;0<=y&&(192&v[y])==128;)y--;return y<0||y===0?x:y+m[v[y]]>x?y:x}},{"./common":41}],43:[function(s,o,c){o.exports=function(h,f,p,m){for(var g=65535&h|0,w=h>>>16&65535|0,v=0;p!==0;){for(p-=v=2e3<p?2e3:p;w=w+(g=g+f[m++]|0)|0,--v;);g%=65521,w%=65521}return g|w<<16|0}},{}],44:[function(s,o,c){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(s,o,c){var h=(function(){for(var f,p=[],m=0;m<256;m++){f=m;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;p[m]=f}return p})();o.exports=function(f,p,m,g){var w=h,v=g+m;f^=-1;for(var x=g;x<v;x++)f=f>>>8^w[255&(f^p[x])];return-1^f}},{}],46:[function(s,o,c){var h,f=s("../utils/common"),p=s("./trees"),m=s("./adler32"),g=s("./crc32"),w=s("./messages"),v=0,x=4,y=0,C=-2,N=-1,j=4,T=2,O=8,k=9,M=286,R=30,B=19,H=2*M+1,ae=15,W=3,ne=258,se=ne+W+1,q=42,G=113,E=1,X=2,V=3,P=4;function Q(_,Y){return _.msg=w[Y],Y}function D(_){return(_<<1)-(4<_?9:0)}function I(_){for(var Y=_.length;0<=--Y;)_[Y]=0}function S(_){var Y=_.state,re=Y.pending;re>_.avail_out&&(re=_.avail_out),re!==0&&(f.arraySet(_.output,Y.pending_buf,Y.pending_out,re,_.next_out),_.next_out+=re,Y.pending_out+=re,_.total_out+=re,_.avail_out-=re,Y.pending-=re,Y.pending===0&&(Y.pending_out=0))}function A(_,Y){p._tr_flush_block(_,0<=_.block_start?_.block_start:-1,_.strstart-_.block_start,Y),_.block_start=_.strstart,S(_.strm)}function $(_,Y){_.pending_buf[_.pending++]=Y}function K(_,Y){_.pending_buf[_.pending++]=Y>>>8&255,_.pending_buf[_.pending++]=255&Y}function ie(_,Y){var re,L,U=_.max_chain_length,J=_.strstart,ge=_.prev_length,he=_.nice_match,te=_.strstart>_.w_size-se?_.strstart-(_.w_size-se):0,xe=_.window,we=_.w_mask,be=_.prev,Te=_.strstart+ne,qe=xe[J+ge-1],De=xe[J+ge];_.prev_length>=_.good_match&&(U>>=2),he>_.lookahead&&(he=_.lookahead);do if(xe[(re=Y)+ge]===De&&xe[re+ge-1]===qe&&xe[re]===xe[J]&&xe[++re]===xe[J+1]){J+=2,re++;do;while(xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&xe[++J]===xe[++re]&&J<Te);if(L=ne-(Te-J),J=Te-ne,ge<L){if(_.match_start=Y,he<=(ge=L))break;qe=xe[J+ge-1],De=xe[J+ge]}}while((Y=be[Y&we])>te&&--U!=0);return ge<=_.lookahead?ge:_.lookahead}function ye(_){var Y,re,L,U,J,ge,he,te,xe,we,be=_.w_size;do{if(U=_.window_size-_.lookahead-_.strstart,_.strstart>=be+(be-se)){for(f.arraySet(_.window,_.window,be,be,0),_.match_start-=be,_.strstart-=be,_.block_start-=be,Y=re=_.hash_size;L=_.head[--Y],_.head[Y]=be<=L?L-be:0,--re;);for(Y=re=be;L=_.prev[--Y],_.prev[Y]=be<=L?L-be:0,--re;);U+=be}if(_.strm.avail_in===0)break;if(ge=_.strm,he=_.window,te=_.strstart+_.lookahead,xe=U,we=void 0,we=ge.avail_in,xe<we&&(we=xe),re=we===0?0:(ge.avail_in-=we,f.arraySet(he,ge.input,ge.next_in,we,te),ge.state.wrap===1?ge.adler=m(ge.adler,he,we,te):ge.state.wrap===2&&(ge.adler=g(ge.adler,he,we,te)),ge.next_in+=we,ge.total_in+=we,we),_.lookahead+=re,_.lookahead+_.insert>=W)for(J=_.strstart-_.insert,_.ins_h=_.window[J],_.ins_h=(_.ins_h<<_.hash_shift^_.window[J+1])&_.hash_mask;_.insert&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[J+W-1])&_.hash_mask,_.prev[J&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=J,J++,_.insert--,!(_.lookahead+_.insert<W)););}while(_.lookahead<se&&_.strm.avail_in!==0)}function _e(_,Y){for(var re,L;;){if(_.lookahead<se){if(ye(_),_.lookahead<se&&Y===v)return E;if(_.lookahead===0)break}if(re=0,_.lookahead>=W&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),re!==0&&_.strstart-re<=_.w_size-se&&(_.match_length=ie(_,re)),_.match_length>=W)if(L=p._tr_tally(_,_.strstart-_.match_start,_.match_length-W),_.lookahead-=_.match_length,_.match_length<=_.max_lazy_match&&_.lookahead>=W){for(_.match_length--;_.strstart++,_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart,--_.match_length!=0;);_.strstart++}else _.strstart+=_.match_length,_.match_length=0,_.ins_h=_.window[_.strstart],_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+1])&_.hash_mask;else L=p._tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++;if(L&&(A(_,!1),_.strm.avail_out===0))return E}return _.insert=_.strstart<W-1?_.strstart:W-1,Y===x?(A(_,!0),_.strm.avail_out===0?V:P):_.last_lit&&(A(_,!1),_.strm.avail_out===0)?E:X}function Ne(_,Y){for(var re,L,U;;){if(_.lookahead<se){if(ye(_),_.lookahead<se&&Y===v)return E;if(_.lookahead===0)break}if(re=0,_.lookahead>=W&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),_.prev_length=_.match_length,_.prev_match=_.match_start,_.match_length=W-1,re!==0&&_.prev_length<_.max_lazy_match&&_.strstart-re<=_.w_size-se&&(_.match_length=ie(_,re),_.match_length<=5&&(_.strategy===1||_.match_length===W&&4096<_.strstart-_.match_start)&&(_.match_length=W-1)),_.prev_length>=W&&_.match_length<=_.prev_length){for(U=_.strstart+_.lookahead-W,L=p._tr_tally(_,_.strstart-1-_.prev_match,_.prev_length-W),_.lookahead-=_.prev_length-1,_.prev_length-=2;++_.strstart<=U&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+W-1])&_.hash_mask,re=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),--_.prev_length!=0;);if(_.match_available=0,_.match_length=W-1,_.strstart++,L&&(A(_,!1),_.strm.avail_out===0))return E}else if(_.match_available){if((L=p._tr_tally(_,0,_.window[_.strstart-1]))&&A(_,!1),_.strstart++,_.lookahead--,_.strm.avail_out===0)return E}else _.match_available=1,_.strstart++,_.lookahead--}return _.match_available&&(L=p._tr_tally(_,0,_.window[_.strstart-1]),_.match_available=0),_.insert=_.strstart<W-1?_.strstart:W-1,Y===x?(A(_,!0),_.strm.avail_out===0?V:P):_.last_lit&&(A(_,!1),_.strm.avail_out===0)?E:X}function oe(_,Y,re,L,U){this.good_length=_,this.max_lazy=Y,this.nice_length=re,this.max_chain=L,this.func=U}function je(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=O,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new f.Buf16(2*H),this.dyn_dtree=new f.Buf16(2*(2*R+1)),this.bl_tree=new f.Buf16(2*(2*B+1)),I(this.dyn_ltree),I(this.dyn_dtree),I(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new f.Buf16(ae+1),this.heap=new f.Buf16(2*M+1),I(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*M+1),I(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ee(_){var Y;return _&&_.state?(_.total_in=_.total_out=0,_.data_type=T,(Y=_.state).pending=0,Y.pending_out=0,Y.wrap<0&&(Y.wrap=-Y.wrap),Y.status=Y.wrap?q:G,_.adler=Y.wrap===2?0:1,Y.last_flush=v,p._tr_init(Y),y):Q(_,C)}function $e(_){var Y=Ee(_);return Y===y&&(function(re){re.window_size=2*re.w_size,I(re.head),re.max_lazy_match=h[re.level].max_lazy,re.good_match=h[re.level].good_length,re.nice_match=h[re.level].nice_length,re.max_chain_length=h[re.level].max_chain,re.strstart=0,re.block_start=0,re.lookahead=0,re.insert=0,re.match_length=re.prev_length=W-1,re.match_available=0,re.ins_h=0})(_.state),Y}function He(_,Y,re,L,U,J){if(!_)return C;var ge=1;if(Y===N&&(Y=6),L<0?(ge=0,L=-L):15<L&&(ge=2,L-=16),U<1||k<U||re!==O||L<8||15<L||Y<0||9<Y||J<0||j<J)return Q(_,C);L===8&&(L=9);var he=new je;return(_.state=he).strm=_,he.wrap=ge,he.gzhead=null,he.w_bits=L,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=U+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+W-1)/W),he.window=new f.Buf8(2*he.w_size),he.head=new f.Buf16(he.hash_size),he.prev=new f.Buf16(he.w_size),he.lit_bufsize=1<<U+6,he.pending_buf_size=4*he.lit_bufsize,he.pending_buf=new f.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=Y,he.strategy=J,he.method=re,$e(_)}h=[new oe(0,0,0,0,function(_,Y){var re=65535;for(re>_.pending_buf_size-5&&(re=_.pending_buf_size-5);;){if(_.lookahead<=1){if(ye(_),_.lookahead===0&&Y===v)return E;if(_.lookahead===0)break}_.strstart+=_.lookahead,_.lookahead=0;var L=_.block_start+re;if((_.strstart===0||_.strstart>=L)&&(_.lookahead=_.strstart-L,_.strstart=L,A(_,!1),_.strm.avail_out===0)||_.strstart-_.block_start>=_.w_size-se&&(A(_,!1),_.strm.avail_out===0))return E}return _.insert=0,Y===x?(A(_,!0),_.strm.avail_out===0?V:P):(_.strstart>_.block_start&&(A(_,!1),_.strm.avail_out),E)}),new oe(4,4,8,4,_e),new oe(4,5,16,8,_e),new oe(4,6,32,32,_e),new oe(4,4,16,16,Ne),new oe(8,16,32,32,Ne),new oe(8,16,128,128,Ne),new oe(8,32,128,256,Ne),new oe(32,128,258,1024,Ne),new oe(32,258,258,4096,Ne)],c.deflateInit=function(_,Y){return He(_,Y,O,15,8,0)},c.deflateInit2=He,c.deflateReset=$e,c.deflateResetKeep=Ee,c.deflateSetHeader=function(_,Y){return _&&_.state?_.state.wrap!==2?C:(_.state.gzhead=Y,y):C},c.deflate=function(_,Y){var re,L,U,J;if(!_||!_.state||5<Y||Y<0)return _?Q(_,C):C;if(L=_.state,!_.output||!_.input&&_.avail_in!==0||L.status===666&&Y!==x)return Q(_,_.avail_out===0?-5:C);if(L.strm=_,re=L.last_flush,L.last_flush=Y,L.status===q)if(L.wrap===2)_.adler=0,$(L,31),$(L,139),$(L,8),L.gzhead?($(L,(L.gzhead.text?1:0)+(L.gzhead.hcrc?2:0)+(L.gzhead.extra?4:0)+(L.gzhead.name?8:0)+(L.gzhead.comment?16:0)),$(L,255&L.gzhead.time),$(L,L.gzhead.time>>8&255),$(L,L.gzhead.time>>16&255),$(L,L.gzhead.time>>24&255),$(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),$(L,255&L.gzhead.os),L.gzhead.extra&&L.gzhead.extra.length&&($(L,255&L.gzhead.extra.length),$(L,L.gzhead.extra.length>>8&255)),L.gzhead.hcrc&&(_.adler=g(_.adler,L.pending_buf,L.pending,0)),L.gzindex=0,L.status=69):($(L,0),$(L,0),$(L,0),$(L,0),$(L,0),$(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),$(L,3),L.status=G);else{var ge=O+(L.w_bits-8<<4)<<8;ge|=(2<=L.strategy||L.level<2?0:L.level<6?1:L.level===6?2:3)<<6,L.strstart!==0&&(ge|=32),ge+=31-ge%31,L.status=G,K(L,ge),L.strstart!==0&&(K(L,_.adler>>>16),K(L,65535&_.adler)),_.adler=1}if(L.status===69)if(L.gzhead.extra){for(U=L.pending;L.gzindex<(65535&L.gzhead.extra.length)&&(L.pending!==L.pending_buf_size||(L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),S(_),U=L.pending,L.pending!==L.pending_buf_size));)$(L,255&L.gzhead.extra[L.gzindex]),L.gzindex++;L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),L.gzindex===L.gzhead.extra.length&&(L.gzindex=0,L.status=73)}else L.status=73;if(L.status===73)if(L.gzhead.name){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),S(_),U=L.pending,L.pending===L.pending_buf_size)){J=1;break}J=L.gzindex<L.gzhead.name.length?255&L.gzhead.name.charCodeAt(L.gzindex++):0,$(L,J)}while(J!==0);L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),J===0&&(L.gzindex=0,L.status=91)}else L.status=91;if(L.status===91)if(L.gzhead.comment){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),S(_),U=L.pending,L.pending===L.pending_buf_size)){J=1;break}J=L.gzindex<L.gzhead.comment.length?255&L.gzhead.comment.charCodeAt(L.gzindex++):0,$(L,J)}while(J!==0);L.gzhead.hcrc&&L.pending>U&&(_.adler=g(_.adler,L.pending_buf,L.pending-U,U)),J===0&&(L.status=103)}else L.status=103;if(L.status===103&&(L.gzhead.hcrc?(L.pending+2>L.pending_buf_size&&S(_),L.pending+2<=L.pending_buf_size&&($(L,255&_.adler),$(L,_.adler>>8&255),_.adler=0,L.status=G)):L.status=G),L.pending!==0){if(S(_),_.avail_out===0)return L.last_flush=-1,y}else if(_.avail_in===0&&D(Y)<=D(re)&&Y!==x)return Q(_,-5);if(L.status===666&&_.avail_in!==0)return Q(_,-5);if(_.avail_in!==0||L.lookahead!==0||Y!==v&&L.status!==666){var he=L.strategy===2?(function(te,xe){for(var we;;){if(te.lookahead===0&&(ye(te),te.lookahead===0)){if(xe===v)return E;break}if(te.match_length=0,we=p._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++,we&&(A(te,!1),te.strm.avail_out===0))return E}return te.insert=0,xe===x?(A(te,!0),te.strm.avail_out===0?V:P):te.last_lit&&(A(te,!1),te.strm.avail_out===0)?E:X})(L,Y):L.strategy===3?(function(te,xe){for(var we,be,Te,qe,De=te.window;;){if(te.lookahead<=ne){if(ye(te),te.lookahead<=ne&&xe===v)return E;if(te.lookahead===0)break}if(te.match_length=0,te.lookahead>=W&&0<te.strstart&&(be=De[Te=te.strstart-1])===De[++Te]&&be===De[++Te]&&be===De[++Te]){qe=te.strstart+ne;do;while(be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&be===De[++Te]&&Te<qe);te.match_length=ne-(qe-Te),te.match_length>te.lookahead&&(te.match_length=te.lookahead)}if(te.match_length>=W?(we=p._tr_tally(te,1,te.match_length-W),te.lookahead-=te.match_length,te.strstart+=te.match_length,te.match_length=0):(we=p._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++),we&&(A(te,!1),te.strm.avail_out===0))return E}return te.insert=0,xe===x?(A(te,!0),te.strm.avail_out===0?V:P):te.last_lit&&(A(te,!1),te.strm.avail_out===0)?E:X})(L,Y):h[L.level].func(L,Y);if(he!==V&&he!==P||(L.status=666),he===E||he===V)return _.avail_out===0&&(L.last_flush=-1),y;if(he===X&&(Y===1?p._tr_align(L):Y!==5&&(p._tr_stored_block(L,0,0,!1),Y===3&&(I(L.head),L.lookahead===0&&(L.strstart=0,L.block_start=0,L.insert=0))),S(_),_.avail_out===0))return L.last_flush=-1,y}return Y!==x?y:L.wrap<=0?1:(L.wrap===2?($(L,255&_.adler),$(L,_.adler>>8&255),$(L,_.adler>>16&255),$(L,_.adler>>24&255),$(L,255&_.total_in),$(L,_.total_in>>8&255),$(L,_.total_in>>16&255),$(L,_.total_in>>24&255)):(K(L,_.adler>>>16),K(L,65535&_.adler)),S(_),0<L.wrap&&(L.wrap=-L.wrap),L.pending!==0?y:1)},c.deflateEnd=function(_){var Y;return _&&_.state?(Y=_.state.status)!==q&&Y!==69&&Y!==73&&Y!==91&&Y!==103&&Y!==G&&Y!==666?Q(_,C):(_.state=null,Y===G?Q(_,-3):y):C},c.deflateSetDictionary=function(_,Y){var re,L,U,J,ge,he,te,xe,we=Y.length;if(!_||!_.state||(J=(re=_.state).wrap)===2||J===1&&re.status!==q||re.lookahead)return C;for(J===1&&(_.adler=m(_.adler,Y,we,0)),re.wrap=0,we>=re.w_size&&(J===0&&(I(re.head),re.strstart=0,re.block_start=0,re.insert=0),xe=new f.Buf8(re.w_size),f.arraySet(xe,Y,we-re.w_size,re.w_size,0),Y=xe,we=re.w_size),ge=_.avail_in,he=_.next_in,te=_.input,_.avail_in=we,_.next_in=0,_.input=Y,ye(re);re.lookahead>=W;){for(L=re.strstart,U=re.lookahead-(W-1);re.ins_h=(re.ins_h<<re.hash_shift^re.window[L+W-1])&re.hash_mask,re.prev[L&re.w_mask]=re.head[re.ins_h],re.head[re.ins_h]=L,L++,--U;);re.strstart=L,re.lookahead=W-1,ye(re)}return re.strstart+=re.lookahead,re.block_start=re.strstart,re.insert=re.lookahead,re.lookahead=0,re.match_length=re.prev_length=W-1,re.match_available=0,_.next_in=he,_.input=te,_.avail_in=ge,re.wrap=J,y},c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,o,c){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,o,c){o.exports=function(h,f){var p,m,g,w,v,x,y,C,N,j,T,O,k,M,R,B,H,ae,W,ne,se,q,G,E,X;p=h.state,m=h.next_in,E=h.input,g=m+(h.avail_in-5),w=h.next_out,X=h.output,v=w-(f-h.avail_out),x=w+(h.avail_out-257),y=p.dmax,C=p.wsize,N=p.whave,j=p.wnext,T=p.window,O=p.hold,k=p.bits,M=p.lencode,R=p.distcode,B=(1<<p.lenbits)-1,H=(1<<p.distbits)-1;e:do{k<15&&(O+=E[m++]<<k,k+=8,O+=E[m++]<<k,k+=8),ae=M[O&B];t:for(;;){if(O>>>=W=ae>>>24,k-=W,(W=ae>>>16&255)===0)X[w++]=65535&ae;else{if(!(16&W)){if((64&W)==0){ae=M[(65535&ae)+(O&(1<<W)-1)];continue t}if(32&W){p.mode=12;break e}h.msg="invalid literal/length code",p.mode=30;break e}ne=65535&ae,(W&=15)&&(k<W&&(O+=E[m++]<<k,k+=8),ne+=O&(1<<W)-1,O>>>=W,k-=W),k<15&&(O+=E[m++]<<k,k+=8,O+=E[m++]<<k,k+=8),ae=R[O&H];n:for(;;){if(O>>>=W=ae>>>24,k-=W,!(16&(W=ae>>>16&255))){if((64&W)==0){ae=R[(65535&ae)+(O&(1<<W)-1)];continue n}h.msg="invalid distance code",p.mode=30;break e}if(se=65535&ae,k<(W&=15)&&(O+=E[m++]<<k,(k+=8)<W&&(O+=E[m++]<<k,k+=8)),y<(se+=O&(1<<W)-1)){h.msg="invalid distance too far back",p.mode=30;break e}if(O>>>=W,k-=W,(W=w-v)<se){if(N<(W=se-W)&&p.sane){h.msg="invalid distance too far back",p.mode=30;break e}if(G=T,(q=0)===j){if(q+=C-W,W<ne){for(ne-=W;X[w++]=T[q++],--W;);q=w-se,G=X}}else if(j<W){if(q+=C+j-W,(W-=j)<ne){for(ne-=W;X[w++]=T[q++],--W;);if(q=0,j<ne){for(ne-=W=j;X[w++]=T[q++],--W;);q=w-se,G=X}}}else if(q+=j-W,W<ne){for(ne-=W;X[w++]=T[q++],--W;);q=w-se,G=X}for(;2<ne;)X[w++]=G[q++],X[w++]=G[q++],X[w++]=G[q++],ne-=3;ne&&(X[w++]=G[q++],1<ne&&(X[w++]=G[q++]))}else{for(q=w-se;X[w++]=X[q++],X[w++]=X[q++],X[w++]=X[q++],2<(ne-=3););ne&&(X[w++]=X[q++],1<ne&&(X[w++]=X[q++]))}break}}break}}while(m<g&&w<x);m-=ne=k>>3,O&=(1<<(k-=ne<<3))-1,h.next_in=m,h.next_out=w,h.avail_in=m<g?g-m+5:5-(m-g),h.avail_out=w<x?x-w+257:257-(w-x),p.hold=O,p.bits=k}},{}],49:[function(s,o,c){var h=s("../utils/common"),f=s("./adler32"),p=s("./crc32"),m=s("./inffast"),g=s("./inftrees"),w=1,v=2,x=0,y=-2,C=1,N=852,j=592;function T(q){return(q>>>24&255)+(q>>>8&65280)+((65280&q)<<8)+((255&q)<<24)}function O(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(q){var G;return q&&q.state?(G=q.state,q.total_in=q.total_out=G.total=0,q.msg="",G.wrap&&(q.adler=1&G.wrap),G.mode=C,G.last=0,G.havedict=0,G.dmax=32768,G.head=null,G.hold=0,G.bits=0,G.lencode=G.lendyn=new h.Buf32(N),G.distcode=G.distdyn=new h.Buf32(j),G.sane=1,G.back=-1,x):y}function M(q){var G;return q&&q.state?((G=q.state).wsize=0,G.whave=0,G.wnext=0,k(q)):y}function R(q,G){var E,X;return q&&q.state?(X=q.state,G<0?(E=0,G=-G):(E=1+(G>>4),G<48&&(G&=15)),G&&(G<8||15<G)?y:(X.window!==null&&X.wbits!==G&&(X.window=null),X.wrap=E,X.wbits=G,M(q))):y}function B(q,G){var E,X;return q?(X=new O,(q.state=X).window=null,(E=R(q,G))!==x&&(q.state=null),E):y}var H,ae,W=!0;function ne(q){if(W){var G;for(H=new h.Buf32(512),ae=new h.Buf32(32),G=0;G<144;)q.lens[G++]=8;for(;G<256;)q.lens[G++]=9;for(;G<280;)q.lens[G++]=7;for(;G<288;)q.lens[G++]=8;for(g(w,q.lens,0,288,H,0,q.work,{bits:9}),G=0;G<32;)q.lens[G++]=5;g(v,q.lens,0,32,ae,0,q.work,{bits:5}),W=!1}q.lencode=H,q.lenbits=9,q.distcode=ae,q.distbits=5}function se(q,G,E,X){var V,P=q.state;return P.window===null&&(P.wsize=1<<P.wbits,P.wnext=0,P.whave=0,P.window=new h.Buf8(P.wsize)),X>=P.wsize?(h.arraySet(P.window,G,E-P.wsize,P.wsize,0),P.wnext=0,P.whave=P.wsize):(X<(V=P.wsize-P.wnext)&&(V=X),h.arraySet(P.window,G,E-X,V,P.wnext),(X-=V)?(h.arraySet(P.window,G,E-X,X,0),P.wnext=X,P.whave=P.wsize):(P.wnext+=V,P.wnext===P.wsize&&(P.wnext=0),P.whave<P.wsize&&(P.whave+=V))),0}c.inflateReset=M,c.inflateReset2=R,c.inflateResetKeep=k,c.inflateInit=function(q){return B(q,15)},c.inflateInit2=B,c.inflate=function(q,G){var E,X,V,P,Q,D,I,S,A,$,K,ie,ye,_e,Ne,oe,je,Ee,$e,He,_,Y,re,L,U=0,J=new h.Buf8(4),ge=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!q||!q.state||!q.output||!q.input&&q.avail_in!==0)return y;(E=q.state).mode===12&&(E.mode=13),Q=q.next_out,V=q.output,I=q.avail_out,P=q.next_in,X=q.input,D=q.avail_in,S=E.hold,A=E.bits,$=D,K=I,Y=x;e:for(;;)switch(E.mode){case C:if(E.wrap===0){E.mode=13;break}for(;A<16;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(2&E.wrap&&S===35615){J[E.check=0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0),A=S=0,E.mode=2;break}if(E.flags=0,E.head&&(E.head.done=!1),!(1&E.wrap)||(((255&S)<<8)+(S>>8))%31){q.msg="incorrect header check",E.mode=30;break}if((15&S)!=8){q.msg="unknown compression method",E.mode=30;break}if(A-=4,_=8+(15&(S>>>=4)),E.wbits===0)E.wbits=_;else if(_>E.wbits){q.msg="invalid window size",E.mode=30;break}E.dmax=1<<_,q.adler=E.check=1,E.mode=512&S?10:12,A=S=0;break;case 2:for(;A<16;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(E.flags=S,(255&E.flags)!=8){q.msg="unknown compression method",E.mode=30;break}if(57344&E.flags){q.msg="unknown header flags set",E.mode=30;break}E.head&&(E.head.text=S>>8&1),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0)),A=S=0,E.mode=3;case 3:for(;A<32;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}E.head&&(E.head.time=S),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,J[2]=S>>>16&255,J[3]=S>>>24&255,E.check=p(E.check,J,4,0)),A=S=0,E.mode=4;case 4:for(;A<16;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}E.head&&(E.head.xflags=255&S,E.head.os=S>>8),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0)),A=S=0,E.mode=5;case 5:if(1024&E.flags){for(;A<16;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}E.length=S,E.head&&(E.head.extra_len=S),512&E.flags&&(J[0]=255&S,J[1]=S>>>8&255,E.check=p(E.check,J,2,0)),A=S=0}else E.head&&(E.head.extra=null);E.mode=6;case 6:if(1024&E.flags&&(D<(ie=E.length)&&(ie=D),ie&&(E.head&&(_=E.head.extra_len-E.length,E.head.extra||(E.head.extra=new Array(E.head.extra_len)),h.arraySet(E.head.extra,X,P,ie,_)),512&E.flags&&(E.check=p(E.check,X,ie,P)),D-=ie,P+=ie,E.length-=ie),E.length))break e;E.length=0,E.mode=7;case 7:if(2048&E.flags){if(D===0)break e;for(ie=0;_=X[P+ie++],E.head&&_&&E.length<65536&&(E.head.name+=String.fromCharCode(_)),_&&ie<D;);if(512&E.flags&&(E.check=p(E.check,X,ie,P)),D-=ie,P+=ie,_)break e}else E.head&&(E.head.name=null);E.length=0,E.mode=8;case 8:if(4096&E.flags){if(D===0)break e;for(ie=0;_=X[P+ie++],E.head&&_&&E.length<65536&&(E.head.comment+=String.fromCharCode(_)),_&&ie<D;);if(512&E.flags&&(E.check=p(E.check,X,ie,P)),D-=ie,P+=ie,_)break e}else E.head&&(E.head.comment=null);E.mode=9;case 9:if(512&E.flags){for(;A<16;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(S!==(65535&E.check)){q.msg="header crc mismatch",E.mode=30;break}A=S=0}E.head&&(E.head.hcrc=E.flags>>9&1,E.head.done=!0),q.adler=E.check=0,E.mode=12;break;case 10:for(;A<32;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}q.adler=E.check=T(S),A=S=0,E.mode=11;case 11:if(E.havedict===0)return q.next_out=Q,q.avail_out=I,q.next_in=P,q.avail_in=D,E.hold=S,E.bits=A,2;q.adler=E.check=1,E.mode=12;case 12:if(G===5||G===6)break e;case 13:if(E.last){S>>>=7&A,A-=7&A,E.mode=27;break}for(;A<3;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}switch(E.last=1&S,A-=1,3&(S>>>=1)){case 0:E.mode=14;break;case 1:if(ne(E),E.mode=20,G!==6)break;S>>>=2,A-=2;break e;case 2:E.mode=17;break;case 3:q.msg="invalid block type",E.mode=30}S>>>=2,A-=2;break;case 14:for(S>>>=7&A,A-=7&A;A<32;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if((65535&S)!=(S>>>16^65535)){q.msg="invalid stored block lengths",E.mode=30;break}if(E.length=65535&S,A=S=0,E.mode=15,G===6)break e;case 15:E.mode=16;case 16:if(ie=E.length){if(D<ie&&(ie=D),I<ie&&(ie=I),ie===0)break e;h.arraySet(V,X,P,ie,Q),D-=ie,P+=ie,I-=ie,Q+=ie,E.length-=ie;break}E.mode=12;break;case 17:for(;A<14;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(E.nlen=257+(31&S),S>>>=5,A-=5,E.ndist=1+(31&S),S>>>=5,A-=5,E.ncode=4+(15&S),S>>>=4,A-=4,286<E.nlen||30<E.ndist){q.msg="too many length or distance symbols",E.mode=30;break}E.have=0,E.mode=18;case 18:for(;E.have<E.ncode;){for(;A<3;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}E.lens[ge[E.have++]]=7&S,S>>>=3,A-=3}for(;E.have<19;)E.lens[ge[E.have++]]=0;if(E.lencode=E.lendyn,E.lenbits=7,re={bits:E.lenbits},Y=g(0,E.lens,0,19,E.lencode,0,E.work,re),E.lenbits=re.bits,Y){q.msg="invalid code lengths set",E.mode=30;break}E.have=0,E.mode=19;case 19:for(;E.have<E.nlen+E.ndist;){for(;oe=(U=E.lencode[S&(1<<E.lenbits)-1])>>>16&255,je=65535&U,!((Ne=U>>>24)<=A);){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(je<16)S>>>=Ne,A-=Ne,E.lens[E.have++]=je;else{if(je===16){for(L=Ne+2;A<L;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(S>>>=Ne,A-=Ne,E.have===0){q.msg="invalid bit length repeat",E.mode=30;break}_=E.lens[E.have-1],ie=3+(3&S),S>>>=2,A-=2}else if(je===17){for(L=Ne+3;A<L;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}A-=Ne,_=0,ie=3+(7&(S>>>=Ne)),S>>>=3,A-=3}else{for(L=Ne+7;A<L;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}A-=Ne,_=0,ie=11+(127&(S>>>=Ne)),S>>>=7,A-=7}if(E.have+ie>E.nlen+E.ndist){q.msg="invalid bit length repeat",E.mode=30;break}for(;ie--;)E.lens[E.have++]=_}}if(E.mode===30)break;if(E.lens[256]===0){q.msg="invalid code -- missing end-of-block",E.mode=30;break}if(E.lenbits=9,re={bits:E.lenbits},Y=g(w,E.lens,0,E.nlen,E.lencode,0,E.work,re),E.lenbits=re.bits,Y){q.msg="invalid literal/lengths set",E.mode=30;break}if(E.distbits=6,E.distcode=E.distdyn,re={bits:E.distbits},Y=g(v,E.lens,E.nlen,E.ndist,E.distcode,0,E.work,re),E.distbits=re.bits,Y){q.msg="invalid distances set",E.mode=30;break}if(E.mode=20,G===6)break e;case 20:E.mode=21;case 21:if(6<=D&&258<=I){q.next_out=Q,q.avail_out=I,q.next_in=P,q.avail_in=D,E.hold=S,E.bits=A,m(q,K),Q=q.next_out,V=q.output,I=q.avail_out,P=q.next_in,X=q.input,D=q.avail_in,S=E.hold,A=E.bits,E.mode===12&&(E.back=-1);break}for(E.back=0;oe=(U=E.lencode[S&(1<<E.lenbits)-1])>>>16&255,je=65535&U,!((Ne=U>>>24)<=A);){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(oe&&(240&oe)==0){for(Ee=Ne,$e=oe,He=je;oe=(U=E.lencode[He+((S&(1<<Ee+$e)-1)>>Ee)])>>>16&255,je=65535&U,!(Ee+(Ne=U>>>24)<=A);){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}S>>>=Ee,A-=Ee,E.back+=Ee}if(S>>>=Ne,A-=Ne,E.back+=Ne,E.length=je,oe===0){E.mode=26;break}if(32&oe){E.back=-1,E.mode=12;break}if(64&oe){q.msg="invalid literal/length code",E.mode=30;break}E.extra=15&oe,E.mode=22;case 22:if(E.extra){for(L=E.extra;A<L;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}E.length+=S&(1<<E.extra)-1,S>>>=E.extra,A-=E.extra,E.back+=E.extra}E.was=E.length,E.mode=23;case 23:for(;oe=(U=E.distcode[S&(1<<E.distbits)-1])>>>16&255,je=65535&U,!((Ne=U>>>24)<=A);){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if((240&oe)==0){for(Ee=Ne,$e=oe,He=je;oe=(U=E.distcode[He+((S&(1<<Ee+$e)-1)>>Ee)])>>>16&255,je=65535&U,!(Ee+(Ne=U>>>24)<=A);){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}S>>>=Ee,A-=Ee,E.back+=Ee}if(S>>>=Ne,A-=Ne,E.back+=Ne,64&oe){q.msg="invalid distance code",E.mode=30;break}E.offset=je,E.extra=15&oe,E.mode=24;case 24:if(E.extra){for(L=E.extra;A<L;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}E.offset+=S&(1<<E.extra)-1,S>>>=E.extra,A-=E.extra,E.back+=E.extra}if(E.offset>E.dmax){q.msg="invalid distance too far back",E.mode=30;break}E.mode=25;case 25:if(I===0)break e;if(ie=K-I,E.offset>ie){if((ie=E.offset-ie)>E.whave&&E.sane){q.msg="invalid distance too far back",E.mode=30;break}ye=ie>E.wnext?(ie-=E.wnext,E.wsize-ie):E.wnext-ie,ie>E.length&&(ie=E.length),_e=E.window}else _e=V,ye=Q-E.offset,ie=E.length;for(I<ie&&(ie=I),I-=ie,E.length-=ie;V[Q++]=_e[ye++],--ie;);E.length===0&&(E.mode=21);break;case 26:if(I===0)break e;V[Q++]=E.length,I--,E.mode=21;break;case 27:if(E.wrap){for(;A<32;){if(D===0)break e;D--,S|=X[P++]<<A,A+=8}if(K-=I,q.total_out+=K,E.total+=K,K&&(q.adler=E.check=E.flags?p(E.check,V,K,Q-K):f(E.check,V,K,Q-K)),K=I,(E.flags?S:T(S))!==E.check){q.msg="incorrect data check",E.mode=30;break}A=S=0}E.mode=28;case 28:if(E.wrap&&E.flags){for(;A<32;){if(D===0)break e;D--,S+=X[P++]<<A,A+=8}if(S!==(4294967295&E.total)){q.msg="incorrect length check",E.mode=30;break}A=S=0}E.mode=29;case 29:Y=1;break e;case 30:Y=-3;break e;case 31:return-4;default:return y}return q.next_out=Q,q.avail_out=I,q.next_in=P,q.avail_in=D,E.hold=S,E.bits=A,(E.wsize||K!==q.avail_out&&E.mode<30&&(E.mode<27||G!==4))&&se(q,q.output,q.next_out,K-q.avail_out)?(E.mode=31,-4):($-=q.avail_in,K-=q.avail_out,q.total_in+=$,q.total_out+=K,E.total+=K,E.wrap&&K&&(q.adler=E.check=E.flags?p(E.check,V,K,q.next_out-K):f(E.check,V,K,q.next_out-K)),q.data_type=E.bits+(E.last?64:0)+(E.mode===12?128:0)+(E.mode===20||E.mode===15?256:0),($==0&&K===0||G===4)&&Y===x&&(Y=-5),Y)},c.inflateEnd=function(q){if(!q||!q.state)return y;var G=q.state;return G.window&&(G.window=null),q.state=null,x},c.inflateGetHeader=function(q,G){var E;return q&&q.state?(2&(E=q.state).wrap)==0?y:((E.head=G).done=!1,x):y},c.inflateSetDictionary=function(q,G){var E,X=G.length;return q&&q.state?(E=q.state).wrap!==0&&E.mode!==11?y:E.mode===11&&f(1,G,X,0)!==E.check?-3:se(q,G,X,X)?(E.mode=31,-4):(E.havedict=1,x):y},c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,o,c){var h=s("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],p=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(w,v,x,y,C,N,j,T){var O,k,M,R,B,H,ae,W,ne,se=T.bits,q=0,G=0,E=0,X=0,V=0,P=0,Q=0,D=0,I=0,S=0,A=null,$=0,K=new h.Buf16(16),ie=new h.Buf16(16),ye=null,_e=0;for(q=0;q<=15;q++)K[q]=0;for(G=0;G<y;G++)K[v[x+G]]++;for(V=se,X=15;1<=X&&K[X]===0;X--);if(X<V&&(V=X),X===0)return C[N++]=20971520,C[N++]=20971520,T.bits=1,0;for(E=1;E<X&&K[E]===0;E++);for(V<E&&(V=E),q=D=1;q<=15;q++)if(D<<=1,(D-=K[q])<0)return-1;if(0<D&&(w===0||X!==1))return-1;for(ie[1]=0,q=1;q<15;q++)ie[q+1]=ie[q]+K[q];for(G=0;G<y;G++)v[x+G]!==0&&(j[ie[v[x+G]]++]=G);if(H=w===0?(A=ye=j,19):w===1?(A=f,$-=257,ye=p,_e-=257,256):(A=m,ye=g,-1),q=E,B=N,Q=G=S=0,M=-1,R=(I=1<<(P=V))-1,w===1&&852<I||w===2&&592<I)return 1;for(;;){for(ae=q-Q,ne=j[G]<H?(W=0,j[G]):j[G]>H?(W=ye[_e+j[G]],A[$+j[G]]):(W=96,0),O=1<<q-Q,E=k=1<<P;C[B+(S>>Q)+(k-=O)]=ae<<24|W<<16|ne|0,k!==0;);for(O=1<<q-1;S&O;)O>>=1;if(O!==0?(S&=O-1,S+=O):S=0,G++,--K[q]==0){if(q===X)break;q=v[x+j[G]]}if(V<q&&(S&R)!==M){for(Q===0&&(Q=V),B+=E,D=1<<(P=q-Q);P+Q<X&&!((D-=K[P+Q])<=0);)P++,D<<=1;if(I+=1<<P,w===1&&852<I||w===2&&592<I)return 1;C[M=S&R]=V<<24|P<<16|B-N|0}}return S!==0&&(C[B+S]=q-Q<<24|64<<16|0),T.bits=V,0}},{"../utils/common":41}],51:[function(s,o,c){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(s,o,c){var h=s("../utils/common"),f=0,p=1;function m(U){for(var J=U.length;0<=--J;)U[J]=0}var g=0,w=29,v=256,x=v+1+w,y=30,C=19,N=2*x+1,j=15,T=16,O=7,k=256,M=16,R=17,B=18,H=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ae=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],se=new Array(2*(x+2));m(se);var q=new Array(2*y);m(q);var G=new Array(512);m(G);var E=new Array(256);m(E);var X=new Array(w);m(X);var V,P,Q,D=new Array(y);function I(U,J,ge,he,te){this.static_tree=U,this.extra_bits=J,this.extra_base=ge,this.elems=he,this.max_length=te,this.has_stree=U&&U.length}function S(U,J){this.dyn_tree=U,this.max_code=0,this.stat_desc=J}function A(U){return U<256?G[U]:G[256+(U>>>7)]}function $(U,J){U.pending_buf[U.pending++]=255&J,U.pending_buf[U.pending++]=J>>>8&255}function K(U,J,ge){U.bi_valid>T-ge?(U.bi_buf|=J<<U.bi_valid&65535,$(U,U.bi_buf),U.bi_buf=J>>T-U.bi_valid,U.bi_valid+=ge-T):(U.bi_buf|=J<<U.bi_valid&65535,U.bi_valid+=ge)}function ie(U,J,ge){K(U,ge[2*J],ge[2*J+1])}function ye(U,J){for(var ge=0;ge|=1&U,U>>>=1,ge<<=1,0<--J;);return ge>>>1}function _e(U,J,ge){var he,te,xe=new Array(j+1),we=0;for(he=1;he<=j;he++)xe[he]=we=we+ge[he-1]<<1;for(te=0;te<=J;te++){var be=U[2*te+1];be!==0&&(U[2*te]=ye(xe[be]++,be))}}function Ne(U){var J;for(J=0;J<x;J++)U.dyn_ltree[2*J]=0;for(J=0;J<y;J++)U.dyn_dtree[2*J]=0;for(J=0;J<C;J++)U.bl_tree[2*J]=0;U.dyn_ltree[2*k]=1,U.opt_len=U.static_len=0,U.last_lit=U.matches=0}function oe(U){8<U.bi_valid?$(U,U.bi_buf):0<U.bi_valid&&(U.pending_buf[U.pending++]=U.bi_buf),U.bi_buf=0,U.bi_valid=0}function je(U,J,ge,he){var te=2*J,xe=2*ge;return U[te]<U[xe]||U[te]===U[xe]&&he[J]<=he[ge]}function Ee(U,J,ge){for(var he=U.heap[ge],te=ge<<1;te<=U.heap_len&&(te<U.heap_len&&je(J,U.heap[te+1],U.heap[te],U.depth)&&te++,!je(J,he,U.heap[te],U.depth));)U.heap[ge]=U.heap[te],ge=te,te<<=1;U.heap[ge]=he}function $e(U,J,ge){var he,te,xe,we,be=0;if(U.last_lit!==0)for(;he=U.pending_buf[U.d_buf+2*be]<<8|U.pending_buf[U.d_buf+2*be+1],te=U.pending_buf[U.l_buf+be],be++,he===0?ie(U,te,J):(ie(U,(xe=E[te])+v+1,J),(we=H[xe])!==0&&K(U,te-=X[xe],we),ie(U,xe=A(--he),ge),(we=ae[xe])!==0&&K(U,he-=D[xe],we)),be<U.last_lit;);ie(U,k,J)}function He(U,J){var ge,he,te,xe=J.dyn_tree,we=J.stat_desc.static_tree,be=J.stat_desc.has_stree,Te=J.stat_desc.elems,qe=-1;for(U.heap_len=0,U.heap_max=N,ge=0;ge<Te;ge++)xe[2*ge]!==0?(U.heap[++U.heap_len]=qe=ge,U.depth[ge]=0):xe[2*ge+1]=0;for(;U.heap_len<2;)xe[2*(te=U.heap[++U.heap_len]=qe<2?++qe:0)]=1,U.depth[te]=0,U.opt_len--,be&&(U.static_len-=we[2*te+1]);for(J.max_code=qe,ge=U.heap_len>>1;1<=ge;ge--)Ee(U,xe,ge);for(te=Te;ge=U.heap[1],U.heap[1]=U.heap[U.heap_len--],Ee(U,xe,1),he=U.heap[1],U.heap[--U.heap_max]=ge,U.heap[--U.heap_max]=he,xe[2*te]=xe[2*ge]+xe[2*he],U.depth[te]=(U.depth[ge]>=U.depth[he]?U.depth[ge]:U.depth[he])+1,xe[2*ge+1]=xe[2*he+1]=te,U.heap[1]=te++,Ee(U,xe,1),2<=U.heap_len;);U.heap[--U.heap_max]=U.heap[1],(function(De,ht){var Nt,Lt,Jt,Xe,ut,Pe,Me=ht.dyn_tree,Ct=ht.max_code,xt=ht.stat_desc.static_tree,Je=ht.stat_desc.has_stree,et=ht.stat_desc.extra_bits,St=ht.stat_desc.extra_base,zt=ht.stat_desc.max_length,vt=0;for(Xe=0;Xe<=j;Xe++)De.bl_count[Xe]=0;for(Me[2*De.heap[De.heap_max]+1]=0,Nt=De.heap_max+1;Nt<N;Nt++)zt<(Xe=Me[2*Me[2*(Lt=De.heap[Nt])+1]+1]+1)&&(Xe=zt,vt++),Me[2*Lt+1]=Xe,Ct<Lt||(De.bl_count[Xe]++,ut=0,St<=Lt&&(ut=et[Lt-St]),Pe=Me[2*Lt],De.opt_len+=Pe*(Xe+ut),Je&&(De.static_len+=Pe*(xt[2*Lt+1]+ut)));if(vt!==0){do{for(Xe=zt-1;De.bl_count[Xe]===0;)Xe--;De.bl_count[Xe]--,De.bl_count[Xe+1]+=2,De.bl_count[zt]--,vt-=2}while(0<vt);for(Xe=zt;Xe!==0;Xe--)for(Lt=De.bl_count[Xe];Lt!==0;)Ct<(Jt=De.heap[--Nt])||(Me[2*Jt+1]!==Xe&&(De.opt_len+=(Xe-Me[2*Jt+1])*Me[2*Jt],Me[2*Jt+1]=Xe),Lt--)}})(U,J),_e(xe,qe,U.bl_count)}function _(U,J,ge){var he,te,xe=-1,we=J[1],be=0,Te=7,qe=4;for(we===0&&(Te=138,qe=3),J[2*(ge+1)+1]=65535,he=0;he<=ge;he++)te=we,we=J[2*(he+1)+1],++be<Te&&te===we||(be<qe?U.bl_tree[2*te]+=be:te!==0?(te!==xe&&U.bl_tree[2*te]++,U.bl_tree[2*M]++):be<=10?U.bl_tree[2*R]++:U.bl_tree[2*B]++,xe=te,qe=(be=0)===we?(Te=138,3):te===we?(Te=6,3):(Te=7,4))}function Y(U,J,ge){var he,te,xe=-1,we=J[1],be=0,Te=7,qe=4;for(we===0&&(Te=138,qe=3),he=0;he<=ge;he++)if(te=we,we=J[2*(he+1)+1],!(++be<Te&&te===we)){if(be<qe)for(;ie(U,te,U.bl_tree),--be!=0;);else te!==0?(te!==xe&&(ie(U,te,U.bl_tree),be--),ie(U,M,U.bl_tree),K(U,be-3,2)):be<=10?(ie(U,R,U.bl_tree),K(U,be-3,3)):(ie(U,B,U.bl_tree),K(U,be-11,7));xe=te,qe=(be=0)===we?(Te=138,3):te===we?(Te=6,3):(Te=7,4)}}m(D);var re=!1;function L(U,J,ge,he){K(U,(g<<1)+(he?1:0),3),(function(te,xe,we,be){oe(te),$(te,we),$(te,~we),h.arraySet(te.pending_buf,te.window,xe,we,te.pending),te.pending+=we})(U,J,ge)}c._tr_init=function(U){re||((function(){var J,ge,he,te,xe,we=new Array(j+1);for(te=he=0;te<w-1;te++)for(X[te]=he,J=0;J<1<<H[te];J++)E[he++]=te;for(E[he-1]=te,te=xe=0;te<16;te++)for(D[te]=xe,J=0;J<1<<ae[te];J++)G[xe++]=te;for(xe>>=7;te<y;te++)for(D[te]=xe<<7,J=0;J<1<<ae[te]-7;J++)G[256+xe++]=te;for(ge=0;ge<=j;ge++)we[ge]=0;for(J=0;J<=143;)se[2*J+1]=8,J++,we[8]++;for(;J<=255;)se[2*J+1]=9,J++,we[9]++;for(;J<=279;)se[2*J+1]=7,J++,we[7]++;for(;J<=287;)se[2*J+1]=8,J++,we[8]++;for(_e(se,x+1,we),J=0;J<y;J++)q[2*J+1]=5,q[2*J]=ye(J,5);V=new I(se,H,v+1,x,j),P=new I(q,ae,0,y,j),Q=new I(new Array(0),W,0,C,O)})(),re=!0),U.l_desc=new S(U.dyn_ltree,V),U.d_desc=new S(U.dyn_dtree,P),U.bl_desc=new S(U.bl_tree,Q),U.bi_buf=0,U.bi_valid=0,Ne(U)},c._tr_stored_block=L,c._tr_flush_block=function(U,J,ge,he){var te,xe,we=0;0<U.level?(U.strm.data_type===2&&(U.strm.data_type=(function(be){var Te,qe=4093624447;for(Te=0;Te<=31;Te++,qe>>>=1)if(1&qe&&be.dyn_ltree[2*Te]!==0)return f;if(be.dyn_ltree[18]!==0||be.dyn_ltree[20]!==0||be.dyn_ltree[26]!==0)return p;for(Te=32;Te<v;Te++)if(be.dyn_ltree[2*Te]!==0)return p;return f})(U)),He(U,U.l_desc),He(U,U.d_desc),we=(function(be){var Te;for(_(be,be.dyn_ltree,be.l_desc.max_code),_(be,be.dyn_dtree,be.d_desc.max_code),He(be,be.bl_desc),Te=C-1;3<=Te&&be.bl_tree[2*ne[Te]+1]===0;Te--);return be.opt_len+=3*(Te+1)+5+5+4,Te})(U),te=U.opt_len+3+7>>>3,(xe=U.static_len+3+7>>>3)<=te&&(te=xe)):te=xe=ge+5,ge+4<=te&&J!==-1?L(U,J,ge,he):U.strategy===4||xe===te?(K(U,2+(he?1:0),3),$e(U,se,q)):(K(U,4+(he?1:0),3),(function(be,Te,qe,De){var ht;for(K(be,Te-257,5),K(be,qe-1,5),K(be,De-4,4),ht=0;ht<De;ht++)K(be,be.bl_tree[2*ne[ht]+1],3);Y(be,be.dyn_ltree,Te-1),Y(be,be.dyn_dtree,qe-1)})(U,U.l_desc.max_code+1,U.d_desc.max_code+1,we+1),$e(U,U.dyn_ltree,U.dyn_dtree)),Ne(U),he&&oe(U)},c._tr_tally=function(U,J,ge){return U.pending_buf[U.d_buf+2*U.last_lit]=J>>>8&255,U.pending_buf[U.d_buf+2*U.last_lit+1]=255&J,U.pending_buf[U.l_buf+U.last_lit]=255&ge,U.last_lit++,J===0?U.dyn_ltree[2*ge]++:(U.matches++,J--,U.dyn_ltree[2*(E[ge]+v+1)]++,U.dyn_dtree[2*A(J)]++),U.last_lit===U.lit_bufsize-1},c._tr_align=function(U){K(U,2,3),ie(U,k,se),(function(J){J.bi_valid===16?($(J,J.bi_buf),J.bi_buf=0,J.bi_valid=0):8<=J.bi_valid&&(J.pending_buf[J.pending++]=255&J.bi_buf,J.bi_buf>>=8,J.bi_valid-=8)})(U)}},{"../utils/common":41}],53:[function(s,o,c){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(s,o,c){(function(h){(function(f,p){if(!f.setImmediate){var m,g,w,v,x=1,y={},C=!1,N=f.document,j=Object.getPrototypeOf&&Object.getPrototypeOf(f);j=j&&j.setTimeout?j:f,m={}.toString.call(f.process)==="[object process]"?function(M){process.nextTick(function(){O(M)})}:(function(){if(f.postMessage&&!f.importScripts){var M=!0,R=f.onmessage;return f.onmessage=function(){M=!1},f.postMessage("","*"),f.onmessage=R,M}})()?(v="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",k,!1):f.attachEvent("onmessage",k),function(M){f.postMessage(v+M,"*")}):f.MessageChannel?((w=new MessageChannel).port1.onmessage=function(M){O(M.data)},function(M){w.port2.postMessage(M)}):N&&"onreadystatechange"in N.createElement("script")?(g=N.documentElement,function(M){var R=N.createElement("script");R.onreadystatechange=function(){O(M),R.onreadystatechange=null,g.removeChild(R),R=null},g.appendChild(R)}):function(M){setTimeout(O,0,M)},j.setImmediate=function(M){typeof M!="function"&&(M=new Function(""+M));for(var R=new Array(arguments.length-1),B=0;B<R.length;B++)R[B]=arguments[B+1];var H={callback:M,args:R};return y[x]=H,m(x),x++},j.clearImmediate=T}function T(M){delete y[M]}function O(M){if(C)setTimeout(O,0,M);else{var R=y[M];if(R){C=!0;try{(function(B){var H=B.callback,ae=B.args;switch(ae.length){case 0:H();break;case 1:H(ae[0]);break;case 2:H(ae[0],ae[1]);break;case 3:H(ae[0],ae[1],ae[2]);break;default:H.apply(p,ae)}})(R)}finally{T(M),C=!1}}}}function k(M){M.source===f&&typeof M.data=="string"&&M.data.indexOf(v)===0&&O(+M.data.slice(v.length))}})(typeof self>"u"?h===void 0?this:h:self)}).call(this,typeof zs<"u"?zs:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(sd)),sd.exports}var a_=n_();const r_=Pg(a_),Vg=()=>({id:`BUG-${Date.now().toString().slice(-6)}`,title:"",severity:"medium",status:"open",actualResult:"",expectedResult:"",stepsToReproduce:"",attachments:[],createdAt:new Date().toISOString()});function i_({reports:n,testCases:l,onSave:s,onDelete:o}){const[c,h]=F.useState(),[f,p]=F.useState(!1);async function m(){p(!0);try{const g=new r_;g.file("bug-reports.csv",o_(n));for(const y of n)for(const C of y.attachments)g.file(`attachments/${no(y.id)}/${no(C.name)}`,C.dataUrl.split(",")[1]??"",{base64:!0});const w=await g.generateAsync({type:"blob"}),v=URL.createObjectURL(w),x=document.createElement("a");x.href=v,x.download=`lazyscout-bug-reports-${new Date().toISOString().slice(0,10)}.zip`,x.click(),URL.revokeObjectURL(v)}finally{p(!1)}}return r.jsxs("section",{className:"bug-reports",children:[r.jsxs("div",{className:"bug-reports-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Defect tracking"}),r.jsx("h3",{children:"Bug Reports"}),r.jsx("p",{children:"Capture reproducible issues and keep screenshots with the local project."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!n.length||f,onClick:()=>{m()},children:f?"Creating ZIP…":"Export ZIP + images"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Vg()),children:"+ Add Bug Report"})]})]}),n.length?r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"bug-report-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"Bug ID"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Test Case"}),r.jsx("th",{children:"Severity"}),r.jsx("th",{children:"Status"}),r.jsx("th",{children:"Evidence"}),r.jsx("th",{children:"Actions"})]})}),r.jsx("tbody",{children:n.map(g=>r.jsxs("tr",{children:[r.jsx("td",{children:g.id}),r.jsxs("td",{children:[r.jsx("b",{children:g.title||"Untitled bug"}),r.jsx("small",{children:new Date(g.createdAt).toLocaleDateString()})]}),r.jsx("td",{children:g.testCaseId||"—"}),r.jsx("td",{children:r.jsx("span",{className:`bug-severity ${g.severity}`,children:g.severity})}),r.jsx("td",{children:r.jsx("span",{className:"bug-status",children:g.status})}),r.jsxs("td",{children:[g.attachments.length," screenshot",g.attachments.length===1?"":"s"]}),r.jsx("td",{children:r.jsxs("div",{className:"flex justify-center gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>h(g),children:"Edit"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>o(g.id),children:"Delete"})]})})]},g.id))})]})}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No Bug Reports yet"}),r.jsx("span",{children:"When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Vg()),children:"Create first Bug Report"})]}),c&&r.jsx(l_,{report:c,testCases:l,onClose:()=>h(void 0),onSave:g=>{s(g),h(void 0)}})]})}function l_({report:n,testCases:l,onSave:s,onClose:o}){const[c,h]=F.useState(n);async function f(p){const m=[...p.target.files??[]].filter(w=>w.type.startsWith("image/")).slice(0,5),g=await Promise.all(m.map(async w=>({name:w.name,type:w.type,dataUrl:await s_(w)})));h(w=>({...w,attachments:[...w.attachments,...g]}))}return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal bug-editor",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Bug Report"}),r.jsx("h2",{children:c.id}),r.jsx("p",{children:"Describe the defect so another person can reproduce it quickly."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,children:"×"})]}),r.jsxs("div",{className:"bug-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_150px_150px]",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Title"}),r.jsx("input",{className:"field",value:c.title,onChange:p=>h({...c,title:p.target.value}),placeholder:"What went wrong?"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Severity"}),r.jsxs("select",{className:"field",value:c.severity,onChange:p=>h({...c,severity:p.target.value}),children:[r.jsx("option",{value:"critical",children:"critical"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Status"}),r.jsxs("select",{className:"field",value:c.status,onChange:p=>h({...c,status:p.target.value}),children:[r.jsx("option",{value:"open",children:"open"}),r.jsx("option",{value:"in-progress",children:"in-progress"}),r.jsx("option",{value:"resolved",children:"resolved"})]})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Related Test Case"}),r.jsxs("select",{className:"field",value:c.testCaseId??"",onChange:p=>h({...c,testCaseId:p.target.value||void 0}),children:[r.jsx("option",{value:"",children:"Not linked"}),l.map(p=>r.jsxs("option",{value:p.id,children:[p.id," · ",p.title]},p.id))]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Steps to reproduce"}),r.jsx("textarea",{className:"field",rows:4,value:c.stepsToReproduce,onChange:p=>h({...c,stepsToReproduce:p.target.value}),placeholder:`1. Open…
54
54
  2. Click…
55
- 3. Observe…`})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Actual Result"}),r.jsx("textarea",{className:"field",rows:4,value:c.actualResult,onChange:p=>h({...c,actualResult:p.target.value})})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Expected Result"}),r.jsx("textarea",{className:"field",rows:4,value:c.expectedResult,onChange:p=>h({...c,expectedResult:p.target.value})})]})]}),r.jsxs("label",{className:"bug-upload",children:[r.jsx("span",{children:"Evidence screenshots"}),r.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:p=>{f(p)}}),r.jsx("em",{children:"Upload up to 5 images at a time. Images are included in ZIP export."})]}),c.attachments.length?r.jsx("div",{className:"bug-attachments",children:c.attachments.map((p,m)=>r.jsxs("figure",{children:[r.jsx("img",{src:p.dataUrl,alt:p.name}),r.jsxs("figcaption",{children:[p.name,r.jsx("button",{type:"button",onClick:()=>h(g=>({...g,attachments:g.attachments.filter((w,v)=>v!==m)})),children:"×"})]})]},`${p.name}-${m}`))}):null]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!c.title.trim(),onClick:()=>s(c),children:"Save Bug Report"})]})]})})}function a_(a){return new Promise((l,s)=>{const o=new FileReader;o.onload=()=>l(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(a)})}function no(a){return a.replace(/[^a-z0-9._-]/gi,"_")}function r_(a){const l=["Bug_ID","Title","Test_Case","Severity","Status","Steps_To_Reproduce","Actual_Result","Expected_Result","Attachments"],s=o=>`"${o.replaceAll('"','""')}"`;return[l,...a.map(o=>[o.id,o.title,o.testCaseId??"",o.severity,o.status,o.stepsToReproduce,o.actualResult,o.expectedResult,o.attachments.map(c=>`attachments/${no(o.id)}/${no(c.name)}`).join("; ")])].map(o=>o.map(s).join(",")).join(`\r
56
- `)}function i_({screenshots:a,onDelete:l}){function s(o){const c=document.createElement("a");c.href=o.dataUrl,c.download=o.name,c.click()}return r.jsxs("section",{className:"screenshot-gallery",children:[r.jsxs("header",{className:"screenshot-gallery-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright evidence"}),r.jsx("h3",{children:"Screenshots"}),r.jsxs("p",{children:["LazyScout does not capture automatically. Add"," ",r.jsxs("code",{children:["await page.screenshot(","{"," path: 'evidence.png', fullPage: true ","}",")"]})," ","to edited Playwright code when evidence is needed."]})]}),r.jsxs("span",{children:[a.length,"/50 saved"]})]}),a.length?r.jsx("div",{className:"screenshot-gallery-grid",children:a.map(o=>r.jsxs("figure",{children:[r.jsx("img",{src:o.dataUrl,alt:`Screenshot for ${o.testCaseId}`}),r.jsxs("figcaption",{children:[r.jsxs("div",{children:[r.jsx("b",{children:o.testCaseId}),r.jsxs("span",{children:[o.status," · ",new Date(o.capturedAt).toLocaleString()]})]}),r.jsxs("div",{className:"flex shrink-0 gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>s(o),children:"Download"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>l(o.name),children:"Delete"})]})]})]},o.name))}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No screenshots yet"}),r.jsx("span",{children:"Add page.screenshot() to edited Playwright code, save it, then run that Test Case."})]})]})}function l_({defaultUrl:a}){const[l,s]=F.useState(a),[o,c]=F.useState(3),[h,f]=F.useState(5),[p,m]=F.useState(300),[g,w]=F.useState(!1),[v,x]=F.useState(!1),[y,A]=F.useState(),[N,j]=F.useState(""),T=Math.min(20,Math.max(1,Number(o)||1))*Math.min(100,Math.max(1,Number(h)||1));async function O(){if(!(v||!g)){x(!0),A(void 0),j("");try{A(await m0({url:l,virtualUsers:Number(o)||1,requestsPerUser:Number(h)||1,intervalMs:Number(p)||0,confirmed:g}))}catch(k){j(k instanceof Error?k.message:String(k))}finally{x(!1)}}}return r.jsxs("section",{className:"load-test-page",children:[r.jsxs("header",{className:"load-test-hero",children:[r.jsx("div",{className:"load-test-hero-icon",children:"⚡"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"HTTP performance workspace"}),r.jsx("h2",{children:"Load Test"}),r.jsx("p",{children:"Send controlled GET traffic, compare response times, and inspect every HTTP response."})]}),r.jsx("span",{children:"GET only · Local runner"})]}),r.jsxs("div",{className:"load-test-layout",children:[r.jsxs("section",{className:"load-config-card",children:[r.jsxs("div",{className:"load-section-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test configuration"}),r.jsx("h3",{children:"Request settings"})]}),r.jsxs("b",{children:[T," requests"]})]}),r.jsxs("div",{className:"load-test-form",children:[r.jsxs("label",{className:"load-url",children:[r.jsx("span",{children:"Target URL"}),r.jsx("input",{className:"field",value:l,onChange:k=>s(k.target.value),placeholder:"https://example.com",disabled:v})]}),r.jsxs("div",{className:"load-input-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Virtual users"}),r.jsx("input",{className:"field",type:"number",min:1,max:20,value:o,onChange:k=>c(k.target.value===""?"":Number(k.target.value)),disabled:v}),r.jsx("small",{children:"Maximum 20 concurrent users"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Requests / user"}),r.jsx("input",{className:"field",type:"number",min:1,max:100,value:h,onChange:k=>f(k.target.value===""?"":Number(k.target.value)),disabled:v}),r.jsx("small",{children:"Maximum 100 per user"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Interval"}),r.jsxs("div",{className:"load-input-unit",children:[r.jsx("input",{className:"field",type:"number",min:0,max:1e4,value:p,onChange:k=>m(k.target.value===""?"":Number(k.target.value)),disabled:v}),r.jsx("em",{children:"ms"})]}),r.jsx("small",{children:"Pause between each request"})]})]}),r.jsxs("label",{className:"load-confirm",children:[r.jsx("input",{type:"checkbox",checked:g,onChange:k=>w(k.target.checked),disabled:v}),r.jsxs("span",{children:[r.jsx("b",{children:"Authorized target"}),r.jsx("small",{children:"I own this target or have permission to run a load test."})]})]}),r.jsx("button",{type:"button",className:"btn btn-primary load-run-button",disabled:v||!g||!l.trim(),onClick:()=>{O()},children:v?r.jsxs(r.Fragment,{children:[r.jsx("i",{})," Running ",T," requests…"]}):r.jsx(r.Fragment,{children:"▶ Start Load Test"})})]})]}),r.jsxs("aside",{className:"load-safety-card",children:[r.jsx("p",{className:"eyebrow",children:"Safe limits"}),r.jsx("h3",{children:"Controlled traffic"}),r.jsxs("ul",{children:[r.jsxs("li",{children:[r.jsx("b",{children:"20"}),r.jsx("span",{children:"Maximum virtual users"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"2,000"}),r.jsx("span",{children:"Maximum total requests"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"15s"}),r.jsx("span",{children:"Timeout per request"})]})]}),r.jsx("p",{children:"Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data."})]})]}),N&&r.jsx("p",{className:"load-error",children:N}),v&&r.jsxs("section",{className:"load-running",children:[r.jsx("i",{}),r.jsxs("div",{children:[r.jsx("b",{children:"Load test is running"}),r.jsx("span",{children:"Waiting for all virtual users to complete their request budget…"})]})]}),y&&r.jsxs("section",{className:"load-results",children:[r.jsxs("div",{className:"load-results-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Run report"}),r.jsx("h3",{children:"HTTP Request Results"})]}),r.jsx("span",{className:y.failed?"has-failures":"all-passed",children:y.failed?`${y.failed} failed`:"All requests passed"})]}),r.jsxs("div",{className:"load-kpis",children:[r.jsx(Yr,{label:"Total",value:String(y.total)}),r.jsx(Yr,{label:"Passed",value:String(y.passed),tone:"pass"}),r.jsx(Yr,{label:"Failed",value:String(y.failed),tone:"fail"}),r.jsx(Yr,{label:"Average",value:`${y.averageMs} ms`}),r.jsx(Yr,{label:"Min / Max",value:`${y.minMs} / ${y.maxMs} ms`}),r.jsx(Yr,{label:"Requests/sec",value:String(y.requestsPerSecond)})]}),r.jsx("div",{className:"load-table-wrap",children:r.jsxs("table",{className:"load-request-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"#"}),r.jsx("th",{children:"User"}),r.jsx("th",{children:"Method"}),r.jsx("th",{children:"Request URL"}),r.jsx("th",{children:"HTTP"}),r.jsx("th",{children:"Time"}),r.jsx("th",{children:"Size"}),r.jsx("th",{children:"Result"})]})}),r.jsx("tbody",{children:y.requests.map(k=>r.jsxs("tr",{children:[r.jsx("td",{children:k.id}),r.jsxs("td",{children:["VU-",k.virtualUser,r.jsxs("small",{children:["Run ",k.iteration]})]}),r.jsx("td",{children:r.jsx("span",{className:"load-method",children:k.method})}),r.jsxs("td",{children:[r.jsx("span",{className:"load-request-url",title:k.finalUrl??k.url,children:k.finalUrl??k.url}),k.error&&r.jsx("small",{className:"load-request-error",children:k.error})]}),r.jsx("td",{children:k.statusCode?r.jsxs(r.Fragment,{children:[r.jsx("b",{children:k.statusCode}),r.jsx("small",{children:k.statusText})]}):"—"}),r.jsxs("td",{children:[k.durationMs," ms"]}),r.jsx("td",{children:s_(k.responseBytes)}),r.jsx("td",{children:r.jsx("span",{className:`load-result-badge ${k.passed?"passed":"failed"}`,children:k.passed?"PASS":"FAIL"})})]},k.id))})]})})]})]})}function Yr({label:a,value:l,tone:s=""}){return r.jsxs("div",{className:s,children:[r.jsx("span",{children:a}),r.jsx("b",{children:l})]})}function s_(a){return a?a<1024?`${a} B`:`${(a/1024).toFixed(1)} KB`:"—"}function o_({message:a,detail:l,onClose:s}){return r.jsxs("div",{className:"scout-notice",role:"alert",children:[r.jsx("div",{className:"scout-notice-icon",children:"!"}),r.jsxs("div",{children:[r.jsx("b",{children:a}),r.jsx("p",{children:l})]}),r.jsx("button",{type:"button",onClick:s,"aria-label":"Dismiss notice",children:"×"})]})}function u_(){const[a,l]=F.useState({status:"idle",result:null,error:null});async function s(c,h,f,p="en",m=!1,g=750,w=[],v,x,y,A,N=!1){l({status:"loading",result:null,error:null});try{const j=await Yx({url:c,maxPages:h,maxDepth:f,language:p,includeApiChecks:m,waitAfterNavigationMs:g,blockedKeywords:w,projectId:v,startPath:x,scopePath:y,mode:A,debug:N});return l({status:"success",result:j,error:null}),j}catch(j){const T=j instanceof ir?j:new ir("unknown","An unexpected error occurred.");return l({status:"error",result:null,error:T}),null}}function o(){l({status:"idle",result:null,error:null})}return{...a,analyze:s,reset:o}}const ao={enabled:!0,keywords:Kg},Xv=a=>`lazyscout-click-filter:${a}`;function c_(a){try{const l=localStorage.getItem(Xv(a));if(!l)return ao;const s=JSON.parse(l);return{enabled:s.enabled===!0,keywords:Jg(s.keywords)}}catch{return ao}}function d_(a){const[l,s]=F.useState(ao);F.useEffect(()=>{s(a?c_(a):ao)},[a]);const o=F.useCallback(h=>{const f={enabled:h.enabled,keywords:Jg(h.keywords)};s(f),a&&localStorage.setItem(Xv(a),JSON.stringify(f))},[a]),c=l.enabled?l.keywords:[];return{filter:l,blockedKeywords:c,save:o}}function f_(a){const[l,s]=F.useState([]),[o,c]=F.useState([]);F.useEffect(()=>{s(a??[]),c([])},[a]);function h(A,N){s(j=>j.map(T=>T.id===A?N:T)),c(j=>j.map(T=>T===A?N.id:T))}function f(A){s(N=>N.filter(j=>j.id!==A)),c(N=>N.filter(j=>j!==A))}function p(){s(A=>A.filter(N=>!o.includes(N.id))),c([])}function m(A,N){A!==N&&s(j=>{const T=j.findIndex(R=>R.id===A),O=j.findIndex(R=>R.id===N);if(T<0||O<0)return j;const k=[...j],[M]=k.splice(T,1);return k.splice(O,0,M),k})}function g(A){const N=new Set(l.map(T=>T.id));let j=l.filter(T=>T.module==="MANUAL").length+1;for(;N.has(ud("MANUAL",j));)j++;return Sx("MANUAL",ud("MANUAL",j),A)}function w(A){return s(N=>[A,...N]),A}function v(A){s(N=>[...A,...N])}function x(A){c(N=>N.includes(A)?N.filter(j=>j!==A):[...N,A])}function y(A){c(A)}return{testCases:l,selectedIds:o,updateTestCase:h,deleteTestCase:f,deleteSelected:p,reorderTestCases:m,createTestCaseDraft:g,addTestCase:w,addImportedTestCases:v,toggleSelected:x,setSelection:y}}function h_(a){const[l,s]=F.useState([]);F.useEffect(()=>{s(a??[])},[a]);function o(f,p){s(m=>m.map(g=>g.id===f?p:g))}function c(f){s(p=>p.filter(m=>m.id!==f))}function h(f){const p=new Set(l.map(g=>g.id));let m=l.filter(g=>g.module==="MANUAL").length+1;for(;p.has(cd("MANUAL",m));)m++;s(g=>[xx("MANUAL",cd("MANUAL",m),f),...g])}return{testData:l,updateRow:o,deleteRow:c,addRow:h}}const ro="lazyscout.projects.v1";function p_(){return{startUrl:"",origin:"Manual test suite",pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function Nd(){try{return JSON.parse(localStorage.getItem(ro)??"[]")}catch{return[]}}function m_(a){const l=Nd().filter(s=>s.id!==a);l.length?localStorage.setItem(ro,JSON.stringify(l)):localStorage.removeItem(ro)}function g_(){const[a,l]=F.useState([]),[s,o]=F.useState(),[c,h]=F.useState("~/LazyScout"),[f,p]=F.useState(),[m,g]=F.useState(!0),w=F.useRef(new Set),v=F.useRef(new Map);F.useEffect(()=>{(async()=>{try{const M=await Qx();h(M.root);const R=Nd(),B=R.filter(H=>!M.projects.some(ae=>ae.id===H.id));for(const H of B)await Dm(H);R.length&&localStorage.removeItem(ro),l([...B,...M.projects])}catch(M){l(Nd()),p(M instanceof Error?M.message:String(M))}finally{g(!1)}})()},[]);function x(M){if(w.current.has(M.id))return Promise.resolve();const B=(v.current.get(M.id)??Promise.resolve()).catch(()=>{}).then(()=>Dm(M)).catch(H=>{p(H instanceof Error?H.message:String(H))});return v.current.set(M.id,B),B.finally(()=>{v.current.get(M.id)===B&&v.current.delete(M.id)}),B}function y(M,R,B,H,ae){const W=new Date().toISOString(),ne=`project-${v_(M)}`,se=H??ne,q=a.find(E=>E.id===se),G={id:se,name:B??q?.name??new URL(M).hostname,targetUrl:M,createdAt:q?.createdAt??W,updatedAt:W,mode:q?.mode,testCaseLanguage:ae??q?.testCaseLanguage??"en",result:R};return w.current.delete(se),l(E=>q?E.map(X=>X.id===se?G:X):[G,...E]),x(G),o(se),se}function A(M="Untitled Test Suite",R="empty"){const B=new Date().toISOString(),H=`project-${crypto.randomUUID()}`,ae={id:H,name:M.trim()||"Untitled Test Suite",targetUrl:"",createdAt:B,updatedAt:B,mode:R,result:p_()};return w.current.delete(H),l(W=>[ae,...W]),x(ae),o(H),H}async function N(M){const R=a.findIndex(ae=>ae.id===M),B=a[R];if(!B)return;const H=a.filter(ae=>ae.id!==M);w.current.add(M),l(H),s===M&&o(H[0]?.id);try{await(v.current.get(M)??Promise.resolve()),await Kx(M),m_(M)}catch(ae){w.current.delete(M),l(W=>{if(W.some(se=>se.id===M))return W;const ne=Math.min(R,W.length);return[...W.slice(0,ne),B,...W.slice(ne)]}),s===M&&o(M),p(ae instanceof Error?ae.message:String(ae))}}function j(M,R){const B=R.trim(),H=a.find(W=>W.id===M);if(!B||!H)return;const ae={...H,name:B,updatedAt:new Date().toISOString()};l(W=>W.map(ne=>ne.id===M?ae:ne)),x(ae)}function T(M,R){const B=a.find(ae=>ae.id===M);if(!B)return;const H={...B,result:R,updatedAt:new Date().toISOString()};l(ae=>ae.map(W=>W.id===M?H:W)),x(H)}function O(M,R){const B=a.find(ae=>ae.id===M);if(!B)return;const H={...B,testCaseLanguage:R,updatedAt:new Date().toISOString()};l(ae=>ae.map(W=>W.id===M?H:W)),x(H)}function k(){s0().catch(M=>p(M instanceof Error?M.message:String(M)))}return{projects:a,activeProjectId:s,setActiveProjectId:o,saveProject:y,createEmptyProject:A,deleteProject:N,renameProject:j,updateProjectResult:T,updateProjectTestCaseLanguage:O,workspaceRoot:c,workspaceError:f,loading:m,openWorkspace:k}}function v_(a){const l=new TextEncoder().encode(a),s=Array.from(l,o=>String.fromCharCode(o)).join("");return btoa(s).replace(/[^a-z0-9]/gi,"").slice(0,32).toLowerCase()}function y_(a){const[l,s]=F.useState({}),o=a?l[a]??{}:{};function c(f){a&&s(p=>({...p,[a]:f}))}function h(){a&&s(f=>{const p={...f};return delete p[a],p})}return{secrets:o,saveSecrets:c,clearSecrets:h,hasSecrets:Object.values(o).some(Boolean)}}function b_(a){const[l,s]=F.useState([]);F.useEffect(()=>{s([]),a&&(async()=>{const h=await f0(a),f=`lazyscout.bug-reports.${a}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=p.filter(g=>!h.some(w=>w.id===g.id));for(const g of m)await Lm(a,g);p.length&&localStorage.removeItem(f),s([...m,...h])})().catch(()=>s([]))},[a]);function o(h){s(f=>f.some(p=>p.id===h.id)?f.map(p=>p.id===h.id?h:p):[h,...f]),a&&Lm(a,h)}function c(h){s(f=>f.filter(p=>p.id!==h)),a&&h0(a,h)}return{reports:l,save:o,remove:c}}function x_(a){const[l,s]=F.useState([]);F.useEffect(()=>{s([]),a&&(async()=>{const h=await o0(a),f=`lazyscout.screenshots.${a}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=[];for(const g of p)h.some(w=>w.name===g.name)||m.push(await Mm(a,g));p.length&&localStorage.removeItem(f),s([...m,...h])})().catch(()=>s([]))},[a]);function o(h){a&&Mm(a,h).then(f=>s(p=>[f,...p.filter(m=>m.name!==f.name)].slice(0,50)))}function c(h){s(f=>f.filter(p=>p.name!==h)),a&&u0(a,h)}return{screenshots:l,add:o,remove:c}}function S_(a){const[l,s]=F.useState([]),[o,c]=F.useState();F.useEffect(()=>{if(!a){s([]);return}e0(a).then(s).catch(f=>c(f instanceof Error?f.message:String(f)))},[a]);async function h(f){s(f);try{await t0(a,f),c(void 0)}catch(p){c(p instanceof Error?p.message:String(p))}}return{flows:l,update:h,error:o}}function j_(a,l){const s=l.search.trim().toLowerCase();return a.filter(o=>l.module!=="all"&&!(o.folder??o.module).toLowerCase().includes(l.module.toLowerCase())||l.type!=="all"&&o.type!==l.type||l.priority!=="all"&&o.priority!==l.priority?!1:s?[o.id,o.module,o.folder??"",...o.tags??[],...o.requirements??[],o.title,o.expectedResult,o.sourceUrl,bx(o.steps)].join(" ").toLowerCase().includes(s):!0)}function Yg(a){return[...new Set(a.map(l=>l.folder??l.module))].sort()}function w_(a,l,s){const o=l.trim().toLowerCase();return a.filter(c=>s!=="all"&&c.module!==s?!1:o?[c.id,c.module,c.field,c.inputType,c.validValue,c.invalidValue,c.note??""].join(" ").toLowerCase().includes(o):!0)}const __={search:"",module:"all",type:"all",priority:"all"},od="lazyscout-active-project-id",Fg=["Launching Playwright runner","Opening target URL","Collecting pages and controls"];function N_(){const{status:a,result:l,error:s,analyze:o,reset:c}=u_(),{projects:h,activeProjectId:f,setActiveProjectId:p,saveProject:m,createEmptyProject:g,deleteProject:w,renameProject:v,updateProjectResult:x,updateProjectTestCaseLanguage:y,workspaceRoot:A,workspaceError:N,loading:j,openWorkspace:T}=g_(),O=h.find(Se=>Se.id===f),{secrets:k,saveSecrets:M,clearSecrets:R}=y_(f),{filter:B,blockedKeywords:H,save:ae}=d_(f),ne=O?.result??l,{testCases:se,selectedIds:q,updateTestCase:G,deleteTestCase:E,deleteSelected:X,reorderTestCases:V,createTestCaseDraft:P,addImportedTestCases:Q,addTestCase:D,toggleSelected:I,setSelection:S}=f_(ne?.testCases),{testData:C,updateRow:$,deleteRow:K,addRow:ie}=h_(ne?.testData),{reports:ye,save:_e,remove:Ne}=b_(f),{screenshots:oe,add:je,remove:Ee}=x_(f),{flows:$e,update:He}=S_(f),_=ne??(O?E_(O.targetUrl):void 0),[Y,re]=F.useState("testcases"),[L,U]=F.useState(0),[J,ge]=F.useState(__),[he,te]=F.useState(""),[xe,we]=F.useState("all"),[be,Te]=F.useState(),[qe,De]=F.useState(),[ht,Nt]=F.useState(null),[Bt,Jt]=F.useState(!1),[Xe,ut]=F.useState(),[Pe,Me]=F.useState("overview"),[At,xt]=F.useState(!1),[Je,et]=F.useState({}),[St,zt]=F.useState({}),[vt,Gt]=F.useState(!1),[$t,pt]=F.useState(!1),[Dn,Hn]=F.useState(!1),[Ut,ze]=F.useState(!1),[Ge,Jr]=F.useState(!1),[Wr,La]=F.useState(),[ei,vl]=F.useState(()=>localStorage.getItem("lazyscout-sidebar-collapsed")==="true");function yl(){vl(Se=>(localStorage.setItem("lazyscout-sidebar-collapsed",String(!Se)),!Se))}function sn(Se){Ge||(Jr(!0),window.setTimeout(()=>{Se(),Jr(!1)},700))}const Et=F.useMemo(()=>j_(se,J),[se,J]),Ht=F.useMemo(()=>w_(C,he,xe),[C,he,xe]),ra=F.useMemo(()=>Yg(se),[se]),ti=F.useMemo(()=>Yg(C),[C]),bl=se.find(Se=>Se.id===be);function uo(Se,Ce,tt){const yt=se.find(ot=>ot.id===Se);if(!yt)return;const jt={...yt};if(Ce==="preconditions"||Ce==="tags"?jt[Ce]=tt.split(/\n|,/).map(ot=>ot.trim()).filter(Boolean):Ce==="steps"?jt.steps=tt.split(`
57
- `).map(ot=>ot.trim()).filter(Boolean).map(ot=>{try{return JSON.parse(ot)}catch{return{type:"manual",description:ot}}}):jt[Ce]=tt,G(Se,jt),f&&ne){const ot=se.map(oa=>oa.id===Se?jt:oa);x(f,{...ne,testCases:ot,testData:C})}}F.useEffect(()=>{f&&ne&&O?.result===ne&&x(f,{...ne,testCases:se,testData:C})},[se,C]),F.useEffect(()=>{if(j)return;if(h.length===0){localStorage.removeItem(od),ze(!0);return}if(f&&h.some(tt=>tt.id===f))return;const Se=localStorage.getItem(od),Ce=h.find(tt=>tt.id===Se)??h[0];p(Ce.id)},[f,h,j,p]),F.useEffect(()=>{!j&&f&&localStorage.setItem(od,f)},[f,j]),F.useEffect(()=>{if(a!=="loading")return;const Se=document.body.style.overflow,Ce=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=Se,document.documentElement.style.overflow=Ce}},[a]),F.useEffect(()=>{if(a!=="loading"){U(0);return}const Se=window.setInterval(()=>{U(Ce=>(Ce+1)%Fg.length)},1800);return()=>window.clearInterval(Se)},[a]);async function xl(Se,Ce,tt,yt,jt,ot,oa,Sl,jl,co){const gn=await o(Se,Ce,tt,yt,jt,ot,H,f,oa,Sl,jl,co);if(gn){m(Se,gn,void 0,f,yt);const ua=gn.pages.reduce((Wt,bt)=>Wt+bt.links.length+bt.buttons.length+bt.inputs.length+bt.textareas.length+bt.selects.length+(bt.state?.interactions.length??0),0);if(gn.testCases.length===0||ua===0){const Wt=gn.issues.map(bt=>bt.code).filter((bt,wl,fo)=>fo.indexOf(bt)===wl);La({message:"Scout finished, but no usable Test Cases were created.",detail:`Visited ${gn.pages.length} page${gn.pages.length===1?"":"s"} and found ${ua} testable control${ua===1?"":"s"}.${Wt.length?` Explorer reported: ${Wt.join(", ")}.`:" The site may show a bot challenge, render content after a delay, or expose no detectable controls. Check Scout Log for details."}`})}else La(void 0)}}async function ia(){const Se=Y==="testcases"?Et:[],Ce=Y==="testdata"?Ht:[];if(Se.length===0&&Ce.length===0){ut("No data is available for export.");return}Jt(!0),ut(void 0);try{await Zx(Se,Ce)}catch(tt){ut(tt instanceof ir?tt.message:"Could not export CSV.")}finally{Jt(!1)}}function lr(Se){const Ce=bl?.sourceUrl??ne?.startUrl;if(!Ce){Q(Se);return}Q(Se.filter(tt=>tt.sourceUrl===Ce))}function la(){const Se=P(ne?.startUrl??"");Nt(Se),Te(Se.id)}function sa(Se,Ce,tt){const yt=D({...P(tt),title:Ce,steps:Se,expectedResult:"The recorded flow completes without an error.",automationStatus:"needs-review"});Gt(!1),re("testcases"),Te(yt.id)}function Ba(Se){const Ce=O?.targetUrl||ne?.startUrl||"http://localhost:5173",tt=$e[0],yt=tt??{id:crypto.randomUUID(),name:"Explorer Guided Flow",description:"Steps added from Auto Scout Explorer.",baseUrl:Ce,steps:[{id:crypto.randomUUID(),type:"navigate",path:new URL(Ce).pathname||"/"}],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};He(tt?$e.map(jt=>jt.id===tt.id?{...jt,steps:[...jt.steps,Se],updatedAt:new Date().toISOString()}:jt):[{...yt,steps:[...yt.steps,Se]}])}return r.jsxs("div",{className:"app-frame",children:[r.jsx(k1,{projects:h,activeProjectId:f,result:ne,collapsed:a==="loading"?!1:ei,onToggleCollapsed:()=>{a!=="loading"&&yl()},onSelect:Se=>sn(()=>{p(Se),et({}),zt({}),Me("overview"),Te(void 0)}),onNew:()=>ze(!0),onDelete:w,onRename:v,onSettings:()=>Gt(!0),workspaceRoot:A,onOpenWorkspace:T}),r.jsxs("div",{className:"app-main",children:[r.jsxs("header",{className:"app-header",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"brand-mark",children:[r.jsx("span",{children:"LS"}),r.jsx("h1",{children:"LazyScout"}),r.jsxs("a",{className:"guide-link",href:"https://lazyscout.lazyscout.workers.dev/",target:"_blank",rel:"noreferrer","aria-label":"Open LazyScout Guide",title:"Open LazyScout Guide",children:[r.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:r.jsx("path",{d:"M3.5 3.25A2.25 2.25 0 0 1 5.75 1h3A2.25 2.25 0 0 1 11 3.25v13.5A2.75 2.75 0 0 0 8.25 14h-2.5a2.25 2.25 0 0 0-2.25 2.25v-13Zm13 0A2.25 2.25 0 0 0 14.25 1h-3A2.25 2.25 0 0 0 9 3.25v13.5A2.75 2.75 0 0 1 11.75 14h2.5a2.25 2.25 0 0 1 2.25 2.25v-13Z"})}),r.jsx("span",{children:"Guide"})]})]}),r.jsxs("p",{children:["QA workspace ",r.jsx("span",{children:"/"})," Website UI State Explorer"]})]}),O&&!ne&&r.jsx(Fm,{view:Pe,onChange:Se=>Se==="explorer"?xt(!0):Me(Se),counts:{cases:se.length,states:0}}),ne&&r.jsxs("div",{className:"header-status",children:[r.jsx("span",{className:"status-dot status-pass"})," Explorer ready ",r.jsx("span",{className:"header-divider"})," ",r.jsx("span",{children:ne.origin})]})]}),r.jsxs("div",{className:"space-y-4",children:[O&&(O.targetUrl||O.mode==="scout")&&r.jsx(mx,{initialUrl:O?.targetUrl,hasExistingData:!!O?.result?.testCases?.length,initialLanguage:O.testCaseLanguage,loading:a==="loading",onLanguageChange:Se=>f&&y(f,Se),onAnalyze:xl},f??"new-project"),a==="loading"&&r.jsx("div",{className:"card p-6 text-center text-sm text-slate-600",children:"Playwright is opening the website and collecting page data… This can take a few moments."}),s&&r.jsx(Ec,{message:s.message,hint:s.hint}),N&&r.jsx(Ec,{message:N,hint:"Check that the LazyScout workspace is writable."}),Xe&&r.jsx(Ec,{message:Xe}),Wr&&r.jsx(o_,{...Wr,onClose:()=>La(void 0)}),ne&&r.jsxs(r.Fragment,{children:[r.jsx(Fm,{view:Pe,onChange:Se=>Se==="explorer"?xt(!0):Me(Se),counts:{cases:se.length,states:ne.actionGraph.states.length}}),Pe==="scoutlog"?r.jsx(C1,{result:ne}):Pe==="loadtest"?r.jsx(l_,{defaultUrl:O?.targetUrl||ne.startUrl}):Pe==="automation"?r.jsx(A1,{testCases:se,projectId:f,secrets:k,blockedKeywords:H,onRunStatus:(Se,Ce)=>{et(yt=>({...yt,[Se]:Ce}));const tt=se.find(yt=>yt.id===Se);tt&&G(Se,{...tt,status:Ce})},onRunResult:(Se,Ce)=>{zt(yt=>({...yt,[Se]:{...Ce,finishedAt:new Date().toISOString()}}));const tt=Ce.screenshots?.length?Ce.screenshots:Ce.screenshot?[Ce.screenshot]:[];if(tt.forEach(je),Ce.status==="failed"&&f){const yt=se.find(ot=>ot.id===Se),jt={id:`bug-${crypto.randomUUID()}`,title:`Automation failed: ${yt?.title??Se}`,severity:"high",status:"open",testCaseId:Se,actualResult:"The Playwright automation step failed. Open Automation Run Log for details.",expectedResult:yt?.expectedResult??"The Test Case should complete successfully.",stepsToReproduce:yt?.steps.map((ot,oa)=>`${oa+1}. ${ot.type}`).join(`
58
- `)??"",attachments:tt.map(ot=>({name:ot.name,type:"image/png",dataUrl:ot.dataUrl})),createdAt:new Date().toISOString()};_e(jt)}}}):Pe==="overview"?r.jsx(B1,{result:ne,testCases:se,executionStatuses:Je,runResults:St,projectId:f}):r.jsxs("div",{className:"workspace-shell",children:[r.jsx(gx,{result:ne,activeUrl:bl?.sourceUrl,onSelect:Se=>Te(se.find(Ce=>Ce.sourceUrl===Se)?.id)}),r.jsxs("main",{className:"workspace-center",children:[r.jsxs("div",{className:"workspace-center-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Current Workspace"}),r.jsx("h2",{children:Y==="testcases"?"Test Case Review":"Test Data"})]}),r.jsxs("div",{className:"center-chips",children:[r.jsxs("span",{className:"status-badge status-badge-pass",children:[se.filter(Se=>Se.automationStatus==="ready").length," ready"]}),r.jsxs("span",{className:"status-badge status-badge-warn",children:[se.filter(Se=>Se.automationStatus==="needs-review").length," review"]})]})]}),r.jsx("div",{className:"grid gap-4",children:r.jsxs("div",{className:"card",children:[r.jsxs("div",{className:"flex gap-1 border-b border-slate-200 px-4 pt-3",children:[r.jsxs("button",{type:"button",onClick:()=>re("testcases"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="testcases"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Cases (",se.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("testdata"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="testdata"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Data (",C.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("apichecks"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="apichecks"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test API (",ne.apiChecks?.length??0,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("bugreports"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="bugreports"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Bug Reports (",ye.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("screenshots"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="screenshots"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Screenshots (",oe.length,")"]})]}),Y==="screenshots"?r.jsx(i_,{screenshots:oe,onDelete:Ee}):Y==="bugreports"?r.jsx(t_,{reports:ye,testCases:se,onSave:_e,onDelete:Ne}):Y==="apichecks"?r.jsx(R1,{checks:ne.apiChecks??[],secrets:k}):Y==="testcases"?r.jsxs(r.Fragment,{children:[r.jsx(kx,{testCases:se}),r.jsx(Rx,{filters:J,modules:ra,totalCount:se.length,visibleCount:Et.length,selectedCount:q.length,exporting:Bt,onFiltersChange:ge,onAdd:la,onImport:()=>Hn(!0),onImportScreenshot:()=>pt(!0),onDeleteSelected:X,onExport:ia}),r.jsx(Cx,{testCases:Et,selectedIds:q,activeId:be,onToggleSelect:I,onToggleAll:S,onOpen:Se=>{Te(Se.id),De(Se.id)},onEdit:Nt,onDelete:E,onReorder:V,onUpdateCell:uo,executionStatuses:Je})]}):r.jsxs(r.Fragment,{children:[r.jsx(zx,{search:he,module:xe,modules:ti,totalCount:C.length,visibleCount:Ht.length,exporting:Bt,onSearchChange:te,onModuleChange:we,onAdd:()=>ie(ne.startUrl),onExport:ia}),r.jsx(Dx,{rows:Ht,onUpdate:$,onDelete:K})]})]})})]})]})]})]}),ht&&r.jsx(Ax,{testCase:ht,onCancel:()=>Nt(null),onSave:Se=>{se.some(Ce=>Ce.id===ht.id)?G(ht.id,Se):D(Se),Te(Se.id),Nt(null)}}),At&&_&&r.jsx(nS,{result:_,testCaseCount:se.length,flows:$e,baseUrl:O?.targetUrl||_.startUrl,projectId:f,secrets:k,onSaveFlows:He,onGenerateTestCase:Se=>{D(Se),xt(!1),Me("testcases")},onAddToFlow:Ba,onClose:()=>xt(!1),onOpenCases:()=>{xt(!1),Me("testcases")}}),qe&&!ht&&Y==="testcases"&&se.find(Se=>Se.id===qe)&&r.jsx(Ox,{testCase:se.find(Se=>Se.id===qe),onEdit:()=>Nt(se.find(Se=>Se.id===qe)),onClose:()=>De(void 0)}),vt&&O&&r.jsx(pS,{projectName:O.name,projectId:O.id,targetUrl:O.targetUrl,secrets:k,onSave:M,onClear:R,onClose:()=>Gt(!1),onSaveRecording:sa,clickFilter:B,onChangeClickFilter:ae}),$t&&r.jsx(MS,{sourceUrl:ne?.startUrl??O?.targetUrl??"",initialLanguage:O?.testCaseLanguage,onLanguageChange:Se=>f&&y(f,Se),existingCases:se,onImport:lr,onClose:()=>pt(!1)}),Dn&&r.jsx(G2,{sourceUrl:ne?.startUrl??O?.targetUrl??"",existingCases:se,onImport:lr,onClose:()=>Hn(!1)}),Ut&&r.jsx(K2,{projects:h,onClose:()=>ze(!1),onScout:Se=>sn(()=>{g(Se,"scout"),c(),et({}),zt({}),Me("overview"),ze(!1)}),onEmpty:Se=>sn(()=>{g(Se,"empty"),c(),et({}),zt({}),Me("testcases"),ze(!1)}),onOpenProject:Se=>sn(()=>{p(Se),c(),et({}),zt({}),Me("overview"),ze(!1)})}),a==="loading"&&r.jsx("div",{className:"scout-lock",role:"status","aria-live":"polite",children:r.jsxs("div",{className:"scout-lock-card",children:[r.jsxs("div",{className:"scout-progress-head",children:[r.jsx("div",{className:"scout-progress-icon",children:"✦"}),r.jsxs("div",{children:[r.jsx("b",{children:"Scouting website with Playwright"}),r.jsx("span",{children:"Collecting pages, controls and event logs."})]})]}),r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"scout-progress-track",children:r.jsx("i",{})}),r.jsx("strong",{className:"scout-progress-percent",children:"Working…"}),r.jsxs("code",{className:"scout-cli-line",children:["$ ",Fg[L],"…"]})]}),r.jsx("span",{children:"Please wait until Scout finishes."})]})}),Ge&&r.jsx("div",{className:"navigation-loader",children:r.jsxs("div",{children:[r.jsx("span",{children:"LS"}),r.jsx("b",{children:"Opening workspace"}),r.jsx("small",{children:"Preparing your local QA tools…"})]})})]})]})}function E_(a){const l=new URL(a);return{startUrl:a,origin:l.origin,pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}dx.createRoot(document.getElementById("root")).render(r.jsx(F.StrictMode,{children:r.jsx(hx,{children:r.jsx(N_,{})})}));
55
+ 3. Observe…`})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Actual Result"}),r.jsx("textarea",{className:"field",rows:4,value:c.actualResult,onChange:p=>h({...c,actualResult:p.target.value})})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Expected Result"}),r.jsx("textarea",{className:"field",rows:4,value:c.expectedResult,onChange:p=>h({...c,expectedResult:p.target.value})})]})]}),r.jsxs("label",{className:"bug-upload",children:[r.jsx("span",{children:"Evidence screenshots"}),r.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:p=>{f(p)}}),r.jsx("em",{children:"Upload up to 5 images at a time. Images are included in ZIP export."})]}),c.attachments.length?r.jsx("div",{className:"bug-attachments",children:c.attachments.map((p,m)=>r.jsxs("figure",{children:[r.jsx("img",{src:p.dataUrl,alt:p.name}),r.jsxs("figcaption",{children:[p.name,r.jsx("button",{type:"button",onClick:()=>h(g=>({...g,attachments:g.attachments.filter((w,v)=>v!==m)})),children:"×"})]})]},`${p.name}-${m}`))}):null]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!c.title.trim(),onClick:()=>s(c),children:"Save Bug Report"})]})]})})}function s_(n){return new Promise((l,s)=>{const o=new FileReader;o.onload=()=>l(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function no(n){return n.replace(/[^a-z0-9._-]/gi,"_")}function o_(n){const l=["Bug_ID","Title","Test_Case","Severity","Status","Steps_To_Reproduce","Actual_Result","Expected_Result","Attachments"],s=o=>`"${o.replaceAll('"','""')}"`;return[l,...n.map(o=>[o.id,o.title,o.testCaseId??"",o.severity,o.status,o.stepsToReproduce,o.actualResult,o.expectedResult,o.attachments.map(c=>`attachments/${no(o.id)}/${no(c.name)}`).join("; ")])].map(o=>o.map(s).join(",")).join(`\r
56
+ `)}function u_({screenshots:n,onDelete:l}){function s(o){const c=document.createElement("a");c.href=o.dataUrl,c.download=o.name,c.click()}return r.jsxs("section",{className:"screenshot-gallery",children:[r.jsxs("header",{className:"screenshot-gallery-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright evidence"}),r.jsx("h3",{children:"Screenshots"}),r.jsxs("p",{children:["LazyScout does not capture automatically. Add"," ",r.jsxs("code",{children:["await page.screenshot(","{"," path: 'evidence.png', fullPage: true ","}",")"]})," ","to edited Playwright code when evidence is needed."]})]}),r.jsxs("span",{children:[n.length,"/50 saved"]})]}),n.length?r.jsx("div",{className:"screenshot-gallery-grid",children:n.map(o=>r.jsxs("figure",{children:[r.jsx("img",{src:o.dataUrl,alt:`Screenshot for ${o.testCaseId}`}),r.jsxs("figcaption",{children:[r.jsxs("div",{children:[r.jsx("b",{children:o.testCaseId}),r.jsxs("span",{children:[o.status," · ",new Date(o.capturedAt).toLocaleString()]})]}),r.jsxs("div",{className:"flex shrink-0 gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>s(o),children:"Download"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>l(o.name),children:"Delete"})]})]})]},o.name))}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No screenshots yet"}),r.jsx("span",{children:"Add page.screenshot() to edited Playwright code, save it, then run that Test Case."})]})]})}function c_({defaultUrl:n}){const[l,s]=F.useState(n),[o,c]=F.useState(3),[h,f]=F.useState(5),[p,m]=F.useState(300),[g,w]=F.useState(!1),[v,x]=F.useState(!1),[y,C]=F.useState(),[N,j]=F.useState(""),T=Math.min(20,Math.max(1,Number(o)||1))*Math.min(100,Math.max(1,Number(h)||1));async function O(){if(!(v||!g)){x(!0),C(void 0),j("");try{C(await b0({url:l,virtualUsers:Number(o)||1,requestsPerUser:Number(h)||1,intervalMs:Number(p)||0,confirmed:g}))}catch(k){j(k instanceof Error?k.message:String(k))}finally{x(!1)}}}return r.jsxs("section",{className:"load-test-page",children:[r.jsxs("header",{className:"load-test-hero",children:[r.jsx("div",{className:"load-test-hero-icon",children:"⚡"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"HTTP performance workspace"}),r.jsx("h2",{children:"Load Test"}),r.jsx("p",{children:"Send controlled GET traffic, compare response times, and inspect every HTTP response."})]}),r.jsx("span",{children:"GET only · Local runner"})]}),r.jsxs("div",{className:"load-test-layout",children:[r.jsxs("section",{className:"load-config-card",children:[r.jsxs("div",{className:"load-section-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test configuration"}),r.jsx("h3",{children:"Request settings"})]}),r.jsxs("b",{children:[T," requests"]})]}),r.jsxs("div",{className:"load-test-form",children:[r.jsxs("label",{className:"load-url",children:[r.jsx("span",{children:"Target URL"}),r.jsx("input",{className:"field",value:l,onChange:k=>s(k.target.value),placeholder:"https://example.com",disabled:v})]}),r.jsxs("div",{className:"load-input-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Virtual users"}),r.jsx("input",{className:"field",type:"number",min:1,max:20,value:o,onChange:k=>c(k.target.value===""?"":Number(k.target.value)),disabled:v}),r.jsx("small",{children:"Maximum 20 concurrent users"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Requests / user"}),r.jsx("input",{className:"field",type:"number",min:1,max:100,value:h,onChange:k=>f(k.target.value===""?"":Number(k.target.value)),disabled:v}),r.jsx("small",{children:"Maximum 100 per user"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Interval"}),r.jsxs("div",{className:"load-input-unit",children:[r.jsx("input",{className:"field",type:"number",min:0,max:1e4,value:p,onChange:k=>m(k.target.value===""?"":Number(k.target.value)),disabled:v}),r.jsx("em",{children:"ms"})]}),r.jsx("small",{children:"Pause between each request"})]})]}),r.jsxs("label",{className:"load-confirm",children:[r.jsx("input",{type:"checkbox",checked:g,onChange:k=>w(k.target.checked),disabled:v}),r.jsxs("span",{children:[r.jsx("b",{children:"Authorized target"}),r.jsx("small",{children:"I own this target or have permission to run a load test."})]})]}),r.jsx("button",{type:"button",className:"btn btn-primary load-run-button",disabled:v||!g||!l.trim(),onClick:()=>{O()},children:v?r.jsxs(r.Fragment,{children:[r.jsx("i",{})," Running ",T," requests…"]}):r.jsx(r.Fragment,{children:"▶ Start Load Test"})})]})]}),r.jsxs("aside",{className:"load-safety-card",children:[r.jsx("p",{className:"eyebrow",children:"Safe limits"}),r.jsx("h3",{children:"Controlled traffic"}),r.jsxs("ul",{children:[r.jsxs("li",{children:[r.jsx("b",{children:"20"}),r.jsx("span",{children:"Maximum virtual users"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"2,000"}),r.jsx("span",{children:"Maximum total requests"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"15s"}),r.jsx("span",{children:"Timeout per request"})]})]}),r.jsx("p",{children:"Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data."})]})]}),N&&r.jsx("p",{className:"load-error",children:N}),v&&r.jsxs("section",{className:"load-running",children:[r.jsx("i",{}),r.jsxs("div",{children:[r.jsx("b",{children:"Load test is running"}),r.jsx("span",{children:"Waiting for all virtual users to complete their request budget…"})]})]}),y&&r.jsxs("section",{className:"load-results",children:[r.jsxs("div",{className:"load-results-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Run report"}),r.jsx("h3",{children:"HTTP Request Results"})]}),r.jsx("span",{className:y.failed?"has-failures":"all-passed",children:y.failed?`${y.failed} failed`:"All requests passed"})]}),r.jsxs("div",{className:"load-kpis",children:[r.jsx(Yr,{label:"Total",value:String(y.total)}),r.jsx(Yr,{label:"Passed",value:String(y.passed),tone:"pass"}),r.jsx(Yr,{label:"Failed",value:String(y.failed),tone:"fail"}),r.jsx(Yr,{label:"Average",value:`${y.averageMs} ms`}),r.jsx(Yr,{label:"Min / Max",value:`${y.minMs} / ${y.maxMs} ms`}),r.jsx(Yr,{label:"Requests/sec",value:String(y.requestsPerSecond)})]}),r.jsx("div",{className:"load-table-wrap",children:r.jsxs("table",{className:"load-request-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"#"}),r.jsx("th",{children:"User"}),r.jsx("th",{children:"Method"}),r.jsx("th",{children:"Request URL"}),r.jsx("th",{children:"HTTP"}),r.jsx("th",{children:"Time"}),r.jsx("th",{children:"Size"}),r.jsx("th",{children:"Result"})]})}),r.jsx("tbody",{children:y.requests.map(k=>r.jsxs("tr",{children:[r.jsx("td",{children:k.id}),r.jsxs("td",{children:["VU-",k.virtualUser,r.jsxs("small",{children:["Run ",k.iteration]})]}),r.jsx("td",{children:r.jsx("span",{className:"load-method",children:k.method})}),r.jsxs("td",{children:[r.jsx("span",{className:"load-request-url",title:k.finalUrl??k.url,children:k.finalUrl??k.url}),k.error&&r.jsx("small",{className:"load-request-error",children:k.error})]}),r.jsx("td",{children:k.statusCode?r.jsxs(r.Fragment,{children:[r.jsx("b",{children:k.statusCode}),r.jsx("small",{children:k.statusText})]}):"—"}),r.jsxs("td",{children:[k.durationMs," ms"]}),r.jsx("td",{children:d_(k.responseBytes)}),r.jsx("td",{children:r.jsx("span",{className:`load-result-badge ${k.passed?"passed":"failed"}`,children:k.passed?"PASS":"FAIL"})})]},k.id))})]})})]})]})}function Yr({label:n,value:l,tone:s=""}){return r.jsxs("div",{className:s,children:[r.jsx("span",{children:n}),r.jsx("b",{children:l})]})}function d_(n){return n?n<1024?`${n} B`:`${(n/1024).toFixed(1)} KB`:"—"}function f_({message:n,detail:l,onClose:s}){return r.jsxs("div",{className:"scout-notice",role:"alert",children:[r.jsx("div",{className:"scout-notice-icon",children:"!"}),r.jsxs("div",{children:[r.jsx("b",{children:n}),r.jsx("p",{children:l})]}),r.jsx("button",{type:"button",onClick:s,"aria-label":"Dismiss notice",children:"×"})]})}function h_(){const[n,l]=F.useState({status:"idle",result:null,error:null});async function s(c,h,f,p="en",m=!1,g=750,w=[],v,x,y,C,N=!1){l({status:"loading",result:null,error:null});try{const j=await Xx({url:c,maxPages:h,maxDepth:f,language:p,includeApiChecks:m,waitAfterNavigationMs:g,blockedKeywords:w,projectId:v,startPath:x,scopePath:y,mode:C,debug:N});return l({status:"success",result:j,error:null}),j}catch(j){const T=j instanceof ir?j:new ir("unknown","An unexpected error occurred.");return l({status:"error",result:null,error:T}),null}}function o(){l({status:"idle",result:null,error:null})}return{...n,analyze:s,reset:o}}const ao={enabled:!0,keywords:Kg},Xv=n=>`lazyscout-click-filter:${n}`;function p_(n){try{const l=localStorage.getItem(Xv(n));if(!l)return ao;const s=JSON.parse(l);return{enabled:s.enabled===!0,keywords:Jg(s.keywords)}}catch{return ao}}function m_(n){const[l,s]=F.useState(ao);F.useEffect(()=>{s(n?p_(n):ao)},[n]);const o=F.useCallback(h=>{const f={enabled:h.enabled,keywords:Jg(h.keywords)};s(f),n&&localStorage.setItem(Xv(n),JSON.stringify(f))},[n]),c=l.enabled?l.keywords:[];return{filter:l,blockedKeywords:c,save:o}}function g_(n){const[l,s]=F.useState([]),[o,c]=F.useState([]);F.useEffect(()=>{s(n??[]),c([])},[n]);function h(C,N){s(j=>j.map(T=>T.id===C?N:T)),c(j=>j.map(T=>T===C?N.id:T))}function f(C){s(N=>N.filter(j=>j.id!==C)),c(N=>N.filter(j=>j!==C))}function p(){s(C=>C.filter(N=>!o.includes(N.id))),c([])}function m(C,N){C!==N&&s(j=>{const T=j.findIndex(R=>R.id===C),O=j.findIndex(R=>R.id===N);if(T<0||O<0)return j;const k=[...j],[M]=k.splice(T,1);return k.splice(O,0,M),k})}function g(C){const N=new Set(l.map(T=>T.id));let j=l.filter(T=>T.module==="MANUAL").length+1;for(;N.has(ud("MANUAL",j));)j++;return Sx("MANUAL",ud("MANUAL",j),C)}function w(C){return s(N=>[C,...N]),C}function v(C){s(N=>[...C,...N])}function x(C){c(N=>N.includes(C)?N.filter(j=>j!==C):[...N,C])}function y(C){c(C)}return{testCases:l,selectedIds:o,updateTestCase:h,deleteTestCase:f,deleteSelected:p,reorderTestCases:m,createTestCaseDraft:g,addTestCase:w,addImportedTestCases:v,toggleSelected:x,setSelection:y}}function v_(n){const[l,s]=F.useState([]);F.useEffect(()=>{s(n??[])},[n]);function o(f,p){s(m=>m.map(g=>g.id===f?p:g))}function c(f){s(p=>p.filter(m=>m.id!==f))}function h(f){const p=new Set(l.map(g=>g.id));let m=l.filter(g=>g.module==="MANUAL").length+1;for(;p.has(cd("MANUAL",m));)m++;s(g=>[xx("MANUAL",cd("MANUAL",m),f),...g])}return{testData:l,updateRow:o,deleteRow:c,addRow:h}}const ro="lazyscout.projects.v1";function y_(){return{startUrl:"",origin:"Manual test suite",pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function Nd(){try{return JSON.parse(localStorage.getItem(ro)??"[]")}catch{return[]}}function b_(n){const l=Nd().filter(s=>s.id!==n);l.length?localStorage.setItem(ro,JSON.stringify(l)):localStorage.removeItem(ro)}function x_(){const[n,l]=F.useState([]),[s,o]=F.useState(),[c,h]=F.useState("~/LazyScout"),[f,p]=F.useState(),[m,g]=F.useState(!0),w=F.useRef(new Set),v=F.useRef(new Map);F.useEffect(()=>{(async()=>{try{const M=await e0();h(M.root);const R=Nd(),B=R.filter(H=>!M.projects.some(ae=>ae.id===H.id));for(const H of B)await Dm(H);R.length&&localStorage.removeItem(ro),l([...B,...M.projects])}catch(M){l(Nd()),p(M instanceof Error?M.message:String(M))}finally{g(!1)}})()},[]);function x(M){if(w.current.has(M.id))return Promise.resolve();const B=(v.current.get(M.id)??Promise.resolve()).catch(()=>{}).then(()=>Dm(M)).catch(H=>{p(H instanceof Error?H.message:String(H))});return v.current.set(M.id,B),B.finally(()=>{v.current.get(M.id)===B&&v.current.delete(M.id)}),B}function y(M,R,B,H,ae){const W=new Date().toISOString(),ne=`project-${S_(M)}`,se=H??ne,q=n.find(E=>E.id===se),G={id:se,name:B??q?.name??new URL(M).hostname,targetUrl:M,createdAt:q?.createdAt??W,updatedAt:W,mode:q?.mode,testCaseLanguage:ae??q?.testCaseLanguage??"en",result:R};return w.current.delete(se),l(E=>q?E.map(X=>X.id===se?G:X):[G,...E]),x(G),o(se),se}function C(M="Untitled Test Suite",R="empty"){const B=new Date().toISOString(),H=`project-${crypto.randomUUID()}`,ae={id:H,name:M.trim()||"Untitled Test Suite",targetUrl:"",createdAt:B,updatedAt:B,mode:R,result:y_()};return w.current.delete(H),l(W=>[ae,...W]),x(ae),o(H),H}async function N(M){const R=n.findIndex(ae=>ae.id===M),B=n[R];if(!B)return;const H=n.filter(ae=>ae.id!==M);w.current.add(M),l(H),s===M&&o(H[0]?.id);try{await(v.current.get(M)??Promise.resolve()),await t0(M),b_(M)}catch(ae){w.current.delete(M),l(W=>{if(W.some(se=>se.id===M))return W;const ne=Math.min(R,W.length);return[...W.slice(0,ne),B,...W.slice(ne)]}),s===M&&o(M),p(ae instanceof Error?ae.message:String(ae))}}function j(M,R){const B=R.trim(),H=n.find(W=>W.id===M);if(!B||!H)return;const ae={...H,name:B,updatedAt:new Date().toISOString()};l(W=>W.map(ne=>ne.id===M?ae:ne)),x(ae)}function T(M,R){const B=n.find(ae=>ae.id===M);if(!B)return;const H={...B,result:R,updatedAt:new Date().toISOString()};l(ae=>ae.map(W=>W.id===M?H:W)),x(H)}function O(M,R){const B=n.find(ae=>ae.id===M);if(!B)return;const H={...B,testCaseLanguage:R,updatedAt:new Date().toISOString()};l(ae=>ae.map(W=>W.id===M?H:W)),x(H)}function k(){d0().catch(M=>p(M instanceof Error?M.message:String(M)))}return{projects:n,activeProjectId:s,setActiveProjectId:o,saveProject:y,createEmptyProject:C,deleteProject:N,renameProject:j,updateProjectResult:T,updateProjectTestCaseLanguage:O,workspaceRoot:c,workspaceError:f,loading:m,openWorkspace:k}}function S_(n){const l=new TextEncoder().encode(n),s=Array.from(l,o=>String.fromCharCode(o)).join("");return btoa(s).replace(/[^a-z0-9]/gi,"").slice(0,32).toLowerCase()}function j_(n){const[l,s]=F.useState({}),o=n?l[n]??{}:{};function c(f){n&&s(p=>({...p,[n]:f}))}function h(){n&&s(f=>{const p={...f};return delete p[n],p})}return{secrets:o,saveSecrets:c,clearSecrets:h,hasSecrets:Object.values(o).some(Boolean)}}function w_(n){const[l,s]=F.useState([]);F.useEffect(()=>{s([]),n&&(async()=>{const h=await g0(n),f=`lazyscout.bug-reports.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=p.filter(g=>!h.some(w=>w.id===g.id));for(const g of m)await Lm(n,g);p.length&&localStorage.removeItem(f),s([...m,...h])})().catch(()=>s([]))},[n]);function o(h){s(f=>f.some(p=>p.id===h.id)?f.map(p=>p.id===h.id?h:p):[h,...f]),n&&Lm(n,h)}function c(h){s(f=>f.filter(p=>p.id!==h)),n&&v0(n,h)}return{reports:l,save:o,remove:c}}function __(n){const[l,s]=F.useState([]);F.useEffect(()=>{s([]),n&&(async()=>{const h=await f0(n),f=`lazyscout.screenshots.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=[];for(const g of p)h.some(w=>w.name===g.name)||m.push(await Mm(n,g));p.length&&localStorage.removeItem(f),s([...m,...h])})().catch(()=>s([]))},[n]);function o(h){n&&Mm(n,h).then(f=>s(p=>[f,...p.filter(m=>m.name!==f.name)].slice(0,50)))}function c(h){s(f=>f.filter(p=>p.name!==h)),n&&h0(n,h)}return{screenshots:l,add:o,remove:c}}function N_(n){const[l,s]=F.useState([]),[o,c]=F.useState();F.useEffect(()=>{if(!n){s([]);return}r0(n).then(s).catch(f=>c(f instanceof Error?f.message:String(f)))},[n]);async function h(f){s(f);try{await i0(n,f),c(void 0)}catch(p){c(p instanceof Error?p.message:String(p))}}return{flows:l,update:h,error:o}}function E_(n,l){const s=l.search.trim().toLowerCase();return n.filter(o=>l.module!=="all"&&!(o.folder??o.module).toLowerCase().includes(l.module.toLowerCase())||l.type!=="all"&&o.type!==l.type||l.priority!=="all"&&o.priority!==l.priority?!1:s?[o.id,o.module,o.folder??"",...o.tags??[],...o.requirements??[],o.title,o.expectedResult,o.sourceUrl,bx(o.steps)].join(" ").toLowerCase().includes(s):!0)}function Yg(n){return[...new Set(n.map(l=>l.folder??l.module))].sort()}function T_(n,l,s){const o=l.trim().toLowerCase();return n.filter(c=>s!=="all"&&c.module!==s?!1:o?[c.id,c.module,c.field,c.inputType,c.validValue,c.invalidValue,c.note??""].join(" ").toLowerCase().includes(o):!0)}const O_={search:"",module:"all",type:"all",priority:"all"},od="lazyscout-active-project-id",Fg=["Launching Playwright runner","Opening target URL","Collecting pages and controls"];function C_(){const{status:n,result:l,error:s,analyze:o,reset:c}=h_(),{projects:h,activeProjectId:f,setActiveProjectId:p,saveProject:m,createEmptyProject:g,deleteProject:w,renameProject:v,updateProjectResult:x,updateProjectTestCaseLanguage:y,workspaceRoot:C,workspaceError:N,loading:j,openWorkspace:T}=x_(),O=h.find(Se=>Se.id===f),{secrets:k,saveSecrets:M,clearSecrets:R}=j_(f),{filter:B,blockedKeywords:H,save:ae}=m_(f),ne=O?.result??l,{testCases:se,selectedIds:q,updateTestCase:G,deleteTestCase:E,deleteSelected:X,reorderTestCases:V,createTestCaseDraft:P,addImportedTestCases:Q,addTestCase:D,toggleSelected:I,setSelection:S}=g_(ne?.testCases),{testData:A,updateRow:$,deleteRow:K,addRow:ie}=v_(ne?.testData),{reports:ye,save:_e,remove:Ne}=w_(f),{screenshots:oe,add:je,remove:Ee}=__(f),{flows:$e,update:He}=N_(f),_=ne??(O?A_(O.targetUrl):void 0),[Y,re]=F.useState("testcases"),[L,U]=F.useState(0),[J,ge]=F.useState(O_),[he,te]=F.useState(""),[xe,we]=F.useState("all"),[be,Te]=F.useState(),[qe,De]=F.useState(),[ht,Nt]=F.useState(null),[Lt,Jt]=F.useState(!1),[Xe,ut]=F.useState(),[Pe,Me]=F.useState("overview"),[Ct,xt]=F.useState(!1),[Je,et]=F.useState({}),[St,zt]=F.useState({}),[vt,Gt]=F.useState(!1),[Bt,pt]=F.useState(!1),[Dn,Hn]=F.useState(!1),[Ut,ze]=F.useState(!1),[Ge,Jr]=F.useState(!1),[Wr,La]=F.useState(),[ei,vl]=F.useState(()=>localStorage.getItem("lazyscout-sidebar-collapsed")==="true");function yl(){vl(Se=>(localStorage.setItem("lazyscout-sidebar-collapsed",String(!Se)),!Se))}function sn(Se){Ge||(Jr(!0),window.setTimeout(()=>{Se(),Jr(!1)},700))}const Et=F.useMemo(()=>E_(se,J),[se,J]),$t=F.useMemo(()=>T_(A,he,xe),[A,he,xe]),ra=F.useMemo(()=>Yg(se),[se]),ti=F.useMemo(()=>Yg(A),[A]),bl=se.find(Se=>Se.id===be);function uo(Se,Ae,tt){const yt=se.find(ot=>ot.id===Se);if(!yt)return;const jt={...yt};if(Ae==="preconditions"||Ae==="tags"?jt[Ae]=tt.split(/\n|,/).map(ot=>ot.trim()).filter(Boolean):Ae==="steps"?jt.steps=tt.split(`
57
+ `).map(ot=>ot.trim()).filter(Boolean).map(ot=>{try{return JSON.parse(ot)}catch{return{type:"manual",description:ot}}}):jt[Ae]=tt,G(Se,jt),f&&ne){const ot=se.map(oa=>oa.id===Se?jt:oa);x(f,{...ne,testCases:ot,testData:A})}}F.useEffect(()=>{f&&ne&&O?.result===ne&&x(f,{...ne,testCases:se,testData:A})},[se,A]),F.useEffect(()=>{if(j)return;if(h.length===0){localStorage.removeItem(od),ze(!0);return}if(f&&h.some(tt=>tt.id===f))return;const Se=localStorage.getItem(od),Ae=h.find(tt=>tt.id===Se)??h[0];p(Ae.id)},[f,h,j,p]),F.useEffect(()=>{!j&&f&&localStorage.setItem(od,f)},[f,j]),F.useEffect(()=>{if(n!=="loading")return;const Se=document.body.style.overflow,Ae=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=Se,document.documentElement.style.overflow=Ae}},[n]),F.useEffect(()=>{if(n!=="loading"){U(0);return}const Se=window.setInterval(()=>{U(Ae=>(Ae+1)%Fg.length)},1800);return()=>window.clearInterval(Se)},[n]);async function xl(Se,Ae,tt,yt,jt,ot,oa,Sl,jl,co){const gn=await o(Se,Ae,tt,yt,jt,ot,H,f,oa,Sl,jl,co);if(gn){m(Se,gn,void 0,f,yt);const ua=gn.pages.reduce((Wt,bt)=>Wt+bt.links.length+bt.buttons.length+bt.inputs.length+bt.textareas.length+bt.selects.length+(bt.state?.interactions.length??0),0);if(gn.testCases.length===0||ua===0){const Wt=gn.issues.map(bt=>bt.code).filter((bt,wl,fo)=>fo.indexOf(bt)===wl);La({message:"Scout finished, but no usable Test Cases were created.",detail:`Visited ${gn.pages.length} page${gn.pages.length===1?"":"s"} and found ${ua} testable control${ua===1?"":"s"}.${Wt.length?` Explorer reported: ${Wt.join(", ")}.`:" The site may show a bot challenge, render content after a delay, or expose no detectable controls. Check Scout Log for details."}`})}else La(void 0)}}async function ia(){const Se=Y==="testcases"?Et:[],Ae=Y==="testdata"?$t:[];if(Se.length===0&&Ae.length===0){ut("No data is available for export.");return}Jt(!0),ut(void 0);try{await Jx(Se,Ae)}catch(tt){ut(tt instanceof ir?tt.message:"Could not export CSV.")}finally{Jt(!1)}}function lr(Se){const Ae=bl?.sourceUrl??ne?.startUrl;if(!Ae){Q(Se);return}Q(Se.filter(tt=>tt.sourceUrl===Ae))}function la(){const Se=P(ne?.startUrl??"");Nt(Se),Te(Se.id)}function sa(Se,Ae,tt){const yt=D({...P(tt),title:Ae,steps:Se,expectedResult:"The recorded flow completes without an error.",automationStatus:"needs-review"});Gt(!1),re("testcases"),Te(yt.id)}function Ba(Se){const Ae=O?.targetUrl||ne?.startUrl||"http://localhost:5173",tt=$e[0],yt=tt??{id:crypto.randomUUID(),name:"Explorer Guided Flow",description:"Steps added from Auto Scout Explorer.",baseUrl:Ae,steps:[{id:crypto.randomUUID(),type:"navigate",path:new URL(Ae).pathname||"/"}],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};He(tt?$e.map(jt=>jt.id===tt.id?{...jt,steps:[...jt.steps,Se],updatedAt:new Date().toISOString()}:jt):[{...yt,steps:[...yt.steps,Se]}])}return r.jsxs("div",{className:"app-frame",children:[r.jsx(M1,{projects:h,activeProjectId:f,result:ne,collapsed:n==="loading"?!1:ei,onToggleCollapsed:()=>{n!=="loading"&&yl()},onSelect:Se=>sn(()=>{p(Se),et({}),zt({}),Me("overview"),Te(void 0)}),onNew:()=>ze(!0),onDelete:w,onRename:v,onSettings:()=>Gt(!0),workspaceRoot:C,onOpenWorkspace:T}),r.jsxs("div",{className:"app-main",children:[r.jsxs("header",{className:"app-header",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"brand-mark",children:[r.jsx("span",{children:"LS"}),r.jsx("h1",{children:"LazyScout"}),r.jsxs("a",{className:"guide-link",href:"https://lazyscout.lazyscout.workers.dev/",target:"_blank",rel:"noreferrer","aria-label":"Open LazyScout Guide",title:"Open LazyScout Guide",children:[r.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:r.jsx("path",{d:"M3.5 3.25A2.25 2.25 0 0 1 5.75 1h3A2.25 2.25 0 0 1 11 3.25v13.5A2.75 2.75 0 0 0 8.25 14h-2.5a2.25 2.25 0 0 0-2.25 2.25v-13Zm13 0A2.25 2.25 0 0 0 14.25 1h-3A2.25 2.25 0 0 0 9 3.25v13.5A2.75 2.75 0 0 1 11.75 14h2.5a2.25 2.25 0 0 1 2.25 2.25v-13Z"})}),r.jsx("span",{children:"Guide"})]})]}),r.jsxs("p",{children:["QA workspace ",r.jsx("span",{children:"/"})," Website UI State Explorer"]})]}),O&&!ne&&r.jsx(Fm,{view:Pe,onChange:Se=>Se==="explorer"?xt(!0):Me(Se),counts:{cases:se.length,states:0}}),ne&&r.jsxs("div",{className:"header-status",children:[r.jsx("span",{className:"status-dot status-pass"})," Explorer ready ",r.jsx("span",{className:"header-divider"})," ",r.jsx("span",{children:ne.origin})]})]}),r.jsxs("div",{className:"space-y-4",children:[O&&(O.targetUrl||O.mode==="scout")&&r.jsx(mx,{initialUrl:O?.targetUrl,hasExistingData:!!O?.result?.testCases?.length,initialLanguage:O.testCaseLanguage,loading:n==="loading",onLanguageChange:Se=>f&&y(f,Se),onAnalyze:xl},f??"new-project"),n==="loading"&&r.jsx("div",{className:"card p-6 text-center text-sm text-slate-600",children:"Playwright is opening the website and collecting page data… This can take a few moments."}),s&&r.jsx(Ec,{message:s.message,hint:s.hint}),N&&r.jsx(Ec,{message:N,hint:"Check that the LazyScout workspace is writable."}),Xe&&r.jsx(Ec,{message:Xe}),Wr&&r.jsx(f_,{...Wr,onClose:()=>La(void 0)}),ne&&r.jsxs(r.Fragment,{children:[r.jsx(Fm,{view:Pe,onChange:Se=>Se==="explorer"?xt(!0):Me(Se),counts:{cases:se.length,states:ne.actionGraph.states.length}}),Pe==="scoutlog"?r.jsx(z1,{result:ne}):Pe==="loadtest"?r.jsx(c_,{defaultUrl:O?.targetUrl||ne.startUrl}):Pe==="automation"?r.jsx(D1,{testCases:se,projectId:f,secrets:k,blockedKeywords:H,onRunStatus:(Se,Ae)=>{et(yt=>({...yt,[Se]:Ae}));const tt=se.find(yt=>yt.id===Se);tt&&G(Se,{...tt,status:Ae})},onRunResult:(Se,Ae)=>{zt(yt=>({...yt,[Se]:{...Ae,finishedAt:new Date().toISOString()}}));const tt=Ae.screenshots?.length?Ae.screenshots:Ae.screenshot?[Ae.screenshot]:[];if(tt.forEach(je),Ae.status==="failed"&&f){const yt=se.find(ot=>ot.id===Se),jt={id:`bug-${crypto.randomUUID()}`,title:`Automation failed: ${yt?.title??Se}`,severity:"high",status:"open",testCaseId:Se,actualResult:"The Playwright automation step failed. Open Automation Run Log for details.",expectedResult:yt?.expectedResult??"The Test Case should complete successfully.",stepsToReproduce:yt?.steps.map((ot,oa)=>`${oa+1}. ${ot.type}`).join(`
58
+ `)??"",attachments:tt.map(ot=>({name:ot.name,type:"image/png",dataUrl:ot.dataUrl})),createdAt:new Date().toISOString()};_e(jt)}}}):Pe==="overview"?r.jsx(G1,{result:ne,testCases:se,executionStatuses:Je,runResults:St,projectId:f}):r.jsxs("div",{className:"workspace-shell",children:[r.jsx(gx,{result:ne,activeUrl:bl?.sourceUrl,onSelect:Se=>Te(se.find(Ae=>Ae.sourceUrl===Se)?.id)}),r.jsxs("main",{className:"workspace-center",children:[r.jsxs("div",{className:"workspace-center-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Current Workspace"}),r.jsx("h2",{children:Y==="testcases"?"Test Case Review":"Test Data"})]}),r.jsxs("div",{className:"center-chips",children:[r.jsxs("span",{className:"status-badge status-badge-pass",children:[se.filter(Se=>Se.automationStatus==="ready").length," ready"]}),r.jsxs("span",{className:"status-badge status-badge-warn",children:[se.filter(Se=>Se.automationStatus==="needs-review").length," review"]})]})]}),r.jsx("div",{className:"grid gap-4",children:r.jsxs("div",{className:"card",children:[r.jsxs("div",{className:"flex gap-1 border-b border-slate-200 px-4 pt-3",children:[r.jsxs("button",{type:"button",onClick:()=>re("testcases"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="testcases"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Cases (",se.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("testdata"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="testdata"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Data (",A.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("apichecks"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="apichecks"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test API (",ne.apiChecks?.length??0,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("bugreports"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="bugreports"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Bug Reports (",ye.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>re("screenshots"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${Y==="screenshots"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Screenshots (",oe.length,")"]})]}),Y==="screenshots"?r.jsx(u_,{screenshots:oe,onDelete:Ee}):Y==="bugreports"?r.jsx(i_,{reports:ye,testCases:se,onSave:_e,onDelete:Ne}):Y==="apichecks"?r.jsx(U1,{checks:ne.apiChecks??[],secrets:k}):Y==="testcases"?r.jsxs(r.Fragment,{children:[r.jsx(kx,{testCases:se}),r.jsx(Rx,{filters:J,modules:ra,totalCount:se.length,visibleCount:Et.length,selectedCount:q.length,exporting:Lt,onFiltersChange:ge,onAdd:la,onImport:()=>Hn(!0),onImportScreenshot:()=>pt(!0),onDeleteSelected:X,onExport:ia}),r.jsx(Ax,{testCases:Et,selectedIds:q,activeId:be,onToggleSelect:I,onToggleAll:S,onOpen:Se=>{Te(Se.id),De(Se.id)},onEdit:Nt,onDelete:E,onReorder:V,onUpdateCell:uo,executionStatuses:Je})]}):r.jsxs(r.Fragment,{children:[r.jsx(zx,{search:he,module:xe,modules:ti,totalCount:A.length,visibleCount:$t.length,exporting:Lt,onSearchChange:te,onModuleChange:we,onAdd:()=>ie(ne.startUrl),onExport:ia}),r.jsx(Dx,{rows:$t,onUpdate:$,onDelete:K})]})]})})]})]})]})]}),ht&&r.jsx(Cx,{testCase:ht,onCancel:()=>Nt(null),onSave:Se=>{se.some(Ae=>Ae.id===ht.id)?G(ht.id,Se):D(Se),Te(Se.id),Nt(null)}}),Ct&&_&&r.jsx(lS,{result:_,testCaseCount:se.length,flows:$e,baseUrl:O?.targetUrl||_.startUrl,projectId:f,secrets:k,onSaveFlows:He,onGenerateTestCase:Se=>{D(Se),xt(!1),Me("testcases")},onAddToFlow:Ba,onClose:()=>xt(!1),onOpenCases:()=>{xt(!1),Me("testcases")}}),qe&&!ht&&Y==="testcases"&&se.find(Se=>Se.id===qe)&&r.jsx(Ox,{testCase:se.find(Se=>Se.id===qe),onEdit:()=>Nt(se.find(Se=>Se.id===qe)),onClose:()=>De(void 0)}),vt&&O&&r.jsx(yS,{projectName:O.name,projectId:O.id,targetUrl:O.targetUrl,secrets:k,onSave:M,onClear:R,onClose:()=>Gt(!1),onSaveRecording:sa,clickFilter:B,onChangeClickFilter:ae}),Bt&&r.jsx(HS,{sourceUrl:ne?.startUrl??O?.targetUrl??"",initialLanguage:O?.testCaseLanguage,onLanguageChange:Se=>f&&y(f,Se),existingCases:se,onImport:lr,onClose:()=>pt(!1)}),Dn&&r.jsx(F2,{sourceUrl:ne?.startUrl??O?.targetUrl??"",existingCases:se,onImport:lr,onClose:()=>Hn(!1)}),Ut&&r.jsx(t_,{projects:h,onClose:()=>ze(!1),onScout:Se=>sn(()=>{g(Se,"scout"),c(),et({}),zt({}),Me("overview"),ze(!1)}),onEmpty:Se=>sn(()=>{g(Se,"empty"),c(),et({}),zt({}),Me("testcases"),ze(!1)}),onOpenProject:Se=>sn(()=>{p(Se),c(),et({}),zt({}),Me("overview"),ze(!1)})}),n==="loading"&&r.jsx("div",{className:"scout-lock",role:"status","aria-live":"polite",children:r.jsxs("div",{className:"scout-lock-card",children:[r.jsxs("div",{className:"scout-progress-head",children:[r.jsx("div",{className:"scout-progress-icon",children:"✦"}),r.jsxs("div",{children:[r.jsx("b",{children:"Scouting website with Playwright"}),r.jsx("span",{children:"Collecting pages, controls and event logs."})]})]}),r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"scout-progress-track",children:r.jsx("i",{})}),r.jsx("strong",{className:"scout-progress-percent",children:"Working…"}),r.jsxs("code",{className:"scout-cli-line",children:["$ ",Fg[L],"…"]})]}),r.jsx("span",{children:"Please wait until Scout finishes."})]})}),Ge&&r.jsx("div",{className:"navigation-loader",children:r.jsxs("div",{children:[r.jsx("span",{children:"LS"}),r.jsx("b",{children:"Opening workspace"}),r.jsx("small",{children:"Preparing your local QA tools…"})]})})]})]})}function A_(n){const l=new URL(n);return{startUrl:n,origin:l.origin,pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}dx.createRoot(document.getElementById("root")).render(r.jsx(F.StrictMode,{children:r.jsx(hx,{children:r.jsx(C_,{})})}));