const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-Bucv2d7q.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
var R1=Object.defineProperty;var j1=(n,e,i)=>e in n?R1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Te=(n,e,i)=>j1(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function L1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},Ma={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var yy;function D1(){if(yy)return Ma;yy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:n,type:s,key:u,ref:l!==void 0?l:null,props:o}}return Ma.Fragment=e,Ma.jsx=i,Ma.jsxs=i,Ma}var by;function B1(){return by||(by=1,Yf.exports=D1()),Yf.exports}var b=B1(),Xf={exports:{}},de={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vy;function U1(){if(vy)return de;vy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=y&&N[y]||N["@@iterator"],typeof N=="function"?N:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function T(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||S}T.prototype.isReactComponent={},T.prototype.setState=function(N,P){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,P,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=T.prototype;function k(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||S}var $=k.prototype=new C;$.constructor=k,E($,T.prototype),$.isPureReactComponent=!0;var V=Array.isArray,R={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function Z(N,P,W,J,ae,be){return W=be.ref,{$$typeof:n,type:N,key:P,ref:W!==void 0?W:null,props:be}}function q(N,P){return Z(N.type,P,void 0,void 0,void 0,N.props)}function j(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ie(N){var P={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return P[W]})}var le=/\/+/g;function I(N,P){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):P.toString(36)}function F(){}function ee(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(P){N.status==="pending"&&(N.status="fulfilled",N.value=P)},function(P){N.status==="pending"&&(N.status="rejected",N.reason=P)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function ve(N,P,W,J,ae){var be=typeof N;(be==="undefined"||be==="boolean")&&(N=null);var te=!1;if(N===null)te=!0;else switch(be){case"bigint":case"string":case"number":te=!0;break;case"object":switch(N.$$typeof){case n:case e:te=!0;break;case m:return te=N._init,ve(te(N._payload),P,W,J,ae)}}if(te)return ae=ae(N),te=J===""?"."+I(N,0):J,V(ae)?(W="",te!=null&&(W=te.replace(le,"$&/")+"/"),ve(ae,P,W,"",function(Gt){return Gt})):ae!=null&&(j(ae)&&(ae=q(ae,W+(ae.key==null||N&&N.key===ae.key?"":(""+ae.key).replace(le,"$&/")+"/")+te)),P.push(ae)),1;te=0;var yt=J===""?".":J+":";if(V(N))for(var Ne=0;Ne<N.length;Ne++)J=N[Ne],be=yt+I(J,Ne),te+=ve(J,P,W,be,ae);else if(Ne=v(N),typeof Ne=="function")for(N=Ne.call(N),Ne=0;!(J=N.next()).done;)J=J.value,be=yt+I(J,Ne++),te+=ve(J,P,W,be,ae);else if(be==="object"){if(typeof N.then=="function")return ve(ee(N),P,W,J,ae);throw P=String(N),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return te}function z(N,P,W){if(N==null)return N;var J=[],ae=0;return ve(N,J,"","",function(be){return P.call(W,be,ae++)}),J}function Q(N){if(N._status===-1){var P=N._result;P=P(),P.then(function(W){(N._status===0||N._status===-1)&&(N._status=1,N._result=W)},function(W){(N._status===0||N._status===-1)&&(N._status=2,N._result=W)}),N._status===-1&&(N._status=0,N._result=P)}if(N._status===1)return N._result.default;throw N._result}var se=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function we(){}return de.Children={map:z,forEach:function(N,P,W){z(N,function(){P.apply(this,arguments)},W)},count:function(N){var P=0;return z(N,function(){P++}),P},toArray:function(N){return z(N,function(P){return P})||[]},only:function(N){if(!j(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},de.Component=T,de.Fragment=i,de.Profiler=l,de.PureComponent=k,de.StrictMode=s,de.Suspense=d,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,de.__COMPILER_RUNTIME={__proto__:null,c:function(N){return R.H.useMemoCache(N)}},de.cache=function(N){return function(){return N.apply(null,arguments)}},de.cloneElement=function(N,P,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var J=E({},N.props),ae=N.key,be=void 0;if(P!=null)for(te in P.ref!==void 0&&(be=void 0),P.key!==void 0&&(ae=""+P.key),P)!G.call(P,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&P.ref===void 0||(J[te]=P[te]);var te=arguments.length-2;if(te===1)J.children=W;else if(1<te){for(var yt=Array(te),Ne=0;Ne<te;Ne++)yt[Ne]=arguments[Ne+2];J.children=yt}return Z(N.type,ae,void 0,void 0,be,J)},de.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:o,_context:N},N},de.createElement=function(N,P,W){var J,ae={},be=null;if(P!=null)for(J in P.key!==void 0&&(be=""+P.key),P)G.call(P,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ae[J]=P[J]);var te=arguments.length-2;if(te===1)ae.children=W;else if(1<te){for(var yt=Array(te),Ne=0;Ne<te;Ne++)yt[Ne]=arguments[Ne+2];ae.children=yt}if(N&&N.defaultProps)for(J in te=N.defaultProps,te)ae[J]===void 0&&(ae[J]=te[J]);return Z(N,be,void 0,void 0,null,ae)},de.createRef=function(){return{current:null}},de.forwardRef=function(N){return{$$typeof:f,render:N}},de.isValidElement=j,de.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Q}},de.memo=function(N,P){return{$$typeof:p,type:N,compare:P===void 0?null:P}},de.startTransition=function(N){var P=R.T,W={};R.T=W;try{var J=N(),ae=R.S;ae!==null&&ae(W,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(we,se)}catch(be){se(be)}finally{R.T=P}},de.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},de.use=function(N){return R.H.use(N)},de.useActionState=function(N,P,W){return R.H.useActionState(N,P,W)},de.useCallback=function(N,P){return R.H.useCallback(N,P)},de.useContext=function(N){return R.H.useContext(N)},de.useDebugValue=function(){},de.useDeferredValue=function(N,P){return R.H.useDeferredValue(N,P)},de.useEffect=function(N,P,W){var J=R.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return J.useEffect(N,P)},de.useId=function(){return R.H.useId()},de.useImperativeHandle=function(N,P,W){return R.H.useImperativeHandle(N,P,W)},de.useInsertionEffect=function(N,P){return R.H.useInsertionEffect(N,P)},de.useLayoutEffect=function(N,P){return R.H.useLayoutEffect(N,P)},de.useMemo=function(N,P){return R.H.useMemo(N,P)},de.useOptimistic=function(N,P){return R.H.useOptimistic(N,P)},de.useReducer=function(N,P,W){return R.H.useReducer(N,P,W)},de.useRef=function(N){return R.H.useRef(N)},de.useState=function(N){return R.H.useState(N)},de.useSyncExternalStore=function(N,P,W){return R.H.useSyncExternalStore(N,P,W)},de.useTransition=function(){return R.H.useTransition()},de.version="19.1.1",de}var Sy;function Bh(){return Sy||(Sy=1,Xf.exports=U1()),Xf.exports}var H=Bh();const gt=L1(H);function Po(n,e,i,s){const[l,o]=gt.useState(i);return gt.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),l}function cs(){const n=gt.useRef(null),[e]=mh(n);return[e,n]}function mh(n){const[e,i]=gt.useState(new DOMRect(0,0,10,10)),s=gt.useCallback(()=>{const l=n==null?void 0:n.current;l&&i(l.getBoundingClientRect())},[n]);return gt.useLayoutEffect(()=>{const l=n==null?void 0:n.current;if(!l)return;s();const o=new ResizeObserver(s);return o.observe(l),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,n]),[e,s]}function _t(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0)+"ms";const e=n/1e3;if(e<60)return e.toFixed(1)+"s";const i=e/60;if(i<60)return i.toFixed(1)+"m";const s=i/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function z1(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0);const e=n/1024;if(e<1e3)return e.toFixed(1)+"K";const i=e/1024;return i<1e3?i.toFixed(1)+"M":(i/1024).toFixed(1)+"G"}function Ab(n,e,i,s,l){let o=0,u=n.length;for(;o<u;){const f=o+u>>1;i(e,n[f])>=0?o=f+1:u=f}return u}function wy(n){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function rn(n,e){n&&(e=es.getObject(n,e));const[i,s]=gt.useState(e),l=gt.useCallback(o=>{n?es.setObject(n,o):s(o)},[n,s]);return gt.useEffect(()=>{if(n){const o=()=>s(es.getObject(n,e));return es.onChangeEmitter.addEventListener(n,o),()=>es.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,l]}const yh=new Map,Nb=new Map;let Fo;function xi(n,e){const[i,s]=gt.useState();Nb.set(n,{setter:s,defaultValue:e});const l=gt.useCallback(o=>{const u=yh.get(Fo||"default")||{};u[n]=o,yh.set(Fo||"default",u),s(o)},[n]);return[i,l]}function H1(n){if(Fo===n)return;Fo=n;const e=yh.get(n)||{};for(const[i,s]of Nb.entries())s.setter(e[i]||s.defaultValue)}class q1{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var s;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var s;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const es=new q1;function Ye(...n){return n.filter(Boolean).join(" ")}function Cb(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const xy="\\u0000-\\u0020\\u007f-\\u009f",kb=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+xy+'"]{2,}[^\\s'+xy+`"')}\\],:;.!?]`,"ug");function $1(){const[n,e]=gt.useState(!1),i=gt.useCallback(()=>{const s=[];return e(l=>(s.push(setTimeout(()=>e(!1),1e3)),l?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,i]}function t2(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",s=>{s.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",s=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";es.getString("theme",e)==="dark-mode"?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.add("light-mode")}const Uh=new Set;function I1(){const n=bh(),e=n==="dark-mode"?"light-mode":"dark-mode";document.documentElement.classList.remove(n),document.documentElement.classList.add(e),es.setString("theme",e);for(const i of Uh)i(e)}function n2(n){Uh.add(n)}function i2(n){Uh.delete(n)}function bh(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":"light-mode"}function V1(){const[n,e]=gt.useState(bh()==="dark-mode");return[n,i=>{bh()==="dark-mode"!==i&&I1(),e(i)}]}var Pf={exports:{}},Oa={},Ff={exports:{}},Qf={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var _y;function G1(){return _y||(_y=1,(function(n){function e(z,Q){var se=z.length;z.push(Q);e:for(;0<se;){var we=se-1>>>1,N=z[we];if(0<l(N,Q))z[we]=Q,z[se]=N,se=we;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var Q=z[0],se=z.pop();if(se!==Q){z[0]=se;e:for(var we=0,N=z.length,P=N>>>1;we<P;){var W=2*(we+1)-1,J=z[W],ae=W+1,be=z[ae];if(0>l(J,se))ae<N&&0>l(be,J)?(z[we]=be,z[ae]=se,we=ae):(z[we]=J,z[W]=se,we=W);else if(ae<N&&0>l(be,se))z[we]=be,z[ae]=se,we=ae;else break e}}return Q}function l(z,Q){var se=z.sortIndex-Q.sortIndex;return se!==0?se:z.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,v=3,S=!1,E=!1,x=!1,T=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function V(z){for(var Q=i(p);Q!==null;){if(Q.callback===null)s(p);else if(Q.startTime<=z)s(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=i(p)}}function R(z){if(x=!1,V(z),!E)if(i(d)!==null)E=!0,G||(G=!0,I());else{var Q=i(p);Q!==null&&ve(R,Q.startTime-z)}}var G=!1,Z=-1,q=5,j=-1;function ie(){return T?!0:!(n.unstable_now()-j<q)}function le(){if(T=!1,G){var z=n.unstable_now();j=z;var Q=!0;try{e:{E=!1,x&&(x=!1,k(Z),Z=-1),S=!0;var se=v;try{t:{for(V(z),y=i(d);y!==null&&!(y.expirationTime>z&&ie());){var we=y.callback;if(typeof we=="function"){y.callback=null,v=y.priorityLevel;var N=we(y.expirationTime<=z);if(z=n.unstable_now(),typeof N=="function"){y.callback=N,V(z),Q=!0;break t}y===i(d)&&s(d),V(z)}else s(d);y=i(d)}if(y!==null)Q=!0;else{var P=i(p);P!==null&&ve(R,P.startTime-z),Q=!1}}break e}finally{y=null,v=se,S=!1}Q=void 0}}finally{Q?I():G=!1}}}var I;if(typeof $=="function")I=function(){$(le)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ee=F.port2;F.port1.onmessage=le,I=function(){ee.postMessage(null)}}else I=function(){C(le,0)};function ve(z,Q){Z=C(function(){z(n.unstable_now())},Q)}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(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(z){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var se=v;v=Q;try{return z()}finally{v=se}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(z,Q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var se=v;v=z;try{return Q()}finally{v=se}},n.unstable_scheduleCallback=function(z,Q,se){var we=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?we+se:we):se=we,z){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=se+N,z={id:m++,callback:Q,priorityLevel:z,startTime:se,expirationTime:N,sortIndex:-1},se>we?(z.sortIndex=se,e(p,z),i(d)===null&&z===i(p)&&(x?(k(Z),Z=-1):x=!0,ve(R,se-we))):(z.sortIndex=N,e(d,z),E||S||(E=!0,G||(G=!0,I()))),z},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(z){var Q=v;return function(){var se=v;v=Q;try{return z.apply(this,arguments)}finally{v=se}}}})(Qf)),Qf}var Ty;function K1(){return Ty||(Ty=1,Ff.exports=G1()),Ff.exports}var Zf={exports:{}},dt={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ey;function Y1(){if(Ey)return dt;Ey=1;var n=Bh();function e(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(d,p,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:d,containerInfo:p,implementation:m}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,dt.createPortal=function(d,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return o(d,p,null,m)},dt.flushSync=function(d){var p=u.T,m=s.p;try{if(u.T=null,s.p=2,d)return d()}finally{u.T=p,s.p=m,s.d.f()}},dt.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(d,p))},dt.prefetchDNS=function(d){typeof d=="string"&&s.d.D(d)},dt.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?s.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:S}):m==="script"&&s.d.X(d,{crossOrigin:y,integrity:v,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},dt.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);s.d.M(d,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(d)},dt.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin);s.d.L(d,m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},dt.preloadModule=function(d,p){if(typeof d=="string")if(p){var m=f(p.as,p.crossOrigin);s.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(d)},dt.requestFormReset=function(d){s.d.r(d)},dt.unstable_batchedUpdates=function(d,p){return d(p)},dt.useFormState=function(d,p,m){return u.H.useFormState(d,p,m)},dt.useFormStatus=function(){return u.H.useHostTransitionStatus()},dt.version="19.1.1",dt}var Ay;function X1(){if(Ay)return Zf.exports;Ay=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(e){console.error(e)}}return n(),Zf.exports=Y1(),Zf.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ny;function P1(){if(Ny)return Oa;Ny=1;var n=K1(),e=Bh(),i=X1();function s(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function u(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(s(188))}function d(t){var r=t.alternate;if(!r){if(r=o(t),r===null)throw Error(s(188));return r!==t?null:t}for(var a=t,c=r;;){var h=a.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===a)return f(h),t;if(g===c)return f(h),r;g=g.sibling}throw Error(s(188))}if(a.return!==c.return)a=h,c=g;else{for(var w=!1,_=h.child;_;){if(_===a){w=!0,a=h,c=g;break}if(_===c){w=!0,c=h,a=g;break}_=_.sibling}if(!w){for(_=g.child;_;){if(_===a){w=!0,a=g,c=h;break}if(_===c){w=!0,c=g,a=h;break}_=_.sibling}if(!w)throw Error(s(189))}}if(a.alternate!==c)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?t:r}function p(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=p(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),$=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function I(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var F=Symbol.for("react.client.reference");function ee(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===F?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case E:return"Fragment";case T:return"Profiler";case x:return"StrictMode";case R:return"Suspense";case G:return"SuspenseList";case j:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case $:return(t.displayName||"Context")+".Provider";case k:return(t._context.displayName||"Context")+".Consumer";case V:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return r=t.displayName||null,r!==null?r:ee(t.type)||"Memo";case q:r=t._payload,t=t._init;try{return ee(t(r))}catch{}}return null}var ve=Array.isArray,z=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},we=[],N=-1;function P(t){return{current:t}}function W(t){0>N||(t.current=we[N],we[N]=null,N--)}function J(t,r){N++,we[N]=t.current,t.current=r}var ae=P(null),be=P(null),te=P(null),yt=P(null);function Ne(t,r){switch(J(te,r),J(be,t),J(ae,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Km(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Km(r),t=Ym(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(ae),J(ae,t)}function Gt(){W(ae),W(be),W(te)}function jr(t){t.memoizedState!==null&&J(yt,t);var r=ae.current,a=Ym(r,t.type);r!==a&&(J(be,t),J(ae,a))}function En(t){be.current===t&&(W(ae),W(be)),yt.current===t&&(W(yt),Ea._currentValue=se)}var cn=Object.prototype.hasOwnProperty,ds=n.unstable_scheduleCallback,bt=n.unstable_cancelCallback,fl=n.unstable_shouldYield,Mc=n.unstable_requestPaint,Kt=n.unstable_now,Lr=n.unstable_getCurrentPriorityLevel,ps=n.unstable_ImmediatePriority,Mi=n.unstable_UserBlockingPriority,gs=n.unstable_NormalPriority,Qn=n.unstable_LowPriority,hl=n.unstable_IdlePriority,Oc=n.log,Rc=n.unstable_setDisableYieldValue,Oi=null,ut=null;function Yt(t){if(typeof Oc=="function"&&Rc(t),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Oi,t)}catch{}}var vt=Math.clz32?Math.clz32:Ri,jc=Math.log,Lc=Math.LN2;function Ri(t){return t>>>=0,t===0?32:31-(jc(t)/Lc|0)|0}var Zn=256,An=4194304;function Nn(t){var r=t&42;if(r!==0)return r;switch(t&-t){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:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ms(t,r,a){var c=t.pendingLanes;if(c===0)return 0;var h=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var _=c&134217727;return _!==0?(c=_&~g,c!==0?h=Nn(c):(w&=_,w!==0?h=Nn(w):a||(a=_&~t,a!==0&&(h=Nn(a))))):(_=c&~g,_!==0?h=Nn(_):w!==0?h=Nn(w):a||(a=c&~t,a!==0&&(h=Nn(a)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,a=r&-r,g>=a||g===32&&(a&4194048)!==0)?r:h}function ji(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function dl(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 ce(){var t=Zn;return Zn<<=1,(Zn&4194048)===0&&(Zn=256),t}function Jn(){var t=An;return An<<=1,(An&62914560)===0&&(An=4194304),t}function un(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Dr(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function SS(t,r,a,c,h,g){var w=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(a=w&~a;0<a;){var K=31-vt(a),X=1<<K;_[K]=0,A[K]=-1;var B=D[K];if(B!==null)for(D[K]=null,K=0;K<B.length;K++){var U=B[K];U!==null&&(U.lane&=-536870913)}a&=~X}c!==0&&Md(t,c,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~r))}function Md(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-vt(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|a&4194090}function Od(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var c=31-vt(a),h=1<<c;h&r|t[c]&r&&(t[c]|=r),a&=~h}}function Dc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Bc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Rd(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:fy(t.type))}function wS(t,r){var a=Q.p;try{return Q.p=t,r()}finally{Q.p=a}}var Wn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Wn,Et="__reactProps$"+Wn,ys="__reactContainer$"+Wn,Uc="__reactEvents$"+Wn,xS="__reactListeners$"+Wn,_S="__reactHandles$"+Wn,jd="__reactResources$"+Wn,Br="__reactMarker$"+Wn;function zc(t){delete t[ft],delete t[Et],delete t[Uc],delete t[xS],delete t[_S]}function bs(t){var r=t[ft];if(r)return r;for(var a=t.parentNode;a;){if(r=a[ys]||a[ft]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=Qm(t);t!==null;){if(a=t[ft])return a;t=Qm(t)}return r}t=a,a=t.parentNode}return null}function vs(t){if(t=t[ft]||t[ys]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function Ur(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(s(33))}function Ss(t){var r=t[jd];return r||(r=t[jd]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function et(t){t[Br]=!0}var Ld=new Set,Dd={};function Li(t,r){ws(t,r),ws(t+"Capture",r)}function ws(t,r){for(Dd[t]=r,t=0;t<r.length;t++)Ld.add(r[t])}var TS=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]*$"),Bd={},Ud={};function ES(t){return cn.call(Ud,t)?!0:cn.call(Bd,t)?!1:TS.test(t)?Ud[t]=!0:(Bd[t]=!0,!1)}function pl(t,r,a){if(ES(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function gl(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Cn(t,r,a,c){if(c===null)t.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+c)}}var Hc,zd;function xs(t){if(Hc===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Hc=r&&r[1]||"",zd=-1<a.stack.indexOf(`
    at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Hc+t+zd}var qc=!1;function $c(t,r){if(!t||qc)return"";qc=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(U){var B=U}Reflect.construct(t,[],X)}else{try{X.call()}catch(U){B=U}t.call(X.prototype)}}else{try{throw Error()}catch(U){B=U}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(U){if(U&&B&&typeof U.stack=="string")return[U.stack,B.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),w=g[0],_=g[1];if(w&&_){var A=w.split(`
`),D=_.split(`
`);for(h=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;h<D.length&&!D[h].includes("DetermineComponentFrameRoot");)h++;if(c===A.length||h===D.length)for(c=A.length-1,h=D.length-1;1<=c&&0<=h&&A[c]!==D[h];)h--;for(;1<=c&&0<=h;c--,h--)if(A[c]!==D[h]){if(c!==1||h!==1)do if(c--,h--,0>h||A[c]!==D[h]){var K=`
`+A[c].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),K}while(1<=c&&0<=h);break}}}finally{qc=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?xs(a):""}function AS(t){switch(t.tag){case 26:case 27:case 5:return xs(t.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 15:return $c(t.type,!1);case 11:return $c(t.type.render,!1);case 1:return $c(t.type,!0);case 31:return xs("Activity");default:return""}}function Hd(t){try{var r="";do r+=AS(t),t=t.return;while(t);return r}catch(a){return`
Error generating stack: `+a.message+`
`+a.stack}}function Xt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function qd(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function NS(t){var r=qd(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function ml(t){t._valueTracker||(t._valueTracker=NS(t))}function $d(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return t&&(c=qd(t)?t.checked?"true":"false":t.value),t=c,t!==a?(r.setValue(t),!0):!1}function yl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var CS=/[\n"\\]/g;function Pt(t){return t.replace(CS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ic(t,r,a,c,h,g,w,_){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),r!=null?w==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Xt(r)):t.value!==""+Xt(r)&&(t.value=""+Xt(r)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),r!=null?Vc(t,w,Xt(r)):a!=null?Vc(t,w,Xt(a)):c!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Xt(_):t.removeAttribute("name")}function Id(t,r,a,c,h,g,w,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;a=a!=null?""+Xt(a):"",r=r!=null?""+Xt(r):a,_||r===t.value||(t.value=r),t.defaultValue=r}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=_?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w)}function Vc(t,r,a){r==="number"&&yl(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function _s(t,r,a,c){if(t=t.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=r.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&c&&(t[a].defaultSelected=!0)}else{for(a=""+Xt(a),r=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Vd(t,r,a){if(r!=null&&(r=""+Xt(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+Xt(a):""}function Gd(t,r,a,c){if(r==null){if(c!=null){if(a!=null)throw Error(s(92));if(ve(c)){if(1<c.length)throw Error(s(93));c=c[0]}a=c}a==null&&(a=""),r=a}a=Xt(r),t.defaultValue=a,c=t.textContent,c===a&&c!==""&&c!==null&&(t.value=c)}function Ts(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var kS=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 Kd(t,r,a){var c=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,a):typeof a!="number"||a===0||kS.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function Yd(t,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(t=t.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in r)c=r[h],r.hasOwnProperty(h)&&a[h]!==c&&Kd(t,h,c)}else for(var g in r)r.hasOwnProperty(g)&&Kd(t,g,r[g])}function Gc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 MS=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"]]),OS=/^[\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 bl(t){return OS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Kc=null;function Yc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Es=null,As=null;function Xd(t){var r=vs(t);if(r&&(t=r.stateNode)){var a=t[Et]||null;e:switch(t=r.stateNode,r.type){case"input":if(Ic(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Pt(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==t&&c.form===t.form){var h=c[Et]||null;if(!h)throw Error(s(90));Ic(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<a.length;r++)c=a[r],c.form===t.form&&$d(c)}break e;case"textarea":Vd(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&_s(t,!!a.multiple,r,!1)}}}var Xc=!1;function Pd(t,r,a){if(Xc)return t(r,a);Xc=!0;try{var c=t(r);return c}finally{if(Xc=!1,(Es!==null||As!==null)&&(io(),Es&&(r=Es,t=As,As=Es=null,Xd(r),t)))for(r=0;r<t.length;r++)Xd(t[r])}}function zr(t,r){var a=t.stateNode;if(a===null)return null;var c=a[Et]||null;if(c===null)return null;a=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pc=!1;if(kn)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){Pc=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{Pc=!1}var ei=null,Fc=null,vl=null;function Fd(){if(vl)return vl;var t,r=Fc,a=r.length,c,h="value"in ei?ei.value:ei.textContent,g=h.length;for(t=0;t<a&&r[t]===h[t];t++);var w=a-t;for(c=1;c<=w&&r[a-c]===h[g-c];c++);return vl=h.slice(t,1<c?1-c:void 0)}function Sl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function wl(){return!0}function Qd(){return!1}function At(t){function r(a,c,h,g,w){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?wl:Qd,this.isPropagationStopped=Qd,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),r}var Di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=At(Di),qr=m({},Di,{view:0,detail:0}),RS=At(qr),Qc,Zc,$r,_l=m({},qr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==$r&&($r&&t.type==="mousemove"?(Qc=t.screenX-$r.screenX,Zc=t.screenY-$r.screenY):Zc=Qc=0,$r=t),Qc)},movementY:function(t){return"movementY"in t?t.movementY:Zc}}),Zd=At(_l),jS=m({},_l,{dataTransfer:0}),LS=At(jS),DS=m({},qr,{relatedTarget:0}),Jc=At(DS),BS=m({},Di,{animationName:0,elapsedTime:0,pseudoElement:0}),US=At(BS),zS=m({},Di,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),HS=At(zS),qS=m({},Di,{data:0}),Jd=At(qS),$S={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IS={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"},VS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=VS[t])?!!r[t]:!1}function Wc(){return GS}var KS=m({},qr,{key:function(t){if(t.key){var r=$S[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Sl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?IS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?Sl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Sl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),YS=At(KS),XS=m({},_l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wd=At(XS),PS=m({},qr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),FS=At(PS),QS=m({},Di,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZS=At(QS),JS=m({},_l,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),WS=At(JS),ew=m({},Di,{newState:0,oldState:0}),tw=At(ew),nw=[9,13,27,32],eu=kn&&"CompositionEvent"in window,Ir=null;kn&&"documentMode"in document&&(Ir=document.documentMode);var iw=kn&&"TextEvent"in window&&!Ir,ep=kn&&(!eu||Ir&&8<Ir&&11>=Ir),tp=" ",np=!1;function ip(t,r){switch(t){case"keyup":return nw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ns=!1;function sw(t,r){switch(t){case"compositionend":return sp(r);case"keypress":return r.which!==32?null:(np=!0,tp);case"textInput":return t=r.data,t===tp&&np?null:t;default:return null}}function rw(t,r){if(Ns)return t==="compositionend"||!eu&&ip(t,r)?(t=Fd(),vl=Fc=ei=null,Ns=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ep&&r.locale!=="ko"?null:r.data;default:return null}}var aw={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 rp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!aw[t.type]:r==="textarea"}function ap(t,r,a,c){Es?As?As.push(c):As=[c]:Es=c,r=co(r,"onChange"),0<r.length&&(a=new xl("onChange","change",null,a,c),t.push({event:a,listeners:r}))}var Vr=null,Gr=null;function lw(t){qm(t,0)}function Tl(t){var r=Ur(t);if($d(r))return t}function lp(t,r){if(t==="change")return r}var op=!1;if(kn){var tu;if(kn){var nu="oninput"in document;if(!nu){var cp=document.createElement("div");cp.setAttribute("oninput","return;"),nu=typeof cp.oninput=="function"}tu=nu}else tu=!1;op=tu&&(!document.documentMode||9<document.documentMode)}function up(){Vr&&(Vr.detachEvent("onpropertychange",fp),Gr=Vr=null)}function fp(t){if(t.propertyName==="value"&&Tl(Gr)){var r=[];ap(r,Gr,t,Yc(t)),Pd(lw,r)}}function ow(t,r,a){t==="focusin"?(up(),Vr=r,Gr=a,Vr.attachEvent("onpropertychange",fp)):t==="focusout"&&up()}function cw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Tl(Gr)}function uw(t,r){if(t==="click")return Tl(r)}function fw(t,r){if(t==="input"||t==="change")return Tl(r)}function hw(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Bt=typeof Object.is=="function"?Object.is:hw;function Kr(t,r){if(Bt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!cn.call(r,h)||!Bt(t[h],r[h]))return!1}return!0}function hp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function dp(t,r){var a=hp(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=r&&c>=r)return{node:a,offset:r-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=hp(a)}}function pp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?pp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function gp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=yl(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=yl(t.document)}return r}function iu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var dw=kn&&"documentMode"in document&&11>=document.documentMode,Cs=null,su=null,Yr=null,ru=!1;function mp(t,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ru||Cs==null||Cs!==yl(c)||(c=Cs,"selectionStart"in c&&iu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Yr&&Kr(Yr,c)||(Yr=c,c=co(su,"onSelect"),0<c.length&&(r=new xl("onSelect","select",null,r,a),t.push({event:r,listeners:c}),r.target=Cs)))}function Bi(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var ks={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},au={},yp={};kn&&(yp=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function Ui(t){if(au[t])return au[t];if(!ks[t])return t;var r=ks[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in yp)return au[t]=r[a];return t}var bp=Ui("animationend"),vp=Ui("animationiteration"),Sp=Ui("animationstart"),pw=Ui("transitionrun"),gw=Ui("transitionstart"),mw=Ui("transitioncancel"),wp=Ui("transitionend"),xp=new Map,lu="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(" ");lu.push("scrollEnd");function fn(t,r){xp.set(t,r),Li(r,[t])}var _p=new WeakMap;function Ft(t,r){if(typeof t=="object"&&t!==null){var a=_p.get(t);return a!==void 0?a:(r={value:t,source:r,stack:Hd(r)},_p.set(t,r),r)}return{value:t,source:r,stack:Hd(r)}}var Qt=[],Ms=0,ou=0;function El(){for(var t=Ms,r=ou=Ms=0;r<t;){var a=Qt[r];Qt[r++]=null;var c=Qt[r];Qt[r++]=null;var h=Qt[r];Qt[r++]=null;var g=Qt[r];if(Qt[r++]=null,c!==null&&h!==null){var w=c.pending;w===null?h.next=h:(h.next=w.next,w.next=h),c.pending=h}g!==0&&Tp(a,h,g)}}function Al(t,r,a,c){Qt[Ms++]=t,Qt[Ms++]=r,Qt[Ms++]=a,Qt[Ms++]=c,ou|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function cu(t,r,a,c){return Al(t,r,a,c),Nl(t)}function Os(t,r){return Al(t,null,null,r),Nl(t)}function Tp(t,r,a){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a);for(var h=!1,g=t.return;g!==null;)g.childLanes|=a,c=g.alternate,c!==null&&(c.childLanes|=a),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&r!==null&&(h=31-vt(a),t=g.hiddenUpdates,c=t[h],c===null?t[h]=[r]:c.push(r),r.lane=a|536870912),g):null}function Nl(t){if(50<ya)throw ya=0,mf=null,Error(s(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Rs={};function yw(t,r,a,c){this.tag=t,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=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(t,r,a,c){return new yw(t,r,a,c)}function uu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Mn(t,r){var a=t.alternate;return a===null?(a=Ut(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Ep(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Cl(t,r,a,c,h,g){var w=0;if(c=t,typeof t=="function")uu(t)&&(w=1);else if(typeof t=="string")w=v1(t,a,ae.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case j:return t=Ut(31,a,r,h),t.elementType=j,t.lanes=g,t;case E:return zi(a.children,h,g,r);case x:w=8,h|=24;break;case T:return t=Ut(12,a,r,h|2),t.elementType=T,t.lanes=g,t;case R:return t=Ut(13,a,r,h),t.elementType=R,t.lanes=g,t;case G:return t=Ut(19,a,r,h),t.elementType=G,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case C:case $:w=10;break e;case k:w=9;break e;case V:w=11;break e;case Z:w=14;break e;case q:w=16,c=null;break e}w=29,a=Error(s(130,t===null?"null":typeof t,"")),c=null}return r=Ut(w,a,r,h),r.elementType=t,r.type=c,r.lanes=g,r}function zi(t,r,a,c){return t=Ut(7,t,c,r),t.lanes=a,t}function fu(t,r,a){return t=Ut(6,t,null,r),t.lanes=a,t}function hu(t,r,a){return r=Ut(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var js=[],Ls=0,kl=null,Ml=0,Zt=[],Jt=0,Hi=null,On=1,Rn="";function qi(t,r){js[Ls++]=Ml,js[Ls++]=kl,kl=t,Ml=r}function Ap(t,r,a){Zt[Jt++]=On,Zt[Jt++]=Rn,Zt[Jt++]=Hi,Hi=t;var c=On;t=Rn;var h=32-vt(c)-1;c&=~(1<<h),a+=1;var g=32-vt(r)+h;if(30<g){var w=h-h%5;g=(c&(1<<w)-1).toString(32),c>>=w,h-=w,On=1<<32-vt(r)+h|a<<h|c,Rn=g+t}else On=1<<g|a<<h|c,Rn=t}function du(t){t.return!==null&&(qi(t,1),Ap(t,1,0))}function pu(t){for(;t===kl;)kl=js[--Ls],js[Ls]=null,Ml=js[--Ls],js[Ls]=null;for(;t===Hi;)Hi=Zt[--Jt],Zt[Jt]=null,Rn=Zt[--Jt],Zt[Jt]=null,On=Zt[--Jt],Zt[Jt]=null}var St=null,$e=null,_e=!1,$i=null,yn=!1,gu=Error(s(519));function Ii(t){var r=Error(s(418,""));throw Fr(Ft(r,t)),gu}function Np(t){var r=t.stateNode,a=t.type,c=t.memoizedProps;switch(r[ft]=t,r[Et]=c,a){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(a=0;a<va.length;a++)ye(va[a],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ye("invalid",r),Id(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),ml(r);break;case"select":ye("invalid",r);break;case"textarea":ye("invalid",r),Gd(r,c.value,c.defaultValue,c.children),ml(r)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||c.suppressHydrationWarning===!0||Gm(r.textContent,a)?(c.popover!=null&&(ye("beforetoggle",r),ye("toggle",r)),c.onScroll!=null&&ye("scroll",r),c.onScrollEnd!=null&&ye("scrollend",r),c.onClick!=null&&(r.onclick=uo),r=!0):r=!1,r||Ii(t)}function Cp(t){for(St=t.return;St;)switch(St.tag){case 5:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:St=St.return}}function Xr(t){if(t!==St)return!1;if(!_e)return Cp(t),_e=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Rf(t.type,t.memoizedProps)),a=!a),a&&$e&&Ii(t),Cp(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(a=t.data,a==="/$"){if(r===0){$e=dn(t.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++;t=t.nextSibling}$e=null}}else r===27?(r=$e,mi(t.type)?(t=Bf,Bf=null,$e=t):$e=r):$e=St?dn(t.stateNode.nextSibling):null;return!0}function Pr(){$e=St=null,_e=!1}function kp(){var t=$i;return t!==null&&(kt===null?kt=t:kt.push.apply(kt,t),$i=null),t}function Fr(t){$i===null?$i=[t]:$i.push(t)}var mu=P(null),Vi=null,jn=null;function ti(t,r,a){J(mu,r._currentValue),r._currentValue=a}function Ln(t){t._currentValue=mu.current,W(mu)}function yu(t,r,a){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===a)break;t=t.return}}function bu(t,r,a,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var w=h.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=h;for(var A=0;A<r.length;A++)if(_.context===r[A]){g.lanes|=a,_=g.alternate,_!==null&&(_.lanes|=a),yu(g.return,a,t),c||(w=null);break e}g=_.next}}else if(h.tag===18){if(w=h.return,w===null)throw Error(s(341));w.lanes|=a,g=w.alternate,g!==null&&(g.lanes|=a),yu(w,a,t),w=null}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===t){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}}function Qr(t,r,a,c){t=null;for(var h=r,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var w=h.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var _=h.type;Bt(h.pendingProps.value,w.value)||(t!==null?t.push(_):t=[_])}}else if(h===yt.current){if(w=h.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Ea):t=[Ea])}h=h.return}t!==null&&bu(r,t,a,c),r.flags|=262144}function Ol(t){for(t=t.firstContext;t!==null;){if(!Bt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Gi(t){Vi=t,jn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ht(t){return Mp(Vi,t)}function Rl(t,r){return Vi===null&&Gi(t),Mp(t,r)}function Mp(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},jn===null){if(t===null)throw Error(s(308));jn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else jn=jn.next=r;return a}var bw=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},vw=n.unstable_scheduleCallback,Sw=n.unstable_NormalPriority,Ze={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vu(){return{controller:new bw,data:new Map,refCount:0}}function Zr(t){t.refCount--,t.refCount===0&&vw(Sw,function(){t.controller.abort()})}var Jr=null,Su=0,Ds=0,Bs=null;function ww(t,r){if(Jr===null){var a=Jr=[];Su=0,Ds=_f(),Bs={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Su++,r.then(Op,Op),r}function Op(){if(--Su===0&&Jr!==null){Bs!==null&&(Bs.status="fulfilled");var t=Jr;Jr=null,Ds=0,Bs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function xw(t,r){var a=[],c={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var h=0;h<a.length;h++)(0,a[h])(r)},function(h){for(c.status="rejected",c.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),c}var Rp=z.S;z.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&ww(t,r),Rp!==null&&Rp(t,r)};var Ki=P(null);function wu(){var t=Ki.current;return t!==null?t:je.pooledCache}function jl(t,r){r===null?J(Ki,Ki.current):J(Ki,r.pool)}function jp(){var t=wu();return t===null?null:{parent:Ze._currentValue,pool:t}}var Wr=Error(s(460)),Lp=Error(s(474)),Ll=Error(s(542)),xu={then:function(){}};function Dp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Dl(){}function Bp(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(Dl,Dl),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,zp(t),t;default:if(typeof r.status=="string")r.then(Dl,Dl);else{if(t=je,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=r,t.status="pending",t.then(function(c){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=c}},function(c){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,zp(t),t}throw ea=r,Wr}}var ea=null;function Up(){if(ea===null)throw Error(s(459));var t=ea;return ea=null,t}function zp(t){if(t===Wr||t===Ll)throw Error(s(483))}var ni=!1;function _u(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ii(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function si(t,r,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ee&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,r=Nl(t),Tp(t,null,a),r}return Al(t,c,r,a),Nl(t)}function ta(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,Od(t,a)}}function Eu(t,r){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var w={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?h=g=w:g=g.next=w,a=a.next}while(a!==null);g===null?h=g=r:g=g.next=r}else h=g=r;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var Au=!1;function na(){if(Au){var t=Bs;if(t!==null)throw t}}function ia(t,r,a,c){Au=!1;var h=t.updateQueue;ni=!1;var g=h.firstBaseUpdate,w=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var A=_,D=A.next;A.next=null,w===null?g=D:w.next=D,w=A;var K=t.alternate;K!==null&&(K=K.updateQueue,_=K.lastBaseUpdate,_!==w&&(_===null?K.firstBaseUpdate=D:_.next=D,K.lastBaseUpdate=A))}if(g!==null){var X=h.baseState;w=0,K=D=A=null,_=g;do{var B=_.lane&-536870913,U=B!==_.lane;if(U?(Se&B)===B:(c&B)===B){B!==0&&B===Ds&&(Au=!0),K!==null&&(K=K.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var fe=t,oe=_;B=r;var Me=a;switch(oe.tag){case 1:if(fe=oe.payload,typeof fe=="function"){X=fe.call(Me,X,B);break e}X=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=oe.payload,B=typeof fe=="function"?fe.call(Me,X,B):fe,B==null)break e;X=m({},X,B);break e;case 2:ni=!0}}B=_.callback,B!==null&&(t.flags|=64,U&&(t.flags|=8192),U=h.callbacks,U===null?h.callbacks=[B]:U.push(B))}else U={lane:B,tag:_.tag,payload:_.payload,callback:_.callback,next:null},K===null?(D=K=U,A=X):K=K.next=U,w|=B;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;U=_,_=U.next,U.next=null,h.lastBaseUpdate=U,h.shared.pending=null}}while(!0);K===null&&(A=X),h.baseState=A,h.firstBaseUpdate=D,h.lastBaseUpdate=K,g===null&&(h.shared.lanes=0),hi|=w,t.lanes=w,t.memoizedState=X}}function Hp(t,r){if(typeof t!="function")throw Error(s(191,t));t.call(r)}function qp(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Hp(a[t],r)}var Us=P(null),Bl=P(0);function $p(t,r){t=$n,J(Bl,t),J(Us,r),$n=t|r.baseLanes}function Nu(){J(Bl,$n),J(Us,Us.current)}function Cu(){$n=Bl.current,W(Us),W(Bl)}var ri=0,pe=null,Ce=null,Pe=null,Ul=!1,zs=!1,Yi=!1,zl=0,sa=0,Hs=null,_w=0;function Ve(){throw Error(s(321))}function ku(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!Bt(t[a],r[a]))return!1;return!0}function Mu(t,r,a,c,h,g){return ri=g,pe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=t===null||t.memoizedState===null?Tg:Eg,Yi=!1,g=a(c,h),Yi=!1,zs&&(g=Vp(r,a,c,h)),Ip(t),g}function Ip(t){z.H=Gl;var r=Ce!==null&&Ce.next!==null;if(ri=0,Pe=Ce=pe=null,Ul=!1,sa=0,Hs=null,r)throw Error(s(300));t===null||tt||(t=t.dependencies,t!==null&&Ol(t)&&(tt=!0))}function Vp(t,r,a,c){pe=t;var h=0;do{if(zs&&(Hs=null),sa=0,zs=!1,25<=h)throw Error(s(301));if(h+=1,Pe=Ce=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}z.H=Mw,g=r(a,c)}while(zs);return g}function Tw(){var t=z.H,r=t.useState()[0];return r=typeof r.then=="function"?ra(r):r,t=t.useState()[0],(Ce!==null?Ce.memoizedState:null)!==t&&(pe.flags|=1024),r}function Ou(){var t=zl!==0;return zl=0,t}function Ru(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function ju(t){if(Ul){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ul=!1}ri=0,Pe=Ce=pe=null,zs=!1,sa=zl=0,Hs=null}function Nt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?pe.memoizedState=Pe=t:Pe=Pe.next=t,Pe}function Fe(){if(Ce===null){var t=pe.alternate;t=t!==null?t.memoizedState:null}else t=Ce.next;var r=Pe===null?pe.memoizedState:Pe.next;if(r!==null)Pe=r,Ce=t;else{if(t===null)throw pe.alternate===null?Error(s(467)):Error(s(310));Ce=t,t={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Pe===null?pe.memoizedState=Pe=t:Pe=Pe.next=t}return Pe}function Lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ra(t){var r=sa;return sa+=1,Hs===null&&(Hs=[]),t=Bp(Hs,t,r),r=pe,(Pe===null?r.memoizedState:Pe.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?Tg:Eg),t}function Hl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ra(t);if(t.$$typeof===$)return ht(t)}throw Error(s(438,String(t)))}function Du(t){var r=null,a=pe.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var c=pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=Lu(),pe.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),c=0;c<t;c++)a[c]=ie;return r.index++,a}function Dn(t,r){return typeof r=="function"?r(t):r}function ql(t){var r=Fe();return Bu(r,Ce,t)}function Bu(t,r,a){var c=t.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=a;var h=t.baseQueue,g=c.pending;if(g!==null){if(h!==null){var w=h.next;h.next=g.next,g.next=w}r.baseQueue=h=g,c.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{r=h.next;var _=w=null,A=null,D=r,K=!1;do{var X=D.lane&-536870913;if(X!==D.lane?(Se&X)===X:(ri&X)===X){var B=D.revertLane;if(B===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),X===Ds&&(K=!0);else if((ri&B)===B){D=D.next,B===Ds&&(K=!0);continue}else X={lane:0,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=X,w=g):A=A.next=X,pe.lanes|=B,hi|=B;X=D.action,Yi&&a(g,X),g=D.hasEagerState?D.eagerState:a(g,X)}else B={lane:X,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=B,w=g):A=A.next=B,pe.lanes|=X,hi|=X;D=D.next}while(D!==null&&D!==r);if(A===null?w=g:A.next=_,!Bt(g,t.memoizedState)&&(tt=!0,K&&(a=Bs,a!==null)))throw a;t.memoizedState=g,t.baseState=w,t.baseQueue=A,c.lastRenderedState=g}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Uu(t){var r=Fe(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=t;var c=a.dispatch,h=a.pending,g=r.memoizedState;if(h!==null){a.pending=null;var w=h=h.next;do g=t(g,w.action),w=w.next;while(w!==h);Bt(g,r.memoizedState)||(tt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,c]}function Gp(t,r,a){var c=pe,h=Fe(),g=_e;if(g){if(a===void 0)throw Error(s(407));a=a()}else a=r();var w=!Bt((Ce||h).memoizedState,a);w&&(h.memoizedState=a,tt=!0),h=h.queue;var _=Xp.bind(null,c,h,t);if(aa(2048,8,_,[t]),h.getSnapshot!==r||w||Pe!==null&&Pe.memoizedState.tag&1){if(c.flags|=2048,qs(9,$l(),Yp.bind(null,c,h,a,r),null),je===null)throw Error(s(349));g||(ri&124)!==0||Kp(c,r,a)}return a}function Kp(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=pe.updateQueue,r===null?(r=Lu(),pe.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function Yp(t,r,a,c){r.value=a,r.getSnapshot=c,Pp(r)&&Fp(t)}function Xp(t,r,a){return a(function(){Pp(r)&&Fp(t)})}function Pp(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!Bt(t,a)}catch{return!0}}function Fp(t){var r=Os(t,2);r!==null&&It(r,t,2)}function zu(t){var r=Nt();if(typeof t=="function"){var a=t;if(t=a(),Yi){Yt(!0);try{a()}finally{Yt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:t},r}function Qp(t,r,a,c){return t.baseState=a,Bu(t,Ce,typeof c=="function"?c:Dn)}function Ew(t,r,a,c,h){if(Vl(t))throw Error(s(485));if(t=r.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};z.T!==null?a(!0):g.isTransition=!1,c(g),a=r.pending,a===null?(g.next=r.pending=g,Zp(r,g)):(g.next=a.next,r.pending=a.next=g)}}function Zp(t,r){var a=r.action,c=r.payload,h=t.state;if(r.isTransition){var g=z.T,w={};z.T=w;try{var _=a(h,c),A=z.S;A!==null&&A(w,_),Jp(t,r,_)}catch(D){Hu(t,r,D)}finally{z.T=g}}else try{g=a(h,c),Jp(t,r,g)}catch(D){Hu(t,r,D)}}function Jp(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){Wp(t,r,c)},function(c){return Hu(t,r,c)}):Wp(t,r,a)}function Wp(t,r,a){r.status="fulfilled",r.value=a,eg(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,Zp(t,a)))}function Hu(t,r,a){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=a,eg(r),r=r.next;while(r!==c)}t.action=null}function eg(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function tg(t,r){return r}function ng(t,r){if(_e){var a=je.formState;if(a!==null){e:{var c=pe;if(_e){if($e){t:{for(var h=$e,g=yn;h.nodeType!==8;){if(!g){h=null;break t}if(h=dn(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){$e=dn(h.nextSibling),c=h.data==="F!";break e}}Ii(c)}c=!1}c&&(r=a[0])}}return a=Nt(),a.memoizedState=a.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tg,lastRenderedState:r},a.queue=c,a=wg.bind(null,pe,c),c.dispatch=a,c=zu(!1),g=Gu.bind(null,pe,!1,c.queue),c=Nt(),h={state:r,dispatch:null,action:t,pending:null},c.queue=h,a=Ew.bind(null,pe,h,g,a),h.dispatch=a,c.memoizedState=t,[r,a,!1]}function ig(t){var r=Fe();return sg(r,Ce,t)}function sg(t,r,a){if(r=Bu(t,r,tg)[0],t=ql(Dn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=ra(r)}catch(w){throw w===Wr?Ll:w}else c=r;r=Fe();var h=r.queue,g=h.dispatch;return a!==r.memoizedState&&(pe.flags|=2048,qs(9,$l(),Aw.bind(null,h,a),null)),[c,g,t]}function Aw(t,r){t.action=r}function rg(t){var r=Fe(),a=Ce;if(a!==null)return sg(r,a,t);Fe(),r=r.memoizedState,a=Fe();var c=a.queue.dispatch;return a.memoizedState=t,[r,c,!1]}function qs(t,r,a,c){return t={tag:t,create:a,deps:c,inst:r,next:null},r=pe.updateQueue,r===null&&(r=Lu(),pe.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,r.lastEffect=t),t}function $l(){return{destroy:void 0,resource:void 0}}function ag(){return Fe().memoizedState}function Il(t,r,a,c){var h=Nt();c=c===void 0?null:c,pe.flags|=t,h.memoizedState=qs(1|r,$l(),a,c)}function aa(t,r,a,c){var h=Fe();c=c===void 0?null:c;var g=h.memoizedState.inst;Ce!==null&&c!==null&&ku(c,Ce.memoizedState.deps)?h.memoizedState=qs(r,g,a,c):(pe.flags|=t,h.memoizedState=qs(1|r,g,a,c))}function lg(t,r){Il(8390656,8,t,r)}function og(t,r){aa(2048,8,t,r)}function cg(t,r){return aa(4,2,t,r)}function ug(t,r){return aa(4,4,t,r)}function fg(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function hg(t,r,a){a=a!=null?a.concat([t]):null,aa(4,4,fg.bind(null,r,t),a)}function qu(){}function dg(t,r){var a=Fe();r=r===void 0?null:r;var c=a.memoizedState;return r!==null&&ku(r,c[1])?c[0]:(a.memoizedState=[t,r],t)}function pg(t,r){var a=Fe();r=r===void 0?null:r;var c=a.memoizedState;if(r!==null&&ku(r,c[1]))return c[0];if(c=t(),Yi){Yt(!0);try{t()}finally{Yt(!1)}}return a.memoizedState=[c,r],c}function $u(t,r,a){return a===void 0||(ri&1073741824)!==0?t.memoizedState=r:(t.memoizedState=a,t=ym(),pe.lanes|=t,hi|=t,a)}function gg(t,r,a,c){return Bt(a,r)?a:Us.current!==null?(t=$u(t,a,c),Bt(t,r)||(tt=!0),t):(ri&42)===0?(tt=!0,t.memoizedState=a):(t=ym(),pe.lanes|=t,hi|=t,r)}function mg(t,r,a,c,h){var g=Q.p;Q.p=g!==0&&8>g?g:8;var w=z.T,_={};z.T=_,Gu(t,!1,r,a);try{var A=h(),D=z.S;if(D!==null&&D(_,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var K=xw(A,c);la(t,r,K,$t(t))}else la(t,r,c,$t(t))}catch(X){la(t,r,{then:function(){},status:"rejected",reason:X},$t())}finally{Q.p=g,z.T=w}}function Nw(){}function Iu(t,r,a,c){if(t.tag!==5)throw Error(s(476));var h=yg(t).queue;mg(t,h,r,se,a===null?Nw:function(){return bg(t),a(c)})}function yg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:se},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function bg(t){var r=yg(t).next.queue;la(t,r,{},$t())}function Vu(){return ht(Ea)}function vg(){return Fe().memoizedState}function Sg(){return Fe().memoizedState}function Cw(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=$t();t=ii(a);var c=si(r,t,a);c!==null&&(It(c,r,a),ta(c,r,a)),r={cache:vu()},t.payload=r;return}r=r.return}}function kw(t,r,a){var c=$t();a={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Vl(t)?xg(r,a):(a=cu(t,r,a,c),a!==null&&(It(a,t,c),_g(a,r,c)))}function wg(t,r,a){var c=$t();la(t,r,a,c)}function la(t,r,a,c){var h={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Vl(t))xg(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,_=g(w,a);if(h.hasEagerState=!0,h.eagerState=_,Bt(_,w))return Al(t,r,h,0),je===null&&El(),!1}catch{}finally{}if(a=cu(t,r,h,c),a!==null)return It(a,t,c),_g(a,r,c),!0}return!1}function Gu(t,r,a,c){if(c={lane:2,revertLane:_f(),action:c,hasEagerState:!1,eagerState:null,next:null},Vl(t)){if(r)throw Error(s(479))}else r=cu(t,a,c,2),r!==null&&It(r,t,2)}function Vl(t){var r=t.alternate;return t===pe||r!==null&&r===pe}function xg(t,r){zs=Ul=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function _g(t,r,a){if((a&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,Od(t,a)}}var Gl={readContext:ht,use:Hl,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve},Tg={readContext:ht,use:Hl,useCallback:function(t,r){return Nt().memoizedState=[t,r===void 0?null:r],t},useContext:ht,useEffect:lg,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,Il(4194308,4,fg.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Il(4194308,4,t,r)},useInsertionEffect:function(t,r){Il(4,2,t,r)},useMemo:function(t,r){var a=Nt();r=r===void 0?null:r;var c=t();if(Yi){Yt(!0);try{t()}finally{Yt(!1)}}return a.memoizedState=[c,r],c},useReducer:function(t,r,a){var c=Nt();if(a!==void 0){var h=a(r);if(Yi){Yt(!0);try{a(r)}finally{Yt(!1)}}}else h=r;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=kw.bind(null,pe,t),[c.memoizedState,t]},useRef:function(t){var r=Nt();return t={current:t},r.memoizedState=t},useState:function(t){t=zu(t);var r=t.queue,a=wg.bind(null,pe,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:qu,useDeferredValue:function(t,r){var a=Nt();return $u(a,t,r)},useTransition:function(){var t=zu(!1);return t=mg.bind(null,pe,t.queue,!0,!1),Nt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var c=pe,h=Nt();if(_e){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),je===null)throw Error(s(349));(Se&124)!==0||Kp(c,r,a)}h.memoizedState=a;var g={value:a,getSnapshot:r};return h.queue=g,lg(Xp.bind(null,c,g,t),[t]),c.flags|=2048,qs(9,$l(),Yp.bind(null,c,g,a,r),null),a},useId:function(){var t=Nt(),r=je.identifierPrefix;if(_e){var a=Rn,c=On;a=(c&~(1<<32-vt(c)-1)).toString(32)+a,r="«"+r+"R"+a,a=zl++,0<a&&(r+="H"+a.toString(32)),r+="»"}else a=_w++,r="«"+r+"r"+a.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:Vu,useFormState:ng,useActionState:ng,useOptimistic:function(t){var r=Nt();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Gu.bind(null,pe,!0,a),a.dispatch=r,[t,r]},useMemoCache:Du,useCacheRefresh:function(){return Nt().memoizedState=Cw.bind(null,pe)}},Eg={readContext:ht,use:Hl,useCallback:dg,useContext:ht,useEffect:og,useImperativeHandle:hg,useInsertionEffect:cg,useLayoutEffect:ug,useMemo:pg,useReducer:ql,useRef:ag,useState:function(){return ql(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var a=Fe();return gg(a,Ce.memoizedState,t,r)},useTransition:function(){var t=ql(Dn)[0],r=Fe().memoizedState;return[typeof t=="boolean"?t:ra(t),r]},useSyncExternalStore:Gp,useId:vg,useHostTransitionStatus:Vu,useFormState:ig,useActionState:ig,useOptimistic:function(t,r){var a=Fe();return Qp(a,Ce,t,r)},useMemoCache:Du,useCacheRefresh:Sg},Mw={readContext:ht,use:Hl,useCallback:dg,useContext:ht,useEffect:og,useImperativeHandle:hg,useInsertionEffect:cg,useLayoutEffect:ug,useMemo:pg,useReducer:Uu,useRef:ag,useState:function(){return Uu(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var a=Fe();return Ce===null?$u(a,t,r):gg(a,Ce.memoizedState,t,r)},useTransition:function(){var t=Uu(Dn)[0],r=Fe().memoizedState;return[typeof t=="boolean"?t:ra(t),r]},useSyncExternalStore:Gp,useId:vg,useHostTransitionStatus:Vu,useFormState:rg,useActionState:rg,useOptimistic:function(t,r){var a=Fe();return Ce!==null?Qp(a,Ce,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Du,useCacheRefresh:Sg},$s=null,oa=0;function Kl(t){var r=oa;return oa+=1,$s===null&&($s=[]),Bp($s,t,r)}function ca(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Yl(t,r){throw r.$$typeof===y?Error(s(525)):(t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Ag(t){var r=t._init;return r(t._payload)}function Ng(t){function r(O,M){if(t){var L=O.deletions;L===null?(O.deletions=[M],O.flags|=16):L.push(M)}}function a(O,M){if(!t)return null;for(;M!==null;)r(O,M),M=M.sibling;return null}function c(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function h(O,M){return O=Mn(O,M),O.index=0,O.sibling=null,O}function g(O,M,L){return O.index=L,t?(L=O.alternate,L!==null?(L=L.index,L<M?(O.flags|=67108866,M):L):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function w(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function _(O,M,L,Y){return M===null||M.tag!==6?(M=fu(L,O.mode,Y),M.return=O,M):(M=h(M,L),M.return=O,M)}function A(O,M,L,Y){var ne=L.type;return ne===E?K(O,M,L.props.children,Y,L.key):M!==null&&(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===q&&Ag(ne)===M.type)?(M=h(M,L.props),ca(M,L),M.return=O,M):(M=Cl(L.type,L.key,L.props,null,O.mode,Y),ca(M,L),M.return=O,M)}function D(O,M,L,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==L.containerInfo||M.stateNode.implementation!==L.implementation?(M=hu(L,O.mode,Y),M.return=O,M):(M=h(M,L.children||[]),M.return=O,M)}function K(O,M,L,Y,ne){return M===null||M.tag!==7?(M=zi(L,O.mode,Y,ne),M.return=O,M):(M=h(M,L),M.return=O,M)}function X(O,M,L){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=fu(""+M,O.mode,L),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return L=Cl(M.type,M.key,M.props,null,O.mode,L),ca(L,M),L.return=O,L;case S:return M=hu(M,O.mode,L),M.return=O,M;case q:var Y=M._init;return M=Y(M._payload),X(O,M,L)}if(ve(M)||I(M))return M=zi(M,O.mode,L,null),M.return=O,M;if(typeof M.then=="function")return X(O,Kl(M),L);if(M.$$typeof===$)return X(O,Rl(O,M),L);Yl(O,M)}return null}function B(O,M,L,Y){var ne=M!==null?M.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ne!==null?null:_(O,M,""+L,Y);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===ne?A(O,M,L,Y):null;case S:return L.key===ne?D(O,M,L,Y):null;case q:return ne=L._init,L=ne(L._payload),B(O,M,L,Y)}if(ve(L)||I(L))return ne!==null?null:K(O,M,L,Y,null);if(typeof L.then=="function")return B(O,M,Kl(L),Y);if(L.$$typeof===$)return B(O,M,Rl(O,L),Y);Yl(O,L)}return null}function U(O,M,L,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(L)||null,_(M,O,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:return O=O.get(Y.key===null?L:Y.key)||null,A(M,O,Y,ne);case S:return O=O.get(Y.key===null?L:Y.key)||null,D(M,O,Y,ne);case q:var ge=Y._init;return Y=ge(Y._payload),U(O,M,L,Y,ne)}if(ve(Y)||I(Y))return O=O.get(L)||null,K(M,O,Y,ne,null);if(typeof Y.then=="function")return U(O,M,L,Kl(Y),ne);if(Y.$$typeof===$)return U(O,M,L,Rl(M,Y),ne);Yl(M,Y)}return null}function fe(O,M,L,Y){for(var ne=null,ge=null,re=M,ue=M=0,it=null;re!==null&&ue<L.length;ue++){re.index>ue?(it=re,re=null):it=re.sibling;var xe=B(O,re,L[ue],Y);if(xe===null){re===null&&(re=it);break}t&&re&&xe.alternate===null&&r(O,re),M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe,re=it}if(ue===L.length)return a(O,re),_e&&qi(O,ue),ne;if(re===null){for(;ue<L.length;ue++)re=X(O,L[ue],Y),re!==null&&(M=g(re,M,ue),ge===null?ne=re:ge.sibling=re,ge=re);return _e&&qi(O,ue),ne}for(re=c(re);ue<L.length;ue++)it=U(re,O,ue,L[ue],Y),it!==null&&(t&&it.alternate!==null&&re.delete(it.key===null?ue:it.key),M=g(it,M,ue),ge===null?ne=it:ge.sibling=it,ge=it);return t&&re.forEach(function(wi){return r(O,wi)}),_e&&qi(O,ue),ne}function oe(O,M,L,Y){if(L==null)throw Error(s(151));for(var ne=null,ge=null,re=M,ue=M=0,it=null,xe=L.next();re!==null&&!xe.done;ue++,xe=L.next()){re.index>ue?(it=re,re=null):it=re.sibling;var wi=B(O,re,xe.value,Y);if(wi===null){re===null&&(re=it);break}t&&re&&wi.alternate===null&&r(O,re),M=g(wi,M,ue),ge===null?ne=wi:ge.sibling=wi,ge=wi,re=it}if(xe.done)return a(O,re),_e&&qi(O,ue),ne;if(re===null){for(;!xe.done;ue++,xe=L.next())xe=X(O,xe.value,Y),xe!==null&&(M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe);return _e&&qi(O,ue),ne}for(re=c(re);!xe.done;ue++,xe=L.next())xe=U(re,O,ue,xe.value,Y),xe!==null&&(t&&xe.alternate!==null&&re.delete(xe.key===null?ue:xe.key),M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe);return t&&re.forEach(function(O1){return r(O,O1)}),_e&&qi(O,ue),ne}function Me(O,M,L,Y){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ne=L.key;M!==null;){if(M.key===ne){if(ne=L.type,ne===E){if(M.tag===7){a(O,M.sibling),Y=h(M,L.props.children),Y.return=O,O=Y;break e}}else if(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===q&&Ag(ne)===M.type){a(O,M.sibling),Y=h(M,L.props),ca(Y,L),Y.return=O,O=Y;break e}a(O,M);break}else r(O,M);M=M.sibling}L.type===E?(Y=zi(L.props.children,O.mode,Y,L.key),Y.return=O,O=Y):(Y=Cl(L.type,L.key,L.props,null,O.mode,Y),ca(Y,L),Y.return=O,O=Y)}return w(O);case S:e:{for(ne=L.key;M!==null;){if(M.key===ne)if(M.tag===4&&M.stateNode.containerInfo===L.containerInfo&&M.stateNode.implementation===L.implementation){a(O,M.sibling),Y=h(M,L.children||[]),Y.return=O,O=Y;break e}else{a(O,M);break}else r(O,M);M=M.sibling}Y=hu(L,O.mode,Y),Y.return=O,O=Y}return w(O);case q:return ne=L._init,L=ne(L._payload),Me(O,M,L,Y)}if(ve(L))return fe(O,M,L,Y);if(I(L)){if(ne=I(L),typeof ne!="function")throw Error(s(150));return L=ne.call(L),oe(O,M,L,Y)}if(typeof L.then=="function")return Me(O,M,Kl(L),Y);if(L.$$typeof===$)return Me(O,M,Rl(O,L),Y);Yl(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,M!==null&&M.tag===6?(a(O,M.sibling),Y=h(M,L),Y.return=O,O=Y):(a(O,M),Y=fu(L,O.mode,Y),Y.return=O,O=Y),w(O)):a(O,M)}return function(O,M,L,Y){try{oa=0;var ne=Me(O,M,L,Y);return $s=null,ne}catch(re){if(re===Wr||re===Ll)throw re;var ge=Ut(29,re,null,O.mode);return ge.lanes=Y,ge.return=O,ge}finally{}}}var Is=Ng(!0),Cg=Ng(!1),Wt=P(null),bn=null;function ai(t){var r=t.alternate;J(Je,Je.current&1),J(Wt,t),bn===null&&(r===null||Us.current!==null||r.memoizedState!==null)&&(bn=t)}function kg(t){if(t.tag===22){if(J(Je,Je.current),J(Wt,t),bn===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(bn=t)}}else li()}function li(){J(Je,Je.current),J(Wt,Wt.current)}function Bn(t){W(Wt),bn===t&&(bn=null),W(Je)}var Je=P(0);function Xl(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Df(a)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Ku(t,r,a,c){r=t.memoizedState,a=a(c,r),a=a==null?r:m({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Yu={enqueueSetState:function(t,r,a){t=t._reactInternals;var c=$t(),h=ii(c);h.payload=r,a!=null&&(h.callback=a),r=si(t,h,c),r!==null&&(It(r,t,c),ta(r,t,c))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var c=$t(),h=ii(c);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=si(t,h,c),r!==null&&(It(r,t,c),ta(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=$t(),c=ii(a);c.tag=2,r!=null&&(c.callback=r),r=si(t,c,a),r!==null&&(It(r,t,a),ta(r,t,a))}};function Mg(t,r,a,c,h,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Kr(a,c)||!Kr(h,g):!0}function Og(t,r,a,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==t&&Yu.enqueueReplaceState(r,r.state,null)}function Xi(t,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(t=t.defaultProps){a===r&&(a=m({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}var Pl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Rg(t){Pl(t)}function jg(t){console.error(t)}function Lg(t){Pl(t)}function Fl(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function Dg(t,r,a){try{var c=t.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Xu(t,r,a){return a=ii(a),a.tag=3,a.payload={element:null},a.callback=function(){Fl(t,r)},a}function Bg(t){return t=ii(t),t.tag=3,t}function Ug(t,r,a,c){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;t.payload=function(){return h(g)},t.callback=function(){Dg(r,a,c)}}var w=a.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){Dg(r,a,c),typeof h!="function"&&(di===null?di=new Set([this]):di.add(this));var _=c.stack;this.componentDidCatch(c.value,{componentStack:_!==null?_:""})})}function Ow(t,r,a,c,h){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&Qr(r,a,h,!0),a=Wt.current,a!==null){switch(a.tag){case 13:return bn===null?bf():a.alternate===null&&Ie===0&&(Ie=3),a.flags&=-257,a.flags|=65536,a.lanes=h,c===xu?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),Sf(t,c,h)),!1;case 22:return a.flags|=65536,c===xu?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),Sf(t,c,h)),!1}throw Error(s(435,a.tag))}return Sf(t,c,h),bf(),!1}if(_e)return r=Wt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==gu&&(t=Error(s(422),{cause:c}),Fr(Ft(t,a)))):(c!==gu&&(r=Error(s(423),{cause:c}),Fr(Ft(r,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Ft(c,a),h=Xu(t.stateNode,c,h),Eu(t,h),Ie!==4&&(Ie=2)),!1;var g=Error(s(520),{cause:c});if(g=Ft(g,a),ma===null?ma=[g]:ma.push(g),Ie!==4&&(Ie=2),r===null)return!0;c=Ft(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=Xu(a.stateNode,c,t),Eu(a,t),!1;case 1:if(r=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(di===null||!di.has(g))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Bg(h),Ug(h,t,a,c),Eu(a,h),!1}a=a.return}while(a!==null);return!1}var zg=Error(s(461)),tt=!1;function st(t,r,a,c){r.child=t===null?Cg(r,null,a,c):Is(r,t.child,a,c)}function Hg(t,r,a,c,h){a=a.render;var g=r.ref;if("ref"in c){var w={};for(var _ in c)_!=="ref"&&(w[_]=c[_])}else w=c;return Gi(r),c=Mu(t,r,a,w,g,h),_=Ou(),t!==null&&!tt?(Ru(t,r,h),Un(t,r,h)):(_e&&_&&du(r),r.flags|=1,st(t,r,c,h),r.child)}function qg(t,r,a,c,h){if(t===null){var g=a.type;return typeof g=="function"&&!uu(g)&&g.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=g,$g(t,r,g,c,h)):(t=Cl(a.type,null,c,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!tf(t,h)){var w=g.memoizedProps;if(a=a.compare,a=a!==null?a:Kr,a(w,c)&&t.ref===r.ref)return Un(t,r,h)}return r.flags|=1,t=Mn(g,c),t.ref=r.ref,t.return=r,r.child=t}function $g(t,r,a,c,h){if(t!==null){var g=t.memoizedProps;if(Kr(g,c)&&t.ref===r.ref)if(tt=!1,r.pendingProps=c=g,tf(t,h))(t.flags&131072)!==0&&(tt=!0);else return r.lanes=t.lanes,Un(t,r,h)}return Pu(t,r,a,c,h)}function Ig(t,r,a){var c=r.pendingProps,h=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((r.flags&128)!==0){if(c=g!==null?g.baseLanes|a:a,t!==null){for(h=r.child=t.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;r.childLanes=g&~c}else r.childLanes=0,r.child=null;return Vg(t,r,c,a)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&jl(r,g!==null?g.cachePool:null),g!==null?$p(r,g):Nu(),kg(r);else return r.lanes=r.childLanes=536870912,Vg(t,r,g!==null?g.baseLanes|a:a,a)}else g!==null?(jl(r,g.cachePool),$p(r,g),li(),r.memoizedState=null):(t!==null&&jl(r,null),Nu(),li());return st(t,r,h,a),r.child}function Vg(t,r,a,c){var h=wu();return h=h===null?null:{parent:Ze._currentValue,pool:h},r.memoizedState={baseLanes:a,cachePool:h},t!==null&&jl(r,null),Nu(),kg(r),t!==null&&Qr(t,r,c,!0),null}function Ql(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Pu(t,r,a,c,h){return Gi(r),a=Mu(t,r,a,c,void 0,h),c=Ou(),t!==null&&!tt?(Ru(t,r,h),Un(t,r,h)):(_e&&c&&du(r),r.flags|=1,st(t,r,a,h),r.child)}function Gg(t,r,a,c,h,g){return Gi(r),r.updateQueue=null,a=Vp(r,c,a,h),Ip(t),c=Ou(),t!==null&&!tt?(Ru(t,r,g),Un(t,r,g)):(_e&&c&&du(r),r.flags|=1,st(t,r,a,g),r.child)}function Kg(t,r,a,c,h){if(Gi(r),r.stateNode===null){var g=Rs,w=a.contextType;typeof w=="object"&&w!==null&&(g=ht(w)),g=new a(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Yu,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},_u(r),w=a.contextType,g.context=typeof w=="object"&&w!==null?ht(w):Rs,g.state=r.memoizedState,w=a.getDerivedStateFromProps,typeof w=="function"&&(Ku(r,a,w,c),g.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&Yu.enqueueReplaceState(g,g.state,null),ia(r,c,g,h),na(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){g=r.stateNode;var _=r.memoizedProps,A=Xi(a,_);g.props=A;var D=g.context,K=a.contextType;w=Rs,typeof K=="object"&&K!==null&&(w=ht(K));var X=a.getDerivedStateFromProps;K=typeof X=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,K||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||D!==w)&&Og(r,g,c,w),ni=!1;var B=r.memoizedState;g.state=B,ia(r,c,g,h),na(),D=r.memoizedState,_||B!==D||ni?(typeof X=="function"&&(Ku(r,a,X,c),D=r.memoizedState),(A=ni||Mg(r,a,A,c,B,D,w))?(K||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=D),g.props=c,g.state=D,g.context=w,c=A):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,Tu(t,r),w=r.memoizedProps,K=Xi(a,w),g.props=K,X=r.pendingProps,B=g.context,D=a.contextType,A=Rs,typeof D=="object"&&D!==null&&(A=ht(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==X||B!==A)&&Og(r,g,c,A),ni=!1,B=r.memoizedState,g.state=B,ia(r,c,g,h),na();var U=r.memoizedState;w!==X||B!==U||ni||t!==null&&t.dependencies!==null&&Ol(t.dependencies)?(typeof _=="function"&&(Ku(r,a,_,c),U=r.memoizedState),(K=ni||Mg(r,a,K,c,B,U,A)||t!==null&&t.dependencies!==null&&Ol(t.dependencies))?(D||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,U,A),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,U,A)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=U),g.props=c,g.state=U,g.context=A,c=K):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),c=!1)}return g=c,Ql(t,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&c?(r.child=Is(r,t.child,null,h),r.child=Is(r,null,a,h)):st(t,r,a,h),r.memoizedState=g.state,t=r.child):t=Un(t,r,h),t}function Yg(t,r,a,c){return Pr(),r.flags|=256,st(t,r,a,c),r.child}var Fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qu(t){return{baseLanes:t,cachePool:jp()}}function Zu(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=en),t}function Xg(t,r,a){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,w;if((w=g)||(w=t!==null&&t.memoizedState===null?!1:(Je.current&2)!==0),w&&(h=!0,r.flags&=-129),w=(r.flags&32)!==0,r.flags&=-33,t===null){if(_e){if(h?ai(r):li(),_e){var _=$e,A;if(A=_){e:{for(A=_,_=yn;A.nodeType!==8;){if(!_){_=null;break e}if(A=dn(A.nextSibling),A===null){_=null;break e}}_=A}_!==null?(r.memoizedState={dehydrated:_,treeContext:Hi!==null?{id:On,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},A=Ut(18,null,null,0),A.stateNode=_,A.return=r,r.child=A,St=r,$e=null,A=!0):A=!1}A||Ii(r)}if(_=r.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Df(_)?r.lanes=32:r.lanes=536870912,null;Bn(r)}return _=c.children,c=c.fallback,h?(li(),h=r.mode,_=Zl({mode:"hidden",children:_},h),c=zi(c,h,a,null),_.return=r,c.return=r,_.sibling=c,r.child=_,h=r.child,h.memoizedState=Qu(a),h.childLanes=Zu(t,w,a),r.memoizedState=Fu,c):(ai(r),Ju(r,_))}if(A=t.memoizedState,A!==null&&(_=A.dehydrated,_!==null)){if(g)r.flags&256?(ai(r),r.flags&=-257,r=Wu(t,r,a)):r.memoizedState!==null?(li(),r.child=t.child,r.flags|=128,r=null):(li(),h=c.fallback,_=r.mode,c=Zl({mode:"visible",children:c.children},_),h=zi(h,_,a,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,Is(r,t.child,null,a),c=r.child,c.memoizedState=Qu(a),c.childLanes=Zu(t,w,a),r.memoizedState=Fu,r=h);else if(ai(r),Df(_)){if(w=_.nextSibling&&_.nextSibling.dataset,w)var D=w.dgst;w=D,c=Error(s(419)),c.stack="",c.digest=w,Fr({value:c,source:null,stack:null}),r=Wu(t,r,a)}else if(tt||Qr(t,r,a,!1),w=(a&t.childLanes)!==0,tt||w){if(w=je,w!==null&&(c=a&-a,c=(c&42)!==0?1:Dc(c),c=(c&(w.suspendedLanes|a))!==0?0:c,c!==0&&c!==A.retryLane))throw A.retryLane=c,Os(t,c),It(w,t,c),zg;_.data==="$?"||bf(),r=Wu(t,r,a)}else _.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=A.treeContext,$e=dn(_.nextSibling),St=r,_e=!0,$i=null,yn=!1,t!==null&&(Zt[Jt++]=On,Zt[Jt++]=Rn,Zt[Jt++]=Hi,On=t.id,Rn=t.overflow,Hi=r),r=Ju(r,c.children),r.flags|=4096);return r}return h?(li(),h=c.fallback,_=r.mode,A=t.child,D=A.sibling,c=Mn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,D!==null?h=Mn(D,h):(h=zi(h,_,a,null),h.flags|=2),h.return=r,c.return=r,c.sibling=h,r.child=c,c=h,h=r.child,_=t.child.memoizedState,_===null?_=Qu(a):(A=_.cachePool,A!==null?(D=Ze._currentValue,A=A.parent!==D?{parent:D,pool:D}:A):A=jp(),_={baseLanes:_.baseLanes|a,cachePool:A}),h.memoizedState=_,h.childLanes=Zu(t,w,a),r.memoizedState=Fu,c):(ai(r),a=t.child,t=a.sibling,a=Mn(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,t!==null&&(w=r.deletions,w===null?(r.deletions=[t],r.flags|=16):w.push(t)),r.child=a,r.memoizedState=null,a)}function Ju(t,r){return r=Zl({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Zl(t,r){return t=Ut(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Wu(t,r,a){return Is(r,t.child,null,a),t=Ju(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Pg(t,r,a){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),yu(t.return,r,a)}function ef(t,r,a,c,h){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=h)}function Fg(t,r,a){var c=r.pendingProps,h=c.revealOrder,g=c.tail;if(st(t,r,c.children,a),c=Je.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Pg(t,a,r);else if(t.tag===19)Pg(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}switch(J(Je,c),h){case"forwards":for(a=r.child,h=null;a!==null;)t=a.alternate,t!==null&&Xl(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),ef(r,!1,h,a,g);break;case"backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&Xl(t)===null){r.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}ef(r,!0,a,null,g);break;case"together":ef(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Un(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),hi|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(Qr(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,a=Mn(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Mn(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function tf(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Ol(t)))}function Rw(t,r,a){switch(r.tag){case 3:Ne(r,r.stateNode.containerInfo),ti(r,Ze,t.memoizedState.cache),Pr();break;case 27:case 5:jr(r);break;case 4:Ne(r,r.stateNode.containerInfo);break;case 10:ti(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(ai(r),r.flags|=128,null):(a&r.child.childLanes)!==0?Xg(t,r,a):(ai(r),t=Un(t,r,a),t!==null?t.sibling:null);ai(r);break;case 19:var h=(t.flags&128)!==0;if(c=(a&r.childLanes)!==0,c||(Qr(t,r,a,!1),c=(a&r.childLanes)!==0),h){if(c)return Fg(t,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),J(Je,Je.current),c)break;return null;case 22:case 23:return r.lanes=0,Ig(t,r,a);case 24:ti(r,Ze,t.memoizedState.cache)}return Un(t,r,a)}function Qg(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)tt=!0;else{if(!tf(t,a)&&(r.flags&128)===0)return tt=!1,Rw(t,r,a);tt=(t.flags&131072)!==0}else tt=!1,_e&&(r.flags&1048576)!==0&&Ap(r,Ml,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var c=r.elementType,h=c._init;if(c=h(c._payload),r.type=c,typeof c=="function")uu(c)?(t=Xi(c,t),r.tag=1,r=Kg(null,r,c,t,a)):(r.tag=0,r=Pu(null,r,c,t,a));else{if(c!=null){if(h=c.$$typeof,h===V){r.tag=11,r=Hg(null,r,c,t,a);break e}else if(h===Z){r.tag=14,r=qg(null,r,c,t,a);break e}}throw r=ee(c)||c,Error(s(306,r,""))}}return r;case 0:return Pu(t,r,r.type,r.pendingProps,a);case 1:return c=r.type,h=Xi(c,r.pendingProps),Kg(t,r,c,h,a);case 3:e:{if(Ne(r,r.stateNode.containerInfo),t===null)throw Error(s(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,Tu(t,r),ia(r,c,null,a);var w=r.memoizedState;if(c=w.cache,ti(r,Ze,c),c!==g.cache&&bu(r,[Ze],a,!0),na(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Yg(t,r,c,a);break e}else if(c!==h){h=Ft(Error(s(424)),r),Fr(h),r=Yg(t,r,c,a);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for($e=dn(t.firstChild),St=r,_e=!0,$i=null,yn=!0,a=Cg(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Pr(),c===h){r=Un(t,r,a);break e}st(t,r,c,a)}r=r.child}return r;case 26:return Ql(t,r),t===null?(a=ey(r.type,null,r.pendingProps,null))?r.memoizedState=a:_e||(a=r.type,t=r.pendingProps,c=fo(te.current).createElement(a),c[ft]=r,c[Et]=t,at(c,a,t),et(c),r.stateNode=c):r.memoizedState=ey(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return jr(r),t===null&&_e&&(c=r.stateNode=Zm(r.type,r.pendingProps,te.current),St=r,yn=!0,h=$e,mi(r.type)?(Bf=h,$e=dn(c.firstChild)):$e=h),st(t,r,r.pendingProps.children,a),Ql(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&_e&&((h=c=$e)&&(c=a1(c,r.type,r.pendingProps,yn),c!==null?(r.stateNode=c,St=r,$e=dn(c.firstChild),yn=!1,h=!0):h=!1),h||Ii(r)),jr(r),h=r.type,g=r.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,Rf(h,g)?c=null:w!==null&&Rf(h,w)&&(r.flags|=32),r.memoizedState!==null&&(h=Mu(t,r,Tw,null,null,a),Ea._currentValue=h),Ql(t,r),st(t,r,c,a),r.child;case 6:return t===null&&_e&&((t=a=$e)&&(a=l1(a,r.pendingProps,yn),a!==null?(r.stateNode=a,St=r,$e=null,t=!0):t=!1),t||Ii(r)),null;case 13:return Xg(t,r,a);case 4:return Ne(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=Is(r,null,c,a):st(t,r,c,a),r.child;case 11:return Hg(t,r,r.type,r.pendingProps,a);case 7:return st(t,r,r.pendingProps,a),r.child;case 8:return st(t,r,r.pendingProps.children,a),r.child;case 12:return st(t,r,r.pendingProps.children,a),r.child;case 10:return c=r.pendingProps,ti(r,r.type,c.value),st(t,r,c.children,a),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,Gi(r),h=ht(h),c=c(h),r.flags|=1,st(t,r,c,a),r.child;case 14:return qg(t,r,r.type,r.pendingProps,a);case 15:return $g(t,r,r.type,r.pendingProps,a);case 19:return Fg(t,r,a);case 31:return c=r.pendingProps,a=r.mode,c={mode:c.mode,children:c.children},t===null?(a=Zl(c,a),a.ref=r.ref,r.child=a,a.return=r,r=a):(a=Mn(t.child,c),a.ref=r.ref,r.child=a,a.return=r,r=a),r;case 22:return Ig(t,r,a);case 24:return Gi(r),c=ht(Ze),t===null?(h=wu(),h===null&&(h=je,g=vu(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=a),h=g),r.memoizedState={parent:c,cache:h},_u(r),ti(r,Ze,h)):((t.lanes&a)!==0&&(Tu(t,r),ia(r,null,null,a),na()),h=t.memoizedState,g=r.memoizedState,h.parent!==c?(h={parent:c,cache:c},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),ti(r,Ze,c)):(c=g.cache,ti(r,Ze,c),c!==h.cache&&bu(r,[Ze],a,!0))),st(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function zn(t){t.flags|=4}function Zg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ry(r)){if(r=Wt.current,r!==null&&((Se&4194048)===Se?bn!==null:(Se&62914560)!==Se&&(Se&536870912)===0||r!==bn))throw ea=xu,Lp;t.flags|=8192}}function Jl(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?Jn():536870912,t.lanes|=r,Ys|=r)}function ua(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Ue(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(r)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=a,r}function jw(t,r,a){var c=r.pendingProps;switch(pu(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(r),null;case 1:return Ue(r),null;case 3:return a=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Ln(Ze),Gt(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Xr(r)?zn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,kp())),Ue(r),null;case 26:return a=r.memoizedState,t===null?(zn(r),a!==null?(Ue(r),Zg(r,a)):(Ue(r),r.flags&=-16777217)):a?a!==t.memoizedState?(zn(r),Ue(r),Zg(r,a)):(Ue(r),r.flags&=-16777217):(t.memoizedProps!==c&&zn(r),Ue(r),r.flags&=-16777217),null;case 27:En(r),a=te.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}t=ae.current,Xr(r)?Np(r):(t=Zm(h,c,a),r.stateNode=t,zn(r))}return Ue(r),null;case 5:if(En(r),a=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}if(t=ae.current,Xr(r))Np(r);else{switch(h=fo(te.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof c.is=="string"?h.createElement("select",{is:c.is}):h.createElement("select"),c.multiple?t.multiple=!0:c.size&&(t.size=c.size);break;default:t=typeof c.is=="string"?h.createElement(a,{is:c.is}):h.createElement(a)}}t[ft]=r,t[Et]=c;e:for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break e;for(;h.sibling===null;){if(h.return===null||h.return===r)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}r.stateNode=t;e:switch(at(t,a,c),a){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&zn(r)}}return Ue(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(t=te.current,Xr(r)){if(t=r.stateNode,a=r.memoizedProps,c=null,h=St,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[ft]=r,t=!!(t.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Gm(t.nodeValue,a)),t||Ii(r)}else t=fo(t).createTextNode(c),t[ft]=r,r.stateNode=t}return Ue(r),null;case 13:if(c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Xr(r),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[ft]=r}else Pr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ue(r),h=!1}else h=kp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bn(r),r):(Bn(r),null)}if(Bn(r),(r.flags&128)!==0)return r.lanes=a,r;if(a=c!==null,t=t!==null&&t.memoizedState!==null,a){c=r.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool);var g=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==h&&(c.flags|=2048)}return a!==t&&a&&(r.child.flags|=8192),Jl(r,r.updateQueue),Ue(r),null;case 4:return Gt(),t===null&&Nf(r.stateNode.containerInfo),Ue(r),null;case 10:return Ln(r.type),Ue(r),null;case 19:if(W(Je),h=r.memoizedState,h===null)return Ue(r),null;if(c=(r.flags&128)!==0,g=h.rendering,g===null)if(c)ua(h,!1);else{if(Ie!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(g=Xl(t),g!==null){for(r.flags|=128,ua(h,!1),t=g.updateQueue,r.updateQueue=t,Jl(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)Ep(a,t),a=a.sibling;return J(Je,Je.current&1|2),r.child}t=t.sibling}h.tail!==null&&Kt()>to&&(r.flags|=128,c=!0,ua(h,!1),r.lanes=4194304)}else{if(!c)if(t=Xl(g),t!==null){if(r.flags|=128,c=!0,t=t.updateQueue,r.updateQueue=t,Jl(r,t),ua(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!_e)return Ue(r),null}else 2*Kt()-h.renderingStartTime>to&&a!==536870912&&(r.flags|=128,c=!0,ua(h,!1),r.lanes=4194304);h.isBackwards?(g.sibling=r.child,r.child=g):(t=h.last,t!==null?t.sibling=g:r.child=g,h.last=g)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Kt(),r.sibling=null,t=Je.current,J(Je,c?t&1|2:t&1),r):(Ue(r),null);case 22:case 23:return Bn(r),Cu(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(a&536870912)!==0&&(r.flags&128)===0&&(Ue(r),r.subtreeFlags&6&&(r.flags|=8192)):Ue(r),a=r.updateQueue,a!==null&&Jl(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==a&&(r.flags|=2048),t!==null&&W(Ki),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Ln(Ze),Ue(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function Lw(t,r){switch(pu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Ln(Ze),Gt(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return En(r),null;case 13:if(Bn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Pr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return W(Je),null;case 4:return Gt(),null;case 10:return Ln(r.type),null;case 22:case 23:return Bn(r),Cu(),t!==null&&W(Ki),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Ln(Ze),null;case 25:return null;default:return null}}function Jg(t,r){switch(pu(r),r.tag){case 3:Ln(Ze),Gt();break;case 26:case 27:case 5:En(r);break;case 4:Gt();break;case 13:Bn(r);break;case 19:W(Je);break;case 10:Ln(r.type);break;case 22:case 23:Bn(r),Cu(),t!==null&&W(Ki);break;case 24:Ln(Ze)}}function fa(t,r){try{var a=r.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var h=c.next;a=h;do{if((a.tag&t)===t){c=void 0;var g=a.create,w=a.inst;c=g(),w.destroy=c}a=a.next}while(a!==h)}}catch(_){Oe(r,r.return,_)}}function oi(t,r,a){try{var c=r.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var g=h.next;c=g;do{if((c.tag&t)===t){var w=c.inst,_=w.destroy;if(_!==void 0){w.destroy=void 0,h=r;var A=a,D=_;try{D()}catch(K){Oe(h,A,K)}}}c=c.next}while(c!==g)}}catch(K){Oe(r,r.return,K)}}function Wg(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{qp(r,a)}catch(c){Oe(t,t.return,c)}}}function em(t,r,a){a.props=Xi(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(c){Oe(t,r,c)}}function ha(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof a=="function"?t.refCleanup=a(c):a.current=c}}catch(h){Oe(t,r,h)}}function vn(t,r){var a=t.ref,c=t.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(h){Oe(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Oe(t,r,h)}else a.current=null}function tm(t){var r=t.type,a=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(h){Oe(t,t.return,h)}}function nf(t,r,a){try{var c=t.stateNode;t1(c,t.type,a,r),c[Et]=r}catch(h){Oe(t,t.return,h)}}function nm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&mi(t.type)||t.tag===4}function sf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||nm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&mi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rf(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=uo));else if(c!==4&&(c===27&&mi(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(rf(t,r,a),t=t.sibling;t!==null;)rf(t,r,a),t=t.sibling}function Wl(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(c!==4&&(c===27&&mi(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Wl(t,r,a),t=t.sibling;t!==null;)Wl(t,r,a),t=t.sibling}function im(t){var r=t.stateNode,a=t.memoizedProps;try{for(var c=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);at(r,c,a),r[ft]=t,r[Et]=a}catch(g){Oe(t,t.return,g)}}var Hn=!1,Ge=!1,af=!1,sm=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Dw(t,r){if(t=t.containerInfo,Mf=bo,t=gp(t),iu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var w=0,_=-1,A=-1,D=0,K=0,X=t,B=null;t:for(;;){for(var U;X!==a||h!==0&&X.nodeType!==3||(_=w+h),X!==g||c!==0&&X.nodeType!==3||(A=w+c),X.nodeType===3&&(w+=X.nodeValue.length),(U=X.firstChild)!==null;)B=X,X=U;for(;;){if(X===t)break t;if(B===a&&++D===h&&(_=w),B===g&&++K===c&&(A=w),(U=X.nextSibling)!==null)break;X=B,B=X.parentNode}X=U}a=_===-1||A===-1?null:{start:_,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Of={focusedElem:t,selectionRange:a},bo=!1,nt=r;nt!==null;)if(r=nt,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,nt=t;else for(;nt!==null;){switch(r=nt,g=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,a=r,h=g.memoizedProps,g=g.memoizedState,c=a.stateNode;try{var fe=Xi(a.type,h,a.elementType===a.type);t=c.getSnapshotBeforeUpdate(fe,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(oe){Oe(a,a.return,oe)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)Lf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Lf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=r.sibling,t!==null){t.return=r.return,nt=t;break}nt=r.return}}function rm(t,r,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:ci(t,a),c&4&&fa(5,a);break;case 1:if(ci(t,a),c&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(w){Oe(a,a.return,w)}else{var h=Xi(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Oe(a,a.return,w)}}c&64&&Wg(a),c&512&&ha(a,a.return);break;case 3:if(ci(t,a),c&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{qp(t,r)}catch(w){Oe(a,a.return,w)}}break;case 27:r===null&&c&4&&im(a);case 26:case 5:ci(t,a),r===null&&c&4&&tm(a),c&512&&ha(a,a.return);break;case 12:ci(t,a);break;case 13:ci(t,a),c&4&&om(t,a),c&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=Gw.bind(null,a),o1(t,a))));break;case 22:if(c=a.memoizedState!==null||Hn,!c){r=r!==null&&r.memoizedState!==null||Ge,h=Hn;var g=Ge;Hn=c,(Ge=r)&&!g?ui(t,a,(a.subtreeFlags&8772)!==0):ci(t,a),Hn=h,Ge=g}break;case 30:break;default:ci(t,a)}}function am(t){var r=t.alternate;r!==null&&(t.alternate=null,am(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&zc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Le=null,Ct=!1;function qn(t,r,a){for(a=a.child;a!==null;)lm(t,r,a),a=a.sibling}function lm(t,r,a){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Oi,a)}catch{}switch(a.tag){case 26:Ge||vn(a,r),qn(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ge||vn(a,r);var c=Le,h=Ct;mi(a.type)&&(Le=a.stateNode,Ct=!1),qn(t,r,a),wa(a.stateNode),Le=c,Ct=h;break;case 5:Ge||vn(a,r);case 6:if(c=Le,h=Ct,Le=null,qn(t,r,a),Le=c,Ct=h,Le!==null)if(Ct)try{(Le.nodeType===9?Le.body:Le.nodeName==="HTML"?Le.ownerDocument.body:Le).removeChild(a.stateNode)}catch(g){Oe(a,r,g)}else try{Le.removeChild(a.stateNode)}catch(g){Oe(a,r,g)}break;case 18:Le!==null&&(Ct?(t=Le,Fm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),ka(t)):Fm(Le,a.stateNode));break;case 4:c=Le,h=Ct,Le=a.stateNode.containerInfo,Ct=!0,qn(t,r,a),Le=c,Ct=h;break;case 0:case 11:case 14:case 15:Ge||oi(2,a,r),Ge||oi(4,a,r),qn(t,r,a);break;case 1:Ge||(vn(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"&&em(a,r,c)),qn(t,r,a);break;case 21:qn(t,r,a);break;case 22:Ge=(c=Ge)||a.memoizedState!==null,qn(t,r,a),Ge=c;break;default:qn(t,r,a)}}function om(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ka(t)}catch(a){Oe(r,r.return,a)}}function Bw(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new sm),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new sm),r;default:throw Error(s(435,t.tag))}}function lf(t,r){var a=Bw(t);r.forEach(function(c){var h=Kw.bind(null,t,c);a.has(c)||(a.add(c),c.then(h,h))})}function zt(t,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c],g=t,w=r,_=w;e:for(;_!==null;){switch(_.tag){case 27:if(mi(_.type)){Le=_.stateNode,Ct=!1;break e}break;case 5:Le=_.stateNode,Ct=!1;break e;case 3:case 4:Le=_.stateNode.containerInfo,Ct=!0;break e}_=_.return}if(Le===null)throw Error(s(160));lm(g,w,h),Le=null,Ct=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)cm(r,t),r=r.sibling}var hn=null;function cm(t,r){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:zt(r,t),Ht(t),c&4&&(oi(3,t,t.return),fa(3,t),oi(5,t,t.return));break;case 1:zt(r,t),Ht(t),c&512&&(Ge||a===null||vn(a,a.return)),c&64&&Hn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?c:a.concat(c))));break;case 26:var h=hn;if(zt(r,t),Ht(t),c&512&&(Ge||a===null||vn(a,a.return)),c&4){var g=a!==null?a.memoizedState:null;if(c=t.memoizedState,a===null)if(c===null)if(t.stateNode===null){e:{c=t.type,a=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[Br]||g[ft]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),at(g,c,a),g[ft]=t,et(g),c=g;break e;case"link":var w=iy("link","href",h).get(c+(a.href||""));if(w){for(var _=0;_<w.length;_++)if(g=w[_],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){w.splice(_,1);break t}}g=h.createElement(c),at(g,c,a),h.head.appendChild(g);break;case"meta":if(w=iy("meta","content",h).get(c+(a.content||""))){for(_=0;_<w.length;_++)if(g=w[_],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){w.splice(_,1);break t}}g=h.createElement(c),at(g,c,a),h.head.appendChild(g);break;default:throw Error(s(468,c))}g[ft]=t,et(g),c=g}t.stateNode=c}else sy(h,t.type,t.stateNode);else t.stateNode=ny(h,c,t.memoizedProps);else g!==c?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,c===null?sy(h,t.type,t.stateNode):ny(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&nf(t,t.memoizedProps,a.memoizedProps)}break;case 27:zt(r,t),Ht(t),c&512&&(Ge||a===null||vn(a,a.return)),a!==null&&c&4&&nf(t,t.memoizedProps,a.memoizedProps);break;case 5:if(zt(r,t),Ht(t),c&512&&(Ge||a===null||vn(a,a.return)),t.flags&32){h=t.stateNode;try{Ts(h,"")}catch(U){Oe(t,t.return,U)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,nf(t,h,a!==null?a.memoizedProps:h)),c&1024&&(af=!0);break;case 6:if(zt(r,t),Ht(t),c&4){if(t.stateNode===null)throw Error(s(162));c=t.memoizedProps,a=t.stateNode;try{a.nodeValue=c}catch(U){Oe(t,t.return,U)}}break;case 3:if(go=null,h=hn,hn=ho(r.containerInfo),zt(r,t),hn=h,Ht(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{ka(r.containerInfo)}catch(U){Oe(t,t.return,U)}af&&(af=!1,um(t));break;case 4:c=hn,hn=ho(t.stateNode.containerInfo),zt(r,t),Ht(t),hn=c;break;case 12:zt(r,t),Ht(t);break;case 13:zt(r,t),Ht(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(df=Kt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 22:h=t.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,D=Hn,K=Ge;if(Hn=D||h,Ge=K||A,zt(r,t),Ge=K,Hn=D,Ht(t),c&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(a===null||A||Hn||Ge||Pi(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){A=a=r;try{if(g=A.stateNode,h)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{_=A.stateNode;var X=A.memoizedProps.style,B=X!=null&&X.hasOwnProperty("display")?X.display:null;_.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(U){Oe(A,A.return,U)}}}else if(r.tag===6){if(a===null){A=r;try{A.stateNode.nodeValue=h?"":A.memoizedProps}catch(U){Oe(A,A.return,U)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,lf(t,a))));break;case 19:zt(r,t),Ht(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 30:break;case 21:break;default:zt(r,t),Ht(t)}}function Ht(t){var r=t.flags;if(r&2){try{for(var a,c=t.return;c!==null;){if(nm(c)){a=c;break}c=c.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var h=a.stateNode,g=sf(t);Wl(t,g,h);break;case 5:var w=a.stateNode;a.flags&32&&(Ts(w,""),a.flags&=-33);var _=sf(t);Wl(t,_,w);break;case 3:case 4:var A=a.stateNode.containerInfo,D=sf(t);rf(t,D,A);break;default:throw Error(s(161))}}catch(K){Oe(t,t.return,K)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function um(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;um(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function ci(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)rm(t,r.alternate,r),r=r.sibling}function Pi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:oi(4,r,r.return),Pi(r);break;case 1:vn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&em(r,r.return,a),Pi(r);break;case 27:wa(r.stateNode);case 26:case 5:vn(r,r.return),Pi(r);break;case 22:r.memoizedState===null&&Pi(r);break;case 30:Pi(r);break;default:Pi(r)}t=t.sibling}}function ui(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,h=t,g=r,w=g.flags;switch(g.tag){case 0:case 11:case 15:ui(h,g,a),fa(4,g);break;case 1:if(ui(h,g,a),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){Oe(c,c.return,D)}if(c=g,h=c.updateQueue,h!==null){var _=c.stateNode;try{var A=h.shared.hiddenCallbacks;if(A!==null)for(h.shared.hiddenCallbacks=null,h=0;h<A.length;h++)Hp(A[h],_)}catch(D){Oe(c,c.return,D)}}a&&w&64&&Wg(g),ha(g,g.return);break;case 27:im(g);case 26:case 5:ui(h,g,a),a&&c===null&&w&4&&tm(g),ha(g,g.return);break;case 12:ui(h,g,a);break;case 13:ui(h,g,a),a&&w&4&&om(h,g);break;case 22:g.memoizedState===null&&ui(h,g,a),ha(g,g.return);break;case 30:break;default:ui(h,g,a)}r=r.sibling}}function of(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Zr(a))}function cf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Zr(t))}function Sn(t,r,a,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)fm(t,r,a,c),r=r.sibling}function fm(t,r,a,c){var h=r.flags;switch(r.tag){case 0:case 11:case 15:Sn(t,r,a,c),h&2048&&fa(9,r);break;case 1:Sn(t,r,a,c);break;case 3:Sn(t,r,a,c),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Zr(t)));break;case 12:if(h&2048){Sn(t,r,a,c),t=r.stateNode;try{var g=r.memoizedProps,w=g.id,_=g.onPostCommit;typeof _=="function"&&_(w,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Oe(r,r.return,A)}}else Sn(t,r,a,c);break;case 13:Sn(t,r,a,c);break;case 23:break;case 22:g=r.stateNode,w=r.alternate,r.memoizedState!==null?g._visibility&2?Sn(t,r,a,c):da(t,r):g._visibility&2?Sn(t,r,a,c):(g._visibility|=2,Vs(t,r,a,c,(r.subtreeFlags&10256)!==0)),h&2048&&of(w,r);break;case 24:Sn(t,r,a,c),h&2048&&cf(r.alternate,r);break;default:Sn(t,r,a,c)}}function Vs(t,r,a,c,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var g=t,w=r,_=a,A=c,D=w.flags;switch(w.tag){case 0:case 11:case 15:Vs(g,w,_,A,h),fa(8,w);break;case 23:break;case 22:var K=w.stateNode;w.memoizedState!==null?K._visibility&2?Vs(g,w,_,A,h):da(g,w):(K._visibility|=2,Vs(g,w,_,A,h)),h&&D&2048&&of(w.alternate,w);break;case 24:Vs(g,w,_,A,h),h&&D&2048&&cf(w.alternate,w);break;default:Vs(g,w,_,A,h)}r=r.sibling}}function da(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,c=r,h=c.flags;switch(c.tag){case 22:da(a,c),h&2048&&of(c.alternate,c);break;case 24:da(a,c),h&2048&&cf(c.alternate,c);break;default:da(a,c)}r=r.sibling}}var pa=8192;function Gs(t){if(t.subtreeFlags&pa)for(t=t.child;t!==null;)hm(t),t=t.sibling}function hm(t){switch(t.tag){case 26:Gs(t),t.flags&pa&&t.memoizedState!==null&&w1(hn,t.memoizedState,t.memoizedProps);break;case 5:Gs(t);break;case 3:case 4:var r=hn;hn=ho(t.stateNode.containerInfo),Gs(t),hn=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=pa,pa=16777216,Gs(t),pa=r):Gs(t));break;default:Gs(t)}}function dm(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function ga(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];nt=c,gm(c,t)}dm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pm(t),t=t.sibling}function pm(t){switch(t.tag){case 0:case 11:case 15:ga(t),t.flags&2048&&oi(9,t,t.return);break;case 3:ga(t);break;case 12:ga(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,eo(t)):ga(t);break;default:ga(t)}}function eo(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];nt=c,gm(c,t)}dm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:oi(8,r,r.return),eo(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,eo(r));break;default:eo(r)}t=t.sibling}}function gm(t,r){for(;nt!==null;){var a=nt;switch(a.tag){case 0:case 11:case 15:oi(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Zr(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,nt=c;else e:for(a=t;nt!==null;){c=nt;var h=c.sibling,g=c.return;if(am(c),c===a){nt=null;break e}if(h!==null){h.return=g,nt=h;break e}nt=g}}}var Uw={getCacheForType:function(t){var r=ht(Ze),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a}},zw=typeof WeakMap=="function"?WeakMap:Map,Ee=0,je=null,me=null,Se=0,Ae=0,qt=null,fi=!1,Ks=!1,uf=!1,$n=0,Ie=0,hi=0,Fi=0,ff=0,en=0,Ys=0,ma=null,kt=null,hf=!1,df=0,to=1/0,no=null,di=null,rt=0,pi=null,Xs=null,Ps=0,pf=0,gf=null,mm=null,ya=0,mf=null;function $t(){if((Ee&2)!==0&&Se!==0)return Se&-Se;if(z.T!==null){var t=Ds;return t!==0?t:_f()}return Rd()}function ym(){en===0&&(en=(Se&536870912)===0||_e?ce():536870912);var t=Wt.current;return t!==null&&(t.flags|=32),en}function It(t,r,a){(t===je&&(Ae===2||Ae===9)||t.cancelPendingCommit!==null)&&(Fs(t,0),gi(t,Se,en,!1)),Dr(t,a),((Ee&2)===0||t!==je)&&(t===je&&((Ee&2)===0&&(Fi|=a),Ie===4&&gi(t,Se,en,!1)),wn(t))}function bm(t,r,a){if((Ee&6)!==0)throw Error(s(327));var c=!a&&(r&124)===0&&(r&t.expiredLanes)===0||ji(t,r),h=c?$w(t,r):vf(t,r,!0),g=c;do{if(h===0){Ks&&!c&&gi(t,r,0,!1);break}else{if(a=t.current.alternate,g&&!Hw(a)){h=vf(t,r,!1),g=!1;continue}if(h===2){if(g=r,t.errorRecoveryDisabledLanes&g)var w=0;else w=t.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){r=w;e:{var _=t;h=ma;var A=_.current.memoizedState.isDehydrated;if(A&&(Fs(_,w).flags|=256),w=vf(_,w,!1),w!==2){if(uf&&!A){_.errorRecoveryDisabledLanes|=g,Fi|=g,h=4;break e}g=kt,kt=h,g!==null&&(kt===null?kt=g:kt.push.apply(kt,g))}h=w}if(g=!1,h!==2)continue}}if(h===1){Fs(t,0),gi(t,r,0,!0);break}e:{switch(c=t,g=h,g){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:gi(c,r,en,!fi);break e;case 2:kt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=df+300-Kt(),10<h)){if(gi(c,r,en,!fi),ms(c,0,!0)!==0)break e;c.timeoutHandle=Xm(vm.bind(null,c,a,kt,no,hf,r,en,Fi,Ys,fi,g,2,-0,0),h);break e}vm(c,a,kt,no,hf,r,en,Fi,Ys,fi,g,0,-0,0)}}break}while(!0);wn(t)}function vm(t,r,a,c,h,g,w,_,A,D,K,X,B,U){if(t.timeoutHandle=-1,X=r.subtreeFlags,(X&8192||(X&16785408)===16785408)&&(Ta={stylesheets:null,count:0,unsuspend:S1},hm(r),X=x1(),X!==null)){t.cancelPendingCommit=X(Am.bind(null,t,r,g,a,c,h,w,_,A,K,1,B,U)),gi(t,g,w,!D);return}Am(t,r,g,a,c,h,w,_,A)}function Hw(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var h=a[c],g=h.getSnapshot;h=h.value;try{if(!Bt(g(),h))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function gi(t,r,a,c){r&=~ff,r&=~Fi,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var h=r;0<h;){var g=31-vt(h),w=1<<g;c[g]=-1,h&=~w}a!==0&&Md(t,a,r)}function io(){return(Ee&6)===0?(ba(0),!1):!0}function yf(){if(me!==null){if(Ae===0)var t=me.return;else t=me,jn=Vi=null,ju(t),$s=null,oa=0,t=me;for(;t!==null;)Jg(t.alternate,t),t=t.return;me=null}}function Fs(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,i1(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),yf(),je=t,me=a=Mn(t.current,null),Se=r,Ae=0,qt=null,fi=!1,Ks=ji(t,r),uf=!1,Ys=en=ff=Fi=hi=Ie=0,kt=ma=null,hf=!1,(r&8)!==0&&(r|=r&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=r;0<c;){var h=31-vt(c),g=1<<h;r|=t[h],c&=~g}return $n=r,El(),a}function Sm(t,r){pe=null,z.H=Gl,r===Wr||r===Ll?(r=Up(),Ae=3):r===Lp?(r=Up(),Ae=4):Ae=r===zg?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,qt=r,me===null&&(Ie=1,Fl(t,Ft(r,t.current)))}function wm(){var t=z.H;return z.H=Gl,t===null?Gl:t}function xm(){var t=z.A;return z.A=Uw,t}function bf(){Ie=4,fi||(Se&4194048)!==Se&&Wt.current!==null||(Ks=!0),(hi&134217727)===0&&(Fi&134217727)===0||je===null||gi(je,Se,en,!1)}function vf(t,r,a){var c=Ee;Ee|=2;var h=wm(),g=xm();(je!==t||Se!==r)&&(no=null,Fs(t,r)),r=!1;var w=Ie;e:do try{if(Ae!==0&&me!==null){var _=me,A=qt;switch(Ae){case 8:yf(),w=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(r=!0);var D=Ae;if(Ae=0,qt=null,Qs(t,_,A,D),a&&Ks){w=0;break e}break;default:D=Ae,Ae=0,qt=null,Qs(t,_,A,D)}}qw(),w=Ie;break}catch(K){Sm(t,K)}while(!0);return r&&t.shellSuspendCounter++,jn=Vi=null,Ee=c,z.H=h,z.A=g,me===null&&(je=null,Se=0,El()),w}function qw(){for(;me!==null;)_m(me)}function $w(t,r){var a=Ee;Ee|=2;var c=wm(),h=xm();je!==t||Se!==r?(no=null,to=Kt()+500,Fs(t,r)):Ks=ji(t,r);e:do try{if(Ae!==0&&me!==null){r=me;var g=qt;t:switch(Ae){case 1:Ae=0,qt=null,Qs(t,r,g,1);break;case 2:case 9:if(Dp(g)){Ae=0,qt=null,Tm(r);break}r=function(){Ae!==2&&Ae!==9||je!==t||(Ae=7),wn(t)},g.then(r,r);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:Dp(g)?(Ae=0,qt=null,Tm(r)):(Ae=0,qt=null,Qs(t,r,g,7));break;case 5:var w=null;switch(me.tag){case 26:w=me.memoizedState;case 5:case 27:var _=me;if(!w||ry(w)){Ae=0,qt=null;var A=_.sibling;if(A!==null)me=A;else{var D=_.return;D!==null?(me=D,so(D)):me=null}break t}}Ae=0,qt=null,Qs(t,r,g,5);break;case 6:Ae=0,qt=null,Qs(t,r,g,6);break;case 8:yf(),Ie=6;break e;default:throw Error(s(462))}}Iw();break}catch(K){Sm(t,K)}while(!0);return jn=Vi=null,z.H=c,z.A=h,Ee=a,me!==null?0:(je=null,Se=0,El(),Ie)}function Iw(){for(;me!==null&&!fl();)_m(me)}function _m(t){var r=Qg(t.alternate,t,$n);t.memoizedProps=t.pendingProps,r===null?so(t):me=r}function Tm(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=Gg(a,r,r.pendingProps,r.type,void 0,Se);break;case 11:r=Gg(a,r,r.pendingProps,r.type.render,r.ref,Se);break;case 5:ju(r);default:Jg(a,r),r=me=Ep(r,$n),r=Qg(a,r,$n)}t.memoizedProps=t.pendingProps,r===null?so(t):me=r}function Qs(t,r,a,c){jn=Vi=null,ju(r),$s=null,oa=0;var h=r.return;try{if(Ow(t,h,r,a,Se)){Ie=1,Fl(t,Ft(a,t.current)),me=null;return}}catch(g){if(h!==null)throw me=h,g;Ie=1,Fl(t,Ft(a,t.current)),me=null;return}r.flags&32768?(_e||c===1?t=!0:Ks||(Se&536870912)!==0?t=!1:(fi=t=!0,(c===2||c===9||c===3||c===6)&&(c=Wt.current,c!==null&&c.tag===13&&(c.flags|=16384))),Em(r,t)):so(r)}function so(t){var r=t;do{if((r.flags&32768)!==0){Em(r,fi);return}t=r.return;var a=jw(r.alternate,r,$n);if(a!==null){me=a;return}if(r=r.sibling,r!==null){me=r;return}me=r=t}while(r!==null);Ie===0&&(Ie=5)}function Em(t,r){do{var a=Lw(t.alternate,t);if(a!==null){a.flags&=32767,me=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){me=t;return}me=t=a}while(t!==null);Ie=6,me=null}function Am(t,r,a,c,h,g,w,_,A){t.cancelPendingCommit=null;do ro();while(rt!==0);if((Ee&6)!==0)throw Error(s(327));if(r!==null){if(r===t.current)throw Error(s(177));if(g=r.lanes|r.childLanes,g|=ou,SS(t,a,g,w,_,A),t===je&&(me=je=null,Se=0),Xs=r,pi=t,Ps=a,pf=g,gf=h,mm=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Yw(gs,function(){return Om(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=z.T,z.T=null,h=Q.p,Q.p=2,w=Ee,Ee|=4;try{Dw(t,r,a)}finally{Ee=w,Q.p=h,z.T=c}}rt=1,Nm(),Cm(),km()}}function Nm(){if(rt===1){rt=0;var t=pi,r=Xs,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Ee;Ee|=4;try{cm(r,t);var g=Of,w=gp(t.containerInfo),_=g.focusedElem,A=g.selectionRange;if(w!==_&&_&&_.ownerDocument&&pp(_.ownerDocument.documentElement,_)){if(A!==null&&iu(_)){var D=A.start,K=A.end;if(K===void 0&&(K=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(K,_.value.length);else{var X=_.ownerDocument||document,B=X&&X.defaultView||window;if(B.getSelection){var U=B.getSelection(),fe=_.textContent.length,oe=Math.min(A.start,fe),Me=A.end===void 0?oe:Math.min(A.end,fe);!U.extend&&oe>Me&&(w=Me,Me=oe,oe=w);var O=dp(_,oe),M=dp(_,Me);if(O&&M&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==M.node||U.focusOffset!==M.offset)){var L=X.createRange();L.setStart(O.node,O.offset),U.removeAllRanges(),oe>Me?(U.addRange(L),U.extend(M.node,M.offset)):(L.setEnd(M.node,M.offset),U.addRange(L))}}}}for(X=[],U=_;U=U.parentNode;)U.nodeType===1&&X.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<X.length;_++){var Y=X[_];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}bo=!!Mf,Of=Mf=null}finally{Ee=h,Q.p=c,z.T=a}}t.current=r,rt=2}}function Cm(){if(rt===2){rt=0;var t=pi,r=Xs,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Ee;Ee|=4;try{rm(t,r.alternate,r)}finally{Ee=h,Q.p=c,z.T=a}}rt=3}}function km(){if(rt===4||rt===3){rt=0,Mc();var t=pi,r=Xs,a=Ps,c=mm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?rt=5:(rt=0,Xs=pi=null,Mm(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(di=null),Bc(a),r=r.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Oi,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=z.T,h=Q.p,Q.p=2,z.T=null;try{for(var g=t.onRecoverableError,w=0;w<c.length;w++){var _=c[w];g(_.value,{componentStack:_.stack})}}finally{z.T=r,Q.p=h}}(Ps&3)!==0&&ro(),wn(t),h=t.pendingLanes,(a&4194090)!==0&&(h&42)!==0?t===mf?ya++:(ya=0,mf=t):ya=0,ba(0)}}function Mm(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Zr(r)))}function ro(t){return Nm(),Cm(),km(),Om()}function Om(){if(rt!==5)return!1;var t=pi,r=pf;pf=0;var a=Bc(Ps),c=z.T,h=Q.p;try{Q.p=32>a?32:a,z.T=null,a=gf,gf=null;var g=pi,w=Ps;if(rt=0,Xs=pi=null,Ps=0,(Ee&6)!==0)throw Error(s(331));var _=Ee;if(Ee|=4,pm(g.current),fm(g,g.current,w,a),Ee=_,ba(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Oi,g)}catch{}return!0}finally{Q.p=h,z.T=c,Mm(t,r)}}function Rm(t,r,a){r=Ft(a,r),r=Xu(t.stateNode,r,2),t=si(t,r,2),t!==null&&(Dr(t,2),wn(t))}function Oe(t,r,a){if(t.tag===3)Rm(t,t,a);else for(;r!==null;){if(r.tag===3){Rm(r,t,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(di===null||!di.has(c))){t=Ft(a,t),a=Bg(2),c=si(r,a,2),c!==null&&(Ug(a,c,r,t),Dr(c,2),wn(c));break}}r=r.return}}function Sf(t,r,a){var c=t.pingCache;if(c===null){c=t.pingCache=new zw;var h=new Set;c.set(r,h)}else h=c.get(r),h===void 0&&(h=new Set,c.set(r,h));h.has(a)||(uf=!0,h.add(a),t=Vw.bind(null,t,r,a),r.then(t,t))}function Vw(t,r,a){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,je===t&&(Se&a)===a&&(Ie===4||Ie===3&&(Se&62914560)===Se&&300>Kt()-df?(Ee&2)===0&&Fs(t,0):ff|=a,Ys===Se&&(Ys=0)),wn(t)}function jm(t,r){r===0&&(r=Jn()),t=Os(t,r),t!==null&&(Dr(t,r),wn(t))}function Gw(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),jm(t,a)}function Kw(t,r){var a=0;switch(t.tag){case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),jm(t,a)}function Yw(t,r){return ds(t,r)}var ao=null,Zs=null,wf=!1,lo=!1,xf=!1,Qi=0;function wn(t){t!==Zs&&t.next===null&&(Zs===null?ao=Zs=t:Zs=Zs.next=t),lo=!0,wf||(wf=!0,Pw())}function ba(t,r){if(!xf&&lo){xf=!0;do for(var a=!1,c=ao;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var w=c.suspendedLanes,_=c.pingedLanes;g=(1<<31-vt(42|t)+1)-1,g&=h&~(w&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,Um(c,g))}else g=Se,g=ms(c,c===je?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||ji(c,g)||(a=!0,Um(c,g));c=c.next}while(a);xf=!1}}function Xw(){Lm()}function Lm(){lo=wf=!1;var t=0;Qi!==0&&(n1()&&(t=Qi),Qi=0);for(var r=Kt(),a=null,c=ao;c!==null;){var h=c.next,g=Dm(c,r);g===0?(c.next=null,a===null?ao=h:a.next=h,h===null&&(Zs=a)):(a=c,(t!==0||(g&3)!==0)&&(lo=!0)),c=h}ba(t)}function Dm(t,r){for(var a=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var w=31-vt(g),_=1<<w,A=h[w];A===-1?((_&a)===0||(_&c)!==0)&&(h[w]=dl(_,r)):A<=r&&(t.expiredLanes|=_),g&=~_}if(r=je,a=Se,a=ms(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,a===0||t===r&&(Ae===2||Ae===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&bt(c),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||ji(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(c!==null&&bt(c),Bc(a)){case 2:case 8:a=Mi;break;case 32:a=gs;break;case 268435456:a=hl;break;default:a=gs}return c=Bm.bind(null,t),a=ds(a,c),t.callbackPriority=r,t.callbackNode=a,r}return c!==null&&c!==null&&bt(c),t.callbackPriority=2,t.callbackNode=null,2}function Bm(t,r){if(rt!==0&&rt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(ro()&&t.callbackNode!==a)return null;var c=Se;return c=ms(t,t===je?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(bm(t,c,r),Dm(t,Kt()),t.callbackNode!=null&&t.callbackNode===a?Bm.bind(null,t):null)}function Um(t,r){if(ro())return null;bm(t,r,!0)}function Pw(){s1(function(){(Ee&6)!==0?ds(ps,Xw):Lm()})}function _f(){return Qi===0&&(Qi=ce()),Qi}function zm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:bl(""+t)}function Hm(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function Fw(t,r,a,c,h){if(r==="submit"&&a&&a.stateNode===h){var g=zm((h[Et]||null).action),w=c.submitter;w&&(r=(r=w[Et]||null)?zm(r.formAction):w.getAttribute("formAction"),r!==null&&(g=r,w=null));var _=new xl("action","action",null,c,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Qi!==0){var A=w?Hm(h,w):new FormData(h);Iu(a,{pending:!0,data:A,method:h.method,action:g},null,A)}}else typeof g=="function"&&(_.preventDefault(),A=w?Hm(h,w):new FormData(h),Iu(a,{pending:!0,data:A,method:h.method,action:g},g,A))},currentTarget:h}]})}}for(var Tf=0;Tf<lu.length;Tf++){var Ef=lu[Tf],Qw=Ef.toLowerCase(),Zw=Ef[0].toUpperCase()+Ef.slice(1);fn(Qw,"on"+Zw)}fn(bp,"onAnimationEnd"),fn(vp,"onAnimationIteration"),fn(Sp,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(pw,"onTransitionRun"),fn(gw,"onTransitionStart"),fn(mw,"onTransitionCancel"),fn(wp,"onTransitionEnd"),ws("onMouseEnter",["mouseout","mouseover"]),ws("onMouseLeave",["mouseout","mouseover"]),ws("onPointerEnter",["pointerout","pointerover"]),ws("onPointerLeave",["pointerout","pointerover"]),Li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Li("onBeforeInput",["compositionend","keypress","textInput","paste"]),Li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var va="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Jw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(va));function qm(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],h=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var w=c.length-1;0<=w;w--){var _=c[w],A=_.instance,D=_.currentTarget;if(_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(K){Pl(K)}h.currentTarget=null,g=A}else for(w=0;w<c.length;w++){if(_=c[w],A=_.instance,D=_.currentTarget,_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(K){Pl(K)}h.currentTarget=null,g=A}}}}function ye(t,r){var a=r[Uc];a===void 0&&(a=r[Uc]=new Set);var c=t+"__bubble";a.has(c)||($m(r,t,2,!1),a.add(c))}function Af(t,r,a){var c=0;r&&(c|=4),$m(a,t,c,r)}var oo="_reactListening"+Math.random().toString(36).slice(2);function Nf(t){if(!t[oo]){t[oo]=!0,Ld.forEach(function(a){a!=="selectionchange"&&(Jw.has(a)||Af(a,!1,t),Af(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[oo]||(r[oo]=!0,Af("selectionchange",!1,r))}}function $m(t,r,a,c){switch(fy(r)){case 2:var h=E1;break;case 8:h=A1;break;default:h=$f}a=h.bind(null,r,a,t),h=void 0,!Pc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(r,a,{capture:!0,passive:h}):t.addEventListener(r,a,!0):h!==void 0?t.addEventListener(r,a,{passive:h}):t.addEventListener(r,a,!1)}function Cf(t,r,a,c,h){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var _=c.stateNode.containerInfo;if(_===h)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&w.stateNode.containerInfo===h)return;w=w.return}for(;_!==null;){if(w=bs(_),w===null)return;if(A=w.tag,A===5||A===6||A===26||A===27){c=g=w;continue e}_=_.parentNode}}c=c.return}Pd(function(){var D=g,K=Yc(a),X=[];e:{var B=xp.get(t);if(B!==void 0){var U=xl,fe=t;switch(t){case"keypress":if(Sl(a)===0)break e;case"keydown":case"keyup":U=YS;break;case"focusin":fe="focus",U=Jc;break;case"focusout":fe="blur",U=Jc;break;case"beforeblur":case"afterblur":U=Jc;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":U=Zd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=LS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=FS;break;case bp:case vp:case Sp:U=US;break;case wp:U=ZS;break;case"scroll":case"scrollend":U=RS;break;case"wheel":U=WS;break;case"copy":case"cut":case"paste":U=HS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Wd;break;case"toggle":case"beforetoggle":U=tw}var oe=(r&4)!==0,Me=!oe&&(t==="scroll"||t==="scrollend"),O=oe?B!==null?B+"Capture":null:B;oe=[];for(var M=D,L;M!==null;){var Y=M;if(L=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||L===null||O===null||(Y=zr(M,O),Y!=null&&oe.push(Sa(M,Y,L))),Me)break;M=M.return}0<oe.length&&(B=new U(B,fe,null,a,K),X.push({event:B,listeners:oe}))}}if((r&7)===0){e:{if(B=t==="mouseover"||t==="pointerover",U=t==="mouseout"||t==="pointerout",B&&a!==Kc&&(fe=a.relatedTarget||a.fromElement)&&(bs(fe)||fe[ys]))break e;if((U||B)&&(B=K.window===K?K:(B=K.ownerDocument)?B.defaultView||B.parentWindow:window,U?(fe=a.relatedTarget||a.toElement,U=D,fe=fe?bs(fe):null,fe!==null&&(Me=o(fe),oe=fe.tag,fe!==Me||oe!==5&&oe!==27&&oe!==6)&&(fe=null)):(U=null,fe=D),U!==fe)){if(oe=Zd,Y="onMouseLeave",O="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(oe=Wd,Y="onPointerLeave",O="onPointerEnter",M="pointer"),Me=U==null?B:Ur(U),L=fe==null?B:Ur(fe),B=new oe(Y,M+"leave",U,a,K),B.target=Me,B.relatedTarget=L,Y=null,bs(K)===D&&(oe=new oe(O,M+"enter",fe,a,K),oe.target=L,oe.relatedTarget=Me,Y=oe),Me=Y,U&&fe)t:{for(oe=U,O=fe,M=0,L=oe;L;L=Js(L))M++;for(L=0,Y=O;Y;Y=Js(Y))L++;for(;0<M-L;)oe=Js(oe),M--;for(;0<L-M;)O=Js(O),L--;for(;M--;){if(oe===O||O!==null&&oe===O.alternate)break t;oe=Js(oe),O=Js(O)}oe=null}else oe=null;U!==null&&Im(X,B,U,oe,!1),fe!==null&&Me!==null&&Im(X,Me,fe,oe,!0)}}e:{if(B=D?Ur(D):window,U=B.nodeName&&B.nodeName.toLowerCase(),U==="select"||U==="input"&&B.type==="file")var ne=lp;else if(rp(B))if(op)ne=fw;else{ne=cw;var ge=ow}else U=B.nodeName,!U||U.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?D&&Gc(D.elementType)&&(ne=lp):ne=uw;if(ne&&(ne=ne(t,D))){ap(X,ne,a,K);break e}ge&&ge(t,B,D),t==="focusout"&&D&&B.type==="number"&&D.memoizedProps.value!=null&&Vc(B,"number",B.value)}switch(ge=D?Ur(D):window,t){case"focusin":(rp(ge)||ge.contentEditable==="true")&&(Cs=ge,su=D,Yr=null);break;case"focusout":Yr=su=Cs=null;break;case"mousedown":ru=!0;break;case"contextmenu":case"mouseup":case"dragend":ru=!1,mp(X,a,K);break;case"selectionchange":if(dw)break;case"keydown":case"keyup":mp(X,a,K)}var re;if(eu)e:{switch(t){case"compositionstart":var ue="onCompositionStart";break e;case"compositionend":ue="onCompositionEnd";break e;case"compositionupdate":ue="onCompositionUpdate";break e}ue=void 0}else Ns?ip(t,a)&&(ue="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(ue="onCompositionStart");ue&&(ep&&a.locale!=="ko"&&(Ns||ue!=="onCompositionStart"?ue==="onCompositionEnd"&&Ns&&(re=Fd()):(ei=K,Fc="value"in ei?ei.value:ei.textContent,Ns=!0)),ge=co(D,ue),0<ge.length&&(ue=new Jd(ue,t,null,a,K),X.push({event:ue,listeners:ge}),re?ue.data=re:(re=sp(a),re!==null&&(ue.data=re)))),(re=iw?sw(t,a):rw(t,a))&&(ue=co(D,"onBeforeInput"),0<ue.length&&(ge=new Jd("onBeforeInput","beforeinput",null,a,K),X.push({event:ge,listeners:ue}),ge.data=re)),Fw(X,t,D,a,K)}qm(X,r)})}function Sa(t,r,a){return{instance:t,listener:r,currentTarget:a}}function co(t,r){for(var a=r+"Capture",c=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=zr(t,a),h!=null&&c.unshift(Sa(t,h,g)),h=zr(t,r),h!=null&&c.push(Sa(t,h,g))),t.tag===3)return c;t=t.return}return[]}function Js(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Im(t,r,a,c,h){for(var g=r._reactName,w=[];a!==null&&a!==c;){var _=a,A=_.alternate,D=_.stateNode;if(_=_.tag,A!==null&&A===c)break;_!==5&&_!==26&&_!==27||D===null||(A=D,h?(D=zr(a,g),D!=null&&w.unshift(Sa(a,D,A))):h||(D=zr(a,g),D!=null&&w.push(Sa(a,D,A)))),a=a.return}w.length!==0&&t.push({event:r,listeners:w})}var Ww=/\r\n?/g,e1=/\u0000|\uFFFD/g;function Vm(t){return(typeof t=="string"?t:""+t).replace(Ww,`
`).replace(e1,"")}function Gm(t,r){return r=Vm(r),Vm(t)===r}function uo(){}function ke(t,r,a,c,h,g){switch(a){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||Ts(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&Ts(t,""+c);break;case"className":gl(t,"class",c);break;case"tabIndex":gl(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":gl(t,a,c);break;case"style":Yd(t,c,g);break;case"data":if(r!=="object"){gl(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=bl(""+c),t.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){t.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 g=="function"&&(a==="formAction"?(r!=="input"&&ke(t,r,"name",h.name,h,null),ke(t,r,"formEncType",h.formEncType,h,null),ke(t,r,"formMethod",h.formMethod,h,null),ke(t,r,"formTarget",h.formTarget,h,null)):(ke(t,r,"encType",h.encType,h,null),ke(t,r,"method",h.method,h,null),ke(t,r,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=bl(""+c),t.setAttribute(a,c);break;case"onClick":c!=null&&(t.onclick=uo);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}a=bl(""+c),t.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":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""+c):t.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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":c===!0?t.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,c):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(a,c):t.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(a):t.setAttribute(a,c);break;case"popover":ye("beforetoggle",t),ye("toggle",t),pl(t,"popover",c);break;case"xlinkActuate":Cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Cn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Cn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Cn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Cn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":pl(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=MS.get(a)||a,pl(t,a,c))}}function kf(t,r,a,c,h,g){switch(a){case"style":Yd(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}break;case"children":typeof c=="string"?Ts(t,c):(typeof c=="number"||typeof c=="bigint")&&Ts(t,""+c);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"onClick":c!=null&&(t.onclick=uo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),r=a.slice(2,h?a.length-7:void 0),g=t[Et]||null,g=g!=null?g[a]:null,typeof g=="function"&&t.removeEventListener(r,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,c,h);break e}a in t?t[a]=c:c===!0?t.setAttribute(a,""):pl(t,a,c)}}}function at(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",t),ye("load",t);var c=!1,h=!1,g;for(g in a)if(a.hasOwnProperty(g)){var w=a[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,g,w,a,null)}}h&&ke(t,r,"srcSet",a.srcSet,a,null),c&&ke(t,r,"src",a.src,a,null);return;case"input":ye("invalid",t);var _=g=w=h=null,A=null,D=null;for(c in a)if(a.hasOwnProperty(c)){var K=a[c];if(K!=null)switch(c){case"name":h=K;break;case"type":w=K;break;case"checked":A=K;break;case"defaultChecked":D=K;break;case"value":g=K;break;case"defaultValue":_=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(s(137,r));break;default:ke(t,r,c,K,a,null)}}Id(t,g,_,A,D,w,h,!1),ml(t);return;case"select":ye("invalid",t),c=w=g=null;for(h in a)if(a.hasOwnProperty(h)&&(_=a[h],_!=null))switch(h){case"value":g=_;break;case"defaultValue":w=_;break;case"multiple":c=_;default:ke(t,r,h,_,a,null)}r=g,a=w,t.multiple=!!c,r!=null?_s(t,!!c,r,!1):a!=null&&_s(t,!!c,a,!0);return;case"textarea":ye("invalid",t),g=h=c=null;for(w in a)if(a.hasOwnProperty(w)&&(_=a[w],_!=null))switch(w){case"value":c=_;break;case"defaultValue":h=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(91));break;default:ke(t,r,w,_,a,null)}Gd(t,c,h,g),ml(t);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(c=a[A],c!=null))switch(A){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:ke(t,r,A,c,a,null)}return;case"dialog":ye("beforetoggle",t),ye("toggle",t),ye("cancel",t),ye("close",t);break;case"iframe":case"object":ye("load",t);break;case"video":case"audio":for(c=0;c<va.length;c++)ye(va[c],t);break;case"image":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"embed":case"source":case"link":ye("error",t),ye("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(c=a[D],c!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,D,c,a,null)}return;default:if(Gc(r)){for(K in a)a.hasOwnProperty(K)&&(c=a[K],c!==void 0&&kf(t,r,K,c,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(c=a[_],c!=null&&ke(t,r,_,c,a,null))}function t1(t,r,a,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,w=null,_=null,A=null,D=null,K=null;for(U in a){var X=a[U];if(a.hasOwnProperty(U)&&X!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":A=X;default:c.hasOwnProperty(U)||ke(t,r,U,null,c,X)}}for(var B in c){var U=c[B];if(X=a[B],c.hasOwnProperty(B)&&(U!=null||X!=null))switch(B){case"type":g=U;break;case"name":h=U;break;case"checked":D=U;break;case"defaultChecked":K=U;break;case"value":w=U;break;case"defaultValue":_=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:U!==X&&ke(t,r,B,U,c,X)}}Ic(t,w,_,A,D,K,g,h);return;case"select":U=w=_=B=null;for(g in a)if(A=a[g],a.hasOwnProperty(g)&&A!=null)switch(g){case"value":break;case"multiple":U=A;default:c.hasOwnProperty(g)||ke(t,r,g,null,c,A)}for(h in c)if(g=c[h],A=a[h],c.hasOwnProperty(h)&&(g!=null||A!=null))switch(h){case"value":B=g;break;case"defaultValue":_=g;break;case"multiple":w=g;default:g!==A&&ke(t,r,h,g,c,A)}r=_,a=w,c=U,B!=null?_s(t,!!a,B,!1):!!c!=!!a&&(r!=null?_s(t,!!a,r,!0):_s(t,!!a,a?[]:"",!1));return;case"textarea":U=B=null;for(_ in a)if(h=a[_],a.hasOwnProperty(_)&&h!=null&&!c.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ke(t,r,_,null,c,h)}for(w in c)if(h=c[w],g=a[w],c.hasOwnProperty(w)&&(h!=null||g!=null))switch(w){case"value":B=h;break;case"defaultValue":U=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&ke(t,r,w,h,c,g)}Vd(t,B,U);return;case"option":for(var fe in a)if(B=a[fe],a.hasOwnProperty(fe)&&B!=null&&!c.hasOwnProperty(fe))switch(fe){case"selected":t.selected=!1;break;default:ke(t,r,fe,null,c,B)}for(A in c)if(B=c[A],U=a[A],c.hasOwnProperty(A)&&B!==U&&(B!=null||U!=null))switch(A){case"selected":t.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:ke(t,r,A,B,c,U)}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 oe in a)B=a[oe],a.hasOwnProperty(oe)&&B!=null&&!c.hasOwnProperty(oe)&&ke(t,r,oe,null,c,B);for(D in c)if(B=c[D],U=a[D],c.hasOwnProperty(D)&&B!==U&&(B!=null||U!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,r));break;default:ke(t,r,D,B,c,U)}return;default:if(Gc(r)){for(var Me in a)B=a[Me],a.hasOwnProperty(Me)&&B!==void 0&&!c.hasOwnProperty(Me)&&kf(t,r,Me,void 0,c,B);for(K in c)B=c[K],U=a[K],!c.hasOwnProperty(K)||B===U||B===void 0&&U===void 0||kf(t,r,K,B,c,U);return}}for(var O in a)B=a[O],a.hasOwnProperty(O)&&B!=null&&!c.hasOwnProperty(O)&&ke(t,r,O,null,c,B);for(X in c)B=c[X],U=a[X],!c.hasOwnProperty(X)||B===U||B==null&&U==null||ke(t,r,X,B,c,U)}var Mf=null,Of=null;function fo(t){return t.nodeType===9?t:t.ownerDocument}function Km(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ym(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function Rf(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var jf=null;function n1(){var t=window.event;return t&&t.type==="popstate"?t===jf?!1:(jf=t,!0):(jf=null,!1)}var Xm=typeof setTimeout=="function"?setTimeout:void 0,i1=typeof clearTimeout=="function"?clearTimeout:void 0,Pm=typeof Promise=="function"?Promise:void 0,s1=typeof queueMicrotask=="function"?queueMicrotask:typeof Pm<"u"?function(t){return Pm.resolve(null).then(t).catch(r1)}:Xm;function r1(t){setTimeout(function(){throw t})}function mi(t){return t==="head"}function Fm(t,r){var a=r,c=0,h=0;do{var g=a.nextSibling;if(t.removeChild(a),g&&g.nodeType===8)if(a=g.data,a==="/$"){if(0<c&&8>c){a=c;var w=t.ownerDocument;if(a&1&&wa(w.documentElement),a&2&&wa(w.body),a&4)for(a=w.head,wa(a),w=a.firstChild;w;){var _=w.nextSibling,A=w.nodeName;w[Br]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&w.rel.toLowerCase()==="stylesheet"||a.removeChild(w),w=_}}if(h===0){t.removeChild(g),ka(r);return}h--}else a==="$"||a==="$?"||a==="$!"?h++:c=a.charCodeAt(0)-48;else c=0;a=g}while(a);ka(r)}function Lf(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Lf(a),zc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function a1(t,r,a,c){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Br])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=dn(t.nextSibling),t===null)break}return null}function l1(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=dn(t.nextSibling),t===null))return null;return t}function Df(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function o1(t,r){var a=t.ownerDocument;if(t.data!=="$?"||a.readyState==="complete")r();else{var c=function(){r(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function dn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var Bf=null;function Qm(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return t;r--}else a==="/$"&&r++}t=t.previousSibling}return null}function Zm(t,r,a){switch(r=fo(a),t){case"html":if(t=r.documentElement,!t)throw Error(s(452));return t;case"head":if(t=r.head,!t)throw Error(s(453));return t;case"body":if(t=r.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function wa(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);zc(t)}var tn=new Map,Jm=new Set;function ho(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var In=Q.d;Q.d={f:c1,r:u1,D:f1,C:h1,L:d1,m:p1,X:m1,S:g1,M:y1};function c1(){var t=In.f(),r=io();return t||r}function u1(t){var r=vs(t);r!==null&&r.tag===5&&r.type==="form"?bg(r):In.r(t)}var Ws=typeof document>"u"?null:document;function Wm(t,r,a){var c=Ws;if(c&&typeof r=="string"&&r){var h=Pt(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),Jm.has(h)||(Jm.add(h),t={rel:t,crossOrigin:a,href:r},c.querySelector(h)===null&&(r=c.createElement("link"),at(r,"link",t),et(r),c.head.appendChild(r)))}}function f1(t){In.D(t),Wm("dns-prefetch",t,null)}function h1(t,r){In.C(t,r),Wm("preconnect",t,r)}function d1(t,r,a){In.L(t,r,a);var c=Ws;if(c&&t&&r){var h='link[rel="preload"][as="'+Pt(r)+'"]';r==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Pt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Pt(a.imageSizes)+'"]')):h+='[href="'+Pt(t)+'"]';var g=h;switch(r){case"style":g=er(t);break;case"script":g=tr(t)}tn.has(g)||(t=m({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),tn.set(g,t),c.querySelector(h)!==null||r==="style"&&c.querySelector(xa(g))||r==="script"&&c.querySelector(_a(g))||(r=c.createElement("link"),at(r,"link",t),et(r),c.head.appendChild(r)))}}function p1(t,r){In.m(t,r);var a=Ws;if(a&&t){var c=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Pt(c)+'"][href="'+Pt(t)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=tr(t)}if(!tn.has(g)&&(t=m({rel:"modulepreload",href:t},r),tn.set(g,t),a.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(_a(g)))return}c=a.createElement("link"),at(c,"link",t),et(c),a.head.appendChild(c)}}}function g1(t,r,a){In.S(t,r,a);var c=Ws;if(c&&t){var h=Ss(c).hoistableStyles,g=er(t);r=r||"default";var w=h.get(g);if(!w){var _={loading:0,preload:null};if(w=c.querySelector(xa(g)))_.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},a),(a=tn.get(g))&&Uf(t,a);var A=w=c.createElement("link");et(A),at(A,"link",t),A._p=new Promise(function(D,K){A.onload=D,A.onerror=K}),A.addEventListener("load",function(){_.loading|=1}),A.addEventListener("error",function(){_.loading|=2}),_.loading|=4,po(w,r,c)}w={type:"stylesheet",instance:w,count:1,state:_},h.set(g,w)}}}function m1(t,r){In.X(t,r);var a=Ws;if(a&&t){var c=Ss(a).hoistableScripts,h=tr(t),g=c.get(h);g||(g=a.querySelector(_a(h)),g||(t=m({src:t,async:!0},r),(r=tn.get(h))&&zf(t,r),g=a.createElement("script"),et(g),at(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function y1(t,r){In.M(t,r);var a=Ws;if(a&&t){var c=Ss(a).hoistableScripts,h=tr(t),g=c.get(h);g||(g=a.querySelector(_a(h)),g||(t=m({src:t,async:!0,type:"module"},r),(r=tn.get(h))&&zf(t,r),g=a.createElement("script"),et(g),at(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function ey(t,r,a,c){var h=(h=te.current)?ho(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=er(a.href),a=Ss(h).hoistableStyles,c=a.get(r),c||(c={type:"style",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=er(a.href);var g=Ss(h).hoistableStyles,w=g.get(t);if(w||(h=h.ownerDocument||h,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,w),(g=h.querySelector(xa(t)))&&!g._p&&(w.instance=g,w.state.loading=5),tn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},tn.set(t,a),g||b1(h,t,a,w.state))),r&&c===null)throw Error(s(528,""));return w}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=tr(a),a=Ss(h).hoistableScripts,c=a.get(r),c||(c={type:"script",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function er(t){return'href="'+Pt(t)+'"'}function xa(t){return'link[rel="stylesheet"]['+t+"]"}function ty(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function b1(t,r,a,c){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=t.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),at(r,"link",a),et(r),t.head.appendChild(r))}function tr(t){return'[src="'+Pt(t)+'"]'}function _a(t){return"script[async]"+t}function ny(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+Pt(a.href)+'"]');if(c)return r.instance=c,et(c),c;var h=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),et(c),at(c,"style",h),po(c,a.precedence,t),r.instance=c;case"stylesheet":h=er(a.href);var g=t.querySelector(xa(h));if(g)return r.state.loading|=4,r.instance=g,et(g),g;c=ty(a),(h=tn.get(h))&&Uf(c,h),g=(t.ownerDocument||t).createElement("link"),et(g);var w=g;return w._p=new Promise(function(_,A){w.onload=_,w.onerror=A}),at(g,"link",c),r.state.loading|=4,po(g,a.precedence,t),r.instance=g;case"script":return g=tr(a.src),(h=t.querySelector(_a(g)))?(r.instance=h,et(h),h):(c=a,(h=tn.get(g))&&(c=m({},a),zf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),et(h),at(h,"link",c),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,po(c,a.precedence,t));return r.instance}function po(t,r,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,w=0;w<c.length;w++){var _=c[w];if(_.dataset.precedence===r)g=_;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function Uf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function zf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var go=null;function iy(t,r,a){if(go===null){var c=new Map,h=go=new Map;h.set(a,c)}else h=go,c=h.get(a),c||(c=new Map,h.set(a,c));if(c.has(t))return c;for(c.set(t,null),a=a.getElementsByTagName(t),h=0;h<a.length;h++){var g=a[h];if(!(g[Br]||g[ft]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(r)||"";w=t+w;var _=c.get(w);_?_.push(g):c.set(w,[g])}}return c}function sy(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function v1(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function ry(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var Ta=null;function S1(){}function w1(t,r,a){if(Ta===null)throw Error(s(475));var c=Ta;if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=er(a.href),g=t.querySelector(xa(h));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=mo.bind(c),t.then(c,c)),r.state.loading|=4,r.instance=g,et(g);return}g=t.ownerDocument||t,a=ty(a),(h=tn.get(h))&&Uf(a,h),g=g.createElement("link"),et(g);var w=g;w._p=new Promise(function(_,A){w.onload=_,w.onerror=A}),at(g,"link",a),r.instance=g}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(c.count++,r=mo.bind(c),t.addEventListener("load",r),t.addEventListener("error",r))}}function x1(){if(Ta===null)throw Error(s(475));var t=Ta;return t.stylesheets&&t.count===0&&Hf(t,t.stylesheets),0<t.count?function(r){var a=setTimeout(function(){if(t.stylesheets&&Hf(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(a)}}:null}function mo(){if(this.count--,this.count===0){if(this.stylesheets)Hf(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var yo=null;function Hf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,yo=new Map,r.forEach(_1,t),yo=null,mo.call(t))}function _1(t,r){if(!(r.state.loading&4)){var a=yo.get(t);if(a)var c=a.get(null);else{a=new Map,yo.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var w=h[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(a.set(w.dataset.precedence,w),c=w)}c&&a.set(null,c)}h=r.instance,w=h.getAttribute("data-precedence"),g=a.get(w)||c,g===c&&a.set(null,h),a.set(w,h),this.count++,c=mo.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var Ea={$$typeof:$,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function T1(t,r,a,c,h,g,w,_){this.tag=1,this.containerInfo=t,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=un(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=un(0),this.hiddenUpdates=un(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function ay(t,r,a,c,h,g,w,_,A,D,K,X){return t=new T1(t,r,a,w,_,A,D,X),r=1,g===!0&&(r|=24),g=Ut(3,null,null,r),t.current=g,g.stateNode=t,r=vu(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:a,cache:r},_u(g),t}function ly(t){return t?(t=Rs,t):Rs}function oy(t,r,a,c,h,g){h=ly(h),c.context===null?c.context=h:c.pendingContext=h,c=ii(r),c.payload={element:a},g=g===void 0?null:g,g!==null&&(c.callback=g),a=si(t,c,r),a!==null&&(It(a,t,r),ta(a,t,r))}function cy(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function qf(t,r){cy(t,r),(t=t.alternate)&&cy(t,r)}function uy(t){if(t.tag===13){var r=Os(t,67108864);r!==null&&It(r,t,67108864),qf(t,67108864)}}var bo=!0;function E1(t,r,a,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=2,$f(t,r,a,c)}finally{Q.p=g,z.T=h}}function A1(t,r,a,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=8,$f(t,r,a,c)}finally{Q.p=g,z.T=h}}function $f(t,r,a,c){if(bo){var h=If(c);if(h===null)Cf(t,r,c,vo,a),hy(t,c);else if(C1(h,t,r,a,c))c.stopPropagation();else if(hy(t,c),r&4&&-1<N1.indexOf(t)){for(;h!==null;){var g=vs(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Nn(g.pendingLanes);if(w!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;w;){var A=1<<31-vt(w);_.entanglements[1]|=A,w&=~A}wn(g),(Ee&6)===0&&(to=Kt()+500,ba(0))}}break;case 13:_=Os(g,2),_!==null&&It(_,g,2),io(),qf(g,2)}if(g=If(c),g===null&&Cf(t,r,c,vo,a),g===h)break;h=g}h!==null&&c.stopPropagation()}else Cf(t,r,c,null,a)}}function If(t){return t=Yc(t),Vf(t)}var vo=null;function Vf(t){if(vo=null,t=bs(t),t!==null){var r=o(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=u(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return vo=t,null}function fy(t){switch(t){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(Lr()){case ps:return 2;case Mi:return 8;case gs:case Qn:return 32;case hl:return 268435456;default:return 32}default:return 32}}var Gf=!1,yi=null,bi=null,vi=null,Aa=new Map,Na=new Map,Si=[],N1="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 hy(t,r){switch(t){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":bi=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":Aa.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(r.pointerId)}}function Ca(t,r,a,c,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},r!==null&&(r=vs(r),r!==null&&uy(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function C1(t,r,a,c,h){switch(r){case"focusin":return yi=Ca(yi,t,r,a,c,h),!0;case"dragenter":return bi=Ca(bi,t,r,a,c,h),!0;case"mouseover":return vi=Ca(vi,t,r,a,c,h),!0;case"pointerover":var g=h.pointerId;return Aa.set(g,Ca(Aa.get(g)||null,t,r,a,c,h)),!0;case"gotpointercapture":return g=h.pointerId,Na.set(g,Ca(Na.get(g)||null,t,r,a,c,h)),!0}return!1}function dy(t){var r=bs(t.target);if(r!==null){var a=o(r);if(a!==null){if(r=a.tag,r===13){if(r=u(a),r!==null){t.blockedOn=r,wS(t.priority,function(){if(a.tag===13){var c=$t();c=Dc(c);var h=Os(a,c);h!==null&&It(h,a,c),qf(a,c)}});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function So(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=If(t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Kc=c,a.target.dispatchEvent(c),Kc=null}else return r=vs(a),r!==null&&uy(r),t.blockedOn=a,!1;r.shift()}return!0}function py(t,r,a){So(t)&&a.delete(r)}function k1(){Gf=!1,yi!==null&&So(yi)&&(yi=null),bi!==null&&So(bi)&&(bi=null),vi!==null&&So(vi)&&(vi=null),Aa.forEach(py),Na.forEach(py)}function wo(t,r){t.blockedOn===r&&(t.blockedOn=null,Gf||(Gf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,k1)))}var xo=null;function gy(t){xo!==t&&(xo=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){xo===t&&(xo=null);for(var r=0;r<t.length;r+=3){var a=t[r],c=t[r+1],h=t[r+2];if(typeof c!="function"){if(Vf(c||a)===null)continue;break}var g=vs(a);g!==null&&(t.splice(r,3),r-=3,Iu(g,{pending:!0,data:h,method:a.method,action:c},c,h))}}))}function ka(t){function r(A){return wo(A,t)}yi!==null&&wo(yi,t),bi!==null&&wo(bi,t),vi!==null&&wo(vi,t),Aa.forEach(r),Na.forEach(r);for(var a=0;a<Si.length;a++){var c=Si[a];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Si.length&&(a=Si[0],a.blockedOn===null);)dy(a),a.blockedOn===null&&Si.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var h=a[c],g=a[c+1],w=h[Et]||null;if(typeof g=="function")w||gy(a);else if(w){var _=null;if(g&&g.hasAttribute("formAction")){if(h=g,w=g[Et]||null)_=w.formAction;else if(Vf(h)!==null)continue}else _=w.action;typeof _=="function"?a[c+1]=_:(a.splice(c,3),c-=3),gy(a)}}}function Kf(t){this._internalRoot=t}_o.prototype.render=Kf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,c=$t();oy(a,c,t,r,null,null)},_o.prototype.unmount=Kf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;oy(t.current,2,null,t,null,null),io(),r[ys]=null}};function _o(t){this._internalRoot=t}_o.prototype.unstable_scheduleHydration=function(t){if(t){var r=Rd();t={blockedOn:null,target:t,priority:r};for(var a=0;a<Si.length&&r!==0&&r<Si[a].priority;a++);Si.splice(a,0,t),a===0&&dy(t)}};var my=e.version;if(my!=="19.1.1")throw Error(s(527,my,"19.1.1"));Q.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=d(r),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var M1={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var To=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!To.isDisabled&&To.supportsFiber)try{Oi=To.inject(M1),ut=To}catch{}}return Oa.createRoot=function(t,r){if(!l(t))throw Error(s(299));var a=!1,c="",h=Rg,g=jg,w=Lg,_=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(w=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(_=r.unstable_transitionCallbacks)),r=ay(t,1,!1,null,null,a,c,h,g,w,_,null),t[ys]=r.current,Nf(t),new Kf(r)},Oa.hydrateRoot=function(t,r,a){if(!l(t))throw Error(s(299));var c=!1,h="",g=Rg,w=jg,_=Lg,A=null,D=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(w=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(A=a.unstable_transitionCallbacks),a.formState!==void 0&&(D=a.formState)),r=ay(t,1,!0,r,a??null,c,h,g,w,_,A,D),r.context=ly(null),a=r.current,c=$t(),c=Dc(c),h=ii(c),h.callback=null,si(a,h,c),a=c,r.current.lanes=a,Dr(r,a),wn(r),t[ys]=r.current,Nf(t),new _o(r)},Oa.version="19.1.1",Oa}var Cy;function F1(){if(Cy)return Pf.exports;Cy=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(e){console.error(e)}}return n(),Pf.exports=P1(),Pf.exports}var s2=F1();const Mb=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser",pausesBeforeAction:!0}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Worker.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pausesBeforeAction:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function Q1(n,e){var i;return(i=Z1(n,e))==null?void 0:i.replaceAll(`
`,"\\n")}function Z1(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const l=new URL(n[i]);return l.protocol==="data:"?l.protocol:l.protocol==="about:"?n[i]:l.pathname+l.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const s=J1(n,i);if(s!==void 0)return s}}function J1(n,e){const i=e.split(".");let s=n;for(const l of i){if(typeof s!="object"||s===null)return;s=s[l]}if(s!==void 0)return String(s)}function W1(n){var e;return(e=Mb.get(n.type+"."+n.method))==null?void 0:e.group}const Ha=Symbol("context"),Ob=Symbol("nextInContext"),Rb=Symbol("prevByEndTime"),jb=Symbol("nextByStartTime"),ky=Symbol("events");class r2{constructor(e,i){Te(this,"startTime");Te(this,"endTime");Te(this,"browserName");Te(this,"channel");Te(this,"platform");Te(this,"playwrightVersion");Te(this,"wallTime");Te(this,"title");Te(this,"options");Te(this,"pages");Te(this,"actions");Te(this,"attachments");Te(this,"visibleAttachments");Te(this,"events");Te(this,"stdio");Te(this,"errors");Te(this,"errorDescriptors");Te(this,"hasSource");Te(this,"hasStepData");Te(this,"sdkLanguage");Te(this,"testIdAttributeName");Te(this,"sources");Te(this,"resources");Te(this,"actionCounters");Te(this,"traceUrl");var l;i.forEach(o=>ex(o));const s=i.find(o=>o.origin==="library");this.traceUrl=e,this.browserName=(s==null?void 0:s.browserName)||"",this.sdkLanguage=s==null?void 0:s.sdkLanguage,this.channel=s==null?void 0:s.channel,this.testIdAttributeName=s==null?void 0:s.testIdAttributeName,this.platform=(s==null?void 0:s.platform)||"",this.playwrightVersion=(l=i.find(o=>o.playwrightVersion))==null?void 0:l.playwrightVersion,this.title=(s==null?void 0:s.title)||"",this.options=(s==null?void 0:s.options)||{},this.actions=tx(i),this.pages=[].concat(...i.map(o=>o.pages)),this.wallTime=i.map(o=>o.wallTime).reduce((o,u)=>Math.min(o||Number.MAX_VALUE,u),Number.MAX_VALUE),this.startTime=i.map(o=>o.startTime).reduce((o,u)=>Math.min(o,u),Number.MAX_VALUE),this.endTime=i.map(o=>o.endTime).reduce((o,u)=>Math.max(o,u),Number.MIN_VALUE),this.events=[].concat(...i.map(o=>o.events)),this.stdio=[].concat(...i.map(o=>o.stdio)),this.errors=[].concat(...i.map(o=>o.errors)),this.hasSource=i.some(o=>o.hasSource),this.hasStepData=i.some(o=>o.origin==="testRunner"),this.resources=[...i.map(o=>o.resources)].flat(),this.attachments=this.actions.flatMap(o=>{var u;return((u=o.attachments)==null?void 0:u.map(f=>({...f,callId:o.callId,traceUrl:e})))??[]}),this.visibleAttachments=this.attachments.filter(o=>!o.name.startsWith("_")),this.events.sort((o,u)=>o.time-u.time),this.resources.sort((o,u)=>o._monotonicTime-u._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=cx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const o of this.actions)o.group=o.group??W1({type:o.class,method:o.method}),o.group&&this.actionCounters.set(o.group,1+(this.actionCounters.get(o.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUrl),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(s=>!s.group||i.has(s.group))}_errorDescriptorsFromActions(){var i;const e=[];for(const s of this.actions||[])(i=s.error)!=null&&i.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function ex(n){for(const i of n.pages)i[Ha]=n;for(let i=0;i<n.actions.length;++i){const s=n.actions[i];s[Ha]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const s=n.actions[i];s[Ob]=e,s.class!=="Route"&&(e=s)}for(const i of n.events)i[Ha]=n;for(const i of n.resources)i[Ha]=n}function tx(n){const e=[],i=nx(n);e.push(...i),e.sort((s,l)=>l.parentId===s.callId?1:s.parentId===l.callId?-1:s.endTime-l.endTime);for(let s=1;s<e.length;++s)e[s][Rb]=e[s-1];e.sort((s,l)=>l.parentId===s.callId?-1:s.parentId===l.callId?1:s.startTime-l.startTime);for(let s=0;s+1<e.length;++s)e[s][jb]=e[s+1];return e}let My=0;function nx(n){const e=new Map,i=n.filter(u=>u.origin==="library"),s=n.filter(u=>u.origin==="testRunner");if(!s.length||!i.length)return n.map(u=>u.actions.map(f=>({...f,context:u}))).flat();for(const u of i)for(const f of u.actions)e.set(f.stepId||`tmp-step@${++My}`,{...f,context:u});const l=sx(s,e);l&&ix(i,l);const o=new Map;for(const u of s)for(const f of u.actions){const d=f.stepId&&e.get(f.stepId);if(d){o.set(f.callId,d.callId),f.error&&(d.error=f.error),f.attachments&&(d.attachments=f.attachments),f.annotations&&(d.annotations=f.annotations),f.parentId&&(d.parentId=o.get(f.parentId)??f.parentId),f.group&&(d.group=f.group),d.startTime=f.startTime,d.endTime=f.endTime;continue}f.parentId&&(f.parentId=o.get(f.parentId)??f.parentId),e.set(f.stepId||`tmp-step@${++My}`,{...f,context:u})}return[...e.values()]}function ix(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const s of i.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of i.events)s.time+=e;for(const s of i.stdio)s.timestamp+=e;for(const s of i.pages)for(const l of s.screencastFrames)l.timestamp+=e;for(const s of i.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function sx(n,e){for(const i of n)for(const s of i.actions){if(!s.startTime)continue;const l=s.stepId?e.get(s.stepId):void 0;if(l)return s.startTime-l.startTime}return 0}function rx(n){const e=new Map;for(const s of n)e.set(s.callId,{id:s.callId,parent:void 0,children:[],action:s});const i={id:"",parent:void 0,children:[]};for(const s of e.values()){const l=s.action.parentId&&e.get(s.action.parentId)||i;l.children.push(s),s.parent=l}return{rootItem:i,itemMap:e}}function Lb(n){return n[Ha]}function ax(n){return n[Ob]}function Oy(n){return n[Rb]}function Ry(n){return n[jb]}function lx(n){let e=0,i=0;for(const s of ox(n)){if(s.type==="console"){const l=s.messageType;l==="warning"?++i:l==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:i}}function ox(n){let e=n[ky];if(e)return e;const i=ax(n);return e=Lb(n).events.filter(s=>s.time>=n.startTime&&(!i||s.time<i.startTime)),n[ky]=e,e}function cx(n,e){var s;const i=new Map;for(const l of n)for(const o of l.stack||[]){let u=i.get(o.file);u||(u={errors:[],content:void 0},i.set(o.file,u))}for(const l of e){const{action:o,stack:u,message:f}=l;!o||!u||(s=i.get(u[0].file))==null||s.errors.push({line:u[0].line||0,message:f})}return i}const ux=50,Qo=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:s="vertical",minSidebarSize:l=ux,settingName:o,sidebar:u,main:f})=>{const d=Math.max(l,n)*window.devicePixelRatio,[p,m]=rn(o?o+"."+s+":size":void 0,d),[y,v]=rn(o?o+"."+s+":size":void 0,d),[S,E]=H.useState(null),[x,T]=cs();let C;s==="vertical"?(C=y/window.devicePixelRatio,x&&x.height<C&&(C=x.height-10)):(C=p/window.devicePixelRatio,x&&x.width<C&&(C=x.width-10)),document.body.style.userSelect=S?"none":"inherit";let k={};return s==="vertical"?i?k={top:S?0:C-4,bottom:S?0:void 0,height:S?"initial":8}:k={bottom:S?0:C-4,top:S?0:void 0,height:S?"initial":8}:i?k={left:S?0:C-4,right:S?0:void 0,width:S?"initial":8}:k={right:S?0:C-4,left:S?0:void 0,width:S?"initial":8},b.jsxs("div",{className:Ye("split-view",s,i&&"sidebar-first"),ref:T,children:[b.jsx("div",{className:"split-view-main",children:f}),!e&&b.jsx("div",{style:{flexBasis:C},className:"split-view-sidebar",children:u}),!e&&b.jsx("div",{style:k,className:"split-view-resizer",onMouseDown:$=>E({offset:s==="vertical"?$.clientY:$.clientX,size:C}),onMouseUp:()=>E(null),onMouseMove:$=>{if(!$.buttons)E(null);else if(S){const R=(s==="vertical"?$.clientY:$.clientX)-S.offset,G=i?S.size+R:S.size-R,q=$.target.parentElement.getBoundingClientRect(),j=Math.min(Math.max(l,G),(s==="vertical"?q.height:q.width)-l);s==="vertical"?v(j*window.devicePixelRatio):m(j*window.devicePixelRatio)}}})]})},Qe=function(n,e,i){return n>=e&&n<=i};function Mt(n){return Qe(n,48,57)}function jy(n){return Mt(n)||Qe(n,65,70)||Qe(n,97,102)}function fx(n){return Qe(n,65,90)}function hx(n){return Qe(n,97,122)}function dx(n){return fx(n)||hx(n)}function px(n){return n>=128}function Do(n){return dx(n)||px(n)||n===95}function Ly(n){return Do(n)||Mt(n)||n===45}function gx(n){return Qe(n,0,8)||n===11||Qe(n,14,31)||n===127}function Bo(n){return n===10}function Vn(n){return Bo(n)||n===9||n===32}const mx=1114111;class zh extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function yx(n){const e=[];for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===13&&n.charCodeAt(i+1)===10&&(s=10,i++),(s===13||s===12)&&(s=10),s===0&&(s=65533),Qe(s,55296,56319)&&Qe(n.charCodeAt(i+1),56320,57343)){const l=s-55296,o=n.charCodeAt(i+1)-56320;s=Math.pow(2,16)+l*Math.pow(2,10)+o,i++}e.push(s)}return e}function We(n){if(n<=65535)return String.fromCharCode(n);n-=Math.pow(2,16);const e=Math.floor(n/Math.pow(2,10))+55296,i=n%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(i)}function Db(n){const e=yx(n);let i=-1;const s=[];let l;const o=function(I){return I>=e.length?-1:e[I]},u=function(I){if(I===void 0&&(I=1),I>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+I)},f=function(I){return I===void 0&&(I=1),i+=I,l=o(i),!0},d=function(){return i-=1,!0},p=function(I){return I===void 0&&(I=l),I===-1},m=function(){if(y(),f(),Vn(l)){for(;Vn(u());)f();return new Zo}else{if(l===34)return E();if(l===35)if(Ly(u())||C(u(1),u(2))){const I=new Pb("");return $(u(1),u(2),u(3))&&(I.type="id"),I.value=Z(),I}else return new lt(l);else return l===36?u()===61?(f(),new wx):new lt(l):l===39?E():l===40?new Kb:l===41?new Hh:l===42?u()===61?(f(),new xx):new lt(l):l===43?G()?(d(),v()):new lt(l):l===44?new $b:l===45?G()?(d(),v()):u(1)===45&&u(2)===62?(f(2),new zb):V()?(d(),S()):new lt(l):l===46?G()?(d(),v()):new lt(l):l===58?new Hb:l===59?new qb:l===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new Ub):new lt(l):l===64?$(u(1),u(2),u(3))?new Xb(Z()):new lt(l):l===91?new Gb:l===92?k()?(d(),S()):new lt(l):l===93?new vh:l===94?u()===61?(f(),new Sx):new lt(l):l===123?new Ib:l===124?u()===61?(f(),new vx):u()===124?(f(),new Yb):new lt(l):l===125?new Vb:l===126?u()===61?(f(),new bx):new lt(l):Mt(l)?(d(),v()):Do(l)?(d(),S()):p()?new zo:new lt(l)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),l===42&&u()===47){f();break}else if(p())return},v=function(){const I=q();if($(u(1),u(2),u(3))){const F=new _x;return F.value=I.value,F.repr=I.repr,F.type=I.type,F.unit=Z(),F}else if(u()===37){f();const F=new Zb;return F.value=I.value,F.repr=I.repr,F}else{const F=new Qb;return F.value=I.value,F.repr=I.repr,F.type=I.type,F}},S=function(){const I=Z();if(I.toLowerCase()==="url"&&u()===40){for(f();Vn(u(1))&&Vn(u(2));)f();return u()===34||u()===39?new Ka(I):Vn(u())&&(u(2)===34||u(2)===39)?new Ka(I):x()}else return u()===40?(f(),new Ka(I)):new qh(I)},E=function(I){I===void 0&&(I=l);let F="";for(;f();){if(l===I||p())return new $h(F);if(Bo(l))return d(),new Bb;l===92?p(u())||(Bo(u())?f():F+=We(T())):F+=We(l)}throw new Error("Internal error")},x=function(){const I=new Fb("");for(;Vn(u());)f();if(p(u()))return I;for(;f();){if(l===41||p())return I;if(Vn(l)){for(;Vn(u());)f();return u()===41||p(u())?(f(),I):(ie(),new Uo)}else{if(l===34||l===39||l===40||gx(l))return ie(),new Uo;if(l===92)if(k())I.value+=We(T());else return ie(),new Uo;else I.value+=We(l)}}throw new Error("Internal error")},T=function(){if(f(),jy(l)){const I=[l];for(let ee=0;ee<5&&jy(u());ee++)f(),I.push(l);Vn(u())&&f();let F=parseInt(I.map(function(ee){return String.fromCharCode(ee)}).join(""),16);return F>mx&&(F=65533),F}else return p()?65533:l},C=function(I,F){return!(I!==92||Bo(F))},k=function(){return C(l,u())},$=function(I,F,ee){return I===45?Do(F)||F===45||C(F,ee):Do(I)?!0:I===92?C(I,F):!1},V=function(){return $(l,u(1),u(2))},R=function(I,F,ee){return I===43||I===45?!!(Mt(F)||F===46&&Mt(ee)):I===46?!!Mt(F):!!Mt(I)},G=function(){return R(l,u(1),u(2))},Z=function(){let I="";for(;f();)if(Ly(l))I+=We(l);else if(k())I+=We(T());else return d(),I;throw new Error("Internal parse error")},q=function(){let I="",F="integer";for((u()===43||u()===45)&&(f(),I+=We(l));Mt(u());)f(),I+=We(l);if(u(1)===46&&Mt(u(2)))for(f(),I+=We(l),f(),I+=We(l),F="number";Mt(u());)f(),I+=We(l);const ee=u(1),ve=u(2),z=u(3);if((ee===69||ee===101)&&Mt(ve))for(f(),I+=We(l),f(),I+=We(l),F="number";Mt(u());)f(),I+=We(l);else if((ee===69||ee===101)&&(ve===43||ve===45)&&Mt(z))for(f(),I+=We(l),f(),I+=We(l),f(),I+=We(l),F="number";Mt(u());)f(),I+=We(l);const Q=j(I);return{type:F,value:Q,repr:I}},j=function(I){return+I},ie=function(){for(;f();){if(l===41||p())return;k()&&T()}};let le=0;for(;!p(u());)if(s.push(m()),le++,le>e.length*2)throw new Error("I'm infinite-looping!");return s}class Xe{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Bb extends Xe{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Uo extends Xe{constructor(){super(...arguments),this.tokenType="BADURL"}}class Zo extends Xe{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Ub extends Xe{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class zb extends Xe{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Hb extends Xe{constructor(){super(...arguments),this.tokenType=":"}}class qb extends Xe{constructor(){super(...arguments),this.tokenType=";"}}class $b extends Xe{constructor(){super(...arguments),this.tokenType=","}}class _r extends Xe{constructor(){super(...arguments),this.value="",this.mirror=""}}class Ib extends _r{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class Vb extends _r{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class Gb extends _r{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class vh extends _r{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Kb extends _r{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Hh extends _r{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class bx extends Xe{constructor(){super(...arguments),this.tokenType="~="}}class vx extends Xe{constructor(){super(...arguments),this.tokenType="|="}}class Sx extends Xe{constructor(){super(...arguments),this.tokenType="^="}}class wx extends Xe{constructor(){super(...arguments),this.tokenType="$="}}class xx extends Xe{constructor(){super(...arguments),this.tokenType="*="}}class Yb extends Xe{constructor(){super(...arguments),this.tokenType="||"}}class zo extends Xe{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class lt extends Xe{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=We(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
`:this.value}}class Tr extends Xe{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class qh extends Tr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return al(this.value)}}class Ka extends Tr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return al(this.value)+"("}}class Xb extends Tr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+al(this.value)}}class Pb extends Tr{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+al(this.value):"#"+Tx(this.value)}}class $h extends Tr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+Jb(this.value)+'"'}}class Fb extends Tr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Jb(this.value)+'")'}}class Qb extends Xe{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class Zb extends Xe{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class _x extends Xe{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let i=al(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||Qe(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function al(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let s=0;s<n.length;s++){const l=n.charCodeAt(s);if(l===0)throw new zh("Invalid character: the input contains U+0000.");Qe(l,1,31)||l===127||s===0&&Qe(l,48,57)||s===1&&Qe(l,48,57)&&i===45?e+="\\"+l.toString(16)+" ":l>=128||l===45||l===95||Qe(l,48,57)||Qe(l,65,90)||Qe(l,97,122)?e+=n[s]:e+="\\"+n[s]}return e}function Tx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new zh("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||Qe(s,48,57)||Qe(s,65,90)||Qe(s,97,122)?e+=n[i]:e+="\\"+s.toString(16)+" "}return e}function Jb(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new zh("Invalid character: the input contains U+0000.");Qe(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+n[i]:e+=n[i]}return e}class Ot extends Error{}function Ex(n,e){let i;try{i=Db(n),i[i.length-1]instanceof zo||i.push(new zo)}catch(j){const ie=j.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,le=(j.stack||"").indexOf(j.message);throw le!==-1&&(j.stack=j.stack.substring(0,le)+ie+j.stack.substring(le+j.message.length)),j.message=ie,j}const s=i.find(j=>j instanceof Xb||j instanceof Bb||j instanceof Uo||j instanceof Yb||j instanceof Ub||j instanceof zb||j instanceof qb||j instanceof Ib||j instanceof Vb||j instanceof Fb||j instanceof Zb);if(s)throw new Ot(`Unsupported token "${s.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let l=0;const o=new Set;function u(){return new Ot(`Unexpected token "${i[l].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[l]instanceof Zo;)l++}function d(j=l){return i[j]instanceof qh}function p(j=l){return i[j]instanceof $h}function m(j=l){return i[j]instanceof Qb}function y(j=l){return i[j]instanceof $b}function v(j=l){return i[j]instanceof Kb}function S(j=l){return i[j]instanceof Hh}function E(j=l){return i[j]instanceof Ka}function x(j=l){return i[j]instanceof lt&&i[j].value==="*"}function T(j=l){return i[j]instanceof zo}function C(j=l){return i[j]instanceof lt&&[">","+","~"].includes(i[j].value)}function k(j=l){return y(j)||S(j)||T(j)||C(j)||i[j]instanceof Zo}function $(){const j=[V()];for(;f(),!!y();)l++,j.push(V());return j}function V(){return f(),m()||p()?i[l++].value:R()}function R(){const j={simples:[]};for(f(),C()?j.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):j.simples.push({selector:G(),combinator:""});;){if(f(),C())j.simples[j.simples.length-1].combinator=i[l++].value,f();else if(k())break;j.simples.push({combinator:"",selector:G()})}return j}function G(){let j="";const ie=[];for(;!k();)if(d()||x())j+=i[l++].toSource();else if(i[l]instanceof Pb)j+=i[l++].toSource();else if(i[l]instanceof lt&&i[l].value===".")if(l++,d())j+="."+i[l++].toSource();else throw u();else if(i[l]instanceof Hb)if(l++,d())if(!e.has(i[l].value.toLowerCase()))j+=":"+i[l++].toSource();else{const le=i[l++].value.toLowerCase();ie.push({name:le,args:[]}),o.add(le)}else if(E()){const le=i[l++].value.toLowerCase();if(e.has(le)?(ie.push({name:le,args:$()}),o.add(le)):j+=`:${le}(${Z()})`,f(),!S())throw u();l++}else throw u();else if(i[l]instanceof Gb){for(j+="[",l++;!(i[l]instanceof vh)&&!T();)j+=i[l++].toSource();if(!(i[l]instanceof vh))throw u();j+="]",l++}else throw u();if(!j&&!ie.length)throw u();return{css:j||void 0,functions:ie}}function Z(){let j="",ie=1;for(;!T()&&((v()||E())&&ie++,S()&&ie--,!!ie);)j+=i[l++].toSource();return j}const q=$();if(!T())throw u();if(q.some(j=>typeof j!="object"||!("simples"in j)))throw new Ot(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:q,names:Array.from(o)}}const Sh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Ax=new Set(["left-of","right-of","above","below","near"]),Wb=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function ll(n){const e=kx(n),i=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const l=Ex(s.body,Wb);i.push({name:"css",body:l.selector,source:s.body});continue}if(Sh.has(s.name)){let l,o;try{const p=JSON.parse("["+s.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Ot(`Malformed selector: ${s.name}=`+s.body);if(l=p[0],p.length===2){if(typeof p[1]!="number"||!Ax.has(s.name))throw new Ot(`Malformed selector: ${s.name}=`+s.body);o=p[1]}}catch{throw new Ot(`Malformed selector: ${s.name}=`+s.body)}const u={name:s.name,source:s.body,body:{parsed:ll(l),distance:o}},f=[...u.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&Nx(u.body.parsed.parts.slice(0,d+1),i.slice(0,d+1))&&u.body.parsed.parts.splice(0,d+1),i.push(u);continue}i.push({...s,source:s.body})}if(Sh.has(i[0].name))throw new Ot(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function Nx(n,e){return Xn({parts:n})===Xn({parts:e})}function Xn(n,e){return typeof n=="string"?n:n.parts.map((i,s)=>{let l=!0;!e&&s!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(l=!1);const o=l?i.name+"=":"";return`${s===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function Cx(n,e){const i=(s,l)=>{for(const o of s.parts)e(o,l),Sh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function kx(n){let e=0,i,s=0;const l={parts:[]},o=()=>{const f=n.substring(s,e).trim(),d=f.indexOf("=");let p,m;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=f.substring(0,d).trim(),m=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(p="text",m=f):/^\(*\/\//.test(f)||f.startsWith("..")?(p="xpath",m=f):(p="css",m=f);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),l.parts.push({name:p,body:m}),y){if(l.capture!==void 0)throw new Ot("Only one of the selectors can capture using * modifier");l.capture=l.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),l;const u=()=>{const d=n.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<n.length;){const f=n[e];f==="\\"&&e+1<n.length?e+=2:f===i?(i=void 0,e++):!i&&(f==='"'||f==="'"||f==="`")&&!u()?(i=f,e++):!i&&f===">"&&n[e+1]===">"?(o(),e+=2,s=e):e++}return o(),l}function as(n,e){let i=0,s=n.length===0;const l=()=>n[i]||"",o=()=>{const T=l();return++i,s=i>=n.length,T},u=T=>{throw s?new Ot(`Unexpected end of selector while parsing selector \`${n}\``):new Ot(`Error while parsing selector \`${n}\` - unexpected symbol "${l()}" at position ${i}`+(T?" during "+T:""))};function f(){for(;!s&&/\s/.test(l());)o()}function d(T){return T>=""||T>="0"&&T<="9"||T>="A"&&T<="Z"||T>="a"&&T<="z"||T>="0"&&T<="9"||T==="_"||T==="-"}function p(){let T="";for(f();!s&&d(l());)T+=o();return T}function m(T){let C=o();for(C!==T&&u("parsing quoted string");!s&&l()!==T;)l()==="\\"&&o(),C+=o();return l()!==T&&u("parsing quoted string"),C+=o(),C}function y(){o()!=="/"&&u("parsing regular expression");let T="",C=!1;for(;!s;){if(l()==="\\")T+=o(),s&&u("parsing regular expression");else if(C&&l()==="]")C=!1;else if(!C&&l()==="[")C=!0;else if(!C&&l()==="/")break;T+=o()}o()!=="/"&&u("parsing regular expression");let k="";for(;!s&&l().match(/[dgimsuy]/);)k+=o();try{return new RegExp(T,k)}catch($){throw new Ot(`Error while parsing selector \`${n}\`: ${$.message}`)}}function v(){let T="";return f(),l()==="'"||l()==='"'?T=m(l()).slice(1,-1):T=p(),T||u("parsing property path"),T}function S(){f();let T="";return s||(T+=o()),!s&&T!=="="&&(T+=o()),["=","*=","^=","$=","|=","~="].includes(T)||u("parsing operator"),T}function E(){o();const T=[];for(T.push(v()),f();l()===".";)o(),T.push(v()),f();if(l()==="]")return o(),{name:T.join("."),jsonPath:T,op:"<truthy>",value:null,caseSensitive:!1};const C=S();let k,$=!0;if(f(),l()==="/"){if(C!=="=")throw new Ot(`Error while parsing selector \`${n}\` - cannot use ${C} in attribute with regular expression`);k=y()}else if(l()==="'"||l()==='"')k=m(l()).slice(1,-1),f(),l()==="i"||l()==="I"?($=!1,o()):(l()==="s"||l()==="S")&&($=!0,o());else{for(k="";!s&&(d(l())||l()==="+"||l()===".");)k+=o();k==="true"?k=!0:k==="false"?k=!1:e||(k=+k,Number.isNaN(k)&&u("parsing attribute value"))}if(f(),l()!=="]"&&u("parsing attribute value"),o(),C!=="="&&typeof k!="string")throw new Ot(`Error while parsing selector \`${n}\` - cannot use ${C} in attribute with non-string matching value - ${k}`);return{name:T.join("."),jsonPath:T,op:C,value:k,caseSensitive:$}}const x={name:"",attributes:[]};for(x.name=p(),f();l()==="[";)x.attributes.push(E()),f();if(s||u(void 0),!x.name&&!x.attributes.length)throw new Ot(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function cc(n,e="'"){const i=JSON.stringify(n),s=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function Jo(n){return n.charAt(0).toUpperCase()+n.substring(1)}function e0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function or(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let Zi;function Mx(){Zi=new Map}function Tt(n){let e=Zi==null?void 0:Zi.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Zi==null||Zi.set(n,e)),e}function uc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function t0(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Rt(n,e){return typeof n!="string"?t0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function xt(n,e){return typeof n!="string"?t0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function Ox(n,e,i=""){if(n.length<=e)return n;const s=[...n];return s.length>e?s.slice(0,e-i.length).join("")+i:s.join("")}function Dy(n,e){return Ox(n,e,"…")}function Wo(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rx(n,e){const i=n.length,s=e.length;let l=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(s+1).fill(0));for(let f=1;f<=i;f++)for(let d=1;d<=s;d++)n[f-1]===e[d-1]&&(u[f][d]=u[f-1][d-1]+1,u[f][d]>l&&(l=u[f][d],o=f));return n.slice(o-l,o)}function jx(n,e){try{const i=ll(e),s=Lx(i);return s||ts(new i0[n],i,!1,1)[0]}catch{return e}}function Lx(n){const e=n.parts[n.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const i=JSON.parse(e.body);if(typeof i=="string")return i}}function ls(n,e,i=!1){return n0(n,e,i,1)[0]}function n0(n,e,i=!1,s=20,l){try{return ts(new i0[n](l),ll(e),i,s)}catch{return[e]}}function ts(n,e,i=!1,s=20){const l=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<l.length;f++){const d=l[f],p=u;if(u="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?o.push([n.generateLocator(p,"first",""),n.generateLocator(p,"nth","0")]):d.body==="-1"?o.push([n.generateLocator(p,"last",""),n.generateLocator(p,"nth","-1")]):o.push([n.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){o.push([n.generateLocator(p,"visible",d.body),n.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:x}=Ra(d.body);o.push([n.generateLocator(p,"text",x,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:x}=Ra(d.body);if(!E){o.push([n.generateLocator(p,"has-text",x,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:x}=Ra(d.body);if(!E){o.push([n.generateLocator(p,"has-not-text",x,{exact:E})]);continue}}if(d.name==="internal:has"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"has",x)));continue}if(d.name==="internal:has-not"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"hasNot",x)));continue}if(d.name==="internal:and"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"and",x)));continue}if(d.name==="internal:or"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"or",x)));continue}if(d.name==="internal:chain"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"chain",x)));continue}if(d.name==="internal:label"){const{exact:E,text:x}=Ra(d.body);o.push([n.generateLocator(p,"label",x,{exact:E})]);continue}if(d.name==="internal:role"){const E=as(d.body,!0),x={attrs:[]};for(const T of E.attributes)T.name==="name"?(x.exact=T.caseSensitive,x.name=T.value):(T.name==="level"&&typeof T.value=="string"&&(T.value=+T.value),x.attrs.push({name:T.name==="include-hidden"?"includeHidden":T.name,value:T.value}));o.push([n.generateLocator(p,"role",E.name,x)]);continue}if(d.name==="internal:testid"){const E=as(d.body,!0),{value:x}=E.attributes[0];o.push([n.generateLocator(p,"test-id",x)]);continue}if(d.name==="internal:attr"){const E=as(d.body,!0),{name:x,value:T,caseSensitive:C}=E.attributes[0],k=T,$=!!C;if(x==="placeholder"){o.push([n.generateLocator(p,"placeholder",k,{exact:$})]);continue}if(x==="alt"){o.push([n.generateLocator(p,"alt",k,{exact:$})]);continue}if(x==="title"){o.push([n.generateLocator(p,"title",k,{exact:$})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=o[o.length-1],x=l[f-1],T=E.map(C=>n.chainLocators([C,n.generateLocator(p,"frame","")]));["xpath","css"].includes(x.name)&&T.push(n.generateLocator(p,"frame-locator",Xn({parts:[x]})),n.generateLocator(p,"frame-locator",Xn({parts:[x]},!0))),E.splice(0,E.length,...T),u="frame-locator";continue}const m=l[f+1],y=Xn({parts:[d]}),v=n.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:E,text:x}=Ra(m.body);if(!E){const T=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),C={};m.name==="internal:has-text"?C.hasText=x:C.hasNotText=x;const k=n.generateLocator(p,"default",y,C);o.push([n.chainLocators([v,T]),k]),f++;continue}}let S;if(["xpath","css"].includes(d.name)){const E=Xn({parts:[d]},!0);S=n.generateLocator(p,"default",E)}o.push([v,S].filter(Boolean))}return Dx(n,o,s)}function Dx(n,e,i){const s=e.map(()=>""),l=[],o=u=>{if(u===e.length)return l.push(n.chainLocators(s)),l.length<i;for(const f of e[u])if(s[u]=f,!o(u+1))return!1;return!0};return o(0),l}function Ra(n){let e=!1;const i=n.match(/^\/(.*)\/([igm]*)$/);return i?{text:new RegExp(i[1],i[2])}:(n.endsWith('"')?(n=JSON.parse(n),e=!0):n.endsWith('"s')?(n=JSON.parse(n.substring(0,n.length-1)),e=!0):n.endsWith('"i')&&(n=JSON.parse(n.substring(0,n.length-1)),e=!1),{exact:e,text:n})}class Bx{constructor(e){this.preferredQuote=e}generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(l.hasNotText)} })`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${s==="true"?"true":"false"} })`;case"role":const o=[];ot(l.name)?o.push(`name: ${this.regexToSourceString(l.name)}`):typeof l.name=="string"&&(o.push(`name: ${this.quote(l.name)}`),l.exact&&o.push("exact: true"));for(const{name:f,value:d}of l.attrs)o.push(`${f}: ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(s)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(s)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(s)} })`;case"has":return`filter({ has: ${s} })`;case"hasNot":return`filter({ hasNot: ${s} })`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("getByText",s,!!l.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact("getByLabel",s,!!l.exact);case"title":return this.toCallWithExact("getByTitle",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return uc(String(e))}toCallWithExact(e,i,s){return ot(i)?`${e}(${this.regexToSourceString(i)})`:s?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return ot(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return ot(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return cc(e,this.preferredQuote??"'")}}class Ux{generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(l.hasText)})`:l.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(l.hasNotText)})`:`locator(${this.quote(s)})`;case"frame-locator":return`frame_locator(${this.quote(s)})`;case"frame":return"content_frame";case"nth":return`nth(${s})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${s==="true"?"True":"False"})`;case"role":const o=[];ot(l.name)?o.push(`name=${this.regexToString(l.name)}`):typeof l.name=="string"&&(o.push(`name=${this.quote(l.name)}`),l.exact&&o.push("exact=True"));for(const{name:f,value:d}of l.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),o.push(`${e0(f)}=${p}`)}const u=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(s)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(s)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(s)})`;case"has":return`filter(has=${s})`;case"hasNot":return`filter(has_not=${s})`;case"and":return`and_(${s})`;case"or":return`or_(${s})`;case"chain":return`locator(${s})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("get_by_text",s,!!l.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!l.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!l.exact);case"label":return this.toCallWithExact("get_by_label",s,!!l.exact);case"title":return this.toCallWithExact("get_by_title",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${uc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,s){return ot(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return ot(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return ot(e)?this.regexToString(e):this.quote(e)}quote(e){return cc(e,'"')}}class zx{generateLocator(e,i,s,l={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(l.hasText)}))`:l.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(l.hasNotText)}))`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const u=[];ot(l.name)?u.push(`.setName(${this.regexToString(l.name)})`):typeof l.name=="string"&&(u.push(`.setName(${this.quote(l.name)})`),l.exact&&u.push(".setExact(true)"));for(const{name:d,value:p}of l.attrs)u.push(`.set${Jo(d)}(${typeof p=="string"?this.quote(p):p})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${e0(s).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${s}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${s}))`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact(o,"getByText",s,!!l.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!l.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(uc(e.source))}${i})`}toCallWithExact(e,i,s,l){return ot(s)?`${i}(${this.regexToString(s)})`:l?`${i}(${this.quote(s)}, new ${e}.${Jo(i)}Options().setExact(true))`:`${i}(${this.quote(s)})`}toHasText(e){return ot(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return ot(e)?this.regexToString(e):this.quote(e)}quote(e){return cc(e,'"')}}class Hx{generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(l.hasNotText)} })`:`Locator(${this.quote(s)})`;case"frame-locator":return`FrameLocator(${this.quote(s)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${s})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${s==="true"?"true":"false"} })`;case"role":const o=[];ot(l.name)?o.push(`NameRegex = ${this.regexToString(l.name)}`):typeof l.name=="string"&&(o.push(`Name = ${this.quote(l.name)}`),l.exact&&o.push("Exact = true"));for(const{name:f,value:d}of l.attrs)o.push(`${Jo(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${Jo(s)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(s)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(s)} })`;case"has":return`Filter(new() { Has = ${s} })`;case"hasNot":return`Filter(new() { HasNot = ${s} })`;case"and":return`And(${s})`;case"or":return`Or(${s})`;case"chain":return`Locator(${s})`;case"test-id":return`GetByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("GetByText",s,!!l.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!l.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(uc(e.source))}${i})`}toCallWithExact(e,i,s){return ot(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return ot(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return ot(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return ot(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return cc(e,'"')}}class qx{generateLocator(e,i,s,l={}){return JSON.stringify({kind:i,body:s,options:l})}chainLocators(e){const i=e.map(s=>JSON.parse(s));for(let s=0;s<i.length-1;++s)i[s].next=i[s+1];return JSON.stringify(i[0])}}const i0={javascript:Bx,python:Ux,java:zx,csharp:Hx,jsonl:qx};function ot(n){return n instanceof RegExp}const By=new Map;function $x({name:n,rootItem:e,render:i,title:s,icon:l,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:v,noItemsMessage:S,dataTestId:E,autoExpandDepth:x}){const T=H.useMemo(()=>Ix(e,f,y.expandedItems,x||0,u),[e,f,y,x,u]),C=H.useRef(null),[k,$]=H.useState(),[V,R]=H.useState(!1);H.useEffect(()=>{m==null||m(k)},[m,k]),H.useEffect(()=>{const q=C.current;if(!q)return;const j=()=>{By.set(n,q.scrollTop)};return q.addEventListener("scroll",j,{passive:!0}),()=>q.removeEventListener("scroll",j)},[n]),H.useEffect(()=>{C.current&&(C.current.scrollTop=By.get(n)||0)},[n]);const G=H.useCallback(q=>{const{expanded:j}=T.get(q);if(j){for(let ie=f;ie;ie=ie.parent)if(ie===q){p==null||p(q);break}y.expandedItems.set(q.id,!1)}else y.expandedItems.set(q.id,!0);v({...y})},[T,f,p,y,v]),Z=H.useCallback(q=>{const{expanded:j}=T.get(q),ie=[q];for(;ie.length;){const le=ie.pop();ie.push(...le.children),y.expandedItems.set(le.id,!j)}v({...y})},[T,y,v]);return b.jsx("div",{className:Ye("tree-view vbox",n+"-tree-view"),"data-testid":E||n+"-tree",children:b.jsxs("div",{className:Ye("tree-view-content"),role:T.size>0?"tree":void 0,tabIndex:0,onKeyDown:q=>{if(f&&q.key==="Enter"){d==null||d(f);return}if(q.key!=="ArrowDown"&&q.key!=="ArrowUp"&&q.key!=="ArrowLeft"&&q.key!=="ArrowRight")return;if(q.stopPropagation(),q.preventDefault(),f&&q.key==="ArrowLeft"){const{expanded:ie,parent:le}=T.get(f);ie?(y.expandedItems.set(f.id,!1),v({...y})):le&&(p==null||p(le));return}if(f&&q.key==="ArrowRight"){f.children.length&&(y.expandedItems.set(f.id,!0),v({...y}));return}let j=f;if(q.key==="ArrowDown"&&(f?j=T.get(f).next:T.size&&(j=[...T.keys()][0])),q.key==="ArrowUp"){if(f)j=T.get(f).prev;else if(T.size){const ie=[...T.keys()];j=ie[ie.length-1]}}m==null||m(void 0),j&&(R(!0),p==null||p(j)),$(void 0)},ref:C,children:[S&&T.size===0&&b.jsx("div",{className:"tree-view-empty",children:S}),e.children.map(q=>T.get(q)&&b.jsx(s0,{item:q,treeItems:T,selectedItem:f,onSelected:p,onAccepted:d,isError:o,toggleExpanded:G,toggleSubtree:Z,highlightedItem:k,setHighlightedItem:$,render:i,icon:l,title:s,isKeyboardNavigation:V,setIsKeyboardNavigation:R},q.id))]})})}function s0({item:n,treeItems:e,selectedItem:i,onSelected:s,highlightedItem:l,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:v,isKeyboardNavigation:S,setIsKeyboardNavigation:E}){const x=H.useId(),T=H.useRef(null);H.useEffect(()=>{i===n&&S&&T.current&&(Cb(T.current),E(!1))},[n,i,S,E]);const C=e.get(n),k=C.depth,$=C.expanded;let V="codicon-blank";typeof $=="boolean"&&(V=$?"codicon-chevron-down":"codicon-chevron-right");const R=m(n),G=$&&n.children.length?n.children:[],Z=y==null?void 0:y(n),q=(v==null?void 0:v(n))||"codicon-blank";return b.jsxs("div",{ref:T,role:"treeitem","aria-selected":n===i,"aria-expanded":$,"aria-controls":x,title:Z,className:"vbox",style:{flex:"none"},children:[b.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:Ye("tree-view-entry",i===n&&"selected",l===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>s==null?void 0:s(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[k?new Array(k).fill(0).map((j,ie)=>b.jsx("div",{className:"tree-view-indent"},"indent-"+ie)):void 0,b.jsx("div",{"aria-hidden":"true",className:"codicon "+V,style:{minWidth:16,marginRight:4},onDoubleClick:j=>{j.preventDefault(),j.stopPropagation()},onClick:j=>{j.stopPropagation(),j.preventDefault(),j.altKey?p(n):d(n)}}),v&&b.jsx("div",{className:"codicon "+q,style:{minWidth:16,marginRight:4},"aria-label":"["+q.replace("codicon","icon")+"]"}),typeof R=="string"?b.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:R}):R]}),!!G.length&&b.jsx("div",{id:x,role:"group",children:G.map(j=>e.get(j)&&b.jsx(s0,{item:j,treeItems:e,selectedItem:i,onSelected:s,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:p,highlightedItem:l,setHighlightedItem:o,render:m,title:y,icon:v,isKeyboardNavigation:S,setIsKeyboardNavigation:E},j.id))})]})}function Ix(n,e,i,s,l=()=>!0){if(!l(n))return new Map;const o=new Map,u=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)u.add(p.id);let f=null;const d=(p,m)=>{for(const y of p.children){if(!l(y))continue;const v=u.has(y.id)||i.get(y.id),S=s>m&&o.size<25&&v!==!1,E=y.children.length?v??S:void 0,x={depth:m,expanded:E,parent:n===p?null:p,next:null,prev:f};f&&(o.get(f).next=y),f=y,o.set(y,x),E&&d(y,m+1)}};return d(n,0),o}const Dt=H.forwardRef(function({children:e,title:i="",icon:s,disabled:l=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:p,ariaLabel:m},y){return b.jsxs("button",{ref:y,className:Ye(p,"toolbar-button",s,o&&"toggled"),onMouseDown:Uy,onClick:u,onDoubleClick:Uy,title:i,disabled:!!l,style:f,"data-testid":d,"aria-label":m||i,children:[s&&b.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),Uy=n=>{n.stopPropagation(),n.preventDefault()};function r0(n){return n==="scheduled"?"codicon-clock":n==="running"?"codicon-loading":n==="failed"?"codicon-error":n==="passed"?"codicon-check":n==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function Vx(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const Gx=$x,Kx=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:s,treeState:l,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:d,revealConsole:p,revealActionAttachment:m,isLive:y})=>{const{rootItem:v,itemMap:S}=H.useMemo(()=>rx(n),[n]),{selectedItem:E}=H.useMemo(()=>({selectedItem:e?S.get(e.callId):void 0}),[S,e]),x=H.useCallback(R=>{var G,Z;return!!((Z=(G=R.action)==null?void 0:G.error)!=null&&Z.message)},[]),T=H.useCallback(R=>s({minimum:R.action.startTime,maximum:R.action.endTime}),[s]),C=H.useCallback(R=>{var Z,q;const G=!!m&&!!((q=(Z=R.action)==null?void 0:Z.attachments)!=null&&q.length);return Ih(R.action,{sdkLanguage:u,revealConsole:p,revealActionAttachment:()=>m==null?void 0:m(R.action.callId),isLive:y,showDuration:!0,showBadges:!0,showAttachments:G})},[y,p,m,u]),k=H.useCallback(R=>!i||!R.action||R.action.startTime<=i.maximum&&R.action.endTime>=i.minimum,[i]),$=H.useCallback(R=>{f==null||f(R.action)},[f]),V=H.useCallback(R=>{d==null||d(R==null?void 0:R.action)},[d]);return b.jsxs("div",{className:"vbox",children:[i&&b.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[b.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),b.jsx(Gx,{name:"actions",rootItem:v,treeState:l,setTreeState:o,selectedItem:E,onSelected:$,onHighlighted:V,onAccepted:T,isError:x,isVisible:k,render:C})]})},Ih=(n,e)=>{var T;const{sdkLanguage:i,revealConsole:s,revealActionAttachment:l,isLive:o,showDuration:u,showBadges:f,showAttachments:d}=e,{errors:p,warnings:m}=lx(n),y=n.params.selector?jx(i||"javascript",n.params.selector):void 0,v=n.class==="Test"&&n.method==="test.step"&&((T=n.annotations)==null?void 0:T.some(C=>C.type==="skip"));let S="";n.endTime?S=_t(n.endTime-n.startTime):n.error?S="Timed out":o||(S="-");const{elements:E,title:x}=a0(n);return b.jsxs("div",{className:"action-title vbox",children:[b.jsxs("div",{className:"hbox",children:[b.jsx("span",{className:"action-title-method",title:x,children:E}),(u||f||d||v)&&b.jsx("div",{className:"spacer"}),d&&b.jsx(Dt,{icon:"attach",title:"Open Attachment",onClick:()=>l==null?void 0:l()}),u&&!v&&b.jsx("div",{className:"action-duration",children:S||b.jsx("span",{className:"codicon codicon-loading"})}),v&&b.jsx("span",{className:Ye("action-skipped","codicon",r0("skipped")),title:"skipped"}),f&&b.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!p&&b.jsxs("div",{className:"action-icon",children:[b.jsx("span",{className:"codicon codicon-error"}),b.jsx("span",{className:"action-icon-value",children:p})]}),!!m&&b.jsxs("div",{className:"action-icon",children:[b.jsx("span",{className:"codicon codicon-warning"}),b.jsx("span",{className:"action-icon-value",children:m})]})]})]}),y&&b.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function a0(n){var f;const e=n.title??((f=Mb.get(n.class+"."+n.method))==null?void 0:f.title)??n.method,i=[],s=[];let l=0;const o=/\{([^}]+)\}/g;let u;for(;(u=o.exec(e))!==null;){const[d,p]=u,m=e.slice(l,u.index);i.push(m),s.push(m);const y=Q1(n.params,p);y===void 0?(i.push(d),s.push(d)):u.index===0?(i.push(y),s.push(y)):(i.push(b.jsx("span",{className:"action-title-param",children:y},i.length)),s.push(y)),l=u.index+d.length}if(l<e.length){const d=e.slice(l);i.push(d),s.push(d)}return{elements:i,title:s.join("")}}const Vh=({value:n,description:e})=>{const[i,s]=H.useState("copy"),l=H.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[n]);return b.jsx(Dt,{title:e||"Copy",icon:i,onClick:l})},Ho=({value:n,description:e,copiedDescription:i=e,style:s})=>{const[l,o]=H.useState(!1),u=H.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return b.jsx(Dt,{style:s,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:l?i:e})},us=({text:n})=>b.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),Yx=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const s=H.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return b.jsx(us,{text:"No action selected"});const l=n.startTime-e,o=_t(l),{title:u}=a0(n);return b.jsxs("div",{className:"call-tab",children:[b.jsx("div",{className:"call-line",children:u}),b.jsx("div",{className:"call-section",children:"Time"}),Eo({name:"start",type:"literal",text:o}),Eo({name:"duration",type:"literal",text:Xx(n)}),!!s.length&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"call-section",children:"Parameters"}),s.map(f=>Eo(zy(n,f,n.params[f],i)))]}),!!n.result&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>Eo(zy(n,f,n.result[f],i)))]})]})};function Xx(n){return n.endTime?_t(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Eo(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),b.jsxs("div",{className:"call-line",children:[n.name,":",b.jsx("span",{className:Ye("call-value",n.type),title:n.text,children:e}),["literal","string","number","object","locator"].includes(n.type)&&b.jsx(Vh,{value:n.text})]},n.name)}function zy(n,e,i,s){const l=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&l)&&(i=ec(i.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&l||e==="received"&&n.method==="expect")&&(i=ec(i,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:ls(s||"javascript",n.params.selector),type:"locator",name:"locator"};const o=typeof i;return o!=="object"||i===null?{text:String(i),type:o,name:e}:i.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(i).slice(0,1e3),type:"object",name:e}}function ec(n,e){if(n.n!==void 0)return n.n;if(n.s!==void 0)return n.s;if(n.b!==void 0)return n.b;if(n.v!==void 0){if(n.v==="undefined")return;if(n.v==="null")return null;if(n.v==="NaN")return NaN;if(n.v==="Infinity")return 1/0;if(n.v==="-Infinity")return-1/0;if(n.v==="-0")return-0}if(n.d!==void 0)return new Date(n.d);if(n.r!==void 0)return new RegExp(n.r.p,n.r.f);if(n.a!==void 0)return n.a.map(i=>ec(i,e));if(n.o!==void 0){const i={};for(const{k:s,v:l}of n.o)i[s]=ec(l,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const Hy=new Map;function fc({name:n,items:e=[],id:i,render:s,icon:l,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:v,noItemsMessage:S,dataTestId:E,notSelectable:x,ariaLabel:T}){const C=H.useRef(null),[k,$]=H.useState();return H.useEffect(()=>{y==null||y(k)},[y,k]),H.useEffect(()=>{const V=C.current;if(!V)return;const R=()=>{Hy.set(n,V.scrollTop)};return V.addEventListener("scroll",R,{passive:!0}),()=>V.removeEventListener("scroll",R)},[n]),H.useEffect(()=>{C.current&&(C.current.scrollTop=Hy.get(n)||0)},[n]),b.jsx("div",{className:Ye("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":T,children:b.jsxs("div",{className:Ye("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:V=>{var q;if(d&&V.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(V.key!=="ArrowDown"&&V.key!=="ArrowUp")return;V.stopPropagation(),V.preventDefault();const R=d?e.indexOf(d):-1;let G=R;V.key==="ArrowDown"&&(R===-1?G=0:G=Math.min(R+1,e.length-1)),V.key==="ArrowUp"&&(R===-1?G=e.length-1:G=Math.max(R-1,0));const Z=(q=C.current)==null?void 0:q.children.item(G);Cb(Z||void 0),y==null||y(void 0),m==null||m(e[G],G),$(void 0)},ref:C,children:[S&&e.length===0&&b.jsx("div",{className:"list-view-empty",children:S}),e.map((V,R)=>{const G=s(V,R);return b.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(V,R),role:"listitem",className:Ye("list-view-entry",d===V&&"selected",!x&&k===V&&"highlighted",(o==null?void 0:o(V,R))&&"error",(u==null?void 0:u(V,R))&&"warning",(f==null?void 0:f(V,R))&&"info"),"aria-selected":d===V,onClick:()=>m==null?void 0:m(V,R),onMouseEnter:()=>$(V),onMouseLeave:()=>$(void 0),children:[l&&b.jsx("div",{className:"codicon "+(l(V,R)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:Z=>{Z.preventDefault(),Z.stopPropagation()},onClick:Z=>{Z.stopPropagation(),Z.preventDefault(),v==null||v(V,R)}}),typeof G=="string"?b.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:G}):G]},(i==null?void 0:i(V,R))||R)})]})})}const Px=fc,Fx=({action:n,isLive:e})=>{const i=H.useMemo(()=>{var u;if(!n||!n.log.length)return[];const s=n.log,l=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<s.length;++f){let d="";if(s[f].time!==-1){const p=(u=s[f])==null?void 0:u.time;f+1<s.length?d=_t(s[f+1].time-p):n.endTime>0?d=_t(n.endTime-p):e?d=_t(Date.now()-l-p):d="-"}o.push({message:s[f].message,time:d})}return o},[n,e]);return i.length?b.jsx(Px,{name:"log",ariaLabel:"Log entries",items:i,render:s=>b.jsxs("div",{className:"log-list-item",children:[b.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):b.jsx(us,{text:"No log entries"})};function el(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let l,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(l=i.exec(n))!==null;){const[,,p,,m]=l;if(p){const y=+p;switch(y){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:u=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["text-decoration"];break;case 27:u=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:f=qy[y-30];break;case 39:f=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=qy[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:f=$y[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=$y[y-100];break}}else if(m){const y={...o},v=u?d:f;v!==void 0&&(y.color=v);const S=u?f:d;S!==void 0&&(y["background-color"]=S),s.push(`<span style="${Zx(y)}">${Qx(m)}</span>`)}}return s.join("")}const qy={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},$y={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function Qx(n){return n.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function Zx(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const Jx=({error:n})=>{const e=H.useMemo(()=>el(n),[n]);return b.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},l0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:s})=>(gt.useEffect(()=>{const l=document.createElement("div");return l.style.position="fixed",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.left="0",l.style.zIndex="9999",l.style.cursor=n,document.body.appendChild(l),e&&l.addEventListener("mousemove",e),i&&l.addEventListener("mouseup",i),s&&document.body.addEventListener("dblclick",s),()=>{e&&l.removeEventListener("mousemove",e),i&&l.removeEventListener("mouseup",i),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(l)}},[n,e,i,s]),b.jsx(b.Fragment,{})),Wx={position:"absolute",top:0,right:0,bottom:0,left:0},o0=({orientation:n,offsets:e,setOffsets:i,resizerColor:s,resizerWidth:l,minColumnWidth:o})=>{const u=o||0,[f,d]=gt.useState(null),[p,m]=cs(),y={position:"absolute",right:n==="horizontal"?void 0:0,bottom:n==="horizontal"?0:void 0,width:n==="horizontal"?7:void 0,height:n==="horizontal"?void 0:7,borderTopWidth:n==="horizontal"?void 0:(7-l)/2,borderRightWidth:n==="horizontal"?(7-l)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-l)/2,borderLeftWidth:n==="horizontal"?(7-l)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return b.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-l)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&b.jsx(l0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(f){const S=n==="horizontal"?v.clientX-f.clientX:v.clientY-f.clientY,E=f.offset+S,x=f.index>0?e[f.index-1]:0,T=n==="horizontal"?p.width:p.height,C=Math.min(Math.max(x+u,E),T-u)-e[f.index];for(let k=f.index;k<e.length;++k)e[k]=e[k]+C;i([...e])}}}),e.map((v,S)=>b.jsx("div",{style:{...y,top:n==="horizontal"?0:v,left:n==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:v,index:S}),children:b.jsx("div",{style:{...Wx,background:s}})},S))]})};async function Jf(n){const e=new Image;return n&&(e.src=n,await new Promise((i,s)=>{e.onload=i,e.onerror=i})),e}const wh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
                    linear-gradient(-45deg, #80808020 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #80808020 75%),
                    linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
              rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
              rgb(0 0 0 / 10%) 0px -2px 4px,
              rgb(0 0 0 / 15%) 0px -6.1px 12px,
              rgb(0 0 0 / 25%) 0px 6px 12px`},e_=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[s,l]=H.useState(n.diff?"diff":"actual"),[o,u]=H.useState(!1),[f,d]=H.useState(null),[p,m]=H.useState("Expected"),[y,v]=H.useState(null),[S,E]=H.useState(null),[x,T]=cs();H.useEffect(()=>{(async()=>{var j,ie,le,I;d(await Jf((j=n.expected)==null?void 0:j.attachment.path)),m(((ie=n.expected)==null?void 0:ie.title)||"Expected"),v(await Jf((le=n.actual)==null?void 0:le.attachment.path)),E(await Jf((I=n.diff)==null?void 0:I.attachment.path))})()},[n]);const C=f&&y&&S,k=C?Math.max(f.naturalWidth,y.naturalWidth,200):500,$=C?Math.max(f.naturalHeight,y.naturalHeight,200):500,V=Math.min(1,(x.width-30)/k),R=Math.min(1,(x.width-50)/k/2),G=k*V,Z=$*V,q={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return b.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:T,children:C&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&b.jsx("div",{style:{...q,fontWeight:s==="diff"?600:"initial"},onClick:()=>l("diff"),children:"Diff"}),b.jsx("div",{style:{...q,fontWeight:s==="actual"?600:"initial"},onClick:()=>l("actual"),children:"Actual"}),b.jsx("div",{style:{...q,fontWeight:s==="expected"?600:"initial"},onClick:()=>l("expected"),children:p}),b.jsx("div",{style:{...q,fontWeight:s==="sxs"?600:"initial"},onClick:()=>l("sxs"),children:"Side by side"}),b.jsx("div",{style:{...q,fontWeight:s==="slider"?600:"initial"},onClick:()=>l("slider"),children:"Slider"})]}),b.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:Z+60},children:[n.diff&&s==="diff"&&b.jsx(Gn,{image:S,alt:"Diff",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="actual"&&b.jsx(Gn,{image:y,alt:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="expected"&&b.jsx(Gn,{image:f,alt:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="slider"&&b.jsx(t_,{expectedImage:f,actualImage:y,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V,expectedTitle:p}),n.diff&&s==="sxs"&&b.jsxs("div",{style:{display:"flex"},children:[b.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:R*k,canvasHeight:R*$,scale:R}),b.jsx(Gn,{image:o?S:y,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:R*k,canvasHeight:R*$,scale:R})]}),!n.diff&&s==="actual"&&b.jsx(Gn,{image:y,title:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="expected"&&b.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="sxs"&&b.jsxs("div",{style:{display:"flex"},children:[b.jsx(Gn,{image:f,title:p,canvasWidth:R*k,canvasHeight:R*$,scale:R}),b.jsx(Gn,{image:y,title:"Actual",canvasWidth:R*k,canvasHeight:R*$,scale:R})]})]}),!i&&b.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[b.jsx("div",{children:n.diff&&b.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),b.jsx("div",{children:b.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),b.jsx("div",{children:b.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},t_=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:s,scale:l,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,p]=H.useState(i/2),m=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return b.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&b.jsxs("div",{style:{margin:5},children:[!m&&b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),b.jsx("span",{children:n.naturalWidth}),b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),b.jsx("span",{children:n.naturalHeight}),!m&&b.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&b.jsx("span",{children:e.naturalWidth}),!m&&b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&b.jsx("span",{children:e.naturalHeight})]}),b.jsxs("div",{style:{position:"relative",width:i,height:s,margin:15,...wh},children:[b.jsx(o0,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),b.jsx("img",{alt:o,style:{width:n.naturalWidth*l,height:n.naturalHeight*l},draggable:"false",src:n.src}),b.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...wh},children:b.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*l,height:e.naturalHeight*l},draggable:"false",src:e.src})})]})]})},Gn=({image:n,title:e,alt:i,hideSize:s,canvasWidth:l,canvasHeight:o,scale:u,onClick:f})=>b.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&b.jsxs("div",{style:{margin:5},children:[e&&b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),b.jsx("span",{children:n.naturalWidth}),b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),b.jsx("span",{children:n.naturalHeight})]}),b.jsx("div",{style:{display:"flex",flex:"none",width:l,height:o,margin:15,...wh},children:b.jsx("img",{width:n.naturalWidth*u,height:n.naturalHeight*u,alt:e||i,style:{cursor:f?"pointer":"initial"},draggable:"false",src:n.src,onClick:f})})]}),n_="modulepreload",i_=function(n,e){return new URL(n,e).href},Iy={},s_=function(e,i,s){let l=Promise.resolve();if(i&&i.length>0){let u=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));l=u(i.map(m=>{if(m=i_(m,s),m in Iy)return;Iy[m]=!0;const y=m.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!s)for(let x=f.length-1;x>=0;x--){const T=f[x];if(T.href===m&&(!y||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${v}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":n_,y||(E.as="script"),E.crossOrigin="",E.href=m,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((x,T)=>{E.addEventListener("load",x),E.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return l.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},r_=20,Sr=({text:n,highlighter:e,mimeType:i,linkify:s,readOnly:l,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:v,placeholder:S})=>{const[E,x]=cs(),[T]=H.useState(s_(()=>import("./codeMirrorModule-Bucv2d7q.js"),__vite__mapDeps([0,1]),import.meta.url).then(V=>V.default)),C=H.useRef(null),[k,$]=H.useState();return H.useEffect(()=>{(async()=>{var q,j;const V=await T;l_(V);const R=x.current;if(!R)return;const G=c_(e)||o_(i)||(s?"text/linkified":"");if(C.current&&G===C.current.cm.getOption("mode")&&!!l===C.current.cm.getOption("readOnly")&&f===C.current.cm.getOption("lineNumbers")&&m===C.current.cm.getOption("lineWrapping")&&S===C.current.cm.getOption("placeholder"))return;(j=(q=C.current)==null?void 0:q.cm)==null||j.getWrapperElement().remove();const Z=V(R,{value:"",mode:G,readOnly:!!l,lineNumbers:f,lineWrapping:m,placeholder:S,matchBrackets:!0,autoCloseBrackets:!0});return C.current={cm:Z},d&&Z.focus(),$(Z),Z})()},[T,k,x,e,i,s,f,m,l,d,S]),H.useEffect(()=>{C.current&&C.current.cm.setSize(E.width,E.height)},[E]),H.useLayoutEffect(()=>{var G;if(!k)return;let V=!1;if(k.getValue()!==n&&(k.setValue(n),V=!0,p&&(k.execCommand("selectAll"),k.focus())),V||JSON.stringify(o)!==JSON.stringify(C.current.highlight)){for(const j of C.current.highlight||[])k.removeLineClass(j.line-1,"wrap");for(const j of o||[])k.addLineClass(j.line-1,"wrap",`source-line-${j.type}`);for(const j of C.current.widgets||[])k.removeLineWidget(j);for(const j of C.current.markers||[])j.clear();const Z=[],q=[];for(const j of o||[]){if(j.type!=="subtle-error"&&j.type!=="error")continue;const ie=(G=C.current)==null?void 0:G.cm.getLine(j.line-1);if(ie){const le={};le.title=j.message||"",q.push(k.markText({line:j.line-1,ch:0},{line:j.line-1,ch:j.column||ie.length},{className:"source-line-error-underline",attributes:le}))}if(j.type==="error"){const le=document.createElement("div");le.innerHTML=el(j.message||""),le.className="source-line-error-widget",Z.push(k.addLineWidget(j.line,le,{above:!0,coverGutter:!1}))}}C.current.highlight=o,C.current.widgets=Z,C.current.markers=q}typeof u=="number"&&C.current.cm.lineCount()>=u&&k.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let R;return y&&(R=()=>y(k.getValue()),k.on("change",R)),()=>{R&&k.off("change",R)}},[k,n,o,u,p,y]),b.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:x,onClick:a_})};function a_(n){var i;if(!(n.target instanceof HTMLElement))return;let e;n.target.classList.contains("cm-linkified")?e=n.target.textContent:n.target.classList.contains("cm-link")&&((i=n.target.nextElementSibling)!=null&&i.classList.contains("cm-url"))&&(e=n.target.nextElementSibling.textContent.slice(1,-1)),e&&(n.preventDefault(),n.stopPropagation(),window.open(e,"_blank"))}let Vy=!1;function l_(n){Vy||(Vy=!0,n.defineSimpleMode("text/linkified",{start:[{regex:kb,token:"linkified"}]}))}function o_(n){if(n){if(n.includes("javascript")||n.includes("json"))return"javascript";if(n.includes("python"))return"python";if(n.includes("csharp"))return"text/x-csharp";if(n.includes("java"))return"text/x-java";if(n.includes("markdown"))return"markdown";if(n.includes("html")||n.includes("svg"))return"htmlmixed";if(n.includes("css"))return"css"}}function c_(n){if(n)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[n]}function u_(n){return!!n.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const c0=({title:n,children:e,setExpanded:i,expanded:s,expandOnTitleClick:l,className:o})=>{const u=H.useId(),f=H.useId(),d=H.useCallback(()=>i(!s),[s,i]),p=b.jsx("div",{className:Ye("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:l?void 0:d});return b.jsxs("div",{className:Ye("expandable",s&&"expanded",o),children:[l?b.jsxs("div",{id:u,role:"button","aria-expanded":s,"aria-controls":f,className:"expandable-title",onClick:d,children:[p,n]}):b.jsxs("div",{className:"expandable-title",children:[p,n]}),s&&b.jsx("div",{id:f,"aria-labelledby":u,role:"region",className:"expandable-content",children:e})]})};function u0(n){const e=[];let i=0,s;for(;(s=kb.exec(n))!==null;){const o=n.substring(i,s.index);o&&e.push(o);const u=s[0];e.push(f_(u)),i=s.index+u.length}const l=n.substring(i);return l&&e.push(l),e}function f_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),b.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const f0=H.createContext(void 0),Ci=()=>H.useContext(f0),h_=({attachment:n,reveal:e})=>{const i=Ci(),[s,l]=H.useState(!1),[o,u]=H.useState(null),[f,d]=H.useState(null),[p,m]=$1(),y=H.useRef(null),v=u_(n.contentType),S=!!n.sha1||!!n.path;H.useEffect(()=>{var T;if(e)return(T=y.current)==null||T.scrollIntoView({behavior:"smooth"}),m()},[e,m]),H.useEffect(()=>{s&&o===null&&f===null&&(d("Loading ..."),fetch(hc(i,n)).then(T=>T.text()).then(T=>{u(T),d(null)}).catch(T=>{d("Failed to load: "+T.message)}))},[i,s,o,f,n]);const E=H.useMemo(()=>{const T=o?o.split(`
`).length:0;return Math.min(Math.max(5,T),20)*r_},[o]),x=b.jsxs("span",{style:{marginLeft:5},ref:y,"aria-label":n.name,children:[b.jsx("span",{children:u0(n.name)}),S&&b.jsx("a",{style:{marginLeft:5},href:qo(i,n),children:"download"})]});return!v||!S?b.jsx("div",{style:{marginLeft:20},children:x}):b.jsxs("div",{className:Ye(p&&"yellow-flash"),children:[b.jsx(c0,{title:x,expanded:s,setExpanded:l,expandOnTitleClick:!0,children:f&&b.jsx("i",{children:f})}),s&&o!==null&&b.jsx("div",{className:"vbox",style:{height:E},children:b.jsx(Sr,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},d_=({revealedAttachmentCallId:n})=>{const e=Ci(),{diffMap:i,screenshots:s,attachments:l}=H.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const d of o){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const m=p[1],y=p[2],v=f.get(m)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,f.set(m,v),o.delete(d)}else d.contentType.startsWith("image/")&&(u.add(d),o.delete(d))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!s.size&&!l.size?b.jsx(us,{text:"No attachments"}):b.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>b.jsxs(b.Fragment,{children:[o&&u&&b.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&b.jsx(e_,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:qo(e,o)},title:"Expected"},actual:{attachment:{...u,path:qo(e,u)}},diff:f?{attachment:{...f,path:qo(e,f)}}:void 0}})]})),s.size?b.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,u)=>{const f=hc(e,o);return b.jsxs("div",{className:"attachment-item",children:[b.jsx("div",{children:b.jsx("img",{draggable:"false",src:f})}),b.jsx("div",{children:b.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),l.size?b.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...l.values()].map((o,u)=>b.jsx("div",{className:"attachment-item",children:b.jsx(h_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},p_(o,u)))]})};function hc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function qo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),hc(n,e)+i}function p_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const g_=`
# Instructions

- Following Playwright test failed.
- Explain why, be concise, respect Playwright best practices.
- Provide a snippet of code with the fix, if possible.
`.trimStart();async function m_({testInfo:n,metadata:e,errorContext:i,errors:s,buildCodeFrame:l,stdout:o,stderr:u}){var y;const f=new Set(s.filter(v=>v.message&&!v.message.includes(`
`)).map(v=>v.message));for(const v of s)for(const S of f.keys())(y=v.message)!=null&&y.includes(S)&&f.delete(S);const d=s.filter(v=>!(!v.message||!v.message.includes(`
`)&&!f.has(v.message)));if(!d.length)return;const p=[g_,"# Test info","",n];o&&p.push("","# Stdout","","```",$o(o),"```"),u&&p.push("","# Stderr","","```",$o(u),"```"),p.push("","# Error details");for(const v of d)p.push("","```",$o(v.message||""),"```");i&&p.push(i);const m=await l(d[d.length-1]);return m&&p.push("","# Test source","","```ts",m,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
`)}const y_=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function $o(n){return n.replace(y_,"")}const b_=fc,v_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const s=n||[];return b.jsx(b_,{name:"stack-trace",ariaLabel:"Stack trace",items:s,selectedItem:s[i],render:l=>{const o=l.file[1]===":"?"\\":"/";return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"stack-trace-frame-function",children:l.function||"(anonymous)"}),b.jsx("span",{className:"stack-trace-frame-location",children:l.file.split(o).pop()}),b.jsx("span",{className:"stack-trace-frame-line",children:":"+l.line})]})},onSelected:l=>e(s.indexOf(l))})},Gh=({noShadow:n,children:e,noMinHeight:i,className:s,sidebarBackground:l,onClick:o})=>b.jsx("div",{className:Ye("toolbar",n&&"no-shadow",i&&"no-min-height",s,l&&"toolbar-sidebar-background"),onClick:o,children:e});function S_(n,e,i,s,l){const o=Ci();return Po(async()=>{var S,E,x,T;const u=n==null?void 0:n[e],f=u!=null&&u.file?u:l;if(!f)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const d=f.file;let p=i.get(d);p||(p={errors:((S=l==null?void 0:l.source)==null?void 0:S.errors)||[],content:(E=l==null?void 0:l.source)==null?void 0:E.content},i.set(d,p));const m=(f==null?void 0:f.line)||((x=p.errors[0])==null?void 0:x.line)||0,y=s&&d.startsWith(s)?d.substring(s.length+1):d,v=p.errors.map(C=>({type:"error",line:C.line,message:C.message}));if(v.push({line:m,type:"running"}),((T=l==null?void 0:l.source)==null?void 0:T.content)!==void 0)p.content=l.source.content;else if(p.content===void 0||f===l){const C=await h0(d);try{let k=o?await fetch(o.createRelativeUrl(`sha1/src@${C}.txt`)):void 0;(!k||k.status===404)&&(k=await fetch(`file?path=${encodeURIComponent(d)}`)),k.status>=400?p.content=`<Unable to read "${d}">`:p.content=await k.text()}catch{p.content=`<Unable to read "${d}">`}}return{model:o,source:p,highlight:v,targetLine:m,fileName:y,location:f}},[n,e,s,l],{source:{errors:[],content:"Loading…"},highlight:[]})}const w_=({stack:n,sources:e,rootDir:i,fallbackLocation:s,stackFrameLocation:l,onOpenExternally:o})=>{const[u,f]=H.useState(),[d,p]=H.useState(0);H.useEffect(()=>{u!==n&&(f(n),p(0))},[n,u,f,p]);const{source:m,highlight:y,targetLine:v,fileName:S,location:E}=S_(n,d,e,i,s),x=H.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),T=((n==null?void 0:n.length)??0)>1,C=x_(S);return b.jsx(Qo,{sidebarSize:200,orientation:l==="bottom"?"vertical":"horizontal",sidebarHidden:!T,main:b.jsxs("div",{className:"vbox","data-testid":"source-code",children:[S&&b.jsxs(Gh,{children:[b.jsx("div",{className:"source-tab-file-name",title:S,children:b.jsx("div",{children:C})}),b.jsx(Vh,{description:"Copy filename",value:C}),E&&b.jsx(Dt,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),b.jsx(Sr,{text:m.content||"",highlighter:"javascript",highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:b.jsx(v_,{stack:n,selectedFrame:d,setSelectedFrame:p})})};async function h0(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),s=[],l=new DataView(i);for(let o=0;o<l.byteLength;o+=1){const u=l.getUint8(o).toString(16).padStart(2,"0");s.push(u)}return s.join("")}function x_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const __=({prompt:n})=>b.jsx(Ho,{value:n,description:"Copy prompt",copiedDescription:b.jsxs(b.Fragment,{children:["Copied ",b.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function T_(n){return H.useMemo(()=>{if(!n)return{errors:new Map};const e=new Map;for(const i of n.errorDescriptors)e.set(i.message,i);return{errors:e}},[n])}function E_({message:n,error:e,sdkLanguage:i,revealInSource:s}){var f;let l,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(l=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),b.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[b.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Ih(e.action,{sdkLanguage:i}),l&&b.jsxs("div",{className:"action-location",children:["@ ",b.jsx("span",{title:o,onClick:()=>s(e),children:l})]})]}),b.jsx(Jx,{error:n})]})}const A_=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:s,testRunMetadata:l})=>{const o=Ci(),u=Po(async()=>{const p=o==null?void 0:o.attachments.find(m=>m.name==="error-context");if(p)return await fetch(hc(o,p)).then(m=>m.text())},[o],void 0),f=H.useCallback(async p=>{var S;const m=(S=p.stack)==null?void 0:S[0];if(!m)return;let y=o?await fetch(o.createRelativeUrl(`sha1/src@${await h0(m.file)}.txt`)):void 0;if((!y||y.status===404)&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const v=await y.text();return N_({source:v,message:$o(p.message).split(`
`)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[o]),d=Po(()=>m_({testInfo:(o==null?void 0:o.title)??"",metadata:l,errorContext:u,errors:(o==null?void 0:o.errorDescriptors)??[],buildCodeFrame:f}),[u,l,o,f],void 0);return n.errors.size?b.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[b.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&b.jsx(__,{prompt:d})}),[...n.errors.entries()].map(([p,m])=>{const y=`error-${s}-${p}`;return b.jsx(E_,{message:p,error:m,revealInSource:i,sdkLanguage:e},y)})]}):b.jsx(us,{text:"No errors"})};function N_({source:n,message:e,location:i,linesAbove:s,linesBelow:l}){const o=n.split(`
`).slice(),u=Math.max(0,i.line-s-1),f=Math.min(o.length,i.line+l),d=o.slice(u,f),p=String(f).length,m=d.map((y,v)=>`${u+v+1===i.line?"> ":"  "}${(u+v+1).toString().padEnd(p," ")} | ${y}`);return e&&m.splice(i.line-u,0,`${" ".repeat(p+2)} | ${" ".repeat(i.column-2)} ^ ${e}`),m.join(`
`)}const C_=fc;function k_(n,e){const{entries:i}=H.useMemo(()=>{if(!n)return{entries:[]};const l=[];function o(f){var m,y,v,S,E,x;const d=l[l.length-1];d&&((m=f.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=f.browserMessage)==null?void 0:v.location)===((S=d.browserMessage)==null?void 0:S.location)&&f.browserError===d.browserError&&((E=f.nodeMessage)==null?void 0:E.html)===((x=d.nodeMessage)==null?void 0:x.html)&&f.isError===d.isError&&f.isWarning===d.isWarning&&f.timestamp-d.timestamp<1e3?d.repeat++:l.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,d)=>{const p="time"in f?f.time:f.timestamp,m="time"in d?d.time:d.timestamp;return p-m});for(const f of u){if(f.type==="console"){const d=f.args&&f.args.length?O_(f.args):d0(f.text),p=f.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;o({browserMessage:{body:d,bodyString:f.text,location:y},isError:f.messageType==="error",isWarning:f.messageType==="warning",timestamp:f.time})}if(f.type==="event"&&f.method==="pageError"&&o({browserError:f.params.error,isError:!0,isWarning:!1,timestamp:f.time}),f.type==="stderr"||f.type==="stdout"){let d="";f.text&&(d=el(f.text.trim())||""),f.base64&&(d=el(atob(f.base64).trim())||""),o({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:l}},[n]);return{entries:H.useMemo(()=>e?i.filter(l=>l.timestamp>=e.minimum&&l.timestamp<=e.maximum):i,[i,e])}}const M_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:s})=>n.entries.length?b.jsx("div",{className:"console-tab",children:b.jsx(C_,{name:"console",onAccepted:s,onHighlighted:l=>i==null?void 0:i(l?n.entries.indexOf(l):void 0),items:n.entries,isError:l=>l.isError,isWarning:l=>l.isWarning,render:l=>{const o=_t(l.timestamp-e.minimum),u=b.jsx("span",{className:"console-time",children:o}),f=l.isError?"status-error":l.isWarning?"status-warning":"status-none",d=l.browserMessage||l.browserError?b.jsx("span",{className:Ye("codicon","codicon-browser",f),title:"Browser message"}):b.jsx("span",{className:Ye("codicon","codicon-file",f),title:"Runner message"});let p,m,y,v;const{browserMessage:S,browserError:E,nodeMessage:x}=l;if(S&&(p=S.location,m=S.body),E){const{error:T,value:C}=E;T?(m=T.message,v=T.stack):m=String(C)}return x&&(y=x.html),b.jsxs("div",{className:"console-line",children:[u,d,p&&b.jsx("span",{className:"console-location",children:p}),l.repeat>1&&b.jsx("span",{className:"console-repeat",children:l.repeat}),m&&b.jsx("span",{className:"console-line-message",children:m}),y&&b.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&b.jsx("div",{className:"console-stack",children:v})]})}})}):b.jsx(us,{text:"No console entries"});function O_(n){if(n.length===1)return d0(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",s=e?n.slice(1):n;let l=0;const o=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(b.jsx("span",{children:d},f.length+1));let p=0;for(;(u=o.exec(i))!==null;){const m=i.substring(p,u.index);d.push(b.jsx("span",{children:m},d.length+1)),p=u.index+2;const y=u[0][1];if(y==="%")d.push(b.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=s[l++],S={};typeof(v==null?void 0:v.value)!="string"&&(S.color="var(--vscode-debugTokenExpression-number)"),d.push(b.jsx("span",{style:S,children:(v==null?void 0:v.preview)||""},d.length+1))}else if(y==="c"){d=[];const v=s[l++],S=v?R_(v.preview):{};f.push(b.jsx("span",{style:S,children:d},f.length+1))}}for(p<i.length&&d.push(b.jsx("span",{children:i.substring(p)},d.length+1));l<s.length;l++){const m=s[l],y={};d.length&&d.push(b.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(b.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return f}function d0(n){return[b.jsx("span",{dangerouslySetInnerHTML:{__html:el(n.trim())}})]}function R_(n){try{const e={},i=n.split(";");for(const s of i){const l=s.trim();if(!l)continue;let[o,u]=l.split(":");if(o=o.trim(),u=u.trim(),!j_(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function j_(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const xh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:s,rightToolbar:l,dataTestId:o,mode:u})=>{const f=H.useId();return e||(e=n[0].id),u||(u="default"),b.jsx("div",{className:"tabbed-pane","data-testid":o,children:b.jsxs("div",{className:"vbox",children:[b.jsxs(Gh,{children:[s&&b.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),u==="default"&&b.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>b.jsx(p0,{id:d.id,ariaControls:`${f}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:i},d.id))]}),u==="select"&&b.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:b.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{i==null||i(n[d.currentTarget.selectedIndex].id)},children:n.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),b.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,p]},d.id)})})}),l&&b.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...l]})]}),n.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return b.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return b.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},p0=({id:n,title:e,count:i,errorCount:s,selected:l,onSelect:o,ariaControls:u})=>b.jsxs("div",{className:Ye("tabbed-pane-tab",l&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,"aria-selected":l,children:[b.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&b.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!s&&b.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function L_(n){const e=navigator.platform.includes("Win")?"win":"unix";let i=[];const s=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function l(y){return'^"'+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^

`)+'^"'}function o(y){function v(S){let x=S.charCodeAt(0).toString(16);for(;x.length<4;)x="0"+x;return"\\u"+x}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+y+"'"}const u=e==="win"?l:o;i.push(u(n.request.url).replace(/[[{}\]]/g,"\\$&"));let f="GET";const d=[],p=await g0(n);p&&(d.push("--data-raw "+u(p)),s.add("content-length"),f="POST"),n.request.method!==f&&i.push("-X "+u(n.request.method));const m=n.request.headers;for(let y=0;y<m.length;y++){const v=m[y],S=v.name.replace(/^:/,"");s.has(S.toLowerCase())||(v.value.trim()?i.push("-H "+u(S+": "+v.value)):i.push("-H "+u(S+";")))}return i=i.concat(d),"curl "+i.join(i.length>=3?e==="win"?` ^
  `:` \\
  `:" ")}async function D_(n,e=0){const i=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),s=new Set(["cookie","authorization"]),l=JSON.stringify(n.request.url),o=n.request.headers,u=o.reduce((E,x)=>{const T=x.name;return!i.has(T.toLowerCase())&&!T.includes(":")&&E.append(T,x.value),E},new Headers),f={};for(const E of u)f[E[0]]=E[1];const d=n.request.cookies.length||o.some(({name:E})=>s.has(E.toLowerCase()))?"include":"omit",p=o.find(({name:E})=>E.toLowerCase()==="referer"),m=p?p.value:void 0,y=await g0(n),v={headers:Object.keys(f).length?f:void 0,referrer:m,body:y,method:n.request.method,mode:"cors"};if(e===1){const E=o.find(T=>T.name.toLowerCase()==="cookie"),x={};delete v.mode,E&&(x.cookie=E.value),m&&(delete v.referrer,x.Referer=m),Object.keys(x).length&&(v.headers={...f,...x})}else v.credentials=d;const S=JSON.stringify(v,null,2);return`fetch(${l}, ${S});`}async function g0(n){var e,i;return(e=n.request.postData)!=null&&e._sha1?await fetch(`sha1/${n.request.postData._sha1}`).then(s=>s.text()):(i=n.request.postData)==null?void 0:i.text}class B_{generatePlaywrightRequestCall(e,i){let s=e.method.toLowerCase();const l=new URL(e.url),o=`${l.origin}${l.pathname}`,u={};["delete","get","head","post","put","patch"].includes(s)||(u.method=s,s="fetch"),l.searchParams.size&&(u.params=Object.fromEntries(l.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${s}(${f.join(", ")});`}prettyPrintObject(e,i=2,s=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`[
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${m}: ${p}`}).join(`,
`)}
${l}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
`)||e.includes("\r")||e.includes("	")?"`"+e+"`":`'${e}'`}}class U_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),o=[`"${`${s.origin}${s.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),s.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(s.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const f=o.length===1?o[0]:`
${o.map(d=>this.indent(d,2)).join(`,
`)}
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
`).map(s=>" ".repeat(i)+s).join(`
`)}prettyPrintObject(e,i=2,s=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`[
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1);return`${o}${this.stringLiteral(f)}: ${p}`}).join(`,
`)}
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class z_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),l=`${s.origin}${s.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),s.searchParams.size&&(o.Params=Object.fromEntries(s.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${l}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
`)}${u.length?`
`:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,s=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`new object[] {
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
`)}
${f}}`}if(Object.keys(e).length===0)return"new {}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`new() {
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=s===0?f:`[${this.stringLiteral(f)}]`;return`${o}${m} = ${p}`}).join(`,
`)}
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class H_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),l=[`"${s.origin}${s.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,d]of s.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(d)})`);i&&o.push(`setData(${this.stringLiteral(i)})`);for(const f of e.headers)o.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return o.length>0&&l.push(`RequestOptions.create()
  .${o.join(`
  .`)}
`),`request.${u}(${l.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function q_(n){if(n==="javascript")return new B_;if(n==="python")return new U_;if(n==="csharp")return new z_;if(n==="java")return new H_;throw new Error("Unsupported language: "+n)}const $_=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:s})=>{const[l,o]=H.useState("request"),u=Ci(),f=Po(async()=>{if(u&&n.request.postData){const d=n.request.headers.find(m=>m.name.toLowerCase()==="content-type"),p=d?d.value:"";if(n.request.postData._sha1){const m=await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`));return{text:_h(await m.text(),p),mimeType:p}}else return{text:_h(n.request.postData.text,p),mimeType:p}}else return null},[n],null);return b.jsx(xh,{dataTestId:"network-request-details",leftToolbar:[b.jsx(Dt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[b.jsx(I_,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>b.jsx(V_,{resource:n,startTimeOffset:i,requestBody:f})},{id:"response",title:"Response",render:()=>b.jsx(G_,{resource:n})},{id:"body",title:"Body",render:()=>b.jsx(K_,{resource:n})}],selectedTab:l,setSelectedTab:o})},I_=({resource:n,sdkLanguage:e,requestBody:i})=>{const s=b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),l=async()=>q_(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return b.jsxs("div",{className:"copy-request-dropdown",children:[b.jsxs(Dt,{className:"copy-request-dropdown-toggle",children:[b.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",b.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),b.jsxs("div",{className:"copy-request-dropdown-menu",children:[b.jsx(Ho,{description:"Copy as cURL",copiedDescription:s,value:()=>L_(n)}),b.jsx(Ho,{description:"Copy as Fetch",copiedDescription:s,value:()=>D_(n)}),b.jsx(Ho,{description:"Copy as Playwright",copiedDescription:s,value:l})]})]})},cr=({title:n,children:e,className:i})=>{const[s,l]=rn(`trace-viewer-network-details-${n.replaceAll(" ","-")}`,!0);return b.jsx(c0,{expanded:s,setExpanded:l,expandOnTitleClick:!0,title:b.jsx("span",{className:"network-request-details-header",children:n}),className:i,children:e})},V_=({resource:n,startTimeOffset:e,requestBody:i})=>b.jsxs("div",{className:"vbox network-request-details-tab",children:[b.jsxs(cr,{title:"General",children:[b.jsx("div",{className:"network-request-details-url",children:`URL: ${n.request.url}`}),b.jsx("div",{className:"network-request-details-general",children:`Method: ${n.request.method}`}),n.response.status!==-1&&b.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",b.jsx("span",{className:X_(n.response.status),style:{display:"inline-flex"},children:`${n.response.status} ${n.response.statusText}`})]})]}),n.request.queryString.length?b.jsx(cr,{title:"Query String Parameters",children:b.jsx("div",{className:"network-request-details-headers",children:n.request.queryString.map(s=>`${s.name}: ${s.value}`).join(`
`)})}):null,b.jsx(cr,{title:"Request Headers",children:b.jsx("div",{className:"network-request-details-headers",children:n.request.headers.map(s=>`${s.name}: ${s.value}`).join(`
`)})}),b.jsxs(cr,{title:"Time",children:[b.jsx("div",{className:"network-request-details-general",children:`Start: ${_t(e)}`}),b.jsx("div",{className:"network-request-details-general",children:`Duration: ${_t(n.time)}`})]}),i&&b.jsx(cr,{title:"Request Body",className:"network-request-request-body",children:b.jsx(Sr,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})})]}),G_=({resource:n})=>b.jsx("div",{className:"vbox network-request-details-tab",children:b.jsx(cr,{title:"Response Headers",children:b.jsx("div",{className:"network-request-details-headers",children:n.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
`)})})}),K_=({resource:n})=>{const e=Ci(),[i,s]=H.useState(null);return H.useEffect(()=>{(async()=>{if(e&&n.response.content._sha1){const o=n.response.content.mimeType.includes("image"),u=n.response.content.mimeType.includes("font"),f=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));if(o){const d=await f.blob(),p=new FileReader,m=new Promise(y=>p.onload=y);p.readAsDataURL(d),s({dataUrl:(await m).target.result})}else if(u){const d=await f.arrayBuffer();s({font:d})}else{const d=_h(await f.text(),n.response.content.mimeType);s({text:d,mimeType:n.response.content.mimeType})}}else s(null)})()},[n,e]),b.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&b.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&b.jsx(Y_,{font:i.font}),i&&i.dataUrl&&b.jsx("div",{children:b.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text&&b.jsx(Sr,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]})},Y_=({font:n})=>{const[e,i]=H.useState(!1);return H.useEffect(()=>{let s;try{s=new FontFace("font-preview",n),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(s)}},[n]),e?b.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):b.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",b.jsx("br",{}),"NOPQRSTUVWXYZ",b.jsx("br",{}),"abcdefghijklm",b.jsx("br",{}),"nopqrstuvwxyz",b.jsx("br",{}),"1234567890"]})};function X_(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function _h(n,e){if(n===null)return"Loading...";const i=n;if(i==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(i):i}function P_(n){const[e,i]=H.useState([]);H.useEffect(()=>{const o=[];for(let u=0;u<n.columns.length-1;++u){const f=n.columns[u];o[u]=(o[u-1]||0)+n.columnWidths.get(f)}i(o)},[n.columns,n.columnWidths]);function s(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const d=o[f]-(o[f-1]||0),p=n.columns[f];u.set(p,d)}n.setColumnWidths(u)}const l=H.useCallback(o=>{var u,f;(f=n.setSorting)==null||f.call(n,{by:o,negate:((u=n.sorting)==null?void 0:u.by)===o?!n.sorting.negate:!1})},[n]);return b.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[b.jsx(o0,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),b.jsxs("div",{className:"vbox",children:[b.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>b.jsxs("div",{className:"grid-view-header-cell "+F_(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&l(o),children:[b.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),b.jsx("span",{className:"codicon codicon-triangle-up"}),b.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),b.jsx(fc,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>b.jsx(b.Fragment,{children:n.columns.map((f,d)=>{const{body:p,title:m}=n.render(o,f,u);return b.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:m,style:{width:d<n.columns.length-1?n.columnWidths.get(f):void 0},children:p},n.columnTitle(f))})}),icon:n.icon,isError:n.isError,isWarning:n.isWarning,isInfo:n.isInfo,selectedItem:n.selectedItem,onAccepted:n.onAccepted,onSelected:n.onSelected,onHighlighted:n.onHighlighted,onIconClicked:n.onIconClicked,noItemsMessage:n.noItemsMessage,dataTestId:n.dataTestId,notSelectable:n.notSelectable})]})]})}function F_(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const Q_=["Fetch","HTML","JS","CSS","Font","Image"],Z_={searchValue:"",resourceTypes:new Set},J_=({filterState:n,onFilterStateChange:e})=>b.jsxs("div",{className:"network-filters",children:[b.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),b.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[b.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),Q_.map(i=>b.jsx("div",{title:i,onClick:s=>{let l;s.ctrlKey||s.metaKey?l=n.resourceTypes.symmetricDifference(new Set([i])):l=new Set([i]),e({...n,resourceTypes:l})},className:`network-filters-resource-type ${n.resourceTypes.has(i)?"selected":""}`,role:"tab","aria-selected":n.resourceTypes.has(i),children:i},i))]})]}),W_=P_;function eT(n,e){const i=H.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),s=H.useMemo(()=>new aT(n),[n]);return{resources:i,contextIdMap:s}}const tT=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:s})=>{const[l,o]=H.useState(void 0),[u,f]=H.useState(void 0),[d,p]=H.useState(Z_),{renderedEntries:m}=H.useMemo(()=>{const x=e.resources.map((T,C)=>lT(T,n,e.contextIdMap,C)).filter(hT(d));return l&&cT(x,l),{renderedEntries:x}},[e.resources,e.contextIdMap,d,l,n]),[y,v]=H.useState(()=>new Map(m0().map(x=>[x,iT(x)]))),S=H.useCallback(x=>{p(x),f(void 0)},[]);if(!e.resources.length)return b.jsx(us,{text:"No network calls"});const E=b.jsx(W_,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:u,onSelected:x=>f(x),onHighlighted:x=>i==null?void 0:i(x==null?void 0:x.ordinal),columns:sT(!!u,m),columnTitle:nT,columnWidths:y,setColumnWidths:v,isError:x=>x.status.code>=400||x.status.code===-1,isInfo:x=>!!x.route,render:(x,T)=>rT(x,T),sorting:l,setSorting:o});return b.jsxs(b.Fragment,{children:[b.jsx(J_,{filterState:d,onFilterStateChange:S}),!u&&E,u&&b.jsx(Qo,{sidebarSize:y.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:b.jsx($_,{resource:u.resource,sdkLanguage:s,startTimeOffset:u.start,onClose:()=>f(void 0)}),sidebar:E})]})},nT=n=>n==="contextId"?"Source":n==="name"?"Name":n==="method"?"Method":n==="status"?"Status":n==="contentType"?"Content Type":n==="duration"?"Duration":n==="size"?"Size":n==="start"?"Start":n==="route"?"Route":"",iT=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function sT(n,e){if(n){const s=["name"];return Gy(e)&&s.unshift("contextId"),s}let i=m0();return Gy(e)||(i=i.filter(s=>s!=="contextId")),i}function m0(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const rT=(n,e)=>e==="contextId"?{body:n.contextId,title:n.name.url}:e==="name"?{body:n.name.name,title:n.name.url}:e==="method"?{body:n.method}:e==="status"?{body:n.status.code>0?n.status.code:"",title:n.status.text}:e==="contentType"?{body:n.contentType}:e==="duration"?{body:_t(n.duration)}:e==="size"?{body:z1(n.size)}:e==="start"?{body:_t(n.start)}:e==="route"?{body:n.route}:{body:""};class aT{constructor(e){Te(this,"_pagerefToShortId",new Map);Te(this,"_contextToId",new Map);Te(this,"_lastPageId",0);Te(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let i=this._pagerefToShortId.get(e);return i||(++this._lastPageId,i="page#"+this._lastPageId,this._pagerefToShortId.set(e,i)),i}_apiRequestContextId(e){const i=Lb(e);if(!i)return"";let s=this._contextToId.get(i);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(i,s)),s}}function Gy(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const lT=(n,e,i,s)=>{const l=oT(n);let o;try{const d=new URL(n.request.url);o=d.pathname.substring(d.pathname.lastIndexOf("/")+1),o||(o=d.host),d.search&&(o+=d.search)}catch{o=n.request.url}let u=n.response.content.mimeType;const f=u.match(/^(.*);\s*charset=.*$/);return f&&(u=f[1]),{ordinal:s,name:{name:o,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:u,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:l,resource:n,contextId:i.contextId(n)}};function oT(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function cT(n,e){const i=uT(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function uT(n){if(n==="start")return(e,i)=>e.start-i.start;if(n==="duration")return(e,i)=>e.duration-i.duration;if(n==="status")return(e,i)=>e.status.code-i.status.code;if(n==="method")return(e,i)=>{const s=e.method,l=i.method;return s.localeCompare(l)};if(n==="size")return(e,i)=>e.size-i.size;if(n==="contentType")return(e,i)=>e.contentType.localeCompare(i.contentType);if(n==="name")return(e,i)=>e.name.name.localeCompare(i.name.name);if(n==="route")return(e,i)=>e.route.localeCompare(i.route);if(n==="contextId")return(e,i)=>e.contextId.localeCompare(i.contextId)}const fT={Fetch:n=>n==="application/json",HTML:n=>n==="text/html",CSS:n=>n==="text/css",JS:n=>n.includes("javascript"),Font:n=>n.includes("font"),Image:n=>n.includes("image")};function hT({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(l=>fT[l](i.contentType)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function dT(n,e){return n.active===e.active&&n.checked===e.checked&&n.disabled===e.disabled&&n.expanded===e.expanded&&n.selected===e.selected&&n.level===e.level&&n.pressed===e.pressed}function Kh(n,e,i={}){var v;const s=new n.LineCounter,l={keepSourceTokens:!0,lineCounter:s,...i},o=n.parseDocument(e,l),u=[],f=S=>[s.linePos(S[0]),s.linePos(S[1])],d=S=>{u.push({message:S.message,range:[s.linePos(S.pos[0]),s.linePos(S.pos[1])]})},p=(S,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const k=tc.parse(x,l,u);k&&(S.children=S.children||[],S.children.push(k));continue}if(x instanceof n.YAMLMap){m(S,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},m=(S,E)=>{for(const x of E.items){if(S.children=S.children||[],!(x.key instanceof n.Scalar&&typeof x.key.value=="string")){u.push({message:"Only string keys are supported",range:f(x.key.range||E.range)});continue}const C=x.key,k=x.value;if(C.value==="text"){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||E.range)});continue}S.children.push({kind:"text",text:Wf(k.value)});continue}if(C.value==="/children"){if(!(k instanceof n.Scalar&&typeof k.value=="string")||k.value!=="contain"&&k.value!=="equal"&&k.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||E.range)});continue}S.containerMode=k.value;continue}if(C.value.startsWith("/")){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||E.range)});continue}S.props=S.props??{},S.props[C.value.slice(1)]=Wf(k.value);continue}const $=tc.parse(C,l,u);if(!$)continue;if(k instanceof n.Scalar){const G=typeof k.value;if(G!=="string"&&G!=="number"&&G!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}S.children.push({...$,children:[{kind:"text",text:Wf(String(k.value))}]});continue}if(k instanceof n.YAMLSeq){S.children.push($),p($,k);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||E.range)})}},y={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:y}:(o.contents instanceof n.YAMLSeq||u.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?f(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),u.length?{errors:u,fragment:y}:(p(y,o.contents),u.length?{errors:u,fragment:pT}:((v=y.children)==null?void 0:v.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const pT={kind:"role",role:"fragment"};function y0(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Wf(n){return{raw:n,normalized:y0(n)}}class tc{static parse(e,i,s){try{return new tc(e.value)._parse()}catch(l){if(l instanceof Ky){const o=i.prettyErrors===!1?l.message:l.message+`:

`+e.value+`
`+" ".repeat(l.pos)+`^
`;return s.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+l.pos)]}),null}throw l}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const i=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(i,this._pos)}_readString(){let e="",i=!1;for(;!this._eof();){const s=this._next();if(i)e+=s,i=!1;else if(s==="\\")i=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new Ky(e,i||this._pos)}_readRegex(){let e="",i=!1,s=!1;for(;!this._eof();){const l=this._next();if(i)e+=l,i=!1;else if(l==="\\")i=!0,e+=l;else{if(l==="/"&&!s)return{pattern:e};l==="["?(s=!0,e+=l):l==="]"&&s?(e+=l,s=!1):e+=l}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),y0(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let i=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),i=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let l="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)l+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,l||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",s={kind:"role",role:e,name:i};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,i,s,l){if(i==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',l),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',l),e.disabled=s==="true";return}if(i==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',l),e.expanded=s==="true";return}if(i==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',l),e.active=s==="true";return}if(i==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',l),e.level=Number(s);return}if(i==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',l),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',l),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,l)}_assert(e,i,s){e||this._throwError(i||"Assertion error",s)}}class Ky extends Error{constructor(e,i){super(e),this.pos=i}}let b0={};function gT(n){b0=n}function tl(n,e){for(;e;){if(n.contains(e))return!0;e=S0(e)}return!1}function pt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function v0(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function S0(n){for(;n.parentElement;)n=n.parentElement;return pt(n)}function qa(n,e,i){for(;n;){const s=n.closest(e);if(i&&s!==i&&(s!=null&&s.contains(i)))return;if(s)return s;n=S0(n)}}function ki(n,e){const i=e==="::before"?Xh:e==="::after"?Ph:Yh;if(i&&i.has(n))return i.get(n);const s=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,s),s}function w0(n,e){if(e=e??ki(n),!e)return!0;if(Element.prototype.checkVisibility&&b0.browserNameForWorkarounds!=="webkit"){if(!n.checkVisibility())return!1}else{const i=n.closest("details,summary");if(i!==n&&(i==null?void 0:i.nodeName)==="DETAILS"&&!i.open)return!1}return e.visibility==="visible"}function nc(n){const e=ki(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let l=n.firstChild;l;l=l.nextSibling){if(l.nodeType===1&&Ti(l))return{visible:!0,inline:!1,cursor:i};if(l.nodeType===3&&x0(l))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!w0(n,e))return{cursor:i,visible:!1,inline:!1};const s=n.getBoundingClientRect();return{rect:s,cursor:i,visible:s.width>0&&s.height>0,inline:e.display==="inline"}}function Ti(n){return nc(n).visible}function x0(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function Ke(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let Yh,Xh,Ph,_0=0;function Fh(){++_0,Yh??(Yh=new Map),Xh??(Xh=new Map),Ph??(Ph=new Map)}function Qh(){--_0||(Yh=void 0,Xh=void 0,Ph=void 0)}function Yy(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const Xy="article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]",mT=[["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-labelledby",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",["generic"]]];function T0(n,e){return mT.some(([i,s])=>!(s!=null&&s.includes(e||""))&&n.hasAttribute(i))}function E0(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function yT(n){return!U0(n)&&(bT(n)||E0(n))}function bT(n){const e=Ke(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const eh={A:n=>n.hasAttribute("href")?"link":null,AREA:n=>n.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:n=>qa(n,Xy)?null:"contentinfo",FORM:n=>Yy(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>qa(n,Xy)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!T0(n)&&!E0(n)?"presentation":"img",INPUT:n=>{const e=n.type.toLowerCase();if(e==="search")return n.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const i=Er(n,n.getAttribute("list"))[0];return i&&Ke(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":LT[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SEARCH:()=>"search",SECTION:n=>Yy(n)?"region":null,SELECT:n=>n.hasAttribute("multiple")||n.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:n=>{const e=qa(n,"table"),i=e?Zh(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:n=>{const e=n.getAttribute("scope");if(e==="col"||e==="colgroup")return"columnheader";if(e==="row"||e==="rowgroup")return"rowheader";const i=n.nextElementSibling,s=n.previousElementSibling,l=n.parentElement&&Ke(n.parentElement)==="TR"?n.parentElement:void 0;if(!i&&!s){if(l){const o=qa(l,"table");if(o&&o.rows.length<=1)return null}return"columnheader"}return Py(i)&&Py(s)?"columnheader":Fy(i)||Fy(s)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function Py(n){return!!n&&Ke(n)==="TH"}function Fy(n){var e;return!n||Ke(n)!=="TD"?!1:!!((e=n.textContent)!=null&&e.trim()||n.children.length>0)}const vT={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function Qy(n){var s;const e=((s=eh[Ke(n)])==null?void 0:s.call(eh,n))||"";if(!e)return null;let i=n;for(;i;){const l=pt(i),o=vT[Ke(i)];if(!o||!l||!o.includes(Ke(l)))break;const u=Zh(l);if((u==="none"||u==="presentation")&&!A0(l,u))return u;i=l}return e}const ST=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function Zh(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>ST.includes(i))||null}function A0(n,e){return T0(n,e)||yT(n)}function ct(n){const e=Zh(n);if(!e)return Qy(n);if(e==="none"||e==="presentation"){const i=Qy(n);if(A0(n,i))return i}return e}function N0(n){return n===null?void 0:n.toLowerCase()==="true"}function C0(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ke(n))}function sn(n){if(C0(n))return!0;const e=ki(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let l=n.firstChild;l;l=l.nextSibling)if(l.nodeType===1&&!sn(l)||l.nodeType===3&&x0(l))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!w0(n,e)?!0:k0(n)}function k0(n){let e=_i==null?void 0:_i.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=ki(n);e=!i||i.display==="none"||N0(n.getAttribute("aria-hidden"))===!0}if(!e){const i=pt(n);i&&(e=k0(i))}_i==null||_i.set(n,e)}return e}function Er(n,e){if(!e)return[];const i=v0(n);if(!i)return[];try{const s=e.split(" ").filter(o=>!!o),l=[];for(const o of s){const u=i.querySelector("#"+CSS.escape(o));u&&!l.includes(u)&&l.push(u)}return l}catch{return[]}}function Kn(n){return n.trim()}function Ya(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function Zy(n,e){const i=[...n.querySelectorAll(e)];for(const s of Er(n,n.getAttribute("aria-owns")))s.matches(e)&&i.push(s),i.push(...s.querySelectorAll(e));return i}function Xa(n,e){const i=e==="::before"?cd:e==="::after"?ud:od;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const s=ki(n,e);let l;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(l=wT(n,o,!!e))}return e&&l!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(l=" "+l+" "),i&&i.set(n,l),l}function wT(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let s=Db(e).filter(f=>!(f instanceof Zo));const l=s.findIndex(f=>f instanceof lt&&f.value==="/");if(l!==-1)s=s.slice(l+1);else if(!i)return;const o=[];let u=0;for(;u<s.length;)if(s[u]instanceof $h)o.push(s[u].value),u++;else if(u+2<s.length&&s[u]instanceof Ka&&s[u].value==="attr"&&s[u+1]instanceof qh&&s[u+2]instanceof Hh){const f=s[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function M0(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=Er(n,e);return i.length?i:null}function xT(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),s=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(n);return i||s}function nl(n,e){const i=e?rd:sd;let s=i==null?void 0:i.get(n);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ct(n)||"")||(s=Ya(gn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,s)),s}function Jy(n,e){const i=e?ld:ad;let s=i==null?void 0:i.get(n);if(s===void 0){if(s="",n.hasAttribute("aria-describedby")){const l=Er(n,n.getAttribute("aria-describedby"));s=Ya(l.map(o=>gn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:sn(o)}})).join(" "))}else n.hasAttribute("aria-description")?s=Ya(n.getAttribute("aria-description")||""):s=Ya(n.getAttribute("title")||"");i==null||i.set(n,s)}return s}function _T(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function TT(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function ET(n){const e=fr;let i=fr==null?void 0:fr.get(n);if(i===void 0){i="";const s=_T(n)!=="false",l=TT(n);if(s||l){const o=n.getAttribute("aria-errormessage");i=Er(n,o).map(d=>Ya(gn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:sn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function gn(n,e){var d,p,m,y;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(C0(n)||!v&&sn(n))return e.visitedElements.add(n),""}const s=M0(n);if(!e.embeddedInLabelledBy){const v=(s||[]).map(S=>gn(S,{...e,embeddedInLabelledBy:{element:S,hidden:sn(S)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const l=ct(n)||"",o=Ke(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...n.labels||[]].includes(n),S=(s||[]).includes(n);if(!v&&!S){if(l==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(l)){e.visitedElements.add(n);let E;if(o==="SELECT")E=[...n.selectedOptions],!E.length&&n.options.length&&E.push(n.options[0]);else{const x=l==="combobox"?Zy(n,"*").find(T=>ct(T)==="listbox"):n;E=x?Zy(x,'[aria-selected="true"]').filter(T=>ct(T)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>gn(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(l))return e.visitedElements.add(n),n.hasAttribute("aria-valuetext")?n.getAttribute("aria-valuetext")||"":n.hasAttribute("aria-valuenow")?n.getAttribute("aria-valuenow")||"":n.getAttribute("value")||"";if(["menu"].includes(l))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(Kn(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(l)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const v=n.value||"";return Kn(v)?v:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const v=n.labels||[];return v.length&&!e.embeddedInLabelledBy?ja(v,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const v=n.labels||[];if(v.length&&!e.embeddedInLabelledBy)return ja(v,e);const S=n.getAttribute("alt")||"";if(Kn(S))return S;const E=n.getAttribute("title")||"";return Kn(E)?E:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(n);const v=n.labels||[];if(v.length)return ja(v,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(n);const v=n.labels||[];return v.length?ja(v,e):n.getAttribute("title")||""}if(!s&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const v=n.labels||[];if(v.length)return ja(v,e);const S=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",E=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!S||x?x:E}if(!s&&o==="FIELDSET"){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(Ke(S)==="LEGEND")return gn(S,{...i,embeddedInNativeTextAlternative:{element:S,hidden:sn(S)}});return n.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(Ke(S)==="FIGCAPTION")return gn(S,{...i,embeddedInNativeTextAlternative:{element:S,hidden:sn(S)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const v=n.getAttribute("alt")||"";return Kn(v)?v:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(Ke(S)==="CAPTION")return gn(S,{...i,embeddedInNativeTextAlternative:{element:S,hidden:sn(S)}});const v=n.getAttribute("summary")||"";if(v)return v}if(o==="AREA"){e.visitedElements.add(n);const v=n.getAttribute("alt")||"";return Kn(v)?v:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(Ke(v)==="TITLE"&&v.ownerSVGElement)return gn(v,{...i,embeddedInLabelledBy:{element:v,hidden:sn(v)}})}if(n.ownerSVGElement&&o==="A"){const v=n.getAttribute("xlink:title")||"";if(Kn(v))return e.visitedElements.add(n),v}}const f=o==="SUMMARY"&&!["presentation","none"].includes(l);if(xT(l,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const v=AT(n,i);if(e.embeddedInTargetElement==="self"?Kn(v):v)return v}if(!["presentation","none"].includes(l)||o==="IFRAME"){e.visitedElements.add(n);const v=n.getAttribute("title")||"";if(Kn(v))return v}return e.visitedElements.add(n),""}function AT(n,e){const i=[],s=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=ki(o))==null?void 0:f.display)||"inline";let p=gn(o,e);(d!=="inline"||o.nodeName==="BR")&&(p=" "+p+" "),i.push(p)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Xa(n,"::before")||"");const l=Xa(n);if(l!==void 0)i.push(l);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)s(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)s(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)s(u,!0);for(const u of Er(n,n.getAttribute("aria-owns")))s(u,!0)}}return i.push(Xa(n,"::after")||""),i.join("")}const Jh=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function O0(n){return Ke(n)==="OPTION"?n.selected:Jh.includes(ct(n)||"")?N0(n.getAttribute("aria-selected"))===!0:!1}const Wh=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function R0(n){const e=ed(n,!0);return e==="error"?!1:e}function NT(n){return ed(n,!0)}function CT(n){return ed(n,!1)}function ed(n,e){const i=Ke(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(Wh.includes(ct(n)||"")){const s=n.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const kT=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function MT(n){const e=Ke(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):kT.includes(ct(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const td=["button"];function j0(n){if(td.includes(ct(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const nd=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function L0(n){if(Ke(n)==="DETAILS")return n.open;if(nd.includes(ct(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const id=["heading","listitem","row","treeitem"];function D0(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Ke(n)];if(e)return e;if(id.includes(ct(n)||"")){const i=n.getAttribute("aria-level"),s=i===null?Number.NaN:Number(i);if(Number.isInteger(s)&&s>=1)return s}return 0}const B0=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function ic(n){return U0(n)||z0(n)}function U0(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Ke(n))&&(n.hasAttribute("disabled")||OT(n)||RT(n))}function OT(n){return Ke(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function RT(n){const e=n==null?void 0:n.closest("FIELDSET[DISABLED]");if(!e)return!1;const i=e.querySelector(":scope > LEGEND");return!i||!i.contains(n)}function z0(n,e=!1){if(!n)return!1;if(e||B0.includes(ct(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:z0(pt(n),!0)}return!1}function ja(n,e){return[...n].map(i=>gn(i,{...e,embeddedInLabel:{element:i,hidden:sn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function jT(n){const e=fd;let i=n,s;const l=[];for(;i;i=pt(i)){const o=e.get(i);if(o!==void 0){s=o;break}l.push(i);const u=ki(i);if(!u){s=!0;break}const f=u.pointerEvents;if(f){s=f!=="none";break}}s===void 0&&(s=!0);for(const o of l)e.set(o,s);return s}let sd,rd,ad,ld,fr,_i,od,cd,ud,fd,H0=0;function dc(){Fh(),++H0,sd??(sd=new Map),rd??(rd=new Map),ad??(ad=new Map),ld??(ld=new Map),fr??(fr=new Map),_i??(_i=new Map),od??(od=new Map),cd??(cd=new Map),ud??(ud=new Map),fd??(fd=new Map)}function pc(){--H0||(sd=void 0,rd=void 0,ad=void 0,ld=void 0,fr=void 0,_i=void 0,od=void 0,cd=void 0,ud=void 0,fd=void 0),Qh()}const LT={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function DT(n){return q0(n)?"'"+n.replace(/'/g,"''")+"'":n}function th(n){return q0(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
`:return"\\n";case"\r":return"\\r";case"	":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function q0(n){return!!(n.length===0||/^\s|\s$/.test(n)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(n)||/^-/.test(n)||/[\n:](\s|$)/.test(n)||/\s#/.test(n)||/[\n\r]/.test(n)||/^[&*\],?!>|@"'#%]/.test(n)||/[{}`]/.test(n)||/^\[/.test(n)||!isNaN(Number(n))||["y","n","yes","no","true","false","on","off","null"].includes(n.toLowerCase()))}function BT(n,e){if(n.role!==e.role||n.name!==e.name||!dT(n,e)||sc(n)!==sc(e))return!1;const i=Object.keys(n.props),s=Object.keys(e.props);return i.length===s.length&&i.every(l=>n.props[l]===e.props[l])}let UT=0;function $0(n){return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Pa(n,e){const i=$0(e),s=new Set,l={root:{role:"fragment",name:"",children:[],element:n,props:{},box:nc(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]},o=(f,d,p)=>{if(s.has(d))return;if(s.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!sn(m);let v=y;if(i.visibility==="ariaOrVisible"&&(v=y||Ti(m)),i.visibility==="ariaAndVisible"&&(v=y&&Ti(m)),i.visibility==="aria"&&!v)return;const S=[];if(m.hasAttribute("aria-owns")){const x=m.getAttribute("aria-owns").split(/\s+/);for(const T of x){const C=n.ownerDocument.getElementById(T);C&&S.push(C)}}const E=v?zT(m,i):null;E&&(E.ref&&(l.elements.set(E.ref,m),l.refs.set(m,E.ref),E.role==="iframe"&&l.iframeRefs.push(E.ref)),f.children.push(E)),u(E||f,m,S,v)};function u(f,d,p,m){var E;const v=(((E=ki(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&f.children.push(v),f.children.push(Xa(d,"::before")||"");const S=d.nodeName==="SLOT"?d.assignedNodes():[];if(S.length)for(const x of S)o(f,x,m);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,m);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,m)}for(const x of p)o(f,x,m);if(f.children.push(Xa(d,"::after")||""),v&&f.children.push(v),f.children.length===1&&f.name===f.children[0]&&(f.children=[]),f.role==="link"&&d.hasAttribute("href")){const x=d.getAttribute("href");f.props.url=x}if(f.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==f.name){const x=d.getAttribute("placeholder");f.props.placeholder=x}}dc();try{o(l.root,n,!0)}finally{pc()}return qT(l.root),HT(l.root),l}function Wy(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;let i;i=n.element._ariaRef,(!i||i.role!==n.role||i.name!==n.name)&&(i={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++UT},n.element._ariaRef=i),n.ref=i.ref}function zT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},element:n,box:nc(n),receivesPointerEvents:!0,active:i};return Wy(p,e),p}const s=e.includeGenericRole?"generic":null,l=ct(n)??s;if(!l||l==="presentation"||l==="none")return null;const o=Tt(nl(n,!1)||""),u=jT(n),f=nc(n);if(l==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:l,name:o,children:[],props:{},element:n,box:f,receivesPointerEvents:u,active:i};return Wy(d,e),Wh.includes(l)&&(d.checked=R0(n)),B0.includes(l)&&(d.disabled=ic(n)),nd.includes(l)&&(d.expanded=L0(n)),id.includes(l)&&(d.level=D0(n)),td.includes(l)&&(d.pressed=j0(n)),Jh.includes(l)&&(d.selected=O0(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function HT(n){const e=i=>{const s=[];for(const o of i.children||[]){if(typeof o=="string"){s.push(o);continue}const u=e(o);s.push(...u)}return i.role==="generic"&&!i.name&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(i.children=s,[i])};e(n)}function qT(n){const e=(s,l)=>{if(!s.length)return;const o=Tt(s.join(""));o&&l.push(o),s.length=0},i=s=>{const l=[],o=[];for(const u of s.children||[])typeof u=="string"?o.push(u):(e(o,l),i(u),l.push(u));e(o,l),s.children=l.length?l:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};i(n)}function $T(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function eb(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=IT(e);return i?!!n.match(i):!1}const nh=Symbol("cachedRegex");function IT(n){if(n[nh]!==void 0)return n[nh];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let s;try{s=i?new RegExp(e.slice(1,-1)):null}catch{s=null}return n[nh]=s,s}function VT(n,e){const i=Pa(n,{mode:"expect"});return{matches:I0(i.root,e,!1,!1),received:{raw:Fa(i,{mode:"expect"}),regex:Fa(i,{mode:"codegen"})}}}function GT(n,e){const i=Pa(n,{mode:"expect"}).root;return I0(i,e,!0,!1).map(l=>l.element)}function hd(n,e,i){var s;return typeof n=="string"&&e.kind==="text"?eb(n,e.text):n===null||typeof n!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==n.role||e.checked!==void 0&&e.checked!==n.checked||e.disabled!==void 0&&e.disabled!==n.disabled||e.expanded!==void 0&&e.expanded!==n.expanded||e.level!==void 0&&e.level!==n.level||e.pressed!==void 0&&e.pressed!==n.pressed||e.selected!==void 0&&e.selected!==n.selected||!$T(n.name,e.name)||!eb(n.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?nb(n.children||[],e.children||[]):e.containerMode==="equal"?tb(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?tb(n.children||[],e.children||[],!0):nb(n.children||[],e.children||[])}function tb(n,e,i){if(e.length!==n.length)return!1;for(let s=0;s<e.length;++s)if(!hd(n[s],e[s],i))return!1;return!0}function nb(n,e){if(e.length>n.length)return!1;const i=n.slice(),s=e.slice();for(const l of s){let o=i.shift();for(;o&&!hd(o,l,!1);)o=i.shift();if(!o)return!1}return!0}function I0(n,e,i,s){const l=[],o=(u,f)=>{if(hd(u,e,s)){const d=typeof u=="string"?f:u;return d&&l.push(d),!i}if(typeof u=="string")return!1;for(const d of u.children||[])if(o(d,u))return!0;return!1};return o(n,null),l}function V0(n,e=new Map){n!=null&&n.ref&&e.set(n.ref,n);for(const i of(n==null?void 0:n.children)||[])typeof i!="string"&&V0(i,e);return e}function KT(n,e){var o;const i=V0(e==null?void 0:e.root),s=new Map,l=(u,f)=>{let d=u.children.length===(f==null?void 0:f.children.length)&&BT(u,f),p=d;for(let m=0;m<u.children.length;m++){const y=u.children[m],v=f==null?void 0:f.children[m];if(typeof y=="string")d&&(d=y===v),p&&(p=y===v);else{let S=typeof v!="string"?v:void 0;y.ref&&(S=i.get(y.ref));const E=l(y,S);(!S||!E&&!y.ref||S!==v)&&(p=!1),d&&(d=E&&S===v)}}return s.set(u,d?"same":p?"skip":"changed"),d};return l(n.root,i.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),s}function YT(n,e){const i=[],s=l=>{const o=e.get(l);if(o!=="same")if(o==="skip")for(const u of l.children)typeof u!="string"&&s(u);else i.push(l)};for(const l of n)typeof l=="string"?i.push(l):s(l);return i}function Fa(n,e,i){const s=$0(e),l=[],o=s.renderStringsAsRegex?PT:()=>!0,u=s.renderStringsAsRegex?XT:S=>S;let f=n.root.role==="fragment"?n.root.children:[n.root];const d=KT(n,i);i&&(f=YT(f,d));const p=(S,E)=>{const x=th(u(S));x&&l.push(E+"- text: "+x)},m=(S,E)=>{let x=S.role;if(S.name&&S.name.length<=900){const T=u(S.name);if(T){const C=T.startsWith("/")&&T.endsWith("/")?T:JSON.stringify(T);x+=" "+C}}return S.checked==="mixed"&&(x+=" [checked=mixed]"),S.checked===!0&&(x+=" [checked]"),S.disabled&&(x+=" [disabled]"),S.expanded&&(x+=" [expanded]"),S.active&&s.renderActive&&(x+=" [active]"),S.level&&(x+=` [level=${S.level}]`),S.pressed==="mixed"&&(x+=" [pressed=mixed]"),S.pressed===!0&&(x+=" [pressed]"),S.selected===!0&&(x+=" [selected]"),S.ref&&(x+=` [ref=${S.ref}]`,E&&sc(S)&&(x+=" [cursor=pointer]")),x},y=S=>(S==null?void 0:S.children.length)===1&&typeof S.children[0]=="string"&&!Object.keys(S.props).length?S.children[0]:void 0,v=(S,E,x)=>{if(d.get(S)==="same"&&S.ref){l.push(E+`- ref=${S.ref} [unchanged]`);return}const T=!!i&&!E,C=E+"- "+(T?"<changed> ":"")+DT(m(S,x)),k=y(S);if(!S.children.length&&!Object.keys(S.props).length)l.push(C);else if(k!==void 0)o(S,k)?l.push(C+": "+th(u(k))):l.push(C);else{l.push(C+":");for(const[R,G]of Object.entries(S.props))l.push(E+"  - /"+R+": "+th(G));const $=E+"  ",V=!!S.ref&&x&&sc(S);for(const R of S.children)typeof R=="string"?p(o(S,R)?R:"",$):v(R,$,x&&!V)}};for(const S of f)typeof S=="string"?p(S,""):v(S,"",!!s.renderCursorPointer);return l.join(`
`)}function XT(n){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let i="",s=0;const l=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(l,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=Wo(n.slice(s,f));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];i+=m;break}return s=f+o.length,o}),i?(i+=Wo(n.slice(s)),String(new RegExp(i))):n}function PT(n,e){if(!e.length)return!1;if(!n.name)return!0;if(n.name.length>e.length)return!1;const i=e.length<=200&&n.name.length<=200?Rx(e,n.name):"";let s=e;for(;i&&s.includes(i);)s=s.replace(i,"");return s.trim().length/e.length>.1}function sc(n){return n.box.cursor==="pointer"}const ib=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;z-index:10;font-size:13px}x-pw-dialog:not(.autosize){width:400px;height:150px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.record.toggled>x-div{clip-path:url(#icon-stop-circle)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}x-pw-action-list{flex:auto;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}x-pw-action-item{padding:6px 10px;cursor:pointer;overflow:hidden}x-pw-action-item:hover{background-color:#f2f2f2}x-pw-action-item:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}";class ih{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483647",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent",this._actionPointElement=i.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const s=new this._injectedScript.window.CSSStyleSheet;s.replaceSync(ib),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=ib,this._glassPaneShadow.appendChild(s)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const i=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),s=ls(this._language,Xn(e)),l=i.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(i.map((o,u)=>{const f=i.length>1?` [${u+1} of ${i.length}]`:"";return{element:o,color:l,tooltipText:s+f}})),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,i){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,i;for(const s of this._renderedEntries)(e=s.highlightElement)==null||e.remove(),(i=s.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(s=>({element:s,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const s=this._createHighlightElement();this._glassPaneShadow.appendChild(s);let l;if(i.tooltipText){l=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(l),l.style.top="0",l.style.left="0",l.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,l.appendChild(o)}this._renderedEntries.push({targetElement:i.element,color:i.color,tooltipElement:l,highlightElement:s})}for(const i of this._renderedEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:s,anchorTop:l}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=l,i.tooltipLeft=s}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const s=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=s.x+"px",i.highlightElement.style.top=s.y+"px",i.highlightElement.style.width=s.width+"px",i.highlightElement.style.height=s.height+"px",i.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}firstTooltipBox(){const e=this._renderedEntries[0];if(!(!e||!e.tooltipElement||e.tooltipLeft===void 0||e.tooltipTop===void 0))return{x:e.tooltipLeft,y:e.tooltipTop,left:e.tooltipLeft,top:e.tooltipTop,width:e.tooltipElement.offsetWidth,height:e.tooltipElement.offsetHeight,bottom:e.tooltipTop+e.tooltipElement.offsetHeight,right:e.tooltipLeft+e.tooltipElement.offsetWidth,toJSON:()=>{}}}tooltipPosition(e,i){const s=i.offsetWidth,l=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+s>o-5&&(f=o-s-5);let d=Math.max(0,e.bottom)+5;return d+l>u-5&&(Math.max(0,e.top)>l+5?d=Math.max(0,e.top)-l-5:d=u-5-l),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let i=0;i<this._renderedEntries.length;++i){if(e[i].element!==this._renderedEntries[i].targetElement||e[i].color!==this._renderedEntries[i].color)return!1;const s=this._renderedEntries[i].box;if(!s)return!1;const l=e[i].element.getBoundingClientRect();if(l.top!==s.top||l.right!==s.right||l.bottom!==s.bottom||l.left!==s.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}onGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="auto",this._glassPaneElement.style.backgroundColor="rgba(0, 0, 0, 0.3)",this._glassPaneElement.addEventListener("click",e)}offGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.backgroundColor="transparent",this._glassPaneElement.removeEventListener("click",e)}}function FT(n,e,i){const s=n.left-e.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function QT(n,e,i){const s=e.left-n.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function ZT(n,e,i){const s=e.top-n.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function JT(n,e,i){const s=n.top-e.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function WT(n,e,i){const s=i===void 0?50:i;let l=0;return n.left-e.right>=0&&(l+=n.left-e.right),e.left-n.right>=0&&(l+=e.left-n.right),e.top-n.bottom>=0&&(l+=e.top-n.bottom),n.top-e.bottom>=0&&(l+=n.top-e.bottom),l>s?void 0:l}const eE=["left-of","right-of","above","below","near"];function G0(n,e,i,s){const l=e.getBoundingClientRect(),o={"left-of":QT,"right-of":FT,above:ZT,below:JT,near:WT}[n];let u;for(const f of i){if(f===e)continue;const d=o(l,f.getBoundingClientRect(),s);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function K0(n,e){for(const i of e.jsonPath)n!=null&&(n=n[i]);return Y0(n,e)}function Y0(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?s instanceof RegExp?typeof i=="string"&&!!i.match(s):i===s:typeof i!="string"||typeof s!="string"?!1:e.op==="*="?i.includes(s):e.op==="^="?i.startsWith(s):e.op==="$="?i.endsWith(s):e.op==="|="?i===s||i.startsWith(s+"-"):e.op==="~="?i.split(" ").includes(s):!1}function dd(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Lt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!dd(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:Tt(e.value),immediate:[e.value]};else{for(let l=e.firstChild;l;l=l.nextSibling)if(l.nodeType===Node.TEXT_NODE)i.full+=l.nodeValue||"",s+=l.nodeValue||"";else{if(l.nodeType===Node.COMMENT_NODE)continue;s&&i.immediate.push(s),s="",l.nodeType===Node.ELEMENT_NODE&&(i.full+=Lt(n,l).full)}s&&i.immediate.push(s),e.shadowRoot&&(i.full+=Lt(n,e.shadowRoot).full),i.full&&(i.normalized=Tt(i.full))}}n.set(e,i)}return i}function gc(n,e,i){if(dd(e)||!i(Lt(n,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&i(Lt(n,s)))return"selfAndChildren";return e.shadowRoot&&i(Lt(n,e.shadowRoot))?"selfAndChildren":"self"}function X0(n,e){const i=M0(e);if(i)return i.map(o=>Lt(n,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:Tt(s),immediate:[s]}];const l=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||l){const o=e.labels;if(o)return[...o].map(u=>Lt(n,u))}return[]}function sb(n){return n.displayName||n.name||"Anonymous"}function tE(n){if(n.type)switch(typeof n.type){case"function":return sb(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?sb(n.type.render):"")}if(n._currentElement){const e=n._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function nE(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function iE(n){if(n.child){const i=[];for(let s=n.child;s;s=s.sibling)i.push(s);return i}if(!n._currentElement)return[];const e=i=>{var l;const s=(l=i._currentElement)==null?void 0:l.type;return typeof s=="function"||typeof s=="string"};if(n._renderedComponent){const i=n._renderedComponent;return e(i)?[i]:[]}return n._renderedChildren?[...Object.values(n._renderedChildren)].filter(e):[]}function sE(n){var s;const e=n.memoizedProps||((s=n._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const i={...e};return delete i.children,i}function P0(n){var s;const e={key:nE(n),name:tE(n),children:iE(n).map(P0),rootElements:[],props:sE(n)},i=n.stateNode||n._hostNode||((s=n._renderedComponent)==null?void 0:s._hostNode);if(i instanceof Element)e.rootElements.push(i);else for(const l of e.children)e.rootElements.push(...l.rootElements);return e}function F0(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)F0(s,e,i);return i}function Q0(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const l=s.currentNode,o=l,u=Object.keys(o).find(d=>d.startsWith("__reactContainer")&&o[d]!==null);if(u)e.push(o[u].stateNode.current);else{const d="_reactRootContainer";o.hasOwnProperty(d)&&o[d]!==null&&e.push(o[d]._internalRoot.current)}if(l instanceof Element&&l.hasAttribute("data-reactroot"))for(const d of Object.keys(l))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(l[d]);const f=l instanceof Element?l.shadowRoot:null;f&&Q0(f,e)}while(s.nextNode());return e}const rE=()=>({queryAll(n,e){const{name:i,attributes:s}=as(e,!1),u=Q0(n.ownerDocument||n).map(d=>P0(d)).map(d=>F0(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),i&&p.name!==i||p.rootElements.some(y=>!tl(n,y)))return!1;for(const y of s)if(!K0(m,y))return!1;return!0})).flat(),f=new Set;for(const d of u)for(const p of d.rootElements)f.add(p);return[...f]}}),Z0=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];Z0.sort();function La(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function nr(n,e){if(n.op!=="<truthy>"&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(i=>JSON.stringify(i)).join(", ")}`)}function ir(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function aE(n,e){const i={role:e};for(const s of n)switch(s.name){case"checked":{La(s.name,Wh,e),nr(s,[!0,!1,"mixed"]),ir(s,["<truthy>","="]),i.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{La(s.name,td,e),nr(s,[!0,!1,"mixed"]),ir(s,["<truthy>","="]),i.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{La(s.name,Jh,e),nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{La(s.name,nd,e),nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(La(s.name,id,e),typeof s.value=="string"&&(s.value=+s.value),s.op!=="="||typeof s.value!="number"||Number.isNaN(s.value))throw new Error('"level" attribute must be compared to a number');i.level=s.value;break}case"disabled":{nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.disabled=s.op==="<truthy>"?!0:s.value;break}case"name":{if(s.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof s.value!="string"&&!(s.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');i.name=s.value,i.nameOp=s.op,i.exact=s.caseSensitive;break}case"include-hidden":{nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${Z0.map(l=>`"${l}"`).join(", ")}.`)}return i}function lE(n,e,i){const s=[],l=u=>{if(ct(u)===e.role&&!(e.selected!==void 0&&O0(u)!==e.selected)&&!(e.checked!==void 0&&R0(u)!==e.checked)&&!(e.pressed!==void 0&&j0(u)!==e.pressed)&&!(e.expanded!==void 0&&L0(u)!==e.expanded)&&!(e.level!==void 0&&D0(u)!==e.level)&&!(e.disabled!==void 0&&ic(u)!==e.disabled)&&!(!e.includeHidden&&sn(u))){if(e.name!==void 0){const f=Tt(nl(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Tt(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!Y0(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))l(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),s}function rb(n){return{queryAll:(e,i)=>{const s=as(i,!0),l=s.name.toLowerCase();if(!l)throw new Error("Role must not be empty");const o=aE(s.attributes,l);dc();try{return lE(e,o,n)}finally{pc()}}}}class oE{constructor(){this._retainCacheCounter=0,this._cacheText=new Map,this._cacheQueryCSS=new Map,this._cacheMatches=new Map,this._cacheQuery=new Map,this._cacheMatchesSimple=new Map,this._cacheMatchesParents=new Map,this._cacheCallMatches=new Map,this._cacheCallQuery=new Map,this._cacheQuerySimple=new Map,this._engines=new Map,this._engines.set("not",fE),this._engines.set("is",$a),this._engines.set("where",$a),this._engines.set("has",cE),this._engines.set("scope",uE),this._engines.set("light",hE),this._engines.set("visible",dE),this._engines.set("text",pE),this._engines.set("text-is",gE),this._engines.set("text-matches",mE),this._engines.set("has-text",yE),this._engines.set("right-of",Da("right-of")),this._engines.set("left-of",Da("left-of")),this._engines.set("above",Da("above")),this._engines.set("below",Da("below")),this._engines.set("near",Da("near")),this._engines.set("nth-match",bE);const e=[...this._engines.keys()];e.sort();const i=[...Wb];if(i.sort(),e.join("|")!==i.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${i.join("|")}`)}begin(){++this._retainCacheCounter}end(){--this._retainCacheCounter,this._retainCacheCounter||(this._cacheQueryCSS.clear(),this._cacheMatches.clear(),this._cacheQuery.clear(),this._cacheMatchesSimple.clear(),this._cacheMatchesParents.clear(),this._cacheCallMatches.clear(),this._cacheCallQuery.clear(),this._cacheQuerySimple.clear(),this._cacheText.clear())}_cached(e,i,s,l){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>s.every((p,m)=>d.rest[m]===p));if(u)return u.result;const f=l();return o.push({rest:s,result:f}),f}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,i,s){const l=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[l,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(l)?this._matchesEngine($a,e,l,s):(this._hasScopeClause(l)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,l.simples[l.simples.length-1].selector,s)?this._matchesParents(e,l,l.simples.length-2,s):!1))}finally{this.end()}}query(e,i){const s=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine($a,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const l=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,s.simples[s.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,s,s.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const d=this._scoreMap.get(u),p=this._scoreMap.get(f);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=l,o})}finally{this.end()}}_markScore(e,i){this._scoreMap&&this._scoreMap.set(e,i)}_hasScopeClause(e){return e.simples.some(i=>i.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=pt(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,s){return this._cached(this._cacheMatchesSimple,e,[i,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||i.css&&!this._matchesCSS(e,i.css))return!1;for(const l of i.functions)if(!this._matchesEngine(this._getEngine(l.name),e,l.args,s))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=i.css;const l=i.functions;s==="*"&&l.length&&(s=void 0);let o,u=-1;s!==void 0?o=this._queryCSS(e,s):(u=l.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(l[u].name),e,l[u].args));for(let f=0;f<l.length;f++){if(f===u)continue;const d=this._getEngine(l[f].name);d.matches!==void 0&&(o=o.filter(p=>this._matchesEngine(d,p,l[f].args,e)))}for(let f=0;f<l.length;f++){if(f===u)continue;const d=this._getEngine(l[f].name);d.matches===void 0&&(o=o.filter(p=>this._matchesEngine(d,p,l[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,s,l){return s<0?!0:this._cached(this._cacheMatchesParents,e,[i,s,l.scope,l.pierceShadow,l.originalScope],()=>{const{selector:o,combinator:u}=i.simples[s];if(u===">"){const f=Ao(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,s-1,l)}if(u==="+"){const f=sh(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,s-1,l)}if(u===""){let f=Ao(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="")break}f=Ao(f,l)}return!1}if(u==="~"){let f=sh(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="~")break}f=sh(f,l)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="")break}f=Ao(f,l)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,s,l){if(e.matches)return this._callMatches(e,i,s,l);if(e.query)return this._callQuery(e,s,l).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,s){if(e.query)return this._callQuery(e,s,i);if(e.matches)return this._queryCSS(i,"*").filter(l=>this._callMatches(e,l,s,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,s,l){return this._cached(this._cacheCallMatches,i,[e,l.scope,l.pierceShadow,l.originalScope,...s],()=>e.matches(i,s,l,this))}_callQuery(e,i,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...i],()=>e.query(s,i,this))}_matchesCSS(e,i){return e.matches(i)}_queryCSS(e,i){return this._cached(this._cacheQueryCSS,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function l(o){if(s=s.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&l(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&l(u.shadowRoot)}}return l(e.scope),s})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const $a={matches(n,e,i,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(l=>s.matches(n,l,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const l of e)s=s.concat(i.query(n,l));return e.length===1?s:J0(s)}},cE={matches(n,e,i,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...i,scope:n},e).length>0}},uE={matches(n,e,i,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const l=i.originalScope||i.scope;return l.nodeType===9?n===l.documentElement:n===l},query(n,e,i){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;if(s.nodeType===9){const l=s.documentElement;return l?[l]:[]}return s.nodeType===1?[s]:[]}},fE={matches(n,e,i,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(n,e,i)}},hE={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,s){return s.matches(n,e,{...i,pierceShadow:!1})}},dE={matches(n,e,i,s){if(e.length)throw new Error('"visible" engine expects no arguments');return Ti(n)}},pE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const l=Tt(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(l);return gc(s._cacheText,n,o)==="self"}},gE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const l=Tt(e[0]),o=u=>!l&&!u.immediate.length?!0:u.immediate.some(f=>Tt(f)===l);return gc(s._cacheText,n,o)!=="none"}},mE={matches(n,e,i,s){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const l=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>l.test(u.full);return gc(s._cacheText,n,o)==="self"}},yE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(dd(n))return!1;const l=Tt(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(l))(Lt(s._cacheText,n))}};function Da(n){return{matches(e,i,s,l){const o=i.length&&typeof i[i.length-1]=="number"?i[i.length-1]:void 0,u=o===void 0?i:i.slice(0,i.length-1);if(i.length<1+(o===void 0?0:1))throw new Error(`"${n}" engine expects a selector list and optional maximum distance in pixels`);const f=l.query(s,u),d=G0(n,e,f,o);return d===void 0?!1:(l._markScore(e,d),!0)}}}const bE={query(n,e,i){let s=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof s!="number"||s<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const l=$a.query(n,e.slice(0,e.length-1),i);return s--,s<l.length?[l[s]]:[]}};function Ao(n,e){if(n!==e.scope)return e.pierceShadow?pt(n):n.parentElement||void 0}function sh(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function J0(n){const e=new Map,i=[],s=[];function l(u){let f=e.get(u);if(f)return f;const d=pt(u);return d?l(d).children.push(u):i.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)l(u).taken=!0;function o(u){const f=e.get(u);if(f.taken&&s.push(u),f.children.length>1){const d=new Set(f.children);f.children=[];let p=u.firstElementChild;for(;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling;for(p=u.shadowRoot?u.shadowRoot.firstElementChild:null;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling}f.children.forEach(o)}return i.forEach(o),s}const W0=10,Ar=W0/2,ab=1,vE=2,SE=10,wE=50,ev=100,tv=120,nv=140,iv=160,Io=180,sv=200,lb=250,xE=tv+Ar,_E=nv+Ar,TE=ev+Ar,EE=iv+Ar,AE=Io+Ar,NE=sv+Ar,CE=300,kE=500,rv=510,rh=520,av=530,Th=1e4,ME=1e7,OE=1e3;function ob(n,e,i){n._evaluator.begin();const s={allowText:new Map,disallowText:new Map};dc(),Fh();try{let l=[];if(i.forTextExpect){let f=Ia(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=pt(d)){const p=Ji(s,n,d,{...i,noText:!0});if(!p)continue;if(Wi(p)<=OE){f=p;break}}l=[Vo(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=qa(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&Ti(f)&&(e=f)}if(i.multiple){const f=Ji(s,n,e,i),d=Ji(s,n,e,{...i,noText:!0});let p=[f,d];if(s.allowText.clear(),s.disallowText.clear(),f&&ah(f)&&p.push(Ji(s,n,e,{...i,noCSSId:!0})),d&&ah(d)&&p.push(Ji(s,n,e,{...i,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=Ia(n,e,i);p.push(m),ah(m)&&p.push(Ia(n,e,{...i,noCSSId:!0}))}l=[...new Set(p.map(m=>Vo(m)))]}else{const f=Ji(s,n,e,i)||Ia(n,e,i);l=[Vo(f)]}}const o=l[0],u=n.parseSelector(o);return{selector:o,selectors:l,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{Qh(),pc(),n._evaluator.end()}}function Ji(n,e,i,s){if(s.root&&!tl(s.root,i))throw new Error("Target element must belong to the root's subtree");if(i===s.root)return[{engine:"css",selector:":scope",score:1}];if(i.ownerDocument.documentElement===i)return[{engine:"css",selector:"html",score:1}];let l=null;const o=f=>{(!l||Wi(f)<Wi(l))&&(l=f)},u=[];if(!s.noText)for(const f of jE(e,i,!s.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of RE(e,i,s))s.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>Wi(f.candidate)-Wi(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const p=e.querySelectorAll(e.parseSelector(Vo(f)),s.root??i.ownerDocument);if(!p.includes(i))continue;if(p.length===1){o(f);break}const m=p.indexOf(i);if(!(m>5)&&(o([...f,{engine:"nth",selector:String(m),score:Th}]),!s.isRecursive))for(let y=pt(i);y&&y!==s.root;y=pt(y)){const v=p.filter($=>tl(y,$)&&$!==y),S=v.indexOf(i);if(v.length>5||S===-1||S===m&&v.length>1)continue;const E=v.length===1?f:[...f,{engine:"nth",selector:String(S),score:Th}];if(l&&Wi([{engine:"",selector:"",score:1},...E])>=Wi(l))continue;const T=!!s.noText||d,C=T?n.disallowText:n.allowText;let k=C.get(y);k===void 0&&(k=Ji(n,e,y,{...s,isRecursive:!0,noText:T})||Ia(e,y,s),C.set(y,k)),k&&o([...k,...E])}}return l}function RE(n,e,i){const s=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&s.push({engine:"css",selector:`[${u}=${or(e.getAttribute(u))}]`,score:vE});if(!i.noCSSId){const u=e.getAttribute("id");u&&!LE(u)&&s.push({engine:"css",selector:lv(u),score:kE})}s.push({engine:"css",selector:Yn(e),score:av})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&s.push({engine:"css",selector:`${Yn(e)}[${u}=${or(e.getAttribute(u))}]`,score:SE});return e.getAttribute(i.testIdAttributeName)&&s.push({engine:"css",selector:`[${i.testIdAttributeName}=${or(e.getAttribute(i.testIdAttributeName))}]`,score:ab}),Eh([s]),s}if(e.getAttribute(i.testIdAttributeName)&&s.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${xt(e.getAttribute(i.testIdAttributeName),!0)}]`,score:ab}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${xt(u.placeholder,!0)}]`,score:xE});for(const f of hr(u.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${xt(f.text,!1)}]`,score:tv-f.scoreBonus})}}const l=X0(n._evaluator._cacheText,e);for(const u of l){const f=u.normalized;s.push({engine:"internal:label",selector:Rt(f,!0),score:_E});for(const d of hr(f))s.push({engine:"internal:label",selector:Rt(d.text,!1),score:nv-d.scoreBonus})}const o=ct(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:rv}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&s.push({engine:"css",selector:`${Yn(e)}[name=${or(e.getAttribute("name"))}]`,score:rh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${Yn(e)}[type=${or(e.getAttribute("type"))}]`,score:rh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:Yn(e),score:rh+1}),Eh([s]),s}function jE(n,e,i){if(e.nodeName==="SELECT")return[];const s=[],l=e.getAttribute("title");if(l){s.push([{engine:"internal:attr",selector:`[title=${xt(l,!0)}]`,score:NE}]);for(const p of hr(l))s.push([{engine:"internal:attr",selector:`[title=${xt(p.text,!1)}]`,score:sv-p.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${xt(o,!0)}]`,score:EE}]);for(const p of hr(o))s.push([{engine:"internal:attr",selector:`[alt=${xt(p.text,!1)}]`,score:iv-p.scoreBonus}])}const u=Lt(n._evaluator._cacheText,e).normalized,f=u?hr(u):[];if(u){if(i){u.length<=80&&s.push([{engine:"internal:text",selector:Rt(u,!0),score:AE}]);for(const m of f)s.push([{engine:"internal:text",selector:Rt(m.text,!1),score:Io-m.scoreBonus}])}const p={engine:"css",selector:Yn(e),score:av};for(const m of f)s.push([p,{engine:"internal:has-text",selector:Rt(m.text,!1),score:Io-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+Wo(u)+"$");s.push([p,{engine:"internal:has-text",selector:Rt(m,!1),score:lb}])}}const d=ct(e);if(d&&!["none","presentation"].includes(d)){const p=nl(e,!1);if(p&&!p.match(new RegExp("^\\p{Co}+$","u"))){const m={engine:"internal:role",selector:`${d}[name=${xt(p,!0)}]`,score:TE};s.push([m]);for(const y of hr(p))s.push([{engine:"internal:role",selector:`${d}[name=${xt(y.text,!1)}]`,score:ev-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:rv};for(const y of f)s.push([m,{engine:"internal:has-text",selector:Rt(y.text,!1),score:Io-y.scoreBonus}]);if(i&&u.length<=80){const y=new RegExp("^"+Wo(u)+"$");s.push([m,{engine:"internal:has-text",selector:Rt(y,!1),score:lb}])}}}return Eh(s),s}function lv(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${or(n)}]`}function ah(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Ia(n,e,i){const s=i.root??e.ownerDocument,l=[];function o(f){const d=l.slice();f&&d.unshift(f);const p=d.join(" > "),m=n.parseSelector(p);return n.querySelector(m,s,!1)===e?p:void 0}function u(f){const d={engine:"css",selector:f,score:ME},p=n.parseSelector(f),m=n.querySelectorAll(p,s);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:Th};return[d,y]}for(let f=e;f&&f!==s;f=pt(f)){let d="";if(f.id&&!i.noCSSId){const y=lv(f.id),v=o(y);if(v)return u(v);d=y}const p=f.parentNode,m=[...f.classList].map(DE);for(let y=0;y<m.length;++y){const v="."+m.slice(0,y+1).join("."),S=o(v);if(S)return u(S);!d&&p&&p.querySelectorAll(v).length===1&&(d=v)}if(p){const y=[...p.children],v=f.nodeName,E=y.filter(T=>T.nodeName===v).indexOf(f)===0?Yn(f):`${Yn(f)}:nth-child(${1+y.indexOf(f)})`,x=o(E);if(x)return u(x);d||(d=E)}else d||(d=Yn(f));l.unshift(d)}return u(o())}function Eh(n){for(const e of n)for(const i of e)i.score>wE&&i.score<CE&&(i.score+=Math.min(W0,i.selector.length/10|0))}function Vo(n){const e=[];let i="";for(const{engine:s,selector:l}of n)e.length&&(i!=="css"||s!=="css"||l.startsWith(":nth-match("))&&e.push(">>"),i=s,s==="css"?e.push(l):e.push(`${s}=${l}`);return e.join(" ")}function Wi(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function LE(n){let e,i=0;for(let s=0;s<n.length;++s){const l=n[s];let o;if(!(l==="-"||l==="_")){if(l>="a"&&l<="z"?o="lower":l>="A"&&l<="Z"?o="upper":l>="0"&&l<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function No(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function hr(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),s=i?i[1].length:0;if(s){const l=No(n.substring(s).trimStart(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),s=i?i[1].length:0;if(s){const l=No(n.substring(0,n.length-s).trimEnd(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:No(n,80),scoreBonus:0}),e.push({text:No(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function Yn(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function DE(n){let e="";for(let i=0;i<n.length;i++)e+=BE(n,i);return e}function BE(n,e){const i=n.charCodeAt(e);return i===0?"�":i>=1&&i<=31||i>=48&&i<=57&&(e===0||e===1&&n.charCodeAt(0)===45)?"\\"+i.toString(16)+" ":e===0&&i===45&&n.length===1?"\\"+n.charAt(e):i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n.charAt(e):"\\"+n.charAt(e)}function ov(n,e){const i=n.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=i.substring(i.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function UE(n,e){return e?e.toUpperCase():""}const zE=/(?:^|[-_/])(\w)/g,cv=n=>n&&n.replace(zE,UE);function HE(n){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const v=m.__file;if(v)return cv(ov(v,".vue"))}function i(m,y){return m.type.__playwright_guessedName=y,y}function s(m){var v,S,E,x;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const T in(S=(v=m.parent)==null?void 0:v.type)==null?void 0:S.components)if(((E=m.parent)==null?void 0:E.type.components[T])===m.type)return i(m,T);for(const T in(x=m.appContext)==null?void 0:x.components)if(m.appContext.components[T]===m.type)return i(m,T);return"Anonymous Component"}function l(m){return m._isBeingDestroyed||m.isUnmounted}function o(m){return m.subTree.type.toString()==="Symbol(Fragment)"}function u(m){const y=[];return m.component&&y.push(m.component),m.suspense&&y.push(...u(m.suspense.activeBranch)),Array.isArray(m.children)&&m.children.forEach(v=>{v.component?y.push(v.component):y.push(...u(v))}),y.filter(v=>{var S;return!l(v)&&!((S=v.type.devtools)!=null&&S.hide)})}function f(m){return o(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let v=0,S=m.children.length;v<S;v++){const E=m.children[v];E.component?y.push(...f(E.component)):E.el&&y.push(E.el)}return y}function p(m){return{name:s(m),children:u(m.subTree).map(p),rootElements:f(m),props:m.props}}return p(n)}function qE(n){function e(o){const u=o.displayName||o.name||o._componentTag;if(u)return u;const f=o.__file;if(f)return cv(ov(f,".vue"))}function i(o){const u=e(o.$options||o.fnOptions||{});return u||(o.$root===o?"Root":"Anonymous Component")}function s(o){return o.$children?o.$children:Array.isArray(o.subTree.children)?o.subTree.children.filter(u=>!!u.component).map(u=>u.component):[]}function l(o){return{name:i(o),children:s(o).map(l),rootElements:[o.$el],props:o._props}}return l(n)}function uv(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)uv(s,e,i);return i}function fv(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),l=new Set;do{const o=s.currentNode;o.__vue__&&l.add(o.__vue__.$root),o.__vue_app__&&o._vnode&&o._vnode.component&&e.push({root:o._vnode.component,version:3});const u=o instanceof Element?o.shadowRoot:null;u&&fv(u,e)}while(s.nextNode());for(const o of l)e.push({version:2,root:o});return e}const $E=()=>({queryAll(n,e){const i=n.ownerDocument||n,{name:s,attributes:l}=as(e,!1),f=fv(i).map(p=>p.version===3?HE(p.root):qE(p.root)).map(p=>uv(p,m=>{if(s&&m.name!==s||m.rootElements.some(y=>!tl(n,y)))return!1;for(const y of l)if(!K0(m.props,y))return!1;return!0})).flat(),d=new Set;for(const p of f)for(const m of p.rootElements)d.add(m);return[...d]}}),cb={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],s=n.ownerDocument||n;if(!s)return i;const l=s.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=l.iterateNext();o;o=l.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}};function pd(n,e,i){return`internal:attr=[${n}=${xt(e,(i==null?void 0:i.exact)||!1)}]`}function IE(n,e){return`internal:testid=[${n}=${xt(e,!0)}]`}function VE(n,e){return"internal:label="+Rt(n,!!(e!=null&&e.exact))}function GE(n,e){return pd("alt",n,e)}function KE(n,e){return pd("title",n,e)}function YE(n,e){return pd("placeholder",n,e)}function XE(n,e){return"internal:text="+Rt(n,!!(e!=null&&e.exact))}function PE(n,e={}){const i=[];return e.checked!==void 0&&i.push(["checked",String(e.checked)]),e.disabled!==void 0&&i.push(["disabled",String(e.disabled)]),e.selected!==void 0&&i.push(["selected",String(e.selected)]),e.expanded!==void 0&&i.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&i.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&i.push(["level",String(e.level)]),e.name!==void 0&&i.push(["name",xt(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([s,l])=>`[${s}=${l}]`).join("")}`}const Ba=Symbol("selector"),FE=class Va{constructor(e,i,s){if(s!=null&&s.hasText&&(i+=` >> internal:has-text=${Rt(s.hasText,!1)}`),s!=null&&s.hasNotText&&(i+=` >> internal:has-not-text=${Rt(s.hasNotText,!1)}`),s!=null&&s.has&&(i+=" >> internal:has="+JSON.stringify(s.has[Ba])),s!=null&&s.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(s.hasNot[Ba])),(s==null?void 0:s.visible)!==void 0&&(i+=` >> visible=${s.visible?"true":"false"}`),this[Ba]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const l=i,o=this;o.locator=(u,f)=>new Va(e,l?l+" >> "+u:u,f),o.getByTestId=u=>o.locator(IE(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(GE(u,f)),o.getByLabel=(u,f)=>o.locator(VE(u,f)),o.getByPlaceholder=(u,f)=>o.locator(YE(u,f)),o.getByText=(u,f)=>o.locator(XE(u,f)),o.getByTitle=(u,f)=>o.locator(KE(u,f)),o.getByRole=(u,f={})=>o.locator(PE(u,f)),o.filter=u=>new Va(e,i,u),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=u=>o.locator(`nth=${u}`),o.and=u=>new Va(e,l+" >> internal:and="+JSON.stringify(u[Ba])),o.or=u=>new Va(e,l+" >> internal:or="+JSON.stringify(u[Ba]))}};let QE=FE;class ZE{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,i)=>this._querySelector(e,!!i),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,i)=>this._generateLocator(e,i),ariaSnapshot:(e,i)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,i||{mode:"expect"}),resume:()=>this._resume(),...new QE(this._injectedScript,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(e,i){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const s=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(s,this._injectedScript.document,i)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const i=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(i,this._injectedScript.document)}_inspect(e){if(typeof e!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,i){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return ls(i||"javascript",s)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function JE(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function WE(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function eA(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function tA(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function nA(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}const hv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function iA(n){if("toBase64"in n)return n.toBase64();const e=Array.from(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(i=>String.fromCharCode(i)).join("");return btoa(e)}function sA(n,e){const i=atob(n),s=new Uint8Array(i.length);for(let l=0;l<i.length;l++)s[l]=i.charCodeAt(l);return new e(s.buffer)}function Ah(n,e=[],i=new Map){if(!Object.is(n,void 0)){if(typeof n=="object"&&n){if("ref"in n)return i.get(n.ref);if("v"in n)return n.v==="undefined"?void 0:n.v==="null"?null:n.v==="NaN"?NaN:n.v==="Infinity"?1/0:n.v==="-Infinity"?-1/0:n.v==="-0"?-0:void 0;if("d"in n)return new Date(n.d);if("u"in n)return new URL(n.u);if("bi"in n)return BigInt(n.bi);if("e"in n){const s=new Error(n.e.m);return s.name=n.e.n,s.stack=n.e.s,s}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const s=[];i.set(n.id,s);for(const l of n.a)s.push(Ah(l,e,i));return s}if("o"in n){const s={};i.set(n.id,s);for(const{k:l,v:o}of n.o)l!=="__proto__"&&(s[l]=Ah(o,e,i));return s}if("h"in n)return e[n.h];if("ta"in n)return sA(n.ta.b,hv[n.ta.k])}return n}}function rA(n,e){return Nh(n,e,{visited:new Map,lastId:0})}function Nh(n,e,i){if(n&&typeof n=="object"){if(typeof globalThis.Window=="function"&&n instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&n instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&n instanceof globalThis.Node)return"ref: <Node>"}return dv(n,e,i)}function dv(n,e,i){var o;const s=e(n);if("fallThrough"in s)n=s.fallThrough;else return s;if(typeof n=="symbol")return{v:"undefined"};if(Object.is(n,void 0))return{v:"undefined"};if(Object.is(n,null))return{v:"null"};if(Object.is(n,NaN))return{v:"NaN"};if(Object.is(n,1/0))return{v:"Infinity"};if(Object.is(n,-1/0))return{v:"-Infinity"};if(Object.is(n,-0))return{v:"-0"};if(typeof n=="boolean"||typeof n=="number"||typeof n=="string")return n;if(typeof n=="bigint")return{bi:n.toString()};if(tA(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(WE(n))return{d:n.toJSON()};if(eA(n))return{u:n.toJSON()};if(JE(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(hv))if(nA(n,f))return{ta:{b:iA(n),k:u}};const l=i.visited.get(n);if(l)return{ref:l};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d<n.length;++d)u.push(Nh(n[d],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const p of Object.keys(n)){let m;try{m=n[p]}catch{continue}p==="toJSON"&&typeof m=="function"?u.push({k:p,v:{o:[],id:0}}):u.push({k:p,v:Nh(m,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?dv(d.value,e,i):{o:u,id:f}}}class aA{constructor(e,i){var s,l,o,u,f,d,p,m;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(s=e.setTimeout)==null?void 0:s.bind(e),clearTimeout:(l=e.clearTimeout)==null?void 0:l.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(u=e.clearInterval)==null?void 0:u.bind(e),requestAnimationFrame:(f=e.requestAnimationFrame)==null?void 0:f.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,s,l,...o){const u=o.slice(0,l),f=o.slice(l),d=[];for(let m=0;m<u.length;m++)d[m]=Ah(u[m],f);let p=this.global.eval(s);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),i?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,i){if(i!==void 0)return rA(i,s=>({fallThrough:s}))}_promiseAwareJsonValueNoThrow(e){const i=s=>{try{return this.jsonValue(!0,s)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const s=await e;return i(s)})():i(e)}}class pv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:ls,cacheNormalizedWhitespaces:Mx,elementText:Lt,getAriaRole:ct,getElementAccessibleDescription:Jy,getElementAccessibleName:nl,isElementVisible:Ti,isInsideScope:tl,normalizeWhiteSpace:Tt,parseAriaSnapshot:Kh,generateAriaTree:Pa,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new aA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new oE,this.consoleApi=new ZE(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",cb),this._engines.set("xpath:light",cb),this._engines.set("_react",rE()),this._engines.set("_vue",$E()),this._engines.set("role",rb(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",rb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:l}of i.customEngines)this._engines.set(s,this.eval(l));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,gT({browserNameForWorkarounds:i.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const i=ll(e);return Cx(i,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return ob(this,e,i)}generateSelectorSimple(e,i){return ob(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,s){const l=this.querySelectorAll(e,i);if(s&&l.length>1)throw this.strictModeViolationError(e,l);return l[0]}_queryNth(e,i){const s=[...e];let l=+i.body;return l===-1&&(l=s.length-1),new Set(s.slice(l,l+1))}_queryLayoutSelector(e,i,s){const l=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,s);for(const d of e){const p=G0(l,d,f,o.distance);p!==void 0&&u.push({element:d,score:p})}return u.sort((d,p)=>d.score-p.score),new Set(u.map(d=>d.element))}ariaSnapshot(e,i){return this.incrementalAriaSnapshot(e,i).full}incrementalAriaSnapshot(e,i){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const s=Pa(e,i),l=Fa(s,i);let o;if(i.track){const u=this._lastAriaSnapshotForTrack.get(i.track);u&&(o=Fa(s,i,u)),this._lastAriaSnapshotForTrack.set(i.track,s)}return this._lastAriaSnapshotForQuery=s,{full:l,incremental:o,iframeRefs:s.iframeRefs}}ariaSnapshotForRecorder(){const e=Pa(this.document.body,{mode:"ai"});return{ariaSnapshot:Fa(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return GT(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(l=>l.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const s={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const l={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:l},source:Xn(l)};s.parts.push(o)}return this.querySelectorAll(s,i)}if(!i.querySelectorAll)throw this.createStacklessError("Node is not queryable.");if(e.capture!==void 0)throw this.createStacklessError("Internal error: there should not be a capture in the selector.");if(i.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[i];this._evaluator.begin();try{let s=new Set([i]);for(const l of e.parts)if(l.name==="nth")s=this._queryNth(s,l);else if(l.name==="internal:and"){const o=this.querySelectorAll(l.body.parsed,i);s=new Set(o.filter(u=>s.has(u)))}else if(l.name==="internal:or"){const o=this.querySelectorAll(l.body.parsed,i);s=new Set(J0(new Set([...s,...o])))}else if(eE.includes(l.name))s=this._queryLayoutSelector(s,l,i);else{const o=new Set;for(const u of s){const f=this._queryEngineAll(l,u);for(const d of f)o.add(d)}s=o}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const s=this._engines.get(e.name).queryAll(i,e.body);for(const l of s)if(!("nodeName"in l))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(l)}`);return s}_createAttributeEngine(e,i){const s=l=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(l)}]`,functions:[]},combinator:""}]}];return{queryAll:(l,o)=>this._evaluator.query({scope:l,pierceShadow:i},s(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(l,o)=>{const{matcher:u,kind:f}=ko(o,i),d=[];let p=null;const m=v=>{if(f==="lax"&&p&&p.contains(v))return!1;const S=gc(this._evaluator._cacheText,v,u);S==="none"&&(p=v),(S==="self"||S==="selfAndChildren"&&f==="strict"&&!i)&&d.push(v)};l.nodeType===Node.ELEMENT_NODE&&m(l);const y=this._evaluator._queryCSS({scope:l,pierceShadow:e},"*");for(const v of y)m(v);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,l=Lt(this._evaluator._cacheText,s),{matcher:o}=ko(i,!0);return o(l)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,l=Lt(this._evaluator._cacheText,s),{matcher:o}=ko(i,!0);return o(l)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:s}=ko(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>X0(this._evaluator._cacheText,o).some(u=>s(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,s)=>{const l=as(s,!0);if(l.name||l.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:u,caseSensitive:f}=l.attributes[0],d=f?null:u.toLowerCase();let p;return u instanceof RegExp?p=y=>!!y.match(u):f?p=y=>y===u:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(y=>p(y.getAttribute(o)))}}}_createDescribeEngine(){return{queryAll:i=>i.nodeType!==1?[]:[i]}}_createControlEngine(){return{queryAll(e,i){if(i==="enter-frame")return[];if(i==="return-empty")return[];if(i==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${i}`)}}}_createHasEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,s)=>{if(i.nodeType!==1)return[];const l=s==="true";return Ti(i)===l?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,s)=>this.querySelectorAll(s.parsed,i)}}extend(e,i){const s=this.window.eval(`
    (() => {
      const module = {};
      ${e}
      return module.exports.default();
    })()`);return new s(this,i)}async viewportRatio(e){return await new Promise(i=>{const s=new IntersectionObserver(l=>{i(l[0].intersectionRatio),s.disconnect()});s.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const i=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(i.borderLeftWidth||"",10),top:parseInt(i.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const i=e.ownerDocument.defaultView;for(let l=e;l;l=pt(l))if(i.getComputedStyle(l).transform!=="none")return"transformed";const s=i.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,i){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(i==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(i==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),i==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const l=s.closest("label");l&&l.control&&(s=l.control)}return s}async checkElementStates(e,i){if(i.includes("stable")){const s=await this._checkElementIsStable(e);if(s===!1)return{missingState:"stable"};if(s==="error:notconnected")return"error:notconnected"}for(const s of i)if(s!=="stable"){const l=this.elementState(e,s);if(l.received==="error:notconnected")return"error:notconnected";if(!l.matches)return{missingState:s}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let s,l=0,o=0;const u=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=this.utils.builtins.performance.now();if(this._stableRafCount>1&&v-o<15)return i;o=v;const S=y.getBoundingClientRect(),E={x:S.top,y:S.left,width:S.width,height:S.height};if(s){if(!(E.x===s.x&&E.y===s.y&&E.width===s.width&&E.height===s.height))return!1;if(++l>=this._stableRafCount)return!0}return s=E,i};let f,d;const p=new Promise((y,v)=>{f=y,d=v}),m=()=>{try{const y=u();y!==i?f(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),p}_createAriaRefEngine(){return{queryAll:(i,s)=>{var o,u;const l=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(s);return l&&l.isConnected?[l]:[]}}}elementState(e,i){const s=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!s||!s.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const l=Ti(s);return{matches:i==="visible"?l:!l,received:l?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const l=ic(s);return{matches:i==="disabled"?l:!l,received:l?"disabled":"enabled"}}if(i==="editable"){const l=ic(s),o=MT(s);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!l&&!o,received:l?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const l=i==="checked",o=CT(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=s.nodeName==="INPUT"&&s.type==="radio";return{matches:l===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const l=NT(s);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:l==="mixed",received:l===!0?"checked":l===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${i}"`)}selectOptions(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const l=s,o=[...l.options],u=[];let f=i.slice();for(let d=0;d<o.length;d++){const p=o[d],m=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(f.some(m)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(u.push(p),l.multiple)f=f.filter(y=>!m(y));else{f=[];break}}}return f.length?"error:optionsnotfound":(l.value=void 0,u.forEach(d=>d.selected=!0),l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.dispatchEvent(new Event("change",{bubbles:!0})),u.map(d=>d.value))}fill(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const l=s,o=l.type.toLowerCase(),u=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!u.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(i=i.trim(),isNaN(Number(i))))throw this.createStacklessError("Cannot type text into input[type=number]");if(u.has(o)){if(i=i.trim(),l.focus(),l.value=i,l.value!==i)throw this.createStacklessError("Malformed value");return s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(s.nodeName.toLowerCase()!=="textarea"){if(!s.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(s),"needsinput"}selectText(e){const i=this.retarget(e,"follow-label");if(!i)return"error:notconnected";if(i.nodeName.toLowerCase()==="input"){const o=i;return o.select(),o.focus(),"done"}if(i.nodeName.toLowerCase()==="textarea"){const o=i;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}const s=i.ownerDocument.createRange();s.selectNodeContents(i);const l=i.ownerDocument.defaultView.getSelection();return l&&(l.removeAllRanges(),l.addRange(s)),i.focus(),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,s=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:s}}focusNode(e,i){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:l}=this._activelyFocused(e);if(e.isContentEditable&&!l&&s&&s.blur&&s.blur(),e.focus(),e.focus(),i&&!l&&e.nodeName.toLowerCase()==="input")try{e.setSelectionRange(0,0)}catch{}return"done"}blurNode(e){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");return e.blur(),"done"}setInputFiles(e,i){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const s=e;if(s.nodeName!=="INPUT")return"Not an <input> element";const l=s;if((l.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.map(d=>{const p=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),f=new DataTransfer;for(const d of u)f.items.add(d);l.files=f.files,l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const s=[];let l=i;for(;l;){const m=v0(l);if(!m||(s.push(m),m.nodeType===9))break;l=m.host}let o;for(let m=s.length-1;m>=0;m--){const y=s[m],v=y.elementsFromPoint(e.x,e.y),S=y.elementFromPoint(e.x,e.y);if(S&&v[0]&&pt(S)===v[0]){const x=this.window.getComputedStyle(S);(x==null?void 0:x.display)==="contents"&&v.unshift(S)}v[0]&&v[0].shadowRoot===y&&v[1]===S&&v.shift();const E=v[0];if(!E||(o=E,m&&E!==s[m-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=o.assignedSlot??pt(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,p=i;for(;p;){const m=u.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(u[m-1]));break}p=pt(p)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,s,l){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(s){const m=this.expectHitTarget(s,o);if(m!=="done")return m.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];let f;const d=m=>{if(!u.has(m.type)||!m.isTrusted)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;f===void 0&&y&&(f=this.expectHitTarget({x:y.clientX,y:y.clientY},o)),(l||f!=="done"&&f!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,i,s){var u,f,d;let l;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(i)){case"mouse":l=new MouseEvent(i,o);break;case"keyboard":l=new KeyboardEvent(i,o);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var E,x;if(y instanceof Touch)return y;let v=y.pageX;v===void 0&&y.clientX!==void 0&&(v=y.clientX+(((E=this.document.scrollingElement)==null?void 0:E.scrollLeft)||0));let S=y.pageY;return S===void 0&&y.clientY!==void 0&&(S=y.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,v,S,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));o.target??(o.target=e),o.touches=m(o.touches),o.targetTouches=m(o.targetTouches),o.changedTouches=m(o.changedTouches),l=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.changedTouches=(d=o.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l=new TouchEvent(i,o);break}case"pointer":l=new PointerEvent(i,o);break;case"focus":l=new FocusEvent(i,o);break;case"drag":l=new DragEvent(i,o);break;case"wheel":l=new WheelEvent(i,o);break;case"deviceorientation":try{l=new DeviceOrientationEvent(i,o)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:v,gamma:S,absolute:E}=o;l=this.document.createEvent("DeviceOrientationEvent"),l.initDeviceOrientationEvent(i,p,m,y,v,S,E)}break;case"devicemotion":try{l=new DeviceMotionEvent(i,o)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:v,rotationRate:S,interval:E}=o;l=this.document.createEvent("DeviceMotionEvent"),l.initDeviceMotionEvent(i,p,m,y,v,S,E)}break;default:l=new Event(i,o);break}e.dispatchEvent(l)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Co(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Co(`<${e.nodeName.toLowerCase()} />`);const i=e,s=[];for(let d=0;d<i.attributes.length;d++){const{name:p,value:m}=i.attributes[d];p!=="style"&&(!m&&this._booleanAttributes.has(p)?s.push(` ${p}`):s.push(` ${p}="${m}"`))}s.sort((d,p)=>d.length-p.length);const l=Dy(s.join(""),500);if(this._autoClosingTags.has(i.nodeName))return Co(`<${i.nodeName.toLowerCase()}${l}/>`);const o=i.childNodes;let u=!1;if(o.length<=5){u=!0;for(let d=0;d<o.length;d++)u=u&&o[d].nodeType===Node.TEXT_NODE}const f=u?i.textContent||"":o.length?"…":"";return Co(`<${i.nodeName.toLowerCase()}${l}>${Dy(f,50)}</${i.nodeName.toLowerCase()}>`)}strictModeViolationError(e,i){this._evaluator.begin(),dc(),Fh();try{const s=this._isUtilityWorld&&this._browserName==="firefox"?2:10,l=i.slice(0,s).map(u=>({preview:this.previewNode(u),selector:this.generateSelectorSimple(u)})),o=l.map((u,f)=>`
    ${f+1}) ${u.preview} aka ${ls(this._sdkLanguage,u.selector)}`);return l.length<i.length&&o.push(`
    ...`),this.createStacklessError(`strict mode violation: ${ls(this._sdkLanguage,Xn(e))} resolved to ${i.length} elements:${o.join("")}
`)}finally{Qh(),pc(),this._evaluator.end()}}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const i=new Error(e);return delete i.stack,i}createHighlight(){return new ih(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new ih(this),this._highlight.install();const s=[];for(const l of e)s.push(this.querySelectorAll(l,this.document.documentElement));this._highlight.maskElements(s.flat(),i)}highlight(e){this._highlight||(this._highlight=new ih(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,i){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==i&&(this._markedElements=void 0);const s=((f=this._markedElements)==null?void 0:f.elements)||new Set,l=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of s)e.has(d)||d.dispatchEvent(l);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of e)s.has(d)||d.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const s=()=>i=!0;this.window.addEventListener(e,s),new MutationObserver(l=>{if(l.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(i=!1,this.window.dispatchEvent(new CustomEvent(e)),!i)){this.window.addEventListener(e,s);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var l;return(l=this._hitTargetInterceptor)==null?void 0:l.call(this,s)},i=()=>{for(const s of this._allHitTargetInterceptorEvents)this.window.addEventListener(s,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,s){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(s,i);if(!e){if(!i.isNot&&i.expression==="to.be.hidden")return{matches:!0};if(i.isNot&&i.expression==="to.be.visible")return{matches:!1};if(!i.isNot&&i.expression==="to.be.detached")return{matches:!0};if(i.isNot&&i.expression==="to.be.attached")return{matches:!1};if(i.isNot&&i.expression==="to.be.in.viewport")return{matches:!1};if(i.expression==="to.have.title"&&((o=i==null?void 0:i.expectedText)!=null&&o[0])){const f=new sr(i.expectedText[0]),d=this.document.title;return{received:d,matches:f.matches(d)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new sr(i.expectedText[0]),d=this.document.location.href;return{received:d,matches:f.matches(d)}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var l;const s=i.expression;{let o;if(s==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:u,indeterminate:f}=i.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,u===!1?"unchecked":"checked")}else if(s==="to.be.disabled")o=this.elementState(e,"disabled");else if(s==="to.be.editable")o=this.elementState(e,"editable");else if(s==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;o={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(l=e.textContent)==null?void 0:l.trim();o={matches:!u,received:u?"notEmpty":"empty"}}else if(s==="to.be.enabled")o=this.elementState(e,"enabled");else if(s==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else s==="to.be.hidden"?o=this.elementState(e,"hidden"):s==="to.be.visible"?o=this.elementState(e,"visible"):s==="to.be.attached"?o={matches:!0,received:"attached"}:s==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(s==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let p=0;p<u.length-1;p++){if(typeof o!="object"||!(u[p]in o))return{received:void 0,matches:!1};o=o[u[p]]}const f=o[u[u.length-1]],d=Ch(f,i.expectedValue);return{received:f,matches:d}}if(s==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(i.expectedNumber??0)-1e-9}}if(s==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const o=[...e.selectedOptions].map(u=>u.value);return o.length!==i.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((u,f)=>new sr(i.expectedText[f]).matches(u)).every(Boolean)}}if(s==="to.match.aria"){const o=VT(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(s==="to.have.attribute.value"){const u=e.getAttribute(i.expressionArg);if(u===null)return{received:null,matches:!1};o=u}else if(["to.have.class","to.contain.class"].includes(s)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);return{received:e.classList.toString(),matches:new sr(i.expectedText[0]).matchesClassList(this,e.classList,s==="to.contain.class")}}else if(s==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(i.expressionArg);else if(s==="to.have.id")o=e.id;else if(s==="to.have.text")o=i.useInnerText?e.innerText:Lt(new Map,e).full;else if(s==="to.have.accessible.name")o=nl(e,!1);else if(s==="to.have.accessible.description")o=Jy(e,!1);else if(s==="to.have.accessible.error.message")o=ET(e);else if(s==="to.have.role")o=ct(e)||"";else if(s==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");o=e.value}if(o!==void 0&&i.expectedText){const u=new sr(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,i){const s=i.expression;if(s==="to.have.count"){const d=e.length,p=d===i.expectedNumber;return{received:d,matches:p}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);if(["to.have.class.array","to.contain.class.array"].includes(s)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==i.expectedText.length)return{received:p,matches:!1};const m=this._matchSequentially(i.expectedText,d,(y,v)=>y.matchesClassList(this,v,s==="to.contain.class.array"));return{received:p,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(s))throw this.createStacklessError("Unknown expect matcher: "+s);const l=e.map(d=>i.useInnerText?d.innerText:Lt(new Map,d).full),o=s!=="to.contain.text.array";if(!(l.length===i.expectedText.length||!o))return{received:l,matches:!1};const f=this._matchSequentially(i.expectedText,l,(d,p)=>d.matches(p));return{received:l,matches:f}}_matchSequentially(e,i,s){const l=e.map(f=>new sr(f));let o=0,u=0;for(;o<l.length&&u<i.length;)s(l[o],i[u])&&++o,++u;return o===l.length}}function Co(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function lA(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let i=0;for(;i<n.length;)n[i]==="\\"&&i+1<n.length&&i++,e.push(n[i++]);return e.join("")}function ko(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const l=n.lastIndexOf("/"),o=new RegExp(n.substring(1,l),n.substring(l+1));return{matcher:u=>o.test(u.full),kind:"regex"}}const i=e?JSON.parse.bind(JSON):lA;let s=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),s=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),s=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),s=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),s=!0),n=Tt(n),s?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>Tt(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:l=>l.normalized.toLowerCase().includes(n)})}class sr{constructor(e){if(this._normalizeWhiteSpace=e.normalizeWhiteSpace,this._ignoreCase=e.ignoreCase,this._string=e.matchSubstring?void 0:this.normalize(e.string),this._substring=e.matchSubstring?this.normalize(e.string):void 0,e.regexSource){const i=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&i.delete("i"),e.ignoreCase===!0&&i.add("i"),this._regex=new RegExp(e.regexSource,[...i].join(""))}}matches(e){return this._regex||(e=this.normalize(e)),this._string!==void 0?e===this._string:this._substring!==void 0?e.includes(this._substring):this._regex?!!this._regex.test(e):!1}matchesClassList(e,i,s){if(s){if(this._regex)throw e.createStacklessError("Partial matching does not support regular expressions. Please provide a string value.");return this._string.split(/\s+/g).filter(Boolean).every(l=>i.contains(l))}return this.matches(i.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Tt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Ch(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(let s=0;s<n.length;++s)if(!Ch(n[s],e[s]))return!1;return!0}if(n instanceof RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();const i=Object.keys(n);if(i.length!==Object.keys(e).length)return!1;for(let s=0;s<i.length;++s)if(!e.hasOwnProperty(i[s]))return!1;for(const s of i)if(!Ch(n[s],e[s]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const oA={tagName:"svg",children:[{tagName:"defs",children:[{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gripper"},children:[{tagName:"path",attrs:{d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-circle-large-filled"},children:[{tagName:"path",attrs:{d:"M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-stop-circle"},children:[{tagName:"path",attrs:{d:"M6 6h4v4H6z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-inspect"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-whole-word"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 11H1V13H15V11H16V14H15H1H0V11Z"}},{tagName:"path",attrs:{d:"M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z"}},{tagName:"path",attrs:{d:"M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eye"},children:[{tagName:"path",attrs:{d:"M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-symbol-constant"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 6h8v1H4V6zm8 3H4v1h8V9z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-check"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-close"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-pass"},children:[{tagName:"path",attrs:{d:"M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gist"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z"}}]}]}]},an={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class ub{}class lh{constructor(e,i){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=i}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var i;ze(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){ze(e)}onPointerUp(e){ze(e)}onMouseDown(e){ze(e)}onMouseUp(e){ze(e)}onMouseMove(e){var l;ze(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let s=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});s={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?an.assert:an.single}}((l=this._hoveredModel)==null?void 0:l.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){ze(e)}onMouseLeave(e){ze(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){ze(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){ze(e)}onScroll(e){this._reset(!1)}_commit(e,i){var s;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class cA{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._observer=null,this._recorder=e,this._performingActions=new Set,this._dialog=new gv(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(i=>{if(this._hoveredElement)for(const s of i)for(const l of s.removedNodes)(l===this._hoveredElement||l.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;(e=this._observer)==null||e.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._dialog.close()}onClick(e){if(this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&ze(e);return}if(Ja(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const i=Za(this._recorder.deepEventTarget(e));if(i&&e.detail===1){this._performAction({name:i.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Qa(e),signals:[],button:kh(e),modifiers:yr(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||Ja(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Qa(e),signals:[],button:kh(e),modifiers:yr(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){ze(e);return}this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._showActionListDialog(this._hoveredModel,e)}onPointerDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onPointerUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||(this._consumeWhenAboutToPerform(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseMove(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);this._hoveredElement!==i&&(this._hoveredElement=i,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(!0)}onInput(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(i.nodeName==="INPUT"&&i.type.toLowerCase()==="file"){this._recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...i.files||[]].map(s=>s.name)});return}if(Ja(i)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:i.isContentEditable?i.innerText:i.value})}if(i.nodeName==="SELECT"){const s=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...s.selectedOptions].map(l=>l.value),signals:[]})}}onKeyDown(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const i=Za(this._recorder.deepEventTarget(e));if(i&&e.detail===0){this._performAction({name:i.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:yr(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){ze(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){ze(i);const s=Qa(i),l=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:s,signals:[]})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const p of l){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=p.title,m.setAttribute("aria-label",p.title),m.addEventListener("click",()=>{this._dialog.close(),p.cb()}),o.appendChild(m)}const u=this._dialog.show({label:"Choose action",body:o,autosize:!0}),f=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(f,u);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const i=dA(this._recorder.document);if(e&&i===this._recorder.document.body)return;const s=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=s&&s.selector?{...s,color:an.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_actionInProgress(e){const i=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const l of this._performingActions)if(i&&l.name==="press"&&e.key===l.key||s&&(l.name==="click"||l.name==="hover"||l.name==="check"||l.name==="uncheck"))return!0;return ze(e),!1}_consumedDueToNoModel(e,i){return i?!1:(ze(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(ze(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||ze(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const i=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&i.then(()=>{console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))})}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!!Za(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._installObserverIfNeeded(),this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!0);return}const{selector:e,elements:i}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:i,color:an.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class uA{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(Ja(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const s=Za(i),{ariaSnapshot:l,selector:o,ref:u}=this._ariaSnapshot(i);if(s&&e.detail===1){this._recorder.recordAction({name:s.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:l});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:l,position:Qa(e),signals:[],button:kh(e),modifiers:yr(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:l,ref:o,ariaSnapshot:s,position:Qa(e),signals:[],button:"right",modifiers:yr(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);if(Ja(i)){this._recorder.recordAction({name:"fill",selector:l,ref:o,ariaSnapshot:s,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:l,ariaSnapshot:s,signals:[],text:i.isContentEditable?i.innerText:i.value});return}if(i.nodeName==="SELECT"){const u=i;this._recorder.recordAction({name:"select",selector:l,ref:o,ariaSnapshot:s,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=Za(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:l,ref:o,ariaSnapshot:s,signals:[]});return}}this._recorder.recordAction({name:"press",selector:l,ref:o,ariaSnapshot:s,signals:[],key:e.key,modifiers:yr(e)})}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:i,refs:s}=this._recorder.injectedScript.ariaSnapshotForRecorder(),l=e?s.get(e):void 0,o=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:i,selector:o==null?void 0:o.selector,ref:l}}}class oh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new gv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){ze(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const i=this._recorder.deepEventTarget(e);this._elementHasValue(i)&&e.preventDefault()}onPointerUp(e){var s;const i=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((s=this._hoverHighlight)==null?void 0:s.elements[0])!==i){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,i).full?{elements:[i],selector:"",color:an.assert}:null;else if(this._elementHasValue(i)){const l=this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:l.selector,elements:l.elements,color:an.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),ze(e)}onScroll(e){this._recorder.updateHighlight(this._hoverHighlight,!1)}_elementHasValue(e){return e.nodeName==="TEXTAREA"||e.nodeName==="SELECT"||e.nodeName==="INPUT"&&!["button","image","reset","submit"].includes(e.type)}_generateAction(){var i;this._textCache.clear();const e=(i=this._hoverHighlight)==null?void 0:i.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:s}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:s,signals:[],checked:!e.checked}:{name:"assertValue",selector:s,signals:[],value:e.value}}else if(this._kind==="snapshot"){const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:an.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:an.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertText",selector:this._hoverHighlight.selector,signals:[],text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0}}}_renderValue(e){return(e==null?void 0:e.name)==="assertText"?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):(e==null?void 0:e.name)==="assertChecked"?String(e.checked):(e==null?void 0:e.name)==="assertValue"?e.value:(e==null?void 0:e.name)==="assertSnapshot"?e.ariaSnapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,i,s,l;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((i=this._action)==null?void 0:i.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(l=this._recorder.overlay)==null||l.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const i=this._recorder.document.createElement("textarea");i.setAttribute("spellcheck","false"),i.value=this._renderValue(e),i.classList.add("text-editor");const s=()=>{var y;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=f;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=f&&p.includes(f);i.classList.toggle("does-not-match",!m)};i.addEventListener("input",s);const o=this._dialog.show({label:"Assert that element contains text",body:i,onCommit:()=>this._commit()}),u=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(u.anchorTop,u.anchorLeft),i.focus()}_commitAssertValue(){var i;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(i=this._recorder.overlay)==null||i.flashToolSucceeded("assertingValue"))}}class fA{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const i=this._recorder.document;this._overlayElement=i.createElement("x-pw-overlay");const s=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.createElement("x-div")),s.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._recordToggle.title="Record",this._recordToggle.classList.add("record"),this._recordToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pickLocatorToggle.title="Pick locator",this._pickLocatorToggle.classList.add("pick-locator"),this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._pickLocatorToggle),this._assertVisibilityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVisibilityToggle.title="Assert visibility",this._assertVisibilityToggle.classList.add("visibility"),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertTextToggle.title="Assert text",this._assertTextToggle.classList.add("text"),this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertValuesToggle.title="Assert value",this._assertValuesToggle.classList.add("value"),this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertValuesToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertSnapshotToggle.title="Assert snapshot",this._assertSnapshotToggle.classList.add("snapshot"),this._assertSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){mv(this._listeners),this._listeners=[De(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),De(this._recordToggle,"click",()=>{this._recordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="none"||this._recorder.state.mode==="standby"||this._recorder.state.mode==="inspecting"?"recording":"standby")}),De(this._pickLocatorToggle,"click",()=>{if(this._pickLocatorToggle.classList.contains("disabled"))return;const e={inspecting:"standby",none:"inspecting",standby:"inspecting",recording:"recording-inspecting","recording-inspecting":"recording",assertingText:"recording-inspecting",assertingVisibility:"recording-inspecting",assertingValue:"recording-inspecting",assertingSnapshot:"recording-inspecting"};this._recorder.setMode(e[this._recorder.state.mode])}),De(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),De(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),De(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),De(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition()}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){const i=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting";this._recordToggle.classList.toggle("toggled",i),this._recordToggle.title=i?"Stop Recording":"Start Recording",this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}flashToolSucceeded(e){let i;e==="assertingVisibility"?i=this._assertVisibilityToggle:e==="assertingSnapshot"?i=this._assertSnapshotToggle:i=this._assertValuesToggle,i.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>i.classList.remove("succeeded"),2e3)}_hideOverlay(){this._overlayElement.setAttribute("hidden","true")}_showOverlay(){this._overlayElement.hasAttribute("hidden")&&(this._overlayElement.removeAttribute("hidden"),this._updateVisualPosition())}_updateVisualPosition(){this._measure=this._overlayElement.getBoundingClientRect(),this._overlayElement.style.left=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2+this._offsetX+"px"}onMouseMove(e){if(!e.buttons)return this._dragState=void 0,!1;if(this._dragState){this._offsetX=this._dragState.offsetX+e.clientX-this._dragState.dragStart.x;const i=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-i,Math.min(i,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),ze(e),!0}return!1}onMouseUp(e){return this._dragState?(ze(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,ze(e),!0):!1}onDblClick(e){return!1}}class hA{constructor(e,i){var s,l;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0}},this._delegate={},this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._tools={none:new ub,standby:new ub,inspecting:new lh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new uA(this):new cA(this),"recording-inspecting":new lh(this,!1),assertingText:new oh(this,"text"),assertingVisibility:new lh(this,!0),assertingValue:new oh(this,"value"),assertingSnapshot:new oh(this,"snapshot")},this._currentTool=this._tools.none,(l=(s=this._currentTool).install)==null||l.call(s),e.window.top===e.window&&(this.overlay=new fA(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
      body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
      body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
    `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var s,l,o;mv(this._listeners),this._listeners=[De(this.document,"click",u=>this._onClick(u),!0),De(this.document,"auxclick",u=>this._onClick(u),!0),De(this.document,"dblclick",u=>this._onDblClick(u),!0),De(this.document,"contextmenu",u=>this._onContextMenu(u),!0),De(this.document,"dragstart",u=>this._onDragStart(u),!0),De(this.document,"input",u=>this._onInput(u),!0),De(this.document,"keydown",u=>this._onKeyDown(u),!0),De(this.document,"keyup",u=>this._onKeyUp(u),!0),De(this.document,"pointerdown",u=>this._onPointerDown(u),!0),De(this.document,"pointerup",u=>this._onPointerUp(u),!0),De(this.document,"mousedown",u=>this._onMouseDown(u),!0),De(this.document,"mouseup",u=>this._onMouseUp(u),!0),De(this.document,"mousemove",u=>this._onMouseMove(u),!0),De(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),De(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),De(this.document,"focus",u=>this._onFocus(u),!0),De(this.document,"scroll",u=>this._onScroll(u),!0)],this.highlight.install();let e;const i=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(i,500)};e=this.injectedScript.utils.builtins.setTimeout(i,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(yv(this.document,oA)),(s=this.overlay)==null||s.install(),(o=(l=this._currentTool)==null?void 0:l.install)==null||o.call(l),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var s,l,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(l=(s=this._currentTool).uninstall)==null||l.call(s),this.clearHighlight(),this._currentTool=e,(u=(o=this._currentTool).install)==null||u.call(o);const i=(f=e.cursor)==null?void 0:f.call(e);i&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",i))}setUIState(e,i){var o;this._delegate=i,e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(o=this.overlay)==null||o.setUIState(e);let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?pA(this.injectedScript,e.language,e.actionSelector,this.document):null;s=u!=null&&u.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.length?e.actionSelector:void 0}const l=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==l){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?an.multiple:an.single;s=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=l}else this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}s==="clear"?this.highlight.clearHighlight():s!=="noop"&&this.highlight.updateHighlight(s)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onClick)==null||l.call(s,e))}_onDblClick(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onDblClick)==null||l.call(s,e))}_onContextMenu(e){var i,s;e.isTrusted&&((s=(i=this._currentTool).onContextMenu)==null||s.call(i,e))}_onDragStart(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onDragStart)==null||s.call(i,e))}_onPointerDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerDown)==null||s.call(i,e))}_onPointerUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerUp)==null||s.call(i,e))}_onMouseDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseDown)==null||s.call(i,e))}_onMouseUp(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onMouseUp)==null||l.call(s,e))}_onMouseMove(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onMouseMove)==null||l.call(s,e))}_onMouseEnter(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseEnter)==null||s.call(i,e))}_onMouseLeave(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseLeave)==null||s.call(i,e))}_onFocus(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onFocus)==null||s.call(i,e))}_onScroll(e){var i,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(i=this._currentTool).onScroll)==null||s.call(i,e))}_onInput(e){var i,s;this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onInput)==null||s.call(i,e)}_onKeyDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyDown)==null||s.call(i,e))}_onKeyUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyUp)==null||s.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var l,o;let s=e==null?void 0:e.tooltipText;s===void 0&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:s}))):this.highlight.clearHighlight(),i&&((o=(l=this._delegate).highlightUpdated)==null||o.call(l))}_ignoreOverlayEvent(e){return e.composedPath().some(i=>(i.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var i;for(const s of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(s)))return s;return e.composedPath()[0]}setMode(e){var i,s;(s=(i=this._delegate).setMode)==null||s.call(i,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var s,l;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!gA(e)&&this._lastActionAutoexpectSnapshot){const o=mA(i,this._lastActionAutoexpectSnapshot);e.preconditionSelector=o?this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((l=(s=this._delegate).performAction)==null?void 0:l.call(s,e).catch(()=>{}))}recordAction(e){var i,s;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(s=(i=this._delegate).recordAction)==null||s.call(i,e)}setOverlayState(e){var i,s;(s=(i=this._delegate).setOverlayState)==null||s.call(i,e)}elementPicked(e,i){var l,o;const s=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"expect"});(o=(l=this._delegate).elementPicked)==null||o.call(l,{selector:e,ariaSnapshot:s})}}let gv=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const i=this._recorder.document.createElement("x-pw-tool-item");i.title="Accept",i.classList.add("accept"),i.appendChild(this._recorder.document.createElement("x-div")),i.addEventListener("click",()=>{var f;return(f=e.onCommit)==null?void 0:f.call(e)});const s=this._recorder.document.createElement("x-pw-tool-item");s.title="Close",s.classList.add("cancel"),s.appendChild(this._recorder.document.createElement("x-div")),s.addEventListener("click",()=>{var f;this.close(),(f=e.onCancel)==null||f.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)},this._dialogElement.addEventListener("click",f=>f.stopPropagation());const l=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,l.appendChild(o),l.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&l.appendChild(i),l.appendChild(s),this._dialogElement.appendChild(l);const u=this._recorder.document.createElement("x-pw-dialog-body");return u.appendChild(e.body),this._dialogElement.appendChild(u),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,i){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=i+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function dA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function yr(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function kh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Qa(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function ze(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function Za(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function Ja(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function De(n,e,i,s){return n.addEventListener(e,i,s),()=>{n.removeEventListener(e,i,s)}}function mv(n){for(const e of n)e();n.splice(0,n.length)}function pA(n,e,i,s){try{const l=n.parseSelector(i),o=n.querySelectorAll(l,s),u=o.length>1?an.multiple:an.single,f=n.utils.asLocator(e,i);return o.map((d,p)=>{const m=o.length>1?` [${p+1} of ${o.length}]`:"";return{element:d,color:u,tooltipText:f+m}})}catch{return[]}}function yv(n,{tagName:e,attrs:i,children:s}){const l=n.createElementNS("http://www.w3.org/2000/svg",e);if(i)for(const[o,u]of Object.entries(i))l.setAttribute(o,u);if(s)for(const o of s)l.appendChild(yv(n,o));return l}function gA(n){return n.name.startsWith("assert")}function mA(n,e){var u,f;function i(d,p,m){let y=1,v=m+y;for(const S of d.children||[])typeof S=="string"?(y++,v++):(y+=i(S,p,v),v+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let S=p.get(d.role);S||(S=new Map,p.set(d.role,S));const E=S.get(d.name),x=y*100-m;(!E||E.sizeAndPosition<x)&&S.set(d.name,{node:d,sizeAndPosition:x})}return y}const s=new Map;n&&i(n.root,s,0);const l=new Map;i(e.root,l,0);const o=[];for(const[d,p]of l)for(const[m,y]of p)((u=s.get(d))==null?void 0:u.get(m))||o.push(y);return o.sort((d,p)=>p.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node.element}function yA(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,u,f)=>`${u}(${f.toLowerCase()}`);const i=[];let s="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){s+=u;continue}const f=n[o-1]==="r"||n[o]==="/";++o;let d="";for(;o<n.length;){if(n[o]==="\\"){f?(n[o+1]!==u&&(d+=n[o]),++o,d+=n[o]):(++o,n[o]==="n"?d+=`
`:n[o]==="r"?d+="\r":n[o]==="t"?d+="	":d+=n[o]),++o;continue}if(n[o]!==u){d+=n[o++];continue}break}i.push({quote:u,text:d}),s+=(u==="/"?"r":"")+"$"+i.length}s=s.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const l=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:bv(s,i,e),preferredQuote:l}}function fb(n){return[...n.matchAll(/\$\d+/g)].length}function hb(n,e){return n.replace(/\$(\d+)/g,(i,s)=>`$${s-e}`)}function bv(n,e,i){for(;;){const l=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!l)break;const o=l.index+l[0].length;let u=0,f=o;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let d=n.substring(0,o),p=0;["sethas(","sethasnot("].includes(l[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=fb(n.substring(0,o)),y=hb(n.substring(o,f),m),v=fb(y),S=e.slice(m,m+v),E=JSON.stringify(bv(y,S,i));n=d.replace(/=$/,"2=")+`$${m+1}`+hb(n.substring(f+p),v-1);const x=e.slice(0,m),T=e.slice(m+v);e=x.concat([{quote:'"',text:E}]).concat(T)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(l,o,u)=>","+o.toLowerCase()+"="+u.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${i}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const s=n.split(".");for(let l=0;l<s.length-1;l++)if(s[l]==="internal:control=enter-frame"&&s[l+1].startsWith("nth=")){const[o]=s.splice(l,1);s.splice(l+1,0,o)}return s.map(l=>!l.startsWith("internal:")||l==="internal:control"?l.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(l=l.includes("[")?l.replace(/\]/,"")+"]":l,l=l.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const d=e[+u-1];return l.startsWith("internal:attr")||l.startsWith("internal:testid")||l.startsWith("internal:role")?xt(new RegExp(d.text),!1)+(f||""):Rt(new RegExp(d.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const d=e[+u-1];return l.startsWith("internal:has=")||l.startsWith("internal:has-not=")?d.text:l.startsWith("internal:testid")?xt(d.text,!0):l.startsWith("internal:attr")||l.startsWith("internal:role")?xt(d.text,f==="s"):Rt(d.text,f==="s")}),l)).join(" >> ")}function bA(n,e,i){try{return vA(n,e,i)}catch{return""}}function vA(n,e,i){try{return ll(e),e}catch{}const{selector:s,preferredQuote:l}=yA(e,i),o=n0(n,s,void 0,void 0,l),u=db(n,e);return o.some(f=>db(n,f)===u)?s:""}function db(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const SA=({url:n})=>b.jsxs("div",{className:"browser-frame-header",children:[b.jsxs("div",{className:"browser-traffic-lights",children:[b.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),b.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),b.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),b.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[b.jsx("span",{className:"browser-frame-address",children:n||"about:blank"}),n&&b.jsx(Vh,{value:n})]}),b.jsx("div",{style:{marginLeft:"auto"},children:b.jsxs("div",{children:[b.jsx("span",{className:"browser-frame-menu-bar"}),b.jsx("span",{className:"browser-frame-menu-bar"}),b.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),gd=Symbol.for("yaml.alias"),Mh=Symbol.for("yaml.document"),Ei=Symbol.for("yaml.map"),vv=Symbol.for("yaml.pair"),Tn=Symbol.for("yaml.scalar"),Nr=Symbol.for("yaml.seq"),on=Symbol.for("yaml.node.type"),fs=n=>!!n&&typeof n=="object"&&n[on]===gd,hs=n=>!!n&&typeof n=="object"&&n[on]===Mh,Cr=n=>!!n&&typeof n=="object"&&n[on]===Ei,Be=n=>!!n&&typeof n=="object"&&n[on]===vv,Re=n=>!!n&&typeof n=="object"&&n[on]===Tn,kr=n=>!!n&&typeof n=="object"&&n[on]===Nr;function He(n){if(n&&typeof n=="object")switch(n[on]){case Ei:case Nr:return!0}return!1}function qe(n){if(n&&typeof n=="object")switch(n[on]){case gd:case Ei:case Tn:case Nr:return!0}return!1}const wA=n=>(Re(n)||He(n))&&!!n.anchor,jt=Symbol("break visit"),Sv=Symbol("skip children"),_n=Symbol("remove node");function Ai(n,e){const i=wv(e);hs(n)?dr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):dr(null,n,i,Object.freeze([]))}Ai.BREAK=jt;Ai.SKIP=Sv;Ai.REMOVE=_n;function dr(n,e,i,s){const l=xv(n,e,i,s);if(qe(l)||Be(l))return _v(n,s,l),dr(n,l,i,s);if(typeof l!="symbol"){if(He(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=dr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===jt)return jt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=dr("key",e.key,i,s);if(o===jt)return jt;o===_n&&(e.key=null);const u=dr("value",e.value,i,s);if(u===jt)return jt;u===_n&&(e.value=null)}}return l}async function mc(n,e){const i=wv(e);hs(n)?await pr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):await pr(null,n,i,Object.freeze([]))}mc.BREAK=jt;mc.SKIP=Sv;mc.REMOVE=_n;async function pr(n,e,i,s){const l=await xv(n,e,i,s);if(qe(l)||Be(l))return _v(n,s,l),pr(n,l,i,s);if(typeof l!="symbol"){if(He(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=await pr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===jt)return jt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=await pr("key",e.key,i,s);if(o===jt)return jt;o===_n&&(e.key=null);const u=await pr("value",e.value,i,s);if(u===jt)return jt;u===_n&&(e.value=null)}}return l}function wv(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function xv(n,e,i,s){var l,o,u,f,d;if(typeof i=="function")return i(n,e,s);if(Cr(e))return(l=i.Map)==null?void 0:l.call(i,n,e,s);if(kr(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,s);if(Be(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,s);if(Re(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,s);if(fs(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,s)}function _v(n,e,i){const s=e[e.length-1];if(He(s))s.items[n]=i;else if(Be(s))n==="key"?s.key=i:s.value=i;else if(hs(s))s.contents=i;else{const l=fs(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const xA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},_A=n=>n.replace(/[!,[\]{}]/g,e=>xA[e]);class wt{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wt.defaultYaml,e),this.tags=Object.assign({},wt.defaultTags,i)}clone(){const e=new wt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new wt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wt.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:wt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wt.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),l=s.shift();switch(l){case"%TAG":{if(s.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,u]=s;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const u=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,u),!1}}default:return i(0,`Unknown directive ${l}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const u=e.slice(2,-1);return u==="!"||u==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),u)}const[,s,l]=e.match(/^(.*!)([^!]*)$/s);l||i(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(l)}catch(u){return i(String(u)),null}return s==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,s]of Object.entries(this.tags))if(e.startsWith(s))return i+_A(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let l;if(e&&s.length>0&&qe(e.contents)){const o={};Ai(e.contents,(u,f)=>{qe(f)&&f.tag&&(o[f.tag]=!0)}),l=Object.keys(o)}else l=[];for(const[o,u]of s)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||l.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
`)}}wt.defaultYaml={explicit:!1,version:"1.2"};wt.defaultTags={"!!":"tag:yaml.org,2002:"};function Tv(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(i)}return!0}function Ev(n){const e=new Set;return Ai(n,{Value(i,s){s.anchor&&e.add(s.anchor)}}),e}function Av(n,e){for(let i=1;;++i){const s=`${n}${i}`;if(!e.has(s))return s}}function TA(n,e){const i=[],s=new Map;let l=null;return{onAnchor:o=>{i.push(o),l||(l=Ev(n));const u=Av(e,l);return l.add(u),u},setAnchors:()=>{for(const o of i){const u=s.get(o);if(typeof u=="object"&&u.anchor&&(Re(u.node)||He(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:s}}function gr(n,e,i,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let l=0,o=s.length;l<o;++l){const u=s[l],f=gr(n,s,String(l),u);f===void 0?delete s[l]:f!==u&&(s[l]=f)}else if(s instanceof Map)for(const l of Array.from(s.keys())){const o=s.get(l),u=gr(n,s,l,o);u===void 0?s.delete(l):u!==o&&s.set(l,u)}else if(s instanceof Set)for(const l of Array.from(s)){const o=gr(n,s,l,l);o===void 0?s.delete(l):o!==l&&(s.delete(l),s.add(o))}else for(const[l,o]of Object.entries(s)){const u=gr(n,s,l,o);u===void 0?delete s[l]:u!==o&&(s[l]=u)}return n.call(e,i,s)}function ln(n,e,i){if(Array.isArray(n))return n.map((s,l)=>ln(s,String(l),i));if(n&&typeof n.toJSON=="function"){if(!i||!wA(n))return n.toJSON(e,i);const s={aliasCount:0,count:1,res:void 0};i.anchors.set(n,s),i.onCreate=o=>{s.res=o,delete i.onCreate};const l=n.toJSON(e,i);return i.onCreate&&i.onCreate(l),l}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class md{constructor(e){Object.defineProperty(this,on,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:s,onAnchor:l,reviver:o}={}){if(!hs(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=ln(this,"",u);if(typeof l=="function")for(const{count:d,res:p}of u.anchors.values())l(p,d);return typeof o=="function"?gr(o,{"":f},"",f):f}}class yc extends md{constructor(e){super(gd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return Ai(e,{Node:(s,l)=>{if(l===this)return Ai.BREAK;l.anchor===this.source&&(i=l)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:s,doc:l,maxAliasCount:o}=i,u=this.resolve(l);if(!u){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=s.get(u);if(f||(ln(u,null,i),f=s.get(u)),!f||f.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=Go(l,u,s)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(e,i,s){const l=`*${this.source}`;if(e){if(Tv(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${l} `}return l}}function Go(n,e,i){if(fs(e)){const s=e.resolve(n),l=i&&s&&i.get(s);return l?l.count*l.aliasCount:0}else if(He(e)){let s=0;for(const l of e.items){const o=Go(n,l,i);o>s&&(s=o)}return s}else if(Be(e)){const s=Go(n,e.key,i),l=Go(n,e.value,i);return Math.max(s,l)}return 1}const Nv=n=>!n||typeof n!="function"&&typeof n!="object";class he extends md{constructor(e){super(Tn),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:ln(this.value,e,i)}toString(){return String(this.value)}}he.BLOCK_FOLDED="BLOCK_FOLDED";he.BLOCK_LITERAL="BLOCK_LITERAL";he.PLAIN="PLAIN";he.QUOTE_DOUBLE="QUOTE_DOUBLE";he.QUOTE_SINGLE="QUOTE_SINGLE";const EA="tag:yaml.org,2002:";function AA(n,e,i){if(e){const s=i.filter(o=>o.tag===e),l=s.find(o=>!o.format)??s[0];if(!l)throw new Error(`Tag ${e} not found`);return l}return i.find(s=>{var l;return((l=s.identify)==null?void 0:l.call(s,n))&&!s.format})}function il(n,e,i){var y,v,S;if(hs(n)&&(n=n.contents),qe(n))return n;if(Be(n)){const E=(v=(y=i.schema[Ei]).createNode)==null?void 0:v.call(y,i.schema,null,i);return E.items.push(n),E}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:l,onTagObj:o,schema:u,sourceObjects:f}=i;let d;if(s&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor||(d.anchor=l(n)),new yc(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=EA+e.slice(2));let p=AA(n,e,u.tags);if(!p){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new he(n);return d&&(d.node=E),E}p=n instanceof Map?u[Ei]:Symbol.iterator in Object(n)?u[Nr]:u[Ei]}o&&(o(p),delete i.onTagObj);const m=p!=null&&p.createNode?p.createNode(i.schema,n,i):typeof((S=p==null?void 0:p.nodeClass)==null?void 0:S.from)=="function"?p.nodeClass.from(i.schema,n,i):new he(n);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function rc(n,e,i){let s=i;for(let l=e.length-1;l>=0;--l){const o=e[l];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const u=[];u[o]=s,s=u}else s=new Map([[o,s]])}return il(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Ga=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class Cv extends md{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(s=>qe(s)||Be(s)?s.clone(e):s),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Ga(e))this.add(i);else{const[s,...l]=e,o=this.get(s,!0);if(He(o))o.addIn(l,i);else if(o===void 0&&this.schema)this.set(s,rc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${l}`)}}deleteIn(e){const[i,...s]=e;if(s.length===0)return this.delete(i);const l=this.get(i,!0);if(He(l))return l.deleteIn(s);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}getIn(e,i){const[s,...l]=e,o=this.get(s,!0);return l.length===0?!i&&Re(o)?o.value:o:He(o)?o.getIn(l,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Be(i))return!1;const s=i.value;return s==null||e&&Re(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[i,...s]=e;if(s.length===0)return this.has(i);const l=this.get(i,!0);return He(l)?l.hasIn(s):!1}setIn(e,i){const[s,...l]=e;if(l.length===0)this.set(s,i);else{const o=this.get(s,!0);if(He(o))o.setIn(l,i);else if(o===void 0&&this.schema)this.set(s,rc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${l}`)}}}const NA=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function Pn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const is=(n,e,i)=>n.endsWith(`
`)?Pn(i,e):i.includes(`
`)?`
`+Pn(i,e):(n.endsWith(" ")?"":" ")+i,kv="flow",Oh="block",Ko="quoted";function bc(n,e,i="flow",{indentAtStart:s,lineWidth:l=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!l||l<0)return n;l<o&&(o=0);const d=Math.max(1+o,1+l-e.length);if(n.length<=d)return n;const p=[],m={};let y=l-e.length;typeof s=="number"&&(s>l-Math.max(2,o)?p.push(0):y=l-s);let v,S,E=!1,x=-1,T=-1,C=-1;i===Oh&&(x=pb(n,x,e.length),x!==-1&&(y=x+d));for(let $;$=n[x+=1];){if(i===Ko&&$==="\\"){switch(T=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}C=x}if($===`
`)i===Oh&&(x=pb(n,x,e.length)),y=x+e.length+d,v=void 0;else{if($===" "&&S&&S!==" "&&S!==`
`&&S!=="	"){const V=n[x+1];V&&V!==" "&&V!==`
`&&V!=="	"&&(v=x)}if(x>=y)if(v)p.push(v),y=v+d,v=void 0;else if(i===Ko){for(;S===" "||S==="	";)S=$,$=n[x+=1],E=!0;const V=x>C+1?x-2:T-1;if(m[V])return n;p.push(V),m[V]=!0,y=V+d,v=void 0}else E=!0}S=$}if(E&&f&&f(),p.length===0)return n;u&&u();let k=n.slice(0,p[0]);for(let $=0;$<p.length;++$){const V=p[$],R=p[$+1]||n.length;V===0?k=`
${e}${n.slice(0,R)}`:(i===Ko&&m[V]&&(k+=`${n[V]}\\`),k+=`
${e}${n.slice(V+1,R)}`)}return k}function pb(n,e,i){let s=e,l=e+1,o=n[l];for(;o===" "||o==="	";)if(e<l+i)o=n[++e];else{do o=n[++e];while(o&&o!==`
`);s=e,l=e+1,o=n[l]}return s}const vc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Sc=n=>/^(%|---|\.\.\.)/m.test(n);function CA(n,e,i){if(!e||e<0)return!1;const s=e-i,l=n.length;if(l<=s)return!1;for(let o=0,u=0;o<l;++o)if(n[o]===`
`){if(o-u>s)return!0;if(u=o+1,l-u<=s)return!1}return!0}function Wa(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=e,l=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Sc(n)?"  ":"");let u="",f=0;for(let d=0,p=i[d];p;p=i[++d])if(p===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(u+=i.slice(f,d)+"\\ ",d+=1,f=d,p="\\"),p==="\\")switch(i[d+1]){case"u":{u+=i.slice(f,d);const m=i.substr(d+2,4);switch(m){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:m.substr(0,2)==="00"?u+="\\x"+m.substr(2):u+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(s||i[d+2]==='"'||i.length<l)d+=1;else{for(u+=i.slice(f,d)+`

`;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)u+=`
`,d+=2;u+=o,i[d+2]===" "&&(u+="\\"),d+=1,f=d+1}break;default:d+=1}return u=f?u+i.slice(f):i,s?u:bc(u,o,Ko,vc(e,!1))}function Rh(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
`)||/[ \t]\n|\n[ \t]/.test(n))return Wa(n,e);const i=e.indent||(Sc(n)?"  ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
${i}`)+"'";return e.implicitKey?s:bc(s,i,kv,vc(e,!1))}function mr(n,e){const{singleQuote:i}=e.options;let s;if(i===!1)s=Wa;else{const l=n.includes('"'),o=n.includes("'");l&&!o?s=Rh:o&&!l?s=Wa:s=i?Rh:Wa}return s(n,e)}let jh;try{jh=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{jh=/\n+(?!\n|$)/g}function Yo({comment:n,type:e,value:i},s,l,o){const{blockQuote:u,commentString:f,lineWidth:d}=s.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return mr(i,s);const p=s.indent||(s.forceBlockIndent||Sc(i)?"  ":""),m=u==="literal"?!0:u==="folded"||e===he.BLOCK_FOLDED?!1:e===he.BLOCK_LITERAL?!0:!CA(i,d,p.length);if(!i)return m?`|
`:`>
`;let y,v;for(v=i.length;v>0;--v){const G=i[v-1];if(G!==`
`&&G!=="	"&&G!==" ")break}let S=i.substring(v);const E=S.indexOf(`
`);E===-1?y="-":i===S||E!==S.length-1?(y="+",o&&o()):y="",S&&(i=i.slice(0,-S.length),S[S.length-1]===`
`&&(S=S.slice(0,-1)),S=S.replace(jh,`$&${p}`));let x=!1,T,C=-1;for(T=0;T<i.length;++T){const G=i[T];if(G===" ")x=!0;else if(G===`
`)C=T;else break}let k=i.substring(0,C<T?C+1:T);k&&(i=i.substring(k.length),k=k.replace(/\n+/g,`$&${p}`));let V=(m?"|":">")+(x?p?"2":"1":"")+y;if(n&&(V+=" "+f(n.replace(/ ?[\r\n]+/g," ")),l&&l()),m)return i=i.replace(/\n+/g,`$&${p}`),`${V}
${p}${k}${i}${S}`;i=i.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const R=bc(`${k}${i}${S}`,p,Oh,vc(s,!0));return`${V}
${p}${R}`}function kA(n,e,i,s){const{type:l,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:p,inFlow:m}=e;if(f&&o.includes(`
`)||m&&/[[\]{},]/.test(o))return mr(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||m||!o.includes(`
`)?mr(o,e):Yo(n,e,i,s);if(!f&&!m&&l!==he.PLAIN&&o.includes(`
`))return Yo(n,e,i,s);if(Sc(o)){if(d==="")return e.forceBlockIndent=!0,Yo(n,e,i,s);if(f&&d===p)return mr(o,e)}const y=o.replace(/\n+/g,`$&
${d}`);if(u){const v=x=>{var T;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((T=x.test)==null?void 0:T.test(y))},{compat:S,tags:E}=e.doc.schema;if(E.some(v)||S!=null&&S.some(v))return mr(o,e)}return f?y:bc(y,d,kv,vc(e,!1))}function ol(n,e,i,s){const{implicitKey:l,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==he.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=he.QUOTE_DOUBLE);const d=m=>{switch(m){case he.BLOCK_FOLDED:case he.BLOCK_LITERAL:return l||o?mr(u.value,e):Yo(u,e,i,s);case he.QUOTE_DOUBLE:return Wa(u.value,e);case he.QUOTE_SINGLE:return Rh(u.value,e);case he.PLAIN:return kA(u,e,i,s);default:return null}};let p=d(f);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,v=l&&m||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Mv(n,e){const i=Object.assign({blockQuote:!0,commentString:NA,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let s;switch(i.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):"  ",inFlow:s,options:i}}function MA(n,e){var l;if(e.tag){const o=n.filter(u=>u.tag===e.tag);if(o.length>0)return o.find(u=>u.format===e.format)??o[0]}let i,s;if(Re(e)){s=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,s)});if(o.length>1){const u=o.filter(f=>f.test);u.length>0&&(o=u)}i=o.find(u=>u.format===e.format)??o.find(u=>!u.format)}else s=e,i=n.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!i){const o=((l=s==null?void 0:s.constructor)==null?void 0:l.name)??typeof s;throw new Error(`Tag not resolved for ${o} value`)}return i}function OA(n,e,{anchors:i,doc:s}){if(!s.directives)return"";const l=[],o=(Re(n)||He(n))&&n.anchor;o&&Tv(o)&&(i.add(o),l.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&l.push(s.directives.tagString(u)),l.join(" ")}function wr(n,e,i,s){var d;if(Be(n))return n.toString(e,i,s);if(fs(n)){if(e.doc.directives)return n.toString(e);if((d=e.resolvedAliases)!=null&&d.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let l;const o=qe(n)?n:e.doc.createNode(n,{onTagObj:p=>l=p});l||(l=MA(e.doc.schema.tags,o));const u=OA(o,l,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof l.stringify=="function"?l.stringify(o,e,i,s):Re(o)?ol(o,e,i,s):o.toString(e,i,s);return u?Re(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
${e.indent}${f}`:f}function RA({key:n,value:e},i,s,l){const{allNullValues:o,doc:u,indent:f,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=i;let v=qe(n)&&n.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(He(n)||!qe(n)&&typeof n=="object"){const Z="With simple keys, collection cannot be used as a key value";throw new Error(Z)}}let S=!y&&(!n||v&&e==null&&!i.inFlow||He(n)||(Re(n)?n.type===he.BLOCK_FOLDED||n.type===he.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!S&&(y||!o),indent:f+d});let E=!1,x=!1,T=wr(n,i,()=>E=!0,()=>x=!0);if(!S&&!i.inFlow&&T.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");S=!0}if(i.inFlow){if(o||e==null)return E&&s&&s(),T===""?"?":S?`? ${T}`:T}else if(o&&!y||e==null&&S)return T=`? ${T}`,v&&!E?T+=is(T,i.indent,p(v)):x&&l&&l(),T;E&&(v=null),S?(v&&(T+=is(T,i.indent,p(v))),T=`? ${T}
${f}:`):(T=`${T}:`,v&&(T+=is(T,i.indent,p(v))));let C,k,$;qe(e)?(C=!!e.spaceBefore,k=e.commentBefore,$=e.comment):(C=!1,k=null,$=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!S&&!v&&Re(e)&&(i.indentAtStart=T.length+1),x=!1,!m&&d.length>=2&&!i.inFlow&&!S&&kr(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let V=!1;const R=wr(e,i,()=>V=!0,()=>x=!0);let G=" ";if(v||C||k){if(G=C?`
`:"",k){const Z=p(k);G+=`
${Pn(Z,i.indent)}`}R===""&&!i.inFlow?G===`
`&&(G=`

`):G+=`
${i.indent}`}else if(!S&&He(e)){const Z=R[0],q=R.indexOf(`
`),j=q!==-1,ie=i.inFlow??e.flow??e.items.length===0;if(j||!ie){let le=!1;if(j&&(Z==="&"||Z==="!")){let I=R.indexOf(" ");Z==="&"&&I!==-1&&I<q&&R[I+1]==="!"&&(I=R.indexOf(" ",I+1)),(I===-1||q<I)&&(le=!0)}le||(G=`
${i.indent}`)}}else(R===""||R[0]===`
`)&&(G="");return T+=G+R,i.inFlow?V&&s&&s():$&&!V?T+=is(T,i.indent,p($)):x&&l&&l(),T}function Ov(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Mo="<<",Fn={identify:n=>n===Mo||typeof n=="symbol"&&n.description===Mo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new he(Symbol(Mo)),{addToJSMap:Rv}),stringify:()=>Mo},jA=(n,e)=>(Fn.identify(e)||Re(e)&&(!e.type||e.type===he.PLAIN)&&Fn.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===Fn.tag&&i.default));function Rv(n,e,i){if(i=n&&fs(i)?i.resolve(n.doc):i,kr(i))for(const s of i.items)ch(n,e,s);else if(Array.isArray(i))for(const s of i)ch(n,e,s);else ch(n,e,i)}function ch(n,e,i){const s=n&&fs(i)?i.resolve(n.doc):i;if(!Cr(s))throw new Error("Merge sources must be maps or map aliases");const l=s.toJSON(null,n,Map);for(const[o,u]of l)e instanceof Map?e.has(o)||e.set(o,u):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function jv(n,e,{key:i,value:s}){if(qe(i)&&i.addToJSMap)i.addToJSMap(n,e,s);else if(jA(n,i))Rv(n,e,s);else{const l=ln(i,"",n);if(e instanceof Map)e.set(l,ln(s,l,n));else if(e instanceof Set)e.add(l);else{const o=LA(i,l,n),u=ln(s,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function LA(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(qe(n)&&(i!=null&&i.doc)){const s=Mv(i.doc,{});s.anchors=new Set;for(const o of i.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const l=n.toString(s);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),Ov(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(e)}function yd(n,e,i){const s=il(n,void 0,i),l=il(e,void 0,i);return new mt(s,l)}class mt{constructor(e,i=null){Object.defineProperty(this,on,{value:vv}),this.key=e,this.value=i}clone(e){let{key:i,value:s}=this;return qe(i)&&(i=i.clone(e)),qe(s)&&(s=s.clone(e)),new mt(i,s)}toJSON(e,i){const s=i!=null&&i.mapAsMap?new Map:{};return jv(i,s,this)}toString(e,i,s){return e!=null&&e.doc?RA(this,e,i,s):JSON.stringify(this)}}function Lv(n,e,i){return(e.inFlow??n.flow?BA:DA)(n,e,i)}function DA({comment:n,items:e},i,{blockItemPrefix:s,flowChars:l,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:p}}=i,m=Object.assign({},i,{indent:o,type:null});let y=!1;const v=[];for(let E=0;E<e.length;++E){const x=e[E];let T=null;if(qe(x))!y&&x.spaceBefore&&v.push(""),ac(i,v,x.commentBefore,y),x.comment&&(T=x.comment);else if(Be(x)){const k=qe(x.key)?x.key:null;k&&(!y&&k.spaceBefore&&v.push(""),ac(i,v,k.commentBefore,y))}y=!1;let C=wr(x,m,()=>T=null,()=>y=!0);T&&(C+=is(C,o,p(T))),y&&T&&(y=!1),v.push(s+C)}let S;if(v.length===0)S=l.start+l.end;else{S=v[0];for(let E=1;E<v.length;++E){const x=v[E];S+=x?`
${d}${x}`:`
`}}return n?(S+=`
`+Pn(p(n),d),f&&f()):y&&u&&u(),S}function BA({items:n},e,{flowChars:i,itemIndent:s}){const{indent:l,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;s+=o;const d=Object.assign({},e,{indent:s,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let E=0;E<n.length;++E){const x=n[E];let T=null;if(qe(x))x.spaceBefore&&y.push(""),ac(e,y,x.commentBefore,!1),x.comment&&(T=x.comment);else if(Be(x)){const k=qe(x.key)?x.key:null;k&&(k.spaceBefore&&y.push(""),ac(e,y,k.commentBefore,!1),k.comment&&(p=!0));const $=qe(x.value)?x.value:null;$?($.comment&&(T=$.comment),$.commentBefore&&(p=!0)):x.value==null&&(k!=null&&k.comment)&&(T=k.comment)}T&&(p=!0);let C=wr(x,d,()=>T=null);E<n.length-1&&(C+=","),T&&(C+=is(C,s,f(T))),!p&&(y.length>m||C.includes(`
`))&&(p=!0),y.push(C),m=y.length}const{start:v,end:S}=i;if(y.length===0)return v+S;if(!p){const E=y.reduce((x,T)=>x+T.length+2,2);p=e.options.lineWidth>0&&E>e.options.lineWidth}if(p){let E=v;for(const x of y)E+=x?`
${o}${l}${x}`:`
`;return`${E}
${l}${S}`}else return`${v}${u}${y.join(" ")}${u}${S}`}function ac({indent:n,options:{commentString:e}},i,s,l){if(s&&l&&(s=s.replace(/^\n+/,"")),s){const o=Pn(e(s),n);i.push(o.trimStart())}}function ss(n,e){const i=Re(e)?e.value:e;for(const s of n)if(Be(s)&&(s.key===e||s.key===i||Re(s.key)&&s.key.value===i))return s}class Vt extends Cv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ei,e),this.items=[]}static from(e,i,s){const{keepUndefined:l,replacer:o}=s,u=new this(e),f=(d,p)=>{if(typeof o=="function")p=o.call(i,d,p);else if(Array.isArray(o)&&!o.includes(d))return;(p!==void 0||l)&&u.items.push(yd(d,p,s))};if(i instanceof Map)for(const[d,p]of i)f(d,p);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let s;Be(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new mt(e,e==null?void 0:e.value):s=new mt(e.key,e.value);const l=ss(this.items,s.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(l){if(!i)throw new Error(`Key ${s.key} already set`);Re(l.value)&&Nv(s.value)?l.value.value=s.value:l.value=s.value}else if(o){const f=this.items.findIndex(d=>o(s,d)<0);f===-1?this.items.push(s):this.items.splice(f,0,s)}else this.items.push(s)}delete(e){const i=ss(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const s=ss(this.items,e),l=s==null?void 0:s.value;return(!i&&Re(l)?l.value:l)??void 0}has(e){return!!ss(this.items,e)}set(e,i){this.add(new mt(e,i),!0)}toJSON(e,i,s){const l=s?new s:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)jv(i,l,o);return l}toString(e,i,s){if(!e)return JSON.stringify(this);for(const l of this.items)if(!Be(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Lv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:i})}}const Mr={collection:"map",default:!0,nodeClass:Vt,tag:"tag:yaml.org,2002:map",resolve(n,e){return Cr(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Vt.from(n,e,i)};class Ni extends Cv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Nr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=Oo(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const s=Oo(e);if(typeof s!="number")return;const l=this.items[s];return!i&&Re(l)?l.value:l}has(e){const i=Oo(e);return typeof i=="number"&&i<this.items.length}set(e,i){const s=Oo(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const l=this.items[s];Re(l)&&Nv(i)?l.value=i:this.items[s]=i}toJSON(e,i){const s=[];i!=null&&i.onCreate&&i.onCreate(s);let l=0;for(const o of this.items)s.push(ln(o,String(l++),i));return s}toString(e,i,s){return e?Lv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:s,onComment:i}):JSON.stringify(this)}static from(e,i,s){const{replacer:l}=s,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof l=="function"){const d=i instanceof Set?f:String(u++);f=l.call(i,d,f)}o.items.push(il(f,void 0,s))}}return o}}function Oo(n){let e=Re(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Or={collection:"seq",default:!0,nodeClass:Ni,tag:"tag:yaml.org,2002:seq",resolve(n,e){return kr(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Ni.from(n,e,i)},wc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,s){return e=Object.assign({actualString:!0},e),ol(n,e,i,s)}},xc={identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new he(null),stringify:({source:n},e)=>typeof n=="string"&&xc.test.test(n)?n:e.options.nullStr},bd={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new he(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&bd.test.test(n)){const s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?i.options.trueStr:i.options.falseStr}};function mn({format:n,minFractionDigits:e,tag:i,value:s}){if(typeof s=="bigint")return String(s);const l=typeof s=="number"?s:Number(s);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let o=JSON.stringify(s);if(!n&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let u=o.indexOf(".");u<0&&(u=o.length,o+=".");let f=e-(o.length-u-1);for(;f-- >0;)o+="0"}return o}const Dv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:mn},Bv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():mn(n)}},Uv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new he(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:mn},_c=n=>typeof n=="bigint"||Number.isInteger(n),vd=(n,e,i,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),i);function zv(n,e,i){const{value:s}=n;return _c(s)&&s>=0?i+s.toString(e):mn(n)}const Hv={identify:n=>_c(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>vd(n,2,8,i),stringify:n=>zv(n,8,"0o")},qv={identify:_c,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>vd(n,0,10,i),stringify:mn},$v={identify:n=>_c(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>vd(n,2,16,i),stringify:n=>zv(n,16,"0x")},UA=[Mr,Or,wc,xc,bd,Hv,qv,$v,Dv,Bv,Uv];function gb(n){return typeof n=="bigint"||Number.isInteger(n)}const Ro=({value:n})=>JSON.stringify(n),zA=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Ro},{identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ro},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:Ro},{identify:gb,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:i})=>i?BigInt(n):parseInt(n,10),stringify:({value:n})=>gb(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Ro}],HA={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},qA=[Mr,Or].concat(zA,HA),Sd={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){const i=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(i.length);for(let l=0;l<i.length;++l)s[l]=i.charCodeAt(l);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:i},s,l,o){const u=i;let f;if(typeof Buffer=="function")f=u instanceof Buffer?u.toString("base64"):Buffer.from(u.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<u.length;++p)d+=String.fromCharCode(u[p]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=he.BLOCK_LITERAL),e!==he.QUOTE_DOUBLE){const d=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),p=Math.ceil(f.length/d),m=new Array(p);for(let y=0,v=0;y<p;++y,v+=d)m[y]=f.substr(v,d);f=m.join(e===he.BLOCK_LITERAL?`
`:" ")}return ol({comment:n,type:e,value:f},s,l,o)}};function Iv(n,e){if(kr(n))for(let i=0;i<n.items.length;++i){let s=n.items[i];if(!Be(s)){if(Cr(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const l=s.items[0]||new mt(new he(null));if(s.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${s.commentBefore}
${l.key.commentBefore}`:s.commentBefore),s.comment){const o=l.value??l.key;o.comment=o.comment?`${s.comment}
${o.comment}`:s.comment}s=l}n.items[i]=Be(s)?s:new mt(s)}}else e("Expected a sequence for this tag");return n}function Vv(n,e,i){const{replacer:s}=i,l=new Ni(n);l.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof s=="function"&&(u=s.call(e,String(o++),u));let f,d;if(Array.isArray(u))if(u.length===2)f=u[0],d=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const p=Object.keys(u);if(p.length===1)f=p[0],d=u[f];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else f=u;l.items.push(yd(f,d,i))}return l}const wd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Iv,createNode:Vv};class br extends Ni{constructor(){super(),this.add=Vt.prototype.add.bind(this),this.delete=Vt.prototype.delete.bind(this),this.get=Vt.prototype.get.bind(this),this.has=Vt.prototype.has.bind(this),this.set=Vt.prototype.set.bind(this),this.tag=br.tag}toJSON(e,i){if(!i)return super.toJSON(e);const s=new Map;i!=null&&i.onCreate&&i.onCreate(s);for(const l of this.items){let o,u;if(Be(l)?(o=ln(l.key,"",i),u=ln(l.value,o,i)):o=ln(l,"",i),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,u)}return s}static from(e,i,s){const l=Vv(e,i,s),o=new this;return o.items=l.items,o}}br.tag="tag:yaml.org,2002:omap";const xd={collection:"seq",identify:n=>n instanceof Map,nodeClass:br,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=Iv(n,e),s=[];for(const{key:l}of i.items)Re(l)&&(s.includes(l.value)?e(`Ordered maps must not include duplicate keys: ${l.value}`):s.push(l.value));return Object.assign(new br,i)},createNode:(n,e,i)=>br.from(n,e,i)};function Gv({value:n,source:e},i){return e&&(n?Kv:Yv).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const Kv={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new he(!0),stringify:Gv},Yv={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new he(!1),stringify:Gv},$A={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:mn},IA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():mn(n)}},VA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new he(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const s=n.substring(i+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:mn},cl=n=>typeof n=="bigint"||Number.isInteger(n);function Tc(n,e,i,{intAsBigInt:s}){const l=n[0];if((l==="-"||l==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(i){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return l==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return l==="-"?-1*o:o}function _d(n,e,i){const{value:s}=n;if(cl(s)){const l=s.toString(e);return s<0?"-"+i+l.substr(1):i+l}return mn(n)}const GA={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>Tc(n,2,2,i),stringify:n=>_d(n,2,"0b")},KA={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>Tc(n,1,8,i),stringify:n=>_d(n,8,"0")},YA={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>Tc(n,0,10,i),stringify:mn},XA={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>Tc(n,2,16,i),stringify:n=>_d(n,16,"0x")};class vr extends Vt{constructor(e){super(e),this.tag=vr.tag}add(e){let i;Be(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new mt(e.key,null):i=new mt(e,null),ss(this.items,i.key)||this.items.push(i)}get(e,i){const s=ss(this.items,e);return!i&&Be(s)?Re(s.key)?s.key.value:s.key:s}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const s=ss(this.items,e);s&&!i?this.items.splice(this.items.indexOf(s),1):!s&&i&&this.items.push(new mt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,s);throw new Error("Set items must all have null values")}static from(e,i,s){const{replacer:l}=s,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let u of i)typeof l=="function"&&(u=l.call(i,u,u)),o.items.push(yd(u,null,s));return o}}vr.tag="tag:yaml.org,2002:set";const Td={collection:"map",identify:n=>n instanceof Set,nodeClass:vr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>vr.from(n,e,i),resolve(n,e){if(Cr(n)){if(n.hasAllNullValues(!0))return Object.assign(new vr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Ed(n,e){const i=n[0],s=i==="-"||i==="+"?n.substring(1):n,l=u=>e?BigInt(u):Number(u),o=s.replace(/_/g,"").split(":").reduce((u,f)=>u*l(60)+l(f),l(0));return i==="-"?l(-1)*o:o}function Xv(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return mn(n);let s="";e<0&&(s="-",e*=i(-1));const l=i(60),o=[e%l];return e<60?o.unshift(0):(e=(e-o[0])/l,o.unshift(e%l),e>=60&&(e=(e-o[0])/l,o.unshift(e))),s+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Pv={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:i})=>Ed(n,i),stringify:Xv},Fv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Ed(n,!1),stringify:Xv},Ec={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){const e=n.match(Ec.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,s,l,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(i,s-1,l,o||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=Ed(m,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:n})=>n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},mb=[Mr,Or,wc,xc,Kv,Yv,GA,KA,YA,XA,$A,IA,VA,Sd,Fn,xd,wd,Td,Pv,Fv,Ec],yb=new Map([["core",UA],["failsafe",[Mr,Or,wc]],["json",qA],["yaml11",mb],["yaml-1.1",mb]]),bb={binary:Sd,bool:bd,float:Uv,floatExp:Bv,floatNaN:Dv,floatTime:Fv,int:qv,intHex:$v,intOct:Hv,intTime:Pv,map:Mr,merge:Fn,null:xc,omap:xd,pairs:wd,seq:Or,set:Td,timestamp:Ec},PA={"tag:yaml.org,2002:binary":Sd,"tag:yaml.org,2002:merge":Fn,"tag:yaml.org,2002:omap":xd,"tag:yaml.org,2002:pairs":wd,"tag:yaml.org,2002:set":Td,"tag:yaml.org,2002:timestamp":Ec};function uh(n,e,i){const s=yb.get(e);if(s&&!n)return i&&!s.includes(Fn)?s.concat(Fn):s.slice();let l=s;if(!l)if(Array.isArray(n))l=[];else{const o=Array.from(yb.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(n))for(const o of n)l=l.concat(o);else typeof n=="function"&&(l=n(l.slice()));return i&&(l=l.concat(Fn)),l.reduce((o,u)=>{const f=typeof u=="string"?bb[u]:u;if(!f){const d=JSON.stringify(u),p=Object.keys(bb).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return o.includes(f)||o.push(f),o},[])}const FA=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class Ac{constructor({compat:e,customTags:i,merge:s,resolveKnownTags:l,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?uh(e,"compat"):e?uh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=l?PA:{},this.tags=uh(i,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,Ei,{value:Mr}),Object.defineProperty(this,Tn,{value:wc}),Object.defineProperty(this,Nr,{value:Or}),this.sortMapEntries=typeof u=="function"?u:u===!0?FA:null}clone(){const e=Object.create(Ac.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function QA(n,e){var d;const i=[];let s=e.directives===!0;if(e.directives!==!1&&n.directives){const p=n.directives.toString(n);p?(i.push(p),s=!0):n.directives.docStart&&(s=!0)}s&&i.push("---");const l=Mv(n,e),{commentString:o}=l.options;if(n.commentBefore){i.length!==1&&i.unshift("");const p=o(n.commentBefore);i.unshift(Pn(p,""))}let u=!1,f=null;if(n.contents){if(qe(n.contents)){if(n.contents.spaceBefore&&s&&i.push(""),n.contents.commentBefore){const y=o(n.contents.commentBefore);i.push(Pn(y,""))}l.forceBlockIndent=!!n.comment,f=n.contents.comment}const p=f?void 0:()=>u=!0;let m=wr(n.contents,l,()=>f=null,p);f&&(m+=is(m,"",o(f))),(m[0]==="|"||m[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${m}`:i.push(m)}else i.push(wr(n.contents,l));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const p=o(n.comment);p.includes(`
`)?(i.push("..."),i.push(Pn(p,""))):i.push(`... ${p}`)}else i.push("...");else{let p=n.comment;p&&u&&(p=p.replace(/^\n+/,"")),p&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(Pn(o(p),"")))}return i.join(`
`)+`
`}class Rr{constructor(e,i,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,on,{value:Mh});let l=null;typeof i=="function"||Array.isArray(i)?l=i:s===void 0&&i&&(s=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:u}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new wt({version:u}),this.setSchema(u,s),this.contents=e===void 0?null:this.createNode(e,l,s)}clone(){const e=Object.create(Rr.prototype,{[on]:{value:Mh}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=qe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){rr(this.contents)&&this.contents.add(e)}addIn(e,i){rr(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const s=Ev(this);e.anchor=!i||s.has(i)?Av(i||"a",s):i}return new yc(e.anchor)}createNode(e,i,s){let l;if(typeof i=="function")e=i.call({"":e},"",e),l=i;else if(Array.isArray(i)){const T=k=>typeof k=="number"||k instanceof String||k instanceof Number,C=i.filter(T).map(String);C.length>0&&(i=i.concat(C)),l=i}else s===void 0&&i&&(s=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:p,tag:m}=s??{},{onAnchor:y,setAnchors:v,sourceObjects:S}=TA(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:l,schema:this.schema,sourceObjects:S},x=il(e,m,E);return f&&He(x)&&(x.flow=!0),v(),x}createPair(e,i,s={}){const l=this.createNode(e,null,s),o=this.createNode(i,null,s);return new mt(l,o)}delete(e){return rr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ga(e)?this.contents==null?!1:(this.contents=null,!0):rr(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return He(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ga(e)?!i&&Re(this.contents)?this.contents.value:this.contents:He(this.contents)?this.contents.getIn(e,i):void 0}has(e){return He(this.contents)?this.contents.has(e):!1}hasIn(e){return Ga(e)?this.contents!==void 0:He(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=rc(this.schema,[e],i):rr(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ga(e)?this.contents=i:this.contents==null?this.contents=rc(this.schema,Array.from(e),i):rr(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wt({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new wt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const l=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(s)this.schema=new Ac(Object.assign(s,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:s,maxAliasCount:l,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},d=ln(this.contents,i??"",f);if(typeof o=="function")for(const{count:p,res:m}of f.anchors.values())o(m,p);return typeof u=="function"?gr(u,{"":d},"",d):d}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return QA(this,e)}}function rr(n){if(He(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Ad extends Error{constructor(e,i,s,l){super(),this.name=e,this.code=s,this.message=l,this.pos=i}}class rs extends Ad{constructor(e,i,s){super("YAMLParseError",e,i,s)}}class Qv extends Ad{constructor(e,i,s){super("YAMLWarning",e,i,s)}}const lc=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:s,col:l}=i.linePos[0];i.message+=` at line ${s}, column ${l}`;let o=l-1,u=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&u.length>80){const f=Math.min(o-39,u.length-79);u="…"+u.substring(f),o-=f-1}if(u.length>80&&(u=u.substring(0,79)+"…"),s>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);f.length>80&&(f=f.substring(0,79)+`…
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=i.linePos[1];d&&d.line===s&&d.col>l&&(f=Math.max(1,Math.min(d.col-l,80-o)));const p=" ".repeat(o)+"^".repeat(f);i.message+=`:

${u}
${p}
`}};function xr(n,{flow:e,indicator:i,next:s,offset:l,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,p=f,m=f,y="",v="",S=!1,E=!1,x=null,T=null,C=null,k=null,$=null,V=null,R=null;for(const q of n)switch(E&&(q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&o(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(p&&q.type!=="comment"&&q.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),q.type){case"space":!e&&(i!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&q.source.includes("	")&&(x=q),m=!0;break;case"comment":{m||o(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const j=q.source.substring(1)||" ";y?y+=v+j:y=j,v="",p=!1;break}case"newline":p?y?y+=q.source:d=!0:v+=q.source,p=!0,S=!0,(T||C)&&(k=q),m=!0;break;case"anchor":T&&o(q,"MULTIPLE_ANCHORS","A node can have at most one anchor"),q.source.endsWith(":")&&o(q.offset+q.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),T=q,R===null&&(R=q.offset),p=!1,m=!1,E=!0;break;case"tag":{C&&o(q,"MULTIPLE_TAGS","A node can have at most one tag"),C=q,R===null&&(R=q.offset),p=!1,m=!1,E=!0;break}case i:(T||C)&&o(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),V&&o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${e??"collection"}`),V=q,p=i==="seq-item-ind"||i==="explicit-key-ind",m=!1;break;case"comma":if(e){$&&o(q,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),$=q,p=!1,m=!1;break}default:o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),p=!1,m=!1}const G=n[n.length-1],Z=G?G.offset+G.source.length:l;return E&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(p&&x.indent<=u||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:$,found:V,spaceBefore:d,comment:y,hasNewline:S,anchor:T,tag:C,newlineAfterProp:k,end:Z,start:R??Z}}function sl(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
`))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(sl(e.key)||sl(e.value))return!0}return!1;default:return!0}}function Lh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&sl(e)&&i(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Zv(n,e,i){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const l=typeof s=="function"?s:(o,u)=>o===u||Re(o)&&Re(u)&&o.value===u.value;return e.some(o=>l(o.key,i))}const vb="All mapping items must start at the same column";function ZA({composeNode:n,composeEmptyNode:e},i,s,l,o){var m;const u=(o==null?void 0:o.nodeClass)??Vt,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let d=s.offset,p=null;for(const y of s.items){const{start:v,key:S,sep:E,value:x}=y,T=xr(v,{indicator:"explicit-key-ind",next:S??(E==null?void 0:E[0]),offset:d,onError:l,parentIndent:s.indent,startOnNewline:!0}),C=!T.found;if(C){if(S&&(S.type==="block-seq"?l(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in S&&S.indent!==s.indent&&l(d,"BAD_INDENT",vb)),!T.anchor&&!T.tag&&!E){p=T.end,T.comment&&(f.comment?f.comment+=`
`+T.comment:f.comment=T.comment);continue}(T.newlineAfterProp||sl(S))&&l(S??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=T.found)==null?void 0:m.indent)!==s.indent&&l(d,"BAD_INDENT",vb);i.atKey=!0;const k=T.end,$=S?n(i,S,T,l):e(i,k,v,null,T,l);i.schema.compat&&Lh(s.indent,S,l),i.atKey=!1,Zv(i,f.items,$)&&l(k,"DUPLICATE_KEY","Map keys must be unique");const V=xr(E??[],{indicator:"map-value-ind",next:x,offset:$.range[2],onError:l,parentIndent:s.indent,startOnNewline:!S||S.type==="block-scalar"});if(d=V.end,V.found){C&&((x==null?void 0:x.type)==="block-map"&&!V.hasNewline&&l(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&T.start<V.found.offset-1024&&l($.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const R=x?n(i,x,V,l):e(i,d,E,null,V,l);i.schema.compat&&Lh(s.indent,x,l),d=R.range[2];const G=new mt($,R);i.options.keepSourceTokens&&(G.srcToken=y),f.items.push(G)}else{C&&l($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),V.comment&&($.comment?$.comment+=`
`+V.comment:$.comment=V.comment);const R=new mt($);i.options.keepSourceTokens&&(R.srcToken=y),f.items.push(R)}}return p&&p<d&&l(p,"IMPOSSIBLE","Map comment with trailing content"),f.range=[s.offset,d,p??d],f}function JA({composeNode:n,composeEmptyNode:e},i,s,l,o){const u=(o==null?void 0:o.nodeClass)??Ni,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=s.offset,p=null;for(const{start:m,value:y}of s.items){const v=xr(m,{indicator:"seq-item-ind",next:y,offset:d,onError:l,parentIndent:s.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?l(v.end,"BAD_INDENT","All sequence items must start at the same column"):l(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(f.comment=v.comment);continue}const S=y?n(i,y,v,l):e(i,v.end,m,null,v,l);i.schema.compat&&Lh(s.indent,y,l),d=S.range[2],f.items.push(S)}return f.range=[s.offset,d,p??d],f}function ul(n,e,i,s){let l="";if(n){let o=!1,u="";for(const f of n){const{source:d,type:p}=f;switch(p){case"space":o=!0;break;case"comment":{i&&!o&&s(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";l?l+=u+m:l=m,u="";break}case"newline":l&&(u+=d),o=!0;break;default:s(f,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:l,offset:e}}const fh="Block collections are not allowed within flow collections",hh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function WA({composeNode:n,composeEmptyNode:e},i,s,l,o){const u=s.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?Vt:Ni),p=new d(i.schema);p.flow=!0;const m=i.atRoot;m&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let y=s.offset+s.start.source.length;for(let T=0;T<s.items.length;++T){const C=s.items[T],{start:k,key:$,sep:V,value:R}=C,G=xr(k,{flow:f,indicator:"explicit-key-ind",next:$??(V==null?void 0:V[0]),offset:y,onError:l,parentIndent:s.indent,startOnNewline:!1});if(!G.found){if(!G.anchor&&!G.tag&&!V&&!R){T===0&&G.comma?l(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):T<s.items.length-1&&l(G.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),G.comment&&(p.comment?p.comment+=`
`+G.comment:p.comment=G.comment),y=G.end;continue}!u&&i.options.strict&&sl($)&&l($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(T===0)G.comma&&l(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(G.comma||l(G.start,"MISSING_CHAR",`Missing , between ${f} items`),G.comment){let Z="";e:for(const q of k)switch(q.type){case"comma":case"space":break;case"comment":Z=q.source.substring(1);break e;default:break e}if(Z){let q=p.items[p.items.length-1];Be(q)&&(q=q.value??q.key),q.comment?q.comment+=`
`+Z:q.comment=Z,G.comment=G.comment.substring(Z.length+1)}}if(!u&&!V&&!G.found){const Z=R?n(i,R,G,l):e(i,G.end,V,null,G,l);p.items.push(Z),y=Z.range[2],hh(R)&&l(Z.range,"BLOCK_IN_FLOW",fh)}else{i.atKey=!0;const Z=G.end,q=$?n(i,$,G,l):e(i,Z,k,null,G,l);hh($)&&l(q.range,"BLOCK_IN_FLOW",fh),i.atKey=!1;const j=xr(V??[],{flow:f,indicator:"map-value-ind",next:R,offset:q.range[2],onError:l,parentIndent:s.indent,startOnNewline:!1});if(j.found){if(!u&&!G.found&&i.options.strict){if(V)for(const I of V){if(I===j.found)break;if(I.type==="newline"){l(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}G.start<j.found.offset-1024&&l(j.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else R&&("source"in R&&R.source&&R.source[0]===":"?l(R,"MISSING_CHAR",`Missing space after : in ${f}`):l(j.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const ie=R?n(i,R,j,l):j.found?e(i,j.end,V,null,j,l):null;ie?hh(R)&&l(ie.range,"BLOCK_IN_FLOW",fh):j.comment&&(q.comment?q.comment+=`
`+j.comment:q.comment=j.comment);const le=new mt(q,ie);if(i.options.keepSourceTokens&&(le.srcToken=C),u){const I=p;Zv(i,I.items,q)&&l(Z,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(le)}else{const I=new Vt(i.schema);I.flow=!0,I.items.push(le);const F=(ie??q).range;I.range=[q.range[0],F[1],F[2]],p.items.push(I)}y=ie?ie.range[2]:j.end}}const v=u?"}":"]",[S,...E]=s.end;let x=y;if(S&&S.source===v)x=S.offset+S.source.length;else{const T=f[0].toUpperCase()+f.substring(1),C=m?`${T} must end with a ${v}`:`${T} in block collection must be sufficiently indented and end with a ${v}`;l(y,m?"MISSING_CHAR":"BAD_INDENT",C),S&&S.source.length!==1&&E.unshift(S)}if(E.length>0){const T=ul(E,x,i.options.strict,l);T.comment&&(p.comment?p.comment+=`
`+T.comment:p.comment=T.comment),p.range=[s.offset,x,T.offset]}else p.range=[s.offset,x,x];return p}function dh(n,e,i,s,l,o){const u=i.type==="block-map"?ZA(n,e,i,s,o):i.type==="block-seq"?JA(n,e,i,s,o):WA(n,e,i,s,o),f=u.constructor;return l==="!"||l===f.tagName?(u.tag=f.tagName,u):(l&&(u.tag=l),u)}function eN(n,e,i,s,l){var v;const o=s.tag,u=o?e.directives.tagName(o.source,S=>l(o,"TAG_RESOLVE_FAILED",S)):null;if(i.type==="block-seq"){const{anchor:S,newlineAfterProp:E}=s,x=S&&o?S.offset>o.offset?S:o:S??o;x&&(!E||E.offset<x.offset)&&l(x,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!u||u==="!"||u===Vt.tagName&&f==="map"||u===Ni.tagName&&f==="seq")return dh(n,e,i,l,u);let d=e.schema.tags.find(S=>S.tag===u&&S.collection===f);if(!d){const S=e.schema.knownTags[u];if(S&&S.collection===f)e.schema.tags.push(Object.assign({},S,{default:!1})),d=S;else return S!=null&&S.collection?l(o,"BAD_COLLECTION_TYPE",`${S.tag} used for ${f} collection, but expects ${S.collection}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),dh(n,e,i,l,u)}const p=dh(n,e,i,l,u,d),m=((v=d.resolve)==null?void 0:v.call(d,p,S=>l(o,"TAG_RESOLVE_FAILED",S),e.options))??p,y=qe(m)?m:new he(m);return y.range=p.range,y.tag=u,d!=null&&d.format&&(y.format=d.format),y}function Jv(n,e,i){const s=e.offset,l=tN(e,n.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[s,s,s]};const o=l.mode===">"?he.BLOCK_FOLDED:he.BLOCK_LITERAL,u=e.source?nN(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const T=u[x][1];if(T===""||T==="\r")f=x;else break}if(f===0){const x=l.chomp==="+"&&u.length>0?`
`.repeat(Math.max(1,u.length-1)):"";let T=s+l.length;return e.source&&(T+=e.source.length),{value:x,type:o,comment:l.comment,range:[s,T,T]}}let d=e.indent+l.indent,p=e.offset+l.length,m=0;for(let x=0;x<f;++x){const[T,C]=u[x];if(C===""||C==="\r")l.indent===0&&T.length>d&&(d=T.length);else{T.length<d&&i(p+T.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(d=T.length),m=x,d===0&&!n.atRoot&&i(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=T.length+C.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>d&&(f=x+1);let y="",v="",S=!1;for(let x=0;x<m;++x)y+=u[x][0].slice(d)+`
`;for(let x=m;x<f;++x){let[T,C]=u[x];p+=T.length+C.length+1;const k=C[C.length-1]==="\r";if(k&&(C=C.slice(0,-1)),C&&T.length<d){const V=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(p-C.length-(k?2:1),"BAD_INDENT",V),T=""}o===he.BLOCK_LITERAL?(y+=v+T.slice(d)+C,v=`
`):T.length>d||C[0]==="	"?(v===" "?v=`
`:!S&&v===`
`&&(v=`

`),y+=v+T.slice(d)+C,v=`
`,S=!0):C===""?v===`
`?y+=`
`:v=`
`:(y+=v+C,v=" ",S=!1)}switch(l.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)y+=`
`+u[x][0].slice(d);y[y.length-1]!==`
`&&(y+=`
`);break;default:y+=`
`}const E=s+l.length+e.source.length;return{value:y,type:o,comment:l.comment,range:[s,E,E]}}function tN({offset:n,props:e},i,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=e[0],o=l[0];let u=0,f="",d=-1;for(let v=1;v<l.length;++v){const S=l[v];if(!f&&(S==="-"||S==="+"))f=S;else{const E=Number(S);!u&&E?u=E:d===-1&&(d=n+v)}}d!==-1&&s(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let p=!1,m="",y=l.length;for(let v=1;v<e.length;++v){const S=e[v];switch(S.type){case"space":p=!0;case"newline":y+=S.source.length;break;case"comment":i&&!p&&s(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=S.source.length,m=S.source.substring(1);break;case"error":s(S,"UNEXPECTED_TOKEN",S.message),y+=S.source.length;break;default:{const E=`Unexpected token in block scalar header: ${S.type}`;s(S,"UNEXPECTED_TOKEN",E);const x=S.source;x&&typeof x=="string"&&(y+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:m,length:y}}function nN(n){const e=n.split(/\n( *)/),i=e[0],s=i.match(/^( *)/),o=[s!=null&&s[1]?[s[1],i.slice(s[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function Wv(n,e,i){const{offset:s,type:l,source:o,end:u}=n;let f,d;const p=(v,S,E)=>i(s+v,S,E);switch(l){case"scalar":f=he.PLAIN,d=iN(o,p);break;case"single-quoted-scalar":f=he.QUOTE_SINGLE,d=sN(o,p);break;case"double-quoted-scalar":f=he.QUOTE_DOUBLE,d=rN(o,p);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const m=s+o.length,y=ul(u,m,e,i);return{value:d,type:f,comment:y.comment,range:[s,m,y.offset]}}function iN(n,e){let i="";switch(n[0]){case"	":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${n[0]}`;break}case"@":case"`":{i=`reserved character ${n[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),eS(n)}function sN(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),eS(n.slice(1,-1)).replace(/''/g,"'")}function eS(n){let e,i;try{e=new RegExp(`(.*?)(?<![ 	])[ 	]*\r?
`,"sy"),i=new RegExp(`[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let l=s[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;s=i.exec(n);)s[1]===""?o===`
`?l+=o:o=`
`:(l+=o+s[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,s=f.exec(n),l+o+((s==null?void 0:s[1])??"")}function rN(n,e){let i="";for(let s=1;s<n.length-1;++s){const l=n[s];if(!(l==="\r"&&n[s+1]===`
`))if(l===`
`){const{fold:o,offset:u}=aN(n,s);i+=o,s=u}else if(l==="\\"){let o=n[++s];const u=lN[o];if(u)i+=u;else if(o===`
`)for(o=n[s+1];o===" "||o==="	";)o=n[++s+1];else if(o==="\r"&&n[s+1]===`
`)for(o=n[++s+1];o===" "||o==="	";)o=n[++s+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=oN(n,s+1,f,e),s+=f}else{const f=n.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(l===" "||l==="	"){const o=s;let u=n[s+1];for(;u===" "||u==="	";)u=n[++s+1];u!==`
`&&!(u==="\r"&&n[s+2]===`
`)&&(i+=s>o?n.slice(o,s+1):l)}else i+=l}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function aN(n,e){let i="",s=n[e+1];for(;(s===" "||s==="	"||s===`
`||s==="\r")&&!(s==="\r"&&n[e+2]!==`
`);)s===`
`&&(i+=`
`),e+=1,s=n[e+1];return i||(i=" "),{fold:i,offset:e}}const lN={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"	",v:"\v",N:"",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function oN(n,e,i,s){const l=n.substr(e,i),u=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(u)){const f=n.substr(e-2,i+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function tS(n,e,i,s){const{value:l,type:o,comment:u,range:f}=e.type==="block-scalar"?Jv(n,e,s):Wv(e,n.options.strict,s),d=i?n.directives.tagName(i.source,y=>s(i,"TAG_RESOLVE_FAILED",y)):null;let p;n.options.stringKeys&&n.atKey?p=n.schema[Tn]:d?p=cN(n.schema,l,d,i,s):e.type==="scalar"?p=uN(n,l,e,s):p=n.schema[Tn];let m;try{const y=p.resolve(l,v=>s(i??e,"TAG_RESOLVE_FAILED",v),n.options);m=Re(y)?y:new he(y)}catch(y){const v=y instanceof Error?y.message:String(y);s(i??e,"TAG_RESOLVE_FAILED",v),m=new he(l)}return m.range=f,m.source=l,o&&(m.type=o),d&&(m.tag=d),p.format&&(m.format=p.format),u&&(m.comment=u),m}function cN(n,e,i,s,l){var f;if(i==="!")return n[Tn];const o=[];for(const d of n.tags)if(!d.collection&&d.tag===i)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(e))return d;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(l(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[Tn])}function uN({atKey:n,directives:e,schema:i},s,l,o){const u=i.tags.find(f=>{var d;return(f.default===!0||n&&f.default==="key")&&((d=f.test)==null?void 0:d.test(s))})||i[Tn];if(i.compat){const f=i.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(s))})??i[Tn];if(u.tag!==f.tag){const d=e.tagString(u.tag),p=e.tagString(f.tag),m=`Value may be parsed as either ${d} or ${p}`;o(l,"TAG_RESOLVE_FAILED",m,!0)}}return u}function fN(n,e,i){if(e){i===null&&(i=e.length);for(let s=i-1;s>=0;--s){let l=e[s];switch(l.type){case"space":case"comment":case"newline":n-=l.source.length;continue}for(l=e[++s];(l==null?void 0:l.type)==="space";)n+=l.source.length,l=e[++s];break}}return n}const hN={composeNode:nS,composeEmptyNode:Nd};function nS(n,e,i,s){const l=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let p,m=!0;switch(e.type){case"alias":p=dN(n,e,s),(f||d)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=tS(n,e,d,s),f&&(p.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=eN(hN,n,e,i,s),f&&(p.anchor=f.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",y),p=Nd(n,e.offset,void 0,null,i,s),m=!1}}return f&&p.anchor===""&&s(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&n.options.stringKeys&&(!Re(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&s(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(p.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?p.comment=u:p.commentBefore=u),n.options.keepSourceTokens&&m&&(p.srcToken=e),p}function Nd(n,e,i,s,{spaceBefore:l,comment:o,anchor:u,tag:f,end:d},p){const m={type:"scalar",offset:fN(e,i,s),indent:-1,source:""},y=tS(n,m,f,p);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(y.spaceBefore=!0),o&&(y.comment=o,y.range[2]=d),y}function dN({options:n},{offset:e,source:i,end:s},l){const o=new yc(i.substring(1));o.source===""&&l(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&l(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=ul(s,u,n.strict,l);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function pN(n,e,{offset:i,start:s,value:l,end:o},u){const f=Object.assign({_directives:e},n),d=new Rr(void 0,f),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=xr(s,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=l?nS(p,l,m,u):Nd(p,m.end,s,null,m,u);const y=d.contents.range[2],v=ul(o,y,!1,u);return v.comment&&(d.comment=v.comment),d.range=[i,y,v.offset],d}function Ua(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:i}=n;return[e,e+(typeof i=="string"?i.length:1)]}function Sb(n){var l;let e="",i=!1,s=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":s?`

`:`
`)+(u.substring(1)||" "),i=!0,s=!1;break;case"%":((l=n[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(s=!0),i=!1}}return{comment:e,afterEmptyLine:s}}class Cd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,s,l,o)=>{const u=Ua(i);o?this.warnings.push(new Qv(u,s,l)):this.errors.push(new rs(u,s,l))},this.directives=new wt({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:s,afterEmptyLine:l}=Sb(this.prelude);if(s){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
${s}`:s;else if(l||e.directives.docStart||!o)e.commentBefore=s;else if(He(o)&&!o.flow&&o.items.length>0){let u=o.items[0];Be(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${s}
${f}`:s}else{const u=o.commentBefore;o.commentBefore=u?`${s}
${u}`:s}}i?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Sb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,s=-1){for(const l of e)yield*this.next(l);yield*this.end(i,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,s,l)=>{const o=Ua(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",s,l)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=pN(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new rs(Ua(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new rs(Ua(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const i=ul(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new rs(Ua(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),l=new Rr(void 0,s);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function gN(n,e=!0,i){if(n){const s=(l,o,u)=>{const f=typeof l=="number"?l:Array.isArray(l)?l[0]:l.offset;if(i)i(f,o,u);else throw new rs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Wv(n,e,s);case"block-scalar":return Jv({options:{strict:e}},n,s)}}return null}function mN(n,e){const{implicitKey:i=!1,indent:s,inFlow:l=!1,offset:o=-1,type:u="PLAIN"}=e,f=ol({type:u,value:n},{implicitKey:i,indent:s>0?" ".repeat(s):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:s,source:`
`}];switch(f[0]){case"|":case">":{const p=f.indexOf(`
`),m=f.substring(0,p),y=f.substring(p+1)+`
`,v=[{type:"block-scalar-header",offset:o,indent:s,source:m}];return iS(v,d)||v.push({type:"newline",offset:-1,indent:s,source:`
`}),{type:"block-scalar",offset:o,indent:s,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:f,end:d};default:return{type:"scalar",offset:o,indent:s,source:f,end:d}}}function yN(n,e,i={}){let{afterKey:s=!1,implicitKey:l=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(s&&typeof f=="number"&&(f+=2),!u)switch(n.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const p=n.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const d=ol({type:u,value:e},{implicitKey:l||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":bN(n,d);break;case'"':ph(n,d,"double-quoted-scalar");break;case"'":ph(n,d,"single-quoted-scalar");break;default:ph(n,d,"scalar")}}function bN(n,e){const i=e.indexOf(`
`),s=e.substring(0,i),l=e.substring(i+1)+`
`;if(n.type==="block-scalar"){const o=n.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=s,n.source=l}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:s}];iS(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
`});for(const d of Object.keys(n))d!=="type"&&d!=="offset"&&delete n[d];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:l})}}function iS(n,e){if(e)for(const i of e)switch(i.type){case"space":case"comment":n.push(i);break;case"newline":return n.push(i),!0}return!1}function ph(n,e,i){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=i,n.source=e;break;case"block-scalar":{const s=n.props.slice(1);let l=e.length;n.props[0].type==="block-scalar-header"&&(l-=n.props[0].source.length);for(const o of s)o.offset+=l;delete n.props,Object.assign(n,{type:i,source:e,end:s});break}case"block-map":case"block-seq":{const l={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
`};delete n.items,Object.assign(n,{type:i,source:e,end:[l]});break}default:{const s="indent"in n?n.indent:-1,l="end"in n&&Array.isArray(n.end)?n.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(n))o!=="type"&&o!=="offset"&&delete n[o];Object.assign(n,{type:i,indent:s,source:e,end:l})}}}const vN=n=>"type"in n?oc(n):Xo(n);function oc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=oc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=Xo(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=Xo(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=Xo(n);if(n.end)for(const i of n.end)e+=i.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const i of n.end)e+=i.source;return e}}}function Xo({start:n,key:e,sep:i,value:s}){let l="";for(const o of n)l+=o.source;if(e&&(l+=oc(e)),i)for(const o of i)l+=o.source;return s&&(l+=oc(s)),l}const Dh=Symbol("break visit"),SN=Symbol("skip children"),sS=Symbol("remove item");function os(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),rS(Object.freeze([]),n,e)}os.BREAK=Dh;os.SKIP=SN;os.REMOVE=sS;os.itemAtPath=(n,e)=>{let i=n;for(const[s,l]of e){const o=i==null?void 0:i[s];if(o&&"items"in o)i=o.items[l];else return}return i};os.parentCollection=(n,e)=>{const i=os.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],l=i==null?void 0:i[s];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function rS(n,e,i){let s=i(e,n);if(typeof s=="symbol")return s;for(const l of["key","value"]){const o=e[l];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=rS(Object.freeze(n.concat([[l,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Dh)return Dh;f===sS&&(o.items.splice(u,1),u-=1)}}typeof s=="function"&&l==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}const Nc="\uFEFF",Cc="",kc="",rl="",wN=n=>!!n&&"items"in n,xN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function _N(n){switch(n){case Nc:return"<BOM>";case Cc:return"<DOC>";case kc:return"<FLOW_END>";case rl:return"<SCALAR>";default:return JSON.stringify(n)}}function aS(n){switch(n){case Nc:return"byte-order-mark";case Cc:return"doc-mode";case kc:return"flow-error-end";case rl:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case"	":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const TN=Object.freeze(Object.defineProperty({__proto__:null,BOM:Nc,DOCUMENT:Cc,FLOW_END:kc,SCALAR:rl,createScalarToken:mN,isCollection:wN,isScalar:xN,prettyToken:_N,resolveAsScalar:gN,setScalarValue:yN,stringify:vN,tokenType:aS,visit:os},Symbol.toStringTag,{value:"Module"}));function pn(n){switch(n){case void 0:case" ":case`
`:case"\r":case"	":return!0;default:return!1}}const wb=new Set("0123456789ABCDEFabcdef"),EN=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),jo=new Set(",[]{}"),AN=new Set(` ,[]{}
\r	`),gh=n=>!n||AN.has(n);class lS{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,i=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!i;let s=this.next??"stream";for(;s&&(i||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i==="	";)i=this.buffer[++e];return!i||i==="#"||i===`
`?!0:i==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let s=0;for(;i===" ";)i=this.buffer[++s+e];if(i==="\r"){const l=this.buffer[s+e+1];if(l===`
`||!l&&!this.atEnd)return e+s+1}return i===`
`||s>=this.indentNext||!i&&!this.atEnd?e+s:-1}if(i==="-"||i==="."){const s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&pn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Nc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,s=e.indexOf("#");for(;s!==-1;){const o=e[s-1];if(o===" "||o==="	"){i=s-1;break}else s=e.indexOf("#",s+1)}for(;;){const o=e[i-1];if(o===" "||o==="	")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-l),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield Cc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const i=this.peek(3);if((i==="---"||i==="...")&&pn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!pn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&pn(i)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(gh),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,s=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=s=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&l[0]!=="#"||s===0&&(l.startsWith("---")||l.startsWith("..."))&&pn(l[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield kc,yield*this.parseLineStart();let o=0;for(;l[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),l[o]){case void 0:return"flow";case"#":return yield*this.pushCount(l.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(gh),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||pn(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let i=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const s=this.buffer.substring(0,i);let l=s.indexOf(`
`,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=s.indexOf(`
`,o)}l!==-1&&(i=l-(s[l-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>pn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,s;e:for(let o=this.pos;s=this.buffer[o];++o)switch(s){case" ":i+=1;break;case`
`:e=o,i=0;break;case"\r":{const u=this.buffer[o+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let l=e+1;for(s=this.buffer[l];s===" ";)s=this.buffer[++l];if(s==="	"){for(;s==="	"||s===" "||s==="\r"||s===`
`;)s=this.buffer[++l];e=l-1}else if(!this.blockScalarKeep)do{let o=e-1,u=this.buffer[o];u==="\r"&&(u=this.buffer[--o]);const f=o;for(;u===" ";)u=this.buffer[--o];if(u===`
`&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield rl,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,s=this.pos-1,l;for(;l=this.buffer[++s];)if(l===":"){const o=this.buffer[s+1];if(pn(o)||e&&jo.has(o))break;i=s}else if(pn(l)){let o=this.buffer[s+1];if(l==="\r"&&(o===`
`?(s+=1,l=`
`,o=this.buffer[s+1]):i=s),o==="#"||e&&jo.has(o))break;if(l===`
`){const u=this.continueScalar(s+1);if(u===-1)break;s=Math.max(s,u-2)}}else{if(e&&jo.has(l))break;i=s}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield rl,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(gh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(pn(i)||e&&jo.has(i))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,i=this.buffer[e];for(;!pn(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(EN.has(i))i=this.buffer[++e];else if(i==="%"&&wb.has(this.buffer[e+1])&&wb.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,s;do s=this.buffer[++i];while(s===" "||e&&s==="	");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(e){let i=this.pos,s=this.buffer[i];for(;!e(s);)s=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class oS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,s=this.lineStarts.length;for(;i<s;){const o=i+s>>1;this.lineStarts[o]<e?i=o+1:s=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const l=this.lineStarts[i-1];return{line:i,col:e-l+1}}}}function ns(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function xb(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function cS(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Lo(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function ar(n){var i;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=n[++e])==null?void 0:i.type)==="space";);return n.splice(e,n.length)}function _b(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!ns(e.start,"explicit-key-ind")&&!ns(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,cS(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class kd{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new lS,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,i))yield*this.next(s);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=aS(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const s=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in s?s.indent:0:i.type==="flow-collection"&&s.type==="document"&&(i.indent=0),i.type==="flow-collection"&&_b(i),s.type){case"document":s.value=i;break;case"block-scalar":s.props.push(i);break;case"block-map":{const l=s.items[s.items.length-1];if(l.value){s.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=s.items[s.items.length-1];l.value?s.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=s.items[s.items.length-1];!l||l.value?s.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&xb(l.start)===-1&&(i.indent===0||l.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(s.type==="document"?s.end=l.start:s.items.push({start:l.start}),i.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{xb(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const i=this.startBlockValue(e);i?this.stack.push(i):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const i=Lo(this.peek(2)),s=ar(i);let l;e.end?(l=e.end,l.push(this.sourceToken),delete e.end):l=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let i=this.source.indexOf(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const l=e.items[e.items.length-2],o=(s=l==null?void 0:l.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const l=!this.onKeyLine&&this.indent===e.indent,o=l&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const p=i.sep[d];switch(p.type){case"newline":f.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(u=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(u.push(this.sourceToken),e.items.push({start:u,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ns(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(cS(i.key)&&!ns(i.sep,"newline")){const f=ar(i.start),d=i.key,p=i.sep;p.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:p}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(ns(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=ar(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:u,key:null,sep:[this.sourceToken]}):ns(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||i.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){l&&f.type!=="block-seq"&&e.items.push({start:u}),this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const l=e.items[e.items.length-2],o=(s=l==null?void 0:l.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;i.value||ns(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const l=this.startBlockValue(e);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?e.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:l,sep:[]}):i.sep?this.stack.push(l):Object.assign(i,{key:l,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const l=Lo(s),o=ar(l);_b(e);const u=e.end.splice(1,e.end.length);u.push(this.sourceToken);const f={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=Lo(e),s=ar(i);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Lo(e),s=ar(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function uS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new oS||null,prettyErrors:e}}function NN(n,e={}){const{lineCounter:i,prettyErrors:s}=uS(e),l=new kd(i==null?void 0:i.addNewLine),o=new Cd(e),u=Array.from(o.compose(l.parse(n)));if(s&&i)for(const f of u)f.errors.forEach(lc(n,i)),f.warnings.forEach(lc(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function fS(n,e={}){const{lineCounter:i,prettyErrors:s}=uS(e),l=new kd(i==null?void 0:i.addNewLine),o=new Cd(e);let u=null;for(const f of o.compose(l.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new rs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&i&&(u.errors.forEach(lc(n,i)),u.warnings.forEach(lc(n,i))),u}function CN(n,e,i){let s;typeof e=="function"?s=e:i===void 0&&e&&typeof e=="object"&&(i=e);const l=fS(n,i);if(!l)return null;if(l.warnings.forEach(o=>Ov(l.options.logLevel,o)),l.errors.length>0){if(l.options.logLevel!=="silent")throw l.errors[0];l.errors=[]}return l.toJS(Object.assign({reviver:s},i))}function kN(n,e,i){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const l=Math.round(i);i=l<1?void 0:l>8?{indent:8}:{indent:l}}if(n===void 0){const{keepUndefined:l}=i??e??{};if(!l)return}return hs(n)&&!s?n.toString(i):new Rr(n,s,i).toString(i)}const hS=Object.freeze(Object.defineProperty({__proto__:null,Alias:yc,CST:TN,Composer:Cd,Document:Rr,Lexer:lS,LineCounter:oS,Pair:mt,Parser:kd,Scalar:he,Schema:Ac,YAMLError:Ad,YAMLMap:Vt,YAMLParseError:rs,YAMLSeq:Ni,YAMLWarning:Qv,isAlias:fs,isCollection:He,isDocument:hs,isMap:Cr,isNode:qe,isPair:Be,isScalar:Re,isSeq:kr,parse:CN,parseAllDocuments:NN,parseDocument:fS,stringify:kN,visit:Ai,visitAsync:mc},Symbol.toStringTag,{value:"Module"})),MN=({action:n,model:e,sdkLanguage:i,testIdAttributeName:s,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[d,p]=H.useState("action"),[m]=rn("shouldPopulateCanvasFromScreenshot",!1),y=H.useMemo(()=>LN(n),[n]),{snapshotInfoUrl:v,snapshotUrl:S,popoutUrl:E}=H.useMemo(()=>{const T=y[d];return e&&T?DN(e.traceUrl,T,m):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[y,d,m,e]),x=H.useMemo(()=>v!==void 0?{snapshotInfoUrl:v,snapshotUrl:S,popoutUrl:E}:void 0,[v,S,E]);return b.jsxs("div",{className:"snapshot-tab vbox",children:[b.jsxs(Gh,{children:[b.jsx(Dt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:l,onClick:()=>o(!l)}),b.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(T=>b.jsx(p0,{id:T,title:jN(T),selected:d===T,onSelect:()=>p(T)},T))}),b.jsx("div",{style:{flex:"auto"}}),b.jsx(Dt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(x!=null&&x.popoutUrl),onClick:()=>{const T=window.open((x==null?void 0:x.popoutUrl)||"","_blank");T==null||T.addEventListener("DOMContentLoaded",()=>{new pv(T,{isUnderTest:pS,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),b.jsx(ON,{snapshotUrls:x,sdkLanguage:i,testIdAttributeName:s,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},ON=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:l,highlightedElement:o,setHighlightedElement:u})=>{const f=H.useRef(null),d=H.useRef(null),[p,m]=H.useState({viewport:gS,url:""}),y=H.useRef({iteration:0,visibleIframe:0});return H.useEffect(()=>{(async()=>{const v=y.current.iteration+1,S=1-y.current.visibleIframe;y.current.iteration=v;const E=await BN(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==v)return;const x=[f,d][S].current;if(x){let T=()=>{};const C=new Promise(k=>T=k);try{x.addEventListener("load",T),x.addEventListener("error",T);const k=(n==null?void 0:n.snapshotUrl)||UN;x.contentWindow?x.contentWindow.location.replace(k):x.src=k,await C}catch{}finally{x.removeEventListener("load",T),x.removeEventListener("error",T)}}y.current.iteration===v&&(y.current.visibleIframe=S,m(E))})()},[n]),b.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&s&&l(!1)},children:[b.jsx(Tb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),b.jsx(Tb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),b.jsx(RN,{snapshotInfo:p,children:b.jsxs("div",{className:"snapshot-switcher",children:[b.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Ye(y.current.visibleIframe===0&&"snapshot-visible")}),b.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ye(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},RN=({snapshotInfo:n,children:e})=>{const[i,s]=cs(),l=40,o={width:n.viewport.width,height:n.viewport.height},u={width:Math.max(o.width,480),height:Math.max(o.height+l,320)},f=Math.min(i.width/u.width,i.height/u.height,1),d={x:(i.width-u.width)/2,y:(i.height-u.height)/2};return b.jsx("div",{ref:s,className:"snapshot-wrapper",children:b.jsxs("div",{className:"snapshot-container",style:{width:u.width+"px",height:u.height+"px",transform:`translate(${d.x}px, ${d.y}px) scale(${f})`},children:[b.jsx(SA,{url:n.url}),b.jsx("div",{className:"snapshot-browser-body",children:b.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function jN(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const Tb=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:s,highlightedElement:l,setHighlightedElement:o,iteration:u})=>(H.useEffect(()=>{const f=l.lastEdited==="ariaSnapshot"?l.ariaSnapshot:void 0,d=l.lastEdited==="locator"?l.locator:void 0,p=!!f||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{dS(m,p,i,s,y,"",n==null?void 0:n.contentWindow)}catch{}const v=f?Kh(hS,f):void 0,S=d?bA(i,d,s):void 0;for(const{recorder:E,frameSelector:x}of m){const T=S!=null&&S.startsWith(x)?S.substring(x.length).trim():void 0,C=(v==null?void 0:v.errors.length)===0?v.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:T,ariaTemplate:C,language:i,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(k){o({locator:ls(i,x+k.selector),ariaSnapshot:k.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const k of m)k.recorder!==E&&k.recorder.clearHighlight()}})}},[n,e,l,o,i,s,u]),b.jsx(b.Fragment,{}));function dS(n,e,i,s,l,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new pv(u,{isUnderTest:l,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new hA(d);f._injectedScript=d,f._recorder={recorder:p,frameSelector:o},l&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}f._recorder&&n.push(f._recorder);for(let d=0;d<u.frames.length;++d){const p=u.frames[d],m=p.frameElement?f._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:s})+" >> internal:control=enter-frame >> ":"";dS(n,e,i,s,l,o+m,p)}}const za=(n,e,i=!1)=>{if(!n)return;const s=n[e];if(s){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:s,pageId:n.pageId,point:n.point,hasInputTarget:i}}};function LN(n){if(!n)return{};let e=za(n,"beforeSnapshot");if(!e){for(let l=Oy(n);l;l=Oy(l))if(l.endTime<=n.startTime&&l.afterSnapshot){e=za(l,"afterSnapshot");break}}let i=za(n,"afterSnapshot");if(!i){let l;for(let o=Ry(n);o&&o.startTime<=n.endTime;o=Ry(o))o.endTime>n.endTime||!o.afterSnapshot||l&&l.endTime>o.endTime||(l=o);l?i=za(l,"afterSnapshot"):i=e}const s=za(n,"inputSnapshot",!0)??i;return s&&(s.point=n.point),{action:s,before:e,after:i}}const pS=new URLSearchParams(window.location.search).has("isUnderTest");function DN(n,e,i){const s=new URLSearchParams;s.set("trace",n),s.set("name",e.snapshotName),pS&&s.set("isUnderTest","true"),e.point&&(s.set("pointX",String(e.point.x)),s.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1")),i&&s.set("shouldPopulateCanvasFromScreenshot","1");const l=new URL(`snapshot/${e.pageId}?${s.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${s.toString()}`,window.location.href).toString(),u=new URLSearchParams;u.set("r",l),u.set("trace",n);const f=new URL(`snapshot.html?${u.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:l,popoutUrl:f}}async function BN(n){const e={url:"",viewport:gS,timestamp:void 0,wallTime:void 0};if(n){const s=await(await fetch(n)).json();s.error||(e.url=s.url,e.viewport=s.viewport,e.timestamp=s.timestamp,e.wallTime=s.wallTime)}return e}const gS={width:1280,height:720},UN='data:text/html,<body style="background: #ddd"></body>',mS={width:200,height:45},ur=2.5,zN=mS.height+ur*2,HN=({boundaries:n,previewPoint:e})=>{var m,y;const i=Ci(),[s,l]=cs(),o=H.useRef(null);let u=0;if(o.current&&e){const v=o.current.getBoundingClientRect();u=(e.clientY-v.top+o.current.scrollTop)/zN|0}const f=(y=(m=i==null?void 0:i.pages)==null?void 0:m[u])==null?void 0:y.screencastFrames;let d,p;if(e!==void 0&&f&&f.length){const v=n.minimum+(n.maximum-n.minimum)*e.x/s.width;d=f[Ab(f,v,yS)-1];const S={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?bS({width:d.width,height:d.height},S):void 0}return b.jsxs("div",{className:"film-strip",ref:l,children:[b.jsx("div",{className:"film-strip-lanes",ref:o,children:i==null?void 0:i.pages.map((v,S)=>v.screencastFrames.length?b.jsx(qN,{boundaries:n,page:v,width:s.width},S):null)}),i&&(e==null?void 0:e.x)!==void 0&&b.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(e.x,s.width-(p?p.width:0)-10)},children:[e.action&&b.jsx("div",{className:"film-strip-hover-title",children:Ih(e.action,e)}),d&&p&&b.jsx("div",{style:{width:p.width,height:p.height},children:b.jsx("img",{src:i.createRelativeUrl(`sha1/${d.sha1}`),width:p.width,height:p.height})})]})]})},qN=({boundaries:n,page:e,width:i})=>{const s=Ci(),l={width:0,height:0},o=e.screencastFrames;for(const T of o)l.width=Math.max(l.width,T.width),l.height=Math.max(l.height,T.height);const u=bS(l,mS),f=o[0].timestamp,d=o[o.length-1].timestamp,p=n.maximum-n.minimum,m=(f-n.minimum)/p*i,y=(n.maximum-d)/p*i,S=(d-f)/p*i/(u.width+2*ur)|0,E=(d-f)/S,x=[];for(let T=0;f&&E&&T<S;++T){const C=f+E*T,k=Ab(o,C,yS)-1;x.push(b.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[k].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:ur,marginRight:ur}},T))}return x.push(b.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:ur,marginRight:ur}},x.length)),b.jsx("div",{className:"film-strip-lane",style:{marginLeft:m+"px",marginRight:y+"px"},children:x})};function yS(n,e){return n-e.timestamp}function bS(n,e){const i=Math.max(n.width/e.width,n.height/e.height);return{width:n.width/i|0,height:n.height/i|0}}const $N=({model:n,boundaries:e,consoleEntries:i,networkResources:s,onSelected:l,highlightedAction:o,highlightedResourceOrdinal:u,highlightedConsoleEntryOrdinal:f,selectedTime:d,setSelectedTime:p,sdkLanguage:m})=>{const[y,v]=cs(),[S,E]=H.useState(),[x,T]=H.useState(),[C]=rn("actionsFilter",[]),{offsets:k,curtainLeft:$,curtainRight:V}=H.useMemo(()=>{let F=d||e;if(S&&S.startX!==S.endX){const Q=xn(y.width,e,S.startX),se=xn(y.width,e,S.endX);F={minimum:Math.min(Q,se),maximum:Math.max(Q,se)}}const ee=nn(y.width,e,F.minimum),z=nn(y.width,e,e.maximum)-nn(y.width,e,F.maximum);return{offsets:IN(y.width,e),curtainLeft:ee,curtainRight:z}},[d,e,S,y]),R=H.useMemo(()=>n==null?void 0:n.filteredActions(C),[n,C]),G=H.useMemo(()=>{const F=[];for(const ee of R||[])F.push({action:ee,leftTime:ee.startTime,rightTime:ee.endTime||e.maximum,leftPosition:nn(y.width,e,ee.startTime),rightPosition:nn(y.width,e,ee.endTime||e.maximum),active:!1,error:!!ee.error});for(const ee of(n==null?void 0:n.resources)||[]){const ve=ee._monotonicTime,z=ee._monotonicTime+ee.time;F.push({resource:ee,leftTime:ve,rightTime:z,leftPosition:nn(y.width,e,ve),rightPosition:nn(y.width,e,z),active:!1,error:!1})}for(const ee of i||[])F.push({consoleMessage:ee,leftTime:ee.timestamp,rightTime:ee.timestamp,leftPosition:nn(y.width,e,ee.timestamp),rightPosition:nn(y.width,e,ee.timestamp),active:!1,error:ee.isError});return F},[n,R,i,e,y]);H.useMemo(()=>{for(const F of G)o?F.active=F.action===o:u!==void 0?F.active=F.resource===(s==null?void 0:s[u]):f!==void 0?F.active=F.consoleMessage===(i==null?void 0:i[f]):F.active=!1},[G,o,u,f,i,s]);const Z=H.useCallback(F=>{if(T(void 0),!v.current)return;const ee=F.clientX-v.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=d?nn(y.width,e,d.minimum):0,Q=d?nn(y.width,e,d.maximum):0;d&&Math.abs(ee-z)<10?E({startX:Q,endX:ee,type:"resize"}):d&&Math.abs(ee-Q)<10?E({startX:z,endX:ee,type:"resize"}):d&&ve>d.minimum&&ve<d.maximum&&F.clientY-v.current.getBoundingClientRect().top<20?E({startX:z,endX:Q,pivot:ee,type:"move"}):E({startX:ee,endX:ee,type:"resize"})},[e,y,v,d]),q=H.useCallback(F=>{if(!v.current)return;const ee=F.clientX-v.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=R==null?void 0:R.findLast(N=>N.startTime<=ve);if(!F.buttons){E(void 0);return}if(z&&l(z),!S)return;let Q=S;if(S.type==="resize")Q={...S,endX:ee};else{const N=ee-S.pivot;let P=S.startX+N,W=S.endX+N;P<0&&(P=0,W=P+(S.endX-S.startX)),W>y.width&&(W=y.width,P=W-(S.endX-S.startX)),Q={...S,startX:P,endX:W,pivot:ee}}E(Q);const se=xn(y.width,e,Q.startX),we=xn(y.width,e,Q.endX);se!==we&&p({minimum:Math.min(se,we),maximum:Math.max(se,we)})},[e,S,y,R,l,v,p]),j=H.useCallback(()=>{if(T(void 0),!!S){if(S.startX!==S.endX){const F=xn(y.width,e,S.startX),ee=xn(y.width,e,S.endX);p({minimum:Math.min(F,ee),maximum:Math.max(F,ee)})}else{const F=xn(y.width,e,S.startX),ee=R==null?void 0:R.findLast(ve=>ve.startTime<=F);ee&&l(ee),p(void 0)}E(void 0)}},[e,S,y,R,p,l]),ie=H.useCallback(F=>{if(!v.current)return;const ee=F.clientX-v.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=R==null?void 0:R.findLast(Q=>Q.startTime<=ve);T({x:ee,clientY:F.clientY,action:z,sdkLanguage:m})},[e,y,R,v,m]),le=H.useCallback(()=>{T(void 0)},[]),I=H.useCallback(()=>{p(void 0)},[p]);return b.jsxs("div",{className:"timeline-view-container",children:[!!S&&b.jsx(l0,{cursor:(S==null?void 0:S.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:j,onPaneMouseMove:q,onPaneDoubleClick:I}),b.jsxs("div",{ref:v,className:"timeline-view",onMouseDown:Z,onMouseMove:ie,onMouseLeave:le,children:[b.jsx("div",{className:"timeline-grid",children:k.map((F,ee)=>b.jsx("div",{className:"timeline-divider",style:{left:F.position+"px"},children:b.jsx("div",{className:"timeline-time",children:_t(F.time-e.minimum)})},ee))}),b.jsx("div",{style:{height:8}}),b.jsx(HN,{boundaries:e,previewPoint:x}),b.jsx("div",{className:"timeline-bars",children:G.filter(F=>!F.action||F.action.class!=="Test").map((F,ee)=>b.jsx("div",{className:Ye("timeline-bar",F.action&&"action",F.resource&&"network",F.consoleMessage&&"console-message",F.active&&"active",F.error&&"error"),style:{left:F.leftPosition,width:Math.max(5,F.rightPosition-F.leftPosition),top:VN(F),bottom:0}},ee))}),b.jsx("div",{className:"timeline-marker",style:{display:x!==void 0?"block":"none",left:((x==null?void 0:x.x)||0)+"px"}}),d&&b.jsxs("div",{className:"timeline-window",children:[b.jsx("div",{className:"timeline-window-curtain left",style:{width:$}}),b.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),b.jsx("div",{className:"timeline-window-center",children:b.jsx("div",{className:"timeline-window-drag"})}),b.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),b.jsx("div",{className:"timeline-window-curtain right",style:{width:V}})]})]})]})};function IN(n,e){let s=n/64;const l=e.maximum-e.minimum,o=n/l;let u=l/s;const f=Math.ceil(Math.log(u)/Math.LN10);u=Math.pow(10,f),u*o>=320&&(u=u/5),u*o>=128&&(u=u/2);const d=e.minimum;let p=e.maximum;p+=64/o,s=Math.ceil((p-d)/u),u||(s=0);const m=[];for(let y=0;y<s;++y){const v=d+u*y;m.push({position:nn(n,e,v),time:v})}return m}function nn(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function xn(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}function VN(n){return n.resource?25:20}const GN=({model:n})=>{var i,s;if(!n)return b.jsx(b.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return b.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[b.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&b.jsxs("div",{className:"call-line",children:["start time:",b.jsx("span",{className:"call-value datetime",title:e,children:e})]}),b.jsxs("div",{className:"call-line",children:["duration:",b.jsx("span",{className:"call-value number",title:_t(n.endTime-n.startTime),children:_t(n.endTime-n.startTime)})]}),b.jsx("div",{className:"call-section",children:"Browser"}),b.jsxs("div",{className:"call-line",children:["engine:",b.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&b.jsxs("div",{className:"call-line",children:["channel:",b.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&b.jsxs("div",{className:"call-line",children:["platform:",b.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.playwrightVersion&&b.jsxs("div",{className:"call-line",children:["playwright version:",b.jsx("span",{className:"call-value string",title:n.playwrightVersion,children:n.playwrightVersion})]}),n.options.userAgent&&b.jsxs("div",{className:"call-line",children:["user agent:",b.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),b.jsxs("div",{className:"call-line",children:["baseURL:",b.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL})]})]}),b.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&b.jsxs("div",{className:"call-line",children:["width:",b.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&b.jsxs("div",{className:"call-line",children:["height:",b.jsx("span",{className:"call-value number",title:String(!!((s=n.options.viewport)!=null&&s.height)),children:n.options.viewport.height})]}),b.jsxs("div",{className:"call-line",children:["is mobile:",b.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&b.jsxs("div",{className:"call-line",children:["device scale:",b.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),b.jsx("div",{className:"call-section",children:"Counts"}),b.jsxs("div",{className:"call-line",children:["pages:",b.jsx("span",{className:"call-value number",children:n.pages.length})]}),b.jsxs("div",{className:"call-line",children:["actions:",b.jsx("span",{className:"call-value number",children:n.actions.length})]}),b.jsxs("div",{className:"call-line",children:["events:",b.jsx("span",{className:"call-value number",children:n.events.length})]})]})},KN=({annotations:n})=>n.length?b.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>b.jsxs("div",{className:"annotation-item",children:[b.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&b.jsxs("span",{children:[": ",u0(e.description)]})]},`annotation-${i}`))}):b.jsx(us,{text:"No annotations"}),YN=({sdkLanguage:n,isInspecting:e,setIsInspecting:i,highlightedElement:s,setHighlightedElement:l})=>{const[o,u]=H.useState(),f=H.useCallback(d=>{const{errors:p}=Kh(hS,d,{prettyErrors:!1}),m=p.map(y=>({message:y.message,line:y.range[1].line,column:y.range[1].col,type:"subtle-error"}));u(m),l({...s,ariaSnapshot:d,lastEdited:"ariaSnapshot"}),i(!1)},[s,l,i]);return b.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[b.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[b.jsx("div",{children:"Locator"}),b.jsx(Dt,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>i(!e)}),b.jsx("div",{style:{flex:"auto"}}),b.jsx(Dt,{icon:"files",title:"Copy locator",onClick:()=>{wy(s.locator||"")}})]}),b.jsx("div",{style:{height:50},children:b.jsx(Sr,{text:s.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:d=>{l({...s,locator:d,lastEdited:"locator"}),i(!1)}})}),b.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[b.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),b.jsx(Dt,{icon:"files",title:"Copy snapshot",onClick:()=>{wy(s.ariaSnapshot||"")}})]}),b.jsx("div",{style:{height:150},children:b.jsx(Sr,{text:s.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:f})})]})},XN=({className:n,style:e,open:i,isModal:s,minWidth:l,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:p})=>{const m=H.useRef(null),[y,v]=H.useState(0),[S]=mh(m),[E,x]=mh(f),T=PN(S,E,o);return H.useEffect(()=>{const C=$=>{!m.current||!($.target instanceof Node)||m.current.contains($.target)||u==null||u()},k=$=>{$.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",C),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",k)}):()=>{}},[i,u]),H.useLayoutEffect(()=>x(),[i,x]),H.useEffect(()=>{const C=()=>v(k=>k+1);return window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]),H.useLayoutEffect(()=>{m.current&&(i?s?m.current.showModal():m.current.show():m.current.close())},[i,s]),b.jsx("dialog",{ref:m,style:{position:"fixed",margin:0,zIndex:110,top:T.top,left:T.left,minWidth:l||0,...e},className:n,"data-testid":d,children:p})};function PN(n,e,i=4,s=4){let l=Math.max(s,e.left);l+n.width>window.innerWidth-s&&(l=window.innerWidth-n.width-s);let o=Math.max(0,e.bottom)+i;return o+n.height>window.innerHeight-i&&(Math.max(0,e.top)>n.height+i?o=Math.max(0,e.top)-n.height-i:o=window.innerHeight-i-n.height),{left:l,top:o}}const FN=({title:n,icon:e,buttonChildren:i,anchorRef:s,dialogDataTestId:l,children:o})=>{const u=H.useRef(null),f=s??u,[d,p]=H.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsx(Dt,{ref:u,icon:e,title:n,onClick:()=>p(m=>!m),children:i}),b.jsx(XN,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:d,verticalOffset:8,requestClose:()=>p(!1),anchor:f,dataTestId:l,children:o})]})},vS=({settings:n})=>b.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return b.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:QN(e,i)},e.name)})}),QN=(n,e)=>{switch(n.type){case"check":return b.jsxs(b.Fragment,{children:[b.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),b.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&b.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return b.jsxs(b.Fragment,{children:[b.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&b.jsx("span",{className:"setting-counter",children:n.count})]}),b.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>b.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},l2=n=>{var i;const e=((i=n.model)==null?void 0:i.traceUrl)??"default";return b.jsx(f0.Provider,{value:n.model,children:b.jsx(ZN,{partition:e,...n})})},ZN=n=>{var dl;const{partition:e,model:i,showSourcesFirst:s,rootDir:l,fallbackLocation:o,isLive:u,hideTimeline:f,status:d,annotations:p,inert:m,onOpenExternally:y,revealSource:v,testRunMetadata:S}=n,[E,x]=rn("navigatorTab","actions"),[T,C]=rn("propertiesTab",s?"source":"call"),[k,$]=rn("propertiesSidebarLocation","bottom"),[V]=rn("actionsFilter",[]),[R,G]=xi("selectedCallId"),[Z,q]=xi("selectedTime"),[j,ie]=xi("highlightedCallId"),[le,I]=xi("revealedErrorKey"),[F,ee]=xi("highlightedConsoleMessageOrdinal"),[ve,z]=xi("revealedAttachmentCallId"),[Q,se]=xi("highlightedResourceOrdinal"),[we,N]=xi("treeState",{expandedItems:new Map});H1(e);const[P,W]=H.useState({lastEdited:"none"}),[J,ae]=H.useState(!1),be=H.useCallback(ce=>{G(ce==null?void 0:ce.callId),I(void 0)},[G,I]),te=H.useMemo(()=>i==null?void 0:i.filteredActions(V),[i,V]),yt=((i==null?void 0:i.actions.length)??0)-((te==null?void 0:te.length)??0),Ne=H.useMemo(()=>te==null?void 0:te.find(ce=>ce.callId===j),[te,j]),Gt=H.useCallback(ce=>{ie(ce==null?void 0:ce.callId)},[ie]),jr=H.useMemo(()=>(i==null?void 0:i.sources)||new Map,[i]);H.useEffect(()=>{q(void 0),I(void 0)},[i,q,I]);const En=H.useMemo(()=>{if(R){const Jn=te==null?void 0:te.find(un=>un.callId===R);if(Jn)return Jn}const ce=i==null?void 0:i.failedAction();if(ce)return ce;if(te!=null&&te.length){let Jn=te.length-1;for(let un=0;un<te.length;++un)if(te[un].title==="After Hooks"&&un){Jn=un-1;break}return te[Jn]}},[i,te,R]),cn=H.useMemo(()=>Ne||En,[En,Ne]),ds=H.useCallback(ce=>{be(ce),Gt(void 0)},[be,Gt]),bt=H.useCallback(ce=>{C(ce),ce!=="inspector"&&ae(!1)},[C]),fl=H.useCallback(ce=>{!J&&ce&&bt("inspector"),ae(ce)},[ae,bt,J]),Mc=H.useCallback(ce=>{W(ce),bt("inspector")},[bt]),Kt=H.useCallback(ce=>{bt("attachments"),z({callId:ce})},[bt,z]);H.useEffect(()=>{v&&bt("source")},[v,bt]);const Lr=k_(i,Z),ps=eT(i,Z),Mi=T_(i),gs=H.useMemo(()=>{var ce;return le!==void 0?(ce=Mi.errors.get(le))==null?void 0:ce.stack:cn==null?void 0:cn.stack},[cn,le,Mi]),Qn=(i==null?void 0:i.sdkLanguage)||"javascript",hl={id:"inspector",title:"Locator",render:()=>b.jsx(YN,{sdkLanguage:Qn,isInspecting:J,setIsInspecting:fl,highlightedElement:P,setHighlightedElement:W})},Oc={id:"call",title:"Call",render:()=>b.jsx(Yx,{action:cn,startTimeOffset:(i==null?void 0:i.startTime)??0,sdkLanguage:Qn})},Rc={id:"log",title:"Log",render:()=>b.jsx(Fx,{action:cn,isLive:u})},Oi={id:"errors",title:"Errors",errorCount:Mi.errors.size,render:()=>b.jsx(A_,{errorsModel:Mi,testRunMetadata:S,sdkLanguage:Qn,revealInSource:ce=>{ce.action?be(ce.action):I(ce.message),bt("source")},wallTime:(i==null?void 0:i.wallTime)??0})};let ut;!En&&o&&(ut=(dl=o.source)==null?void 0:dl.errors.length);const Yt={id:"source",title:"Source",errorCount:ut,render:()=>b.jsx(w_,{stack:gs,sources:jr,rootDir:l,stackFrameLocation:k==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:y})},vt={id:"console",title:"Console",count:Lr.entries.length,render:()=>b.jsx(M_,{consoleModel:Lr,boundaries:Zn,selectedTime:Z,onAccepted:ce=>q({minimum:ce.timestamp,maximum:ce.timestamp}),onEntryHovered:ee})},jc={id:"network",title:"Network",count:ps.resources.length,render:()=>b.jsx(tT,{boundaries:Zn,networkModel:ps,onResourceHovered:se,sdkLanguage:(i==null?void 0:i.sdkLanguage)??"javascript"})},Lc={id:"attachments",title:"Attachments",count:i==null?void 0:i.visibleAttachments.length,render:()=>b.jsx(d_,{revealedAttachmentCallId:ve})},Ri=[hl,Oc,Rc,Oi,vt,jc,Yt,Lc];if(p!==void 0){const ce={id:"annotations",title:"Annotations",count:p.length,render:()=>b.jsx(KN,{annotations:p})};Ri.push(ce)}if(s){const ce=Ri.indexOf(Yt);Ri.splice(ce,1),Ri.splice(1,0,Yt)}const{boundaries:Zn}=H.useMemo(()=>{const ce={minimum:(i==null?void 0:i.startTime)||0,maximum:(i==null?void 0:i.endTime)||3e4};return ce.minimum>ce.maximum&&(ce.minimum=0,ce.maximum=3e4),ce.maximum+=(ce.maximum-ce.minimum)/20,{boundaries:ce}},[i]);let An=0;!u&&i&&i.endTime>=0?An=i.endTime-i.startTime:i&&i.wallTime&&(An=Date.now()-i.wallTime);const Nn={id:"actions",title:"Actions",component:b.jsxs("div",{className:"vbox",children:[d&&b.jsxs("div",{className:"workbench-run-status",children:[b.jsx("span",{className:Ye("codicon",r0(d))}),b.jsx("div",{children:Vx(d)}),b.jsx("div",{className:"spacer"}),b.jsx("div",{className:"workbench-run-duration",children:An?_t(An):""})]}),b.jsx(Kx,{sdkLanguage:Qn,actions:te||[],selectedAction:i?En:void 0,selectedTime:Z,setSelectedTime:q,treeState:we,setTreeState:N,onSelected:ds,onHighlighted:Gt,revealActionAttachment:Kt,revealConsole:()=>bt("console"),isLive:u})]})},ms={id:"metadata",title:"Metadata",component:b.jsx(GN,{model:i})},ji=E==="actions"&&b.jsx(JN,{counters:i==null?void 0:i.actionCounters,hiddenActionsCount:yt});return b.jsxs("div",{className:"vbox workbench",...m?{inert:!0}:{},children:[!f&&b.jsx($N,{model:i,consoleEntries:Lr.entries,networkResources:ps.resources,boundaries:Zn,highlightedAction:Ne,highlightedResourceOrdinal:Q,highlightedConsoleEntryOrdinal:F,onSelected:ds,sdkLanguage:Qn,selectedTime:Z,setSelectedTime:q}),b.jsx(Qo,{sidebarSize:250,orientation:k==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:b.jsx(Qo,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:b.jsx(MN,{action:cn,model:i,sdkLanguage:Qn,testIdAttributeName:(i==null?void 0:i.testIdAttributeName)||"data-testid",isInspecting:J,setIsInspecting:fl,highlightedElement:P,setHighlightedElement:Mc}),sidebar:b.jsx(xh,{tabs:[Nn,ms],rightToolbar:[ji],selectedTab:E,setSelectedTab:x})}),sidebar:b.jsx(xh,{tabs:Ri,selectedTab:T,setSelectedTab:bt,rightToolbar:[k==="bottom"?b.jsx(Dt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{$("right")}}):b.jsx(Dt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{$("bottom")}})],mode:k==="bottom"?"default":"select"})})]})},JN=({counters:n,hiddenActionsCount:e})=>{const[i,s]=rn("actionsFilter",[]),l=H.useRef(null),o=b.jsxs(b.Fragment,{children:[e>0&&b.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),b.jsx("span",{ref:l,className:"codicon codicon-filter"})]});return b.jsx(FN,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:o,anchorRef:l,children:b.jsx(vS,{settings:[{type:"check",value:i.includes("getter"),set:u=>s(u?[...i,"getter"]:i.filter(f=>f!=="getter")),name:"Getters",count:n==null?void 0:n.get("getter")},{type:"check",value:i.includes("route"),set:u=>s(u?[...i,"route"]:i.filter(f=>f!=="route")),name:"Network routes",count:n==null?void 0:n.get("route")},{type:"check",value:i.includes("configuration"),set:u=>s(u?[...i,"configuration"]:i.filter(f=>f!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};var Eb;(n=>{function e(i){for(const s of i.splice(0))s.dispose()}n.disposeAll=e})(Eb||(Eb={}));class lr{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let s=!1;const l=this,o={dispose(){s||(s=!0,l._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const s of this._listeners)this._deliveryQueue.push({listener:s,event:e});if(i){for(let s=0;s<this._deliveryQueue.length;s++){const{listener:l,event:o}=this._deliveryQueue[s];l.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class WN extends Error{constructor(){super("Test server connection closed")}}class o2{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",i=>e(i.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class c2{constructor(e){this._onCloseEmitter=new lr,this._onReportEmitter=new lr,this._onStdioEmitter=new lr,this._onTestFilesChangedEmitter=new lr,this._onLoadTraceRequestedEmitter=new lr,this._onTestPausedEmitter=new lr,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this.onTestPaused=this._onTestPausedEmitter.event,this._transport=e,this._transport.onmessage(s=>{const l=JSON.parse(s),{id:o,result:u,error:f,method:d,params:p}=l;if(o){const m=this._callbacks.get(o);if(!m)return;this._callbacks.delete(o),f?m.reject(new Error(f)):m.resolve(u)}else this._dispatchEvent(d,p)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((s,l)=>{this._transport.onopen(s),this._transport.onerror(l)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i);for(const s of this._callbacks.values())s.reject(new WN);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,i){const s=globalThis.__logForTest;s==null||s({method:e,params:i}),await this._connectedPromise;const l=++this._lastId,o={id:l,method:e,params:i};return this._transport.send(JSON.stringify(o)),new Promise((u,f)=>{this._callbacks.set(l,{resolve:u,reject:f})})}_sendMessageNoReply(e,i){this._sendMessage(e,i).catch(()=>{})}_dispatchEvent(e,i){e==="report"?this._onReportEmitter.fire(i):e==="stdio"?this._onStdioEmitter.fire(i):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(i):e==="loadTraceRequested"?this._onLoadTraceRequestedEmitter.fire(i):e==="testPaused"&&this._onTestPausedEmitter.fire(i)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const u2=({location:n})=>{const[e,i]=rn("shouldPopulateCanvasFromScreenshot",!1),[s,l]=V1(),[o,u]=rn("mergeFiles",!1);return b.jsx(vS,{settings:[{type:"check",value:s,set:l,name:"Dark mode"},...n==="ui-mode"?[{type:"check",value:o,set:u,name:"Merge files"}]:[],{type:"check",value:e,set:i,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{FN as D,c0 as E,r2 as M,gt as R,Qo as S,c2 as T,o2 as W,s_ as _,u2 as a,l2 as b,XN as c,t2 as d,s2 as e,bh as f,n2 as g,i2 as h,Ye as i,b as j,$x as k,Gh as l,_t as m,Dt as n,rn as o,vS as p,L1 as q,H as r,es as s,r0 as t,cs as u};
