const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-a5XoALAZ.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
var rx=Object.defineProperty;var ax=(n,e,i)=>e in n?rx(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Ma=(n,e,i)=>ax(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"]'))r(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"&&r(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 r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function lx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var th={exports:{}},Oa={};/**
 * @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 Hy;function ox(){if(Hy)return Oa;Hy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(r,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:r,key:u,ref:l!==void 0?l:null,props:o}}return Oa.Fragment=e,Oa.jsx=i,Oa.jsxs=i,Oa}var qy;function cx(){return qy||(qy=1,th.exports=ox()),th.exports}var S=cx(),nh={exports:{}},fe={};/**
 * @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 $y;function ux(){if($y)return fe;$y=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=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"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),w=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=w&&k[w]||k["@@iterator"],typeof k=="function"?k:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function N(k,Y,Z){this.props=k,this.context=Y,this.refs=_,this.updater=Z||E}N.prototype.isReactComponent={},N.prototype.setState=function(k,Y){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,Y,"setState")},N.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function C(){}C.prototype=N.prototype;function $(k,Y,Z){this.props=k,this.context=Y,this.refs=_,this.updater=Z||E}var I=$.prototype=new C;I.constructor=$,x(I,N.prototype),I.isPureReactComponent=!0;var D=Array.isArray;function K(){}var Q={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function j(k,Y,Z){var ee=Z.ref;return{$$typeof:n,type:k,key:Y,ref:ee!==void 0?ee:null,props:Z}}function ne(k,Y){return j(k.type,Y,k.props)}function le(k){return typeof k=="object"&&k!==null&&k.$$typeof===n}function V(k){var Y={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Z){return Y[Z]})}var J=/\/+/g;function W(k,Y){return typeof k=="object"&&k!==null&&k.key!=null?V(""+k.key):Y.toString(36)}function Ae(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(K,K):(k.status="pending",k.then(function(Y){k.status==="pending"&&(k.status="fulfilled",k.value=Y)},function(Y){k.status==="pending"&&(k.status="rejected",k.reason=Y)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,Y,Z,ee,ue){var re=typeof k;(re==="undefined"||re==="boolean")&&(k=null);var xe=!1;if(k===null)xe=!0;else switch(re){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(k.$$typeof){case n:case e:xe=!0;break;case y:return xe=k._init,B(xe(k._payload),Y,Z,ee,ue)}}if(xe)return ue=ue(k),xe=ee===""?"."+W(k,0):ee,D(ue)?(Z="",xe!=null&&(Z=xe.replace(J,"$&/")+"/"),B(ue,Y,Z,"",function(Bi){return Bi})):ue!=null&&(le(ue)&&(ue=ne(ue,Z+(ue.key==null||k&&k.key===ue.key?"":(""+ue.key).replace(J,"$&/")+"/")+xe)),Y.push(ue)),1;xe=0;var tt=ee===""?".":ee+":";if(D(k))for(var Re=0;Re<k.length;Re++)ee=k[Re],re=tt+W(ee,Re),xe+=B(ee,Y,Z,re,ue);else if(Re=v(k),typeof Re=="function")for(k=Re.call(k),Re=0;!(ee=k.next()).done;)ee=ee.value,re=tt+W(ee,Re++),xe+=B(ee,Y,Z,re,ue);else if(re==="object"){if(typeof k.then=="function")return B(Ae(k),Y,Z,ee,ue);throw Y=String(k),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return xe}function P(k,Y,Z){if(k==null)return k;var ee=[],ue=0;return B(k,ee,"","",function(re){return Y.call(Z,re,ue++)}),ee}function se(k){if(k._status===-1){var Y=k._result;Y=Y(),Y.then(function(Z){(k._status===0||k._status===-1)&&(k._status=1,k._result=Z)},function(Z){(k._status===0||k._status===-1)&&(k._status=2,k._result=Z)}),k._status===-1&&(k._status=0,k._result=Y)}if(k._status===1)return k._result.default;throw k._result}var Se=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},we={map:P,forEach:function(k,Y,Z){P(k,function(){Y.apply(this,arguments)},Z)},count:function(k){var Y=0;return P(k,function(){Y++}),Y},toArray:function(k){return P(k,function(Y){return Y})||[]},only:function(k){if(!le(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return fe.Activity=m,fe.Children=we,fe.Component=N,fe.Fragment=i,fe.Profiler=l,fe.PureComponent=$,fe.StrictMode=r,fe.Suspense=h,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,fe.__COMPILER_RUNTIME={__proto__:null,c:function(k){return Q.H.useMemoCache(k)}},fe.cache=function(k){return function(){return k.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(k,Y,Z){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var ee=x({},k.props),ue=k.key;if(Y!=null)for(re in Y.key!==void 0&&(ue=""+Y.key),Y)!q.call(Y,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&Y.ref===void 0||(ee[re]=Y[re]);var re=arguments.length-2;if(re===1)ee.children=Z;else if(1<re){for(var xe=Array(re),tt=0;tt<re;tt++)xe[tt]=arguments[tt+2];ee.children=xe}return j(k.type,ue,ee)},fe.createContext=function(k){return k={$$typeof:u,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:o,_context:k},k},fe.createElement=function(k,Y,Z){var ee,ue={},re=null;if(Y!=null)for(ee in Y.key!==void 0&&(re=""+Y.key),Y)q.call(Y,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ue[ee]=Y[ee]);var xe=arguments.length-2;if(xe===1)ue.children=Z;else if(1<xe){for(var tt=Array(xe),Re=0;Re<xe;Re++)tt[Re]=arguments[Re+2];ue.children=tt}if(k&&k.defaultProps)for(ee in xe=k.defaultProps,xe)ue[ee]===void 0&&(ue[ee]=xe[ee]);return j(k,re,ue)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(k){return{$$typeof:f,render:k}},fe.isValidElement=le,fe.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:se}},fe.memo=function(k,Y){return{$$typeof:g,type:k,compare:Y===void 0?null:Y}},fe.startTransition=function(k){var Y=Q.T,Z={};Q.T=Z;try{var ee=k(),ue=Q.S;ue!==null&&ue(Z,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(K,Se)}catch(re){Se(re)}finally{Y!==null&&Z.types!==null&&(Y.types=Z.types),Q.T=Y}},fe.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},fe.use=function(k){return Q.H.use(k)},fe.useActionState=function(k,Y,Z){return Q.H.useActionState(k,Y,Z)},fe.useCallback=function(k,Y){return Q.H.useCallback(k,Y)},fe.useContext=function(k){return Q.H.useContext(k)},fe.useDebugValue=function(){},fe.useDeferredValue=function(k,Y){return Q.H.useDeferredValue(k,Y)},fe.useEffect=function(k,Y){return Q.H.useEffect(k,Y)},fe.useEffectEvent=function(k){return Q.H.useEffectEvent(k)},fe.useId=function(){return Q.H.useId()},fe.useImperativeHandle=function(k,Y,Z){return Q.H.useImperativeHandle(k,Y,Z)},fe.useInsertionEffect=function(k,Y){return Q.H.useInsertionEffect(k,Y)},fe.useLayoutEffect=function(k,Y){return Q.H.useLayoutEffect(k,Y)},fe.useMemo=function(k,Y){return Q.H.useMemo(k,Y)},fe.useOptimistic=function(k,Y){return Q.H.useOptimistic(k,Y)},fe.useReducer=function(k,Y,Z){return Q.H.useReducer(k,Y,Z)},fe.useRef=function(k){return Q.H.useRef(k)},fe.useState=function(k){return Q.H.useState(k)},fe.useSyncExternalStore=function(k,Y,Z){return Q.H.useSyncExternalStore(k,Y,Z)},fe.useTransition=function(){return Q.H.useTransition()},fe.version="19.2.1",fe}var Iy;function Xh(){return Iy||(Iy=1,nh.exports=ux()),nh.exports}var U=Xh();const gt=lx(U);function ec(n,e,i,r){const[l,o]=gt.useState(i);return gt.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),l}function gs(){const n=gt.useRef(null),[e]=Eh(n);return[e,n]}function Eh(n){const[e,i]=gt.useState(new DOMRect(0,0,10,10)),r=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;r();const o=new ResizeObserver(r);return o.observe(l),window.addEventListener("resize",r),()=>{o.disconnect(),window.removeEventListener("resize",r)}},[r,n]),[e,r]}function Et(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 r=i/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function fx(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 F0(n,e,i,r,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 Vy(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 on(n,e){n&&(e=ls.getObject(n,e));const[i,r]=gt.useState(e),l=gt.useCallback(o=>{n?ls.setObject(n,o):r(o)},[n,r]);return gt.useEffect(()=>{if(n){const o=()=>r(ls.getObject(n,e));return ls.onChangeEmitter.addEventListener(n,o),()=>ls.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,l]}const Ah=new Map,Q0=new Map;let tc;function ki(n,e){const[i,r]=gt.useState();Q0.set(n,{setter:r,defaultValue:e});const l=gt.useCallback(o=>{const u=Ah.get(tc||"default")||{};u[n]=o,Ah.set(tc||"default",u),r(o)},[n]);return[i,l]}function hx(n){if(tc===n)return;tc=n;const e=Ah.get(n)||{};for(const[i,r]of Q0.entries())r.setter(e[i]||r.defaultValue)}class dx{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var r;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var r;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const ls=new dx;function Fe(...n){return n.filter(Boolean).join(" ")}function J0(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const Gy="\\u0000-\\u0020\\u007f-\\u009f",P0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Gy+'"]{2,}[^\\s'+Gy+`"')}\\],:;.!?]`,"ug");function px(){const[n,e]=gt.useState(!1),i=gt.useCallback(()=>{const r=[];return e(l=>(r.push(setTimeout(()=>e(!1),1e3)),l?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[n,i]}const gx="system",Z0="theme",mx=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],W0=window.matchMedia("(prefers-color-scheme: dark)");function LC(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1),Nh(Ch()),W0.addEventListener("change",()=>{Nh(Ch())}))}const Fh=new Set;function Nh(n){const e=yx(),i=n==="system"?W0.matches?"dark-mode":"light-mode":n;if(e!==i){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(i);for(const r of Fh)r(i)}}function RC(n){Fh.add(n)}function DC(n){Fh.delete(n)}function Ch(){return ls.getString(Z0,gx)}function yx(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function bx(){const[n,e]=gt.useState(Ch());return gt.useEffect(()=>{ls.setString(Z0,n),Nh(n)},[n]),[n,e]}var ih={exports:{}},ja={},sh={exports:{}},rh={};/**
 * @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 Ky;function vx(){return Ky||(Ky=1,(function(n){function e(B,P){var se=B.length;B.push(P);e:for(;0<se;){var Se=se-1>>>1,we=B[Se];if(0<l(we,P))B[Se]=P,B[se]=we,se=Se;else break e}}function i(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var P=B[0],se=B.pop();if(se!==P){B[0]=se;e:for(var Se=0,we=B.length,k=we>>>1;Se<k;){var Y=2*(Se+1)-1,Z=B[Y],ee=Y+1,ue=B[ee];if(0>l(Z,se))ee<we&&0>l(ue,Z)?(B[Se]=ue,B[ee]=se,Se=ee):(B[Se]=Z,B[Y]=se,Se=Y);else if(ee<we&&0>l(ue,se))B[Se]=ue,B[ee]=se,Se=ee;else break e}}return P}function l(B,P){var se=B.sortIndex-P.sortIndex;return se!==0?se:B.id-P.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 h=[],g=[],y=1,m=null,w=3,v=!1,E=!1,x=!1,_=!1,N=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function I(B){for(var P=i(g);P!==null;){if(P.callback===null)r(g);else if(P.startTime<=B)r(g),P.sortIndex=P.expirationTime,e(h,P);else break;P=i(g)}}function D(B){if(x=!1,I(B),!E)if(i(h)!==null)E=!0,K||(K=!0,V());else{var P=i(g);P!==null&&Ae(D,P.startTime-B)}}var K=!1,Q=-1,q=5,j=-1;function ne(){return _?!0:!(n.unstable_now()-j<q)}function le(){if(_=!1,K){var B=n.unstable_now();j=B;var P=!0;try{e:{E=!1,x&&(x=!1,C(Q),Q=-1),v=!0;var se=w;try{t:{for(I(B),m=i(h);m!==null&&!(m.expirationTime>B&&ne());){var Se=m.callback;if(typeof Se=="function"){m.callback=null,w=m.priorityLevel;var we=Se(m.expirationTime<=B);if(B=n.unstable_now(),typeof we=="function"){m.callback=we,I(B),P=!0;break t}m===i(h)&&r(h),I(B)}else r(h);m=i(h)}if(m!==null)P=!0;else{var k=i(g);k!==null&&Ae(D,k.startTime-B),P=!1}}break e}finally{m=null,w=se,v=!1}P=void 0}}finally{P?V():K=!1}}}var V;if(typeof $=="function")V=function(){$(le)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,W=J.port2;J.port1.onmessage=le,V=function(){W.postMessage(null)}}else V=function(){N(le,0)};function Ae(B,P){Q=N(function(){B(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(B){switch(w){case 1:case 2:case 3:var P=3;break;default:P=w}var se=w;w=P;try{return B()}finally{w=se}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(B,P){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var se=w;w=B;try{return P()}finally{w=se}},n.unstable_scheduleCallback=function(B,P,se){var Se=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Se+se:Se):se=Se,B){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=se+we,B={id:y++,callback:P,priorityLevel:B,startTime:se,expirationTime:we,sortIndex:-1},se>Se?(B.sortIndex=se,e(g,B),i(h)===null&&B===i(g)&&(x?(C(Q),Q=-1):x=!0,Ae(D,se-Se))):(B.sortIndex=we,e(h,B),E||v||(E=!0,K||(K=!0,V()))),B},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(B){var P=w;return function(){var se=w;w=P;try{return B.apply(this,arguments)}finally{w=se}}}})(rh)),rh}var Yy;function Sx(){return Yy||(Yy=1,sh.exports=vx()),sh.exports}var ah={exports:{}},yt={};/**
 * @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 Xy;function wx(){if(Xy)return yt;Xy=1;var n=Xh();function e(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={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(h,g,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:h,containerInfo:g,implementation:y}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yt.createPortal=function(h,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return o(h,g,null,y)},yt.flushSync=function(h){var g=u.T,y=r.p;try{if(u.T=null,r.p=2,h)return h()}finally{u.T=g,r.p=y,r.d.f()}},yt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(h,g))},yt.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},yt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,v=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?r.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:w,fetchPriority:v}):y==="script"&&r.d.X(h,{crossOrigin:m,integrity:w,fetchPriority:v,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},yt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=f(g.as,g.crossOrigin);r.d.M(h,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(h)},yt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin);r.d.L(h,y,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},yt.preloadModule=function(h,g){if(typeof h=="string")if(g){var y=f(g.as,g.crossOrigin);r.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(h)},yt.requestFormReset=function(h){r.d.r(h)},yt.unstable_batchedUpdates=function(h,g){return h(g)},yt.useFormState=function(h,g,y){return u.H.useFormState(h,g,y)},yt.useFormStatus=function(){return u.H.useHostTransitionStatus()},yt.version="19.2.1",yt}var Fy;function xx(){if(Fy)return ah.exports;Fy=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(),ah.exports=wx(),ah.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 Qy;function _x(){if(Qy)return ja;Qy=1;var n=Sx(),e=Xh(),i=xx();function r(t){var s="https://react.dev/errors/"+t;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+s+" 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 s=t,a=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,(s.flags&4098)!==0&&(a=s.return),t=s.return;while(t)}return s.tag===3?a:null}function u(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function f(t){if(t.tag===31){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function h(t){if(o(t)!==t)throw Error(r(188))}function g(t){var s=t.alternate;if(!s){if(s=o(t),s===null)throw Error(r(188));return s!==t?null:t}for(var a=t,c=s;;){var d=a.return;if(d===null)break;var p=d.alternate;if(p===null){if(c=d.return,c!==null){a=c;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===a)return h(d),t;if(p===c)return h(d),s;p=p.sibling}throw Error(r(188))}if(a.return!==c.return)a=d,c=p;else{for(var b=!1,T=d.child;T;){if(T===a){b=!0,a=d,c=p;break}if(T===c){b=!0,c=d,a=p;break}T=T.sibling}if(!b){for(T=p.child;T;){if(T===a){b=!0,a=p,c=d;break}if(T===c){b=!0,c=p,a=d;break}T=T.sibling}if(!b)throw Error(r(189))}}if(a.alternate!==c)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?t:s}function y(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t;for(t=t.child;t!==null;){if(s=y(t),s!==null)return s;t=t.sibling}return null}var m=Object.assign,w=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),$=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function W(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case x:return"Fragment";case N:return"Profiler";case _:return"StrictMode";case D:return"Suspense";case K:return"SuspenseList";case j:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case $:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case I:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Q:return s=t.displayName||null,s!==null?s:W(t.type)||"Memo";case q:s=t._payload,t=t._init;try{return W(t(s))}catch{}}return null}var Ae=Array.isArray,B=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Se=[],we=-1;function k(t){return{current:t}}function Y(t){0>we||(t.current=Se[we],Se[we]=null,we--)}function Z(t,s){we++,Se[we]=t.current,t.current=s}var ee=k(null),ue=k(null),re=k(null),xe=k(null);function tt(t,s){switch(Z(re,s),Z(ue,t),Z(ee,null),s.nodeType){case 9:case 11:t=(t=s.documentElement)&&(t=t.namespaceURI)?oy(t):0;break;default:if(t=s.tagName,s=s.namespaceURI)s=oy(s),t=cy(s,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(ee),Z(ee,t)}function Re(){Y(ee),Y(ue),Y(re)}function Bi(t){t.memoizedState!==null&&Z(xe,t);var s=ee.current,a=cy(s,t.type);s!==a&&(Z(ue,t),Z(ee,a))}function kn(t){ue.current===t&&(Y(ee),Y(ue)),xe.current===t&&(Y(xe),Aa._currentValue=se)}var hn,Dr;function nt(t){if(hn===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);hn=s&&s[1]||"",Dr=-1<a.stack.indexOf(`
    at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+hn+t+Dr}var vs=!1;function zr(t,s){if(!t||vs)return"";vs=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(s){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(H){var z=H}Reflect.construct(t,[],F)}else{try{F.call()}catch(H){z=H}t.call(F.prototype)}}else{try{throw Error()}catch(H){z=H}(F=t())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(H){if(H&&z&&typeof H.stack=="string")return[H.stack,z.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),b=p[0],T=p[1];if(b&&T){var A=b.split(`
`),R=T.split(`
`);for(d=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;d<R.length&&!R[d].includes("DetermineComponentFrameRoot");)d++;if(c===A.length||d===R.length)for(c=A.length-1,d=R.length-1;1<=c&&0<=d&&A[c]!==R[d];)d--;for(;1<=c&&0<=d;c--,d--)if(A[c]!==R[d]){if(c!==1||d!==1)do if(c--,d--,0>d||A[c]!==R[d]){var G=`
`+A[c].replace(" at new "," at ");return t.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",t.displayName)),G}while(1<=c&&0<=d);break}}}finally{vs=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?nt(a):""}function zc(t,s){switch(t.tag){case 26:case 27:case 5:return nt(t.type);case 16:return nt("Lazy");case 13:return t.child!==s&&s!==null?nt("Suspense Fallback"):nt("Suspense");case 19:return nt("SuspenseList");case 0:case 15:return zr(t.type,!1);case 11:return zr(t.type.render,!1);case 1:return zr(t.type,!0);case 31:return nt("Activity");default:return""}}function Ss(t){try{var s="",a=null;do s+=zc(t,a),a=t,t=t.return;while(t);return s}catch(c){return`
Error generating stack: `+c.message+`
`+c.stack}}var Ui=Object.prototype.hasOwnProperty,ni=n.unstable_scheduleCallback,Br=n.unstable_cancelCallback,ii=n.unstable_shouldYield,Bc=n.unstable_requestPaint,St=n.unstable_now,Uc=n.unstable_getCurrentPriorityLevel,dl=n.unstable_ImmediatePriority,Ur=n.unstable_UserBlockingPriority,si=n.unstable_NormalPriority,Hc=n.unstable_LowPriority,pl=n.unstable_IdlePriority,qc=n.log,Hi=n.unstable_setDisableYieldValue,Mn=null,rt=null;function vn(t){if(typeof qc=="function"&&Hi(t),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(Mn,t)}catch{}}var wt=Math.clz32?Math.clz32:ce,$c=Math.log,gl=Math.LN2;function ce(t){return t>>>=0,t===0?32:31-($c(t)/gl|0)|0}var Sn=256,Ft=262144,ml=4194304;function qi(t){var s=t&42;if(s!==0)return s;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:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;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 yl(t,s,a){var c=t.pendingLanes;if(c===0)return 0;var d=0,p=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var T=c&134217727;return T!==0?(c=T&~p,c!==0?d=qi(c):(b&=T,b!==0?d=qi(b):a||(a=T&~t,a!==0&&(d=qi(a))))):(T=c&~p,T!==0?d=qi(T):b!==0?d=qi(b):a||(a=c&~t,a!==0&&(d=qi(a)))),d===0?0:s!==0&&s!==d&&(s&p)===0&&(p=d&-d,a=s&-s,p>=a||p===32&&(a&4194048)!==0)?s:d}function Hr(t,s){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&s)===0}function YS(t,s){switch(t){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Vd(){var t=ml;return ml<<=1,(ml&62914560)===0&&(ml=4194304),t}function Ic(t){for(var s=[],a=0;31>a;a++)s.push(t);return s}function qr(t,s){t.pendingLanes|=s,s!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function XS(t,s,a,c,d,p){var b=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=t.entanglements,A=t.expirationTimes,R=t.hiddenUpdates;for(a=b&~a;0<a;){var G=31-wt(a),F=1<<G;T[G]=0,A[G]=-1;var z=R[G];if(z!==null)for(R[G]=null,G=0;G<z.length;G++){var H=z[G];H!==null&&(H.lane&=-536870913)}a&=~F}c!==0&&Gd(t,c,0),p!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=p&~(b&~s))}function Gd(t,s,a){t.pendingLanes|=s,t.suspendedLanes&=~s;var c=31-wt(s);t.entangledLanes|=s,t.entanglements[c]=t.entanglements[c]|1073741824|a&261930}function Kd(t,s){var a=t.entangledLanes|=s;for(t=t.entanglements;a;){var c=31-wt(a),d=1<<c;d&s|t[c]&s&&(t[c]|=s),a&=~d}}function Yd(t,s){var a=s&-s;return a=(a&42)!==0?1:Vc(a),(a&(t.suspendedLanes|s))!==0?0:a}function Vc(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 Gc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Xd(){var t=P.p;return t!==0?t:(t=window.event,t===void 0?32:jy(t.type))}function Fd(t,s){var a=P.p;try{return P.p=t,s()}finally{P.p=a}}var ri=Math.random().toString(36).slice(2),ot="__reactFiber$"+ri,Nt="__reactProps$"+ri,ws="__reactContainer$"+ri,Kc="__reactEvents$"+ri,FS="__reactListeners$"+ri,QS="__reactHandles$"+ri,Qd="__reactResources$"+ri,$r="__reactMarker$"+ri;function Yc(t){delete t[ot],delete t[Nt],delete t[Kc],delete t[FS],delete t[QS]}function xs(t){var s=t[ot];if(s)return s;for(var a=t.parentNode;a;){if(s=a[ws]||a[ot]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(t=my(t);t!==null;){if(a=t[ot])return a;t=my(t)}return s}t=a,a=t.parentNode}return null}function _s(t){if(t=t[ot]||t[ws]){var s=t.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return t}return null}function Ir(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t.stateNode;throw Error(r(33))}function Ts(t){var s=t[Qd];return s||(s=t[Qd]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function at(t){t[$r]=!0}var Jd=new Set,Pd={};function $i(t,s){Es(t,s),Es(t+"Capture",s)}function Es(t,s){for(Pd[t]=s,t=0;t<s.length;t++)Jd.add(s[t])}var JS=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]*$"),Zd={},Wd={};function PS(t){return Ui.call(Wd,t)?!0:Ui.call(Zd,t)?!1:JS.test(t)?Wd[t]=!0:(Zd[t]=!0,!1)}function bl(t,s,a){if(PS(s))if(a===null)t.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(s);return;case"boolean":var c=s.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(s);return}}t.setAttribute(s,""+a)}}function vl(t,s,a){if(a===null)t.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttribute(s,""+a)}}function On(t,s,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(s,a,""+c)}}function Qt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ep(t){var s=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ZS(t,s,a){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,s);if(!t.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var d=c.get,p=c.set;return Object.defineProperty(t,s,{configurable:!0,get:function(){return d.call(this)},set:function(b){a=""+b,p.call(this,b)}}),Object.defineProperty(t,s,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){t._valueTracker=null,delete t[s]}}}}function Xc(t){if(!t._valueTracker){var s=ep(t)?"checked":"value";t._valueTracker=ZS(t,s,""+t[s])}}function tp(t){if(!t)return!1;var s=t._valueTracker;if(!s)return!0;var a=s.getValue(),c="";return t&&(c=ep(t)?t.checked?"true":"false":t.value),t=c,t!==a?(s.setValue(t),!0):!1}function Sl(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 WS=/[\n"\\]/g;function Jt(t){return t.replace(WS,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Fc(t,s,a,c,d,p,b,T){t.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.type=b:t.removeAttribute("type"),s!=null?b==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+Qt(s)):t.value!==""+Qt(s)&&(t.value=""+Qt(s)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),s!=null?Qc(t,b,Qt(s)):a!=null?Qc(t,b,Qt(a)):c!=null&&t.removeAttribute("value"),d==null&&p!=null&&(t.defaultChecked=!!p),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?t.name=""+Qt(T):t.removeAttribute("name")}function np(t,s,a,c,d,p,b,T){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),s!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){Xc(t);return}a=a!=null?""+Qt(a):"",s=s!=null?""+Qt(s):a,T||s===t.value||(t.value=s),t.defaultValue=s}c=c??d,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=T?t.checked:!!c,t.defaultChecked=!!c,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),Xc(t)}function Qc(t,s,a){s==="number"&&Sl(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function As(t,s,a,c){if(t=t.options,s){s={};for(var d=0;d<a.length;d++)s["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=s.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&c&&(t[a].defaultSelected=!0)}else{for(a=""+Qt(a),s=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,c&&(t[d].defaultSelected=!0);return}s!==null||t[d].disabled||(s=t[d])}s!==null&&(s.selected=!0)}}function ip(t,s,a){if(s!=null&&(s=""+Qt(s),s!==t.value&&(t.value=s),a==null)){t.defaultValue!==s&&(t.defaultValue=s);return}t.defaultValue=a!=null?""+Qt(a):""}function sp(t,s,a,c){if(s==null){if(c!=null){if(a!=null)throw Error(r(92));if(Ae(c)){if(1<c.length)throw Error(r(93));c=c[0]}a=c}a==null&&(a=""),s=a}a=Qt(s),t.defaultValue=a,c=t.textContent,c===a&&c!==""&&c!==null&&(t.value=c),Xc(t)}function Ns(t,s){if(s){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=s;return}}t.textContent=s}var e1=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 rp(t,s,a){var c=s.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="":c?t.setProperty(s,a):typeof a!="number"||a===0||e1.has(s)?s==="float"?t.cssFloat=a:t[s]=(""+a).trim():t[s]=a+"px"}function ap(t,s,a){if(s!=null&&typeof s!="object")throw Error(r(62));if(t=t.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||s!=null&&s.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var d in s)c=s[d],s.hasOwnProperty(d)&&a[d]!==c&&rp(t,d,c)}else for(var p in s)s.hasOwnProperty(p)&&rp(t,p,s[p])}function Jc(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 t1=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"]]),n1=/^[\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 wl(t){return n1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function jn(){}var Pc=null;function Zc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Cs=null,ks=null;function lp(t){var s=_s(t);if(s&&(t=s.stateNode)){var a=t[Nt]||null;e:switch(t=s.stateNode,s.type){case"input":if(Fc(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),s=a.name,a.type==="radio"&&s!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Jt(""+s)+'"][type="radio"]'),s=0;s<a.length;s++){var c=a[s];if(c!==t&&c.form===t.form){var d=c[Nt]||null;if(!d)throw Error(r(90));Fc(c,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(s=0;s<a.length;s++)c=a[s],c.form===t.form&&tp(c)}break e;case"textarea":ip(t,a.value,a.defaultValue);break e;case"select":s=a.value,s!=null&&As(t,!!a.multiple,s,!1)}}}var Wc=!1;function op(t,s,a){if(Wc)return t(s,a);Wc=!0;try{var c=t(s);return c}finally{if(Wc=!1,(Cs!==null||ks!==null)&&(oo(),Cs&&(s=Cs,t=ks,ks=Cs=null,lp(s),t)))for(s=0;s<t.length;s++)lp(t[s])}}function Vr(t,s){var a=t.stateNode;if(a===null)return null;var c=a[Nt]||null;if(c===null)return null;a=c[s];e:switch(s){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(r(231,s,typeof a));return a}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(Ln)try{var Gr={};Object.defineProperty(Gr,"passive",{get:function(){eu=!0}}),window.addEventListener("test",Gr,Gr),window.removeEventListener("test",Gr,Gr)}catch{eu=!1}var ai=null,tu=null,xl=null;function cp(){if(xl)return xl;var t,s=tu,a=s.length,c,d="value"in ai?ai.value:ai.textContent,p=d.length;for(t=0;t<a&&s[t]===d[t];t++);var b=a-t;for(c=1;c<=b&&s[a-c]===d[p-c];c++);return xl=d.slice(t,1<c?1-c:void 0)}function _l(t){var s=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&s===13&&(t=13)):t=s,t===10&&(t=13),32<=t||t===13?t:0}function Tl(){return!0}function up(){return!1}function Ct(t){function s(a,c,d,p,b){this._reactName=a,this._targetInst=d,this.type=c,this.nativeEvent=p,this.target=b,this.currentTarget=null;for(var T in t)t.hasOwnProperty(T)&&(a=t[T],this[T]=a?a(p):p[T]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Tl:up,this.isPropagationStopped=up,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Tl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Tl)},persist:function(){},isPersistent:Tl}),s}var Ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},El=Ct(Ii),Kr=m({},Ii,{view:0,detail:0}),i1=Ct(Kr),nu,iu,Yr,Al=m({},Kr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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!==Yr&&(Yr&&t.type==="mousemove"?(nu=t.screenX-Yr.screenX,iu=t.screenY-Yr.screenY):iu=nu=0,Yr=t),nu)},movementY:function(t){return"movementY"in t?t.movementY:iu}}),fp=Ct(Al),s1=m({},Al,{dataTransfer:0}),r1=Ct(s1),a1=m({},Kr,{relatedTarget:0}),su=Ct(a1),l1=m({},Ii,{animationName:0,elapsedTime:0,pseudoElement:0}),o1=Ct(l1),c1=m({},Ii,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),u1=Ct(c1),f1=m({},Ii,{data:0}),hp=Ct(f1),h1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},d1={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"},p1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g1(t){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(t):(t=p1[t])?!!s[t]:!1}function ru(){return g1}var m1=m({},Kr,{key:function(t){if(t.key){var s=h1[t.key]||t.key;if(s!=="Unidentified")return s}return t.type==="keypress"?(t=_l(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?d1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(t){return t.type==="keypress"?_l(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?_l(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),y1=Ct(m1),b1=m({},Al,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dp=Ct(b1),v1=m({},Kr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),S1=Ct(v1),w1=m({},Ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),x1=Ct(w1),_1=m({},Al,{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}),T1=Ct(_1),E1=m({},Ii,{newState:0,oldState:0}),A1=Ct(E1),N1=[9,13,27,32],au=Ln&&"CompositionEvent"in window,Xr=null;Ln&&"documentMode"in document&&(Xr=document.documentMode);var C1=Ln&&"TextEvent"in window&&!Xr,pp=Ln&&(!au||Xr&&8<Xr&&11>=Xr),gp=" ",mp=!1;function yp(t,s){switch(t){case"keyup":return N1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ms=!1;function k1(t,s){switch(t){case"compositionend":return bp(s);case"keypress":return s.which!==32?null:(mp=!0,gp);case"textInput":return t=s.data,t===gp&&mp?null:t;default:return null}}function M1(t,s){if(Ms)return t==="compositionend"||!au&&yp(t,s)?(t=cp(),xl=tu=ai=null,Ms=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return pp&&s.locale!=="ko"?null:s.data;default:return null}}var O1={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 vp(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s==="input"?!!O1[t.type]:s==="textarea"}function Sp(t,s,a,c){Cs?ks?ks.push(c):ks=[c]:Cs=c,s=mo(s,"onChange"),0<s.length&&(a=new El("onChange","change",null,a,c),t.push({event:a,listeners:s}))}var Fr=null,Qr=null;function j1(t){ny(t,0)}function Nl(t){var s=Ir(t);if(tp(s))return t}function wp(t,s){if(t==="change")return s}var xp=!1;if(Ln){var lu;if(Ln){var ou="oninput"in document;if(!ou){var _p=document.createElement("div");_p.setAttribute("oninput","return;"),ou=typeof _p.oninput=="function"}lu=ou}else lu=!1;xp=lu&&(!document.documentMode||9<document.documentMode)}function Tp(){Fr&&(Fr.detachEvent("onpropertychange",Ep),Qr=Fr=null)}function Ep(t){if(t.propertyName==="value"&&Nl(Qr)){var s=[];Sp(s,Qr,t,Zc(t)),op(j1,s)}}function L1(t,s,a){t==="focusin"?(Tp(),Fr=s,Qr=a,Fr.attachEvent("onpropertychange",Ep)):t==="focusout"&&Tp()}function R1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Nl(Qr)}function D1(t,s){if(t==="click")return Nl(s)}function z1(t,s){if(t==="input"||t==="change")return Nl(s)}function B1(t,s){return t===s&&(t!==0||1/t===1/s)||t!==t&&s!==s}var qt=typeof Object.is=="function"?Object.is:B1;function Jr(t,s){if(qt(t,s))return!0;if(typeof t!="object"||t===null||typeof s!="object"||s===null)return!1;var a=Object.keys(t),c=Object.keys(s);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var d=a[c];if(!Ui.call(s,d)||!qt(t[d],s[d]))return!1}return!0}function Ap(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Np(t,s){var a=Ap(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=s&&c>=s)return{node:a,offset:s-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ap(a)}}function Cp(t,s){return t&&s?t===s?!0:t&&t.nodeType===3?!1:s&&s.nodeType===3?Cp(t,s.parentNode):"contains"in t?t.contains(s):t.compareDocumentPosition?!!(t.compareDocumentPosition(s)&16):!1:!1}function kp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var s=Sl(t.document);s instanceof t.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)t=s.contentWindow;else break;s=Sl(t.document)}return s}function cu(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s&&(s==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||s==="textarea"||t.contentEditable==="true")}var U1=Ln&&"documentMode"in document&&11>=document.documentMode,Os=null,uu=null,Pr=null,fu=!1;function Mp(t,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fu||Os==null||Os!==Sl(c)||(c=Os,"selectionStart"in c&&cu(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}),Pr&&Jr(Pr,c)||(Pr=c,c=mo(uu,"onSelect"),0<c.length&&(s=new El("onSelect","select",null,s,a),t.push({event:s,listeners:c}),s.target=Os)))}function Vi(t,s){var a={};return a[t.toLowerCase()]=s.toLowerCase(),a["Webkit"+t]="webkit"+s,a["Moz"+t]="moz"+s,a}var js={animationend:Vi("Animation","AnimationEnd"),animationiteration:Vi("Animation","AnimationIteration"),animationstart:Vi("Animation","AnimationStart"),transitionrun:Vi("Transition","TransitionRun"),transitionstart:Vi("Transition","TransitionStart"),transitioncancel:Vi("Transition","TransitionCancel"),transitionend:Vi("Transition","TransitionEnd")},hu={},Op={};Ln&&(Op=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function Gi(t){if(hu[t])return hu[t];if(!js[t])return t;var s=js[t],a;for(a in s)if(s.hasOwnProperty(a)&&a in Op)return hu[t]=s[a];return t}var jp=Gi("animationend"),Lp=Gi("animationiteration"),Rp=Gi("animationstart"),H1=Gi("transitionrun"),q1=Gi("transitionstart"),$1=Gi("transitioncancel"),Dp=Gi("transitionend"),zp=new Map,du="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(" ");du.push("scrollEnd");function dn(t,s){zp.set(t,s),$i(s,[t])}var Cl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=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(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Pt=[],Ls=0,pu=0;function kl(){for(var t=Ls,s=pu=Ls=0;s<t;){var a=Pt[s];Pt[s++]=null;var c=Pt[s];Pt[s++]=null;var d=Pt[s];Pt[s++]=null;var p=Pt[s];if(Pt[s++]=null,c!==null&&d!==null){var b=c.pending;b===null?d.next=d:(d.next=b.next,b.next=d),c.pending=d}p!==0&&Bp(a,d,p)}}function Ml(t,s,a,c){Pt[Ls++]=t,Pt[Ls++]=s,Pt[Ls++]=a,Pt[Ls++]=c,pu|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function gu(t,s,a,c){return Ml(t,s,a,c),Ol(t)}function Ki(t,s){return Ml(t,null,null,s),Ol(t)}function Bp(t,s,a){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a);for(var d=!1,p=t.return;p!==null;)p.childLanes|=a,c=p.alternate,c!==null&&(c.childLanes|=a),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(d=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,d&&s!==null&&(d=31-wt(a),t=p.hiddenUpdates,c=t[d],c===null?t[d]=[s]:c.push(s),s.lane=a|536870912),p):null}function Ol(t){if(50<va)throw va=0,Ef=null,Error(r(185));for(var s=t.return;s!==null;)t=s,s=t.return;return t.tag===3?t.stateNode:null}var Rs={};function I1(t,s,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=s,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 $t(t,s,a,c){return new I1(t,s,a,c)}function mu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Rn(t,s){var a=t.alternate;return a===null?(a=$t(t.tag,s,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=s,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,s=t.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Up(t,s){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=s,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,s=a.dependencies,t.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),t}function jl(t,s,a,c,d,p){var b=0;if(c=t,typeof t=="function")mu(t)&&(b=1);else if(typeof t=="string")b=Xw(t,a,ee.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case j:return t=$t(31,a,s,d),t.elementType=j,t.lanes=p,t;case x:return Yi(a.children,d,p,s);case _:b=8,d|=24;break;case N:return t=$t(12,a,s,d|2),t.elementType=N,t.lanes=p,t;case D:return t=$t(13,a,s,d),t.elementType=D,t.lanes=p,t;case K:return t=$t(19,a,s,d),t.elementType=K,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case $:b=10;break e;case C:b=9;break e;case I:b=11;break e;case Q:b=14;break e;case q:b=16,c=null;break e}b=29,a=Error(r(130,t===null?"null":typeof t,"")),c=null}return s=$t(b,a,s,d),s.elementType=t,s.type=c,s.lanes=p,s}function Yi(t,s,a,c){return t=$t(7,t,c,s),t.lanes=a,t}function yu(t,s,a){return t=$t(6,t,null,s),t.lanes=a,t}function Hp(t){var s=$t(18,null,null,0);return s.stateNode=t,s}function bu(t,s,a){return s=$t(4,t.children!==null?t.children:[],t.key,s),s.lanes=a,s.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},s}var qp=new WeakMap;function Zt(t,s){if(typeof t=="object"&&t!==null){var a=qp.get(t);return a!==void 0?a:(s={value:t,source:s,stack:Ss(s)},qp.set(t,s),s)}return{value:t,source:s,stack:Ss(s)}}var Ds=[],zs=0,Ll=null,Zr=0,Wt=[],en=0,li=null,wn=1,xn="";function Dn(t,s){Ds[zs++]=Zr,Ds[zs++]=Ll,Ll=t,Zr=s}function $p(t,s,a){Wt[en++]=wn,Wt[en++]=xn,Wt[en++]=li,li=t;var c=wn;t=xn;var d=32-wt(c)-1;c&=~(1<<d),a+=1;var p=32-wt(s)+d;if(30<p){var b=d-d%5;p=(c&(1<<b)-1).toString(32),c>>=b,d-=b,wn=1<<32-wt(s)+d|a<<d|c,xn=p+t}else wn=1<<p|a<<d|c,xn=t}function vu(t){t.return!==null&&(Dn(t,1),$p(t,1,0))}function Su(t){for(;t===Ll;)Ll=Ds[--zs],Ds[zs]=null,Zr=Ds[--zs],Ds[zs]=null;for(;t===li;)li=Wt[--en],Wt[en]=null,xn=Wt[--en],Wt[en]=null,wn=Wt[--en],Wt[en]=null}function Ip(t,s){Wt[en++]=wn,Wt[en++]=xn,Wt[en++]=li,wn=s.id,xn=s.overflow,li=t}var ct=null,De=null,ve=!1,oi=null,tn=!1,wu=Error(r(519));function ci(t){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wr(Zt(s,t)),wu}function Vp(t){var s=t.stateNode,a=t.type,c=t.memoizedProps;switch(s[ot]=t,s[Nt]=c,a){case"dialog":me("cancel",s),me("close",s);break;case"iframe":case"object":case"embed":me("load",s);break;case"video":case"audio":for(a=0;a<wa.length;a++)me(wa[a],s);break;case"source":me("error",s);break;case"img":case"image":case"link":me("error",s),me("load",s);break;case"details":me("toggle",s);break;case"input":me("invalid",s),np(s,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":me("invalid",s);break;case"textarea":me("invalid",s),sp(s,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||s.textContent===""+a||c.suppressHydrationWarning===!0||ay(s.textContent,a)?(c.popover!=null&&(me("beforetoggle",s),me("toggle",s)),c.onScroll!=null&&me("scroll",s),c.onScrollEnd!=null&&me("scrollend",s),c.onClick!=null&&(s.onclick=jn),s=!0):s=!1,s||ci(t,!0)}function Gp(t){for(ct=t.return;ct;)switch(ct.tag){case 5:case 31:case 13:tn=!1;return;case 27:case 3:tn=!0;return;default:ct=ct.return}}function Bs(t){if(t!==ct)return!1;if(!ve)return Gp(t),ve=!0,!1;var s=t.tag,a;if((a=s!==3&&s!==27)&&((a=s===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||qf(t.type,t.memoizedProps)),a=!a),a&&De&&ci(t),Gp(t),s===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));De=gy(t)}else if(s===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));De=gy(t)}else s===27?(s=De,_i(t.type)?(t=Kf,Kf=null,De=t):De=s):De=ct?sn(t.stateNode.nextSibling):null;return!0}function Xi(){De=ct=null,ve=!1}function xu(){var t=oi;return t!==null&&(jt===null?jt=t:jt.push.apply(jt,t),oi=null),t}function Wr(t){oi===null?oi=[t]:oi.push(t)}var _u=k(null),Fi=null,zn=null;function ui(t,s,a){Z(_u,s._currentValue),s._currentValue=a}function Bn(t){t._currentValue=_u.current,Y(_u)}function Tu(t,s,a){for(;t!==null;){var c=t.alternate;if((t.childLanes&s)!==s?(t.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),t===a)break;t=t.return}}function Eu(t,s,a,c){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var p=d.dependencies;if(p!==null){var b=d.child;p=p.firstContext;e:for(;p!==null;){var T=p;p=d;for(var A=0;A<s.length;A++)if(T.context===s[A]){p.lanes|=a,T=p.alternate,T!==null&&(T.lanes|=a),Tu(p.return,a,t),c||(b=null);break e}p=T.next}}else if(d.tag===18){if(b=d.return,b===null)throw Error(r(341));b.lanes|=a,p=b.alternate,p!==null&&(p.lanes|=a),Tu(b,a,t),b=null}else b=d.child;if(b!==null)b.return=d;else for(b=d;b!==null;){if(b===t){b=null;break}if(d=b.sibling,d!==null){d.return=b.return,b=d;break}b=b.return}d=b}}function Us(t,s,a,c){t=null;for(var d=s,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var b=d.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var T=d.type;qt(d.pendingProps.value,b.value)||(t!==null?t.push(T):t=[T])}}else if(d===xe.current){if(b=d.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Aa):t=[Aa])}d=d.return}t!==null&&Eu(s,t,a,c),s.flags|=262144}function Rl(t){for(t=t.firstContext;t!==null;){if(!qt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Qi(t){Fi=t,zn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ut(t){return Kp(Fi,t)}function Dl(t,s){return Fi===null&&Qi(t),Kp(t,s)}function Kp(t,s){var a=s._currentValue;if(s={context:s,memoizedValue:a,next:null},zn===null){if(t===null)throw Error(r(308));zn=s,t.dependencies={lanes:0,firstContext:s},t.flags|=524288}else zn=zn.next=s;return a}var V1=typeof AbortController<"u"?AbortController:function(){var t=[],s=this.signal={aborted:!1,addEventListener:function(a,c){t.push(c)}};this.abort=function(){s.aborted=!0,t.forEach(function(a){return a()})}},G1=n.unstable_scheduleCallback,K1=n.unstable_NormalPriority,Je={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new V1,data:new Map,refCount:0}}function ea(t){t.refCount--,t.refCount===0&&G1(K1,function(){t.controller.abort()})}var ta=null,Nu=0,Hs=0,qs=null;function Y1(t,s){if(ta===null){var a=ta=[];Nu=0,Hs=Of(),qs={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Nu++,s.then(Yp,Yp),s}function Yp(){if(--Nu===0&&ta!==null){qs!==null&&(qs.status="fulfilled");var t=ta;ta=null,Hs=0,qs=null;for(var s=0;s<t.length;s++)(0,t[s])()}}function X1(t,s){var a=[],c={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){c.status="fulfilled",c.value=s;for(var d=0;d<a.length;d++)(0,a[d])(s)},function(d){for(c.status="rejected",c.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),c}var Xp=B.S;B.S=function(t,s){Mm=St(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Y1(t,s),Xp!==null&&Xp(t,s)};var Ji=k(null);function Cu(){var t=Ji.current;return t!==null?t:je.pooledCache}function zl(t,s){s===null?Z(Ji,Ji.current):Z(Ji,s.pool)}function Fp(){var t=Cu();return t===null?null:{parent:Je._currentValue,pool:t}}var $s=Error(r(460)),ku=Error(r(474)),Bl=Error(r(542)),Ul={then:function(){}};function Qp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Jp(t,s,a){switch(a=t[a],a===void 0?t.push(s):a!==s&&(s.then(jn,jn),s=a),s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,Zp(t),t;default:if(typeof s.status=="string")s.then(jn,jn);else{if(t=je,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=s,t.status="pending",t.then(function(c){if(s.status==="pending"){var d=s;d.status="fulfilled",d.value=c}},function(c){if(s.status==="pending"){var d=s;d.status="rejected",d.reason=c}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,Zp(t),t}throw Zi=s,$s}}function Pi(t){try{var s=t._init;return s(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Zi=a,$s):a}}var Zi=null;function Pp(){if(Zi===null)throw Error(r(459));var t=Zi;return Zi=null,t}function Zp(t){if(t===$s||t===Bl)throw Error(r(483))}var Is=null,na=0;function Hl(t){var s=na;return na+=1,Is===null&&(Is=[]),Jp(Is,t,s)}function ia(t,s){s=s.props.ref,t.ref=s!==void 0?s:null}function ql(t,s){throw s.$$typeof===w?Error(r(525)):(t=Object.prototype.toString.call(s),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":t)))}function Wp(t){function s(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;)s(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 d(O,M){return O=Rn(O,M),O.index=0,O.sibling=null,O}function p(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 b(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function T(O,M,L,X){return M===null||M.tag!==6?(M=yu(L,O.mode,X),M.return=O,M):(M=d(M,L),M.return=O,M)}function A(O,M,L,X){var ae=L.type;return ae===x?G(O,M,L.props.children,X,L.key):M!==null&&(M.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===q&&Pi(ae)===M.type)?(M=d(M,L.props),ia(M,L),M.return=O,M):(M=jl(L.type,L.key,L.props,null,O.mode,X),ia(M,L),M.return=O,M)}function R(O,M,L,X){return M===null||M.tag!==4||M.stateNode.containerInfo!==L.containerInfo||M.stateNode.implementation!==L.implementation?(M=bu(L,O.mode,X),M.return=O,M):(M=d(M,L.children||[]),M.return=O,M)}function G(O,M,L,X,ae){return M===null||M.tag!==7?(M=Yi(L,O.mode,X,ae),M.return=O,M):(M=d(M,L),M.return=O,M)}function F(O,M,L){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=yu(""+M,O.mode,L),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return L=jl(M.type,M.key,M.props,null,O.mode,L),ia(L,M),L.return=O,L;case E:return M=bu(M,O.mode,L),M.return=O,M;case q:return M=Pi(M),F(O,M,L)}if(Ae(M)||V(M))return M=Yi(M,O.mode,L,null),M.return=O,M;if(typeof M.then=="function")return F(O,Hl(M),L);if(M.$$typeof===$)return F(O,Dl(O,M),L);ql(O,M)}return null}function z(O,M,L,X){var ae=M!==null?M.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ae!==null?null:T(O,M,""+L,X);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===ae?A(O,M,L,X):null;case E:return L.key===ae?R(O,M,L,X):null;case q:return L=Pi(L),z(O,M,L,X)}if(Ae(L)||V(L))return ae!==null?null:G(O,M,L,X,null);if(typeof L.then=="function")return z(O,M,Hl(L),X);if(L.$$typeof===$)return z(O,M,Dl(O,L),X);ql(O,L)}return null}function H(O,M,L,X,ae){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return O=O.get(L)||null,T(M,O,""+X,ae);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return O=O.get(X.key===null?L:X.key)||null,A(M,O,X,ae);case E:return O=O.get(X.key===null?L:X.key)||null,R(M,O,X,ae);case q:return X=Pi(X),H(O,M,L,X,ae)}if(Ae(X)||V(X))return O=O.get(L)||null,G(M,O,X,ae,null);if(typeof X.then=="function")return H(O,M,L,Hl(X),ae);if(X.$$typeof===$)return H(O,M,L,Dl(M,X),ae);ql(M,X)}return null}function te(O,M,L,X){for(var ae=null,_e=null,ie=M,pe=M=0,be=null;ie!==null&&pe<L.length;pe++){ie.index>pe?(be=ie,ie=null):be=ie.sibling;var Te=z(O,ie,L[pe],X);if(Te===null){ie===null&&(ie=be);break}t&&ie&&Te.alternate===null&&s(O,ie),M=p(Te,M,pe),_e===null?ae=Te:_e.sibling=Te,_e=Te,ie=be}if(pe===L.length)return a(O,ie),ve&&Dn(O,pe),ae;if(ie===null){for(;pe<L.length;pe++)ie=F(O,L[pe],X),ie!==null&&(M=p(ie,M,pe),_e===null?ae=ie:_e.sibling=ie,_e=ie);return ve&&Dn(O,pe),ae}for(ie=c(ie);pe<L.length;pe++)be=H(ie,O,pe,L[pe],X),be!==null&&(t&&be.alternate!==null&&ie.delete(be.key===null?pe:be.key),M=p(be,M,pe),_e===null?ae=be:_e.sibling=be,_e=be);return t&&ie.forEach(function(Ci){return s(O,Ci)}),ve&&Dn(O,pe),ae}function oe(O,M,L,X){if(L==null)throw Error(r(151));for(var ae=null,_e=null,ie=M,pe=M=0,be=null,Te=L.next();ie!==null&&!Te.done;pe++,Te=L.next()){ie.index>pe?(be=ie,ie=null):be=ie.sibling;var Ci=z(O,ie,Te.value,X);if(Ci===null){ie===null&&(ie=be);break}t&&ie&&Ci.alternate===null&&s(O,ie),M=p(Ci,M,pe),_e===null?ae=Ci:_e.sibling=Ci,_e=Ci,ie=be}if(Te.done)return a(O,ie),ve&&Dn(O,pe),ae;if(ie===null){for(;!Te.done;pe++,Te=L.next())Te=F(O,Te.value,X),Te!==null&&(M=p(Te,M,pe),_e===null?ae=Te:_e.sibling=Te,_e=Te);return ve&&Dn(O,pe),ae}for(ie=c(ie);!Te.done;pe++,Te=L.next())Te=H(ie,O,pe,Te.value,X),Te!==null&&(t&&Te.alternate!==null&&ie.delete(Te.key===null?pe:Te.key),M=p(Te,M,pe),_e===null?ae=Te:_e.sibling=Te,_e=Te);return t&&ie.forEach(function(sx){return s(O,sx)}),ve&&Dn(O,pe),ae}function Oe(O,M,L,X){if(typeof L=="object"&&L!==null&&L.type===x&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ae=L.key;M!==null;){if(M.key===ae){if(ae=L.type,ae===x){if(M.tag===7){a(O,M.sibling),X=d(M,L.props.children),X.return=O,O=X;break e}}else if(M.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===q&&Pi(ae)===M.type){a(O,M.sibling),X=d(M,L.props),ia(X,L),X.return=O,O=X;break e}a(O,M);break}else s(O,M);M=M.sibling}L.type===x?(X=Yi(L.props.children,O.mode,X,L.key),X.return=O,O=X):(X=jl(L.type,L.key,L.props,null,O.mode,X),ia(X,L),X.return=O,O=X)}return b(O);case E:e:{for(ae=L.key;M!==null;){if(M.key===ae)if(M.tag===4&&M.stateNode.containerInfo===L.containerInfo&&M.stateNode.implementation===L.implementation){a(O,M.sibling),X=d(M,L.children||[]),X.return=O,O=X;break e}else{a(O,M);break}else s(O,M);M=M.sibling}X=bu(L,O.mode,X),X.return=O,O=X}return b(O);case q:return L=Pi(L),Oe(O,M,L,X)}if(Ae(L))return te(O,M,L,X);if(V(L)){if(ae=V(L),typeof ae!="function")throw Error(r(150));return L=ae.call(L),oe(O,M,L,X)}if(typeof L.then=="function")return Oe(O,M,Hl(L),X);if(L.$$typeof===$)return Oe(O,M,Dl(O,L),X);ql(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,M!==null&&M.tag===6?(a(O,M.sibling),X=d(M,L),X.return=O,O=X):(a(O,M),X=yu(L,O.mode,X),X.return=O,O=X),b(O)):a(O,M)}return function(O,M,L,X){try{na=0;var ae=Oe(O,M,L,X);return Is=null,ae}catch(ie){if(ie===$s||ie===Bl)throw ie;var _e=$t(29,ie,null,O.mode);return _e.lanes=X,_e.return=O,_e}finally{}}}var Wi=Wp(!0),eg=Wp(!1),fi=!1;function Mu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ou(t,s){t=t.updateQueue,s.updateQueue===t&&(s.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function hi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function di(t,s,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ee&2)!==0){var d=c.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),c.pending=s,s=Ol(t),Bp(t,null,a),s}return Ml(t,c,s,a),Ol(t)}function sa(t,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=t.pendingLanes,a|=c,s.lanes=a,Kd(t,a)}}function ju(t,s){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var d=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?d=p=b:p=p.next=b,a=a.next}while(a!==null);p===null?d=p=s:p=p.next=s}else d=p=s;a={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=s:t.next=s,a.lastBaseUpdate=s}var Lu=!1;function ra(){if(Lu){var t=qs;if(t!==null)throw t}}function aa(t,s,a,c){Lu=!1;var d=t.updateQueue;fi=!1;var p=d.firstBaseUpdate,b=d.lastBaseUpdate,T=d.shared.pending;if(T!==null){d.shared.pending=null;var A=T,R=A.next;A.next=null,b===null?p=R:b.next=R,b=A;var G=t.alternate;G!==null&&(G=G.updateQueue,T=G.lastBaseUpdate,T!==b&&(T===null?G.firstBaseUpdate=R:T.next=R,G.lastBaseUpdate=A))}if(p!==null){var F=d.baseState;b=0,G=R=A=null,T=p;do{var z=T.lane&-536870913,H=z!==T.lane;if(H?(ye&z)===z:(c&z)===z){z!==0&&z===Hs&&(Lu=!0),G!==null&&(G=G.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var te=t,oe=T;z=s;var Oe=a;switch(oe.tag){case 1:if(te=oe.payload,typeof te=="function"){F=te.call(Oe,F,z);break e}F=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=oe.payload,z=typeof te=="function"?te.call(Oe,F,z):te,z==null)break e;F=m({},F,z);break e;case 2:fi=!0}}z=T.callback,z!==null&&(t.flags|=64,H&&(t.flags|=8192),H=d.callbacks,H===null?d.callbacks=[z]:H.push(z))}else H={lane:z,tag:T.tag,payload:T.payload,callback:T.callback,next:null},G===null?(R=G=H,A=F):G=G.next=H,b|=z;if(T=T.next,T===null){if(T=d.shared.pending,T===null)break;H=T,T=H.next,H.next=null,d.lastBaseUpdate=H,d.shared.pending=null}}while(!0);G===null&&(A=F),d.baseState=A,d.firstBaseUpdate=R,d.lastBaseUpdate=G,p===null&&(d.shared.lanes=0),bi|=b,t.lanes=b,t.memoizedState=F}}function tg(t,s){if(typeof t!="function")throw Error(r(191,t));t.call(s)}function ng(t,s){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)tg(a[t],s)}var Vs=k(null),$l=k(0);function ig(t,s){t=Yn,Z($l,t),Z(Vs,s),Yn=t|s.baseLanes}function Ru(){Z($l,Yn),Z(Vs,Vs.current)}function Du(){Yn=$l.current,Y(Vs),Y($l)}var It=k(null),nn=null;function pi(t){var s=t.alternate;Z(Ke,Ke.current&1),Z(It,t),nn===null&&(s===null||Vs.current!==null||s.memoizedState!==null)&&(nn=t)}function zu(t){Z(Ke,Ke.current),Z(It,t),nn===null&&(nn=t)}function sg(t){t.tag===22?(Z(Ke,Ke.current),Z(It,t),nn===null&&(nn=t)):gi()}function gi(){Z(Ke,Ke.current),Z(It,It.current)}function Vt(t){Y(It),nn===t&&(nn=null),Y(Ke)}var Ke=k(0);function Il(t){for(var s=t;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Vf(a)||Gf(a)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Un=0,de=null,ke=null,Pe=null,Vl=!1,Gs=!1,es=!1,Gl=0,la=0,Ks=null,F1=0;function Ve(){throw Error(r(321))}function Bu(t,s){if(s===null)return!1;for(var a=0;a<s.length&&a<t.length;a++)if(!qt(t[a],s[a]))return!1;return!0}function Uu(t,s,a,c,d,p){return Un=p,de=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=t===null||t.memoizedState===null?$g:Wu,es=!1,p=a(c,d),es=!1,Gs&&(p=ag(s,a,c,d)),rg(t),p}function rg(t){B.H=ua;var s=ke!==null&&ke.next!==null;if(Un=0,Pe=ke=de=null,Vl=!1,la=0,Ks=null,s)throw Error(r(300));t===null||Ze||(t=t.dependencies,t!==null&&Rl(t)&&(Ze=!0))}function ag(t,s,a,c){de=t;var d=0;do{if(Gs&&(Ks=null),la=0,Gs=!1,25<=d)throw Error(r(301));if(d+=1,Pe=ke=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}B.H=Ig,p=s(a,c)}while(Gs);return p}function Q1(){var t=B.H,s=t.useState()[0];return s=typeof s.then=="function"?oa(s):s,t=t.useState()[0],(ke!==null?ke.memoizedState:null)!==t&&(de.flags|=1024),s}function Hu(){var t=Gl!==0;return Gl=0,t}function qu(t,s,a){s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~a}function $u(t){if(Vl){for(t=t.memoizedState;t!==null;){var s=t.queue;s!==null&&(s.pending=null),t=t.next}Vl=!1}Un=0,Pe=ke=de=null,Gs=!1,la=Gl=0,Ks=null}function xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?de.memoizedState=Pe=t:Pe=Pe.next=t,Pe}function Ye(){if(ke===null){var t=de.alternate;t=t!==null?t.memoizedState:null}else t=ke.next;var s=Pe===null?de.memoizedState:Pe.next;if(s!==null)Pe=s,ke=t;else{if(t===null)throw de.alternate===null?Error(r(467)):Error(r(310));ke=t,t={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Pe===null?de.memoizedState=Pe=t:Pe=Pe.next=t}return Pe}function Kl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oa(t){var s=la;return la+=1,Ks===null&&(Ks=[]),t=Jp(Ks,t,s),s=de,(Pe===null?s.memoizedState:Pe.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?$g:Wu),t}function Yl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return oa(t);if(t.$$typeof===$)return ut(t)}throw Error(r(438,String(t)))}function Iu(t){var s=null,a=de.updateQueue;if(a!==null&&(s=a.memoCache),s==null){var c=de.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(s={data:c.data.map(function(d){return d.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),a===null&&(a=Kl(),de.updateQueue=a),a.memoCache=s,a=s.data[s.index],a===void 0)for(a=s.data[s.index]=Array(t),c=0;c<t;c++)a[c]=ne;return s.index++,a}function Hn(t,s){return typeof s=="function"?s(t):s}function Xl(t){var s=Ye();return Vu(s,ke,t)}function Vu(t,s,a){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=a;var d=t.baseQueue,p=c.pending;if(p!==null){if(d!==null){var b=d.next;d.next=p.next,p.next=b}s.baseQueue=d=p,c.pending=null}if(p=t.baseState,d===null)t.memoizedState=p;else{s=d.next;var T=b=null,A=null,R=s,G=!1;do{var F=R.lane&-536870913;if(F!==R.lane?(ye&F)===F:(Un&F)===F){var z=R.revertLane;if(z===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),F===Hs&&(G=!0);else if((Un&z)===z){R=R.next,z===Hs&&(G=!0);continue}else F={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},A===null?(T=A=F,b=p):A=A.next=F,de.lanes|=z,bi|=z;F=R.action,es&&a(p,F),p=R.hasEagerState?R.eagerState:a(p,F)}else z={lane:F,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},A===null?(T=A=z,b=p):A=A.next=z,de.lanes|=F,bi|=F;R=R.next}while(R!==null&&R!==s);if(A===null?b=p:A.next=T,!qt(p,t.memoizedState)&&(Ze=!0,G&&(a=qs,a!==null)))throw a;t.memoizedState=p,t.baseState=b,t.baseQueue=A,c.lastRenderedState=p}return d===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Gu(t){var s=Ye(),a=s.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=t;var c=a.dispatch,d=a.pending,p=s.memoizedState;if(d!==null){a.pending=null;var b=d=d.next;do p=t(p,b.action),b=b.next;while(b!==d);qt(p,s.memoizedState)||(Ze=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),a.lastRenderedState=p}return[p,c]}function lg(t,s,a){var c=de,d=Ye(),p=ve;if(p){if(a===void 0)throw Error(r(407));a=a()}else a=s();var b=!qt((ke||d).memoizedState,a);if(b&&(d.memoizedState=a,Ze=!0),d=d.queue,Xu(ug.bind(null,c,d,t),[t]),d.getSnapshot!==s||b||Pe!==null&&Pe.memoizedState.tag&1){if(c.flags|=2048,Ys(9,{destroy:void 0},cg.bind(null,c,d,a,s),null),je===null)throw Error(r(349));p||(Un&127)!==0||og(c,s,a)}return a}function og(t,s,a){t.flags|=16384,t={getSnapshot:s,value:a},s=de.updateQueue,s===null?(s=Kl(),de.updateQueue=s,s.stores=[t]):(a=s.stores,a===null?s.stores=[t]:a.push(t))}function cg(t,s,a,c){s.value=a,s.getSnapshot=c,fg(s)&&hg(t)}function ug(t,s,a){return a(function(){fg(s)&&hg(t)})}function fg(t){var s=t.getSnapshot;t=t.value;try{var a=s();return!qt(t,a)}catch{return!0}}function hg(t){var s=Ki(t,2);s!==null&&Lt(s,t,2)}function Ku(t){var s=xt();if(typeof t=="function"){var a=t;if(t=a(),es){vn(!0);try{a()}finally{vn(!1)}}}return s.memoizedState=s.baseState=t,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:t},s}function dg(t,s,a,c){return t.baseState=a,Vu(t,ke,typeof c=="function"?c:Hn)}function J1(t,s,a,c,d){if(Jl(t))throw Error(r(485));if(t=s.action,t!==null){var p={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){p.listeners.push(b)}};B.T!==null?a(!0):p.isTransition=!1,c(p),a=s.pending,a===null?(p.next=s.pending=p,pg(s,p)):(p.next=a.next,s.pending=a.next=p)}}function pg(t,s){var a=s.action,c=s.payload,d=t.state;if(s.isTransition){var p=B.T,b={};B.T=b;try{var T=a(d,c),A=B.S;A!==null&&A(b,T),gg(t,s,T)}catch(R){Yu(t,s,R)}finally{p!==null&&b.types!==null&&(p.types=b.types),B.T=p}}else try{p=a(d,c),gg(t,s,p)}catch(R){Yu(t,s,R)}}function gg(t,s,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){mg(t,s,c)},function(c){return Yu(t,s,c)}):mg(t,s,a)}function mg(t,s,a){s.status="fulfilled",s.value=a,yg(s),t.state=a,s=t.pending,s!==null&&(a=s.next,a===s?t.pending=null:(a=a.next,s.next=a,pg(t,a)))}function Yu(t,s,a){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do s.status="rejected",s.reason=a,yg(s),s=s.next;while(s!==c)}t.action=null}function yg(t){t=t.listeners;for(var s=0;s<t.length;s++)(0,t[s])()}function bg(t,s){return s}function vg(t,s){if(ve){var a=je.formState;if(a!==null){e:{var c=de;if(ve){if(De){t:{for(var d=De,p=tn;d.nodeType!==8;){if(!p){d=null;break t}if(d=sn(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){De=sn(d.nextSibling),c=d.data==="F!";break e}}ci(c)}c=!1}c&&(s=a[0])}}return a=xt(),a.memoizedState=a.baseState=s,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bg,lastRenderedState:s},a.queue=c,a=Ug.bind(null,de,c),c.dispatch=a,c=Ku(!1),p=Zu.bind(null,de,!1,c.queue),c=xt(),d={state:s,dispatch:null,action:t,pending:null},c.queue=d,a=J1.bind(null,de,d,p,a),d.dispatch=a,c.memoizedState=t,[s,a,!1]}function Sg(t){var s=Ye();return wg(s,ke,t)}function wg(t,s,a){if(s=Vu(t,s,bg)[0],t=Xl(Hn)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var c=oa(s)}catch(b){throw b===$s?Bl:b}else c=s;s=Ye();var d=s.queue,p=d.dispatch;return a!==s.memoizedState&&(de.flags|=2048,Ys(9,{destroy:void 0},P1.bind(null,d,a),null)),[c,p,t]}function P1(t,s){t.action=s}function xg(t){var s=Ye(),a=ke;if(a!==null)return wg(s,a,t);Ye(),s=s.memoizedState,a=Ye();var c=a.queue.dispatch;return a.memoizedState=t,[s,c,!1]}function Ys(t,s,a,c){return t={tag:t,create:a,deps:c,inst:s,next:null},s=de.updateQueue,s===null&&(s=Kl(),de.updateQueue=s),a=s.lastEffect,a===null?s.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,s.lastEffect=t),t}function _g(){return Ye().memoizedState}function Fl(t,s,a,c){var d=xt();de.flags|=t,d.memoizedState=Ys(1|s,{destroy:void 0},a,c===void 0?null:c)}function Ql(t,s,a,c){var d=Ye();c=c===void 0?null:c;var p=d.memoizedState.inst;ke!==null&&c!==null&&Bu(c,ke.memoizedState.deps)?d.memoizedState=Ys(s,p,a,c):(de.flags|=t,d.memoizedState=Ys(1|s,p,a,c))}function Tg(t,s){Fl(8390656,8,t,s)}function Xu(t,s){Ql(2048,8,t,s)}function Z1(t){de.flags|=4;var s=de.updateQueue;if(s===null)s=Kl(),de.updateQueue=s,s.events=[t];else{var a=s.events;a===null?s.events=[t]:a.push(t)}}function Eg(t){var s=Ye().memoizedState;return Z1({ref:s,nextImpl:t}),function(){if((Ee&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function Ag(t,s){return Ql(4,2,t,s)}function Ng(t,s){return Ql(4,4,t,s)}function Cg(t,s){if(typeof s=="function"){t=t();var a=s(t);return function(){typeof a=="function"?a():s(null)}}if(s!=null)return t=t(),s.current=t,function(){s.current=null}}function kg(t,s,a){a=a!=null?a.concat([t]):null,Ql(4,4,Cg.bind(null,s,t),a)}function Fu(){}function Mg(t,s){var a=Ye();s=s===void 0?null:s;var c=a.memoizedState;return s!==null&&Bu(s,c[1])?c[0]:(a.memoizedState=[t,s],t)}function Og(t,s){var a=Ye();s=s===void 0?null:s;var c=a.memoizedState;if(s!==null&&Bu(s,c[1]))return c[0];if(c=t(),es){vn(!0);try{t()}finally{vn(!1)}}return a.memoizedState=[c,s],c}function Qu(t,s,a){return a===void 0||(Un&1073741824)!==0&&(ye&261930)===0?t.memoizedState=s:(t.memoizedState=a,t=jm(),de.lanes|=t,bi|=t,a)}function jg(t,s,a,c){return qt(a,s)?a:Vs.current!==null?(t=Qu(t,a,c),qt(t,s)||(Ze=!0),t):(Un&42)===0||(Un&1073741824)!==0&&(ye&261930)===0?(Ze=!0,t.memoizedState=a):(t=jm(),de.lanes|=t,bi|=t,s)}function Lg(t,s,a,c,d){var p=P.p;P.p=p!==0&&8>p?p:8;var b=B.T,T={};B.T=T,Zu(t,!1,s,a);try{var A=d(),R=B.S;if(R!==null&&R(T,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var G=X1(A,c);ca(t,s,G,Yt(t))}else ca(t,s,c,Yt(t))}catch(F){ca(t,s,{then:function(){},status:"rejected",reason:F},Yt())}finally{P.p=p,b!==null&&T.types!==null&&(b.types=T.types),B.T=b}}function W1(){}function Ju(t,s,a,c){if(t.tag!==5)throw Error(r(476));var d=Rg(t).queue;Lg(t,d,s,se,a===null?W1:function(){return Dg(t),a(c)})}function Rg(t){var s=t.memoizedState;if(s!==null)return s;s={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:se},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:a},next:null},t.memoizedState=s,t=t.alternate,t!==null&&(t.memoizedState=s),s}function Dg(t){var s=Rg(t);s.next===null&&(s=t.alternate.memoizedState),ca(t,s.next.queue,{},Yt())}function Pu(){return ut(Aa)}function zg(){return Ye().memoizedState}function Bg(){return Ye().memoizedState}function ew(t){for(var s=t.return;s!==null;){switch(s.tag){case 24:case 3:var a=Yt();t=hi(a);var c=di(s,t,a);c!==null&&(Lt(c,s,a),sa(c,s,a)),s={cache:Au()},t.payload=s;return}s=s.return}}function tw(t,s,a){var c=Yt();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Jl(t)?Hg(s,a):(a=gu(t,s,a,c),a!==null&&(Lt(a,t,c),qg(a,s,c)))}function Ug(t,s,a){var c=Yt();ca(t,s,a,c)}function ca(t,s,a,c){var d={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Jl(t))Hg(s,d);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var b=s.lastRenderedState,T=p(b,a);if(d.hasEagerState=!0,d.eagerState=T,qt(T,b))return Ml(t,s,d,0),je===null&&kl(),!1}catch{}finally{}if(a=gu(t,s,d,c),a!==null)return Lt(a,t,c),qg(a,s,c),!0}return!1}function Zu(t,s,a,c){if(c={lane:2,revertLane:Of(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Jl(t)){if(s)throw Error(r(479))}else s=gu(t,a,c,2),s!==null&&Lt(s,t,2)}function Jl(t){var s=t.alternate;return t===de||s!==null&&s===de}function Hg(t,s){Gs=Vl=!0;var a=t.pending;a===null?s.next=s:(s.next=a.next,a.next=s),t.pending=s}function qg(t,s,a){if((a&4194048)!==0){var c=s.lanes;c&=t.pendingLanes,a|=c,s.lanes=a,Kd(t,a)}}var ua={readContext:ut,use:Yl,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};ua.useEffectEvent=Ve;var $g={readContext:ut,use:Yl,useCallback:function(t,s){return xt().memoizedState=[t,s===void 0?null:s],t},useContext:ut,useEffect:Tg,useImperativeHandle:function(t,s,a){a=a!=null?a.concat([t]):null,Fl(4194308,4,Cg.bind(null,s,t),a)},useLayoutEffect:function(t,s){return Fl(4194308,4,t,s)},useInsertionEffect:function(t,s){Fl(4,2,t,s)},useMemo:function(t,s){var a=xt();s=s===void 0?null:s;var c=t();if(es){vn(!0);try{t()}finally{vn(!1)}}return a.memoizedState=[c,s],c},useReducer:function(t,s,a){var c=xt();if(a!==void 0){var d=a(s);if(es){vn(!0);try{a(s)}finally{vn(!1)}}}else d=s;return c.memoizedState=c.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},c.queue=t,t=t.dispatch=tw.bind(null,de,t),[c.memoizedState,t]},useRef:function(t){var s=xt();return t={current:t},s.memoizedState=t},useState:function(t){t=Ku(t);var s=t.queue,a=Ug.bind(null,de,s);return s.dispatch=a,[t.memoizedState,a]},useDebugValue:Fu,useDeferredValue:function(t,s){var a=xt();return Qu(a,t,s)},useTransition:function(){var t=Ku(!1);return t=Lg.bind(null,de,t.queue,!0,!1),xt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,s,a){var c=de,d=xt();if(ve){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),je===null)throw Error(r(349));(ye&127)!==0||og(c,s,a)}d.memoizedState=a;var p={value:a,getSnapshot:s};return d.queue=p,Tg(ug.bind(null,c,p,t),[t]),c.flags|=2048,Ys(9,{destroy:void 0},cg.bind(null,c,p,a,s),null),a},useId:function(){var t=xt(),s=je.identifierPrefix;if(ve){var a=xn,c=wn;a=(c&~(1<<32-wt(c)-1)).toString(32)+a,s="_"+s+"R_"+a,a=Gl++,0<a&&(s+="H"+a.toString(32)),s+="_"}else a=F1++,s="_"+s+"r_"+a.toString(32)+"_";return t.memoizedState=s},useHostTransitionStatus:Pu,useFormState:vg,useActionState:vg,useOptimistic:function(t){var s=xt();s.memoizedState=s.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=a,s=Zu.bind(null,de,!0,a),a.dispatch=s,[t,s]},useMemoCache:Iu,useCacheRefresh:function(){return xt().memoizedState=ew.bind(null,de)},useEffectEvent:function(t){var s=xt(),a={impl:t};return s.memoizedState=a,function(){if((Ee&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Wu={readContext:ut,use:Yl,useCallback:Mg,useContext:ut,useEffect:Xu,useImperativeHandle:kg,useInsertionEffect:Ag,useLayoutEffect:Ng,useMemo:Og,useReducer:Xl,useRef:_g,useState:function(){return Xl(Hn)},useDebugValue:Fu,useDeferredValue:function(t,s){var a=Ye();return jg(a,ke.memoizedState,t,s)},useTransition:function(){var t=Xl(Hn)[0],s=Ye().memoizedState;return[typeof t=="boolean"?t:oa(t),s]},useSyncExternalStore:lg,useId:zg,useHostTransitionStatus:Pu,useFormState:Sg,useActionState:Sg,useOptimistic:function(t,s){var a=Ye();return dg(a,ke,t,s)},useMemoCache:Iu,useCacheRefresh:Bg};Wu.useEffectEvent=Eg;var Ig={readContext:ut,use:Yl,useCallback:Mg,useContext:ut,useEffect:Xu,useImperativeHandle:kg,useInsertionEffect:Ag,useLayoutEffect:Ng,useMemo:Og,useReducer:Gu,useRef:_g,useState:function(){return Gu(Hn)},useDebugValue:Fu,useDeferredValue:function(t,s){var a=Ye();return ke===null?Qu(a,t,s):jg(a,ke.memoizedState,t,s)},useTransition:function(){var t=Gu(Hn)[0],s=Ye().memoizedState;return[typeof t=="boolean"?t:oa(t),s]},useSyncExternalStore:lg,useId:zg,useHostTransitionStatus:Pu,useFormState:xg,useActionState:xg,useOptimistic:function(t,s){var a=Ye();return ke!==null?dg(a,ke,t,s):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Iu,useCacheRefresh:Bg};Ig.useEffectEvent=Eg;function ef(t,s,a,c){s=t.memoizedState,a=a(c,s),a=a==null?s:m({},s,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var tf={enqueueSetState:function(t,s,a){t=t._reactInternals;var c=Yt(),d=hi(c);d.payload=s,a!=null&&(d.callback=a),s=di(t,d,c),s!==null&&(Lt(s,t,c),sa(s,t,c))},enqueueReplaceState:function(t,s,a){t=t._reactInternals;var c=Yt(),d=hi(c);d.tag=1,d.payload=s,a!=null&&(d.callback=a),s=di(t,d,c),s!==null&&(Lt(s,t,c),sa(s,t,c))},enqueueForceUpdate:function(t,s){t=t._reactInternals;var a=Yt(),c=hi(a);c.tag=2,s!=null&&(c.callback=s),s=di(t,c,a),s!==null&&(Lt(s,t,a),sa(s,t,a))}};function Vg(t,s,a,c,d,p,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,p,b):s.prototype&&s.prototype.isPureReactComponent?!Jr(a,c)||!Jr(d,p):!0}function Gg(t,s,a,c){t=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,c),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,c),s.state!==t&&tf.enqueueReplaceState(s,s.state,null)}function ts(t,s){var a=s;if("ref"in s){a={};for(var c in s)c!=="ref"&&(a[c]=s[c])}if(t=t.defaultProps){a===s&&(a=m({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function Kg(t){Cl(t)}function Yg(t){console.error(t)}function Xg(t){Cl(t)}function Pl(t,s){try{var a=t.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(c){setTimeout(function(){throw c})}}function Fg(t,s,a){try{var c=t.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function nf(t,s,a){return a=hi(a),a.tag=3,a.payload={element:null},a.callback=function(){Pl(t,s)},a}function Qg(t){return t=hi(t),t.tag=3,t}function Jg(t,s,a,c){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var p=c.value;t.payload=function(){return d(p)},t.callback=function(){Fg(s,a,c)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){Fg(s,a,c),typeof d!="function"&&(vi===null?vi=new Set([this]):vi.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function nw(t,s,a,c,d){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(s=a.alternate,s!==null&&Us(s,a,d,!0),a=It.current,a!==null){switch(a.tag){case 31:case 13:return nn===null?co():a.alternate===null&&Ge===0&&(Ge=3),a.flags&=-257,a.flags|=65536,a.lanes=d,c===Ul?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([c]):s.add(c),Cf(t,c,d)),!1;case 22:return a.flags|=65536,c===Ul?a.flags|=16384:(s=a.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=s):(a=s.retryQueue,a===null?s.retryQueue=new Set([c]):a.add(c)),Cf(t,c,d)),!1}throw Error(r(435,a.tag))}return Cf(t,c,d),co(),!1}if(ve)return s=It.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=d,c!==wu&&(t=Error(r(422),{cause:c}),Wr(Zt(t,a)))):(c!==wu&&(s=Error(r(423),{cause:c}),Wr(Zt(s,a))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,c=Zt(c,a),d=nf(t.stateNode,c,d),ju(t,d),Ge!==4&&(Ge=2)),!1;var p=Error(r(520),{cause:c});if(p=Zt(p,a),ba===null?ba=[p]:ba.push(p),Ge!==4&&(Ge=2),s===null)return!0;c=Zt(c,a),a=s;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=nf(a.stateNode,c,t),ju(a,t),!1;case 1:if(s=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(vi===null||!vi.has(p))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Qg(d),Jg(d,t,a,c),ju(a,d),!1}a=a.return}while(a!==null);return!1}var sf=Error(r(461)),Ze=!1;function ft(t,s,a,c){s.child=t===null?eg(s,null,a,c):Wi(s,t.child,a,c)}function Pg(t,s,a,c,d){a=a.render;var p=s.ref;if("ref"in c){var b={};for(var T in c)T!=="ref"&&(b[T]=c[T])}else b=c;return Qi(s),c=Uu(t,s,a,b,p,d),T=Hu(),t!==null&&!Ze?(qu(t,s,d),qn(t,s,d)):(ve&&T&&vu(s),s.flags|=1,ft(t,s,c,d),s.child)}function Zg(t,s,a,c,d){if(t===null){var p=a.type;return typeof p=="function"&&!mu(p)&&p.defaultProps===void 0&&a.compare===null?(s.tag=15,s.type=p,Wg(t,s,p,c,d)):(t=jl(a.type,null,c,s,s.mode,d),t.ref=s.ref,t.return=s,s.child=t)}if(p=t.child,!hf(t,d)){var b=p.memoizedProps;if(a=a.compare,a=a!==null?a:Jr,a(b,c)&&t.ref===s.ref)return qn(t,s,d)}return s.flags|=1,t=Rn(p,c),t.ref=s.ref,t.return=s,s.child=t}function Wg(t,s,a,c,d){if(t!==null){var p=t.memoizedProps;if(Jr(p,c)&&t.ref===s.ref)if(Ze=!1,s.pendingProps=c=p,hf(t,d))(t.flags&131072)!==0&&(Ze=!0);else return s.lanes=t.lanes,qn(t,s,d)}return rf(t,s,a,c,d)}function em(t,s,a,c){var d=c.children,p=t!==null?t.memoizedState:null;if(t===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((s.flags&128)!==0){if(p=p!==null?p.baseLanes|a:a,t!==null){for(c=s.child=t.child,d=0;c!==null;)d=d|c.lanes|c.childLanes,c=c.sibling;c=d&~p}else c=0,s.child=null;return tm(t,s,p,a,c)}if((a&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},t!==null&&zl(s,p!==null?p.cachePool:null),p!==null?ig(s,p):Ru(),sg(s);else return c=s.lanes=536870912,tm(t,s,p!==null?p.baseLanes|a:a,a,c)}else p!==null?(zl(s,p.cachePool),ig(s,p),gi(),s.memoizedState=null):(t!==null&&zl(s,null),Ru(),gi());return ft(t,s,d,a),s.child}function fa(t,s){return t!==null&&t.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function tm(t,s,a,c,d){var p=Cu();return p=p===null?null:{parent:Je._currentValue,pool:p},s.memoizedState={baseLanes:a,cachePool:p},t!==null&&zl(s,null),Ru(),sg(s),t!==null&&Us(t,s,c,!0),s.childLanes=d,null}function Zl(t,s){return s=eo({mode:s.mode,children:s.children},t.mode),s.ref=t.ref,t.child=s,s.return=t,s}function nm(t,s,a){return Wi(s,t.child,null,a),t=Zl(s,s.pendingProps),t.flags|=2,Vt(s),s.memoizedState=null,t}function iw(t,s,a){var c=s.pendingProps,d=(s.flags&128)!==0;if(s.flags&=-129,t===null){if(ve){if(c.mode==="hidden")return t=Zl(s,c),s.lanes=536870912,fa(null,t);if(zu(s),(t=De)?(t=py(t,tn),t=t!==null&&t.data==="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:li!==null?{id:wn,overflow:xn}:null,retryLane:536870912,hydrationErrors:null},a=Hp(t),a.return=s,s.child=a,ct=s,De=null)):t=null,t===null)throw ci(s);return s.lanes=536870912,null}return Zl(s,c)}var p=t.memoizedState;if(p!==null){var b=p.dehydrated;if(zu(s),d)if(s.flags&256)s.flags&=-257,s=nm(t,s,a);else if(s.memoizedState!==null)s.child=t.child,s.flags|=128,s=null;else throw Error(r(558));else if(Ze||Us(t,s,a,!1),d=(a&t.childLanes)!==0,Ze||d){if(c=je,c!==null&&(b=Yd(c,a),b!==0&&b!==p.retryLane))throw p.retryLane=b,Ki(t,b),Lt(c,t,b),sf;co(),s=nm(t,s,a)}else t=p.treeContext,De=sn(b.nextSibling),ct=s,ve=!0,oi=null,tn=!1,t!==null&&Ip(s,t),s=Zl(s,c),s.flags|=4096;return s}return t=Rn(t.child,{mode:c.mode,children:c.children}),t.ref=s.ref,s.child=t,t.return=s,t}function Wl(t,s){var a=s.ref;if(a===null)t!==null&&t.ref!==null&&(s.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(t===null||t.ref!==a)&&(s.flags|=4194816)}}function rf(t,s,a,c,d){return Qi(s),a=Uu(t,s,a,c,void 0,d),c=Hu(),t!==null&&!Ze?(qu(t,s,d),qn(t,s,d)):(ve&&c&&vu(s),s.flags|=1,ft(t,s,a,d),s.child)}function im(t,s,a,c,d,p){return Qi(s),s.updateQueue=null,a=ag(s,c,a,d),rg(t),c=Hu(),t!==null&&!Ze?(qu(t,s,p),qn(t,s,p)):(ve&&c&&vu(s),s.flags|=1,ft(t,s,a,p),s.child)}function sm(t,s,a,c,d){if(Qi(s),s.stateNode===null){var p=Rs,b=a.contextType;typeof b=="object"&&b!==null&&(p=ut(b)),p=new a(c,p),s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=tf,s.stateNode=p,p._reactInternals=s,p=s.stateNode,p.props=c,p.state=s.memoizedState,p.refs={},Mu(s),b=a.contextType,p.context=typeof b=="object"&&b!==null?ut(b):Rs,p.state=s.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(ef(s,a,b,c),p.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(b=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),b!==p.state&&tf.enqueueReplaceState(p,p.state,null),aa(s,c,p,d),ra(),p.state=s.memoizedState),typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!0}else if(t===null){p=s.stateNode;var T=s.memoizedProps,A=ts(a,T);p.props=A;var R=p.context,G=a.contextType;b=Rs,typeof G=="object"&&G!==null&&(b=ut(G));var F=a.getDerivedStateFromProps;G=typeof F=="function"||typeof p.getSnapshotBeforeUpdate=="function",T=s.pendingProps!==T,G||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T||R!==b)&&Gg(s,p,c,b),fi=!1;var z=s.memoizedState;p.state=z,aa(s,c,p,d),ra(),R=s.memoizedState,T||z!==R||fi?(typeof F=="function"&&(ef(s,a,F,c),R=s.memoizedState),(A=fi||Vg(s,a,A,c,z,R,b))?(G||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(s.flags|=4194308)):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=c,s.memoizedState=R),p.props=c,p.state=R,p.context=b,c=A):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!1)}else{p=s.stateNode,Ou(t,s),b=s.memoizedProps,G=ts(a,b),p.props=G,F=s.pendingProps,z=p.context,R=a.contextType,A=Rs,typeof R=="object"&&R!==null&&(A=ut(R)),T=a.getDerivedStateFromProps,(R=typeof T=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(b!==F||z!==A)&&Gg(s,p,c,A),fi=!1,z=s.memoizedState,p.state=z,aa(s,c,p,d),ra();var H=s.memoizedState;b!==F||z!==H||fi||t!==null&&t.dependencies!==null&&Rl(t.dependencies)?(typeof T=="function"&&(ef(s,a,T,c),H=s.memoizedState),(G=fi||Vg(s,a,G,c,z,H,A)||t!==null&&t.dependencies!==null&&Rl(t.dependencies))?(R||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,H,A),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,H,A)),typeof p.componentDidUpdate=="function"&&(s.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof p.componentDidUpdate!="function"||b===t.memoizedProps&&z===t.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&z===t.memoizedState||(s.flags|=1024),s.memoizedProps=c,s.memoizedState=H),p.props=c,p.state=H,p.context=A,c=G):(typeof p.componentDidUpdate!="function"||b===t.memoizedProps&&z===t.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&z===t.memoizedState||(s.flags|=1024),c=!1)}return p=c,Wl(t,s),c=(s.flags&128)!==0,p||c?(p=s.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:p.render(),s.flags|=1,t!==null&&c?(s.child=Wi(s,t.child,null,d),s.child=Wi(s,null,a,d)):ft(t,s,a,d),s.memoizedState=p.state,t=s.child):t=qn(t,s,d),t}function rm(t,s,a,c){return Xi(),s.flags|=256,ft(t,s,a,c),s.child}var af={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lf(t){return{baseLanes:t,cachePool:Fp()}}function of(t,s,a){return t=t!==null?t.childLanes&~a:0,s&&(t|=Kt),t}function am(t,s,a){var c=s.pendingProps,d=!1,p=(s.flags&128)!==0,b;if((b=p)||(b=t!==null&&t.memoizedState===null?!1:(Ke.current&2)!==0),b&&(d=!0,s.flags&=-129),b=(s.flags&32)!==0,s.flags&=-33,t===null){if(ve){if(d?pi(s):gi(),(t=De)?(t=py(t,tn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:li!==null?{id:wn,overflow:xn}:null,retryLane:536870912,hydrationErrors:null},a=Hp(t),a.return=s,s.child=a,ct=s,De=null)):t=null,t===null)throw ci(s);return Gf(t)?s.lanes=32:s.lanes=536870912,null}var T=c.children;return c=c.fallback,d?(gi(),d=s.mode,T=eo({mode:"hidden",children:T},d),c=Yi(c,d,a,null),T.return=s,c.return=s,T.sibling=c,s.child=T,c=s.child,c.memoizedState=lf(a),c.childLanes=of(t,b,a),s.memoizedState=af,fa(null,c)):(pi(s),cf(s,T))}var A=t.memoizedState;if(A!==null&&(T=A.dehydrated,T!==null)){if(p)s.flags&256?(pi(s),s.flags&=-257,s=uf(t,s,a)):s.memoizedState!==null?(gi(),s.child=t.child,s.flags|=128,s=null):(gi(),T=c.fallback,d=s.mode,c=eo({mode:"visible",children:c.children},d),T=Yi(T,d,a,null),T.flags|=2,c.return=s,T.return=s,c.sibling=T,s.child=c,Wi(s,t.child,null,a),c=s.child,c.memoizedState=lf(a),c.childLanes=of(t,b,a),s.memoizedState=af,s=fa(null,c));else if(pi(s),Gf(T)){if(b=T.nextSibling&&T.nextSibling.dataset,b)var R=b.dgst;b=R,c=Error(r(419)),c.stack="",c.digest=b,Wr({value:c,source:null,stack:null}),s=uf(t,s,a)}else if(Ze||Us(t,s,a,!1),b=(a&t.childLanes)!==0,Ze||b){if(b=je,b!==null&&(c=Yd(b,a),c!==0&&c!==A.retryLane))throw A.retryLane=c,Ki(t,c),Lt(b,t,c),sf;Vf(T)||co(),s=uf(t,s,a)}else Vf(T)?(s.flags|=192,s.child=t.child,s=null):(t=A.treeContext,De=sn(T.nextSibling),ct=s,ve=!0,oi=null,tn=!1,t!==null&&Ip(s,t),s=cf(s,c.children),s.flags|=4096);return s}return d?(gi(),T=c.fallback,d=s.mode,A=t.child,R=A.sibling,c=Rn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,R!==null?T=Rn(R,T):(T=Yi(T,d,a,null),T.flags|=2),T.return=s,c.return=s,c.sibling=T,s.child=c,fa(null,c),c=s.child,T=t.child.memoizedState,T===null?T=lf(a):(d=T.cachePool,d!==null?(A=Je._currentValue,d=d.parent!==A?{parent:A,pool:A}:d):d=Fp(),T={baseLanes:T.baseLanes|a,cachePool:d}),c.memoizedState=T,c.childLanes=of(t,b,a),s.memoizedState=af,fa(t.child,c)):(pi(s),a=t.child,t=a.sibling,a=Rn(a,{mode:"visible",children:c.children}),a.return=s,a.sibling=null,t!==null&&(b=s.deletions,b===null?(s.deletions=[t],s.flags|=16):b.push(t)),s.child=a,s.memoizedState=null,a)}function cf(t,s){return s=eo({mode:"visible",children:s},t.mode),s.return=t,t.child=s}function eo(t,s){return t=$t(22,t,null,s),t.lanes=0,t}function uf(t,s,a){return Wi(s,t.child,null,a),t=cf(s,s.pendingProps.children),t.flags|=2,s.memoizedState=null,t}function lm(t,s,a){t.lanes|=s;var c=t.alternate;c!==null&&(c.lanes|=s),Tu(t.return,s,a)}function ff(t,s,a,c,d,p){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:d,treeForkCount:p}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=c,b.tail=a,b.tailMode=d,b.treeForkCount=p)}function om(t,s,a){var c=s.pendingProps,d=c.revealOrder,p=c.tail;c=c.children;var b=Ke.current,T=(b&2)!==0;if(T?(b=b&1|2,s.flags|=128):b&=1,Z(Ke,b),ft(t,s,c,a),c=ve?Zr:0,!T&&t!==null&&(t.flags&128)!==0)e:for(t=s.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&lm(t,a,s);else if(t.tag===19)lm(t,a,s);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===s)break e;for(;t.sibling===null;){if(t.return===null||t.return===s)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(a=s.child,d=null;a!==null;)t=a.alternate,t!==null&&Il(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=s.child,s.child=null):(d=a.sibling,a.sibling=null),ff(s,!1,d,a,p,c);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=s.child,s.child=null;d!==null;){if(t=d.alternate,t!==null&&Il(t)===null){s.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}ff(s,!0,a,null,p,c);break;case"together":ff(s,!1,null,null,void 0,c);break;default:s.memoizedState=null}return s.child}function qn(t,s,a){if(t!==null&&(s.dependencies=t.dependencies),bi|=s.lanes,(a&s.childLanes)===0)if(t!==null){if(Us(t,s,a,!1),(a&s.childLanes)===0)return null}else return null;if(t!==null&&s.child!==t.child)throw Error(r(153));if(s.child!==null){for(t=s.child,a=Rn(t,t.pendingProps),s.child=a,a.return=s;t.sibling!==null;)t=t.sibling,a=a.sibling=Rn(t,t.pendingProps),a.return=s;a.sibling=null}return s.child}function hf(t,s){return(t.lanes&s)!==0?!0:(t=t.dependencies,!!(t!==null&&Rl(t)))}function sw(t,s,a){switch(s.tag){case 3:tt(s,s.stateNode.containerInfo),ui(s,Je,t.memoizedState.cache),Xi();break;case 27:case 5:Bi(s);break;case 4:tt(s,s.stateNode.containerInfo);break;case 10:ui(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,zu(s),null;break;case 13:var c=s.memoizedState;if(c!==null)return c.dehydrated!==null?(pi(s),s.flags|=128,null):(a&s.child.childLanes)!==0?am(t,s,a):(pi(s),t=qn(t,s,a),t!==null?t.sibling:null);pi(s);break;case 19:var d=(t.flags&128)!==0;if(c=(a&s.childLanes)!==0,c||(Us(t,s,a,!1),c=(a&s.childLanes)!==0),d){if(c)return om(t,s,a);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Z(Ke,Ke.current),c)break;return null;case 22:return s.lanes=0,em(t,s,a,s.pendingProps);case 24:ui(s,Je,t.memoizedState.cache)}return qn(t,s,a)}function cm(t,s,a){if(t!==null)if(t.memoizedProps!==s.pendingProps)Ze=!0;else{if(!hf(t,a)&&(s.flags&128)===0)return Ze=!1,sw(t,s,a);Ze=(t.flags&131072)!==0}else Ze=!1,ve&&(s.flags&1048576)!==0&&$p(s,Zr,s.index);switch(s.lanes=0,s.tag){case 16:e:{var c=s.pendingProps;if(t=Pi(s.elementType),s.type=t,typeof t=="function")mu(t)?(c=ts(t,c),s.tag=1,s=sm(null,s,t,c,a)):(s.tag=0,s=rf(null,s,t,c,a));else{if(t!=null){var d=t.$$typeof;if(d===I){s.tag=11,s=Pg(null,s,t,c,a);break e}else if(d===Q){s.tag=14,s=Zg(null,s,t,c,a);break e}}throw s=W(t)||t,Error(r(306,s,""))}}return s;case 0:return rf(t,s,s.type,s.pendingProps,a);case 1:return c=s.type,d=ts(c,s.pendingProps),sm(t,s,c,d,a);case 3:e:{if(tt(s,s.stateNode.containerInfo),t===null)throw Error(r(387));c=s.pendingProps;var p=s.memoizedState;d=p.element,Ou(t,s),aa(s,c,null,a);var b=s.memoizedState;if(c=b.cache,ui(s,Je,c),c!==p.cache&&Eu(s,[Je],a,!0),ra(),c=b.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:b.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=rm(t,s,c,a);break e}else if(c!==d){d=Zt(Error(r(424)),s),Wr(d),s=rm(t,s,c,a);break e}else{switch(t=s.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(De=sn(t.firstChild),ct=s,ve=!0,oi=null,tn=!0,a=eg(s,null,c,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Xi(),c===d){s=qn(t,s,a);break e}ft(t,s,c,a)}s=s.child}return s;case 26:return Wl(t,s),t===null?(a=Sy(s.type,null,s.pendingProps,null))?s.memoizedState=a:ve||(a=s.type,t=s.pendingProps,c=yo(re.current).createElement(a),c[ot]=s,c[Nt]=t,ht(c,a,t),at(c),s.stateNode=c):s.memoizedState=Sy(s.type,t.memoizedProps,s.pendingProps,t.memoizedState),null;case 27:return Bi(s),t===null&&ve&&(c=s.stateNode=yy(s.type,s.pendingProps,re.current),ct=s,tn=!0,d=De,_i(s.type)?(Kf=d,De=sn(c.firstChild)):De=d),ft(t,s,s.pendingProps.children,a),Wl(t,s),t===null&&(s.flags|=4194304),s.child;case 5:return t===null&&ve&&((d=c=De)&&(c=Rw(c,s.type,s.pendingProps,tn),c!==null?(s.stateNode=c,ct=s,De=sn(c.firstChild),tn=!1,d=!0):d=!1),d||ci(s)),Bi(s),d=s.type,p=s.pendingProps,b=t!==null?t.memoizedProps:null,c=p.children,qf(d,p)?c=null:b!==null&&qf(d,b)&&(s.flags|=32),s.memoizedState!==null&&(d=Uu(t,s,Q1,null,null,a),Aa._currentValue=d),Wl(t,s),ft(t,s,c,a),s.child;case 6:return t===null&&ve&&((t=a=De)&&(a=Dw(a,s.pendingProps,tn),a!==null?(s.stateNode=a,ct=s,De=null,t=!0):t=!1),t||ci(s)),null;case 13:return am(t,s,a);case 4:return tt(s,s.stateNode.containerInfo),c=s.pendingProps,t===null?s.child=Wi(s,null,c,a):ft(t,s,c,a),s.child;case 11:return Pg(t,s,s.type,s.pendingProps,a);case 7:return ft(t,s,s.pendingProps,a),s.child;case 8:return ft(t,s,s.pendingProps.children,a),s.child;case 12:return ft(t,s,s.pendingProps.children,a),s.child;case 10:return c=s.pendingProps,ui(s,s.type,c.value),ft(t,s,c.children,a),s.child;case 9:return d=s.type._context,c=s.pendingProps.children,Qi(s),d=ut(d),c=c(d),s.flags|=1,ft(t,s,c,a),s.child;case 14:return Zg(t,s,s.type,s.pendingProps,a);case 15:return Wg(t,s,s.type,s.pendingProps,a);case 19:return om(t,s,a);case 31:return iw(t,s,a);case 22:return em(t,s,a,s.pendingProps);case 24:return Qi(s),c=ut(Je),t===null?(d=Cu(),d===null&&(d=je,p=Au(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=a),d=p),s.memoizedState={parent:c,cache:d},Mu(s),ui(s,Je,d)):((t.lanes&a)!==0&&(Ou(t,s),aa(s,null,null,a),ra()),d=t.memoizedState,p=s.memoizedState,d.parent!==c?(d={parent:c,cache:c},s.memoizedState=d,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=d),ui(s,Je,c)):(c=p.cache,ui(s,Je,c),c!==d.cache&&Eu(s,[Je],a,!0))),ft(t,s,s.pendingProps.children,a),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function $n(t){t.flags|=4}function df(t,s,a,c,d){if((s=(t.mode&32)!==0)&&(s=!1),s){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(zm())t.flags|=8192;else throw Zi=Ul,ku}else t.flags&=-16777217}function um(t,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ey(s))if(zm())t.flags|=8192;else throw Zi=Ul,ku}function to(t,s){s!==null&&(t.flags|=4),t.flags&16384&&(s=t.tag!==22?Vd():536870912,t.lanes|=s,Js|=s)}function ha(t,s){if(!ve)switch(t.tailMode){case"hidden":s=t.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.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?s||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function ze(t){var s=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(s)for(var d=t.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags&65011712,c|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=c,t.childLanes=a,s}function rw(t,s,a){var c=s.pendingProps;switch(Su(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(s),null;case 1:return ze(s),null;case 3:return a=s.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Bn(Je),Re(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Bs(s)?$n(s):t===null||t.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,xu())),ze(s),null;case 26:var d=s.type,p=s.memoizedState;return t===null?($n(s),p!==null?(ze(s),um(s,p)):(ze(s),df(s,d,null,c,a))):p?p!==t.memoizedState?($n(s),ze(s),um(s,p)):(ze(s),s.flags&=-16777217):(t=t.memoizedProps,t!==c&&$n(s),ze(s),df(s,d,t,c,a)),null;case 27:if(kn(s),a=re.current,d=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==c&&$n(s);else{if(!c){if(s.stateNode===null)throw Error(r(166));return ze(s),null}t=ee.current,Bs(s)?Vp(s):(t=yy(d,c,a),s.stateNode=t,$n(s))}return ze(s),null;case 5:if(kn(s),d=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==c&&$n(s);else{if(!c){if(s.stateNode===null)throw Error(r(166));return ze(s),null}if(p=ee.current,Bs(s))Vp(s);else{var b=yo(re.current);switch(p){case 1:p=b.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=b.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=b.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=b.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=b.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?b.createElement("select",{is:c.is}):b.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?b.createElement(d,{is:c.is}):b.createElement(d)}}p[ot]=s,p[Nt]=c;e:for(b=s.child;b!==null;){if(b.tag===5||b.tag===6)p.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===s)break e;for(;b.sibling===null;){if(b.return===null||b.return===s)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}s.stateNode=p;e:switch(ht(p,d,c),d){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&$n(s)}}return ze(s),df(s,s.type,t===null?null:t.memoizedProps,s.pendingProps,a),null;case 6:if(t&&s.stateNode!=null)t.memoizedProps!==c&&$n(s);else{if(typeof c!="string"&&s.stateNode===null)throw Error(r(166));if(t=re.current,Bs(s)){if(t=s.stateNode,a=s.memoizedProps,c=null,d=ct,d!==null)switch(d.tag){case 27:case 5:c=d.memoizedProps}t[ot]=s,t=!!(t.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||ay(t.nodeValue,a)),t||ci(s,!0)}else t=yo(t).createTextNode(c),t[ot]=s,s.stateNode=t}return ze(s),null;case 31:if(a=s.memoizedState,t===null||t.memoizedState!==null){if(c=Bs(s),a!==null){if(t===null){if(!c)throw Error(r(318));if(t=s.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ot]=s}else Xi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ze(s),t=!1}else a=xu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return s.flags&256?(Vt(s),s):(Vt(s),null);if((s.flags&128)!==0)throw Error(r(558))}return ze(s),null;case 13:if(c=s.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Bs(s),c!==null&&c.dehydrated!==null){if(t===null){if(!d)throw Error(r(318));if(d=s.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(r(317));d[ot]=s}else Xi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ze(s),d=!1}else d=xu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return s.flags&256?(Vt(s),s):(Vt(s),null)}return Vt(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,t=t!==null&&t.memoizedState!==null,a&&(c=s.child,d=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(d=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==d&&(c.flags|=2048)),a!==t&&a&&(s.child.flags|=8192),to(s,s.updateQueue),ze(s),null);case 4:return Re(),t===null&&Df(s.stateNode.containerInfo),ze(s),null;case 10:return Bn(s.type),ze(s),null;case 19:if(Y(Ke),c=s.memoizedState,c===null)return ze(s),null;if(d=(s.flags&128)!==0,p=c.rendering,p===null)if(d)ha(c,!1);else{if(Ge!==0||t!==null&&(t.flags&128)!==0)for(t=s.child;t!==null;){if(p=Il(t),p!==null){for(s.flags|=128,ha(c,!1),t=p.updateQueue,s.updateQueue=t,to(s,t),s.subtreeFlags=0,t=a,a=s.child;a!==null;)Up(a,t),a=a.sibling;return Z(Ke,Ke.current&1|2),ve&&Dn(s,c.treeForkCount),s.child}t=t.sibling}c.tail!==null&&St()>ao&&(s.flags|=128,d=!0,ha(c,!1),s.lanes=4194304)}else{if(!d)if(t=Il(p),t!==null){if(s.flags|=128,d=!0,t=t.updateQueue,s.updateQueue=t,to(s,t),ha(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ve)return ze(s),null}else 2*St()-c.renderingStartTime>ao&&a!==536870912&&(s.flags|=128,d=!0,ha(c,!1),s.lanes=4194304);c.isBackwards?(p.sibling=s.child,s.child=p):(t=c.last,t!==null?t.sibling=p:s.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=St(),t.sibling=null,a=Ke.current,Z(Ke,d?a&1|2:a&1),ve&&Dn(s,c.treeForkCount),t):(ze(s),null);case 22:case 23:return Vt(s),Du(),c=s.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(ze(s),s.subtreeFlags&6&&(s.flags|=8192)):ze(s),a=s.updateQueue,a!==null&&to(s,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),t!==null&&Y(Ji),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),Bn(Je),ze(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function aw(t,s){switch(Su(s),s.tag){case 1:return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 3:return Bn(Je),Re(),t=s.flags,(t&65536)!==0&&(t&128)===0?(s.flags=t&-65537|128,s):null;case 26:case 27:case 5:return kn(s),null;case 31:if(s.memoizedState!==null){if(Vt(s),s.alternate===null)throw Error(r(340));Xi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 13:if(Vt(s),t=s.memoizedState,t!==null&&t.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Xi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 19:return Y(Ke),null;case 4:return Re(),null;case 10:return Bn(s.type),null;case 22:case 23:return Vt(s),Du(),t!==null&&Y(Ji),t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 24:return Bn(Je),null;case 25:return null;default:return null}}function fm(t,s){switch(Su(s),s.tag){case 3:Bn(Je),Re();break;case 26:case 27:case 5:kn(s);break;case 4:Re();break;case 31:s.memoizedState!==null&&Vt(s);break;case 13:Vt(s);break;case 19:Y(Ke);break;case 10:Bn(s.type);break;case 22:case 23:Vt(s),Du(),t!==null&&Y(Ji);break;case 24:Bn(Je)}}function da(t,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var d=c.next;a=d;do{if((a.tag&t)===t){c=void 0;var p=a.create,b=a.inst;c=p(),b.destroy=c}a=a.next}while(a!==d)}}catch(T){Ce(s,s.return,T)}}function mi(t,s,a){try{var c=s.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var p=d.next;c=p;do{if((c.tag&t)===t){var b=c.inst,T=b.destroy;if(T!==void 0){b.destroy=void 0,d=s;var A=a,R=T;try{R()}catch(G){Ce(d,A,G)}}}c=c.next}while(c!==p)}}catch(G){Ce(s,s.return,G)}}function hm(t){var s=t.updateQueue;if(s!==null){var a=t.stateNode;try{ng(s,a)}catch(c){Ce(t,t.return,c)}}}function dm(t,s,a){a.props=ts(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(c){Ce(t,s,c)}}function pa(t,s){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(d){Ce(t,s,d)}}function _n(t,s){var a=t.ref,c=t.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(d){Ce(t,s,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){Ce(t,s,d)}else a.current=null}function pm(t){var s=t.type,a=t.memoizedProps,c=t.stateNode;try{e:switch(s){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(d){Ce(t,t.return,d)}}function pf(t,s,a){try{var c=t.stateNode;Cw(c,t.type,a,s),c[Nt]=s}catch(d){Ce(t,t.return,d)}}function gm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&_i(t.type)||t.tag===4}function gf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||gm(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&&_i(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 mf(t,s,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,s):(s=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.appendChild(t),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=jn));else if(c!==4&&(c===27&&_i(t.type)&&(a=t.stateNode,s=null),t=t.child,t!==null))for(mf(t,s,a),t=t.sibling;t!==null;)mf(t,s,a),t=t.sibling}function no(t,s,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?a.insertBefore(t,s):a.appendChild(t);else if(c!==4&&(c===27&&_i(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(no(t,s,a),t=t.sibling;t!==null;)no(t,s,a),t=t.sibling}function mm(t){var s=t.stateNode,a=t.memoizedProps;try{for(var c=t.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);ht(s,c,a),s[ot]=t,s[Nt]=a}catch(p){Ce(t,t.return,p)}}var In=!1,We=!1,yf=!1,ym=typeof WeakSet=="function"?WeakSet:Set,lt=null;function lw(t,s){if(t=t.containerInfo,Uf=To,t=kp(t),cu(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 d=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var b=0,T=-1,A=-1,R=0,G=0,F=t,z=null;t:for(;;){for(var H;F!==a||d!==0&&F.nodeType!==3||(T=b+d),F!==p||c!==0&&F.nodeType!==3||(A=b+c),F.nodeType===3&&(b+=F.nodeValue.length),(H=F.firstChild)!==null;)z=F,F=H;for(;;){if(F===t)break t;if(z===a&&++R===d&&(T=b),z===p&&++G===c&&(A=b),(H=F.nextSibling)!==null)break;F=z,z=F.parentNode}F=H}a=T===-1||A===-1?null:{start:T,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Hf={focusedElem:t,selectionRange:a},To=!1,lt=s;lt!==null;)if(s=lt,t=s.child,(s.subtreeFlags&1028)!==0&&t!==null)t.return=s,lt=t;else for(;lt!==null;){switch(s=lt,p=s.alternate,t=s.flags,s.tag){case 0:if((t&4)!==0&&(t=s.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)d=t[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&p!==null){t=void 0,a=s,d=p.memoizedProps,p=p.memoizedState,c=a.stateNode;try{var te=ts(a.type,d);t=c.getSnapshotBeforeUpdate(te,p),c.__reactInternalSnapshotBeforeUpdate=t}catch(oe){Ce(a,a.return,oe)}}break;case 3:if((t&1024)!==0){if(t=s.stateNode.containerInfo,a=t.nodeType,a===9)If(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":If(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(r(163))}if(t=s.sibling,t!==null){t.return=s.return,lt=t;break}lt=s.return}}function bm(t,s,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:Gn(t,a),c&4&&da(5,a);break;case 1:if(Gn(t,a),c&4)if(t=a.stateNode,s===null)try{t.componentDidMount()}catch(b){Ce(a,a.return,b)}else{var d=ts(a.type,s.memoizedProps);s=s.memoizedState;try{t.componentDidUpdate(d,s,t.__reactInternalSnapshotBeforeUpdate)}catch(b){Ce(a,a.return,b)}}c&64&&hm(a),c&512&&pa(a,a.return);break;case 3:if(Gn(t,a),c&64&&(t=a.updateQueue,t!==null)){if(s=null,a.child!==null)switch(a.child.tag){case 27:case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}try{ng(t,s)}catch(b){Ce(a,a.return,b)}}break;case 27:s===null&&c&4&&mm(a);case 26:case 5:Gn(t,a),s===null&&c&4&&pm(a),c&512&&pa(a,a.return);break;case 12:Gn(t,a);break;case 31:Gn(t,a),c&4&&wm(t,a);break;case 13:Gn(t,a),c&4&&xm(t,a),c&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=mw.bind(null,a),zw(t,a))));break;case 22:if(c=a.memoizedState!==null||In,!c){s=s!==null&&s.memoizedState!==null||We,d=In;var p=We;In=c,(We=s)&&!p?Kn(t,a,(a.subtreeFlags&8772)!==0):Gn(t,a),In=d,We=p}break;case 30:break;default:Gn(t,a)}}function vm(t){var s=t.alternate;s!==null&&(t.alternate=null,vm(s)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(s=t.stateNode,s!==null&&Yc(s)),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 Be=null,kt=!1;function Vn(t,s,a){for(a=a.child;a!==null;)Sm(t,s,a),a=a.sibling}function Sm(t,s,a){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(Mn,a)}catch{}switch(a.tag){case 26:We||_n(a,s),Vn(t,s,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:We||_n(a,s);var c=Be,d=kt;_i(a.type)&&(Be=a.stateNode,kt=!1),Vn(t,s,a),_a(a.stateNode),Be=c,kt=d;break;case 5:We||_n(a,s);case 6:if(c=Be,d=kt,Be=null,Vn(t,s,a),Be=c,kt=d,Be!==null)if(kt)try{(Be.nodeType===9?Be.body:Be.nodeName==="HTML"?Be.ownerDocument.body:Be).removeChild(a.stateNode)}catch(p){Ce(a,s,p)}else try{Be.removeChild(a.stateNode)}catch(p){Ce(a,s,p)}break;case 18:Be!==null&&(kt?(t=Be,hy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),sr(t)):hy(Be,a.stateNode));break;case 4:c=Be,d=kt,Be=a.stateNode.containerInfo,kt=!0,Vn(t,s,a),Be=c,kt=d;break;case 0:case 11:case 14:case 15:mi(2,a,s),We||mi(4,a,s),Vn(t,s,a);break;case 1:We||(_n(a,s),c=a.stateNode,typeof c.componentWillUnmount=="function"&&dm(a,s,c)),Vn(t,s,a);break;case 21:Vn(t,s,a);break;case 22:We=(c=We)||a.memoizedState!==null,Vn(t,s,a),We=c;break;default:Vn(t,s,a)}}function wm(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{sr(t)}catch(a){Ce(s,s.return,a)}}}function xm(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{sr(t)}catch(a){Ce(s,s.return,a)}}function ow(t){switch(t.tag){case 31:case 13:case 19:var s=t.stateNode;return s===null&&(s=t.stateNode=new ym),s;case 22:return t=t.stateNode,s=t._retryCache,s===null&&(s=t._retryCache=new ym),s;default:throw Error(r(435,t.tag))}}function io(t,s){var a=ow(t);s.forEach(function(c){if(!a.has(c)){a.add(c);var d=yw.bind(null,t,c);c.then(d,d)}})}function Mt(t,s){var a=s.deletions;if(a!==null)for(var c=0;c<a.length;c++){var d=a[c],p=t,b=s,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(_i(T.type)){Be=T.stateNode,kt=!1;break e}break;case 5:Be=T.stateNode,kt=!1;break e;case 3:case 4:Be=T.stateNode.containerInfo,kt=!0;break e}T=T.return}if(Be===null)throw Error(r(160));Sm(p,b,d),Be=null,kt=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)_m(s,t),s=s.sibling}var pn=null;function _m(t,s){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Mt(s,t),Ot(t),c&4&&(mi(3,t,t.return),da(3,t),mi(5,t,t.return));break;case 1:Mt(s,t),Ot(t),c&512&&(We||a===null||_n(a,a.return)),c&64&&In&&(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 d=pn;if(Mt(s,t),Ot(t),c&512&&(We||a===null||_n(a,a.return)),c&4){var p=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,d=d.ownerDocument||d;t:switch(c){case"title":p=d.getElementsByTagName("title")[0],(!p||p[$r]||p[ot]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(c),d.head.insertBefore(p,d.querySelector("head > title"))),ht(p,c,a),p[ot]=t,at(p),c=p;break e;case"link":var b=_y("link","href",d).get(c+(a.href||""));if(b){for(var T=0;T<b.length;T++)if(p=b[T],p.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&p.getAttribute("rel")===(a.rel==null?null:a.rel)&&p.getAttribute("title")===(a.title==null?null:a.title)&&p.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(T,1);break t}}p=d.createElement(c),ht(p,c,a),d.head.appendChild(p);break;case"meta":if(b=_y("meta","content",d).get(c+(a.content||""))){for(T=0;T<b.length;T++)if(p=b[T],p.getAttribute("content")===(a.content==null?null:""+a.content)&&p.getAttribute("name")===(a.name==null?null:a.name)&&p.getAttribute("property")===(a.property==null?null:a.property)&&p.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&p.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(T,1);break t}}p=d.createElement(c),ht(p,c,a),d.head.appendChild(p);break;default:throw Error(r(468,c))}p[ot]=t,at(p),c=p}t.stateNode=c}else Ty(d,t.type,t.stateNode);else t.stateNode=xy(d,c,t.memoizedProps);else p!==c?(p===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):p.count--,c===null?Ty(d,t.type,t.stateNode):xy(d,c,t.memoizedProps)):c===null&&t.stateNode!==null&&pf(t,t.memoizedProps,a.memoizedProps)}break;case 27:Mt(s,t),Ot(t),c&512&&(We||a===null||_n(a,a.return)),a!==null&&c&4&&pf(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Mt(s,t),Ot(t),c&512&&(We||a===null||_n(a,a.return)),t.flags&32){d=t.stateNode;try{Ns(d,"")}catch(te){Ce(t,t.return,te)}}c&4&&t.stateNode!=null&&(d=t.memoizedProps,pf(t,d,a!==null?a.memoizedProps:d)),c&1024&&(yf=!0);break;case 6:if(Mt(s,t),Ot(t),c&4){if(t.stateNode===null)throw Error(r(162));c=t.memoizedProps,a=t.stateNode;try{a.nodeValue=c}catch(te){Ce(t,t.return,te)}}break;case 3:if(So=null,d=pn,pn=bo(s.containerInfo),Mt(s,t),pn=d,Ot(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{sr(s.containerInfo)}catch(te){Ce(t,t.return,te)}yf&&(yf=!1,Tm(t));break;case 4:c=pn,pn=bo(t.stateNode.containerInfo),Mt(s,t),Ot(t),pn=c;break;case 12:Mt(s,t),Ot(t);break;case 31:Mt(s,t),Ot(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,io(t,c)));break;case 13:Mt(s,t),Ot(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ro=St()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,io(t,c)));break;case 22:d=t.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,R=In,G=We;if(In=R||d,We=G||A,Mt(s,t),We=G,In=R,Ot(t),c&8192)e:for(s=t.stateNode,s._visibility=d?s._visibility&-2:s._visibility|1,d&&(a===null||A||In||We||ns(t)),a=null,s=t;;){if(s.tag===5||s.tag===26){if(a===null){A=a=s;try{if(p=A.stateNode,d)b=p.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{T=A.stateNode;var F=A.memoizedProps.style,z=F!=null&&F.hasOwnProperty("display")?F.display:null;T.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(te){Ce(A,A.return,te)}}}else if(s.tag===6){if(a===null){A=s;try{A.stateNode.nodeValue=d?"":A.memoizedProps}catch(te){Ce(A,A.return,te)}}}else if(s.tag===18){if(a===null){A=s;try{var H=A.stateNode;d?dy(H,!0):dy(A.stateNode,!1)}catch(te){Ce(A,A.return,te)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===t)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;a===s&&(a=null),s=s.return}a===s&&(a=null),s.sibling.return=s.return,s=s.sibling}c&4&&(c=t.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,io(t,a))));break;case 19:Mt(s,t),Ot(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,io(t,c)));break;case 30:break;case 21:break;default:Mt(s,t),Ot(t)}}function Ot(t){var s=t.flags;if(s&2){try{for(var a,c=t.return;c!==null;){if(gm(c)){a=c;break}c=c.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var d=a.stateNode,p=gf(t);no(t,p,d);break;case 5:var b=a.stateNode;a.flags&32&&(Ns(b,""),a.flags&=-33);var T=gf(t);no(t,T,b);break;case 3:case 4:var A=a.stateNode.containerInfo,R=gf(t);mf(t,R,A);break;default:throw Error(r(161))}}catch(G){Ce(t,t.return,G)}t.flags&=-3}s&4096&&(t.flags&=-4097)}function Tm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var s=t;Tm(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),t=t.sibling}}function Gn(t,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)bm(t,s.alternate,s),s=s.sibling}function ns(t){for(t=t.child;t!==null;){var s=t;switch(s.tag){case 0:case 11:case 14:case 15:mi(4,s,s.return),ns(s);break;case 1:_n(s,s.return);var a=s.stateNode;typeof a.componentWillUnmount=="function"&&dm(s,s.return,a),ns(s);break;case 27:_a(s.stateNode);case 26:case 5:_n(s,s.return),ns(s);break;case 22:s.memoizedState===null&&ns(s);break;case 30:ns(s);break;default:ns(s)}t=t.sibling}}function Kn(t,s,a){for(a=a&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var c=s.alternate,d=t,p=s,b=p.flags;switch(p.tag){case 0:case 11:case 15:Kn(d,p,a),da(4,p);break;case 1:if(Kn(d,p,a),c=p,d=c.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(R){Ce(c,c.return,R)}if(c=p,d=c.updateQueue,d!==null){var T=c.stateNode;try{var A=d.shared.hiddenCallbacks;if(A!==null)for(d.shared.hiddenCallbacks=null,d=0;d<A.length;d++)tg(A[d],T)}catch(R){Ce(c,c.return,R)}}a&&b&64&&hm(p),pa(p,p.return);break;case 27:mm(p);case 26:case 5:Kn(d,p,a),a&&c===null&&b&4&&pm(p),pa(p,p.return);break;case 12:Kn(d,p,a);break;case 31:Kn(d,p,a),a&&b&4&&wm(d,p);break;case 13:Kn(d,p,a),a&&b&4&&xm(d,p);break;case 22:p.memoizedState===null&&Kn(d,p,a),pa(p,p.return);break;case 30:break;default:Kn(d,p,a)}s=s.sibling}}function bf(t,s){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(t=s.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&ea(a))}function vf(t,s){t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&ea(t))}function gn(t,s,a,c){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Em(t,s,a,c),s=s.sibling}function Em(t,s,a,c){var d=s.flags;switch(s.tag){case 0:case 11:case 15:gn(t,s,a,c),d&2048&&da(9,s);break;case 1:gn(t,s,a,c);break;case 3:gn(t,s,a,c),d&2048&&(t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&ea(t)));break;case 12:if(d&2048){gn(t,s,a,c),t=s.stateNode;try{var p=s.memoizedProps,b=p.id,T=p.onPostCommit;typeof T=="function"&&T(b,s.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Ce(s,s.return,A)}}else gn(t,s,a,c);break;case 31:gn(t,s,a,c);break;case 13:gn(t,s,a,c);break;case 23:break;case 22:p=s.stateNode,b=s.alternate,s.memoizedState!==null?p._visibility&2?gn(t,s,a,c):ga(t,s):p._visibility&2?gn(t,s,a,c):(p._visibility|=2,Xs(t,s,a,c,(s.subtreeFlags&10256)!==0||!1)),d&2048&&bf(b,s);break;case 24:gn(t,s,a,c),d&2048&&vf(s.alternate,s);break;default:gn(t,s,a,c)}}function Xs(t,s,a,c,d){for(d=d&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var p=t,b=s,T=a,A=c,R=b.flags;switch(b.tag){case 0:case 11:case 15:Xs(p,b,T,A,d),da(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?Xs(p,b,T,A,d):ga(p,b):(G._visibility|=2,Xs(p,b,T,A,d)),d&&R&2048&&bf(b.alternate,b);break;case 24:Xs(p,b,T,A,d),d&&R&2048&&vf(b.alternate,b);break;default:Xs(p,b,T,A,d)}s=s.sibling}}function ga(t,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var a=t,c=s,d=c.flags;switch(c.tag){case 22:ga(a,c),d&2048&&bf(c.alternate,c);break;case 24:ga(a,c),d&2048&&vf(c.alternate,c);break;default:ga(a,c)}s=s.sibling}}var ma=8192;function Fs(t,s,a){if(t.subtreeFlags&ma)for(t=t.child;t!==null;)Am(t,s,a),t=t.sibling}function Am(t,s,a){switch(t.tag){case 26:Fs(t,s,a),t.flags&ma&&t.memoizedState!==null&&Fw(a,pn,t.memoizedState,t.memoizedProps);break;case 5:Fs(t,s,a);break;case 3:case 4:var c=pn;pn=bo(t.stateNode.containerInfo),Fs(t,s,a),pn=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=ma,ma=16777216,Fs(t,s,a),ma=c):Fs(t,s,a));break;default:Fs(t,s,a)}}function Nm(t){var s=t.alternate;if(s!==null&&(t=s.child,t!==null)){s.child=null;do s=t.sibling,t.sibling=null,t=s;while(t!==null)}}function ya(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];lt=c,km(c,t)}Nm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cm(t),t=t.sibling}function Cm(t){switch(t.tag){case 0:case 11:case 15:ya(t),t.flags&2048&&mi(9,t,t.return);break;case 3:ya(t);break;case 12:ya(t);break;case 22:var s=t.stateNode;t.memoizedState!==null&&s._visibility&2&&(t.return===null||t.return.tag!==13)?(s._visibility&=-3,so(t)):ya(t);break;default:ya(t)}}function so(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];lt=c,km(c,t)}Nm(t)}for(t=t.child;t!==null;){switch(s=t,s.tag){case 0:case 11:case 15:mi(8,s,s.return),so(s);break;case 22:a=s.stateNode,a._visibility&2&&(a._visibility&=-3,so(s));break;default:so(s)}t=t.sibling}}function km(t,s){for(;lt!==null;){var a=lt;switch(a.tag){case 0:case 11:case 15:mi(8,a,s);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:ea(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,lt=c;else e:for(a=t;lt!==null;){c=lt;var d=c.sibling,p=c.return;if(vm(c),c===a){lt=null;break e}if(d!==null){d.return=p,lt=d;break e}lt=p}}}var cw={getCacheForType:function(t){var s=ut(Je),a=s.data.get(t);return a===void 0&&(a=t(),s.data.set(t,a)),a},cacheSignal:function(){return ut(Je).controller.signal}},uw=typeof WeakMap=="function"?WeakMap:Map,Ee=0,je=null,ge=null,ye=0,Ne=0,Gt=null,yi=!1,Qs=!1,Sf=!1,Yn=0,Ge=0,bi=0,is=0,wf=0,Kt=0,Js=0,ba=null,jt=null,xf=!1,ro=0,Mm=0,ao=1/0,lo=null,vi=null,it=0,Si=null,Ps=null,Xn=0,_f=0,Tf=null,Om=null,va=0,Ef=null;function Yt(){return(Ee&2)!==0&&ye!==0?ye&-ye:B.T!==null?Of():Xd()}function jm(){if(Kt===0)if((ye&536870912)===0||ve){var t=Ft;Ft<<=1,(Ft&3932160)===0&&(Ft=262144),Kt=t}else Kt=536870912;return t=It.current,t!==null&&(t.flags|=32),Kt}function Lt(t,s,a){(t===je&&(Ne===2||Ne===9)||t.cancelPendingCommit!==null)&&(Zs(t,0),wi(t,ye,Kt,!1)),qr(t,a),((Ee&2)===0||t!==je)&&(t===je&&((Ee&2)===0&&(is|=a),Ge===4&&wi(t,ye,Kt,!1)),Tn(t))}function Lm(t,s,a){if((Ee&6)!==0)throw Error(r(327));var c=!a&&(s&127)===0&&(s&t.expiredLanes)===0||Hr(t,s),d=c?dw(t,s):Nf(t,s,!0),p=c;do{if(d===0){Qs&&!c&&wi(t,s,0,!1);break}else{if(a=t.current.alternate,p&&!fw(a)){d=Nf(t,s,!1),p=!1;continue}if(d===2){if(p=s,t.errorRecoveryDisabledLanes&p)var b=0;else b=t.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){s=b;e:{var T=t;d=ba;var A=T.current.memoizedState.isDehydrated;if(A&&(Zs(T,b).flags|=256),b=Nf(T,b,!1),b!==2){if(Sf&&!A){T.errorRecoveryDisabledLanes|=p,is|=p,d=4;break e}p=jt,jt=d,p!==null&&(jt===null?jt=p:jt.push.apply(jt,p))}d=b}if(p=!1,d!==2)continue}}if(d===1){Zs(t,0),wi(t,s,0,!0);break}e:{switch(c=t,p=d,p){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:wi(c,s,Kt,!yi);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(d=ro+300-St(),10<d)){if(wi(c,s,Kt,!yi),yl(c,0,!0)!==0)break e;Xn=s,c.timeoutHandle=uy(Rm.bind(null,c,a,jt,lo,xf,s,Kt,is,Js,yi,p,"Throttled",-0,0),d);break e}Rm(c,a,jt,lo,xf,s,Kt,is,Js,yi,p,null,-0,0)}}break}while(!0);Tn(t)}function Rm(t,s,a,c,d,p,b,T,A,R,G,F,z,H){if(t.timeoutHandle=-1,F=s.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jn},Am(s,p,F);var te=(p&62914560)===p?ro-St():(p&4194048)===p?Mm-St():0;if(te=Qw(F,te),te!==null){Xn=p,t.cancelPendingCommit=te(Im.bind(null,t,s,p,a,c,d,b,T,A,G,F,null,z,H)),wi(t,p,b,!R);return}}Im(t,s,p,a,c,d,b,T,A)}function fw(t){for(var s=t;;){var a=s.tag;if((a===0||a===11||a===15)&&s.flags&16384&&(a=s.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var d=a[c],p=d.getSnapshot;d=d.value;try{if(!qt(p(),d))return!1}catch{return!1}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function wi(t,s,a,c){s&=~wf,s&=~is,t.suspendedLanes|=s,t.pingedLanes&=~s,c&&(t.warmLanes|=s),c=t.expirationTimes;for(var d=s;0<d;){var p=31-wt(d),b=1<<p;c[p]=-1,d&=~b}a!==0&&Gd(t,a,s)}function oo(){return(Ee&6)===0?(Sa(0),!1):!0}function Af(){if(ge!==null){if(Ne===0)var t=ge.return;else t=ge,zn=Fi=null,$u(t),Is=null,na=0,t=ge;for(;t!==null;)fm(t.alternate,t),t=t.return;ge=null}}function Zs(t,s){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Ow(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Xn=0,Af(),je=t,ge=a=Rn(t.current,null),ye=s,Ne=0,Gt=null,yi=!1,Qs=Hr(t,s),Sf=!1,Js=Kt=wf=is=bi=Ge=0,jt=ba=null,xf=!1,(s&8)!==0&&(s|=s&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=s;0<c;){var d=31-wt(c),p=1<<d;s|=t[d],c&=~p}return Yn=s,kl(),a}function Dm(t,s){de=null,B.H=ua,s===$s||s===Bl?(s=Pp(),Ne=3):s===ku?(s=Pp(),Ne=4):Ne=s===sf?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Gt=s,ge===null&&(Ge=1,Pl(t,Zt(s,t.current)))}function zm(){var t=It.current;return t===null?!0:(ye&4194048)===ye?nn===null:(ye&62914560)===ye||(ye&536870912)!==0?t===nn:!1}function Bm(){var t=B.H;return B.H=ua,t===null?ua:t}function Um(){var t=B.A;return B.A=cw,t}function co(){Ge=4,yi||(ye&4194048)!==ye&&It.current!==null||(Qs=!0),(bi&134217727)===0&&(is&134217727)===0||je===null||wi(je,ye,Kt,!1)}function Nf(t,s,a){var c=Ee;Ee|=2;var d=Bm(),p=Um();(je!==t||ye!==s)&&(lo=null,Zs(t,s)),s=!1;var b=Ge;e:do try{if(Ne!==0&&ge!==null){var T=ge,A=Gt;switch(Ne){case 8:Af(),b=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(s=!0);var R=Ne;if(Ne=0,Gt=null,Ws(t,T,A,R),a&&Qs){b=0;break e}break;default:R=Ne,Ne=0,Gt=null,Ws(t,T,A,R)}}hw(),b=Ge;break}catch(G){Dm(t,G)}while(!0);return s&&t.shellSuspendCounter++,zn=Fi=null,Ee=c,B.H=d,B.A=p,ge===null&&(je=null,ye=0,kl()),b}function hw(){for(;ge!==null;)Hm(ge)}function dw(t,s){var a=Ee;Ee|=2;var c=Bm(),d=Um();je!==t||ye!==s?(lo=null,ao=St()+500,Zs(t,s)):Qs=Hr(t,s);e:do try{if(Ne!==0&&ge!==null){s=ge;var p=Gt;t:switch(Ne){case 1:Ne=0,Gt=null,Ws(t,s,p,1);break;case 2:case 9:if(Qp(p)){Ne=0,Gt=null,qm(s);break}s=function(){Ne!==2&&Ne!==9||je!==t||(Ne=7),Tn(t)},p.then(s,s);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:Qp(p)?(Ne=0,Gt=null,qm(s)):(Ne=0,Gt=null,Ws(t,s,p,7));break;case 5:var b=null;switch(ge.tag){case 26:b=ge.memoizedState;case 5:case 27:var T=ge;if(b?Ey(b):T.stateNode.complete){Ne=0,Gt=null;var A=T.sibling;if(A!==null)ge=A;else{var R=T.return;R!==null?(ge=R,uo(R)):ge=null}break t}}Ne=0,Gt=null,Ws(t,s,p,5);break;case 6:Ne=0,Gt=null,Ws(t,s,p,6);break;case 8:Af(),Ge=6;break e;default:throw Error(r(462))}}pw();break}catch(G){Dm(t,G)}while(!0);return zn=Fi=null,B.H=c,B.A=d,Ee=a,ge!==null?0:(je=null,ye=0,kl(),Ge)}function pw(){for(;ge!==null&&!ii();)Hm(ge)}function Hm(t){var s=cm(t.alternate,t,Yn);t.memoizedProps=t.pendingProps,s===null?uo(t):ge=s}function qm(t){var s=t,a=s.alternate;switch(s.tag){case 15:case 0:s=im(a,s,s.pendingProps,s.type,void 0,ye);break;case 11:s=im(a,s,s.pendingProps,s.type.render,s.ref,ye);break;case 5:$u(s);default:fm(a,s),s=ge=Up(s,Yn),s=cm(a,s,Yn)}t.memoizedProps=t.pendingProps,s===null?uo(t):ge=s}function Ws(t,s,a,c){zn=Fi=null,$u(s),Is=null,na=0;var d=s.return;try{if(nw(t,d,s,a,ye)){Ge=1,Pl(t,Zt(a,t.current)),ge=null;return}}catch(p){if(d!==null)throw ge=d,p;Ge=1,Pl(t,Zt(a,t.current)),ge=null;return}s.flags&32768?(ve||c===1?t=!0:Qs||(ye&536870912)!==0?t=!1:(yi=t=!0,(c===2||c===9||c===3||c===6)&&(c=It.current,c!==null&&c.tag===13&&(c.flags|=16384))),$m(s,t)):uo(s)}function uo(t){var s=t;do{if((s.flags&32768)!==0){$m(s,yi);return}t=s.return;var a=rw(s.alternate,s,Yn);if(a!==null){ge=a;return}if(s=s.sibling,s!==null){ge=s;return}ge=s=t}while(s!==null);Ge===0&&(Ge=5)}function $m(t,s){do{var a=aw(t.alternate,t);if(a!==null){a.flags&=32767,ge=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!s&&(t=t.sibling,t!==null)){ge=t;return}ge=t=a}while(t!==null);Ge=6,ge=null}function Im(t,s,a,c,d,p,b,T,A){t.cancelPendingCommit=null;do fo();while(it!==0);if((Ee&6)!==0)throw Error(r(327));if(s!==null){if(s===t.current)throw Error(r(177));if(p=s.lanes|s.childLanes,p|=pu,XS(t,a,p,b,T,A),t===je&&(ge=je=null,ye=0),Ps=s,Si=t,Xn=a,_f=p,Tf=d,Om=c,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,bw(si,function(){return Xm(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||c){c=B.T,B.T=null,d=P.p,P.p=2,b=Ee,Ee|=4;try{lw(t,s,a)}finally{Ee=b,P.p=d,B.T=c}}it=1,Vm(),Gm(),Km()}}function Vm(){if(it===1){it=0;var t=Si,s=Ps,a=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var c=P.p;P.p=2;var d=Ee;Ee|=4;try{_m(s,t);var p=Hf,b=kp(t.containerInfo),T=p.focusedElem,A=p.selectionRange;if(b!==T&&T&&T.ownerDocument&&Cp(T.ownerDocument.documentElement,T)){if(A!==null&&cu(T)){var R=A.start,G=A.end;if(G===void 0&&(G=R),"selectionStart"in T)T.selectionStart=R,T.selectionEnd=Math.min(G,T.value.length);else{var F=T.ownerDocument||document,z=F&&F.defaultView||window;if(z.getSelection){var H=z.getSelection(),te=T.textContent.length,oe=Math.min(A.start,te),Oe=A.end===void 0?oe:Math.min(A.end,te);!H.extend&&oe>Oe&&(b=Oe,Oe=oe,oe=b);var O=Np(T,oe),M=Np(T,Oe);if(O&&M&&(H.rangeCount!==1||H.anchorNode!==O.node||H.anchorOffset!==O.offset||H.focusNode!==M.node||H.focusOffset!==M.offset)){var L=F.createRange();L.setStart(O.node,O.offset),H.removeAllRanges(),oe>Oe?(H.addRange(L),H.extend(M.node,M.offset)):(L.setEnd(M.node,M.offset),H.addRange(L))}}}}for(F=[],H=T;H=H.parentNode;)H.nodeType===1&&F.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<F.length;T++){var X=F[T];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}To=!!Uf,Hf=Uf=null}finally{Ee=d,P.p=c,B.T=a}}t.current=s,it=2}}function Gm(){if(it===2){it=0;var t=Si,s=Ps,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var c=P.p;P.p=2;var d=Ee;Ee|=4;try{bm(t,s.alternate,s)}finally{Ee=d,P.p=c,B.T=a}}it=3}}function Km(){if(it===4||it===3){it=0,Bc();var t=Si,s=Ps,a=Xn,c=Om;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?it=5:(it=0,Ps=Si=null,Ym(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(vi=null),Gc(a),s=s.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(Mn,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=B.T,d=P.p,P.p=2,B.T=null;try{for(var p=t.onRecoverableError,b=0;b<c.length;b++){var T=c[b];p(T.value,{componentStack:T.stack})}}finally{B.T=s,P.p=d}}(Xn&3)!==0&&fo(),Tn(t),d=t.pendingLanes,(a&261930)!==0&&(d&42)!==0?t===Ef?va++:(va=0,Ef=t):va=0,Sa(0)}}function Ym(t,s){(t.pooledCacheLanes&=s)===0&&(s=t.pooledCache,s!=null&&(t.pooledCache=null,ea(s)))}function fo(){return Vm(),Gm(),Km(),Xm()}function Xm(){if(it!==5)return!1;var t=Si,s=_f;_f=0;var a=Gc(Xn),c=B.T,d=P.p;try{P.p=32>a?32:a,B.T=null,a=Tf,Tf=null;var p=Si,b=Xn;if(it=0,Ps=Si=null,Xn=0,(Ee&6)!==0)throw Error(r(331));var T=Ee;if(Ee|=4,Cm(p.current),Em(p,p.current,b,a),Ee=T,Sa(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(Mn,p)}catch{}return!0}finally{P.p=d,B.T=c,Ym(t,s)}}function Fm(t,s,a){s=Zt(a,s),s=nf(t.stateNode,s,2),t=di(t,s,2),t!==null&&(qr(t,2),Tn(t))}function Ce(t,s,a){if(t.tag===3)Fm(t,t,a);else for(;s!==null;){if(s.tag===3){Fm(s,t,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(vi===null||!vi.has(c))){t=Zt(a,t),a=Qg(2),c=di(s,a,2),c!==null&&(Jg(a,c,s,t),qr(c,2),Tn(c));break}}s=s.return}}function Cf(t,s,a){var c=t.pingCache;if(c===null){c=t.pingCache=new uw;var d=new Set;c.set(s,d)}else d=c.get(s),d===void 0&&(d=new Set,c.set(s,d));d.has(a)||(Sf=!0,d.add(a),t=gw.bind(null,t,s,a),s.then(t,t))}function gw(t,s,a){var c=t.pingCache;c!==null&&c.delete(s),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,je===t&&(ye&a)===a&&(Ge===4||Ge===3&&(ye&62914560)===ye&&300>St()-ro?(Ee&2)===0&&Zs(t,0):wf|=a,Js===ye&&(Js=0)),Tn(t)}function Qm(t,s){s===0&&(s=Vd()),t=Ki(t,s),t!==null&&(qr(t,s),Tn(t))}function mw(t){var s=t.memoizedState,a=0;s!==null&&(a=s.retryLane),Qm(t,a)}function yw(t,s){var a=0;switch(t.tag){case 31:case 13:var c=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),Qm(t,a)}function bw(t,s){return ni(t,s)}var ho=null,er=null,kf=!1,po=!1,Mf=!1,xi=0;function Tn(t){t!==er&&t.next===null&&(er===null?ho=er=t:er=er.next=t),po=!0,kf||(kf=!0,Sw())}function Sa(t,s){if(!Mf&&po){Mf=!0;do for(var a=!1,c=ho;c!==null;){if(t!==0){var d=c.pendingLanes;if(d===0)var p=0;else{var b=c.suspendedLanes,T=c.pingedLanes;p=(1<<31-wt(42|t)+1)-1,p&=d&~(b&~T),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,Wm(c,p))}else p=ye,p=yl(c,c===je?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||Hr(c,p)||(a=!0,Wm(c,p));c=c.next}while(a);Mf=!1}}function vw(){Jm()}function Jm(){po=kf=!1;var t=0;xi!==0&&Mw()&&(t=xi);for(var s=St(),a=null,c=ho;c!==null;){var d=c.next,p=Pm(c,s);p===0?(c.next=null,a===null?ho=d:a.next=d,d===null&&(er=a)):(a=c,(t!==0||(p&3)!==0)&&(po=!0)),c=d}it!==0&&it!==5||Sa(t),xi!==0&&(xi=0)}function Pm(t,s){for(var a=t.suspendedLanes,c=t.pingedLanes,d=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var b=31-wt(p),T=1<<b,A=d[b];A===-1?((T&a)===0||(T&c)!==0)&&(d[b]=YS(T,s)):A<=s&&(t.expiredLanes|=T),p&=~T}if(s=je,a=ye,a=yl(t,t===s?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,a===0||t===s&&(Ne===2||Ne===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Br(c),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Hr(t,a)){if(s=a&-a,s===t.callbackPriority)return s;switch(c!==null&&Br(c),Gc(a)){case 2:case 8:a=Ur;break;case 32:a=si;break;case 268435456:a=pl;break;default:a=si}return c=Zm.bind(null,t),a=ni(a,c),t.callbackPriority=s,t.callbackNode=a,s}return c!==null&&c!==null&&Br(c),t.callbackPriority=2,t.callbackNode=null,2}function Zm(t,s){if(it!==0&&it!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(fo()&&t.callbackNode!==a)return null;var c=ye;return c=yl(t,t===je?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(Lm(t,c,s),Pm(t,St()),t.callbackNode!=null&&t.callbackNode===a?Zm.bind(null,t):null)}function Wm(t,s){if(fo())return null;Lm(t,s,!0)}function Sw(){jw(function(){(Ee&6)!==0?ni(dl,vw):Jm()})}function Of(){if(xi===0){var t=Hs;t===0&&(t=Sn,Sn<<=1,(Sn&261888)===0&&(Sn=256)),xi=t}return xi}function ey(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:wl(""+t)}function ty(t,s){var a=s.ownerDocument.createElement("input");return a.name=s.name,a.value=s.value,t.id&&a.setAttribute("form",t.id),s.parentNode.insertBefore(a,s),t=new FormData(t),a.parentNode.removeChild(a),t}function ww(t,s,a,c,d){if(s==="submit"&&a&&a.stateNode===d){var p=ey((d[Nt]||null).action),b=c.submitter;b&&(s=(s=b[Nt]||null)?ey(s.formAction):b.getAttribute("formAction"),s!==null&&(p=s,b=null));var T=new El("action","action",null,c,d);t.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(xi!==0){var A=b?ty(d,b):new FormData(d);Ju(a,{pending:!0,data:A,method:d.method,action:p},null,A)}}else typeof p=="function"&&(T.preventDefault(),A=b?ty(d,b):new FormData(d),Ju(a,{pending:!0,data:A,method:d.method,action:p},p,A))},currentTarget:d}]})}}for(var jf=0;jf<du.length;jf++){var Lf=du[jf],xw=Lf.toLowerCase(),_w=Lf[0].toUpperCase()+Lf.slice(1);dn(xw,"on"+_w)}dn(jp,"onAnimationEnd"),dn(Lp,"onAnimationIteration"),dn(Rp,"onAnimationStart"),dn("dblclick","onDoubleClick"),dn("focusin","onFocus"),dn("focusout","onBlur"),dn(H1,"onTransitionRun"),dn(q1,"onTransitionStart"),dn($1,"onTransitionCancel"),dn(Dp,"onTransitionEnd"),Es("onMouseEnter",["mouseout","mouseover"]),Es("onMouseLeave",["mouseout","mouseover"]),Es("onPointerEnter",["pointerout","pointerover"]),Es("onPointerLeave",["pointerout","pointerover"]),$i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$i("onBeforeInput",["compositionend","keypress","textInput","paste"]),$i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wa="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(" "),Tw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wa));function ny(t,s){s=(s&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],d=c.event;c=c.listeners;e:{var p=void 0;if(s)for(var b=c.length-1;0<=b;b--){var T=c[b],A=T.instance,R=T.currentTarget;if(T=T.listener,A!==p&&d.isPropagationStopped())break e;p=T,d.currentTarget=R;try{p(d)}catch(G){Cl(G)}d.currentTarget=null,p=A}else for(b=0;b<c.length;b++){if(T=c[b],A=T.instance,R=T.currentTarget,T=T.listener,A!==p&&d.isPropagationStopped())break e;p=T,d.currentTarget=R;try{p(d)}catch(G){Cl(G)}d.currentTarget=null,p=A}}}}function me(t,s){var a=s[Kc];a===void 0&&(a=s[Kc]=new Set);var c=t+"__bubble";a.has(c)||(iy(s,t,2,!1),a.add(c))}function Rf(t,s,a){var c=0;s&&(c|=4),iy(a,t,c,s)}var go="_reactListening"+Math.random().toString(36).slice(2);function Df(t){if(!t[go]){t[go]=!0,Jd.forEach(function(a){a!=="selectionchange"&&(Tw.has(a)||Rf(a,!1,t),Rf(a,!0,t))});var s=t.nodeType===9?t:t.ownerDocument;s===null||s[go]||(s[go]=!0,Rf("selectionchange",!1,s))}}function iy(t,s,a,c){switch(jy(s)){case 2:var d=Zw;break;case 8:d=Ww;break;default:d=Jf}a=d.bind(null,s,a,t),d=void 0,!eu||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),c?d!==void 0?t.addEventListener(s,a,{capture:!0,passive:d}):t.addEventListener(s,a,!0):d!==void 0?t.addEventListener(s,a,{passive:d}):t.addEventListener(s,a,!1)}function zf(t,s,a,c,d){var p=c;if((s&1)===0&&(s&2)===0&&c!==null)e:for(;;){if(c===null)return;var b=c.tag;if(b===3||b===4){var T=c.stateNode.containerInfo;if(T===d)break;if(b===4)for(b=c.return;b!==null;){var A=b.tag;if((A===3||A===4)&&b.stateNode.containerInfo===d)return;b=b.return}for(;T!==null;){if(b=xs(T),b===null)return;if(A=b.tag,A===5||A===6||A===26||A===27){c=p=b;continue e}T=T.parentNode}}c=c.return}op(function(){var R=p,G=Zc(a),F=[];e:{var z=zp.get(t);if(z!==void 0){var H=El,te=t;switch(t){case"keypress":if(_l(a)===0)break e;case"keydown":case"keyup":H=y1;break;case"focusin":te="focus",H=su;break;case"focusout":te="blur",H=su;break;case"beforeblur":case"afterblur":H=su;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":H=fp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=r1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=S1;break;case jp:case Lp:case Rp:H=o1;break;case Dp:H=x1;break;case"scroll":case"scrollend":H=i1;break;case"wheel":H=T1;break;case"copy":case"cut":case"paste":H=u1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=dp;break;case"toggle":case"beforetoggle":H=A1}var oe=(s&4)!==0,Oe=!oe&&(t==="scroll"||t==="scrollend"),O=oe?z!==null?z+"Capture":null:z;oe=[];for(var M=R,L;M!==null;){var X=M;if(L=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||L===null||O===null||(X=Vr(M,O),X!=null&&oe.push(xa(M,X,L))),Oe)break;M=M.return}0<oe.length&&(z=new H(z,te,null,a,G),F.push({event:z,listeners:oe}))}}if((s&7)===0){e:{if(z=t==="mouseover"||t==="pointerover",H=t==="mouseout"||t==="pointerout",z&&a!==Pc&&(te=a.relatedTarget||a.fromElement)&&(xs(te)||te[ws]))break e;if((H||z)&&(z=G.window===G?G:(z=G.ownerDocument)?z.defaultView||z.parentWindow:window,H?(te=a.relatedTarget||a.toElement,H=R,te=te?xs(te):null,te!==null&&(Oe=o(te),oe=te.tag,te!==Oe||oe!==5&&oe!==27&&oe!==6)&&(te=null)):(H=null,te=R),H!==te)){if(oe=fp,X="onMouseLeave",O="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(oe=dp,X="onPointerLeave",O="onPointerEnter",M="pointer"),Oe=H==null?z:Ir(H),L=te==null?z:Ir(te),z=new oe(X,M+"leave",H,a,G),z.target=Oe,z.relatedTarget=L,X=null,xs(G)===R&&(oe=new oe(O,M+"enter",te,a,G),oe.target=L,oe.relatedTarget=Oe,X=oe),Oe=X,H&&te)t:{for(oe=Ew,O=H,M=te,L=0,X=O;X;X=oe(X))L++;X=0;for(var ae=M;ae;ae=oe(ae))X++;for(;0<L-X;)O=oe(O),L--;for(;0<X-L;)M=oe(M),X--;for(;L--;){if(O===M||M!==null&&O===M.alternate){oe=O;break t}O=oe(O),M=oe(M)}oe=null}else oe=null;H!==null&&sy(F,z,H,oe,!1),te!==null&&Oe!==null&&sy(F,Oe,te,oe,!0)}}e:{if(z=R?Ir(R):window,H=z.nodeName&&z.nodeName.toLowerCase(),H==="select"||H==="input"&&z.type==="file")var _e=wp;else if(vp(z))if(xp)_e=z1;else{_e=R1;var ie=L1}else H=z.nodeName,!H||H.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?R&&Jc(R.elementType)&&(_e=wp):_e=D1;if(_e&&(_e=_e(t,R))){Sp(F,_e,a,G);break e}ie&&ie(t,z,R),t==="focusout"&&R&&z.type==="number"&&R.memoizedProps.value!=null&&Qc(z,"number",z.value)}switch(ie=R?Ir(R):window,t){case"focusin":(vp(ie)||ie.contentEditable==="true")&&(Os=ie,uu=R,Pr=null);break;case"focusout":Pr=uu=Os=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,Mp(F,a,G);break;case"selectionchange":if(U1)break;case"keydown":case"keyup":Mp(F,a,G)}var pe;if(au)e:{switch(t){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else Ms?yp(t,a)&&(be="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(be="onCompositionStart");be&&(pp&&a.locale!=="ko"&&(Ms||be!=="onCompositionStart"?be==="onCompositionEnd"&&Ms&&(pe=cp()):(ai=G,tu="value"in ai?ai.value:ai.textContent,Ms=!0)),ie=mo(R,be),0<ie.length&&(be=new hp(be,t,null,a,G),F.push({event:be,listeners:ie}),pe?be.data=pe:(pe=bp(a),pe!==null&&(be.data=pe)))),(pe=C1?k1(t,a):M1(t,a))&&(be=mo(R,"onBeforeInput"),0<be.length&&(ie=new hp("onBeforeInput","beforeinput",null,a,G),F.push({event:ie,listeners:be}),ie.data=pe)),ww(F,t,R,a,G)}ny(F,s)})}function xa(t,s,a){return{instance:t,listener:s,currentTarget:a}}function mo(t,s){for(var a=s+"Capture",c=[];t!==null;){var d=t,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=Vr(t,a),d!=null&&c.unshift(xa(t,d,p)),d=Vr(t,s),d!=null&&c.push(xa(t,d,p))),t.tag===3)return c;t=t.return}return[]}function Ew(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function sy(t,s,a,c,d){for(var p=s._reactName,b=[];a!==null&&a!==c;){var T=a,A=T.alternate,R=T.stateNode;if(T=T.tag,A!==null&&A===c)break;T!==5&&T!==26&&T!==27||R===null||(A=R,d?(R=Vr(a,p),R!=null&&b.unshift(xa(a,R,A))):d||(R=Vr(a,p),R!=null&&b.push(xa(a,R,A)))),a=a.return}b.length!==0&&t.push({event:s,listeners:b})}var Aw=/\r\n?/g,Nw=/\u0000|\uFFFD/g;function ry(t){return(typeof t=="string"?t:""+t).replace(Aw,`
`).replace(Nw,"")}function ay(t,s){return s=ry(s),ry(t)===s}function Me(t,s,a,c,d,p){switch(a){case"children":typeof c=="string"?s==="body"||s==="textarea"&&c===""||Ns(t,c):(typeof c=="number"||typeof c=="bigint")&&s!=="body"&&Ns(t,""+c);break;case"className":vl(t,"class",c);break;case"tabIndex":vl(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":vl(t,a,c);break;case"style":ap(t,c,p);break;case"data":if(s!=="object"){vl(t,"data",c);break}case"src":case"href":if(c===""&&(s!=="a"||a!=="href")){t.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=wl(""+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 p=="function"&&(a==="formAction"?(s!=="input"&&Me(t,s,"name",d.name,d,null),Me(t,s,"formEncType",d.formEncType,d,null),Me(t,s,"formMethod",d.formMethod,d,null),Me(t,s,"formTarget",d.formTarget,d,null)):(Me(t,s,"encType",d.encType,d,null),Me(t,s,"method",d.method,d,null),Me(t,s,"target",d.target,d,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=wl(""+c),t.setAttribute(a,c);break;case"onClick":c!=null&&(t.onclick=jn);break;case"onScroll":c!=null&&me("scroll",t);break;case"onScrollEnd":c!=null&&me("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(a=c.__html,a!=null){if(d.children!=null)throw Error(r(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=wl(""+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":me("beforetoggle",t),me("toggle",t),bl(t,"popover",c);break;case"xlinkActuate":On(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":On(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":On(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":On(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":On(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":On(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":On(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":On(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":On(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":bl(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=t1.get(a)||a,bl(t,a,c))}}function Bf(t,s,a,c,d,p){switch(a){case"style":ap(t,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(a=c.__html,a!=null){if(d.children!=null)throw Error(r(60));t.innerHTML=a}}break;case"children":typeof c=="string"?Ns(t,c):(typeof c=="number"||typeof c=="bigint")&&Ns(t,""+c);break;case"onScroll":c!=null&&me("scroll",t);break;case"onScrollEnd":c!=null&&me("scrollend",t);break;case"onClick":c!=null&&(t.onclick=jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Pd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),s=a.slice(2,d?a.length-7:void 0),p=t[Nt]||null,p=p!=null?p[a]:null,typeof p=="function"&&t.removeEventListener(s,p,d),typeof c=="function")){typeof p!="function"&&p!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(s,c,d);break e}a in t?t[a]=c:c===!0?t.setAttribute(a,""):bl(t,a,c)}}}function ht(t,s,a){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":me("error",t),me("load",t);var c=!1,d=!1,p;for(p in a)if(a.hasOwnProperty(p)){var b=a[p];if(b!=null)switch(p){case"src":c=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Me(t,s,p,b,a,null)}}d&&Me(t,s,"srcSet",a.srcSet,a,null),c&&Me(t,s,"src",a.src,a,null);return;case"input":me("invalid",t);var T=p=b=d=null,A=null,R=null;for(c in a)if(a.hasOwnProperty(c)){var G=a[c];if(G!=null)switch(c){case"name":d=G;break;case"type":b=G;break;case"checked":A=G;break;case"defaultChecked":R=G;break;case"value":p=G;break;case"defaultValue":T=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,s));break;default:Me(t,s,c,G,a,null)}}np(t,p,T,A,R,b,d,!1);return;case"select":me("invalid",t),c=b=p=null;for(d in a)if(a.hasOwnProperty(d)&&(T=a[d],T!=null))switch(d){case"value":p=T;break;case"defaultValue":b=T;break;case"multiple":c=T;default:Me(t,s,d,T,a,null)}s=p,a=b,t.multiple=!!c,s!=null?As(t,!!c,s,!1):a!=null&&As(t,!!c,a,!0);return;case"textarea":me("invalid",t),p=d=c=null;for(b in a)if(a.hasOwnProperty(b)&&(T=a[b],T!=null))switch(b){case"value":c=T;break;case"defaultValue":d=T;break;case"children":p=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:Me(t,s,b,T,a,null)}sp(t,c,d,p);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:Me(t,s,A,c,a,null)}return;case"dialog":me("beforetoggle",t),me("toggle",t),me("cancel",t),me("close",t);break;case"iframe":case"object":me("load",t);break;case"video":case"audio":for(c=0;c<wa.length;c++)me(wa[c],t);break;case"image":me("error",t),me("load",t);break;case"details":me("toggle",t);break;case"embed":case"source":case"link":me("error",t),me("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(R in a)if(a.hasOwnProperty(R)&&(c=a[R],c!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Me(t,s,R,c,a,null)}return;default:if(Jc(s)){for(G in a)a.hasOwnProperty(G)&&(c=a[G],c!==void 0&&Bf(t,s,G,c,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(c=a[T],c!=null&&Me(t,s,T,c,a,null))}function Cw(t,s,a,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,b=null,T=null,A=null,R=null,G=null;for(H in a){var F=a[H];if(a.hasOwnProperty(H)&&F!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":A=F;default:c.hasOwnProperty(H)||Me(t,s,H,null,c,F)}}for(var z in c){var H=c[z];if(F=a[z],c.hasOwnProperty(z)&&(H!=null||F!=null))switch(z){case"type":p=H;break;case"name":d=H;break;case"checked":R=H;break;case"defaultChecked":G=H;break;case"value":b=H;break;case"defaultValue":T=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,s));break;default:H!==F&&Me(t,s,z,H,c,F)}}Fc(t,b,T,A,R,G,p,d);return;case"select":H=b=T=z=null;for(p in a)if(A=a[p],a.hasOwnProperty(p)&&A!=null)switch(p){case"value":break;case"multiple":H=A;default:c.hasOwnProperty(p)||Me(t,s,p,null,c,A)}for(d in c)if(p=c[d],A=a[d],c.hasOwnProperty(d)&&(p!=null||A!=null))switch(d){case"value":z=p;break;case"defaultValue":T=p;break;case"multiple":b=p;default:p!==A&&Me(t,s,d,p,c,A)}s=T,a=b,c=H,z!=null?As(t,!!a,z,!1):!!c!=!!a&&(s!=null?As(t,!!a,s,!0):As(t,!!a,a?[]:"",!1));return;case"textarea":H=z=null;for(T in a)if(d=a[T],a.hasOwnProperty(T)&&d!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Me(t,s,T,null,c,d)}for(b in c)if(d=c[b],p=a[b],c.hasOwnProperty(b)&&(d!=null||p!=null))switch(b){case"value":z=d;break;case"defaultValue":H=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(r(91));break;default:d!==p&&Me(t,s,b,d,c,p)}ip(t,z,H);return;case"option":for(var te in a)if(z=a[te],a.hasOwnProperty(te)&&z!=null&&!c.hasOwnProperty(te))switch(te){case"selected":t.selected=!1;break;default:Me(t,s,te,null,c,z)}for(A in c)if(z=c[A],H=a[A],c.hasOwnProperty(A)&&z!==H&&(z!=null||H!=null))switch(A){case"selected":t.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Me(t,s,A,z,c,H)}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)z=a[oe],a.hasOwnProperty(oe)&&z!=null&&!c.hasOwnProperty(oe)&&Me(t,s,oe,null,c,z);for(R in c)if(z=c[R],H=a[R],c.hasOwnProperty(R)&&z!==H&&(z!=null||H!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,s));break;default:Me(t,s,R,z,c,H)}return;default:if(Jc(s)){for(var Oe in a)z=a[Oe],a.hasOwnProperty(Oe)&&z!==void 0&&!c.hasOwnProperty(Oe)&&Bf(t,s,Oe,void 0,c,z);for(G in c)z=c[G],H=a[G],!c.hasOwnProperty(G)||z===H||z===void 0&&H===void 0||Bf(t,s,G,z,c,H);return}}for(var O in a)z=a[O],a.hasOwnProperty(O)&&z!=null&&!c.hasOwnProperty(O)&&Me(t,s,O,null,c,z);for(F in c)z=c[F],H=a[F],!c.hasOwnProperty(F)||z===H||z==null&&H==null||Me(t,s,F,z,c,H)}function ly(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kw(){if(typeof performance.getEntriesByType=="function"){for(var t=0,s=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var d=a[c],p=d.transferSize,b=d.initiatorType,T=d.duration;if(p&&T&&ly(b)){for(b=0,T=d.responseEnd,c+=1;c<a.length;c++){var A=a[c],R=A.startTime;if(R>T)break;var G=A.transferSize,F=A.initiatorType;G&&ly(F)&&(A=A.responseEnd,b+=G*(A<T?1:(T-R)/(A-R)))}if(--c,s+=8*(p+b)/(d.duration/1e3),t++,10<t)break}}if(0<t)return s/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Uf=null,Hf=null;function yo(t){return t.nodeType===9?t:t.ownerDocument}function oy(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 cy(t,s){if(t===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&s==="foreignObject"?0:t}function qf(t,s){return t==="textarea"||t==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var $f=null;function Mw(){var t=window.event;return t&&t.type==="popstate"?t===$f?!1:($f=t,!0):($f=null,!1)}var uy=typeof setTimeout=="function"?setTimeout:void 0,Ow=typeof clearTimeout=="function"?clearTimeout:void 0,fy=typeof Promise=="function"?Promise:void 0,jw=typeof queueMicrotask=="function"?queueMicrotask:typeof fy<"u"?function(t){return fy.resolve(null).then(t).catch(Lw)}:uy;function Lw(t){setTimeout(function(){throw t})}function _i(t){return t==="head"}function hy(t,s){var a=s,c=0;do{var d=a.nextSibling;if(t.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(c===0){t.removeChild(d),sr(s);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")_a(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,_a(a);for(var p=a.firstChild;p;){var b=p.nextSibling,T=p.nodeName;p[$r]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=b}}else a==="body"&&_a(t.ownerDocument.body);a=d}while(a);sr(s)}function dy(t,s){var a=t;t=0;do{var c=a.nextSibling;if(a.nodeType===1?s?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(s?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=c}while(a)}function If(t){var s=t.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var a=s;switch(s=s.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":If(a),Yc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function Rw(t,s,a,c){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==s.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[$r])switch(s){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(s==="input"&&t.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=sn(t.nextSibling),t===null)break}return null}function Dw(t,s,a){if(s==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=sn(t.nextSibling),t===null))return null;return t}function py(t,s){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=sn(t.nextSibling),t===null))return null;return t}function Vf(t){return t.data==="$?"||t.data==="$~"}function Gf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function zw(t,s){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=s;else if(t.data!=="$?"||a.readyState!=="loading")s();else{var c=function(){s(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function sn(t){for(;t!=null;t=t.nextSibling){var s=t.nodeType;if(s===1||s===3)break;if(s===8){if(s=t.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return t}var Kf=null;function gy(t){t=t.nextSibling;for(var s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(s===0)return sn(t.nextSibling);s--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||s++}t=t.nextSibling}return null}function my(t){t=t.previousSibling;for(var s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(s===0)return t;s--}else a!=="/$"&&a!=="/&"||s++}t=t.previousSibling}return null}function yy(t,s,a){switch(s=yo(a),t){case"html":if(t=s.documentElement,!t)throw Error(r(452));return t;case"head":if(t=s.head,!t)throw Error(r(453));return t;case"body":if(t=s.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function _a(t){for(var s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Yc(t)}var rn=new Map,by=new Set;function bo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Fn=P.d;P.d={f:Bw,r:Uw,D:Hw,C:qw,L:$w,m:Iw,X:Gw,S:Vw,M:Kw};function Bw(){var t=Fn.f(),s=oo();return t||s}function Uw(t){var s=_s(t);s!==null&&s.tag===5&&s.type==="form"?Dg(s):Fn.r(t)}var tr=typeof document>"u"?null:document;function vy(t,s,a){var c=tr;if(c&&typeof s=="string"&&s){var d=Jt(s);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),by.has(d)||(by.add(d),t={rel:t,crossOrigin:a,href:s},c.querySelector(d)===null&&(s=c.createElement("link"),ht(s,"link",t),at(s),c.head.appendChild(s)))}}function Hw(t){Fn.D(t),vy("dns-prefetch",t,null)}function qw(t,s){Fn.C(t,s),vy("preconnect",t,s)}function $w(t,s,a){Fn.L(t,s,a);var c=tr;if(c&&t&&s){var d='link[rel="preload"][as="'+Jt(s)+'"]';s==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+Jt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+Jt(a.imageSizes)+'"]')):d+='[href="'+Jt(t)+'"]';var p=d;switch(s){case"style":p=nr(t);break;case"script":p=ir(t)}rn.has(p)||(t=m({rel:"preload",href:s==="image"&&a&&a.imageSrcSet?void 0:t,as:s},a),rn.set(p,t),c.querySelector(d)!==null||s==="style"&&c.querySelector(Ta(p))||s==="script"&&c.querySelector(Ea(p))||(s=c.createElement("link"),ht(s,"link",t),at(s),c.head.appendChild(s)))}}function Iw(t,s){Fn.m(t,s);var a=tr;if(a&&t){var c=s&&typeof s.as=="string"?s.as:"script",d='link[rel="modulepreload"][as="'+Jt(c)+'"][href="'+Jt(t)+'"]',p=d;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=ir(t)}if(!rn.has(p)&&(t=m({rel:"modulepreload",href:t},s),rn.set(p,t),a.querySelector(d)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ea(p)))return}c=a.createElement("link"),ht(c,"link",t),at(c),a.head.appendChild(c)}}}function Vw(t,s,a){Fn.S(t,s,a);var c=tr;if(c&&t){var d=Ts(c).hoistableStyles,p=nr(t);s=s||"default";var b=d.get(p);if(!b){var T={loading:0,preload:null};if(b=c.querySelector(Ta(p)))T.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":s},a),(a=rn.get(p))&&Yf(t,a);var A=b=c.createElement("link");at(A),ht(A,"link",t),A._p=new Promise(function(R,G){A.onload=R,A.onerror=G}),A.addEventListener("load",function(){T.loading|=1}),A.addEventListener("error",function(){T.loading|=2}),T.loading|=4,vo(b,s,c)}b={type:"stylesheet",instance:b,count:1,state:T},d.set(p,b)}}}function Gw(t,s){Fn.X(t,s);var a=tr;if(a&&t){var c=Ts(a).hoistableScripts,d=ir(t),p=c.get(d);p||(p=a.querySelector(Ea(d)),p||(t=m({src:t,async:!0},s),(s=rn.get(d))&&Xf(t,s),p=a.createElement("script"),at(p),ht(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(d,p))}}function Kw(t,s){Fn.M(t,s);var a=tr;if(a&&t){var c=Ts(a).hoistableScripts,d=ir(t),p=c.get(d);p||(p=a.querySelector(Ea(d)),p||(t=m({src:t,async:!0,type:"module"},s),(s=rn.get(d))&&Xf(t,s),p=a.createElement("script"),at(p),ht(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(d,p))}}function Sy(t,s,a,c){var d=(d=re.current)?bo(d):null;if(!d)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(s=nr(a.href),a=Ts(d).hoistableStyles,c=a.get(s),c||(c={type:"style",instance:null,count:0,state:null},a.set(s,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=nr(a.href);var p=Ts(d).hoistableStyles,b=p.get(t);if(b||(d=d.ownerDocument||d,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,b),(p=d.querySelector(Ta(t)))&&!p._p&&(b.instance=p,b.state.loading=5),rn.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},rn.set(t,a),p||Yw(d,t,a,b.state))),s&&c===null)throw Error(r(528,""));return b}if(s&&c!==null)throw Error(r(529,""));return null;case"script":return s=a.async,a=a.src,typeof a=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ir(a),a=Ts(d).hoistableScripts,c=a.get(s),c||(c={type:"script",instance:null,count:0,state:null},a.set(s,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function nr(t){return'href="'+Jt(t)+'"'}function Ta(t){return'link[rel="stylesheet"]['+t+"]"}function wy(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function Yw(t,s,a,c){t.querySelector('link[rel="preload"][as="style"]['+s+"]")?c.loading=1:(s=t.createElement("link"),c.preload=s,s.addEventListener("load",function(){return c.loading|=1}),s.addEventListener("error",function(){return c.loading|=2}),ht(s,"link",a),at(s),t.head.appendChild(s))}function ir(t){return'[src="'+Jt(t)+'"]'}function Ea(t){return"script[async]"+t}function xy(t,s,a){if(s.count++,s.instance===null)switch(s.type){case"style":var c=t.querySelector('style[data-href~="'+Jt(a.href)+'"]');if(c)return s.instance=c,at(c),c;var d=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),at(c),ht(c,"style",d),vo(c,a.precedence,t),s.instance=c;case"stylesheet":d=nr(a.href);var p=t.querySelector(Ta(d));if(p)return s.state.loading|=4,s.instance=p,at(p),p;c=wy(a),(d=rn.get(d))&&Yf(c,d),p=(t.ownerDocument||t).createElement("link"),at(p);var b=p;return b._p=new Promise(function(T,A){b.onload=T,b.onerror=A}),ht(p,"link",c),s.state.loading|=4,vo(p,a.precedence,t),s.instance=p;case"script":return p=ir(a.src),(d=t.querySelector(Ea(p)))?(s.instance=d,at(d),d):(c=a,(d=rn.get(p))&&(c=m({},a),Xf(c,d)),t=t.ownerDocument||t,d=t.createElement("script"),at(d),ht(d,"link",c),t.head.appendChild(d),s.instance=d);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,vo(c,a.precedence,t));return s.instance}function vo(t,s,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=c.length?c[c.length-1]:null,p=d,b=0;b<c.length;b++){var T=c[b];if(T.dataset.precedence===s)p=T;else if(p!==d)break}p?p.parentNode.insertBefore(t,p.nextSibling):(s=a.nodeType===9?a.head:a,s.insertBefore(t,s.firstChild))}function Yf(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.title==null&&(t.title=s.title)}function Xf(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.integrity==null&&(t.integrity=s.integrity)}var So=null;function _y(t,s,a){if(So===null){var c=new Map,d=So=new Map;d.set(a,c)}else d=So,c=d.get(a),c||(c=new Map,d.set(a,c));if(c.has(t))return c;for(c.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var p=a[d];if(!(p[$r]||p[ot]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var b=p.getAttribute(s)||"";b=t+b;var T=c.get(b);T?T.push(p):c.set(b,[p])}}return c}function Ty(t,s,a){t=t.ownerDocument||t,t.head.insertBefore(a,s==="title"?t.querySelector("head > title"):null)}function Xw(t,s,a){if(a===1||s.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return t=s.disabled,typeof s.precedence=="string"&&t==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Ey(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Fw(t,s,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=nr(c.href),p=s.querySelector(Ta(d));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(t.count++,t=wo.bind(t),s.then(t,t)),a.state.loading|=4,a.instance=p,at(p);return}p=s.ownerDocument||s,c=wy(c),(d=rn.get(d))&&Yf(c,d),p=p.createElement("link"),at(p);var b=p;b._p=new Promise(function(T,A){b.onload=T,b.onerror=A}),ht(p,"link",c),a.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=wo.bind(t),s.addEventListener("load",a),s.addEventListener("error",a))}}var Ff=0;function Qw(t,s){return t.stylesheets&&t.count===0&&_o(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var c=setTimeout(function(){if(t.stylesheets&&_o(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+s);0<t.imgBytes&&Ff===0&&(Ff=62500*kw());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&_o(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>Ff?50:800)+s);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(d)}}:null}function wo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_o(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var xo=null;function _o(t,s){t.stylesheets=null,t.unsuspend!==null&&(t.count++,xo=new Map,s.forEach(Jw,t),xo=null,wo.call(t))}function Jw(t,s){if(!(s.state.loading&4)){var a=xo.get(t);if(a)var c=a.get(null);else{a=new Map,xo.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var b=d[p];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),c=b)}c&&a.set(null,c)}d=s.instance,b=d.getAttribute("data-precedence"),p=a.get(b)||c,p===c&&a.set(null,d),a.set(b,d),this.count++,c=wo.bind(this),d.addEventListener("load",c),d.addEventListener("error",c),p?p.parentNode.insertBefore(d,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),s.state.loading|=4}}var Aa={$$typeof:$,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Pw(t,s,a,c,d,p,b,T,A){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=Ic(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ic(0),this.hiddenUpdates=Ic(null),this.identifierPrefix=c,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Ay(t,s,a,c,d,p,b,T,A,R,G,F){return t=new Pw(t,s,a,b,A,R,G,F,T),s=1,p===!0&&(s|=24),p=$t(3,null,null,s),t.current=p,p.stateNode=t,s=Au(),s.refCount++,t.pooledCache=s,s.refCount++,p.memoizedState={element:c,isDehydrated:a,cache:s},Mu(p),t}function Ny(t){return t?(t=Rs,t):Rs}function Cy(t,s,a,c,d,p){d=Ny(d),c.context===null?c.context=d:c.pendingContext=d,c=hi(s),c.payload={element:a},p=p===void 0?null:p,p!==null&&(c.callback=p),a=di(t,c,s),a!==null&&(Lt(a,t,s),sa(a,t,s))}function ky(t,s){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<s?a:s}}function Qf(t,s){ky(t,s),(t=t.alternate)&&ky(t,s)}function My(t){if(t.tag===13||t.tag===31){var s=Ki(t,67108864);s!==null&&Lt(s,t,67108864),Qf(t,67108864)}}function Oy(t){if(t.tag===13||t.tag===31){var s=Yt();s=Vc(s);var a=Ki(t,s);a!==null&&Lt(a,t,s),Qf(t,s)}}var To=!0;function Zw(t,s,a,c){var d=B.T;B.T=null;var p=P.p;try{P.p=2,Jf(t,s,a,c)}finally{P.p=p,B.T=d}}function Ww(t,s,a,c){var d=B.T;B.T=null;var p=P.p;try{P.p=8,Jf(t,s,a,c)}finally{P.p=p,B.T=d}}function Jf(t,s,a,c){if(To){var d=Pf(c);if(d===null)zf(t,s,c,Eo,a),Ly(t,c);else if(tx(d,t,s,a,c))c.stopPropagation();else if(Ly(t,c),s&4&&-1<ex.indexOf(t)){for(;d!==null;){var p=_s(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var b=qi(p.pendingLanes);if(b!==0){var T=p;for(T.pendingLanes|=2,T.entangledLanes|=2;b;){var A=1<<31-wt(b);T.entanglements[1]|=A,b&=~A}Tn(p),(Ee&6)===0&&(ao=St()+500,Sa(0))}}break;case 31:case 13:T=Ki(p,2),T!==null&&Lt(T,p,2),oo(),Qf(p,2)}if(p=Pf(c),p===null&&zf(t,s,c,Eo,a),p===d)break;d=p}d!==null&&c.stopPropagation()}else zf(t,s,c,null,a)}}function Pf(t){return t=Zc(t),Zf(t)}var Eo=null;function Zf(t){if(Eo=null,t=xs(t),t!==null){var s=o(t);if(s===null)t=null;else{var a=s.tag;if(a===13){if(t=u(s),t!==null)return t;t=null}else if(a===31){if(t=f(s),t!==null)return t;t=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;t=null}else s!==t&&(t=null)}}return Eo=t,null}function jy(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(Uc()){case dl:return 2;case Ur:return 8;case si:case Hc:return 32;case pl:return 268435456;default:return 32}default:return 32}}var Wf=!1,Ti=null,Ei=null,Ai=null,Na=new Map,Ca=new Map,Ni=[],ex="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 Ly(t,s){switch(t){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Na.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ca.delete(s.pointerId)}}function ka(t,s,a,c,d,p){return t===null||t.nativeEvent!==p?(t={blockedOn:s,domEventName:a,eventSystemFlags:c,nativeEvent:p,targetContainers:[d]},s!==null&&(s=_s(s),s!==null&&My(s)),t):(t.eventSystemFlags|=c,s=t.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),t)}function tx(t,s,a,c,d){switch(s){case"focusin":return Ti=ka(Ti,t,s,a,c,d),!0;case"dragenter":return Ei=ka(Ei,t,s,a,c,d),!0;case"mouseover":return Ai=ka(Ai,t,s,a,c,d),!0;case"pointerover":var p=d.pointerId;return Na.set(p,ka(Na.get(p)||null,t,s,a,c,d)),!0;case"gotpointercapture":return p=d.pointerId,Ca.set(p,ka(Ca.get(p)||null,t,s,a,c,d)),!0}return!1}function Ry(t){var s=xs(t.target);if(s!==null){var a=o(s);if(a!==null){if(s=a.tag,s===13){if(s=u(a),s!==null){t.blockedOn=s,Fd(t.priority,function(){Oy(a)});return}}else if(s===31){if(s=f(a),s!==null){t.blockedOn=s,Fd(t.priority,function(){Oy(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ao(t){if(t.blockedOn!==null)return!1;for(var s=t.targetContainers;0<s.length;){var a=Pf(t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Pc=c,a.target.dispatchEvent(c),Pc=null}else return s=_s(a),s!==null&&My(s),t.blockedOn=a,!1;s.shift()}return!0}function Dy(t,s,a){Ao(t)&&a.delete(s)}function nx(){Wf=!1,Ti!==null&&Ao(Ti)&&(Ti=null),Ei!==null&&Ao(Ei)&&(Ei=null),Ai!==null&&Ao(Ai)&&(Ai=null),Na.forEach(Dy),Ca.forEach(Dy)}function No(t,s){t.blockedOn===s&&(t.blockedOn=null,Wf||(Wf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,nx)))}var Co=null;function zy(t){Co!==t&&(Co=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Co===t&&(Co=null);for(var s=0;s<t.length;s+=3){var a=t[s],c=t[s+1],d=t[s+2];if(typeof c!="function"){if(Zf(c||a)===null)continue;break}var p=_s(a);p!==null&&(t.splice(s,3),s-=3,Ju(p,{pending:!0,data:d,method:a.method,action:c},c,d))}}))}function sr(t){function s(A){return No(A,t)}Ti!==null&&No(Ti,t),Ei!==null&&No(Ei,t),Ai!==null&&No(Ai,t),Na.forEach(s),Ca.forEach(s);for(var a=0;a<Ni.length;a++){var c=Ni[a];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Ni.length&&(a=Ni[0],a.blockedOn===null);)Ry(a),a.blockedOn===null&&Ni.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var d=a[c],p=a[c+1],b=d[Nt]||null;if(typeof p=="function")b||zy(a);else if(b){var T=null;if(p&&p.hasAttribute("formAction")){if(d=p,b=p[Nt]||null)T=b.formAction;else if(Zf(d)!==null)continue}else T=b.action;typeof T=="function"?a[c+1]=T:(a.splice(c,3),c-=3),zy(a)}}}function By(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(b){return d=b})},focusReset:"manual",scroll:"manual"})}function s(){d!==null&&(d(),d=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),d!==null&&(d(),d=null)}}}function eh(t){this._internalRoot=t}ko.prototype.render=eh.prototype.render=function(t){var s=this._internalRoot;if(s===null)throw Error(r(409));var a=s.current,c=Yt();Cy(a,c,t,s,null,null)},ko.prototype.unmount=eh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var s=t.containerInfo;Cy(t.current,2,null,t,null,null),oo(),s[ws]=null}};function ko(t){this._internalRoot=t}ko.prototype.unstable_scheduleHydration=function(t){if(t){var s=Xd();t={blockedOn:null,target:t,priority:s};for(var a=0;a<Ni.length&&s!==0&&s<Ni[a].priority;a++);Ni.splice(a,0,t),a===0&&Ry(t)}};var Uy=e.version;if(Uy!=="19.2.1")throw Error(r(527,Uy,"19.2.1"));P.findDOMNode=function(t){var s=t._reactInternals;if(s===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=g(s),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var ix={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mo.isDisabled&&Mo.supportsFiber)try{Mn=Mo.inject(ix),rt=Mo}catch{}}return ja.createRoot=function(t,s){if(!l(t))throw Error(r(299));var a=!1,c="",d=Kg,p=Yg,b=Xg;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(p=s.onCaughtError),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),s=Ay(t,1,!1,null,null,a,c,null,d,p,b,By),t[ws]=s.current,Df(t),new eh(s)},ja.hydrateRoot=function(t,s,a){if(!l(t))throw Error(r(299));var c=!1,d="",p=Kg,b=Yg,T=Xg,A=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),s=Ay(t,1,!0,s,a??null,c,d,A,p,b,T,By),s.context=Ny(null),a=s.current,c=Yt(),c=Vc(c),d=hi(c),d.callback=null,di(a,d,c),a=c,s.current.lanes=a,qr(s,a),Tn(s),t[ws]=s.current,Df(t),new ko(s)},ja.version="19.2.1",ja}var Jy;function Tx(){if(Jy)return ih.exports;Jy=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(),ih.exports=_x(),ih.exports}var zC=Tx();const Qh=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}],["PageAgent.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.exposeConsoleApi",{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}],["Page.agent",{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}],["PageAgent.perform",{title:'Perform "{task}"'}],["PageAgent.expect",{title:'Expect "{expectation}"'}],["PageAgent.extract",{title:'Extract "{query}"'}],["PageAgent.dispose",{internal:!0}],["PageAgent.usage",{title:"Get agent usage",group:"configuration"}]]);function eb(n,e){var i;return(i=Ex(n,e))==null?void 0:i.replaceAll(`
`,"\\n")}function Ex(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 r=Ax(n,i);if(r!==void 0)return r}}function Ax(n,e){const i=e.split(".");let r=n;for(const l of i){if(typeof r!="object"||r===null)return;r=r[l]}if(r!==void 0)return String(r)}function Nx(n){var i;return(n.title??((i=Qh.get(n.type+"."+n.method))==null?void 0:i.title)??n.method).replace(/\{([^}]+)\}/g,(r,l)=>eb(n.params,l)??r)}function Cx(n){var e;return(e=Qh.get(n.type+"."+n.method))==null?void 0:e.group}const qa=Symbol("context"),tb=Symbol("nextInContext"),nb=Symbol("prevByEndTime"),ib=Symbol("nextByStartTime"),Py=Symbol("events");class BC{constructor(e,i){var l;i.forEach(o=>kx(o));const r=i.find(o=>o.origin==="library");this.traceUri=e,this.browserName=(r==null?void 0:r.browserName)||"",this.sdkLanguage=r==null?void 0:r.sdkLanguage,this.channel=r==null?void 0:r.channel,this.testIdAttributeName=r==null?void 0:r.testIdAttributeName,this.platform=(r==null?void 0:r.platform)||"",this.playwrightVersion=(l=i.find(o=>o.playwrightVersion))==null?void 0:l.playwrightVersion,this.title=(r==null?void 0:r.title)||"",this.options=(r==null?void 0:r.options)||{},this.actions=Mx(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,traceUri: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=Bx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const o of this.actions)o.group=o.group??Cx({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.traceUri),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(r=>!r.group||i.has(r.group))}renderActionTree(e){const i=this.filteredActions(e??[]),{rootItem:r}=sb(i),l=[],o=(u,f)=>{const h=Nx({...u.action,type:u.action.class});l.push(`${f}${h||u.id}`);for(const g of u.children)o(g,f+"  ")};return r.children.forEach(u=>o(u,"")),l}_errorDescriptorsFromActions(){var i;const e=[];for(const r of this.actions||[])(i=r.error)!=null&&i.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function kx(n){for(const i of n.pages)i[qa]=n;for(let i=0;i<n.actions.length;++i){const r=n.actions[i];r[qa]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const r=n.actions[i];r[tb]=e,r.class!=="Route"&&(e=r)}for(const i of n.events)i[qa]=n;for(const i of n.resources)i[qa]=n}function Mx(n){const e=[],i=Ox(n);e.push(...i),e.sort((r,l)=>l.parentId===r.callId?1:r.parentId===l.callId?-1:r.endTime-l.endTime);for(let r=1;r<e.length;++r)e[r][nb]=e[r-1];e.sort((r,l)=>l.parentId===r.callId?-1:r.parentId===l.callId?1:r.startTime-l.startTime);for(let r=0;r+1<e.length;++r)e[r][ib]=e[r+1];return e}let Zy=0;function Ox(n){const e=new Map,i=n.filter(u=>u.origin==="library"),r=n.filter(u=>u.origin==="testRunner");if(!r.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@${++Zy}`,{...f,context:u});const l=Lx(r,e);l&&jx(i,l);const o=new Map;for(const u of r)for(const f of u.actions){const h=f.stepId&&e.get(f.stepId);if(h){o.set(f.callId,h.callId),f.error&&(h.error=f.error),f.attachments&&(h.attachments=f.attachments),f.annotations&&(h.annotations=f.annotations),f.parentId&&(h.parentId=o.get(f.parentId)??f.parentId),f.group&&(h.group=f.group),h.startTime=f.startTime,h.endTime=f.endTime;continue}f.parentId&&(f.parentId=o.get(f.parentId)??f.parentId),e.set(f.stepId||`tmp-step@${++Zy}`,{...f,context:u})}return[...e.values()]}function jx(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const r of i.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of i.events)r.time+=e;for(const r of i.stdio)r.timestamp+=e;for(const r of i.pages)for(const l of r.screencastFrames)l.timestamp+=e;for(const r of i.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function Lx(n,e){for(const i of n)for(const r of i.actions){if(!r.startTime)continue;const l=r.stepId?e.get(r.stepId):void 0;if(l)return r.startTime-l.startTime}return 0}function sb(n){const e=new Map;for(const l of n)e.set(l.callId,{id:l.callId,parent:void 0,children:[],action:l});const i={action:{...Ux},id:"",parent:void 0,children:[]};for(const l of e.values()){i.action.startTime=Math.min(i.action.startTime,l.action.startTime),i.action.endTime=Math.max(i.action.endTime,l.action.endTime);const o=l.action.parentId&&e.get(l.action.parentId)||i;o.children.push(l),l.parent=o}const r=l=>{for(const o of l.children)o.action.stack=o.action.stack??l.action.stack,r(o)};return r(i),{rootItem:i,itemMap:e}}function rb(n){return n[qa]}function Rx(n){return n[tb]}function Wy(n){return n[nb]}function e0(n){return n[ib]}function Dx(n){let e=0,i=0;for(const r of zx(n)){if(r.type==="console"){const l=r.messageType;l==="warning"?++i:l==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:i}}function zx(n){let e=n[Py];if(e)return e;const i=Rx(n);return e=rb(n).events.filter(r=>r.time>=n.startTime&&(!i||r.time<i.startTime)),n[Py]=e,e}function Bx(n,e){var r;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||(r=i.get(u[0].file))==null||r.errors.push({line:u[0].line||0,message:f})}return i}const Ux={type:"action",callId:"",startTime:0,endTime:0,class:"",method:"",params:{},log:[],context:{origin:"library",startTime:0,endTime:0,browserName:"",wallTime:0,options:{},pages:[],resources:[],actions:[],events:[],stdio:[],errors:[],hasSource:!1,contextId:""}},Hx=50,nc=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:r="vertical",minSidebarSize:l=Hx,settingName:o,sidebar:u,main:f})=>{const h=Math.max(l,n)*window.devicePixelRatio,[g,y]=on(o?o+"."+r+":size":void 0,h),[m,w]=on(o?o+"."+r+":size":void 0,h),[v,E]=U.useState(null),[x,_]=gs();let N;r==="vertical"?(N=m/window.devicePixelRatio,x&&x.height<N&&(N=x.height-10)):(N=g/window.devicePixelRatio,x&&x.width<N&&(N=x.width-10)),document.body.style.userSelect=v?"none":"inherit";let C={};return r==="vertical"?i?C={top:v?0:N-4,bottom:v?0:void 0,height:v?"initial":8}:C={bottom:v?0:N-4,top:v?0:void 0,height:v?"initial":8}:i?C={left:v?0:N-4,right:v?0:void 0,width:v?"initial":8}:C={right:v?0:N-4,left:v?0:void 0,width:v?"initial":8},S.jsxs("div",{className:Fe("split-view",r,i&&"sidebar-first"),ref:_,children:[S.jsx("div",{className:"split-view-main",children:f}),!e&&S.jsx("div",{style:{flexBasis:N},className:"split-view-sidebar",children:u}),!e&&S.jsx("div",{style:C,className:"split-view-resizer",onMouseDown:$=>E({offset:r==="vertical"?$.clientY:$.clientX,size:N}),onMouseUp:()=>E(null),onMouseMove:$=>{if(!$.buttons)E(null);else if(v){const D=(r==="vertical"?$.clientY:$.clientX)-v.offset,K=i?v.size+D:v.size-D,q=$.target.parentElement.getBoundingClientRect(),j=Math.min(Math.max(l,K),(r==="vertical"?q.height:q.width)-l);r==="vertical"?w(j*window.devicePixelRatio):y(j*window.devicePixelRatio)}}})]})},et=function(n,e,i){return n>=e&&n<=i};function Rt(n){return et(n,48,57)}function t0(n){return Rt(n)||et(n,65,70)||et(n,97,102)}function qx(n){return et(n,65,90)}function $x(n){return et(n,97,122)}function Ix(n){return qx(n)||$x(n)}function Vx(n){return n>=128}function $o(n){return Ix(n)||Vx(n)||n===95}function n0(n){return $o(n)||Rt(n)||n===45}function Gx(n){return et(n,0,8)||n===11||et(n,14,31)||n===127}function Io(n){return n===10}function Qn(n){return Io(n)||n===9||n===32}const Kx=1114111;class Jh extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function Yx(n){const e=[];for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);if(r===13&&n.charCodeAt(i+1)===10&&(r=10,i++),(r===13||r===12)&&(r=10),r===0&&(r=65533),et(r,55296,56319)&&et(n.charCodeAt(i+1),56320,57343)){const l=r-55296,o=n.charCodeAt(i+1)-56320;r=Math.pow(2,16)+l*Math.pow(2,10)+o,i++}e.push(r)}return e}function st(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 ab(n){const e=Yx(n);let i=-1;const r=[];let l;const o=function(V){return V>=e.length?-1:e[V]},u=function(V){if(V===void 0&&(V=1),V>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+V)},f=function(V){return V===void 0&&(V=1),i+=V,l=o(i),!0},h=function(){return i-=1,!0},g=function(V){return V===void 0&&(V=l),V===-1},y=function(){if(m(),f(),Qn(l)){for(;Qn(u());)f();return new ic}else{if(l===34)return E();if(l===35)if(n0(u())||N(u(1),u(2))){const V=new vb("");return $(u(1),u(2),u(3))&&(V.type="id"),V.value=Q(),V}else return new dt(l);else return l===36?u()===61?(f(),new Jx):new dt(l):l===39?E():l===40?new mb:l===41?new Ph:l===42?u()===61?(f(),new Px):new dt(l):l===43?K()?(h(),w()):new dt(l):l===44?new hb:l===45?K()?(h(),w()):u(1)===45&&u(2)===62?(f(2),new cb):I()?(h(),v()):new dt(l):l===46?K()?(h(),w()):new dt(l):l===58?new ub:l===59?new fb:l===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new ob):new dt(l):l===64?$(u(1),u(2),u(3))?new bb(Q()):new dt(l):l===91?new gb:l===92?C()?(h(),v()):new dt(l):l===93?new kh:l===94?u()===61?(f(),new Qx):new dt(l):l===123?new db:l===124?u()===61?(f(),new Fx):u()===124?(f(),new yb):new dt(l):l===125?new pb:l===126?u()===61?(f(),new Xx):new dt(l):Rt(l)?(h(),w()):$o(l)?(h(),v()):g()?new Go:new dt(l)}},m=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),l===42&&u()===47){f();break}else if(g())return},w=function(){const V=q();if($(u(1),u(2),u(3))){const J=new Zx;return J.value=V.value,J.repr=V.repr,J.type=V.type,J.unit=Q(),J}else if(u()===37){f();const J=new xb;return J.value=V.value,J.repr=V.repr,J}else{const J=new wb;return J.value=V.value,J.repr=V.repr,J.type=V.type,J}},v=function(){const V=Q();if(V.toLowerCase()==="url"&&u()===40){for(f();Qn(u(1))&&Qn(u(2));)f();return u()===34||u()===39?new Ya(V):Qn(u())&&(u(2)===34||u(2)===39)?new Ya(V):x()}else return u()===40?(f(),new Ya(V)):new Zh(V)},E=function(V){V===void 0&&(V=l);let J="";for(;f();){if(l===V||g())return new Wh(J);if(Io(l))return h(),new lb;l===92?g(u())||(Io(u())?f():J+=st(_())):J+=st(l)}throw new Error("Internal error")},x=function(){const V=new Sb("");for(;Qn(u());)f();if(g(u()))return V;for(;f();){if(l===41||g())return V;if(Qn(l)){for(;Qn(u());)f();return u()===41||g(u())?(f(),V):(ne(),new Vo)}else{if(l===34||l===39||l===40||Gx(l))return ne(),new Vo;if(l===92)if(C())V.value+=st(_());else return ne(),new Vo;else V.value+=st(l)}}throw new Error("Internal error")},_=function(){if(f(),t0(l)){const V=[l];for(let W=0;W<5&&t0(u());W++)f(),V.push(l);Qn(u())&&f();let J=parseInt(V.map(function(W){return String.fromCharCode(W)}).join(""),16);return J>Kx&&(J=65533),J}else return g()?65533:l},N=function(V,J){return!(V!==92||Io(J))},C=function(){return N(l,u())},$=function(V,J,W){return V===45?$o(J)||J===45||N(J,W):$o(V)?!0:V===92?N(V,J):!1},I=function(){return $(l,u(1),u(2))},D=function(V,J,W){return V===43||V===45?!!(Rt(J)||J===46&&Rt(W)):V===46?!!Rt(J):!!Rt(V)},K=function(){return D(l,u(1),u(2))},Q=function(){let V="";for(;f();)if(n0(l))V+=st(l);else if(C())V+=st(_());else return h(),V;throw new Error("Internal parse error")},q=function(){let V="",J="integer";for((u()===43||u()===45)&&(f(),V+=st(l));Rt(u());)f(),V+=st(l);if(u(1)===46&&Rt(u(2)))for(f(),V+=st(l),f(),V+=st(l),J="number";Rt(u());)f(),V+=st(l);const W=u(1),Ae=u(2),B=u(3);if((W===69||W===101)&&Rt(Ae))for(f(),V+=st(l),f(),V+=st(l),J="number";Rt(u());)f(),V+=st(l);else if((W===69||W===101)&&(Ae===43||Ae===45)&&Rt(B))for(f(),V+=st(l),f(),V+=st(l),f(),V+=st(l),J="number";Rt(u());)f(),V+=st(l);const P=j(V);return{type:J,value:P,repr:V}},j=function(V){return+V},ne=function(){for(;f();){if(l===41||g())return;C()&&_()}};let le=0;for(;!g(u());)if(r.push(y()),le++,le>e.length*2)throw new Error("I'm infinite-looping!");return r}class Qe{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class lb extends Qe{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Vo extends Qe{constructor(){super(...arguments),this.tokenType="BADURL"}}class ic extends Qe{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class ob extends Qe{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class cb extends Qe{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class ub extends Qe{constructor(){super(...arguments),this.tokenType=":"}}class fb extends Qe{constructor(){super(...arguments),this.tokenType=";"}}class hb extends Qe{constructor(){super(...arguments),this.tokenType=","}}class Er extends Qe{constructor(){super(...arguments),this.value="",this.mirror=""}}class db extends Er{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class pb extends Er{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class gb extends Er{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class kh extends Er{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class mb extends Er{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Ph extends Er{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Xx extends Qe{constructor(){super(...arguments),this.tokenType="~="}}class Fx extends Qe{constructor(){super(...arguments),this.tokenType="|="}}class Qx extends Qe{constructor(){super(...arguments),this.tokenType="^="}}class Jx extends Qe{constructor(){super(...arguments),this.tokenType="$="}}class Px extends Qe{constructor(){super(...arguments),this.tokenType="*="}}class yb extends Qe{constructor(){super(...arguments),this.tokenType="||"}}class Go extends Qe{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class dt extends Qe{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=st(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 Ar extends Qe{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 Zh extends Ar{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return ol(this.value)}}class Ya extends Ar{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ol(this.value)+"("}}class bb extends Ar{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+ol(this.value)}}class vb extends Ar{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"?"#"+ol(this.value):"#"+Wx(this.value)}}class Wh extends Ar{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+_b(this.value)+'"'}}class Sb extends Ar{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+_b(this.value)+'")'}}class wb extends Qe{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 xb extends Qe{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 Zx extends Qe{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=ol(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||et(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function ol(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let r=0;r<n.length;r++){const l=n.charCodeAt(r);if(l===0)throw new Jh("Invalid character: the input contains U+0000.");et(l,1,31)||l===127||r===0&&et(l,48,57)||r===1&&et(l,48,57)&&i===45?e+="\\"+l.toString(16)+" ":l>=128||l===45||l===95||et(l,48,57)||et(l,65,90)||et(l,97,122)?e+=n[r]:e+="\\"+n[r]}return e}function Wx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new Jh("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||et(r,48,57)||et(r,65,90)||et(r,97,122)?e+=n[i]:e+="\\"+r.toString(16)+" "}return e}function _b(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new Jh("Invalid character: the input contains U+0000.");et(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+n[i]:e+=n[i]}return e}class Dt extends Error{}function e_(n,e){let i;try{i=ab(n),i[i.length-1]instanceof Go||i.push(new Go)}catch(j){const ne=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)+ne+j.stack.substring(le+j.message.length)),j.message=ne,j}const r=i.find(j=>j instanceof bb||j instanceof lb||j instanceof Vo||j instanceof yb||j instanceof ob||j instanceof cb||j instanceof fb||j instanceof db||j instanceof pb||j instanceof Sb||j instanceof xb);if(r)throw new Dt(`Unsupported token "${r.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let l=0;const o=new Set;function u(){return new Dt(`Unexpected token "${i[l].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[l]instanceof ic;)l++}function h(j=l){return i[j]instanceof Zh}function g(j=l){return i[j]instanceof Wh}function y(j=l){return i[j]instanceof wb}function m(j=l){return i[j]instanceof hb}function w(j=l){return i[j]instanceof mb}function v(j=l){return i[j]instanceof Ph}function E(j=l){return i[j]instanceof Ya}function x(j=l){return i[j]instanceof dt&&i[j].value==="*"}function _(j=l){return i[j]instanceof Go}function N(j=l){return i[j]instanceof dt&&[">","+","~"].includes(i[j].value)}function C(j=l){return m(j)||v(j)||_(j)||N(j)||i[j]instanceof ic}function $(){const j=[I()];for(;f(),!!m();)l++,j.push(I());return j}function I(){return f(),y()||g()?i[l++].value:D()}function D(){const j={simples:[]};for(f(),N()?j.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):j.simples.push({selector:K(),combinator:""});;){if(f(),N())j.simples[j.simples.length-1].combinator=i[l++].value,f();else if(C())break;j.simples.push({combinator:"",selector:K()})}return j}function K(){let j="";const ne=[];for(;!C();)if(h()||x())j+=i[l++].toSource();else if(i[l]instanceof vb)j+=i[l++].toSource();else if(i[l]instanceof dt&&i[l].value===".")if(l++,h())j+="."+i[l++].toSource();else throw u();else if(i[l]instanceof ub)if(l++,h())if(!e.has(i[l].value.toLowerCase()))j+=":"+i[l++].toSource();else{const le=i[l++].value.toLowerCase();ne.push({name:le,args:[]}),o.add(le)}else if(E()){const le=i[l++].value.toLowerCase();if(e.has(le)?(ne.push({name:le,args:$()}),o.add(le)):j+=`:${le}(${Q()})`,f(),!v())throw u();l++}else throw u();else if(i[l]instanceof gb){for(j+="[",l++;!(i[l]instanceof kh)&&!_();)j+=i[l++].toSource();if(!(i[l]instanceof kh))throw u();j+="]",l++}else throw u();if(!j&&!ne.length)throw u();return{css:j||void 0,functions:ne}}function Q(){let j="",ne=1;for(;!_()&&((w()||E())&&ne++,v()&&ne--,!!ne);)j+=i[l++].toSource();return j}const q=$();if(!_())throw u();if(q.some(j=>typeof j!="object"||!("simples"in j)))throw new Dt(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:q,names:Array.from(o)}}const Mh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),t_=new Set(["left-of","right-of","above","below","near"]),Tb=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 cl(n){const e=s_(n),i=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const l=e_(r.body,Tb);i.push({name:"css",body:l.selector,source:r.body});continue}if(Mh.has(r.name)){let l,o;try{const g=JSON.parse("["+r.body+"]");if(!Array.isArray(g)||g.length<1||g.length>2||typeof g[0]!="string")throw new Dt(`Malformed selector: ${r.name}=`+r.body);if(l=g[0],g.length===2){if(typeof g[1]!="number"||!t_.has(r.name))throw new Dt(`Malformed selector: ${r.name}=`+r.body);o=g[1]}}catch{throw new Dt(`Malformed selector: ${r.name}=`+r.body)}const u={name:r.name,source:r.body,body:{parsed:cl(l),distance:o}},f=[...u.body.parsed.parts].reverse().find(g=>g.name==="internal:control"&&g.body==="enter-frame"),h=f?u.body.parsed.parts.indexOf(f):-1;h!==-1&&n_(u.body.parsed.parts.slice(0,h+1),i.slice(0,h+1))&&u.body.parsed.parts.splice(0,h+1),i.push(u);continue}i.push({...r,source:r.body})}if(Mh.has(i[0].name))throw new Dt(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function n_(n,e){return An({parts:n})===An({parts:e})}function An(n,e){return typeof n=="string"?n:n.parts.map((i,r)=>{let l=!0;!e&&r!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(l=!1);const o=l?i.name+"=":"";return`${r===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function i_(n,e){const i=(r,l)=>{for(const o of r.parts)e(o,l),Mh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function s_(n){let e=0,i,r=0;const l={parts:[]},o=()=>{const f=n.substring(r,e).trim(),h=f.indexOf("=");let g,y;h!==-1&&f.substring(0,h).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(g=f.substring(0,h).trim(),y=f.substring(h+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(g="text",y=f):/^\(*\/\//.test(f)||f.startsWith("..")?(g="xpath",y=f):(g="css",y=f);let m=!1;if(g[0]==="*"&&(m=!0,g=g.substring(1)),l.parts.push({name:g,body:y}),m){if(l.capture!==void 0)throw new Dt("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 h=n.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!h&&!!h[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,r=e):e++}return o(),l}function ds(n,e){let i=0,r=n.length===0;const l=()=>n[i]||"",o=()=>{const _=l();return++i,r=i>=n.length,_},u=_=>{throw r?new Dt(`Unexpected end of selector while parsing selector \`${n}\``):new Dt(`Error while parsing selector \`${n}\` - unexpected symbol "${l()}" at position ${i}`+(_?" during "+_:""))};function f(){for(;!r&&/\s/.test(l());)o()}function h(_){return _>=""||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function g(){let _="";for(f();!r&&h(l());)_+=o();return _}function y(_){let N=o();for(N!==_&&u("parsing quoted string");!r&&l()!==_;)l()==="\\"&&o(),N+=o();return l()!==_&&u("parsing quoted string"),N+=o(),N}function m(){o()!=="/"&&u("parsing regular expression");let _="",N=!1;for(;!r;){if(l()==="\\")_+=o(),r&&u("parsing regular expression");else if(N&&l()==="]")N=!1;else if(!N&&l()==="[")N=!0;else if(!N&&l()==="/")break;_+=o()}o()!=="/"&&u("parsing regular expression");let C="";for(;!r&&l().match(/[dgimsuy]/);)C+=o();try{return new RegExp(_,C)}catch($){throw new Dt(`Error while parsing selector \`${n}\`: ${$.message}`)}}function w(){let _="";return f(),l()==="'"||l()==='"'?_=y(l()).slice(1,-1):_=g(),_||u("parsing property path"),_}function v(){f();let _="";return r||(_+=o()),!r&&_!=="="&&(_+=o()),["=","*=","^=","$=","|=","~="].includes(_)||u("parsing operator"),_}function E(){o();const _=[];for(_.push(w()),f();l()===".";)o(),_.push(w()),f();if(l()==="]")return o(),{name:_.join("."),jsonPath:_,op:"<truthy>",value:null,caseSensitive:!1};const N=v();let C,$=!0;if(f(),l()==="/"){if(N!=="=")throw new Dt(`Error while parsing selector \`${n}\` - cannot use ${N} in attribute with regular expression`);C=m()}else if(l()==="'"||l()==='"')C=y(l()).slice(1,-1),f(),l()==="i"||l()==="I"?($=!1,o()):(l()==="s"||l()==="S")&&($=!0,o());else{for(C="";!r&&(h(l())||l()==="+"||l()===".");)C+=o();C==="true"?C=!0:C==="false"?C=!1:e||(C=+C,Number.isNaN(C)&&u("parsing attribute value"))}if(f(),l()!=="]"&&u("parsing attribute value"),o(),N!=="="&&typeof C!="string")throw new Dt(`Error while parsing selector \`${n}\` - cannot use ${N} in attribute with non-string matching value - ${C}`);return{name:_.join("."),jsonPath:_,op:N,value:C,caseSensitive:$}}const x={name:"",attributes:[]};for(x.name=g(),f();l()==="[";)x.attributes.push(E()),f();if(r||u(void 0),!x.name&&!x.attributes.length)throw new Dt(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function gc(n,e="'"){const i=JSON.stringify(n),r=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function sc(n){return n.charAt(0).toUpperCase()+n.substring(1)}function Eb(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function fr(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let ss;function r_(){ss=new Map}function At(n){let e=ss==null?void 0:ss.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),ss==null||ss.set(n,e)),e}function mc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function Ab(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function zt(n,e){return typeof n!="string"?Ab(n):`${JSON.stringify(n)}${e?"s":"i"}`}function Tt(n,e){return typeof n!="string"?Ab(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function a_(n,e,i=""){if(n.length<=e)return n;const r=[...n];return r.length>e?r.slice(0,e-i.length).join("")+i:r.join("")}function i0(n,e){return a_(n,e,"…")}function rc(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l_(n,e){const i=n.length,r=e.length;let l=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(r+1).fill(0));for(let f=1;f<=i;f++)for(let h=1;h<=r;h++)n[f-1]===e[h-1]&&(u[f][h]=u[f-1][h-1]+1,u[f][h]>l&&(l=u[f][h],o=f));return n.slice(o-l,o)}function o_(n,e){try{const i=cl(e),r=c_(i);return r||os(new Cb[n],i,!1,1)[0]}catch{return e}}function c_(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 Oi(n,e,i=!1){return Nb(n,e,i,1)[0]}function Nb(n,e,i=!1,r=20,l){try{return os(new Cb[n](l),cl(e),i,r)}catch{return[e]}}function os(n,e,i=!1,r=20){const l=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<l.length;f++){const h=l[f],g=u;if(u="locator",h.name==="internal:describe")continue;if(h.name==="nth"){h.body==="0"?o.push([n.generateLocator(g,"first",""),n.generateLocator(g,"nth","0")]):h.body==="-1"?o.push([n.generateLocator(g,"last",""),n.generateLocator(g,"nth","-1")]):o.push([n.generateLocator(g,"nth",h.body)]);continue}if(h.name==="visible"){o.push([n.generateLocator(g,"visible",h.body),n.generateLocator(g,"default",`visible=${h.body}`)]);continue}if(h.name==="internal:text"){const{exact:E,text:x}=La(h.body);o.push([n.generateLocator(g,"text",x,{exact:E})]);continue}if(h.name==="internal:has-text"){const{exact:E,text:x}=La(h.body);if(!E){o.push([n.generateLocator(g,"has-text",x,{exact:E})]);continue}}if(h.name==="internal:has-not-text"){const{exact:E,text:x}=La(h.body);if(!E){o.push([n.generateLocator(g,"has-not-text",x,{exact:E})]);continue}}if(h.name==="internal:has"){const E=os(n,h.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"has",x)));continue}if(h.name==="internal:has-not"){const E=os(n,h.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"hasNot",x)));continue}if(h.name==="internal:and"){const E=os(n,h.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"and",x)));continue}if(h.name==="internal:or"){const E=os(n,h.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"or",x)));continue}if(h.name==="internal:chain"){const E=os(n,h.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"chain",x)));continue}if(h.name==="internal:label"){const{exact:E,text:x}=La(h.body);o.push([n.generateLocator(g,"label",x,{exact:E})]);continue}if(h.name==="internal:role"){const E=ds(h.body,!0),x={attrs:[]};for(const _ of E.attributes)_.name==="name"?(x.exact=_.caseSensitive,x.name=_.value):(_.name==="level"&&typeof _.value=="string"&&(_.value=+_.value),x.attrs.push({name:_.name==="include-hidden"?"includeHidden":_.name,value:_.value}));o.push([n.generateLocator(g,"role",E.name,x)]);continue}if(h.name==="internal:testid"){const E=ds(h.body,!0),{value:x}=E.attributes[0];o.push([n.generateLocator(g,"test-id",x)]);continue}if(h.name==="internal:attr"){const E=ds(h.body,!0),{name:x,value:_,caseSensitive:N}=E.attributes[0],C=_,$=!!N;if(x==="placeholder"){o.push([n.generateLocator(g,"placeholder",C,{exact:$})]);continue}if(x==="alt"){o.push([n.generateLocator(g,"alt",C,{exact:$})]);continue}if(x==="title"){o.push([n.generateLocator(g,"title",C,{exact:$})]);continue}}if(h.name==="internal:control"&&h.body==="enter-frame"){const E=o[o.length-1],x=l[f-1],_=E.map(N=>n.chainLocators([N,n.generateLocator(g,"frame","")]));["xpath","css"].includes(x.name)&&_.push(n.generateLocator(g,"frame-locator",An({parts:[x]})),n.generateLocator(g,"frame-locator",An({parts:[x]},!0))),E.splice(0,E.length,..._),u="frame-locator";continue}const y=l[f+1],m=An({parts:[h]}),w=n.generateLocator(g,"default",m);if(y&&["internal:has-text","internal:has-not-text"].includes(y.name)){const{exact:E,text:x}=La(y.body);if(!E){const _=n.generateLocator("locator",y.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),N={};y.name==="internal:has-text"?N.hasText=x:N.hasNotText=x;const C=n.generateLocator(g,"default",m,N);o.push([n.chainLocators([w,_]),C]),f++;continue}}let v;if(["xpath","css"].includes(h.name)){const E=An({parts:[h]},!0);v=n.generateLocator(g,"default",E)}o.push([w,v].filter(Boolean))}return u_(n,o,r)}function u_(n,e,i){const r=e.map(()=>""),l=[],o=u=>{if(u===e.length)return l.push(n.chainLocators(r)),l.length<i;for(const f of e[u])if(r[u]=f,!o(u+1))return!1;return!0};return o(0),l}function La(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 f_{constructor(e){this.preferredQuote=e}generateLocator(e,i,r,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(l.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${r==="true"?"true":"false"} })`;case"role":const o=[];pt(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:h}of l.attrs)o.push(`${f}: ${typeof h=="string"?this.quote(h):h}`);const u=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(r)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!l.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!l.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!l.exact);case"label":return this.toCallWithExact("getByLabel",r,!!l.exact);case"title":return this.toCallWithExact("getByTitle",r,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return mc(String(e))}toCallWithExact(e,i,r){return pt(i)?`${e}(${this.regexToSourceString(i)})`:r?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return pt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return pt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return gc(e,this.preferredQuote??"'")}}class h_{generateLocator(e,i,r,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(l.hasText)})`:l.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(l.hasNotText)})`:`locator(${this.quote(r)})`;case"frame-locator":return`frame_locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${r==="true"?"True":"False"})`;case"role":const o=[];pt(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:h}of l.attrs){let g=typeof h=="string"?this.quote(h):h;typeof h=="boolean"&&(g=h?"True":"False"),o.push(`${Eb(f)}=${g}`)}const u=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(r)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!l.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!l.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!l.exact);case"label":return this.toCallWithExact("get_by_label",r,!!l.exact);case"title":return this.toCallWithExact("get_by_title",r,!!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"${mc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,r){return pt(i)?`${e}(${this.regexToString(i)})`:r?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return pt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return pt(e)?this.regexToString(e):this.quote(e)}quote(e){return gc(e,'"')}}class d_{generateLocator(e,i,r,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(r)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(l.hasText)}))`:l.hasNotText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(l.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const u=[];pt(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:h,value:g}of l.attrs)u.push(`.set${sc(h)}(${typeof g=="string"?this.quote(g):g})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${Eb(r).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(o,"getByText",r,!!l.exact);case"alt":return this.toCallWithExact(o,"getByAltText",r,!!l.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",r,!!l.exact);case"label":return this.toCallWithExact(o,"getByLabel",r,!!l.exact);case"title":return this.toCallWithExact(o,"getByTitle",r,!!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(mc(e.source))}${i})`}toCallWithExact(e,i,r,l){return pt(r)?`${i}(${this.regexToString(r)})`:l?`${i}(${this.quote(r)}, new ${e}.${sc(i)}Options().setExact(true))`:`${i}(${this.quote(r)})`}toHasText(e){return pt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return pt(e)?this.regexToString(e):this.quote(e)}quote(e){return gc(e,'"')}}class p_{generateLocator(e,i,r,l={}){switch(i){case"default":return l.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(l.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame-locator":return`FrameLocator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${r==="true"?"true":"false"} })`;case"role":const o=[];pt(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:h}of l.attrs)o.push(`${sc(f)} = ${typeof h=="string"?this.quote(h):h}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${sc(r)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!l.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!l.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!l.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!l.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!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(mc(e.source))}${i})`}toCallWithExact(e,i,r){return pt(i)?`${e}(${this.regexToString(i)})`:r?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return pt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return pt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return pt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return gc(e,'"')}}class g_{generateLocator(e,i,r,l={}){return JSON.stringify({kind:i,body:r,options:l})}chainLocators(e){const i=e.map(r=>JSON.parse(r));for(let r=0;r<i.length-1;++r)i[r].next=i[r+1];return JSON.stringify(i[0])}}const Cb={javascript:f_,python:h_,java:d_,csharp:p_,jsonl:g_};function pt(n){return n instanceof RegExp}const s0=new Map;function m_({name:n,rootItem:e,render:i,title:r,icon:l,isError:o,isVisible:u,selectedItem:f,onAccepted:h,onSelected:g,onHighlighted:y,treeState:m,setTreeState:w,noItemsMessage:v,dataTestId:E,autoExpandDepth:x}){const _=U.useMemo(()=>y_(e,f,m.expandedItems,x||0,u),[e,f,m,x,u]),N=U.useRef(null),[C,$]=U.useState(),[I,D]=U.useState(!1);U.useEffect(()=>{y==null||y(C)},[y,C]),U.useEffect(()=>{const q=N.current;if(!q)return;const j=()=>{s0.set(n,q.scrollTop)};return q.addEventListener("scroll",j,{passive:!0}),()=>q.removeEventListener("scroll",j)},[n]),U.useEffect(()=>{N.current&&(N.current.scrollTop=s0.get(n)||0)},[n]);const K=U.useCallback(q=>{const{expanded:j}=_.get(q);if(j){for(let ne=f;ne;ne=ne.parent)if(ne===q){g==null||g(q);break}m.expandedItems.set(q.id,!1)}else m.expandedItems.set(q.id,!0);w({...m})},[_,f,g,m,w]),Q=U.useCallback(q=>{const{expanded:j}=_.get(q),ne=[q];for(;ne.length;){const le=ne.pop();ne.push(...le.children),m.expandedItems.set(le.id,!j)}w({...m})},[_,m,w]);return S.jsx("div",{className:Fe("tree-view vbox",n+"-tree-view"),"data-testid":E||n+"-tree",children:S.jsxs("div",{className:Fe("tree-view-content"),role:_.size>0?"tree":void 0,tabIndex:0,onKeyDown:q=>{if(f&&q.key==="Enter"){h==null||h(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:ne,parent:le}=_.get(f);ne?(m.expandedItems.set(f.id,!1),w({...m})):le&&(g==null||g(le));return}if(f&&q.key==="ArrowRight"){f.children.length&&(m.expandedItems.set(f.id,!0),w({...m}));return}let j=f;if(q.key==="ArrowDown"&&(f?j=_.get(f).next:_.size&&(j=[..._.keys()][0])),q.key==="ArrowUp"){if(f)j=_.get(f).prev;else if(_.size){const ne=[..._.keys()];j=ne[ne.length-1]}}y==null||y(void 0),j&&(D(!0),g==null||g(j)),$(void 0)},ref:N,children:[v&&_.size===0&&S.jsx("div",{className:"tree-view-empty",children:v}),e.children.map(q=>_.get(q)&&S.jsx(kb,{item:q,treeItems:_,selectedItem:f,onSelected:g,onAccepted:h,isError:o,toggleExpanded:K,toggleSubtree:Q,highlightedItem:C,setHighlightedItem:$,render:i,icon:l,title:r,isKeyboardNavigation:I,setIsKeyboardNavigation:D},q.id))]})})}function kb({item:n,treeItems:e,selectedItem:i,onSelected:r,highlightedItem:l,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:h,toggleSubtree:g,render:y,title:m,icon:w,isKeyboardNavigation:v,setIsKeyboardNavigation:E}){const x=U.useId(),_=U.useRef(null);U.useEffect(()=>{i===n&&v&&_.current&&(J0(_.current),E(!1))},[n,i,v,E]);const N=e.get(n),C=N.depth,$=N.expanded;let I="codicon-blank";typeof $=="boolean"&&(I=$?"codicon-chevron-down":"codicon-chevron-right");const D=y(n),K=$&&n.children.length?n.children:[],Q=m==null?void 0:m(n),q=(w==null?void 0:w(n))||"codicon-blank";return S.jsxs("div",{ref:_,role:"treeitem","aria-selected":n===i,"aria-expanded":$,"aria-controls":x,title:Q,className:"vbox",style:{flex:"none"},children:[S.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:Fe("tree-view-entry",i===n&&"selected",l===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>r==null?void 0:r(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[C?new Array(C).fill(0).map((j,ne)=>S.jsx("div",{className:"tree-view-indent"},"indent-"+ne)):void 0,S.jsx("div",{"aria-hidden":"true",className:"codicon "+I,style:{minWidth:16,marginRight:4},onDoubleClick:j=>{j.preventDefault(),j.stopPropagation()},onClick:j=>{j.stopPropagation(),j.preventDefault(),j.altKey?g(n):h(n)}}),w&&S.jsx("div",{className:"codicon "+q,style:{minWidth:16,marginRight:4},"aria-label":"["+q.replace("codicon","icon")+"]"}),typeof D=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:D}):D]}),!!K.length&&S.jsx("div",{id:x,role:"group",children:K.map(j=>e.get(j)&&S.jsx(kb,{item:j,treeItems:e,selectedItem:i,onSelected:r,onAccepted:f,isError:u,toggleExpanded:h,toggleSubtree:g,highlightedItem:l,setHighlightedItem:o,render:y,title:m,icon:w,isKeyboardNavigation:v,setIsKeyboardNavigation:E},j.id))})]})}function y_(n,e,i,r,l=()=>!0){if(!l(n))return new Map;const o=new Map,u=new Set;for(let g=e==null?void 0:e.parent;g;g=g.parent)u.add(g.id);let f=null;const h=(g,y)=>{for(const m of g.children){if(!l(m))continue;const w=u.has(m.id)||i.get(m.id),v=r>y&&o.size<25&&w!==!1,E=m.children.length?w??v:void 0,x={depth:y,expanded:E,parent:n===g?null:g,next:null,prev:f};f&&(o.get(f).next=m),f=m,o.set(m,x),E&&h(m,y+1)}};return h(n,0),o}const Ht=U.forwardRef(function({children:e,title:i="",icon:r,disabled:l=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:h,className:g,ariaLabel:y},m){return S.jsxs("button",{ref:m,className:Fe(g,"toolbar-button",r,o&&"toggled"),onMouseDown:r0,onClick:u,onDoubleClick:r0,title:i,disabled:!!l,style:f,"data-testid":h,"aria-label":y||i,children:[r&&S.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),r0=n=>{n.stopPropagation(),n.preventDefault()};function Mb(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 b_(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const v_=m_,S_=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:r,treeState:l,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:h,revealConsole:g,revealActionAttachment:y,isLive:m})=>{const{rootItem:w,itemMap:v}=U.useMemo(()=>sb(n),[n]),{selectedItem:E}=U.useMemo(()=>({selectedItem:e?v.get(e.callId):void 0}),[v,e]),x=U.useCallback(D=>{var K;return!!((K=D.action.error)!=null&&K.message)},[]),_=U.useCallback(D=>r({minimum:D.action.startTime,maximum:D.action.endTime}),[r]),N=U.useCallback(D=>{var Q;const K=!!y&&!!((Q=D.action.attachments)!=null&&Q.length);return ed(D.action,{sdkLanguage:u,revealConsole:g,revealActionAttachment:()=>y==null?void 0:y(D.action.callId),isLive:m,showDuration:!0,showBadges:!0,showAttachments:K})},[m,g,y,u]),C=U.useCallback(D=>!i||!D.action||D.action.startTime<=i.maximum&&D.action.endTime>=i.minimum,[i]),$=U.useCallback(D=>{f==null||f(D.action)},[f]),I=U.useCallback(D=>{h==null||h(D==null?void 0:D.action)},[h]);return S.jsxs("div",{className:"vbox",children:[i&&S.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[S.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),S.jsx(v_,{name:"actions",rootItem:w,treeState:l,setTreeState:o,selectedItem:E,onSelected:$,onHighlighted:I,onAccepted:_,isError:x,isVisible:C,render:N})]})},ed=(n,e)=>{var _;const{sdkLanguage:i,revealConsole:r,revealActionAttachment:l,isLive:o,showDuration:u,showBadges:f,showAttachments:h}=e,{errors:g,warnings:y}=Dx(n),m=n.params.selector?o_(i||"javascript",n.params.selector):void 0,w=n.class==="Test"&&n.method==="test.step"&&((_=n.annotations)==null?void 0:_.some(N=>N.type==="skip"));let v="";n.endTime?v=Et(n.endTime-n.startTime):n.error?v="Timed out":o||(v="-");const{elements:E,title:x}=Ob(n);return S.jsxs("div",{className:"action-title vbox",children:[S.jsxs("div",{className:"hbox",children:[S.jsx("span",{className:"action-title-method",title:x,children:E}),(u||f||h||w)&&S.jsx("div",{className:"spacer"}),h&&S.jsx(Ht,{icon:"attach",title:"Open Attachment",onClick:()=>l==null?void 0:l()}),u&&!w&&S.jsx("div",{className:"action-duration",children:v||S.jsx("span",{className:"codicon codicon-loading"})}),w&&S.jsx("span",{className:Fe("action-skipped","codicon",Mb("skipped")),title:"skipped"}),f&&S.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!g&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-error"}),S.jsx("span",{className:"action-icon-value",children:g})]}),!!y&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-warning"}),S.jsx("span",{className:"action-icon-value",children:y})]})]})]}),m&&S.jsx("div",{className:"action-title-selector",title:m,children:m})]})};function Ob(n){var f;let e=n.title??((f=Qh.get(n.class+"."+n.method))==null?void 0:f.title)??n.method;e=e.replace(/\n/g," ");const i=[],r=[];let l=0;const o=/\{([^}]+)\}/g;let u;for(;(u=o.exec(e))!==null;){const[h,g]=u,y=e.slice(l,u.index);i.push(y),r.push(y);const m=eb(n.params,g);m===void 0?(i.push(h),r.push(h)):u.index===0?(i.push(m),r.push(m)):(i.push(S.jsx("span",{className:"action-title-param",children:m},i.length)),r.push(m)),l=u.index+h.length}if(l<e.length){const h=e.slice(l);i.push(h),r.push(h)}return{elements:i,title:r.join("")}}const td=({value:n,description:e})=>{const[i,r]=U.useState("copy"),l=U.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[n]);return S.jsx(Ht,{title:e||"Copy",icon:i,onClick:l})},Ko=({value:n,description:e,copiedDescription:i=e,style:r})=>{const[l,o]=U.useState(!1),u=U.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return S.jsx(Ht,{style:r,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:l?i:e})},ms=({text:n})=>S.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),w_=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const r=U.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return S.jsx(ms,{text:"No action selected"});const l=n.startTime-e,o=Et(l),{title:u}=Ob(n);return S.jsxs("div",{className:"call-tab",children:[S.jsx("div",{className:"call-line",children:u}),S.jsx("div",{className:"call-section",children:"Time"}),Oo({name:"start",type:"literal",text:o}),Oo({name:"duration",type:"literal",text:x_(n)}),!!r.length&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Parameters"}),r.map(f=>Oo(a0(n,f,n.params[f],i)))]}),!!n.result&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>Oo(a0(n,f,n.result[f],i)))]})]})};function x_(n){return n.endTime?Et(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Oo(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),S.jsxs("div",{className:"call-line",children:[n.name,":",S.jsx("span",{className:Fe("call-value",n.type),title:n.text,children:e}),["literal","string","number","object","locator"].includes(n.type)&&S.jsx(td,{value:n.text})]},n.name)}function a0(n,e,i,r){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=ac(i.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&l||e==="received"&&n.method==="expect")&&(i=ac(i,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Oi(r||"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 ac(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=>ac(i,e));if(n.o!==void 0){const i={};for(const{k:r,v:l}of n.o)i[r]=ac(l,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const l0=new Map;function yc({name:n,items:e=[],id:i,render:r,icon:l,isError:o,isWarning:u,isInfo:f,selectedItem:h,onAccepted:g,onSelected:y,onHighlighted:m,onIconClicked:w,noItemsMessage:v,dataTestId:E,notSelectable:x,ariaLabel:_}){const N=U.useRef(null),[C,$]=U.useState();return U.useEffect(()=>{m==null||m(C)},[m,C]),U.useEffect(()=>{const I=N.current;if(!I)return;const D=()=>{l0.set(n,I.scrollTop)};return I.addEventListener("scroll",D,{passive:!0}),()=>I.removeEventListener("scroll",D)},[n]),U.useEffect(()=>{N.current&&(N.current.scrollTop=l0.get(n)||0)},[n]),S.jsx("div",{className:Fe("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":_,children:S.jsxs("div",{className:Fe("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:I=>{var q;if(h&&I.key==="Enter"){g==null||g(h,e.indexOf(h));return}if(I.key!=="ArrowDown"&&I.key!=="ArrowUp")return;I.stopPropagation(),I.preventDefault();const D=h?e.indexOf(h):-1;let K=D;I.key==="ArrowDown"&&(D===-1?K=0:K=Math.min(D+1,e.length-1)),I.key==="ArrowUp"&&(D===-1?K=e.length-1:K=Math.max(D-1,0));const Q=(q=N.current)==null?void 0:q.children.item(K);J0(Q||void 0),m==null||m(void 0),y==null||y(e[K],K),$(void 0)},ref:N,children:[v&&e.length===0&&S.jsx("div",{className:"list-view-empty",children:v}),e.map((I,D)=>{const K=r(I,D);return S.jsxs("div",{onDoubleClick:()=>g==null?void 0:g(I,D),role:"listitem",className:Fe("list-view-entry",h===I&&"selected",!x&&C===I&&"highlighted",(o==null?void 0:o(I,D))&&"error",(u==null?void 0:u(I,D))&&"warning",(f==null?void 0:f(I,D))&&"info"),"aria-selected":h===I,onClick:()=>y==null?void 0:y(I,D),onMouseEnter:()=>$(I),onMouseLeave:()=>$(void 0),children:[l&&S.jsx("div",{className:"codicon "+(l(I,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:Q=>{Q.preventDefault(),Q.stopPropagation()},onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),w==null||w(I,D)}}),typeof K=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:K}):K]},(i==null?void 0:i(I,D))||D)})]})})}const __=yc,T_=({action:n,isLive:e})=>{const i=U.useMemo(()=>{var u;if(!n||!n.log.length)return[];const r=n.log,l=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<r.length;++f){let h="";if(r[f].time!==-1){const g=(u=r[f])==null?void 0:u.time;f+1<r.length?h=Et(r[f+1].time-g):n.endTime>0?h=Et(n.endTime-g):e?h=Et(Date.now()-l-g):h="-"}o.push({message:r[f].message,time:h})}return o},[n,e]);return i.length?S.jsx(__,{name:"log",ariaLabel:"Log entries",items:i,render:r=>S.jsxs("div",{className:"log-list-item",children:[S.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):S.jsx(ms,{text:"No log entries"})};function nl(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let l,o={},u=!1,f=e==null?void 0:e.fg,h=e==null?void 0:e.bg;for(;(l=i.exec(n))!==null;){const[,,g,,y]=l;if(g){const m=+g;switch(m){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=o0[m-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:h=o0[m-40];break;case 49:h=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=c0[m-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:h=c0[m-100];break}}else if(y){const m={...o},w=u?h:f;w!==void 0&&(m.color=w);const v=u?f:h;v!==void 0&&(m["background-color"]=v),r.push(`<span style="${A_(m)}">${E_(y)}</span>`)}}return r.join("")}const o0={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)"},c0={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 E_(n){return n.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function A_(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const N_=({error:n})=>{const e=U.useMemo(()=>nl(n),[n]);return S.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},jb=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:r})=>(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),r&&document.body.addEventListener("dblclick",r),()=>{e&&l.removeEventListener("mousemove",e),i&&l.removeEventListener("mouseup",i),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(l)}},[n,e,i,r]),S.jsx(S.Fragment,{})),C_={position:"absolute",top:0,right:0,bottom:0,left:0},Lb=({orientation:n,offsets:e,setOffsets:i,resizerColor:r,resizerWidth:l,minColumnWidth:o})=>{const u=o||0,[f,h]=gt.useState(null),[g,y]=gs(),m={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 S.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-l)/2,zIndex:100,pointerEvents:"none"},ref:y,children:[!!f&&S.jsx(jb,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>h(null),onPaneMouseMove:w=>{if(!w.buttons)h(null);else if(f){const v=n==="horizontal"?w.clientX-f.clientX:w.clientY-f.clientY,E=f.offset+v,x=f.index>0?e[f.index-1]:0,_=n==="horizontal"?g.width:g.height,N=Math.min(Math.max(x+u,E),_-u)-e[f.index];for(let C=f.index;C<e.length;++C)e[C]=e[C]+N;i([...e])}}}),e.map((w,v)=>S.jsx("div",{style:{...m,top:n==="horizontal"?0:w,left:n==="horizontal"?w:0,pointerEvents:"initial"},onMouseDown:E=>h({clientX:E.clientX,clientY:E.clientY,offset:w,index:v}),children:S.jsx("div",{style:{...C_,background:r}})},v))]})};async function lh(n){const e=new Image;return n&&(e.src=n,await new Promise((i,r)=>{e.onload=i,e.onerror=i})),e}const Oh={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`},k_=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[r,l]=U.useState(n.diff?"diff":"actual"),[o,u]=U.useState(!1),[f,h]=U.useState(null),[g,y]=U.useState("Expected"),[m,w]=U.useState(null),[v,E]=U.useState(null),[x,_]=gs();U.useEffect(()=>{(async()=>{var j,ne,le,V;h(await lh((j=n.expected)==null?void 0:j.attachment.path)),y(((ne=n.expected)==null?void 0:ne.title)||"Expected"),w(await lh((le=n.actual)==null?void 0:le.attachment.path)),E(await lh((V=n.diff)==null?void 0:V.attachment.path))})()},[n]);const N=f&&m&&v,C=N?Math.max(f.naturalWidth,m.naturalWidth,200):500,$=N?Math.max(f.naturalHeight,m.naturalHeight,200):500,I=Math.min(1,(x.width-30)/C),D=Math.min(1,(x.width-50)/C/2),K=C*I,Q=$*I,q={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return S.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:_,children:N&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&S.jsx("div",{style:{...q,fontWeight:r==="diff"?600:"initial"},onClick:()=>l("diff"),children:"Diff"}),S.jsx("div",{style:{...q,fontWeight:r==="actual"?600:"initial"},onClick:()=>l("actual"),children:"Actual"}),S.jsx("div",{style:{...q,fontWeight:r==="expected"?600:"initial"},onClick:()=>l("expected"),children:g}),S.jsx("div",{style:{...q,fontWeight:r==="sxs"?600:"initial"},onClick:()=>l("sxs"),children:"Side by side"}),S.jsx("div",{style:{...q,fontWeight:r==="slider"?600:"initial"},onClick:()=>l("slider"),children:"Slider"})]}),S.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:Q+60},children:[n.diff&&r==="diff"&&S.jsx(Jn,{image:v,alt:"Diff",hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),n.diff&&r==="actual"&&S.jsx(Jn,{image:m,alt:"Actual",hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),n.diff&&r==="expected"&&S.jsx(Jn,{image:f,alt:g,hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),n.diff&&r==="slider"&&S.jsx(M_,{expectedImage:f,actualImage:m,hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I,expectedTitle:g}),n.diff&&r==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Jn,{image:f,title:g,hideSize:i,canvasWidth:D*C,canvasHeight:D*$,scale:D}),S.jsx(Jn,{image:o?v:m,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:D*C,canvasHeight:D*$,scale:D})]}),!n.diff&&r==="actual"&&S.jsx(Jn,{image:m,title:"Actual",hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),!n.diff&&r==="expected"&&S.jsx(Jn,{image:f,title:g,hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),!n.diff&&r==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Jn,{image:f,title:g,canvasWidth:D*C,canvasHeight:D*$,scale:D}),S.jsx(Jn,{image:m,title:"Actual",canvasWidth:D*C,canvasHeight:D*$,scale:D})]})]}),!i&&S.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[S.jsx("div",{children:n.diff&&S.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},M_=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:r,scale:l,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[h,g]=U.useState(i/2),y=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&S.jsxs("div",{style:{margin:5},children:[!y&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight}),!y&&S.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!y&&S.jsx("span",{children:e.naturalWidth}),!y&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!y&&S.jsx("span",{children:e.naturalHeight})]}),S.jsxs("div",{style:{position:"relative",width:i,height:r,margin:15,...Oh},children:[S.jsx(Lb,{orientation:"horizontal",offsets:[h],setOffsets:m=>g(m[0]),resizerColor:"#57606a80",resizerWidth:6}),S.jsx("img",{alt:o,style:{width:n.naturalWidth*l,height:n.naturalHeight*l},draggable:"false",src:n.src}),S.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:h,...Oh},children:S.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*l,height:e.naturalHeight*l},draggable:"false",src:e.src})})]})]})},Jn=({image:n,title:e,alt:i,hideSize:r,canvasWidth:l,canvasHeight:o,scale:u,onClick:f})=>S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&S.jsxs("div",{style:{margin:5},children:[e&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight})]}),S.jsx("div",{style:{display:"flex",flex:"none",width:l,height:o,margin:15,...Oh},children:S.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})})]}),O_="modulepreload",j_=function(n,e){return new URL(n,e).href},u0={},L_=function(e,i,r){let l=Promise.resolve();if(i&&i.length>0){let u=function(y){return Promise.all(y.map(m=>Promise.resolve(m).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const f=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),g=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));l=u(i.map(y=>{if(y=j_(y,r),y in u0)return;u0[y]=!0;const m=y.endsWith(".css"),w=m?'[rel="stylesheet"]':"";if(!!r)for(let x=f.length-1;x>=0;x--){const _=f[x];if(_.href===y&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${w}`))return;const E=document.createElement("link");if(E.rel=m?"stylesheet":O_,m||(E.as="script"),E.crossOrigin="",E.href=y,g&&E.setAttribute("nonce",g),document.head.appendChild(E),m)return new Promise((x,_)=>{E.addEventListener("load",x),E.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${y}`)))})}))}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,xr=({text:n,highlighter:e,mimeType:i,linkify:r,readOnly:l,highlight:o,revealLine:u,lineNumbers:f,isFocused:h,focusOnChange:g,wrapLines:y,onChange:m,dataTestId:w,placeholder:v})=>{const[E,x]=gs(),[_]=U.useState(L_(()=>import("./codeMirrorModule-a5XoALAZ.js"),__vite__mapDeps([0,1]),import.meta.url).then(I=>I.default)),N=U.useRef(null),[C,$]=U.useState();return U.useEffect(()=>{(async()=>{var q,j;const I=await _;z_(I);const D=x.current;if(!D)return;const K=U_(e)||B_(i)||(r?"text/linkified":"");if(N.current&&K===N.current.cm.getOption("mode")&&!!l===N.current.cm.getOption("readOnly")&&f===N.current.cm.getOption("lineNumbers")&&y===N.current.cm.getOption("lineWrapping")&&v===N.current.cm.getOption("placeholder"))return;(j=(q=N.current)==null?void 0:q.cm)==null||j.getWrapperElement().remove();const Q=I(D,{value:"",mode:K,readOnly:!!l,lineNumbers:f,lineWrapping:y,placeholder:v,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return N.current={cm:Q},h&&Q.focus(),$(Q),Q})()},[_,C,x,e,i,r,f,y,l,h,v]),U.useEffect(()=>{N.current&&N.current.cm.setSize(E.width,E.height)},[E]),U.useLayoutEffect(()=>{var K;if(!C)return;let I=!1;if(C.getValue()!==n&&(C.setValue(n),I=!0,g&&(C.execCommand("selectAll"),C.focus())),I||JSON.stringify(o)!==JSON.stringify(N.current.highlight)){for(const j of N.current.highlight||[])C.removeLineClass(j.line-1,"wrap");for(const j of o||[])C.addLineClass(j.line-1,"wrap",`source-line-${j.type}`);for(const j of N.current.widgets||[])C.removeLineWidget(j);for(const j of N.current.markers||[])j.clear();const Q=[],q=[];for(const j of o||[]){if(j.type!=="subtle-error"&&j.type!=="error")continue;const ne=(K=N.current)==null?void 0:K.cm.getLine(j.line-1);if(ne){const le={};le.title=j.message||"",q.push(C.markText({line:j.line-1,ch:0},{line:j.line-1,ch:j.column||ne.length},{className:"source-line-error-underline",attributes:le}))}if(j.type==="error"){const le=document.createElement("div");le.innerHTML=nl(j.message||""),le.className="source-line-error-widget",Q.push(C.addLineWidget(j.line,le,{above:!0,coverGutter:!1}))}}N.current.highlight=o,N.current.widgets=Q,N.current.markers=q}typeof u=="number"&&N.current.cm.lineCount()>=u&&C.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let D;return m&&(D=()=>m(C.getValue()),C.on("change",D)),()=>{D&&C.off("change",D)}},[C,n,o,u,g,m]),S.jsx("div",{"data-testid":w,className:"cm-wrapper",ref:x,onClick:D_})};function D_(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 f0=!1;function z_(n){f0||(f0=!0,n.defineSimpleMode("text/linkified",{start:[{regex:P0,token:"linkified"}]}))}function B_(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 U_(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 H_(n){return!!n.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function q_(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 Rb=({title:n,children:e,setExpanded:i,expanded:r,expandOnTitleClick:l,className:o})=>{const u=U.useId(),f=U.useId(),h=U.useCallback(()=>i(!r),[r,i]),g=S.jsx("div",{className:Fe("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:l?void 0:h});return S.jsxs("div",{className:Fe("expandable",r&&"expanded",o),children:[l?S.jsxs("div",{id:u,role:"button","aria-expanded":r,"aria-controls":f,className:"expandable-title",onClick:h,children:[g,n]}):S.jsxs("div",{className:"expandable-title",children:[g,n]}),r&&S.jsx("div",{id:f,"aria-labelledby":u,role:"region",className:"expandable-content",children:e})]})};function Db(n){const e=[];let i=0,r;for(;(r=P0.exec(n))!==null;){const o=n.substring(i,r.index);o&&e.push(o);const u=r[0];e.push($_(u)),i=r.index+u.length}const l=n.substring(i);return l&&e.push(l),e}function $_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),S.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const zb=U.createContext(void 0),ti=()=>U.useContext(zb),I_=({attachment:n,reveal:e})=>{const i=ti(),[r,l]=U.useState(!1),[o,u]=U.useState(null),[f,h]=U.useState(null),[g,y]=px(),m=U.useRef(null),w=q_(n.contentType),v=!!n.sha1||!!n.path;U.useEffect(()=>{var _;if(e)return(_=m.current)==null||_.scrollIntoView({behavior:"smooth"}),y()},[e,y]),U.useEffect(()=>{r&&o===null&&f===null&&(h("Loading ..."),fetch(bc(i,n)).then(_=>_.text()).then(_=>{u(_),h(null)}).catch(_=>{h("Failed to load: "+_.message)}))},[i,r,o,f,n]);const E=U.useMemo(()=>{const _=o?o.split(`
`).length:0;return Math.min(Math.max(5,_),20)*R_},[o]),x=S.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":n.name,children:[S.jsx("span",{children:Db(n.name)}),v&&S.jsx("a",{style:{marginLeft:5},href:Yo(i,n),children:"download"})]});return!w||!v?S.jsx("div",{style:{marginLeft:20},children:x}):S.jsxs("div",{className:Fe(g&&"yellow-flash"),children:[S.jsx(Rb,{title:x,expanded:r,setExpanded:l,expandOnTitleClick:!0,children:f&&S.jsx("i",{children:f})}),r&&o!==null&&S.jsx("div",{className:"vbox",style:{height:E},children:S.jsx(xr,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},V_=({revealedAttachmentCallId:n})=>{const e=ti(),{diffMap:i,screenshots:r,attachments:l}=U.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const h of o){if(!h.path&&!h.sha1)continue;const g=h.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(g){const y=g[1],m=g[2],w=f.get(y)||{expected:void 0,actual:void 0,diff:void 0};w[m]=h,f.set(y,w),o.delete(h)}else h.contentType.startsWith("image/")&&(u.add(h),o.delete(h))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!r.size&&!l.size?S.jsx(ms,{text:"No attachments"}):S.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>S.jsxs(S.Fragment,{children:[o&&u&&S.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&S.jsx(k_,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Yo(e,o)},title:"Expected"},actual:{attachment:{...u,path:Yo(e,u)}},diff:f?{attachment:{...f,path:Yo(e,f)}}:void 0}})]})),r.size?S.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((o,u)=>{const f=bc(e,o);return S.jsxs("div",{className:"attachment-item",children:[S.jsx("div",{children:S.jsx("img",{draggable:"false",src:f})}),S.jsx("div",{children:S.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),l.size?S.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...l.values()].map((o,u)=>S.jsx("div",{className:"attachment-item",children:S.jsx(I_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},G_(o,u)))]})};function bc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function Yo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),bc(n,e)+i}function G_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const K_=`
# 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 Y_({testInfo:n,metadata:e,errorContext:i,errors:r,buildCodeFrame:l,stdout:o,stderr:u}){var m;const f=new Set(r.filter(w=>w.message&&!w.message.includes(`
`)).map(w=>w.message));for(const w of r)for(const v of f.keys())(m=w.message)!=null&&m.includes(v)&&f.delete(v);const h=r.filter(w=>!(!w.message||!w.message.includes(`
`)&&!f.has(w.message)));if(!h.length)return;const g=[K_,"# Test info","",n];o&&g.push("","# Stdout","","```",Xo(o),"```"),u&&g.push("","# Stderr","","```",Xo(u),"```"),g.push("","# Error details");for(const w of h)g.push("","```",Xo(w.message||""),"```");i&&g.push(i);const y=await l(h[h.length-1]);return y&&g.push("","# Test source","","```ts",y,"```"),e!=null&&e.gitDiff&&g.push("","# Local changes","","```diff",e.gitDiff,"```"),g.join(`
`)}const X_=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 Xo(n){return n.replace(X_,"")}const F_=yc,Q_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const r=n||[];return S.jsx(F_,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[i],render:l=>{const o=l.file[1]===":"?"\\":"/";return S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"stack-trace-frame-function",children:l.function||"(anonymous)"}),S.jsx("span",{className:"stack-trace-frame-location",children:l.file.split(o).pop()}),S.jsx("span",{className:"stack-trace-frame-line",children:":"+l.line})]})},onSelected:l=>e(r.indexOf(l))})},nd=({noShadow:n,children:e,noMinHeight:i,className:r,sidebarBackground:l,onClick:o})=>S.jsx("div",{className:Fe("toolbar",n&&"no-shadow",i&&"no-min-height",r,l&&"toolbar-sidebar-background"),onClick:o,children:e});function J_(n,e,i,r,l){const o=ti();return ec(async()=>{var v,E,x,_;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 h=f.file;let g=i.get(h);g||(g={errors:((v=l==null?void 0:l.source)==null?void 0:v.errors)||[],content:(E=l==null?void 0:l.source)==null?void 0:E.content},i.set(h,g));const y=(f==null?void 0:f.line)||((x=g.errors[0])==null?void 0:x.line)||0,m=r&&h.startsWith(r)?h.substring(r.length+1):h,w=g.errors.map(N=>({type:"error",line:N.line,message:N.message}));if(w.push({line:y,type:"running"}),((_=l==null?void 0:l.source)==null?void 0:_.content)!==void 0)g.content=l.source.content;else if(g.content===void 0||f===l){const N=await Bb(h);try{let C=o?await fetch(o.createRelativeUrl(`sha1/src@${N}.txt`)):void 0;(!C||C.status===404)&&(C=await fetch(`file?path=${encodeURIComponent(h)}`)),C.status>=400?g.content="":g.content=await C.text()}catch{g.content=`<Unable to read "${h}">`}}return{model:o,source:g,highlight:w,targetLine:y,fileName:m,location:f}},[n,e,r,l],{source:{errors:[],content:"Loading…"},highlight:[]})}const P_=({stack:n,sources:e,rootDir:i,fallbackLocation:r,stackFrameLocation:l,onOpenExternally:o})=>{const[u,f]=U.useState(),[h,g]=U.useState(0);U.useEffect(()=>{u!==n&&(f(n),g(0))},[n,u,f,g]);const{source:y,highlight:m,targetLine:w,fileName:v,location:E}=J_(n,h,e,i,r),x=U.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),_=((n==null?void 0:n.length)??0)>1,N=Z_(v),C=N.endsWith(".md")?"markdown":"javascript";return S.jsx(nc,{sidebarSize:200,orientation:l==="bottom"?"vertical":"horizontal",sidebarHidden:!_,main:S.jsxs("div",{className:"vbox","data-testid":"source-code",children:[v&&S.jsxs(nd,{children:[S.jsx("div",{className:"source-tab-file-name",title:v,children:S.jsx("div",{children:N})}),S.jsx(td,{description:"Copy filename",value:N}),E&&S.jsx(Ht,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),S.jsx(xr,{text:y.content||"",highlighter:C,highlight:m,revealLine:w,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:S.jsx(Q_,{stack:n,selectedFrame:h,setSelectedFrame:g})})};async function Bb(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),r=[],l=new DataView(i);for(let o=0;o<l.byteLength;o+=1){const u=l.getUint8(o).toString(16).padStart(2,"0");r.push(u)}return r.join("")}function Z_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const W_=({prompt:n})=>S.jsx(Ko,{value:n,description:"Copy prompt",copiedDescription:S.jsxs(S.Fragment,{children:["Copied ",S.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function eT(n){return U.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 tT({message:n,error:e,sdkLanguage:i,revealInSource:r}){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),S.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[S.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&ed(e.action,{sdkLanguage:i}),l&&S.jsxs("div",{className:"action-location",children:["@ ",S.jsx("span",{title:o,onClick:()=>r(e),children:l})]})]}),S.jsx(N_,{error:n})]})}const nT=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:r,testRunMetadata:l})=>{const o=ti(),u=ec(async()=>{const g=o==null?void 0:o.attachments.find(y=>y.name==="error-context");if(g)return await fetch(bc(o,g)).then(y=>y.text())},[o],void 0),f=U.useCallback(async g=>{var v;const y=(v=g.stack)==null?void 0:v[0];if(!y)return;let m=o?await fetch(o.createRelativeUrl(`sha1/src@${await Bb(y.file)}.txt`)):void 0;if((!m||m.status===404)&&(m=await fetch(`file?path=${encodeURIComponent(y.file)}`)),m.status>=400)return;const w=await m.text();return iT({source:w,message:Xo(g.message).split(`
`)[0]||void 0,location:y,linesAbove:100,linesBelow:100})},[o]),h=ec(()=>Y_({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?S.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[S.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:h&&S.jsx(W_,{prompt:h})}),[...n.errors.entries()].map(([g,y])=>{const m=`error-${r}-${g}`;return S.jsx(tT,{message:g,error:y,revealInSource:i,sdkLanguage:e},m)})]}):S.jsx(ms,{text:"No errors"})};function iT({source:n,message:e,location:i,linesAbove:r,linesBelow:l}){const o=n.split(`
`).slice(),u=Math.max(0,i.line-r-1),f=Math.min(o.length,i.line+l),h=o.slice(u,f),g=String(f).length,y=h.map((m,w)=>`${u+w+1===i.line?"> ":"  "}${(u+w+1).toString().padEnd(g," ")} | ${m}`);return e&&y.splice(i.line-u,0,`${" ".repeat(g+2)} | ${" ".repeat(i.column-2)} ^ ${e}`),y.join(`
`)}const sT=yc;function rT(n,e){const{entries:i}=U.useMemo(()=>{if(!n)return{entries:[]};const l=[];function o(f){var y,m,w,v,E,x;const h=l[l.length-1];h&&((y=f.browserMessage)==null?void 0:y.bodyString)===((m=h.browserMessage)==null?void 0:m.bodyString)&&((w=f.browserMessage)==null?void 0:w.location)===((v=h.browserMessage)==null?void 0:v.location)&&f.browserError===h.browserError&&((E=f.nodeMessage)==null?void 0:E.html)===((x=h.nodeMessage)==null?void 0:x.html)&&f.isError===h.isError&&f.isWarning===h.isWarning&&f.timestamp-h.timestamp<1e3?h.repeat++:l.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,h)=>{const g="time"in f?f.time:f.timestamp,y="time"in h?h.time:h.timestamp;return g-y});for(const f of u){if(f.type==="console"){const h=f.args&&f.args.length?lT(f.args):Ub(f.text),g=f.location.url,m=`${g?g.substring(g.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;o({browserMessage:{body:h,bodyString:f.text,location:m},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 h="";f.text&&(h=nl(f.text.trim())||""),f.base64&&(h=nl(atob(f.base64).trim())||""),o({nodeMessage:{html:h},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:l}},[n]);return{entries:U.useMemo(()=>e?i.filter(l=>l.timestamp>=e.minimum&&l.timestamp<=e.maximum):i,[i,e])}}const aT=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:r})=>n.entries.length?S.jsx("div",{className:"console-tab",children:S.jsx(sT,{name:"console",onAccepted:r,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=Et(l.timestamp-e.minimum),u=S.jsx("span",{className:"console-time",children:o}),f=l.isError?"status-error":l.isWarning?"status-warning":"status-none",h=l.browserMessage||l.browserError?S.jsx("span",{className:Fe("codicon","codicon-browser",f),title:"Browser message"}):S.jsx("span",{className:Fe("codicon","codicon-file",f),title:"Runner message"});let g,y,m,w;const{browserMessage:v,browserError:E,nodeMessage:x}=l;if(v&&(g=v.location,y=v.body),E){const{error:_,value:N}=E;_?(y=_.message,w=_.stack):y=String(N)}return x&&(m=x.html),S.jsxs("div",{className:"console-line",children:[u,h,g&&S.jsx("span",{className:"console-location",children:g}),l.repeat>1&&S.jsx("span",{className:"console-repeat",children:l.repeat}),y&&S.jsx("span",{className:"console-line-message",children:y}),m&&S.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:m}}),w&&S.jsx("div",{className:"console-stack",children:w})]})}})}):S.jsx(ms,{text:"No console entries"});function lT(n){if(n.length===1)return Ub(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",r=e?n.slice(1):n;let l=0;const o=/%([%sdifoOc])/g;let u;const f=[];let h=[];f.push(S.jsx("span",{children:h},f.length+1));let g=0;for(;(u=o.exec(i))!==null;){const y=i.substring(g,u.index);h.push(S.jsx("span",{children:y},h.length+1)),g=u.index+2;const m=u[0][1];if(m==="%")h.push(S.jsx("span",{children:"%"},h.length+1));else if(m==="s"||m==="o"||m==="O"||m==="d"||m==="i"||m==="f"){const w=r[l++],v={};typeof(w==null?void 0:w.value)!="string"&&(v.color="var(--vscode-debugTokenExpression-number)"),h.push(S.jsx("span",{style:v,children:(w==null?void 0:w.preview)||""},h.length+1))}else if(m==="c"){h=[];const w=r[l++],v=w?oT(w.preview):{};f.push(S.jsx("span",{style:v,children:h},f.length+1))}}for(g<i.length&&h.push(S.jsx("span",{children:i.substring(g)},h.length+1));l<r.length;l++){const y=r[l],m={};h.length&&h.push(S.jsx("span",{children:" "},h.length+1)),typeof(y==null?void 0:y.value)!="string"&&(m.color="var(--vscode-debugTokenExpression-number)"),h.push(S.jsx("span",{style:m,children:(y==null?void 0:y.preview)||""},h.length+1))}return f}function Ub(n){return[S.jsx("span",{dangerouslySetInnerHTML:{__html:nl(n.trim())}})]}function oT(n){try{const e={},i=n.split(";");for(const r of i){const l=r.trim();if(!l)continue;let[o,u]=l.split(":");if(o=o.trim(),u=u.trim(),!cT(o))continue;const f=o.replace(/-([a-z])/g,h=>h[1].toUpperCase());e[f]=u}return e}catch{return{}}}function cT(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const jh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:r,rightToolbar:l,dataTestId:o,mode:u})=>{const f=U.useId();return e||(e=n[0].id),u||(u="default"),S.jsx("div",{className:"tabbed-pane","data-testid":o,children:S.jsxs("div",{className:"vbox",children:[S.jsxs(nd,{children:[r&&S.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),u==="default"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(h=>S.jsx(Hb,{id:h.id,ariaControls:`${f}-${h.id}`,title:h.title,count:h.count,errorCount:h.errorCount,selected:e===h.id,onSelect:i},h.id))]}),u==="select"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:S.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:h=>{i==null||i(n[h.currentTarget.selectedIndex].id)},children:n.map(h=>{let g="";return h.count&&(g=` (${h.count})`),h.errorCount&&(g=` (${h.errorCount})`),S.jsxs("option",{value:h.id,role:"tab","aria-controls":`${f}-${h.id}`,children:[h.title,g]},h.id)})})}),l&&S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...l]})]}),n.map(h=>{const g="tab-content tab-"+h.id;if(h.component)return S.jsx("div",{id:`${f}-${h.id}`,role:"tabpanel","aria-label":h.title,className:g,style:{display:e===h.id?"inherit":"none"},children:h.component},h.id);if(e===h.id)return S.jsx("div",{id:`${f}-${h.id}`,role:"tabpanel","aria-label":h.title,className:g,children:h.render()},h.id)})]})})},Hb=({id:n,title:e,count:i,errorCount:r,selected:l,onSelect:o,ariaControls:u})=>S.jsxs("div",{className:Fe("tabbed-pane-tab",l&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,"aria-selected":l,children:[S.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&S.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!r&&S.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]});async function uT(n,e){const i=navigator.platform.includes("Win")?"win":"unix";let r=[];const l=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(w){return'^"'+w.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/[^ -~\r\n]/g," ").replace(/\r?\n|\r/g,`^

`)+'^"'}function u(w){function v(E){let _=E.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(w)?"$'"+w.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+w+"'"}const f=i==="win"?o:u;r.push(f(e.request.url).replace(/[[{}\]]/g,"\\$&"));let h="GET";const g=[],y=await qb(n,e);y&&(g.push("--data-raw "+f(y)),l.add("content-length"),h="POST"),e.request.method!==h&&r.push("-X "+f(e.request.method));const m=e.request.headers;for(let w=0;w<m.length;w++){const v=m[w],E=v.name.replace(/^:/,"");if(l.has(E.toLowerCase()))continue;const x=v.value;x.trim()?E.toLowerCase()==="cookie"?r.push("-b "+f(x)):r.push("-H "+f(E+": "+x)):r.push("-H "+f(E+";"))}return r=r.concat(g),"curl "+r.join(r.length>=3?i==="win"?` ^
  `:` \\
  `:" ")}async function fT(n,e,i=0){const r=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"]),l=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),u=e.request.headers,f=u.reduce((x,_)=>{const N=_.name;return!r.has(N.toLowerCase())&&!N.includes(":")&&x.append(N,_.value),x},new Headers),h={};for(const x of f)h[x[0]]=x[1];const g=e.request.cookies.length||u.some(({name:x})=>l.has(x.toLowerCase()))?"include":"omit",y=u.find(({name:x})=>x.toLowerCase()==="referer"),m=y?y.value:void 0,w=await qb(n,e),v={headers:Object.keys(h).length?h:void 0,referrer:m,body:w,method:e.request.method,mode:"cors"};if(i===1){const x=u.find(N=>N.name.toLowerCase()==="cookie"),_={};delete v.mode,x&&(_.cookie=x.value),m&&(delete v.referrer,_.Referer=m),Object.keys(_).length&&(v.headers={...h,..._})}else v.credentials=g;const E=JSON.stringify(v,null,2);return`fetch(${o}, ${E});`}async function qb(n,e){var i,r;return n&&((i=e.request.postData)!=null&&i._sha1)?await fetch(n.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(l=>l.text()):(r=e.request.postData)==null?void 0:r.text}class hT{generatePlaywrightRequestCall(e,i){let r=e.method.toLowerCase();const l=new URL(e.url),o=`${l.origin}${l.pathname}`,u={};["delete","get","head","post","put","patch"].includes(r)||(u.method=r,r="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(g=>[g.name,g.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${r}(${f.join(", ")});`}prettyPrintObject(e,i=2,r=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(r*i),h=" ".repeat((r+1)*i);return`[
${e.map(y=>`${h}${this.prettyPrintObject(y,i,r+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
${Object.entries(e).map(([f,h])=>{const g=this.prettyPrintObject(h,i,r+1),y=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${y}: ${g}`}).join(`,
`)}
${l}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
`)||e.includes("\r")||e.includes("	")?"`"+e+"`":`'${e}'`}}class dT{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),o=[`"${`${r.origin}${r.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),r.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(h=>[h.name,h.value])))}`);const f=o.length===1?o[0]:`
${o.map(h=>this.indent(h,2)).join(`,
`)}
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
`).map(r=>" ".repeat(i)+r).join(`
`)}prettyPrintObject(e,i=2,r=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(r*i),h=" ".repeat((r+1)*i);return`[
${e.map(y=>`${h}${this.prettyPrintObject(y,i,r+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
${Object.entries(e).map(([f,h])=>{const g=this.prettyPrintObject(h,i,r+1);return`${o}${this.stringLiteral(f)}: ${g}`}).join(`,
`)}
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class pT{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=`${r.origin}${r.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),r.searchParams.size&&(o.Params=Object.fromEntries(r.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(y=>[y.name,y.value])));const h=[`"${l}"`];return Object.keys(o).length>0&&h.push(this.prettyPrintObject(o)),`${u.join(`
`)}${u.length?`
`:""}await request.${this.toFunctionName(f)}(${h.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,r=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(r*i),h=" ".repeat((r+1)*i);return`new object[] {
${e.map(y=>`${h}${this.prettyPrintObject(y,i,r+1)}`).join(`,
`)}
${f}}`}if(Object.keys(e).length===0)return"new {}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`new() {
${Object.entries(e).map(([f,h])=>{const g=this.prettyPrintObject(h,i,r+1),y=r===0?f:`[${this.stringLiteral(f)}]`;return`${o}${y} = ${g}`}).join(`,
`)}
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class gT{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=[`"${r.origin}${r.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,h]of r.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(h)})`);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 mT(n){if(n==="javascript")return new hT;if(n==="python")return new dT;if(n==="csharp")return new pT;if(n==="java")return new gT;throw new Error("Unsupported language: "+n)}const yT=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:r})=>{const[l,o]=U.useState("headers"),u=ti(),f=ec(async()=>{if(u&&n.request.postData){const h=n.request.headers.find(y=>y.name.toLowerCase()==="content-type"),g=h?h.value:"";if(n.request.postData._sha1){const y=await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`));return{text:Lh(await y.text(),g),mimeType:g}}else return{text:Lh(n.request.postData.text,g),mimeType:g}}else return null},[n],null);return S.jsx(jh,{leftToolbar:[S.jsx(Ht,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[S.jsx(bT,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>S.jsx(vT,{resource:n,startTimeOffset:i})},{id:"payload",title:"Payload",render:()=>S.jsx(ST,{resource:n,requestBody:f})},{id:"response",title:"Response",render:()=>S.jsx(wT,{resource:n})}],selectedTab:l,setSelectedTab:o})},bT=({resource:n,sdkLanguage:e,requestBody:i})=>{const r=ti(),l=S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>mT(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return S.jsxs("div",{className:"copy-request-dropdown",children:[S.jsxs(Ht,{className:"copy-request-dropdown-toggle",children:[S.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",S.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),S.jsxs("div",{className:"copy-request-dropdown-menu",children:[S.jsx(Ko,{description:"Copy as cURL",copiedDescription:l,value:()=>uT(r,n)}),S.jsx(Ko,{description:"Copy as Fetch",copiedDescription:l,value:()=>fT(r,n)}),S.jsx(Ko,{description:"Copy as Playwright",copiedDescription:l,value:o})]})]})},Xa=({title:n,data:e,showCount:i,children:r,className:l})=>{const[o,u]=on(`trace-viewer-network-details-${n.replaceAll(" ","-")}`,!0);return S.jsxs(Rb,{expanded:o,setExpanded:u,expandOnTitleClick:!0,title:S.jsxs("span",{className:"network-request-details-header",children:[n,i&&S.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),className:l,children:[e&&S.jsx("table",{className:"network-request-details-table",children:S.jsx("tbody",{children:e.map(({name:f,value:h},g)=>h!==null&&S.jsxs("tr",{children:[S.jsx("td",{children:f}),S.jsx("td",{children:h})]},g))})}),r]})},vT=({resource:n,startTimeOffset:e})=>{const i=U.useMemo(()=>Object.entries({URL:n.request.url,Method:n.request.method,"Status Code":n.response.status!==-1&&S.jsxs("span",{className:_T(n.response.status),children:[" ",n.response.status," ",n.response.statusText]}),Start:Et(e),Duration:Et(n.time)}).map(([r,l])=>({name:r,value:l})),[n,e]);return S.jsxs("div",{className:"vbox network-request-details-tab",children:[S.jsx(Xa,{title:"General",data:i}),S.jsx(Xa,{title:"Request Headers",showCount:!0,data:n.request.headers}),S.jsx(Xa,{title:"Response Headers",showCount:!0,data:n.response.headers})]})},ST=({resource:n,requestBody:e})=>S.jsxs("div",{className:"vbox network-request-details-tab",children:[n.request.queryString.length===0&&!e&&S.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),n.request.queryString.length>0&&S.jsx(Xa,{title:"Query String Parameters",showCount:!0,data:n.request.queryString}),e&&S.jsx(Xa,{title:"Request Body",className:"network-request-request-body",children:S.jsx(xr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]}),wT=({resource:n})=>{const e=ti(),[i,r]=U.useState(null);return U.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 h=await f.blob(),g=new FileReader,y=new Promise(m=>g.onload=m);g.readAsDataURL(h),r({dataUrl:(await y).target.result})}else if(u){const h=await f.arrayBuffer();r({font:h})}else{const h=Lh(await f.text(),n.response.content.mimeType);r({text:h,mimeType:n.response.content.mimeType})}}else r(null)})()},[n,e]),S.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&S.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&S.jsx(xT,{font:i.font}),i&&i.dataUrl&&S.jsx("div",{children:S.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text&&S.jsx(xr,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]})},xT=({font:n})=>{const[e,i]=U.useState(!1);return U.useEffect(()=>{let r;try{r=new FontFace("font-preview",n),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(r)}},[n]),e?S.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):S.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",S.jsx("br",{}),"NOPQRSTUVWXYZ",S.jsx("br",{}),"abcdefghijklm",S.jsx("br",{}),"nopqrstuvwxyz",S.jsx("br",{}),"1234567890"]})};function _T(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function Lh(n,e){if(n===null)return"Loading...";const i=n;if(i==="")return"<Empty>";if(H_(e))try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(i):i}function TT(n){const[e,i]=U.useState([]);U.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 r(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const h=o[f]-(o[f-1]||0),g=n.columns[f];u.set(g,h)}n.setColumnWidths(u)}const l=U.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 S.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[S.jsx(Lb,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),S.jsxs("div",{className:"vbox",children:[S.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>S.jsxs("div",{className:"grid-view-header-cell "+ET(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&l(o),children:[S.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),S.jsx("span",{className:"codicon codicon-triangle-up"}),S.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),S.jsx(yc,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>S.jsx(S.Fragment,{children:n.columns.map((f,h)=>{const{body:g,title:y}=n.render(o,f,u);return S.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:y,style:{width:h<n.columns.length-1?n.columnWidths.get(f):void 0},children:g},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 ET(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const AT=["Fetch","HTML","JS","CSS","Font","Image"],NT={searchValue:"",resourceTypes:new Set},CT=({filterState:n,onFilterStateChange:e})=>S.jsxs("div",{className:"network-filters",children:[S.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),S.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[S.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),AT.map(i=>S.jsx("div",{title:i,onClick:r=>{let l;r.ctrlKey||r.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))]})]}),kT=TT;function MT(n,e){const i=U.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),r=U.useMemo(()=>new zT(n),[n]);return{resources:i,contextIdMap:r}}const OT=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:r})=>{const[l,o]=U.useState(void 0),[u,f]=U.useState(void 0),[h,g]=U.useState(NT),y=U.useMemo(()=>u&&e.resources.includes(u.resource)?u:void 0,[u,e.resources]),{renderedEntries:m}=U.useMemo(()=>{const _=e.resources.map((N,C)=>BT(N,n,e.contextIdMap,C)).filter(IT(h));return l&&HT(_,l),{renderedEntries:_}},[e.resources,e.contextIdMap,h,l,n]),[w,v]=U.useState(()=>new Map($b().map(_=>[_,LT(_)]))),E=U.useCallback(_=>{g(_),f(void 0)},[]);if(!e.resources.length)return S.jsx(ms,{text:"No network calls"});const x=S.jsx(kT,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:y,onSelected:_=>f(_),onHighlighted:_=>i==null?void 0:i(_==null?void 0:_.ordinal),columns:RT(!!y,m),columnTitle:jT,columnWidths:w,setColumnWidths:v,isError:_=>_.status.code>=400||_.status.code===-1,isInfo:_=>!!_.route,render:(_,N)=>DT(_,N),sorting:l,setSorting:o});return S.jsxs(S.Fragment,{children:[S.jsx(CT,{filterState:h,onFilterStateChange:E}),!y&&x,y&&S.jsx(nc,{sidebarSize:w.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:S.jsx(yT,{resource:y.resource,sdkLanguage:r,startTimeOffset:y.start,onClose:()=>f(void 0)}),sidebar:x})]})},jT=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":"",LT=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function RT(n,e){if(n){const r=["name"];return h0(e)&&r.unshift("contextId"),r}let i=$b();return h0(e)||(i=i.filter(r=>r!=="contextId")),i}function $b(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const DT=(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:Et(n.duration)}:e==="size"?{body:fx(n.size)}:e==="start"?{body:Et(n.start)}:e==="route"?{body:n.route}:{body:""};class zT{constructor(e){Ma(this,"_pagerefToShortId",new Map);Ma(this,"_contextToId",new Map);Ma(this,"_lastPageId",0);Ma(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=rb(e);if(!i)return"";let r=this._contextToId.get(i);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(i,r)),r}}function h0(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const BT=(n,e,i,r)=>{const l=UT(n);let o;try{const h=new URL(n.request.url);o=h.pathname.substring(h.pathname.lastIndexOf("/")+1),o||(o=h.host),h.search&&(o+=h.search)}catch{o=n.request.url}let u=n.response.content.mimeType;const f=u.match(/^(.*);\s*charset=.*$/);return f&&(u=f[1]),{ordinal:r,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 UT(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function HT(n,e){const i=qT(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function qT(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 r=e.method,l=i.method;return r.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 $T={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 IT({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(l=>$T[l](i.contentType)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function VT(n,e){if(n.role!==e.role||n.name!==e.name||!GT(n,e)||lc(n)!==lc(e))return!1;const i=Object.keys(n.props),r=Object.keys(e.props);return i.length===r.length&&i.every(l=>n.props[l]===e.props[l])}function lc(n){return n.box.cursor==="pointer"}function GT(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 id(n,e,i={}){var w;const r=new n.LineCounter,l={keepSourceTokens:!0,lineCounter:r,...i},o=n.parseDocument(e,l),u=[],f=v=>[r.linePos(v[0]),r.linePos(v[1])],h=v=>{u.push({message:v.message,range:[r.linePos(v.pos[0]),r.linePos(v.pos[1])]})},g=(v,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const C=oc.parse(x,l,u);C&&(v.children=v.children||[],v.children.push(C));continue}if(x instanceof n.YAMLMap){y(v,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},y=(v,E)=>{for(const x of E.items){if(v.children=v.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 N=x.key,C=x.value;if(N.value==="text"){if(!(C instanceof n.Scalar&&typeof C.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||E.range)});continue}v.children.push({kind:"text",text:oh(C.value)});continue}if(N.value==="/children"){if(!(C instanceof n.Scalar&&typeof C.value=="string")||C.value!=="contain"&&C.value!=="equal"&&C.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||E.range)});continue}v.containerMode=C.value;continue}if(N.value.startsWith("/")){if(!(C instanceof n.Scalar&&typeof C.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||E.range)});continue}v.props=v.props??{},v.props[N.value.slice(1)]=oh(C.value);continue}const $=oc.parse(N,l,u);if(!$)continue;if(C instanceof n.Scalar){const K=typeof C.value;if(K!=="string"&&K!=="number"&&K!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}v.children.push({...$,children:[{kind:"text",text:oh(String(C.value))}]});continue}if(C instanceof n.YAMLSeq){v.children.push($),g($,C);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||E.range)})}},m={kind:"role",role:"fragment"};return o.errors.forEach(h),u.length?{errors:u,fragment:m}:(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:m}:(g(m,o.contents),u.length?{errors:u,fragment:KT}:((w=m.children)==null?void 0:w.length)===1&&(!m.containerMode||m.containerMode==="contain")?{fragment:m.children[0],errors:[]}:{fragment:m,errors:[]}))}const KT={kind:"role",role:"fragment"};function Ib(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function oh(n){return{raw:n,normalized:Ib(n)}}class oc{static parse(e,i,r){try{return new oc(e.value)._parse()}catch(l){if(l instanceof d0){const o=i.prettyErrors===!1?l.message:l.message+`:

`+e.value+`
`+" ".repeat(l.pos)+`^
`;return r.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 r=this._next();if(i)e+=r,i=!1;else if(r==="\\")i=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new d0(e,i||this._pos)}_readRegex(){let e="",i=!1,r=!1;for(;!this._eof();){const l=this._next();if(i)e+=l,i=!1;else if(l==="\\")i=!0,e+=l;else{if(l==="/"&&!r)return{pattern:e};l==="["?(r=!0,e+=l):l==="]"&&r?(e+=l,r=!1):e+=l}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Ib(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 r=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,r,l||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",r={kind:"role",role:e,name:i};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,i,r,l){if(i==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',l),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',l),e.disabled=r==="true";return}if(i==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',l),e.expanded=r==="true";return}if(i==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',l),e.active=r==="true";return}if(i==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',l),e.level=Number(r);return}if(i==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',l),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',l),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,l)}_assert(e,i,r){e||this._throwError(i||"Assertion error",r)}}class d0 extends Error{constructor(e,i){super(e),this.pos=i}}function YT(n,e){var u,f;function i(h,g,y){let m=1,w=y+m;for(const v of h.children||[])typeof v=="string"?(m++,w++):(m+=i(v,g,w),w+=m);if(!["none","presentation","fragment","iframe","generic"].includes(h.role)&&h.name){let v=g.get(h.role);v||(v=new Map,g.set(h.role,v));const E=v.get(h.name),x=m*100-y;(!E||E.sizeAndPosition<x)&&v.set(h.name,{node:h,sizeAndPosition:x})}return m}const r=new Map;n&&i(n,r,0);const l=new Map;i(e,l,0);const o=[];for(const[h,g]of l)for(const[y,m]of g)((u=r.get(h))==null?void 0:u.get(y))||o.push(m);return o.sort((h,g)=>g.sizeAndPosition-h.sizeAndPosition),(f=o[0])==null?void 0:f.node}function XT(n){return Vb(n)?"'"+n.replace(/'/g,"''")+"'":n}function ch(n){return Vb(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 Vb(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()))}let Gb={};function FT(n){Gb=n}function il(n,e){for(;e;){if(n.contains(e))return!0;e=Yb(e)}return!1}function bt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function Kb(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Yb(n){for(;n.parentElement;)n=n.parentElement;return bt(n)}function $a(n,e,i){for(;n;){const r=n.closest(e);if(i&&r!==i&&(r!=null&&r.contains(i)))return;if(r)return r;n=Yb(n)}}function zi(n,e){const i=e==="::before"?rd:e==="::after"?ad:sd;if(i&&i.has(n))return i.get(n);const r=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,r),r}function Xb(n,e){if(e=e??zi(n),!e)return!0;if(Element.prototype.checkVisibility&&Gb.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 cc(n){const e=zi(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&&ji(l))return{visible:!0,inline:!1,cursor:i};if(l.nodeType===3&&Fb(l))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!Xb(n,e))return{cursor:i,visible:!1,inline:!1};const r=n.getBoundingClientRect();return{cursor:i,visible:r.width>0&&r.height>0,inline:e.display==="inline"}}function ji(n){return cc(n).visible}function Fb(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function Xe(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let sd,rd,ad,Qb=0;function ld(){++Qb,sd??(sd=new Map),rd??(rd=new Map),ad??(ad=new Map)}function od(){--Qb||(sd=void 0,rd=void 0,ad=void 0)}function p0(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const g0="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]",QT=[["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 Jb(n,e){return QT.some(([i,r])=>!(r!=null&&r.includes(e||""))&&n.hasAttribute(i))}function Pb(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function JT(n){return!cv(n)&&(PT(n)||Pb(n))}function PT(n){const e=Xe(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const uh={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=>$a(n,g0)?null:"contentinfo",FORM:n=>p0(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>$a(n,g0)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!Jb(n)&&!Pb(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=Nr(n,n.getAttribute("list"))[0];return i&&Xe(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":dE[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=>p0(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=$a(n,"table"),i=e?cd(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,r=n.previousElementSibling,l=n.parentElement&&Xe(n.parentElement)==="TR"?n.parentElement:void 0;if(!i&&!r){if(l){const o=$a(l,"table");if(o&&o.rows.length<=1)return null}return"columnheader"}return m0(i)&&m0(r)?"columnheader":y0(i)||y0(r)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function m0(n){return!!n&&Xe(n)==="TH"}function y0(n){var e;return!n||Xe(n)!=="TD"?!1:!!((e=n.textContent)!=null&&e.trim()||n.children.length>0)}const ZT={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 b0(n){var r;const e=((r=uh[Xe(n)])==null?void 0:r.call(uh,n))||"";if(!e)return null;let i=n;for(;i;){const l=bt(i),o=ZT[Xe(i)];if(!o||!l||!o.includes(Xe(l)))break;const u=cd(l);if((u==="none"||u==="presentation")&&!Zb(l,u))return u;i=l}return e}const WT=["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 cd(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>WT.includes(i))||null}function Zb(n,e){return Jb(n,e)||JT(n)}function mt(n){const e=cd(n);if(!e)return b0(n);if(e==="none"||e==="presentation"){const i=b0(n);if(Zb(n,i))return i}return e}function Wb(n){return n===null?void 0:n.toLowerCase()==="true"}function ev(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Xe(n))}function ln(n){if(ev(n))return!0;const e=zi(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&&!ln(l)||l.nodeType===3&&Fb(l))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!Xb(n,e)?!0:tv(n)}function tv(n){let e=Mi==null?void 0:Mi.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=zi(n);e=!i||i.display==="none"||Wb(n.getAttribute("aria-hidden"))===!0}if(!e){const i=bt(n);i&&(e=tv(i))}Mi==null||Mi.set(n,e)}return e}function Nr(n,e){if(!e)return[];const i=Kb(n);if(!i)return[];try{const r=e.split(" ").filter(o=>!!o),l=[];for(const o of r){const u=i.querySelector("#"+CSS.escape(o));u&&!l.includes(u)&&l.push(u)}return l}catch{return[]}}function Pn(n){return n.trim()}function Fa(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function v0(n,e){const i=[...n.querySelectorAll(e)];for(const r of Nr(n,n.getAttribute("aria-owns")))r.matches(e)&&i.push(r),i.push(...r.querySelectorAll(e));return i}function Qa(n,e){const i=e==="::before"?wd:e==="::after"?xd:Sd;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const r=zi(n,e);let l;if(r){const o=r.content;o&&o!=="none"&&o!=="normal"&&r.display!=="none"&&r.visibility!=="hidden"&&(l=eE(n,o,!!e))}return e&&l!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(l=" "+l+" "),i&&i.set(n,l),l}function eE(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let r=ab(e).filter(f=>!(f instanceof ic));const l=r.findIndex(f=>f instanceof dt&&f.value==="/");if(l!==-1)r=r.slice(l+1);else if(!i)return;const o=[];let u=0;for(;u<r.length;)if(r[u]instanceof Wh)o.push(r[u].value),u++;else if(u+2<r.length&&r[u]instanceof Ya&&r[u].value==="attr"&&r[u+1]instanceof Zh&&r[u+2]instanceof Ph){const f=r[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function nv(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=Nr(n,e);return i.length?i:null}function tE(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),r=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||r}function sl(n,e){const i=e?yd:md;let r=i==null?void 0:i.get(n);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(mt(n)||"")||(r=Fa(yn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,r)),r}function S0(n,e){const i=e?vd:bd;let r=i==null?void 0:i.get(n);if(r===void 0){if(r="",n.hasAttribute("aria-describedby")){const l=Nr(n,n.getAttribute("aria-describedby"));r=Fa(l.map(o=>yn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:ln(o)}})).join(" "))}else n.hasAttribute("aria-description")?r=Fa(n.getAttribute("aria-description")||""):r=Fa(n.getAttribute("title")||"");i==null||i.set(n,r)}return r}function nE(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function iE(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function sE(n){const e=dr;let i=dr==null?void 0:dr.get(n);if(i===void 0){i="";const r=nE(n)!=="false",l=iE(n);if(r||l){const o=n.getAttribute("aria-errormessage");i=Nr(n,o).map(h=>Fa(yn(h,{visitedElements:new Set,embeddedInDescribedBy:{element:h,hidden:ln(h)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function yn(n,e){var h,g,y,m;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const w=!!((h=e.embeddedInLabelledBy)!=null&&h.hidden)||!!((g=e.embeddedInDescribedBy)!=null&&g.hidden)||!!((y=e.embeddedInNativeTextAlternative)!=null&&y.hidden)||!!((m=e.embeddedInLabel)!=null&&m.hidden);if(ev(n)||!w&&ln(n))return e.visitedElements.add(n),""}const r=nv(n);if(!e.embeddedInLabelledBy){const w=(r||[]).map(v=>yn(v,{...e,embeddedInLabelledBy:{element:v,hidden:ln(v)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(w)return w}const l=mt(n)||"",o=Xe(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const w=[...n.labels||[]].includes(n),v=(r||[]).includes(n);if(!w&&!v){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"?v0(n,"*").find(_=>mt(_)==="listbox"):n;E=x?v0(x,'[aria-selected="true"]').filter(_=>mt(_)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>yn(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(Pn(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 w=n.value||"";return Pn(w)?w:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const w=n.labels||[];return w.length&&!e.embeddedInLabelledBy?Ra(w,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const w=n.labels||[];if(w.length&&!e.embeddedInLabelledBy)return Ra(w,e);const v=n.getAttribute("alt")||"";if(Pn(v))return v;const E=n.getAttribute("title")||"";return Pn(E)?E:"Submit"}if(!r&&o==="BUTTON"){e.visitedElements.add(n);const w=n.labels||[];if(w.length)return Ra(w,e)}if(!r&&o==="OUTPUT"){e.visitedElements.add(n);const w=n.labels||[];return w.length?Ra(w,e):n.getAttribute("title")||""}if(!r&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const w=n.labels||[];if(w.length)return Ra(w,e);const v=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",E=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!v||x?x:E}if(!r&&o==="FIELDSET"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(Xe(v)==="LEGEND")return yn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:ln(v)}});return n.getAttribute("title")||""}if(!r&&o==="FIGURE"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(Xe(v)==="FIGCAPTION")return yn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:ln(v)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const w=n.getAttribute("alt")||"";return Pn(w)?w:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(Xe(v)==="CAPTION")return yn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:ln(v)}});const w=n.getAttribute("summary")||"";if(w)return w}if(o==="AREA"){e.visitedElements.add(n);const w=n.getAttribute("alt")||"";return Pn(w)?w:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(Xe(w)==="TITLE"&&w.ownerSVGElement)return yn(w,{...i,embeddedInLabelledBy:{element:w,hidden:ln(w)}})}if(n.ownerSVGElement&&o==="A"){const w=n.getAttribute("xlink:title")||"";if(Pn(w))return e.visitedElements.add(n),w}}const f=o==="SUMMARY"&&!["presentation","none"].includes(l);if(tE(l,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const w=rE(n,i);if(e.embeddedInTargetElement==="self"?Pn(w):w)return w}if(!["presentation","none"].includes(l)||o==="IFRAME"){e.visitedElements.add(n);const w=n.getAttribute("title")||"";if(Pn(w))return w}return e.visitedElements.add(n),""}function rE(n,e){const i=[],r=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const h=((f=zi(o))==null?void 0:f.display)||"inline";let g=yn(o,e);(h!=="inline"||o.nodeName==="BR")&&(g=" "+g+" "),i.push(g)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Qa(n,"::before")||"");const l=Qa(n);if(l!==void 0)i.push(l);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)r(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)r(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)r(u,!0);for(const u of Nr(n,n.getAttribute("aria-owns")))r(u,!0)}}return i.push(Qa(n,"::after")||""),i.join("")}const ud=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function iv(n){return Xe(n)==="OPTION"?n.selected:ud.includes(mt(n)||"")?Wb(n.getAttribute("aria-selected"))===!0:!1}const fd=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function sv(n){const e=hd(n,!0);return e==="error"?!1:e}function aE(n){return hd(n,!0)}function lE(n){return hd(n,!1)}function hd(n,e){const i=Xe(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(fd.includes(mt(n)||"")){const r=n.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const oE=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function cE(n){const e=Xe(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):oE.includes(mt(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const dd=["button"];function rv(n){if(dd.includes(mt(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const pd=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function av(n){if(Xe(n)==="DETAILS")return n.open;if(pd.includes(mt(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const gd=["heading","listitem","row","treeitem"];function lv(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Xe(n)];if(e)return e;if(gd.includes(mt(n)||"")){const i=n.getAttribute("aria-level"),r=i===null?Number.NaN:Number(i);if(Number.isInteger(r)&&r>=1)return r}return 0}const ov=["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 uc(n){return cv(n)||uv(n)}function cv(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Xe(n))&&(n.hasAttribute("disabled")||uE(n)||fE(n))}function uE(n){return Xe(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function fE(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 uv(n,e=!1){if(!n)return!1;if(e||ov.includes(mt(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:uv(bt(n),!0)}return!1}function Ra(n,e){return[...n].map(i=>yn(i,{...e,embeddedInLabel:{element:i,hidden:ln(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function hE(n){const e=_d;let i=n,r;const l=[];for(;i;i=bt(i)){const o=e.get(i);if(o!==void 0){r=o;break}l.push(i);const u=zi(i);if(!u){r=!0;break}const f=u.pointerEvents;if(f){r=f!=="none";break}}r===void 0&&(r=!0);for(const o of l)e.set(o,r);return r}let md,yd,bd,vd,dr,Mi,Sd,wd,xd,_d,fv=0;function vc(){ld(),++fv,md??(md=new Map),yd??(yd=new Map),bd??(bd=new Map),vd??(vd=new Map),dr??(dr=new Map),Mi??(Mi=new Map),Sd??(Sd=new Map),wd??(wd=new Map),xd??(xd=new Map),_d??(_d=new Map)}function Sc(){--fv||(md=void 0,yd=void 0,bd=void 0,vd=void 0,dr=void 0,Mi=void 0,Sd=void 0,wd=void 0,xd=void 0,_d=void 0),od()}const dE={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let pE=0;function hv(n){return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!n.doNotRenderActive,renderCursorPointer:!0}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Ja(n,e){const i=hv(e),r=new Set,l={root:{role:"fragment",name:"",children:[],props:{},box:cc(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};Rh(l.root,n);const o=(f,h,g)=>{if(r.has(h))return;if(r.add(h),h.nodeType===Node.TEXT_NODE&&h.nodeValue){if(!g)return;const x=h.nodeValue;f.role!=="textbox"&&x&&f.children.push(h.nodeValue||"");return}if(h.nodeType!==Node.ELEMENT_NODE)return;const y=h,m=!ln(y);let w=m;if(i.visibility==="ariaOrVisible"&&(w=m||ji(y)),i.visibility==="ariaAndVisible"&&(w=m&&ji(y)),i.visibility==="aria"&&!w)return;const v=[];if(y.hasAttribute("aria-owns")){const x=y.getAttribute("aria-owns").split(/\s+/);for(const _ of x){const N=n.ownerDocument.getElementById(_);N&&v.push(N)}}const E=w?gE(y,i):null;E&&(E.ref&&(l.elements.set(E.ref,y),l.refs.set(y,E.ref),E.role==="iframe"&&l.iframeRefs.push(E.ref)),f.children.push(E)),u(E||f,y,v,w)};function u(f,h,g,y){var E;const w=(((E=zi(h))==null?void 0:E.display)||"inline")!=="inline"||h.nodeName==="BR"?" ":"";w&&f.children.push(w),f.children.push(Qa(h,"::before")||"");const v=h.nodeName==="SLOT"?h.assignedNodes():[];if(v.length)for(const x of v)o(f,x,y);else{for(let x=h.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,y);if(h.shadowRoot)for(let x=h.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,y)}for(const x of g)o(f,x,y);if(f.children.push(Qa(h,"::after")||""),w&&f.children.push(w),f.children.length===1&&f.name===f.children[0]&&(f.children=[]),f.role==="link"&&h.hasAttribute("href")){const x=h.getAttribute("href");f.props.url=x}if(f.role==="textbox"&&h.hasAttribute("placeholder")&&h.getAttribute("placeholder")!==f.name){const x=h.getAttribute("placeholder");f.props.placeholder=x}}vc();try{o(l.root,n,!0)}finally{Sc()}return yE(l.root),mE(l.root),l}function w0(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;const i=Ed(n);let r=i._ariaRef;(!r||r.role!==n.role||r.name!==n.name)&&(r={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++pE},i._ariaRef=r),n.ref=r.ref}function gE(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const g={role:"iframe",name:"",children:[],props:{},box:cc(n),receivesPointerEvents:!0,active:i};return Rh(g,n),w0(g,e),g}const r=e.includeGenericRole?"generic":null,l=mt(n)??r;if(!l||l==="presentation"||l==="none")return null;const o=At(sl(n,!1)||""),u=hE(n),f=cc(n);if(l==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const h={role:l,name:o,children:[],props:{},box:f,receivesPointerEvents:u,active:i};return Rh(h,n),w0(h,e),fd.includes(l)&&(h.checked=sv(n)),ov.includes(l)&&(h.disabled=uc(n)),pd.includes(l)&&(h.expanded=av(n)),gd.includes(l)&&(h.level=lv(n)),dd.includes(l)&&(h.pressed=rv(n)),ud.includes(l)&&(h.selected=iv(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(h.children=[n.value]),h}function mE(n){const e=i=>{const r=[];for(const o of i.children||[]){if(typeof o=="string"){r.push(o);continue}const u=e(o);r.push(...u)}return i.role==="generic"&&!i.name&&r.length<=1&&r.every(o=>typeof o!="string"&&!!o.ref)?r:(i.children=r,[i])};e(n)}function yE(n){const e=(r,l)=>{if(!r.length)return;const o=At(r.join(""));o&&l.push(o),r.length=0},i=r=>{const l=[],o=[];for(const u of r.children||[])typeof u=="string"?o.push(u):(e(o,l),i(u),l.push(u));e(o,l),r.children=l.length?l:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};i(n)}function bE(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function x0(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=vE(e);return i?!!n.match(i):!1}const fh=Symbol("cachedRegex");function vE(n){if(n[fh]!==void 0)return n[fh];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let r;try{r=i?new RegExp(e.slice(1,-1)):null}catch{r=null}return n[fh]=r,r}function SE(n,e){const i=Ja(n,{mode:"expect"});return{matches:dv(i.root,e,!1,!1),received:{raw:Pa(i,{mode:"expect"}),regex:Pa(i,{mode:"codegen"})}}}function wE(n,e){const i=Ja(n,{mode:"expect"}).root;return dv(i,e,!0,!1).map(l=>Ed(l))}function Td(n,e,i){var r;return typeof n=="string"&&e.kind==="text"?x0(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||!bE(n.name,e.name)||!x0(n.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?T0(n.children||[],e.children||[]):e.containerMode==="equal"?_0(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?_0(n.children||[],e.children||[],!0):T0(n.children||[],e.children||[])}function _0(n,e,i){if(e.length!==n.length)return!1;for(let r=0;r<e.length;++r)if(!Td(n[r],e[r],i))return!1;return!0}function T0(n,e){if(e.length>n.length)return!1;const i=n.slice(),r=e.slice();for(const l of r){let o=i.shift();for(;o&&!Td(o,l,!1);)o=i.shift();if(!o)return!1}return!0}function dv(n,e,i,r){const l=[],o=(u,f)=>{if(Td(u,e,r)){const h=typeof u=="string"?f:u;return h&&l.push(h),!i}if(typeof u=="string")return!1;for(const h of u.children||[])if(o(h,u))return!0;return!1};return o(n,null),l}function pv(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"&&pv(i,e);return e}function xE(n,e){var o;const i=pv(e==null?void 0:e.root),r=new Map,l=(u,f)=>{let h=u.children.length===(f==null?void 0:f.children.length)&&VT(u,f),g=h;for(let y=0;y<u.children.length;y++){const m=u.children[y],w=f==null?void 0:f.children[y];if(typeof m=="string")h&&(h=m===w),g&&(g=m===w);else{let v=typeof w!="string"?w:void 0;m.ref&&(v=i.get(m.ref));const E=l(m,v);(!v||!E&&!m.ref||v!==w)&&(g=!1),h&&(h=E&&v===w)}}return r.set(u,h?"same":g?"skip":"changed"),h};return l(n.root,i.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),r}function _E(n,e){const i=[],r=l=>{const o=e.get(l);if(o!=="same")if(o==="skip")for(const u of l.children)typeof u!="string"&&r(u);else i.push(l)};for(const l of n)typeof l=="string"?i.push(l):r(l);return i}function Pa(n,e,i){const r=hv(e),l=[],o=r.renderStringsAsRegex?EE:()=>!0,u=r.renderStringsAsRegex?TE:v=>v;let f=n.root.role==="fragment"?n.root.children:[n.root];const h=xE(n,i);i&&(f=_E(f,h));const g=(v,E)=>{const x=ch(u(v));x&&l.push(E+"- text: "+x)},y=(v,E)=>{let x=v.role;if(v.name&&v.name.length<=900){const _=u(v.name);if(_){const N=_.startsWith("/")&&_.endsWith("/")?_:JSON.stringify(_);x+=" "+N}}return v.checked==="mixed"&&(x+=" [checked=mixed]"),v.checked===!0&&(x+=" [checked]"),v.disabled&&(x+=" [disabled]"),v.expanded&&(x+=" [expanded]"),v.active&&r.renderActive&&(x+=" [active]"),v.level&&(x+=` [level=${v.level}]`),v.pressed==="mixed"&&(x+=" [pressed=mixed]"),v.pressed===!0&&(x+=" [pressed]"),v.selected===!0&&(x+=" [selected]"),v.ref&&(x+=` [ref=${v.ref}]`,E&&lc(v)&&(x+=" [cursor=pointer]")),x},m=v=>(v==null?void 0:v.children.length)===1&&typeof v.children[0]=="string"&&!Object.keys(v.props).length?v.children[0]:void 0,w=(v,E,x)=>{if(h.get(v)==="same"&&v.ref){l.push(E+`- ref=${v.ref} [unchanged]`);return}const _=!!i&&!E,N=E+"- "+(_?"<changed> ":"")+XT(y(v,x)),C=m(v);if(!v.children.length&&!Object.keys(v.props).length)l.push(N);else if(C!==void 0)o(v,C)?l.push(N+": "+ch(u(C))):l.push(N);else{l.push(N+":");for(const[D,K]of Object.entries(v.props))l.push(E+"  - /"+D+": "+ch(K));const $=E+"  ",I=!!v.ref&&x&&lc(v);for(const D of v.children)typeof D=="string"?g(o(v,D)?D:"",$):w(D,$,x&&!I)}};for(const v of f)typeof v=="string"?g(v,""):w(v,"",!!r.renderCursorPointer);return l.join(`
`)}function TE(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="",r=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],h=u.slice(0,-2);i+=rc(n.slice(r,f));for(let g=0;g<h.length;g++)if(h[g]){const{replacement:y}=e[g];i+=y;break}return r=f+o.length,o}),i?(i+=rc(n.slice(r)),String(new RegExp(i))):n}function EE(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?l_(e,n.name):"";let r=e;for(;i&&r.includes(i);)r=r.replace(i,"");return r.trim().length/e.length>.1}const gv=Symbol("element");function Ed(n){return n[gv]}function Rh(n,e){n[gv]=e}function AE(n,e){const i=YT(n,e);return i?Ed(i):void 0}const E0=":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 hh{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 r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(E0),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=E0,this._glassPaneShadow.appendChild(r)}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),r=Oi(this._language,An(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:r+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 r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(i=r.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(r=>({element:r,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);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:r})}for(const i of this._renderedEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:r,anchorTop:l}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=l,i.tooltipLeft=r}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const r=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=r.x+"px",i.highlightElement.style.top=r.y+"px",i.highlightElement.style.width=r.width+"px",i.highlightElement.style.height=r.height+"px",i.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:r.x,y:r.y,width:r.width,height:r.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 r=i.offsetWidth,l=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+r>o-5&&(f=o-r-5);let h=Math.max(0,e.bottom)+5;return h+l>u-5&&(Math.max(0,e.top)>l+5?h=Math.max(0,e.top)-l-5:h=u-5-l),{anchorLeft:f,anchorTop:h}}_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 r=this._renderedEntries[i].box;if(!r)return!1;const l=e[i].element.getBoundingClientRect();if(l.top!==r.top||l.right!==r.right||l.bottom!==r.bottom||l.left!==r.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 NE(n,e,i){const r=n.left-e.right;if(!(r<0||i!==void 0&&r>i))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function CE(n,e,i){const r=e.left-n.right;if(!(r<0||i!==void 0&&r>i))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function kE(n,e,i){const r=e.top-n.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function ME(n,e,i){const r=n.top-e.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function OE(n,e,i){const r=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>r?void 0:l}const jE=["left-of","right-of","above","below","near"];function mv(n,e,i,r){const l=e.getBoundingClientRect(),o={"left-of":CE,"right-of":NE,above:kE,below:ME,near:OE}[n];let u;for(const f of i){if(f===e)continue;const h=o(l,f.getBoundingClientRect(),r);h!==void 0&&(u===void 0||h<u)&&(u=h)}return u}function yv(n,e){for(const i of e.jsonPath)n!=null&&(n=n[i]);return bv(n,e)}function bv(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?r instanceof RegExp?typeof i=="string"&&!!i.match(r):i===r:typeof i!="string"||typeof r!="string"?!1:e.op==="*="?i.includes(r):e.op==="^="?i.startsWith(r):e.op==="$="?i.endsWith(r):e.op==="|="?i===r||i.startsWith(r+"-"):e.op==="~="?i.split(" ").includes(r):!1}function Ad(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Ut(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!Ad(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:At(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||"",r+=l.nodeValue||"";else{if(l.nodeType===Node.COMMENT_NODE)continue;r&&i.immediate.push(r),r="",l.nodeType===Node.ELEMENT_NODE&&(i.full+=Ut(n,l).full)}r&&i.immediate.push(r),e.shadowRoot&&(i.full+=Ut(n,e.shadowRoot).full),i.full&&(i.normalized=At(i.full))}}n.set(e,i)}return i}function wc(n,e,i){if(Ad(e)||!i(Ut(n,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&i(Ut(n,r)))return"selfAndChildren";return e.shadowRoot&&i(Ut(n,e.shadowRoot))?"selfAndChildren":"self"}function vv(n,e){const i=nv(e);if(i)return i.map(o=>Ut(n,o));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:At(r),immediate:[r]}];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=>Ut(n,u))}return[]}function A0(n){return n.displayName||n.name||"Anonymous"}function LE(n){if(n.type)switch(typeof n.type){case"function":return A0(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?A0(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 RE(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function DE(n){if(n.child){const i=[];for(let r=n.child;r;r=r.sibling)i.push(r);return i}if(!n._currentElement)return[];const e=i=>{var l;const r=(l=i._currentElement)==null?void 0:l.type;return typeof r=="function"||typeof r=="string"};if(n._renderedComponent){const i=n._renderedComponent;return e(i)?[i]:[]}return n._renderedChildren?[...Object.values(n._renderedChildren)].filter(e):[]}function zE(n){var r;const e=n.memoizedProps||((r=n._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const i={...e};return delete i.children,i}function Sv(n){var r;const e={key:RE(n),name:LE(n),children:DE(n).map(Sv),rootElements:[],props:zE(n)},i=n.stateNode||n._hostNode||((r=n._renderedComponent)==null?void 0:r._hostNode);if(i instanceof Element)e.rootElements.push(i);else for(const l of e.children)e.rootElements.push(...l.rootElements);return e}function wv(n,e,i=[]){e(n)&&i.push(n);for(const r of n.children)wv(r,e,i);return i}function xv(n,e=[]){const r=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const l=r.currentNode,o=l,u=Object.keys(o).find(h=>h.startsWith("__reactContainer")&&o[h]!==null);if(u)e.push(o[u].stateNode.current);else{const h="_reactRootContainer";o.hasOwnProperty(h)&&o[h]!==null&&e.push(o[h]._internalRoot.current)}if(l instanceof Element&&l.hasAttribute("data-reactroot"))for(const h of Object.keys(l))(h.startsWith("__reactInternalInstance")||h.startsWith("__reactFiber"))&&e.push(l[h]);const f=l instanceof Element?l.shadowRoot:null;f&&xv(f,e)}while(r.nextNode());return e}const BE=()=>({queryAll(n,e){const{name:i,attributes:r}=ds(e,!1),u=xv(n.ownerDocument||n).map(h=>Sv(h)).map(h=>wv(h,g=>{const y=g.props??{};if(g.key!==void 0&&(y.key=g.key),i&&g.name!==i||g.rootElements.some(m=>!il(n,m)))return!1;for(const m of r)if(!yv(y,m))return!1;return!0})).flat(),f=new Set;for(const h of u)for(const g of h.rootElements)f.add(g);return[...f]}}),_v=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];_v.sort();function Da(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function rr(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 ar(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function UE(n,e){const i={role:e};for(const r of n)switch(r.name){case"checked":{Da(r.name,fd,e),rr(r,[!0,!1,"mixed"]),ar(r,["<truthy>","="]),i.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Da(r.name,dd,e),rr(r,[!0,!1,"mixed"]),ar(r,["<truthy>","="]),i.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Da(r.name,ud,e),rr(r,[!0,!1]),ar(r,["<truthy>","="]),i.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Da(r.name,pd,e),rr(r,[!0,!1]),ar(r,["<truthy>","="]),i.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Da(r.name,gd,e),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');i.level=r.value;break}case"disabled":{rr(r,[!0,!1]),ar(r,["<truthy>","="]),i.disabled=r.op==="<truthy>"?!0:r.value;break}case"name":{if(r.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');i.name=r.value,i.nameOp=r.op,i.exact=r.caseSensitive;break}case"include-hidden":{rr(r,[!0,!1]),ar(r,["<truthy>","="]),i.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${_v.map(l=>`"${l}"`).join(", ")}.`)}return i}function HE(n,e,i){const r=[],l=u=>{if(mt(u)===e.role&&!(e.selected!==void 0&&iv(u)!==e.selected)&&!(e.checked!==void 0&&sv(u)!==e.checked)&&!(e.pressed!==void 0&&rv(u)!==e.pressed)&&!(e.expanded!==void 0&&av(u)!==e.expanded)&&!(e.level!==void 0&&lv(u)!==e.level)&&!(e.disabled!==void 0&&uc(u)!==e.disabled)&&!(!e.includeHidden&&ln(u))){if(e.name!==void 0){const f=At(sl(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=At(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!bv(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const h of u.querySelectorAll("*"))l(h),h.shadowRoot&&f.push(h.shadowRoot);f.forEach(o)};return o(n),r}function N0(n){return{queryAll:(e,i)=>{const r=ds(i,!0),l=r.name.toLowerCase();if(!l)throw new Error("Role must not be empty");const o=UE(r.attributes,l);vc();try{return HE(e,o,n)}finally{Sc()}}}}class qE{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",VE),this._engines.set("is",Ia),this._engines.set("where",Ia),this._engines.set("has",$E),this._engines.set("scope",IE),this._engines.set("light",GE),this._engines.set("visible",KE),this._engines.set("text",YE),this._engines.set("text-is",XE),this._engines.set("text-matches",FE),this._engines.set("has-text",QE),this._engines.set("right-of",za("right-of")),this._engines.set("left-of",za("left-of")),this._engines.set("above",za("above")),this._engines.set("below",za("below")),this._engines.set("near",za("near")),this._engines.set("nth-match",JE);const e=[...this._engines.keys()];e.sort();const i=[...Tb];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,r,l){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(h=>r.every((g,y)=>h.rest[y]===g));if(u)return u.result;const f=l();return o.push({rest:r,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,r){const l=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[l,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(l)?this._matchesEngine(Ia,e,l,r):(this._hasScopeClause(l)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,l.simples[l.simples.length-1].selector,r)?this._matchesParents(e,l,l.simples.length-2,r):!1))}finally{this.end()}}query(e,i){const r=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Ia,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const l=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,r.simples[r.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,r,r.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const h=this._scoreMap.get(u),g=this._scoreMap.get(f);return h===g?0:h===void 0?1:g===void 0?-1:h-g}),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(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=bt(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,r){return this._cached(this._cacheMatchesSimple,e,[i,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.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,r))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=i.css;const l=i.functions;r==="*"&&l.length&&(r=void 0);let o,u=-1;r!==void 0?o=this._queryCSS(e,r):(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 h=this._getEngine(l[f].name);h.matches!==void 0&&(o=o.filter(g=>this._matchesEngine(h,g,l[f].args,e)))}for(let f=0;f<l.length;f++){if(f===u)continue;const h=this._getEngine(l[f].name);h.matches===void 0&&(o=o.filter(g=>this._matchesEngine(h,g,l[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,r,l){return r<0?!0:this._cached(this._cacheMatchesParents,e,[i,r,l.scope,l.pierceShadow,l.originalScope],()=>{const{selector:o,combinator:u}=i.simples[r];if(u===">"){const f=jo(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,r-1,l)}if(u==="+"){const f=dh(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,r-1,l)}if(u===""){let f=jo(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="")break}f=jo(f,l)}return!1}if(u==="~"){let f=dh(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="~")break}f=dh(f,l)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="")break}f=jo(f,l)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,r,l){if(e.matches)return this._callMatches(e,i,r,l);if(e.query)return this._callQuery(e,r,l).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,r){if(e.query)return this._callQuery(e,r,i);if(e.matches)return this._queryCSS(i,"*").filter(l=>this._callMatches(e,l,r,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,r,l){return this._cached(this._cacheCallMatches,i,[e,l.scope,l.pierceShadow,l.originalScope,...r],()=>e.matches(i,r,l,this))}_callQuery(e,i,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...i],()=>e.query(r,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 r=[];function l(o){if(r=r.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),r})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const Ia={matches(n,e,i,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(l=>r.matches(n,l,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const l of e)r=r.concat(i.query(n,l));return e.length===1?r:Tv(r)}},$E={matches(n,e,i,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...i,scope:n},e).length>0}},IE={matches(n,e,i,r){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 r=n.originalScope||n.scope;if(r.nodeType===9){const l=r.documentElement;return l?[l]:[]}return r.nodeType===1?[r]:[]}},VE={matches(n,e,i,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(n,e,i)}},GE={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,r){return r.matches(n,e,{...i,pierceShadow:!1})}},KE={matches(n,e,i,r){if(e.length)throw new Error('"visible" engine expects no arguments');return ji(n)}},YE={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const l=At(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(l);return wc(r._cacheText,n,o)==="self"}},XE={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const l=At(e[0]),o=u=>!l&&!u.immediate.length?!0:u.immediate.some(f=>At(f)===l);return wc(r._cacheText,n,o)!=="none"}},FE={matches(n,e,i,r){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 wc(r._cacheText,n,o)==="self"}},QE={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(Ad(n))return!1;const l=At(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(l))(Ut(r._cacheText,n))}};function za(n){return{matches(e,i,r,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(r,u),h=mv(n,e,f,o);return h===void 0?!1:(l._markScore(e,h),!0)}}}const JE={query(n,e,i){let r=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 r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const l=Ia.query(n,e.slice(0,e.length-1),i);return r--,r<l.length?[l[r]]:[]}};function jo(n,e){if(n!==e.scope)return e.pierceShadow?bt(n):n.parentElement||void 0}function dh(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function Tv(n){const e=new Map,i=[],r=[];function l(u){let f=e.get(u);if(f)return f;const h=bt(u);return h?l(h).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&&r.push(u),f.children.length>1){const h=new Set(f.children);f.children=[];let g=u.firstElementChild;for(;g&&f.children.length<h.size;)h.has(g)&&f.children.push(g),g=g.nextElementSibling;for(g=u.shadowRoot?u.shadowRoot.firstElementChild:null;g&&f.children.length<h.size;)h.has(g)&&f.children.push(g),g=g.nextElementSibling}f.children.forEach(o)}return i.forEach(o),r}const Ev=10,Cr=Ev/2,C0=1,PE=2,ZE=10,WE=50,Av=100,Nv=120,Cv=140,kv=160,Fo=180,Mv=200,k0=250,eA=Nv+Cr,tA=Cv+Cr,nA=Av+Cr,iA=kv+Cr,sA=Fo+Cr,rA=Mv+Cr,aA=300,lA=500,Ov=510,ph=520,jv=530,Dh=1e4,oA=1e7,cA=1e3;function M0(n,e,i){n._evaluator.begin();const r={allowText:new Map,disallowText:new Map};vc(),ld();try{let l=[];if(i.forTextExpect){let f=Va(n,e.ownerDocument.documentElement,i);for(let h=e;h;h=bt(h)){const g=rs(r,n,h,{...i,noText:!0});if(!g)continue;if(as(g)<=cA){f=g;break}}l=[Qo(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=$a(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&ji(f)&&(e=f)}if(i.multiple){const f=rs(r,n,e,i),h=rs(r,n,e,{...i,noText:!0});let g=[f,h];if(r.allowText.clear(),r.disallowText.clear(),f&&gh(f)&&g.push(rs(r,n,e,{...i,noCSSId:!0})),h&&gh(h)&&g.push(rs(r,n,e,{...i,noText:!0,noCSSId:!0})),g=g.filter(Boolean),!g.length){const y=Va(n,e,i);g.push(y),gh(y)&&g.push(Va(n,e,{...i,noCSSId:!0}))}l=[...new Set(g.map(y=>Qo(y)))]}else{const f=rs(r,n,e,i)||Va(n,e,i);l=[Qo(f)]}}const o=l[0],u=n.parseSelector(o);return{selector:o,selectors:l,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{od(),Sc(),n._evaluator.end()}}function rs(n,e,i,r){if(r.root&&!il(r.root,i))throw new Error("Target element must belong to the root's subtree");if(i===r.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||as(f)<as(l))&&(l=f)},u=[];if(!r.noText)for(const f of fA(e,i,!r.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of uA(e,i,r))r.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,h)=>as(f.candidate)-as(h.candidate));for(const{candidate:f,isTextCandidate:h}of u){const g=e.querySelectorAll(e.parseSelector(Qo(f)),r.root??i.ownerDocument);if(!g.includes(i))continue;if(g.length===1){o(f);break}const y=g.indexOf(i);if(!(y>5)&&(o([...f,{engine:"nth",selector:String(y),score:Dh}]),!r.isRecursive))for(let m=bt(i);m&&m!==r.root;m=bt(m)){const w=g.filter($=>il(m,$)&&$!==m),v=w.indexOf(i);if(w.length>5||v===-1||v===y&&w.length>1)continue;const E=w.length===1?f:[...f,{engine:"nth",selector:String(v),score:Dh}];if(l&&as([{engine:"",selector:"",score:1},...E])>=as(l))continue;const _=!!r.noText||h,N=_?n.disallowText:n.allowText;let C=N.get(m);C===void 0&&(C=rs(n,e,m,{...r,isRecursive:!0,noText:_})||Va(e,m,r),N.set(m,C)),C&&o([...C,...E])}}return l}function uA(n,e,i){const r=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&r.push({engine:"css",selector:`[${u}=${fr(e.getAttribute(u))}]`,score:PE});if(!i.noCSSId){const u=e.getAttribute("id");u&&!hA(u)&&r.push({engine:"css",selector:Lv(u),score:lA})}r.push({engine:"css",selector:Zn(e),score:jv})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&r.push({engine:"css",selector:`${Zn(e)}[${u}=${fr(e.getAttribute(u))}]`,score:ZE});return e.getAttribute(i.testIdAttributeName)&&r.push({engine:"css",selector:`[${i.testIdAttributeName}=${fr(e.getAttribute(i.testIdAttributeName))}]`,score:C0}),zh([r]),r}if(e.getAttribute(i.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${Tt(e.getAttribute(i.testIdAttributeName),!0)}]`,score:C0}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Tt(u.placeholder,!0)}]`,score:eA});for(const f of pr(u.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Tt(f.text,!1)}]`,score:Nv-f.scoreBonus})}}const l=vv(n._evaluator._cacheText,e);for(const u of l){const f=u.normalized;r.push({engine:"internal:label",selector:zt(f,!0),score:tA});for(const h of pr(f))r.push({engine:"internal:label",selector:zt(h.text,!1),score:Cv-h.scoreBonus})}const o=mt(e);return o&&!["none","presentation"].includes(o)&&r.push({engine:"internal:role",selector:o,score:Ov}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&r.push({engine:"css",selector:`${Zn(e)}[name=${fr(e.getAttribute("name"))}]`,score:ph}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${Zn(e)}[type=${fr(e.getAttribute("type"))}]`,score:ph}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:Zn(e),score:ph+1}),zh([r]),r}function fA(n,e,i){if(e.nodeName==="SELECT")return[];const r=[],l=e.getAttribute("title");if(l){r.push([{engine:"internal:attr",selector:`[title=${Tt(l,!0)}]`,score:rA}]);for(const g of pr(l))r.push([{engine:"internal:attr",selector:`[title=${Tt(g.text,!1)}]`,score:Mv-g.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Tt(o,!0)}]`,score:iA}]);for(const g of pr(o))r.push([{engine:"internal:attr",selector:`[alt=${Tt(g.text,!1)}]`,score:kv-g.scoreBonus}])}const u=Ut(n._evaluator._cacheText,e).normalized,f=u?pr(u):[];if(u){if(i){u.length<=80&&r.push([{engine:"internal:text",selector:zt(u,!0),score:sA}]);for(const y of f)r.push([{engine:"internal:text",selector:zt(y.text,!1),score:Fo-y.scoreBonus}])}const g={engine:"css",selector:Zn(e),score:jv};for(const y of f)r.push([g,{engine:"internal:has-text",selector:zt(y.text,!1),score:Fo-y.scoreBonus}]);if(i&&u.length<=80){const y=new RegExp("^"+rc(u)+"$");r.push([g,{engine:"internal:has-text",selector:zt(y,!1),score:k0}])}}const h=mt(e);if(h&&!["none","presentation"].includes(h)){const g=sl(e,!1);if(g&&!g.match(new RegExp("^\\p{Co}+$","u"))){const y={engine:"internal:role",selector:`${h}[name=${Tt(g,!0)}]`,score:nA};r.push([y]);for(const m of pr(g))r.push([{engine:"internal:role",selector:`${h}[name=${Tt(m.text,!1)}]`,score:Av-m.scoreBonus}])}else{const y={engine:"internal:role",selector:`${h}`,score:Ov};for(const m of f)r.push([y,{engine:"internal:has-text",selector:zt(m.text,!1),score:Fo-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+rc(u)+"$");r.push([y,{engine:"internal:has-text",selector:zt(m,!1),score:k0}])}}}return zh(r),r}function Lv(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${fr(n)}]`}function gh(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Va(n,e,i){const r=i.root??e.ownerDocument,l=[];function o(f){const h=l.slice();f&&h.unshift(f);const g=h.join(" > "),y=n.parseSelector(g);return n.querySelector(y,r,!1)===e?g:void 0}function u(f){const h={engine:"css",selector:f,score:oA},g=n.parseSelector(f),y=n.querySelectorAll(g,r);if(y.length===1)return[h];const m={engine:"nth",selector:String(y.indexOf(e)),score:Dh};return[h,m]}for(let f=e;f&&f!==r;f=bt(f)){let h="";if(f.id&&!i.noCSSId){const m=Lv(f.id),w=o(m);if(w)return u(w);h=m}const g=f.parentNode,y=[...f.classList].map(dA);for(let m=0;m<y.length;++m){const w="."+y.slice(0,m+1).join("."),v=o(w);if(v)return u(v);!h&&g&&g.querySelectorAll(w).length===1&&(h=w)}if(g){const m=[...g.children],w=f.nodeName,E=m.filter(_=>_.nodeName===w).indexOf(f)===0?Zn(f):`${Zn(f)}:nth-child(${1+m.indexOf(f)})`,x=o(E);if(x)return u(x);h||(h=E)}else h||(h=Zn(f));l.unshift(h)}return u(o())}function zh(n){for(const e of n)for(const i of e)i.score>WE&&i.score<aA&&(i.score+=Math.min(Ev,i.selector.length/10|0))}function Qo(n){const e=[];let i="";for(const{engine:r,selector:l}of n)e.length&&(i!=="css"||r!=="css"||l.startsWith(":nth-match("))&&e.push(">>"),i=r,r==="css"?e.push(l):e.push(`${r}=${l}`);return e.join(" ")}function as(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function hA(n){let e,i=0;for(let r=0;r<n.length;++r){const l=n[r];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 Lo(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function pr(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),r=i?i[1].length:0;if(r){const l=Lo(n.substring(r).trimStart(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),r=i?i[1].length:0;if(r){const l=Lo(n.substring(0,n.length-r).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:Lo(n,80),scoreBonus:0}),e.push({text:Lo(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function Zn(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function dA(n){let e="";for(let i=0;i<n.length;i++)e+=pA(n,i);return e}function pA(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 Rv(n,e){const i=n.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=i.substring(i.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function gA(n,e){return e?e.toUpperCase():""}const mA=/(?:^|[-_/])(\w)/g,Dv=n=>n&&n.replace(mA,gA);function yA(n){function e(y){const m=y.name||y._componentTag||y.__playwright_guessedName;if(m)return m;const w=y.__file;if(w)return Dv(Rv(w,".vue"))}function i(y,m){return y.type.__playwright_guessedName=m,m}function r(y){var w,v,E,x;const m=e(y.type||{});if(m)return m;if(y.root===y)return"Root";for(const _ in(v=(w=y.parent)==null?void 0:w.type)==null?void 0:v.components)if(((E=y.parent)==null?void 0:E.type.components[_])===y.type)return i(y,_);for(const _ in(x=y.appContext)==null?void 0:x.components)if(y.appContext.components[_]===y.type)return i(y,_);return"Anonymous Component"}function l(y){return y._isBeingDestroyed||y.isUnmounted}function o(y){return y.subTree.type.toString()==="Symbol(Fragment)"}function u(y){const m=[];return y.component&&m.push(y.component),y.suspense&&m.push(...u(y.suspense.activeBranch)),Array.isArray(y.children)&&y.children.forEach(w=>{w.component?m.push(w.component):m.push(...u(w))}),m.filter(w=>{var v;return!l(w)&&!((v=w.type.devtools)!=null&&v.hide)})}function f(y){return o(y)?h(y.subTree):[y.subTree.el]}function h(y){if(!y.children)return[];const m=[];for(let w=0,v=y.children.length;w<v;w++){const E=y.children[w];E.component?m.push(...f(E.component)):E.el&&m.push(E.el)}return m}function g(y){return{name:r(y),children:u(y.subTree).map(g),rootElements:f(y),props:y.props}}return g(n)}function bA(n){function e(o){const u=o.displayName||o.name||o._componentTag;if(u)return u;const f=o.__file;if(f)return Dv(Rv(f,".vue"))}function i(o){const u=e(o.$options||o.fnOptions||{});return u||(o.$root===o?"Root":"Anonymous Component")}function r(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:r(o).map(l),rootElements:[o.$el],props:o._props}}return l(n)}function zv(n,e,i=[]){e(n)&&i.push(n);for(const r of n.children)zv(r,e,i);return i}function Bv(n,e=[]){const r=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),l=new Set;do{const o=r.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&&Bv(u,e)}while(r.nextNode());for(const o of l)e.push({version:2,root:o});return e}const vA=()=>({queryAll(n,e){const i=n.ownerDocument||n,{name:r,attributes:l}=ds(e,!1),f=Bv(i).map(g=>g.version===3?yA(g.root):bA(g.root)).map(g=>zv(g,y=>{if(r&&y.name!==r||y.rootElements.some(m=>!il(n,m)))return!1;for(const m of l)if(!yv(y.props,m))return!1;return!0})).flat(),h=new Set;for(const g of f)for(const y of g.rootElements)h.add(y);return[...h]}}),O0={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],r=n.ownerDocument||n;if(!r)return i;const l=r.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 Nd(n,e,i){return`internal:attr=[${n}=${Tt(e,(i==null?void 0:i.exact)||!1)}]`}function SA(n,e){return`internal:testid=[${n}=${Tt(e,!0)}]`}function wA(n,e){return"internal:label="+zt(n,!!(e!=null&&e.exact))}function xA(n,e){return Nd("alt",n,e)}function _A(n,e){return Nd("title",n,e)}function TA(n,e){return Nd("placeholder",n,e)}function EA(n,e){return"internal:text="+zt(n,!!(e!=null&&e.exact))}function AA(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",Tt(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([r,l])=>`[${r}=${l}]`).join("")}`}const Ba=Symbol("selector"),NA=class Ga{constructor(e,i,r){if(r!=null&&r.hasText&&(i+=` >> internal:has-text=${zt(r.hasText,!1)}`),r!=null&&r.hasNotText&&(i+=` >> internal:has-not-text=${zt(r.hasNotText,!1)}`),r!=null&&r.has&&(i+=" >> internal:has="+JSON.stringify(r.has[Ba])),r!=null&&r.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(r.hasNot[Ba])),(r==null?void 0:r.visible)!==void 0&&(i+=` >> visible=${r.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 Ga(e,l?l+" >> "+u:u,f),o.getByTestId=u=>o.locator(SA(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(xA(u,f)),o.getByLabel=(u,f)=>o.locator(wA(u,f)),o.getByPlaceholder=(u,f)=>o.locator(TA(u,f)),o.getByText=(u,f)=>o.locator(EA(u,f)),o.getByTitle=(u,f)=>o.locator(_A(u,f)),o.getByRole=(u,f={})=>o.locator(AA(u,f)),o.filter=u=>new Ga(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 Ga(e,l+" >> internal:and="+JSON.stringify(u[Ba])),o.or=u=>new Ga(e,l+" >> internal:or="+JSON.stringify(u[Ba]))}};let CA=NA;class kA{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 CA(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 r=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(r,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 r=this._injectedScript.generateSelectorSimple(e);return Oi(i||"javascript",r)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function MA(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function OA(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function jA(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function LA(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function RA(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}const Uv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function DA(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 zA(n,e){const i=atob(n),r=new Uint8Array(i.length);for(let l=0;l<i.length;l++)r[l]=i.charCodeAt(l);return new e(r.buffer)}function Bh(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 r=new Error(n.e.m);return r.name=n.e.n,r.stack=n.e.s,r}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const r=[];i.set(n.id,r);for(const l of n.a)r.push(Bh(l,e,i));return r}if("o"in n){const r={};i.set(n.id,r);for(const{k:l,v:o}of n.o)l!=="__proto__"&&(r[l]=Bh(o,e,i));return r}if("h"in n)return e[n.h];if("ta"in n)return zA(n.ta.b,Uv[n.ta.k])}return n}}function BA(n,e){return Uh(n,e,{visited:new Map,lastId:0})}function Uh(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 Hv(n,e,i)}function Hv(n,e,i){var o;const r=e(n);if("fallThrough"in r)n=r.fallThrough;else return r;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(LA(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(OA(n))return{d:n.toJSON()};if(jA(n))return{u:n.toJSON()};if(MA(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(Uv))if(RA(n,f))return{ta:{b:DA(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 h=0;h<n.length;++h)u.push(Uh(n[h],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const g of Object.keys(n)){let y;try{y=n[g]}catch{continue}g==="toJSON"&&typeof y=="function"?u.push({k:g,v:{o:[],id:0}}):u.push({k:g,v:Uh(y,e,i)})}let h;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(h={value:n.toJSON()})}catch{}return h?Hv(h.value,e,i):{o:u,id:f}}}class UA{constructor(e,i){var r,l,o,u,f,h,g,y;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.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:(h=e.cancelAnimationFrame)==null?void 0:h.bind(e),requestIdleCallback:(g=e.requestIdleCallback)==null?void 0:g.bind(e),cancelIdleCallback:(y=e.cancelIdleCallback)==null?void 0:y.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,r,l,...o){const u=o.slice(0,l),f=o.slice(l),h=[];for(let y=0;y<u.length;y++)h[y]=Bh(u[y],f);let g=this.global.eval(r);return e===!0?g=g(...h):e===!1?g=g:typeof g=="function"&&(g=g(...h)),i?this._promiseAwareJsonValueNoThrow(g):g}jsonValue(e,i){if(i!==void 0)return BA(i,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const i=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return i(r)})():i(e)}}class qv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:Oi,cacheNormalizedWhitespaces:r_,elementText:Ut,getAriaRole:mt,getElementAccessibleDescription:S0,getElementAccessibleName:sl,isElementVisible:ji,isInsideScope:il,normalizeWhiteSpace:At,parseAriaSnapshot:id,generateAriaTree:Ja,findNewElement:AE,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new UA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new qE,this.consoleApi=new kA(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",O0),this._engines.set("xpath:light",O0),this._engines.set("_react",BE()),this._engines.set("_vue",vA()),this._engines.set("role",N0(!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",N0(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:l}of i.customEngines)this._engines.set(r,this.eval(l));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,FT({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=cl(e);return i_(i,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return M0(this,e,i)}generateSelectorSimple(e,i){return M0(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,r){const l=this.querySelectorAll(e,i);if(r&&l.length>1)throw this.strictModeViolationError(e,l);return this.checkDeprecatedSelectorUsage(e,l),l[0]}_queryNth(e,i){const r=[...e];let l=+i.body;return l===-1&&(l=r.length-1),new Set(r.slice(l,l+1))}_queryLayoutSelector(e,i,r){const l=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,r);for(const h of e){const g=mv(l,h,f,o.distance);g!==void 0&&u.push({element:h,score:g})}return u.sort((h,g)=>h.score-g.score),new Set(u.map(h=>h.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 r=Ja(e,i),l=Pa(r,i);let o;if(i.track){const u=this._lastAriaSnapshotForTrack.get(i.track);u&&(o=Pa(r,i,u)),this._lastAriaSnapshotForTrack.set(i.track,r)}return this._lastAriaSnapshotForQuery=r,{full:l,incremental:o,iframeRefs:r.iframeRefs}}ariaSnapshotForRecorder(){const e=Ja(this.document.body,{mode:"ai"});return{ariaSnapshot:Pa(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return wE(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 r={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:An(l)};r.parts.push(o)}return this.querySelectorAll(r,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 r=new Set([i]);for(const l of e.parts)if(l.name==="nth")r=this._queryNth(r,l);else if(l.name==="internal:and"){const o=this.querySelectorAll(l.body.parsed,i);r=new Set(o.filter(u=>r.has(u)))}else if(l.name==="internal:or"){const o=this.querySelectorAll(l.body.parsed,i);r=new Set(Tv(new Set([...r,...o])))}else if(jE.includes(l.name))r=this._queryLayoutSelector(r,l,i);else{const o=new Set;for(const u of r){const f=this._queryEngineAll(l,u);for(const h of f)o.add(h)}r=o}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const r=this._engines.get(e.name).queryAll(i,e.body);for(const l of r)if(!("nodeName"in l))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(l)}`);return r}_createAttributeEngine(e,i){const r=l=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(l)}]`,functions:[]},combinator:""}]}];return{queryAll:(l,o)=>this._evaluator.query({scope:l,pierceShadow:i},r(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}=Do(o,i),h=[];let g=null;const y=w=>{if(f==="lax"&&g&&g.contains(w))return!1;const v=wc(this._evaluator._cacheText,w,u);v==="none"&&(g=w),(v==="self"||v==="selfAndChildren"&&f==="strict"&&!i)&&h.push(w)};l.nodeType===Node.ELEMENT_NODE&&y(l);const m=this._evaluator._queryCSS({scope:l,pierceShadow:e},"*");for(const w of m)y(w);return h}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,l=Ut(this._evaluator._cacheText,r),{matcher:o}=Do(i,!0);return o(l)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,l=Ut(this._evaluator._cacheText,r),{matcher:o}=Do(i,!0);return o(l)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:r}=Do(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>vv(this._evaluator._cacheText,o).some(u=>r(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,r)=>{const l=ds(r,!0);if(l.name||l.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:o,value:u,caseSensitive:f}=l.attributes[0],h=f?null:u.toLowerCase();let g;return u instanceof RegExp?g=m=>!!m.match(u):f?g=m=>m===u:g=m=>m.toLowerCase().includes(h),this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(m=>g(m.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,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,r)=>{if(i.nodeType!==1)return[];const l=r==="true";return ji(i)===l?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,r)=>this.querySelectorAll(r.parsed,i)}}extend(e,i){const r=this.window.eval(`
    (() => {
      const module = {};
      ${e}
      return module.exports.default();
    })()`);return new r(this,i)}async viewportRatio(e){return await new Promise(i=>{const r=new IntersectionObserver(l=>{i(l[0].intersectionRatio),r.disconnect()});r.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=bt(l))if(i.getComputedStyle(l).transform!=="none")return"transformed";const r=i.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,i){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(i==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(i==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),i==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const l=r.closest("label");l&&l.control&&(r=l.control)}return r}async checkElementStates(e,i){if(i.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of i)if(r!=="stable"){const l=this.elementState(e,r);if(l.received==="error:notconnected")return"error:notconnected";if(!l.matches)return{missingState:r}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let r,l=0,o=0;const u=()=>{const m=this.retarget(e,"no-follow-label");if(!m)return"error:notconnected";const w=this.utils.builtins.performance.now();if(this._stableRafCount>1&&w-o<15)return i;o=w;const v=m.getBoundingClientRect(),E={x:v.top,y:v.left,width:v.width,height:v.height};if(r){if(!(E.x===r.x&&E.y===r.y&&E.width===r.width&&E.height===r.height))return!1;if(++l>=this._stableRafCount)return!0}return r=E,i};let f,h;const g=new Promise((m,w)=>{f=m,h=w}),y=()=>{try{const m=u();m!==i?f(m):this.utils.builtins.requestAnimationFrame(y)}catch(m){h(m)}};return this.utils.builtins.requestAnimationFrame(y),g}_createAriaRefEngine(){return{queryAll:(i,r)=>{var o,u;const l=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(r);return l&&l.isConnected?[l]:[]}}}elementState(e,i){const r=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!r||!r.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const l=ji(r);return{matches:i==="visible"?l:!l,received:l?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const l=uc(r);return{matches:i==="disabled"?l:!l,received:l?"disabled":"enabled"}}if(i==="editable"){const l=uc(r),o=cE(r);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=lE(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=r.nodeName==="INPUT"&&r.type==="radio";return{matches:l===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const l=aE(r);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 r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const l=r,o=[...l.options],u=[];let f=i.slice();for(let h=0;h<o.length;h++){const g=o[h],y=m=>{if(m instanceof Node)return g===m;let w=!0;return m.valueOrLabel!==void 0&&(w=w&&(m.valueOrLabel===g.value||m.valueOrLabel===g.label)),m.value!==void 0&&(w=w&&m.value===g.value),m.label!==void 0&&(w=w&&m.label===g.label),m.index!==void 0&&(w=w&&m.index===h),w};if(f.some(y)){if(!this.elementState(g,"enabled").matches)return"error:optionnotenabled";if(u.push(g),l.multiple)f=f.filter(m=>!y(m));else{f=[];break}}}return f.length?"error:optionsnotfound":(l.value=void 0,u.forEach(h=>h.selected=!0),l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.dispatchEvent(new Event("change",{bubbles:!0})),u.map(h=>h.value))}fill(e,i){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const l=r,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(o==="color"&&(i=i.toLowerCase()),u.has(o)){if(i=i.trim(),l.focus(),l.value=i,l.value!==i)throw this.createStacklessError("Malformed value");return r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),r.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(r.nodeName.toLowerCase()!=="textarea"){if(!r.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(r),"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 r=i.ownerDocument.createRange();r.selectNodeContents(i);const l=i.ownerDocument.defaultView.getSelection();return l&&(l.removeAllRanges(),l.addRange(r)),i.focus(),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,r=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:r}}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:r,isFocused:l}=this._activelyFocused(e);if(e.isContentEditable&&!l&&r&&r.blur&&r.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 r=e;if(r.nodeName!=="INPUT")return"Not an <input> element";const l=r;if((l.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.map(h=>{const g=Uint8Array.from(atob(h.buffer),y=>y.charCodeAt(0));return new File([g],h.name,{type:h.mimeType,lastModified:h.lastModifiedMs})}),f=new DataTransfer;for(const h of u)f.items.add(h);l.files=f.files,l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const r=[];let l=i;for(;l;){const y=Kb(l);if(!y||(r.push(y),y.nodeType===9))break;l=y.host}let o;for(let y=r.length-1;y>=0;y--){const m=r[y],w=m.elementsFromPoint(e.x,e.y),v=m.elementFromPoint(e.x,e.y);if(v&&w[0]&&bt(v)===w[0]){const x=this.window.getComputedStyle(v);(x==null?void 0:x.display)==="contents"&&w.unshift(v)}w[0]&&w[0].shadowRoot===m&&w[1]===v&&w.shift();const E=w[0];if(!E||(o=E,y&&E!==r[y-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=o.assignedSlot??bt(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let h,g=i;for(;g;){const y=u.indexOf(g);if(y!==-1){y>1&&(h=this.previewNode(u[y-1]));break}g=bt(g)}return h?{hitTargetDescription:`${f} from ${h} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,r,l){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(r){const y=this.expectHitTarget(r,o);if(y!=="done")return y.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];let f;const h=y=>{if(!u.has(y.type)||!y.isTrusted)return;const m=this.window.TouchEvent&&y instanceof this.window.TouchEvent?y.touches[0]:y;f===void 0&&m&&(f=this.expectHitTarget({x:m.clientX,y:m.clientY},o)),(l||f!=="done"&&f!==void 0)&&(y.preventDefault(),y.stopPropagation(),y.stopImmediatePropagation())},g=()=>(this._hitTargetInterceptor===h&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=h,{stop:g}}dispatchEvent(e,i,r){var u,f,h;let l;const o={bubbles:!0,cancelable:!0,composed:!0,...r};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 g=m=>{var E,x;if(m instanceof Touch)return m;let w=m.pageX;w===void 0&&m.clientX!==void 0&&(w=m.clientX+(((E=this.document.scrollingElement)==null?void 0:E.scrollLeft)||0));let v=m.pageY;return v===void 0&&m.clientY!==void 0&&(v=m.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,m.target??e,m.identifier,w,v,m.screenX,m.screenY,m.radiusX,m.radiusY,m.rotationAngle,m.force)},y=m=>m instanceof TouchList||!m?m:this.document.createTouchList(...m.map(g));o.target??(o.target=e),o.touches=y(o.touches),o.targetTouches=y(o.targetTouches),o.changedTouches=y(o.changedTouches),l=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(g=>g instanceof Touch?g:new Touch({...g,target:g.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(g=>g instanceof Touch?g:new Touch({...g,target:g.target??e})),o.changedTouches=(h=o.changedTouches)==null?void 0:h.map(g=>g instanceof Touch?g:new Touch({...g,target:g.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:g,cancelable:y,alpha:m,beta:w,gamma:v,absolute:E}=o;l=this.document.createEvent("DeviceOrientationEvent"),l.initDeviceOrientationEvent(i,g,y,m,w,v,E)}break;case"devicemotion":try{l=new DeviceMotionEvent(i,o)}catch{const{bubbles:g,cancelable:y,acceleration:m,accelerationIncludingGravity:w,rotationRate:v,interval:E}=o;l=this.document.createEvent("DeviceMotionEvent"),l.initDeviceMotionEvent(i,g,y,m,w,v,E)}break;default:l=new Event(i,o);break}e.dispatchEvent(l)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Ro(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Ro(`<${e.nodeName.toLowerCase()} />`);const i=e,r=[];for(let h=0;h<i.attributes.length;h++){const{name:g,value:y}=i.attributes[h];g!=="style"&&(!y&&this._booleanAttributes.has(g)?r.push(` ${g}`):r.push(` ${g}="${y}"`))}r.sort((h,g)=>h.length-g.length);const l=i0(r.join(""),500);if(this._autoClosingTags.has(i.nodeName))return Ro(`<${i.nodeName.toLowerCase()}${l}/>`);const o=i.childNodes;let u=!1;if(o.length<=5){u=!0;for(let h=0;h<o.length;h++)u=u&&o[h].nodeType===Node.TEXT_NODE}const f=u?i.textContent||"":o.length?"…":"";return Ro(`<${i.nodeName.toLowerCase()}${l}>${i0(f,50)}</${i.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),vc(),ld();try{const i=this._isUtilityWorld&&this._browserName==="firefox"?2:10;return e.slice(0,i).map(l=>({preview:this.previewNode(l),selector:this.generateSelectorSimple(l)})).map((l,o)=>`${o+1}) ${l.preview} aka ${Oi(this._sdkLanguage,l.selector)}`)}finally{od(),Sc(),this._evaluator.end()}}strictModeViolationError(e,i){const r=this._generateSelectors(i).map(l=>`
    `+l);return r.length<i.length&&r.push(`
    ...`),this.createStacklessError(`strict mode violation: ${Oi(this._sdkLanguage,An(e))} resolved to ${i.length} elements:${r.join("")}
`)}checkDeprecatedSelectorUsage(e,i){const r=new Set(["_react","_vue","xpath:light","text:light","id:light","data-testid:light","data-test-id:light","data-test:light"]);if(!i.length)return;const l=e.parts.find(u=>r.has(u.name));if(!l)return;const o=this._generateSelectors(i).map(u=>`
    `+u);throw o.length<i.length&&o.push(`
    ...`),this.createStacklessError(`"${l.name}" selector is not supported: ${Oi(this._sdkLanguage,An(e))} resolved to ${i.length} element${i.length===1?"":"s"}:${o.join("")}
`)}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const i=new Error(e);return delete i.stack,i}createHighlight(){return new hh(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new hh(this),this._highlight.install();const r=[];for(const l of e)r.push(this.querySelectorAll(l,this.document.documentElement));this._highlight.maskElements(r.flat(),i)}highlight(e){this._highlight||(this._highlight=new hh(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 r=((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 h of r)e.has(h)||h.dispatchEvent(l);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const h of e)r.has(h)||h.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const r=()=>i=!0;this.window.addEventListener(e,r),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,r);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var l;return(l=this._hitTargetInterceptor)==null?void 0:l.call(this,r)},i=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,r){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(r,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 lr(i.expectedText[0]),h=this.document.title;return{received:h,matches:f.matches(h)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new lr(i.expectedText[0]),h=this.document.location.href;return{received:h,matches:f.matches(h)}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var l;const r=i.expression;{let o;if(r==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(r==="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(r==="to.be.disabled")o=this.elementState(e,"disabled");else if(r==="to.be.editable")o=this.elementState(e,"editable");else if(r==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(r==="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(r==="to.be.enabled")o=this.elementState(e,"enabled");else if(r==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else r==="to.be.hidden"?o=this.elementState(e,"hidden"):r==="to.be.visible"?o=this.elementState(e,"visible"):r==="to.be.attached"?o={matches:!0,received:"attached"}:r==="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(r==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let g=0;g<u.length-1;g++){if(typeof o!="object"||!(u[g]in o))return{received:void 0,matches:!1};o=o[u[g]]}const f=o[u[u.length-1]],h=Hh(f,i.expectedValue);return{received:f,matches:h}}if(r==="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(r==="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 lr(i.expectedText[f]).matches(u)).every(Boolean)}}if(r==="to.match.aria"){const o=SE(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(r==="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(r)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);return{received:e.classList.toString(),matches:new lr(i.expectedText[0]).matchesClassList(this,e.classList,r==="to.contain.class")}}else if(r==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(i.expressionArg);else if(r==="to.have.id")o=e.id;else if(r==="to.have.text")o=i.useInnerText?e.innerText:Ut(new Map,e).full;else if(r==="to.have.accessible.name")o=sl(e,!1);else if(r==="to.have.accessible.description")o=S0(e,!1);else if(r==="to.have.accessible.error.message")o=sE(e);else if(r==="to.have.role")o=mt(e)||"";else if(r==="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 lr(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+r)}expectArray(e,i){const r=i.expression;if(r==="to.have.count"){const h=e.length,g=h===i.expectedNumber;return{received:h,matches:g}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);if(["to.have.class.array","to.contain.class.array"].includes(r)){const h=e.map(m=>m.classList),g=h.map(String);if(h.length!==i.expectedText.length)return{received:g,matches:!1};const y=this._matchSequentially(i.expectedText,h,(m,w)=>m.matchesClassList(this,w,r==="to.contain.class.array"));return{received:g,matches:y}}if(!["to.contain.text.array","to.have.text.array"].includes(r))throw this.createStacklessError("Unknown expect matcher: "+r);const l=e.map(h=>i.useInnerText?h.innerText:Ut(new Map,h).full),o=r!=="to.contain.text.array";if(!(l.length===i.expectedText.length||!o))return{received:l,matches:!1};const f=this._matchSequentially(i.expectedText,l,(h,g)=>h.matches(g));return{received:l,matches:f}}_matchSequentially(e,i,r){const l=e.map(f=>new lr(f));let o=0,u=0;for(;o<l.length&&u<i.length;)r(l[o],i[u])&&++o,++u;return o===l.length}}function Ro(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function HA(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 Do(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):HA;let r=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),r=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),r=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),r=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),r=!0),n=At(n),r?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>At(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:l=>l.normalized.toLowerCase().includes(n)})}class lr{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,r){if(r){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=At(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Hh(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 r=0;r<n.length;++r)if(!Hh(n[r],e[r]))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 r=0;r<i.length;++r)if(!e.hasOwnProperty(i[r]))return!1;for(const r of i)if(!Hh(n[r],e[r]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const qA={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"}}]}]}]},cn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class j0{}class mh{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;qe(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){qe(e)}onPointerUp(e){qe(e)}onMouseDown(e){qe(e)}onMouseUp(e){qe(e)}onMouseMove(e){var l;qe(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let r=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});r={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?cn.assert:cn.single}}((l=this._hoveredModel)==null?void 0:l.selector)!==(r==null?void 0:r.selector)&&(this._hoveredModel=r,this._recorder.updateHighlight(r,!0))}onMouseEnter(e){qe(e)}onMouseLeave(e){qe(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){qe(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){qe(e)}onScroll(e){this._reset(!1)}_commit(e,i){var r;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(r=this._recorder.overlay)==null||r.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class $A{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 $v(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 r of i)for(const l of r.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"&&qe(e);return}if(el(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=Wa(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:Za(e),signals:[],button:qh(e),modifiers:vr(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||el(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Za(e),signals:[],button:qh(e),modifiers:vr(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()){qe(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(r=>r.name)});return}if(el(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 r=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...r.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=Wa(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:vr(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){qe(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){qe(i);const r=Za(i),l=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:r,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 g of l){const y=this._recorder.document.createElement("x-pw-action-item");y.setAttribute("role","listitem"),y.textContent=g.title,y.setAttribute("aria-label",g.title),y.addEventListener("click",()=>{this._dialog.close(),g.cb()}),o.appendChild(y)}const u=this._dialog.show({label:"Choose action",body:o,autosize:!0}),f=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),h=this._recorder.highlight.tooltipPosition(f,u);this._dialog.moveTo(h.anchorTop,h.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const i=KA(this._recorder.document);if(e&&i===this._recorder.document.body)return;const r=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=r&&r.selector?{...r,color:cn.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),r=i.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(i.type))}_actionInProgress(e){const i=e instanceof KeyboardEvent,r=e instanceof MouseEvent||e instanceof PointerEvent;for(const l of this._performingActions)if(i&&l.name==="press"&&e.key===l.key||r&&(l.name==="click"||l.name==="hover"||l.name==="check"||l.name==="uncheck"))return!0;return qe(e),!1}_consumedDueToNoModel(e,i){return i?!1:(qe(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(qe(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||qe(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?!!Wa(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:cn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class IA{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(el(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const r=Wa(i),{ariaSnapshot:l,selector:o,ref:u}=this._ariaSnapshot(i);if(r&&e.detail===1){this._recorder.recordAction({name:r.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:l});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:l,position:Za(e),signals:[],button:qh(e),modifiers:vr(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:l,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:l,ref:o,ariaSnapshot:r,position:Za(e),signals:[],button:"right",modifiers:vr(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:l,ref:o}=this._ariaSnapshot(i);if(el(i)){this._recorder.recordAction({name:"fill",selector:l,ref:o,ariaSnapshot:r,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:r,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:r,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:l,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=Wa(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:l,ref:o,ariaSnapshot:r,signals:[]});return}}this._recorder.recordAction({name:"press",selector:l,ref:o,ariaSnapshot:r,signals:[],key:e.key,modifiers:vr(e)})}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),r=i.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="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:r}=this._recorder.injectedScript.ariaSnapshotForRecorder(),l=e?r.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 yh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new $v(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){qe(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 r;const i=(r=this._hoverHighlight)==null?void 0:r.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var r;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((r=this._hoverHighlight)==null?void 0:r.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:cn.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:cn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),qe(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:r}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:r,signals:[],checked:!e.checked}:{name:"assertValue",selector:r,signals:[],value:e.value}}else if(this._kind==="snapshot"){const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:cn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:cn.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,r,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):((r=this._action)==null?void 0:r.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 r=()=>{var m;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.value),h=(m=this._hoverHighlight)==null?void 0:m.elements[0];if(!h)return;e.text=f;const g=this._recorder.injectedScript.utils.elementText(this._textCache,h).normalized,y=f&&g.includes(f);i.classList.toggle("does-not-match",!y)};i.addEventListener("input",r);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 VA{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 r=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(r),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.createElement("x-div")),r.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")),r.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")),r.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")),r.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")),r.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")),r.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")),r.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){Iv(this._listeners),this._listeners=[Ue(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),Ue(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")}),Ue(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])}),Ue(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),Ue(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),Ue(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),Ue(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}),qe(e),!0}return!1}onMouseUp(e){return this._dragState?(qe(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,qe(e),!0):!1}onDblClick(e){return!1}}class GA{constructor(e,i){var r,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 j0,standby:new j0,inspecting:new mh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new IA(this):new $A(this),"recording-inspecting":new mh(this,!1),assertingText:new yh(this,"text"),assertingVisibility:new mh(this,!0),assertingValue:new yh(this,"value"),assertingSnapshot:new yh(this,"snapshot")},this._currentTool=this._tools.none,(l=(r=this._currentTool).install)==null||l.call(r),e.window.top===e.window&&(this.overlay=new VA(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 r,l,o;Iv(this._listeners),this._listeners=[Ue(this.document,"click",u=>this._onClick(u),!0),Ue(this.document,"auxclick",u=>this._onClick(u),!0),Ue(this.document,"dblclick",u=>this._onDblClick(u),!0),Ue(this.document,"contextmenu",u=>this._onContextMenu(u),!0),Ue(this.document,"dragstart",u=>this._onDragStart(u),!0),Ue(this.document,"input",u=>this._onInput(u),!0),Ue(this.document,"keydown",u=>this._onKeyDown(u),!0),Ue(this.document,"keyup",u=>this._onKeyUp(u),!0),Ue(this.document,"pointerdown",u=>this._onPointerDown(u),!0),Ue(this.document,"pointerup",u=>this._onPointerUp(u),!0),Ue(this.document,"mousedown",u=>this._onMouseDown(u),!0),Ue(this.document,"mouseup",u=>this._onMouseUp(u),!0),Ue(this.document,"mousemove",u=>this._onMouseMove(u),!0),Ue(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),Ue(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),Ue(this.document,"focus",u=>this._onFocus(u),!0),Ue(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(Vv(this.document,qA)),(r=this.overlay)==null||r.install(),(o=(l=this._currentTool)==null?void 0:l.install)==null||o.call(l),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,l,o,u,f,h;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(l=(r=this._currentTool).uninstall)==null||l.call(r),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&&((h=this.injectedScript.document.body)==null||h.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 r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?YA(this.injectedScript,e.language,e.actionSelector,this.document):null;r=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?cn.multiple:cn.single;r=u.map(h=>({element:h,color:f})),this._lastHighlightedAriaTemplateJSON=l}else this._lastHighlightedSelector||(r="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}r==="clear"?this.highlight.clearHighlight():r!=="noop"&&this.highlight.updateHighlight(r)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onClick)==null||l.call(r,e))}_onDblClick(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onDblClick)==null||l.call(r,e))}_onContextMenu(e){var i,r;e.isTrusted&&((r=(i=this._currentTool).onContextMenu)==null||r.call(i,e))}_onDragStart(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onDragStart)==null||r.call(i,e))}_onPointerDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerDown)==null||r.call(i,e))}_onPointerUp(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerUp)==null||r.call(i,e))}_onMouseDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseDown)==null||r.call(i,e))}_onMouseUp(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onMouseUp)==null||l.call(r,e))}_onMouseMove(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onMouseMove)==null||l.call(r,e))}_onMouseEnter(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseEnter)==null||r.call(i,e))}_onMouseLeave(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseLeave)==null||r.call(i,e))}_onFocus(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onFocus)==null||r.call(i,e))}_onScroll(e){var i,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(i=this._currentTool).onScroll)==null||r.call(i,e))}_onInput(e){var i,r;this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onInput)==null||r.call(i,e)}_onKeyDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onKeyDown)==null||r.call(i,e))}_onKeyUp(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onKeyUp)==null||r.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var l,o;let r=e==null?void 0:e.tooltipText;r===void 0&&(e!=null&&e.selector)&&(r=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:r}))):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 r of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(r)))return r;return e.composedPath()[0]}setMode(e){var i,r;(r=(i=this._delegate).setMode)==null||r.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 r,l,o;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!XA(e)&&this._lastActionAutoexpectSnapshot){const u=this.injectedScript.utils.findNewElement(i==null?void 0:i.root,(r=this._lastActionAutoexpectSnapshot)==null?void 0:r.root);e.preconditionSelector=u?this.injectedScript.generateSelector(u,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((o=(l=this._delegate).performAction)==null?void 0:o.call(l,e).catch(()=>{}))}recordAction(e){var i,r;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(r=(i=this._delegate).recordAction)==null||r.call(i,e)}setOverlayState(e){var i,r;(r=(i=this._delegate).setOverlayState)==null||r.call(i,e)}elementPicked(e,i){var l,o;const r=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"expect"});(o=(l=this._delegate).elementPicked)==null||o.call(l,{selector:e,ariaSnapshot:r})}}let $v=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 r=this._recorder.document.createElement("x-pw-tool-item");r.title="Close",r.classList.add("cancel"),r.appendChild(this._recorder.document.createElement("x-div")),r.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 h;if(f.key==="Escape"){this.close(),(h=e.onCancel)==null||h.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var h;this.close(),(h=e.onCancel)==null||h.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(r),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 KA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function vr(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function qh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Za(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function qe(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function Wa(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function el(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function Ue(n,e,i,r){return n.addEventListener(e,i,r),()=>{n.removeEventListener(e,i,r)}}function Iv(n){for(const e of n)e();n.splice(0,n.length)}function YA(n,e,i,r){try{const l=n.parseSelector(i),o=n.querySelectorAll(l,r),u=o.length>1?cn.multiple:cn.single,f=n.utils.asLocator(e,i);return o.map((h,g)=>{const y=o.length>1?` [${g+1} of ${o.length}]`:"";return{element:h,color:u,tooltipText:f+y}})}catch{return[]}}function Vv(n,{tagName:e,attrs:i,children:r}){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(r)for(const o of r)l.appendChild(Vv(n,o));return l}function XA(n){return n.name.startsWith("assert")}function FA(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 r="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){r+=u;continue}const f=n[o-1]==="r"||n[o]==="/";++o;let h="";for(;o<n.length;){if(n[o]==="\\"){f?(n[o+1]!==u&&(h+=n[o]),++o,h+=n[o]):(++o,n[o]==="n"?h+=`
`:n[o]==="r"?h+="\r":n[o]==="t"?h+="	":h+=n[o]),++o;continue}if(n[o]!==u){h+=n[o++];continue}break}i.push({quote:u,text:h}),r+=(u==="/"?"r":"")+"$"+i.length}r=r.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:Gv(r,i,e),preferredQuote:l}}function L0(n){return[...n.matchAll(/\$\d+/g)].length}function R0(n,e){return n.replace(/\$(\d+)/g,(i,r)=>`$${r-e}`)}function Gv(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 h=n.substring(0,o),g=0;["sethas(","sethasnot("].includes(l[1])&&(g=1,h=h.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const y=L0(n.substring(0,o)),m=R0(n.substring(o,f),y),w=L0(m),v=e.slice(y,y+w),E=JSON.stringify(Gv(m,v,i));n=h.replace(/=$/,"2=")+`$${y+1}`+R0(n.substring(f+g),w-1);const x=e.slice(0,y),_=e.slice(y+w);e=x.concat([{quote:'"',text:E}]).concat(_)}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 r=n.split(".");for(let l=0;l<r.length-1;l++)if(r[l]==="internal:control=enter-frame"&&r[l+1].startsWith("nth=")){const[o]=r.splice(l,1);r.splice(l+1,0,o)}return r.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 h=e[+u-1];return l.startsWith("internal:attr")||l.startsWith("internal:testid")||l.startsWith("internal:role")?Tt(new RegExp(h.text),!1)+(f||""):zt(new RegExp(h.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const h=e[+u-1];return l.startsWith("internal:has=")||l.startsWith("internal:has-not=")?h.text:l.startsWith("internal:testid")?Tt(h.text,!0):l.startsWith("internal:attr")||l.startsWith("internal:role")?Tt(h.text,f==="s"):zt(h.text,f==="s")}),l)).join(" >> ")}function QA(n,e,i){try{return JA(n,e,i)}catch{return""}}function JA(n,e,i){try{return cl(e),e}catch{}const{selector:r,preferredQuote:l}=FA(e,i),o=Nb(n,r,void 0,void 0,l),u=D0(n,e);return o.some(f=>D0(n,f)===u)?r:""}function D0(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const PA=({url:n})=>S.jsxs("div",{className:"browser-frame-header",children:[S.jsxs("div",{className:"browser-traffic-lights",children:[S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),S.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[S.jsx("span",{className:"browser-frame-address",children:n||"about:blank"}),n&&S.jsx(td,{value:n})]}),S.jsx("div",{style:{marginLeft:"auto"},children:S.jsxs("div",{children:[S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),Cd=Symbol.for("yaml.alias"),$h=Symbol.for("yaml.document"),Li=Symbol.for("yaml.map"),Kv=Symbol.for("yaml.pair"),Cn=Symbol.for("yaml.scalar"),kr=Symbol.for("yaml.seq"),fn=Symbol.for("yaml.node.type"),ys=n=>!!n&&typeof n=="object"&&n[fn]===Cd,bs=n=>!!n&&typeof n=="object"&&n[fn]===$h,Mr=n=>!!n&&typeof n=="object"&&n[fn]===Li,He=n=>!!n&&typeof n=="object"&&n[fn]===Kv,Le=n=>!!n&&typeof n=="object"&&n[fn]===Cn,Or=n=>!!n&&typeof n=="object"&&n[fn]===kr;function $e(n){if(n&&typeof n=="object")switch(n[fn]){case Li:case kr:return!0}return!1}function Ie(n){if(n&&typeof n=="object")switch(n[fn]){case Cd:case Li:case Cn:case kr:return!0}return!1}const ZA=n=>(Le(n)||$e(n))&&!!n.anchor,Bt=Symbol("break visit"),Yv=Symbol("skip children"),Nn=Symbol("remove node");function Ri(n,e){const i=Xv(e);bs(n)?gr(null,n.contents,i,Object.freeze([n]))===Nn&&(n.contents=null):gr(null,n,i,Object.freeze([]))}Ri.BREAK=Bt;Ri.SKIP=Yv;Ri.REMOVE=Nn;function gr(n,e,i,r){const l=Fv(n,e,i,r);if(Ie(l)||He(l))return Qv(n,r,l),gr(n,l,i,r);if(typeof l!="symbol"){if($e(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){const u=gr(o,e.items[o],i,r);if(typeof u=="number")o=u-1;else{if(u===Bt)return Bt;u===Nn&&(e.items.splice(o,1),o-=1)}}}else if(He(e)){r=Object.freeze(r.concat(e));const o=gr("key",e.key,i,r);if(o===Bt)return Bt;o===Nn&&(e.key=null);const u=gr("value",e.value,i,r);if(u===Bt)return Bt;u===Nn&&(e.value=null)}}return l}async function xc(n,e){const i=Xv(e);bs(n)?await mr(null,n.contents,i,Object.freeze([n]))===Nn&&(n.contents=null):await mr(null,n,i,Object.freeze([]))}xc.BREAK=Bt;xc.SKIP=Yv;xc.REMOVE=Nn;async function mr(n,e,i,r){const l=await Fv(n,e,i,r);if(Ie(l)||He(l))return Qv(n,r,l),mr(n,l,i,r);if(typeof l!="symbol"){if($e(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){const u=await mr(o,e.items[o],i,r);if(typeof u=="number")o=u-1;else{if(u===Bt)return Bt;u===Nn&&(e.items.splice(o,1),o-=1)}}}else if(He(e)){r=Object.freeze(r.concat(e));const o=await mr("key",e.key,i,r);if(o===Bt)return Bt;o===Nn&&(e.key=null);const u=await mr("value",e.value,i,r);if(u===Bt)return Bt;u===Nn&&(e.value=null)}}return l}function Xv(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 Fv(n,e,i,r){var l,o,u,f,h;if(typeof i=="function")return i(n,e,r);if(Mr(e))return(l=i.Map)==null?void 0:l.call(i,n,e,r);if(Or(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,r);if(He(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,r);if(Le(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,r);if(ys(e))return(h=i.Alias)==null?void 0:h.call(i,n,e,r)}function Qv(n,e,i){const r=e[e.length-1];if($e(r))r.items[n]=i;else if(He(r))n==="key"?r.key=i:r.value=i;else if(bs(r))r.contents=i;else{const l=ys(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const WA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},eN=n=>n.replace(/[!,[\]{}]/g,e=>WA[e]);class _t{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},_t.defaultYaml,e),this.tags=Object.assign({},_t.defaultTags,i)}clone(){const e=new _t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new _t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:_t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},_t.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:_t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},_t.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),l=r.shift();switch(l){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[o,u]=r;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=r;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[,r,l]=e.match(/^(.*!)([^!]*)$/s);l||i(`The ${e} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(l)}catch(u){return i(String(u)),null}return r==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,r]of Object.entries(this.tags))if(e.startsWith(r))return i+eN(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let l;if(e&&r.length>0&&Ie(e.contents)){const o={};Ri(e.contents,(u,f)=>{Ie(f)&&f.tag&&(o[f.tag]=!0)}),l=Object.keys(o)}else l=[];for(const[o,u]of r)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||l.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
`)}}_t.defaultYaml={explicit:!1,version:"1.2"};_t.defaultTags={"!!":"tag:yaml.org,2002:"};function Jv(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 Pv(n){const e=new Set;return Ri(n,{Value(i,r){r.anchor&&e.add(r.anchor)}}),e}function Zv(n,e){for(let i=1;;++i){const r=`${n}${i}`;if(!e.has(r))return r}}function tN(n,e){const i=[],r=new Map;let l=null;return{onAnchor:o=>{i.push(o),l||(l=Pv(n));const u=Zv(e,l);return l.add(u),u},setAnchors:()=>{for(const o of i){const u=r.get(o);if(typeof u=="object"&&u.anchor&&(Le(u.node)||$e(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:r}}function yr(n,e,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,o=r.length;l<o;++l){const u=r[l],f=yr(n,r,String(l),u);f===void 0?delete r[l]:f!==u&&(r[l]=f)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const o=r.get(l),u=yr(n,r,l,o);u===void 0?r.delete(l):u!==o&&r.set(l,u)}else if(r instanceof Set)for(const l of Array.from(r)){const o=yr(n,r,l,l);o===void 0?r.delete(l):o!==l&&(r.delete(l),r.add(o))}else for(const[l,o]of Object.entries(r)){const u=yr(n,r,l,o);u===void 0?delete r[l]:u!==o&&(r[l]=u)}return n.call(e,i,r)}function un(n,e,i){if(Array.isArray(n))return n.map((r,l)=>un(r,String(l),i));if(n&&typeof n.toJSON=="function"){if(!i||!ZA(n))return n.toJSON(e,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(n,r),i.onCreate=o=>{r.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 kd{constructor(e){Object.defineProperty(this,fn,{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:r,onAnchor:l,reviver:o}={}){if(!bs(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 r=="number"?r:100},f=un(this,"",u);if(typeof l=="function")for(const{count:h,res:g}of u.anchors.values())l(g,h);return typeof o=="function"?yr(o,{"":f},"",f):f}}class _c extends kd{constructor(e){super(Cd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return Ri(e,{Node:(r,l)=>{if(l===this)return Ri.BREAK;l.anchor===this.source&&(i=l)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:o}=i,u=this.resolve(l);if(!u){const h=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(h)}let f=r.get(u);if(f||(un(u,null,i),f=r.get(u)),!f||f.res===void 0){const h="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(h)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=Jo(l,u,r)),f.count*f.aliasCount>o)){const h="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(h)}return f.res}toString(e,i,r){const l=`*${this.source}`;if(e){if(Jv(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 Jo(n,e,i){if(ys(e)){const r=e.resolve(n),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if($e(e)){let r=0;for(const l of e.items){const o=Jo(n,l,i);o>r&&(r=o)}return r}else if(He(e)){const r=Jo(n,e.key,i),l=Jo(n,e.value,i);return Math.max(r,l)}return 1}const Wv=n=>!n||typeof n!="function"&&typeof n!="object";class he extends kd{constructor(e){super(Cn),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:un(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 nN="tag:yaml.org,2002:";function iN(n,e,i){if(e){const r=i.filter(o=>o.tag===e),l=r.find(o=>!o.format)??r[0];if(!l)throw new Error(`Tag ${e} not found`);return l}return i.find(r=>{var l;return((l=r.identify)==null?void 0:l.call(r,n))&&!r.format})}function rl(n,e,i){var m,w,v;if(bs(n)&&(n=n.contents),Ie(n))return n;if(He(n)){const E=(w=(m=i.schema[Li]).createNode)==null?void 0:w.call(m,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:r,onAnchor:l,onTagObj:o,schema:u,sourceObjects:f}=i;let h;if(r&&n&&typeof n=="object"){if(h=f.get(n),h)return h.anchor||(h.anchor=l(n)),new _c(h.anchor);h={anchor:null,node:null},f.set(n,h)}e!=null&&e.startsWith("!!")&&(e=nN+e.slice(2));let g=iN(n,e,u.tags);if(!g){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new he(n);return h&&(h.node=E),E}g=n instanceof Map?u[Li]:Symbol.iterator in Object(n)?u[kr]:u[Li]}o&&(o(g),delete i.onTagObj);const y=g!=null&&g.createNode?g.createNode(i.schema,n,i):typeof((v=g==null?void 0:g.nodeClass)==null?void 0:v.from)=="function"?g.nodeClass.from(i.schema,n,i):new he(n);return e?y.tag=e:g.default||(y.tag=g.tag),h&&(h.node=y),y}function fc(n,e,i){let r=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]=r,r=u}else r=new Map([[o,r]])}return rl(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Ka=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class eS extends kd{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(r=>Ie(r)||He(r)?r.clone(e):r),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Ka(e))this.add(i);else{const[r,...l]=e,o=this.get(r,!0);if($e(o))o.addIn(l,i);else if(o===void 0&&this.schema)this.set(r,fc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}deleteIn(e){const[i,...r]=e;if(r.length===0)return this.delete(i);const l=this.get(i,!0);if($e(l))return l.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(e,i){const[r,...l]=e,o=this.get(r,!0);return l.length===0?!i&&Le(o)?o.value:o:$e(o)?o.getIn(l,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!He(i))return!1;const r=i.value;return r==null||e&&Le(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[i,...r]=e;if(r.length===0)return this.has(i);const l=this.get(i,!0);return $e(l)?l.hasIn(r):!1}setIn(e,i){const[r,...l]=e;if(l.length===0)this.set(r,i);else{const o=this.get(r,!0);if($e(o))o.setIn(l,i);else if(o===void 0&&this.schema)this.set(r,fc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const sN=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function Wn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const us=(n,e,i)=>n.endsWith(`
`)?Wn(i,e):i.includes(`
`)?`
`+Wn(i,e):(n.endsWith(" ")?"":" ")+i,tS="flow",Ih="block",Po="quoted";function Tc(n,e,i="flow",{indentAtStart:r,lineWidth:l=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!l||l<0)return n;l<o&&(o=0);const h=Math.max(1+o,1+l-e.length);if(n.length<=h)return n;const g=[],y={};let m=l-e.length;typeof r=="number"&&(r>l-Math.max(2,o)?g.push(0):m=l-r);let w,v,E=!1,x=-1,_=-1,N=-1;i===Ih&&(x=z0(n,x,e.length),x!==-1&&(m=x+h));for(let $;$=n[x+=1];){if(i===Po&&$==="\\"){switch(_=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}N=x}if($===`
`)i===Ih&&(x=z0(n,x,e.length)),m=x+e.length+h,w=void 0;else{if($===" "&&v&&v!==" "&&v!==`
`&&v!=="	"){const I=n[x+1];I&&I!==" "&&I!==`
`&&I!=="	"&&(w=x)}if(x>=m)if(w)g.push(w),m=w+h,w=void 0;else if(i===Po){for(;v===" "||v==="	";)v=$,$=n[x+=1],E=!0;const I=x>N+1?x-2:_-1;if(y[I])return n;g.push(I),y[I]=!0,m=I+h,w=void 0}else E=!0}v=$}if(E&&f&&f(),g.length===0)return n;u&&u();let C=n.slice(0,g[0]);for(let $=0;$<g.length;++$){const I=g[$],D=g[$+1]||n.length;I===0?C=`
${e}${n.slice(0,D)}`:(i===Po&&y[I]&&(C+=`${n[I]}\\`),C+=`
${e}${n.slice(I+1,D)}`)}return C}function z0(n,e,i){let r=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!==`
`);r=e,l=e+1,o=n[l]}return r}const Ec=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Ac=n=>/^(%|---|\.\.\.)/m.test(n);function rN(n,e,i){if(!e||e<0)return!1;const r=e-i,l=n.length;if(l<=r)return!1;for(let o=0,u=0;o<l;++o)if(n[o]===`
`){if(o-u>r)return!0;if(u=o+1,l-u<=r)return!1}return!0}function tl(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=e,l=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Ac(n)?"  ":"");let u="",f=0;for(let h=0,g=i[h];g;g=i[++h])if(g===" "&&i[h+1]==="\\"&&i[h+2]==="n"&&(u+=i.slice(f,h)+"\\ ",h+=1,f=h,g="\\"),g==="\\")switch(i[h+1]){case"u":{u+=i.slice(f,h);const y=i.substr(h+2,4);switch(y){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:y.substr(0,2)==="00"?u+="\\x"+y.substr(2):u+=i.substr(h,6)}h+=5,f=h+1}break;case"n":if(r||i[h+2]==='"'||i.length<l)h+=1;else{for(u+=i.slice(f,h)+`

`;i[h+2]==="\\"&&i[h+3]==="n"&&i[h+4]!=='"';)u+=`
`,h+=2;u+=o,i[h+2]===" "&&(u+="\\"),h+=1,f=h+1}break;default:h+=1}return u=f?u+i.slice(f):i,r?u:Tc(u,o,Po,Ec(e,!1))}function Vh(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
`)||/[ \t]\n|\n[ \t]/.test(n))return tl(n,e);const i=e.indent||(Ac(n)?"  ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
${i}`)+"'";return e.implicitKey?r:Tc(r,i,tS,Ec(e,!1))}function br(n,e){const{singleQuote:i}=e.options;let r;if(i===!1)r=tl;else{const l=n.includes('"'),o=n.includes("'");l&&!o?r=Vh:o&&!l?r=tl:r=i?Vh:tl}return r(n,e)}let Gh;try{Gh=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{Gh=/\n+(?!\n|$)/g}function Zo({comment:n,type:e,value:i},r,l,o){const{blockQuote:u,commentString:f,lineWidth:h}=r.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return br(i,r);const g=r.indent||(r.forceBlockIndent||Ac(i)?"  ":""),y=u==="literal"?!0:u==="folded"||e===he.BLOCK_FOLDED?!1:e===he.BLOCK_LITERAL?!0:!rN(i,h,g.length);if(!i)return y?`|
`:`>
`;let m,w;for(w=i.length;w>0;--w){const K=i[w-1];if(K!==`
`&&K!=="	"&&K!==" ")break}let v=i.substring(w);const E=v.indexOf(`
`);E===-1?m="-":i===v||E!==v.length-1?(m="+",o&&o()):m="",v&&(i=i.slice(0,-v.length),v[v.length-1]===`
`&&(v=v.slice(0,-1)),v=v.replace(Gh,`$&${g}`));let x=!1,_,N=-1;for(_=0;_<i.length;++_){const K=i[_];if(K===" ")x=!0;else if(K===`
`)N=_;else break}let C=i.substring(0,N<_?N+1:_);C&&(i=i.substring(C.length),C=C.replace(/\n+/g,`$&${g}`));let I=(y?"|":">")+(x?g?"2":"1":"")+m;if(n&&(I+=" "+f(n.replace(/ ?[\r\n]+/g," ")),l&&l()),y)return i=i.replace(/\n+/g,`$&${g}`),`${I}
${g}${C}${i}${v}`;i=i.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);const D=Tc(`${C}${i}${v}`,g,Ih,Ec(r,!0));return`${I}
${g}${D}`}function aN(n,e,i,r){const{type:l,value:o}=n,{actualString:u,implicitKey:f,indent:h,indentStep:g,inFlow:y}=e;if(f&&o.includes(`
`)||y&&/[[\]{},]/.test(o))return br(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||y||!o.includes(`
`)?br(o,e):Zo(n,e,i,r);if(!f&&!y&&l!==he.PLAIN&&o.includes(`
`))return Zo(n,e,i,r);if(Ac(o)){if(h==="")return e.forceBlockIndent=!0,Zo(n,e,i,r);if(f&&h===g)return br(o,e)}const m=o.replace(/\n+/g,`$&
${h}`);if(u){const w=x=>{var _;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((_=x.test)==null?void 0:_.test(m))},{compat:v,tags:E}=e.doc.schema;if(E.some(w)||v!=null&&v.some(w))return br(o,e)}return f?m:Tc(m,h,tS,Ec(e,!1))}function ul(n,e,i,r){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 h=y=>{switch(y){case he.BLOCK_FOLDED:case he.BLOCK_LITERAL:return l||o?br(u.value,e):Zo(u,e,i,r);case he.QUOTE_DOUBLE:return tl(u.value,e);case he.QUOTE_SINGLE:return Vh(u.value,e);case he.PLAIN:return aN(u,e,i,r);default:return null}};let g=h(f);if(g===null){const{defaultKeyType:y,defaultStringType:m}=e.options,w=l&&y||m;if(g=h(w),g===null)throw new Error(`Unsupported default string type ${w}`)}return g}function nS(n,e){const i=Object.assign({blockQuote:!0,commentString:sN,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 r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):"  ",inFlow:r,options:i}}function lN(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,r;if(Le(e)){r=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,r)});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 r=e,i=n.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!i){const o=((l=r==null?void 0:r.constructor)==null?void 0:l.name)??typeof r;throw new Error(`Tag not resolved for ${o} value`)}return i}function oN(n,e,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],o=(Le(n)||$e(n))&&n.anchor;o&&Jv(o)&&(i.add(o),l.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&l.push(r.directives.tagString(u)),l.join(" ")}function _r(n,e,i,r){var h;if(He(n))return n.toString(e,i,r);if(ys(n)){if(e.doc.directives)return n.toString(e);if((h=e.resolvedAliases)!=null&&h.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=Ie(n)?n:e.doc.createNode(n,{onTagObj:g=>l=g});l||(l=lN(e.doc.schema.tags,o));const u=oN(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,r):Le(o)?ul(o,e,i,r):o.toString(e,i,r);return u?Le(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
${e.indent}${f}`:f}function cN({key:n,value:e},i,r,l){const{allNullValues:o,doc:u,indent:f,indentStep:h,options:{commentString:g,indentSeq:y,simpleKeys:m}}=i;let w=Ie(n)&&n.comment||null;if(m){if(w)throw new Error("With simple keys, key nodes cannot have comments");if($e(n)||!Ie(n)&&typeof n=="object"){const Q="With simple keys, collection cannot be used as a key value";throw new Error(Q)}}let v=!m&&(!n||w&&e==null&&!i.inFlow||$e(n)||(Le(n)?n.type===he.BLOCK_FOLDED||n.type===he.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!v&&(m||!o),indent:f+h});let E=!1,x=!1,_=_r(n,i,()=>E=!0,()=>x=!0);if(!v&&!i.inFlow&&_.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(i.inFlow){if(o||e==null)return E&&r&&r(),_===""?"?":v?`? ${_}`:_}else if(o&&!m||e==null&&v)return _=`? ${_}`,w&&!E?_+=us(_,i.indent,g(w)):x&&l&&l(),_;E&&(w=null),v?(w&&(_+=us(_,i.indent,g(w))),_=`? ${_}
${f}:`):(_=`${_}:`,w&&(_+=us(_,i.indent,g(w))));let N,C,$;Ie(e)?(N=!!e.spaceBefore,C=e.commentBefore,$=e.comment):(N=!1,C=null,$=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!v&&!w&&Le(e)&&(i.indentAtStart=_.length+1),x=!1,!y&&h.length>=2&&!i.inFlow&&!v&&Or(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let I=!1;const D=_r(e,i,()=>I=!0,()=>x=!0);let K=" ";if(w||N||C){if(K=N?`
`:"",C){const Q=g(C);K+=`
${Wn(Q,i.indent)}`}D===""&&!i.inFlow?K===`
`&&(K=`

`):K+=`
${i.indent}`}else if(!v&&$e(e)){const Q=D[0],q=D.indexOf(`
`),j=q!==-1,ne=i.inFlow??e.flow??e.items.length===0;if(j||!ne){let le=!1;if(j&&(Q==="&"||Q==="!")){let V=D.indexOf(" ");Q==="&"&&V!==-1&&V<q&&D[V+1]==="!"&&(V=D.indexOf(" ",V+1)),(V===-1||q<V)&&(le=!0)}le||(K=`
${i.indent}`)}}else(D===""||D[0]===`
`)&&(K="");return _+=K+D,i.inFlow?I&&r&&r():$&&!I?_+=us(_,i.indent,g($)):x&&l&&l(),_}function iS(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const zo="<<",ei={identify:n=>n===zo||typeof n=="symbol"&&n.description===zo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new he(Symbol(zo)),{addToJSMap:sS}),stringify:()=>zo},uN=(n,e)=>(ei.identify(e)||Le(e)&&(!e.type||e.type===he.PLAIN)&&ei.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===ei.tag&&i.default));function sS(n,e,i){if(i=n&&ys(i)?i.resolve(n.doc):i,Or(i))for(const r of i.items)bh(n,e,r);else if(Array.isArray(i))for(const r of i)bh(n,e,r);else bh(n,e,i)}function bh(n,e,i){const r=n&&ys(i)?i.resolve(n.doc):i;if(!Mr(r))throw new Error("Merge sources must be maps or map aliases");const l=r.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 rS(n,e,{key:i,value:r}){if(Ie(i)&&i.addToJSMap)i.addToJSMap(n,e,r);else if(uN(n,i))sS(n,e,r);else{const l=un(i,"",n);if(e instanceof Map)e.set(l,un(r,l,n));else if(e instanceof Set)e.add(l);else{const o=fN(i,l,n),u=un(r,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function fN(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(Ie(n)&&(i!=null&&i.doc)){const r=nS(i.doc,{});r.anchors=new Set;for(const o of i.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=n.toString(r);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),iS(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 Md(n,e,i){const r=rl(n,void 0,i),l=rl(e,void 0,i);return new vt(r,l)}class vt{constructor(e,i=null){Object.defineProperty(this,fn,{value:Kv}),this.key=e,this.value=i}clone(e){let{key:i,value:r}=this;return Ie(i)&&(i=i.clone(e)),Ie(r)&&(r=r.clone(e)),new vt(i,r)}toJSON(e,i){const r=i!=null&&i.mapAsMap?new Map:{};return rS(i,r,this)}toString(e,i,r){return e!=null&&e.doc?cN(this,e,i,r):JSON.stringify(this)}}function aS(n,e,i){return(e.inFlow??n.flow?dN:hN)(n,e,i)}function hN({comment:n,items:e},i,{blockItemPrefix:r,flowChars:l,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:h,options:{commentString:g}}=i,y=Object.assign({},i,{indent:o,type:null});let m=!1;const w=[];for(let E=0;E<e.length;++E){const x=e[E];let _=null;if(Ie(x))!m&&x.spaceBefore&&w.push(""),hc(i,w,x.commentBefore,m),x.comment&&(_=x.comment);else if(He(x)){const C=Ie(x.key)?x.key:null;C&&(!m&&C.spaceBefore&&w.push(""),hc(i,w,C.commentBefore,m))}m=!1;let N=_r(x,y,()=>_=null,()=>m=!0);_&&(N+=us(N,o,g(_))),m&&_&&(m=!1),w.push(r+N)}let v;if(w.length===0)v=l.start+l.end;else{v=w[0];for(let E=1;E<w.length;++E){const x=w[E];v+=x?`
${h}${x}`:`
`}}return n?(v+=`
`+Wn(g(n),h),f&&f()):m&&u&&u(),v}function dN({items:n},e,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;r+=o;const h=Object.assign({},e,{indent:r,inFlow:!0,type:null});let g=!1,y=0;const m=[];for(let E=0;E<n.length;++E){const x=n[E];let _=null;if(Ie(x))x.spaceBefore&&m.push(""),hc(e,m,x.commentBefore,!1),x.comment&&(_=x.comment);else if(He(x)){const C=Ie(x.key)?x.key:null;C&&(C.spaceBefore&&m.push(""),hc(e,m,C.commentBefore,!1),C.comment&&(g=!0));const $=Ie(x.value)?x.value:null;$?($.comment&&(_=$.comment),$.commentBefore&&(g=!0)):x.value==null&&(C!=null&&C.comment)&&(_=C.comment)}_&&(g=!0);let N=_r(x,h,()=>_=null);E<n.length-1&&(N+=","),_&&(N+=us(N,r,f(_))),!g&&(m.length>y||N.includes(`
`))&&(g=!0),m.push(N),y=m.length}const{start:w,end:v}=i;if(m.length===0)return w+v;if(!g){const E=m.reduce((x,_)=>x+_.length+2,2);g=e.options.lineWidth>0&&E>e.options.lineWidth}if(g){let E=w;for(const x of m)E+=x?`
${o}${l}${x}`:`
`;return`${E}
${l}${v}`}else return`${w}${u}${m.join(" ")}${u}${v}`}function hc({indent:n,options:{commentString:e}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const o=Wn(e(r),n);i.push(o.trimStart())}}function fs(n,e){const i=Le(e)?e.value:e;for(const r of n)if(He(r)&&(r.key===e||r.key===i||Le(r.key)&&r.key.value===i))return r}class Xt extends eS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Li,e),this.items=[]}static from(e,i,r){const{keepUndefined:l,replacer:o}=r,u=new this(e),f=(h,g)=>{if(typeof o=="function")g=o.call(i,h,g);else if(Array.isArray(o)&&!o.includes(h))return;(g!==void 0||l)&&u.items.push(Md(h,g,r))};if(i instanceof Map)for(const[h,g]of i)f(h,g);else if(i&&typeof i=="object")for(const h of Object.keys(i))f(h,i[h]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let r;He(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new vt(e,e==null?void 0:e.value):r=new vt(e.key,e.value);const l=fs(this.items,r.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);Le(l.value)&&Wv(r.value)?l.value.value=r.value:l.value=r.value}else if(o){const f=this.items.findIndex(h=>o(r,h)<0);f===-1?this.items.push(r):this.items.splice(f,0,r)}else this.items.push(r)}delete(e){const i=fs(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const r=fs(this.items,e),l=r==null?void 0:r.value;return(!i&&Le(l)?l.value:l)??void 0}has(e){return!!fs(this.items,e)}set(e,i){this.add(new vt(e,i),!0)}toJSON(e,i,r){const l=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)rS(i,l,o);return l}toString(e,i,r){if(!e)return JSON.stringify(this);for(const l of this.items)if(!He(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})),aS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:i})}}const jr={collection:"map",default:!0,nodeClass:Xt,tag:"tag:yaml.org,2002:map",resolve(n,e){return Mr(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Xt.from(n,e,i)};class Di extends eS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(kr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=Bo(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const r=Bo(e);if(typeof r!="number")return;const l=this.items[r];return!i&&Le(l)?l.value:l}has(e){const i=Bo(e);return typeof i=="number"&&i<this.items.length}set(e,i){const r=Bo(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const l=this.items[r];Le(l)&&Wv(i)?l.value=i:this.items[r]=i}toJSON(e,i){const r=[];i!=null&&i.onCreate&&i.onCreate(r);let l=0;for(const o of this.items)r.push(un(o,String(l++),i));return r}toString(e,i,r){return e?aS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(e,i,r){const{replacer:l}=r,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof l=="function"){const h=i instanceof Set?f:String(u++);f=l.call(i,h,f)}o.items.push(rl(f,void 0,r))}}return o}}function Bo(n){let e=Le(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Lr={collection:"seq",default:!0,nodeClass:Di,tag:"tag:yaml.org,2002:seq",resolve(n,e){return Or(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Di.from(n,e,i)},Nc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,r){return e=Object.assign({actualString:!0},e),ul(n,e,i,r)}},Cc={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"&&Cc.test.test(n)?n:e.options.nullStr},Od={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&&Od.test.test(n)){const r=n[0]==="t"||n[0]==="T";if(e===r)return n}return e?i.options.trueStr:i.options.falseStr}};function bn({format:n,minFractionDigits:e,tag:i,value:r}){if(typeof r=="bigint")return String(r);const l=typeof r=="number"?r:Number(r);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let o=JSON.stringify(r);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 lS={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:bn},oS={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():bn(n)}},cS={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:bn},kc=n=>typeof n=="bigint"||Number.isInteger(n),jd=(n,e,i,{intAsBigInt:r})=>r?BigInt(n):parseInt(n.substring(e),i);function uS(n,e,i){const{value:r}=n;return kc(r)&&r>=0?i+r.toString(e):bn(n)}const fS={identify:n=>kc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>jd(n,2,8,i),stringify:n=>uS(n,8,"0o")},hS={identify:kc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>jd(n,0,10,i),stringify:bn},dS={identify:n=>kc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>jd(n,2,16,i),stringify:n=>uS(n,16,"0x")},pN=[jr,Lr,Nc,Cc,Od,fS,hS,dS,lS,oS,cS];function B0(n){return typeof n=="bigint"||Number.isInteger(n)}const Uo=({value:n})=>JSON.stringify(n),gN=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Uo},{identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Uo},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:Uo},{identify:B0,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})=>B0(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:Uo}],mN={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},yN=[jr,Lr].concat(gN,mN),Ld={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,"")),r=new Uint8Array(i.length);for(let l=0;l<i.length;++l)r[l]=i.charCodeAt(l);return r}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},r,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 h="";for(let g=0;g<u.length;++g)h+=String.fromCharCode(u[g]);f=btoa(h)}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 h=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),g=Math.ceil(f.length/h),y=new Array(g);for(let m=0,w=0;m<g;++m,w+=h)y[m]=f.substr(w,h);f=y.join(e===he.BLOCK_LITERAL?`
`:" ")}return ul({comment:n,type:e,value:f},r,l,o)}};function pS(n,e){if(Or(n))for(let i=0;i<n.items.length;++i){let r=n.items[i];if(!He(r)){if(Mr(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const l=r.items[0]||new vt(new he(null));if(r.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${r.commentBefore}
${l.key.commentBefore}`:r.commentBefore),r.comment){const o=l.value??l.key;o.comment=o.comment?`${r.comment}
${o.comment}`:r.comment}r=l}n.items[i]=He(r)?r:new vt(r)}}else e("Expected a sequence for this tag");return n}function gS(n,e,i){const{replacer:r}=i,l=new Di(n);l.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof r=="function"&&(u=r.call(e,String(o++),u));let f,h;if(Array.isArray(u))if(u.length===2)f=u[0],h=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const g=Object.keys(u);if(g.length===1)f=g[0],h=u[f];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else f=u;l.items.push(Md(f,h,i))}return l}const Rd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:pS,createNode:gS};class Sr extends Di{constructor(){super(),this.add=Xt.prototype.add.bind(this),this.delete=Xt.prototype.delete.bind(this),this.get=Xt.prototype.get.bind(this),this.has=Xt.prototype.has.bind(this),this.set=Xt.prototype.set.bind(this),this.tag=Sr.tag}toJSON(e,i){if(!i)return super.toJSON(e);const r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(const l of this.items){let o,u;if(He(l)?(o=un(l.key,"",i),u=un(l.value,o,i)):o=un(l,"",i),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,u)}return r}static from(e,i,r){const l=gS(e,i,r),o=new this;return o.items=l.items,o}}Sr.tag="tag:yaml.org,2002:omap";const Dd={collection:"seq",identify:n=>n instanceof Map,nodeClass:Sr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=pS(n,e),r=[];for(const{key:l}of i.items)Le(l)&&(r.includes(l.value)?e(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new Sr,i)},createNode:(n,e,i)=>Sr.from(n,e,i)};function mS({value:n,source:e},i){return e&&(n?yS:bS).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const yS={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:mS},bS={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:mS},bN={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:bn},vN={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():bn(n)}},SN={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 r=n.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:bn},fl=n=>typeof n=="bigint"||Number.isInteger(n);function Mc(n,e,i,{intAsBigInt:r}){const l=n[0];if((l==="-"||l==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){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 zd(n,e,i){const{value:r}=n;if(fl(r)){const l=r.toString(e);return r<0?"-"+i+l.substr(1):i+l}return bn(n)}const wN={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>Mc(n,2,2,i),stringify:n=>zd(n,2,"0b")},xN={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>Mc(n,1,8,i),stringify:n=>zd(n,8,"0")},_N={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>Mc(n,0,10,i),stringify:bn},TN={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>Mc(n,2,16,i),stringify:n=>zd(n,16,"0x")};class wr extends Xt{constructor(e){super(e),this.tag=wr.tag}add(e){let i;He(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new vt(e.key,null):i=new vt(e,null),fs(this.items,i.key)||this.items.push(i)}get(e,i){const r=fs(this.items,e);return!i&&He(r)?Le(r.key)?r.key.value:r.key:r}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 r=fs(this.items,e);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new vt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(e,i,r){const{replacer:l}=r,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(Md(u,null,r));return o}}wr.tag="tag:yaml.org,2002:set";const Bd={collection:"map",identify:n=>n instanceof Set,nodeClass:wr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>wr.from(n,e,i),resolve(n,e){if(Mr(n)){if(n.hasAllNullValues(!0))return Object.assign(new wr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Ud(n,e){const i=n[0],r=i==="-"||i==="+"?n.substring(1):n,l=u=>e?BigInt(u):Number(u),o=r.replace(/_/g,"").split(":").reduce((u,f)=>u*l(60)+l(f),l(0));return i==="-"?l(-1)*o:o}function vS(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return bn(n);let r="";e<0&&(r="-",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))),r+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const SS={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})=>Ud(n,i),stringify:vS},wS={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=>Ud(n,!1),stringify:vS},Oc={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(Oc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,l,o,u,f]=e.map(Number),h=e[7]?Number((e[7]+"00").substr(1,3)):0;let g=Date.UTC(i,r-1,l,o||0,u||0,f||0,h);const y=e[8];if(y&&y!=="Z"){let m=Ud(y,!1);Math.abs(m)<30&&(m*=60),g-=6e4*m}return new Date(g)},stringify:({value:n})=>n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},U0=[jr,Lr,Nc,Cc,yS,bS,wN,xN,_N,TN,bN,vN,SN,Ld,ei,Dd,Rd,Bd,SS,wS,Oc],H0=new Map([["core",pN],["failsafe",[jr,Lr,Nc]],["json",yN],["yaml11",U0],["yaml-1.1",U0]]),q0={binary:Ld,bool:Od,float:cS,floatExp:oS,floatNaN:lS,floatTime:wS,int:hS,intHex:dS,intOct:fS,intTime:SS,map:jr,merge:ei,null:Cc,omap:Dd,pairs:Rd,seq:Lr,set:Bd,timestamp:Oc},EN={"tag:yaml.org,2002:binary":Ld,"tag:yaml.org,2002:merge":ei,"tag:yaml.org,2002:omap":Dd,"tag:yaml.org,2002:pairs":Rd,"tag:yaml.org,2002:set":Bd,"tag:yaml.org,2002:timestamp":Oc};function vh(n,e,i){const r=H0.get(e);if(r&&!n)return i&&!r.includes(ei)?r.concat(ei):r.slice();let l=r;if(!l)if(Array.isArray(n))l=[];else{const o=Array.from(H0.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(ei)),l.reduce((o,u)=>{const f=typeof u=="string"?q0[u]:u;if(!f){const h=JSON.stringify(u),g=Object.keys(q0).map(y=>JSON.stringify(y)).join(", ");throw new Error(`Unknown custom tag ${h}; use one of ${g}`)}return o.includes(f)||o.push(f),o},[])}const AN=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class jc{constructor({compat:e,customTags:i,merge:r,resolveKnownTags:l,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?vh(e,"compat"):e?vh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=l?EN:{},this.tags=vh(i,this.name,r),this.toStringOptions=f??null,Object.defineProperty(this,Li,{value:jr}),Object.defineProperty(this,Cn,{value:Nc}),Object.defineProperty(this,kr,{value:Lr}),this.sortMapEntries=typeof u=="function"?u:u===!0?AN:null}clone(){const e=Object.create(jc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function NN(n,e){var h;const i=[];let r=e.directives===!0;if(e.directives!==!1&&n.directives){const g=n.directives.toString(n);g?(i.push(g),r=!0):n.directives.docStart&&(r=!0)}r&&i.push("---");const l=nS(n,e),{commentString:o}=l.options;if(n.commentBefore){i.length!==1&&i.unshift("");const g=o(n.commentBefore);i.unshift(Wn(g,""))}let u=!1,f=null;if(n.contents){if(Ie(n.contents)){if(n.contents.spaceBefore&&r&&i.push(""),n.contents.commentBefore){const m=o(n.contents.commentBefore);i.push(Wn(m,""))}l.forceBlockIndent=!!n.comment,f=n.contents.comment}const g=f?void 0:()=>u=!0;let y=_r(n.contents,l,()=>f=null,g);f&&(y+=us(y,"",o(f))),(y[0]==="|"||y[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${y}`:i.push(y)}else i.push(_r(n.contents,l));if((h=n.directives)!=null&&h.docEnd)if(n.comment){const g=o(n.comment);g.includes(`
`)?(i.push("..."),i.push(Wn(g,""))):i.push(`... ${g}`)}else i.push("...");else{let g=n.comment;g&&u&&(g=g.replace(/^\n+/,"")),g&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(Wn(o(g),"")))}return i.join(`
`)+`
`}class Rr{constructor(e,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,fn,{value:$h});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=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"},r);this.options=o;let{version:u}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new _t({version:u}),this.setSchema(u,r),this.contents=e===void 0?null:this.createNode(e,l,r)}clone(){const e=Object.create(Rr.prototype,{[fn]:{value:$h}});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=Ie(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){or(this.contents)&&this.contents.add(e)}addIn(e,i){or(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const r=Pv(this);e.anchor=!i||r.has(i)?Zv(i||"a",r):i}return new _c(e.anchor)}createNode(e,i,r){let l;if(typeof i=="function")e=i.call({"":e},"",e),l=i;else if(Array.isArray(i)){const _=C=>typeof C=="number"||C instanceof String||C instanceof Number,N=i.filter(_).map(String);N.length>0&&(i=i.concat(N)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:h,onTagObj:g,tag:y}=r??{},{onAnchor:m,setAnchors:w,sourceObjects:v}=tN(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:h??!1,onAnchor:m,onTagObj:g,replacer:l,schema:this.schema,sourceObjects:v},x=rl(e,y,E);return f&&$e(x)&&(x.flow=!0),w(),x}createPair(e,i,r={}){const l=this.createNode(e,null,r),o=this.createNode(i,null,r);return new vt(l,o)}delete(e){return or(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ka(e)?this.contents==null?!1:(this.contents=null,!0):or(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return $e(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ka(e)?!i&&Le(this.contents)?this.contents.value:this.contents:$e(this.contents)?this.contents.getIn(e,i):void 0}has(e){return $e(this.contents)?this.contents.has(e):!1}hasIn(e){return Ka(e)?this.contents!==void 0:$e(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=fc(this.schema,[e],i):or(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ka(e)?this.contents=i:this.contents==null?this.contents=fc(this.schema,Array.from(e),i):or(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new _t({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new _t({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=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(r)this.schema=new jc(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},h=un(this.contents,i??"",f);if(typeof o=="function")for(const{count:g,res:y}of f.anchors.values())o(y,g);return typeof u=="function"?yr(u,{"":h},"",h):h}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 NN(this,e)}}function or(n){if($e(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Hd extends Error{constructor(e,i,r,l){super(),this.name=e,this.code=r,this.message=l,this.pos=i}}class hs extends Hd{constructor(e,i,r){super("YAMLParseError",e,i,r)}}class xS extends Hd{constructor(e,i,r){super("YAMLWarning",e,i,r)}}const dc=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:r,col:l}=i.linePos[0];i.message+=` at line ${r}, column ${l}`;let o=l-1,u=n.substring(e.lineStarts[r-1],e.lineStarts[r]).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)+"…"),r>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[r-2],e.lineStarts[r-1]);f.length>80&&(f=f.substring(0,79)+`…
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const h=i.linePos[1];h&&h.line===r&&h.col>l&&(f=Math.max(1,Math.min(h.col-l,80-o)));const g=" ".repeat(o)+"^".repeat(f);i.message+=`:

${u}
${g}
`}};function Tr(n,{flow:e,indicator:i,next:r,offset:l,onError:o,parentIndent:u,startOnNewline:f}){let h=!1,g=f,y=f,m="",w="",v=!1,E=!1,x=null,_=null,N=null,C=null,$=null,I=null,D=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&&(g&&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"||(r==null?void 0:r.type)!=="flow-collection")&&q.source.includes("	")&&(x=q),y=!0;break;case"comment":{y||o(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const j=q.source.substring(1)||" ";m?m+=w+j:m=j,w="",g=!1;break}case"newline":g?m?m+=q.source:h=!0:w+=q.source,g=!0,v=!0,(_||N)&&(C=q),y=!0;break;case"anchor":_&&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),_=q,D===null&&(D=q.offset),g=!1,y=!1,E=!0;break;case"tag":{N&&o(q,"MULTIPLE_TAGS","A node can have at most one tag"),N=q,D===null&&(D=q.offset),g=!1,y=!1,E=!0;break}case i:(_||N)&&o(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),I&&o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${e??"collection"}`),I=q,g=i==="seq-item-ind"||i==="explicit-key-ind",y=!1;break;case"comma":if(e){$&&o(q,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),$=q,g=!1,y=!1;break}default:o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),g=!1,y=!1}const K=n[n.length-1],Q=K?K.offset+K.source.length:l;return E&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(g&&x.indent<=u||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:$,found:I,spaceBefore:h,comment:m,hasNewline:v,anchor:_,tag:N,newlineAfterProp:C,end:Q,start:D??Q}}function al(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(al(e.key)||al(e.value))return!0}return!1;default:return!0}}function Kh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&al(e)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function _S(n,e,i){const{uniqueKeys:r}=n.options;if(r===!1)return!1;const l=typeof r=="function"?r:(o,u)=>o===u||Le(o)&&Le(u)&&o.value===u.value;return e.some(o=>l(o.key,i))}const $0="All mapping items must start at the same column";function CN({composeNode:n,composeEmptyNode:e},i,r,l,o){var y;const u=(o==null?void 0:o.nodeClass)??Xt,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let h=r.offset,g=null;for(const m of r.items){const{start:w,key:v,sep:E,value:x}=m,_=Tr(w,{indicator:"explicit-key-ind",next:v??(E==null?void 0:E[0]),offset:h,onError:l,parentIndent:r.indent,startOnNewline:!0}),N=!_.found;if(N){if(v&&(v.type==="block-seq"?l(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==r.indent&&l(h,"BAD_INDENT",$0)),!_.anchor&&!_.tag&&!E){g=_.end,_.comment&&(f.comment?f.comment+=`
`+_.comment:f.comment=_.comment);continue}(_.newlineAfterProp||al(v))&&l(v??w[w.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=_.found)==null?void 0:y.indent)!==r.indent&&l(h,"BAD_INDENT",$0);i.atKey=!0;const C=_.end,$=v?n(i,v,_,l):e(i,C,w,null,_,l);i.schema.compat&&Kh(r.indent,v,l),i.atKey=!1,_S(i,f.items,$)&&l(C,"DUPLICATE_KEY","Map keys must be unique");const I=Tr(E??[],{indicator:"map-value-ind",next:x,offset:$.range[2],onError:l,parentIndent:r.indent,startOnNewline:!v||v.type==="block-scalar"});if(h=I.end,I.found){N&&((x==null?void 0:x.type)==="block-map"&&!I.hasNewline&&l(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&_.start<I.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 D=x?n(i,x,I,l):e(i,h,E,null,I,l);i.schema.compat&&Kh(r.indent,x,l),h=D.range[2];const K=new vt($,D);i.options.keepSourceTokens&&(K.srcToken=m),f.items.push(K)}else{N&&l($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),I.comment&&($.comment?$.comment+=`
`+I.comment:$.comment=I.comment);const D=new vt($);i.options.keepSourceTokens&&(D.srcToken=m),f.items.push(D)}}return g&&g<h&&l(g,"IMPOSSIBLE","Map comment with trailing content"),f.range=[r.offset,h,g??h],f}function kN({composeNode:n,composeEmptyNode:e},i,r,l,o){const u=(o==null?void 0:o.nodeClass)??Di,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let h=r.offset,g=null;for(const{start:y,value:m}of r.items){const w=Tr(y,{indicator:"seq-item-ind",next:m,offset:h,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!w.found)if(w.anchor||w.tag||m)m&&m.type==="block-seq"?l(w.end,"BAD_INDENT","All sequence items must start at the same column"):l(h,"MISSING_CHAR","Sequence item without - indicator");else{g=w.end,w.comment&&(f.comment=w.comment);continue}const v=m?n(i,m,w,l):e(i,w.end,y,null,w,l);i.schema.compat&&Kh(r.indent,m,l),h=v.range[2],f.items.push(v)}return f.range=[r.offset,h,g??h],f}function hl(n,e,i,r){let l="";if(n){let o=!1,u="";for(const f of n){const{source:h,type:g}=f;switch(g){case"space":o=!0;break;case"comment":{i&&!o&&r(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=h.substring(1)||" ";l?l+=u+y:l=y,u="";break}case"newline":l&&(u+=h),o=!0;break;default:r(f,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}e+=h.length}}return{comment:l,offset:e}}const Sh="Block collections are not allowed within flow collections",wh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function MN({composeNode:n,composeEmptyNode:e},i,r,l,o){const u=r.start.source==="{",f=u?"flow map":"flow sequence",h=(o==null?void 0:o.nodeClass)??(u?Xt:Di),g=new h(i.schema);g.flow=!0;const y=i.atRoot;y&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let m=r.offset+r.start.source.length;for(let _=0;_<r.items.length;++_){const N=r.items[_],{start:C,key:$,sep:I,value:D}=N,K=Tr(C,{flow:f,indicator:"explicit-key-ind",next:$??(I==null?void 0:I[0]),offset:m,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!K.found){if(!K.anchor&&!K.tag&&!I&&!D){_===0&&K.comma?l(K.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):_<r.items.length-1&&l(K.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),K.comment&&(g.comment?g.comment+=`
`+K.comment:g.comment=K.comment),m=K.end;continue}!u&&i.options.strict&&al($)&&l($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)K.comma&&l(K.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(K.comma||l(K.start,"MISSING_CHAR",`Missing , between ${f} items`),K.comment){let Q="";e:for(const q of C)switch(q.type){case"comma":case"space":break;case"comment":Q=q.source.substring(1);break e;default:break e}if(Q){let q=g.items[g.items.length-1];He(q)&&(q=q.value??q.key),q.comment?q.comment+=`
`+Q:q.comment=Q,K.comment=K.comment.substring(Q.length+1)}}if(!u&&!I&&!K.found){const Q=D?n(i,D,K,l):e(i,K.end,I,null,K,l);g.items.push(Q),m=Q.range[2],wh(D)&&l(Q.range,"BLOCK_IN_FLOW",Sh)}else{i.atKey=!0;const Q=K.end,q=$?n(i,$,K,l):e(i,Q,C,null,K,l);wh($)&&l(q.range,"BLOCK_IN_FLOW",Sh),i.atKey=!1;const j=Tr(I??[],{flow:f,indicator:"map-value-ind",next:D,offset:q.range[2],onError:l,parentIndent:r.indent,startOnNewline:!1});if(j.found){if(!u&&!K.found&&i.options.strict){if(I)for(const V of I){if(V===j.found)break;if(V.type==="newline"){l(V,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}K.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 D&&("source"in D&&D.source&&D.source[0]===":"?l(D,"MISSING_CHAR",`Missing space after : in ${f}`):l(j.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const ne=D?n(i,D,j,l):j.found?e(i,j.end,I,null,j,l):null;ne?wh(D)&&l(ne.range,"BLOCK_IN_FLOW",Sh):j.comment&&(q.comment?q.comment+=`
`+j.comment:q.comment=j.comment);const le=new vt(q,ne);if(i.options.keepSourceTokens&&(le.srcToken=N),u){const V=g;_S(i,V.items,q)&&l(Q,"DUPLICATE_KEY","Map keys must be unique"),V.items.push(le)}else{const V=new Xt(i.schema);V.flow=!0,V.items.push(le);const J=(ne??q).range;V.range=[q.range[0],J[1],J[2]],g.items.push(V)}m=ne?ne.range[2]:j.end}}const w=u?"}":"]",[v,...E]=r.end;let x=m;if(v&&v.source===w)x=v.offset+v.source.length;else{const _=f[0].toUpperCase()+f.substring(1),N=y?`${_} must end with a ${w}`:`${_} in block collection must be sufficiently indented and end with a ${w}`;l(m,y?"MISSING_CHAR":"BAD_INDENT",N),v&&v.source.length!==1&&E.unshift(v)}if(E.length>0){const _=hl(E,x,i.options.strict,l);_.comment&&(g.comment?g.comment+=`
`+_.comment:g.comment=_.comment),g.range=[r.offset,x,_.offset]}else g.range=[r.offset,x,x];return g}function xh(n,e,i,r,l,o){const u=i.type==="block-map"?CN(n,e,i,r,o):i.type==="block-seq"?kN(n,e,i,r,o):MN(n,e,i,r,o),f=u.constructor;return l==="!"||l===f.tagName?(u.tag=f.tagName,u):(l&&(u.tag=l),u)}function ON(n,e,i,r,l){var w;const o=r.tag,u=o?e.directives.tagName(o.source,v=>l(o,"TAG_RESOLVE_FAILED",v)):null;if(i.type==="block-seq"){const{anchor:v,newlineAfterProp:E}=r,x=v&&o?v.offset>o.offset?v:o:v??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===Xt.tagName&&f==="map"||u===Di.tagName&&f==="seq")return xh(n,e,i,l,u);let h=e.schema.tags.find(v=>v.tag===u&&v.collection===f);if(!h){const v=e.schema.knownTags[u];if(v&&v.collection===f)e.schema.tags.push(Object.assign({},v,{default:!1})),h=v;else return v!=null&&v.collection?l(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),xh(n,e,i,l,u)}const g=xh(n,e,i,l,u,h),y=((w=h.resolve)==null?void 0:w.call(h,g,v=>l(o,"TAG_RESOLVE_FAILED",v),e.options))??g,m=Ie(y)?y:new he(y);return m.range=g.range,m.tag=u,h!=null&&h.format&&(m.format=h.format),m}function TS(n,e,i){const r=e.offset,l=jN(e,n.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const o=l.mode===">"?he.BLOCK_FOLDED:he.BLOCK_LITERAL,u=e.source?LN(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const _=u[x][1];if(_===""||_==="\r")f=x;else break}if(f===0){const x=l.chomp==="+"&&u.length>0?`
`.repeat(Math.max(1,u.length-1)):"";let _=r+l.length;return e.source&&(_+=e.source.length),{value:x,type:o,comment:l.comment,range:[r,_,_]}}let h=e.indent+l.indent,g=e.offset+l.length,y=0;for(let x=0;x<f;++x){const[_,N]=u[x];if(N===""||N==="\r")l.indent===0&&_.length>h&&(h=_.length);else{_.length<h&&i(g+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(h=_.length),y=x,h===0&&!n.atRoot&&i(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=_.length+N.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>h&&(f=x+1);let m="",w="",v=!1;for(let x=0;x<y;++x)m+=u[x][0].slice(h)+`
`;for(let x=y;x<f;++x){let[_,N]=u[x];g+=_.length+N.length+1;const C=N[N.length-1]==="\r";if(C&&(N=N.slice(0,-1)),N&&_.length<h){const I=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(g-N.length-(C?2:1),"BAD_INDENT",I),_=""}o===he.BLOCK_LITERAL?(m+=w+_.slice(h)+N,w=`
`):_.length>h||N[0]==="	"?(w===" "?w=`
`:!v&&w===`
`&&(w=`

`),m+=w+_.slice(h)+N,w=`
`,v=!0):N===""?w===`
`?m+=`
`:w=`
`:(m+=w+N,w=" ",v=!1)}switch(l.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)m+=`
`+u[x][0].slice(h);m[m.length-1]!==`
`&&(m+=`
`);break;default:m+=`
`}const E=r+l.length+e.source.length;return{value:m,type:o,comment:l.comment,range:[r,E,E]}}function jN({offset:n,props:e},i,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=e[0],o=l[0];let u=0,f="",h=-1;for(let w=1;w<l.length;++w){const v=l[w];if(!f&&(v==="-"||v==="+"))f=v;else{const E=Number(v);!u&&E?u=E:h===-1&&(h=n+w)}}h!==-1&&r(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let g=!1,y="",m=l.length;for(let w=1;w<e.length;++w){const v=e[w];switch(v.type){case"space":g=!0;case"newline":m+=v.source.length;break;case"comment":i&&!g&&r(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=v.source.length,y=v.source.substring(1);break;case"error":r(v,"UNEXPECTED_TOKEN",v.message),m+=v.source.length;break;default:{const E=`Unexpected token in block scalar header: ${v.type}`;r(v,"UNEXPECTED_TOKEN",E);const x=v.source;x&&typeof x=="string"&&(m+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:y,length:m}}function LN(n){const e=n.split(/\n( *)/),i=e[0],r=i.match(/^( *)/),o=[r!=null&&r[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function ES(n,e,i){const{offset:r,type:l,source:o,end:u}=n;let f,h;const g=(w,v,E)=>i(r+w,v,E);switch(l){case"scalar":f=he.PLAIN,h=RN(o,g);break;case"single-quoted-scalar":f=he.QUOTE_SINGLE,h=DN(o,g);break;case"double-quoted-scalar":f=he.QUOTE_DOUBLE,h=zN(o,g);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const y=r+o.length,m=hl(u,y,e,i);return{value:h,type:f,comment:m.comment,range:[r,y,m.offset]}}function RN(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}`),AS(n)}function DN(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),AS(n.slice(1,-1)).replace(/''/g,"'")}function AS(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 r=e.exec(n);if(!r)return n;let l=r[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;r=i.exec(n);)r[1]===""?o===`
`?l+=o:o=`
`:(l+=o+r[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,r=f.exec(n),l+o+((r==null?void 0:r[1])??"")}function zN(n,e){let i="";for(let r=1;r<n.length-1;++r){const l=n[r];if(!(l==="\r"&&n[r+1]===`
`))if(l===`
`){const{fold:o,offset:u}=BN(n,r);i+=o,r=u}else if(l==="\\"){let o=n[++r];const u=UN[o];if(u)i+=u;else if(o===`
`)for(o=n[r+1];o===" "||o==="	";)o=n[++r+1];else if(o==="\r"&&n[r+1]===`
`)for(o=n[++r+1];o===" "||o==="	";)o=n[++r+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=HN(n,r+1,f,e),r+=f}else{const f=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(l===" "||l==="	"){const o=r;let u=n[r+1];for(;u===" "||u==="	";)u=n[++r+1];u!==`
`&&!(u==="\r"&&n[r+2]===`
`)&&(i+=r>o?n.slice(o,r+1):l)}else i+=l}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function BN(n,e){let i="",r=n[e+1];for(;(r===" "||r==="	"||r===`
`||r==="\r")&&!(r==="\r"&&n[e+2]!==`
`);)r===`
`&&(i+=`
`),e+=1,r=n[e+1];return i||(i=" "),{fold:i,offset:e}}const UN={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"	",v:"\v",N:"",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function HN(n,e,i,r){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 r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function NS(n,e,i,r){const{value:l,type:o,comment:u,range:f}=e.type==="block-scalar"?TS(n,e,r):ES(e,n.options.strict,r),h=i?n.directives.tagName(i.source,m=>r(i,"TAG_RESOLVE_FAILED",m)):null;let g;n.options.stringKeys&&n.atKey?g=n.schema[Cn]:h?g=qN(n.schema,l,h,i,r):e.type==="scalar"?g=$N(n,l,e,r):g=n.schema[Cn];let y;try{const m=g.resolve(l,w=>r(i??e,"TAG_RESOLVE_FAILED",w),n.options);y=Le(m)?m:new he(m)}catch(m){const w=m instanceof Error?m.message:String(m);r(i??e,"TAG_RESOLVE_FAILED",w),y=new he(l)}return y.range=f,y.source=l,o&&(y.type=o),h&&(y.tag=h),g.format&&(y.format=g.format),u&&(y.comment=u),y}function qN(n,e,i,r,l){var f;if(i==="!")return n[Cn];const o=[];for(const h of n.tags)if(!h.collection&&h.tag===i)if(h.default&&h.test)o.push(h);else return h;for(const h of o)if((f=h.test)!=null&&f.test(e))return h;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(l(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[Cn])}function $N({atKey:n,directives:e,schema:i},r,l,o){const u=i.tags.find(f=>{var h;return(f.default===!0||n&&f.default==="key")&&((h=f.test)==null?void 0:h.test(r))})||i[Cn];if(i.compat){const f=i.compat.find(h=>{var g;return h.default&&((g=h.test)==null?void 0:g.test(r))})??i[Cn];if(u.tag!==f.tag){const h=e.tagString(u.tag),g=e.tagString(f.tag),y=`Value may be parsed as either ${h} or ${g}`;o(l,"TAG_RESOLVE_FAILED",y,!0)}}return u}function IN(n,e,i){if(e){i===null&&(i=e.length);for(let r=i-1;r>=0;--r){let l=e[r];switch(l.type){case"space":case"comment":case"newline":n-=l.source.length;continue}for(l=e[++r];(l==null?void 0:l.type)==="space";)n+=l.source.length,l=e[++r];break}}return n}const VN={composeNode:CS,composeEmptyNode:qd};function CS(n,e,i,r){const l=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:h}=i;let g,y=!0;switch(e.type){case"alias":g=GN(n,e,r),(f||h)&&r(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":g=NS(n,e,h,r),f&&(g.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=ON(VN,n,e,i,r),f&&(g.anchor=f.source.substring(1));break;default:{const m=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",m),g=qd(n,e.offset,void 0,null,i,r),y=!1}}return f&&g.anchor===""&&r(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&n.options.stringKeys&&(!Le(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&r(h??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(g.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?g.comment=u:g.commentBefore=u),n.options.keepSourceTokens&&y&&(g.srcToken=e),g}function qd(n,e,i,r,{spaceBefore:l,comment:o,anchor:u,tag:f,end:h},g){const y={type:"scalar",offset:IN(e,i,r),indent:-1,source:""},m=NS(n,y,f,g);return u&&(m.anchor=u.source.substring(1),m.anchor===""&&g(u,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(m.spaceBefore=!0),o&&(m.comment=o,m.range[2]=h),m}function GN({options:n},{offset:e,source:i,end:r},l){const o=new _c(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=hl(r,u,n.strict,l);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function KN(n,e,{offset:i,start:r,value:l,end:o},u){const f=Object.assign({_directives:e},n),h=new Rr(void 0,f),g={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},y=Tr(r,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});y.found&&(h.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!y.hasNewline&&u(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=l?CS(g,l,y,u):qd(g,y.end,r,null,y,u);const m=h.contents.range[2],w=hl(o,m,!1,u);return w.comment&&(h.comment=w.comment),h.range=[i,m,w.offset],h}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 I0(n){var l;let e="",i=!1,r=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":r?`

`:`
`)+(u.substring(1)||" "),i=!0,r=!1;break;case"%":((l=n[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:e,afterEmptyLine:r}}class $d{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,o)=>{const u=Ua(i);o?this.warnings.push(new xS(u,r,l)):this.errors.push(new hs(u,r,l))},this.directives=new _t({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:r,afterEmptyLine:l}=I0(this.prelude);if(r){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
${r}`:r;else if(l||e.directives.docStart||!o)e.commentBefore=r;else if($e(o)&&!o.flow&&o.items.length>0){let u=o.items[0];He(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${r}
${f}`:r}else{const u=o.commentBefore;o.commentBefore=u?`${r}
${u}`:r}}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:I0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,r=-1){for(const l of e)yield*this.next(l);yield*this.end(i,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,r,l)=>{const o=Ua(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",r,l)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=KN(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,r=new hs(Ua(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new hs(Ua(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=hl(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new hs(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 r=Object.assign({_directives:this.directives},this.options),l=new Rr(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function YN(n,e=!0,i){if(n){const r=(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 hs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ES(n,e,r);case"block-scalar":return TS({options:{strict:e}},n,r)}}return null}function XN(n,e){const{implicitKey:i=!1,indent:r,inFlow:l=!1,offset:o=-1,type:u="PLAIN"}=e,f=ul({type:u,value:n},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),h=e.end??[{type:"newline",offset:-1,indent:r,source:`
`}];switch(f[0]){case"|":case">":{const g=f.indexOf(`
`),y=f.substring(0,g),m=f.substring(g+1)+`
`,w=[{type:"block-scalar-header",offset:o,indent:r,source:y}];return kS(w,h)||w.push({type:"newline",offset:-1,indent:r,source:`
`}),{type:"block-scalar",offset:o,indent:r,props:w,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:f,end:h};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:f,end:h};default:return{type:"scalar",offset:o,indent:r,source:f,end:h}}}function FN(n,e,i={}){let{afterKey:r=!1,implicitKey:l=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(r&&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 g=n.props[0];if(g.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=g.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const h=ul({type:u,value:e},{implicitKey:l||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":QN(n,h);break;case'"':_h(n,h,"double-quoted-scalar");break;case"'":_h(n,h,"single-quoted-scalar");break;default:_h(n,h,"scalar")}}function QN(n,e){const i=e.indexOf(`
`),r=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=r,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:r}];kS(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
`});for(const h of Object.keys(n))h!=="type"&&h!=="offset"&&delete n[h];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:l})}}function kS(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 _h(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 r=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 r)o.offset+=l;delete n.props,Object.assign(n,{type:i,source:e,end:r});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 r="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:r,source:e,end:l})}}}const JN=n=>"type"in n?pc(n):Wo(n);function pc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=pc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=Wo(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=Wo(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=Wo(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 Wo({start:n,key:e,sep:i,value:r}){let l="";for(const o of n)l+=o.source;if(e&&(l+=pc(e)),i)for(const o of i)l+=o.source;return r&&(l+=pc(r)),l}const Yh=Symbol("break visit"),PN=Symbol("skip children"),MS=Symbol("remove item");function ps(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),OS(Object.freeze([]),n,e)}ps.BREAK=Yh;ps.SKIP=PN;ps.REMOVE=MS;ps.itemAtPath=(n,e)=>{let i=n;for(const[r,l]of e){const o=i==null?void 0:i[r];if(o&&"items"in o)i=o.items[l];else return}return i};ps.parentCollection=(n,e)=>{const i=ps.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],l=i==null?void 0:i[r];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function OS(n,e,i){let r=i(e,n);if(typeof r=="symbol")return r;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=OS(Object.freeze(n.concat([[l,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Yh)return Yh;f===MS&&(o.items.splice(u,1),u-=1)}}typeof r=="function"&&l==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}const Lc="\uFEFF",Rc="",Dc="",ll="",ZN=n=>!!n&&"items"in n,WN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function eC(n){switch(n){case Lc:return"<BOM>";case Rc:return"<DOC>";case Dc:return"<FLOW_END>";case ll:return"<SCALAR>";default:return JSON.stringify(n)}}function jS(n){switch(n){case Lc:return"byte-order-mark";case Rc:return"doc-mode";case Dc:return"flow-error-end";case ll: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 tC=Object.freeze(Object.defineProperty({__proto__:null,BOM:Lc,DOCUMENT:Rc,FLOW_END:Dc,SCALAR:ll,createScalarToken:XN,isCollection:ZN,isScalar:WN,prettyToken:eC,resolveAsScalar:YN,setScalarValue:FN,stringify:JN,tokenType:jS,visit:ps},Symbol.toStringTag,{value:"Module"}));function mn(n){switch(n){case void 0:case" ":case`
`:case"\r":case"	":return!0;default:return!1}}const V0=new Set("0123456789ABCDEFabcdef"),nC=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ho=new Set(",[]{}"),iC=new Set(` ,[]{}
\r	`),Th=n=>!n||iC.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 r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}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 r=0;for(;i===" ";)i=this.buffer[++r+e];if(i==="\r"){const l=this.buffer[r+e+1];if(l===`
`||!l&&!this.atEnd)return e+r+1}return i===`
`||r>=this.indentNext||!i&&!this.atEnd?e+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&mn(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]===Lc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,r=e.indexOf("#");for(;r!==-1;){const o=e[r-1];if(o===" "||o==="	"){i=r-1;break}else r=e.indexOf("#",r+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 Rc,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==="...")&&mn(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&&!mn(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===":")&&mn(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,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(Th),"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,r=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&mn(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield Dc,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(Th),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||mn(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 r=this.buffer.substring(0,i);let l=r.indexOf(`
`,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=r.indexOf(`
`,o)}l!==-1&&(i=l-(r[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=>mn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){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(!r&&!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(r=this.buffer[l];r===" ";)r=this.buffer[++l];if(r==="	"){for(;r==="	"||r===" "||r==="\r"||r===`
`;)r=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 ll,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,l;for(;l=this.buffer[++r];)if(l===":"){const o=this.buffer[r+1];if(mn(o)||e&&Ho.has(o))break;i=r}else if(mn(l)){let o=this.buffer[r+1];if(l==="\r"&&(o===`
`?(r+=1,l=`
`,o=this.buffer[r+1]):i=r),o==="#"||e&&Ho.has(o))break;if(l===`
`){const u=this.continueScalar(r+1);if(u===-1)break;r=Math.max(r,u-2)}}else{if(e&&Ho.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield ll,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 r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.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(Th))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(mn(i)||e&&Ho.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(;!mn(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(nC.has(i))i=this.buffer[++e];else if(i==="%"&&V0.has(this.buffer[e+1])&&V0.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,r;do r=this.buffer[++i];while(r===" "||e&&r==="	");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,r=this.buffer[i];for(;!e(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class RS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,r=this.lineStarts.length;for(;i<r;){const o=i+r>>1;this.lineStarts[o]<e?i=o+1:r=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 cs(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function G0(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 DS(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 qo(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 cr(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 K0(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!cs(e.start,"explicit-key-ind")&&!cs(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,DS(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 Id{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 r of this.lexer.lex(e,i))yield*this.next(r);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=jS(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 r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,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 r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&K0(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const l=r.items[r.items.length-1];if(l.value){r.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=r.items[r.items.length-1];l.value?r.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=r.items[r.items.length-1];!l||l.value?r.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((r.type==="document"||r.type==="block-map"||r.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&&G0(l.start)===-1&&(i.indent===0||l.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(r.type==="document"?r.end=l.start:r.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":{G0(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=qo(this.peek(2)),r=cr(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:r,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 r;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=(r=l==null?void 0:l.value)==null?void 0:r.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 h=0;h<i.sep.length;++h){const g=i.sep[h];switch(g.type){case"newline":f.push(h);break;case"space":break;case"comment":g.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(cs(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(DS(i.key)&&!cs(i.sep,"newline")){const f=cr(i.start),h=i.key,g=i.sep;g.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:h,sep:g}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(cs(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=cr(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]}):cs(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 r;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=(r=l==null?void 0:l.value)==null?void 0:r.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||cs(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 r;do yield*this.pop(),r=this.peek(1);while(r&&r.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 r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const l=qo(r),o=cr(l);K0(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=qo(e),r=cr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=qo(e),r=cr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.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 zS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new RS||null,prettyErrors:e}}function sC(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Id(i==null?void 0:i.addNewLine),o=new $d(e),u=Array.from(o.compose(l.parse(n)));if(r&&i)for(const f of u)f.errors.forEach(dc(n,i)),f.warnings.forEach(dc(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function BS(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Id(i==null?void 0:i.addNewLine),o=new $d(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 hs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(u.errors.forEach(dc(n,i)),u.warnings.forEach(dc(n,i))),u}function rC(n,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);const l=BS(n,i);if(!l)return null;if(l.warnings.forEach(o=>iS(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:r},i))}function aC(n,e,i){let r=null;if(typeof e=="function"||Array.isArray(e)?r=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 bs(n)&&!r?n.toString(i):new Rr(n,r,i).toString(i)}const US=Object.freeze(Object.defineProperty({__proto__:null,Alias:_c,CST:tC,Composer:$d,Document:Rr,Lexer:LS,LineCounter:RS,Pair:vt,Parser:Id,Scalar:he,Schema:jc,YAMLError:Hd,YAMLMap:Xt,YAMLParseError:hs,YAMLSeq:Di,YAMLWarning:xS,isAlias:ys,isCollection:$e,isDocument:bs,isMap:Mr,isNode:Ie,isPair:He,isScalar:Le,isSeq:Or,parse:rC,parseAllDocuments:sC,parseDocument:BS,stringify:aC,visit:Ri,visitAsync:xc},Symbol.toStringTag,{value:"Module"})),lC=({action:n,model:e,sdkLanguage:i,testIdAttributeName:r,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[h,g]=U.useState("action"),[y]=on("shouldPopulateCanvasFromScreenshot",!1),m=U.useMemo(()=>fC(n),[n]),{snapshotInfoUrl:w,snapshotUrl:v,popoutUrl:E}=U.useMemo(()=>{const _=m[h];return e&&_?hC(e.traceUri,_,y):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,h,y,e]),x=U.useMemo(()=>w!==void 0?{snapshotInfoUrl:w,snapshotUrl:v,popoutUrl:E}:void 0,[w,v,E]);return S.jsxs("div",{className:"snapshot-tab vbox",children:[S.jsxs(nd,{children:[S.jsx(Ht,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:l,onClick:()=>o(!l)}),S.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(_=>S.jsx(Hb,{id:_,title:uC(_),selected:h===_,onSelect:()=>g(_)},_))}),S.jsx("div",{style:{flex:"auto"}}),S.jsx(Ht,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(x!=null&&x.popoutUrl),onClick:()=>{const _=window.open((x==null?void 0:x.popoutUrl)||"","_blank");_==null||_.addEventListener("DOMContentLoaded",()=>{new qv(_,{isUnderTest:qS,sdkLanguage:i,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),S.jsx(oC,{snapshotUrls:x,sdkLanguage:i,testIdAttributeName:r,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},oC=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:r,setIsInspecting:l,highlightedElement:o,setHighlightedElement:u})=>{const f=U.useRef(null),h=U.useRef(null),[g,y]=U.useState({viewport:$S,url:""}),m=U.useRef({iteration:0,visibleIframe:0});return U.useEffect(()=>{(async()=>{const w=m.current.iteration+1,v=1-m.current.visibleIframe;m.current.iteration=w;const E=await dC(n==null?void 0:n.snapshotInfoUrl);if(m.current.iteration!==w)return;const x=[f,h][v].current;if(x){let _=()=>{};const N=new Promise(C=>_=C);try{x.addEventListener("load",_),x.addEventListener("error",_);const C=(n==null?void 0:n.snapshotUrl)||pC;x.contentWindow?x.contentWindow.location.replace(C):x.src=C,await N}catch{}finally{x.removeEventListener("load",_),x.removeEventListener("error",_)}}m.current.iteration===w&&(m.current.visibleIframe=v,y(E))})()},[n]),S.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:w=>{w.key==="Escape"&&r&&l(!1)},children:[S.jsx(Y0,{isInspecting:r,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:m.current.iteration}),S.jsx(Y0,{isInspecting:r,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:h.current,iteration:m.current.iteration}),S.jsx(cC,{snapshotInfo:g,children:S.jsxs("div",{className:"snapshot-switcher",children:[S.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Fe(m.current.visibleIframe===0&&"snapshot-visible")}),S.jsx("iframe",{ref:h,name:"snapshot",title:"DOM Snapshot",className:Fe(m.current.visibleIframe===1&&"snapshot-visible")})]})})]})},cC=({snapshotInfo:n,children:e})=>{const[i,r]=gs(),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),h={x:(i.width-u.width)/2,y:(i.height-u.height)/2};return S.jsx("div",{ref:r,className:"snapshot-wrapper",children:S.jsxs("div",{className:"snapshot-container",style:{width:u.width+"px",height:u.height+"px",transform:`translate(${h.x}px, ${h.y}px) scale(${f})`},children:[S.jsx(PA,{url:n.url}),S.jsx("div",{className:"snapshot-browser-body",children:S.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function uC(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const Y0=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:r,highlightedElement:l,setHighlightedElement:o,iteration:u})=>(U.useEffect(()=>{const f=l.lastEdited==="ariaSnapshot"?l.ariaSnapshot:void 0,h=l.lastEdited==="locator"?l.locator:void 0,g=!!f||!!h||e,y=[],m=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{HS(y,g,i,r,m,"",n==null?void 0:n.contentWindow)}catch{}const w=f?id(US,f):void 0,v=h?QA(i,h,r):void 0;for(const{recorder:E,frameSelector:x}of y){const _=v!=null&&v.startsWith(x)?v.substring(x.length).trim():void 0,N=(w==null?void 0:w.errors.length)===0?w.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:_,ariaTemplate:N,language:i,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(C){o({locator:Oi(i,x+C.selector),ariaSnapshot:C.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const C of y)C.recorder!==E&&C.recorder.clearHighlight()}})}},[n,e,l,o,i,r,u]),S.jsx(S.Fragment,{}));function HS(n,e,i,r,l,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const h=new qv(u,{isUnderTest:l,sdkLanguage:i,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),g=new GA(h);f._injectedScript=h,f._recorder={recorder:g,frameSelector:o},l&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(g)))}f._recorder&&n.push(f._recorder);for(let h=0;h<u.frames.length;++h){const g=u.frames[h],y=g.frameElement?f._injectedScript.generateSelectorSimple(g.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";HS(n,e,i,r,l,o+y,g)}}const Ha=(n,e,i=!1)=>{if(!n)return;const r=n[e];if(r){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:r,pageId:n.pageId,point:n.point,hasInputTarget:i}}};function fC(n){if(!n)return{};let e=Ha(n,"beforeSnapshot");if(!e){for(let l=Wy(n);l;l=Wy(l))if(l.endTime<=n.startTime&&l.afterSnapshot){e=Ha(l,"afterSnapshot");break}}let i=Ha(n,"afterSnapshot");if(!i){let l;for(let o=e0(n);o&&o.startTime<=n.endTime;o=e0(o))o.endTime>n.endTime||!o.afterSnapshot||l&&l.endTime>o.endTime||(l=o);l?i=Ha(l,"afterSnapshot"):i=e}const r=Ha(n,"inputSnapshot",!0)??i;return r&&(r.point=n.point),{action:r,before:e,after:i}}const qS=new URLSearchParams(window.location.search).has("isUnderTest");function hC(n,e,i){const r=new URLSearchParams;r.set("trace",n),r.set("name",e.snapshotName),qS&&r.set("isUnderTest","true"),e.point&&(r.set("pointX",String(e.point.x)),r.set("pointY",String(e.point.y)),e.hasInputTarget&&r.set("hasInputTarget","1")),i&&r.set("shouldPopulateCanvasFromScreenshot","1");const l=new URL(`snapshot/${e.pageId}?${r.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${r.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 dC(n){const e={url:"",viewport:$S,timestamp:void 0,wallTime:void 0};if(n){const r=await(await fetch(n)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const $S={width:1280,height:720},pC='data:text/html,<body style="background: #ddd"></body>',IS={width:200,height:45},hr=2.5,gC=IS.height+hr*2,mC=({boundaries:n,previewPoint:e})=>{var y,m;const i=ti(),[r,l]=gs(),o=U.useRef(null);let u=0;if(o.current&&e){const w=o.current.getBoundingClientRect();u=(e.clientY-w.top+o.current.scrollTop)/gC|0}const f=(m=(y=i==null?void 0:i.pages)==null?void 0:y[u])==null?void 0:m.screencastFrames;let h,g;if(e!==void 0&&f&&f.length){const w=n.minimum+(n.maximum-n.minimum)*e.x/r.width;h=f[F0(f,w,VS)-1];const v={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};g=h?GS({width:h.width,height:h.height},v):void 0}return S.jsxs("div",{className:"film-strip",ref:l,children:[S.jsx("div",{className:"film-strip-lanes",ref:o,children:i==null?void 0:i.pages.map((w,v)=>w.screencastFrames.length?S.jsx(yC,{boundaries:n,page:w,width:r.width},v):null)}),i&&(e==null?void 0:e.x)!==void 0&&S.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(e.x,r.width-(g?g.width:0)-10)},children:[e.action&&S.jsx("div",{className:"film-strip-hover-title",children:ed(e.action,e)}),h&&g&&S.jsx("div",{style:{width:g.width,height:g.height},children:S.jsx("img",{src:i.createRelativeUrl(`sha1/${h.sha1}`),width:g.width,height:g.height})})]})]})},yC=({boundaries:n,page:e,width:i})=>{const r=ti(),l={width:0,height:0},o=e.screencastFrames;for(const _ of o)l.width=Math.max(l.width,_.width),l.height=Math.max(l.height,_.height);const u=GS(l,IS),f=o[0].timestamp,h=o[o.length-1].timestamp,g=n.maximum-n.minimum,y=(f-n.minimum)/g*i,m=(n.maximum-h)/g*i,v=(h-f)/g*i/(u.width+2*hr)|0,E=(h-f)/v,x=[];for(let _=0;f&&E&&_<v;++_){const N=f+E*_,C=F0(o,N,VS)-1;x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${r==null?void 0:r.createRelativeUrl("sha1/"+o[C].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:hr,marginRight:hr}},_))}return x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${r==null?void 0:r.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:hr,marginRight:hr}},x.length)),S.jsx("div",{className:"film-strip-lane",style:{marginLeft:y+"px",marginRight:m+"px"},children:x})};function VS(n,e){return n-e.timestamp}function GS(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 bC=({model:n,boundaries:e,consoleEntries:i,networkResources:r,onSelected:l,highlightedAction:o,highlightedResourceOrdinal:u,highlightedConsoleEntryOrdinal:f,selectedTime:h,setSelectedTime:g,sdkLanguage:y})=>{const[m,w]=gs(),[v,E]=U.useState(),[x,_]=U.useState(),[N]=on("actionsFilter",[]),{offsets:C,curtainLeft:$,curtainRight:I}=U.useMemo(()=>{let J=h||e;if(v&&v.startX!==v.endX){const P=En(m.width,e,v.startX),se=En(m.width,e,v.endX);J={minimum:Math.min(P,se),maximum:Math.max(P,se)}}const W=an(m.width,e,J.minimum),B=an(m.width,e,e.maximum)-an(m.width,e,J.maximum);return{offsets:vC(m.width,e),curtainLeft:W,curtainRight:B}},[h,e,v,m]),D=U.useMemo(()=>n==null?void 0:n.filteredActions(N),[n,N]),K=U.useMemo(()=>{const J=[];for(const W of D||[])J.push({action:W,leftTime:W.startTime,rightTime:W.endTime||e.maximum,leftPosition:an(m.width,e,W.startTime),rightPosition:an(m.width,e,W.endTime||e.maximum),active:!1,error:!!W.error});for(const W of(n==null?void 0:n.resources)||[]){const Ae=W._monotonicTime,B=W._monotonicTime+W.time;J.push({resource:W,leftTime:Ae,rightTime:B,leftPosition:an(m.width,e,Ae),rightPosition:an(m.width,e,B),active:!1,error:!1})}for(const W of i||[])J.push({consoleMessage:W,leftTime:W.timestamp,rightTime:W.timestamp,leftPosition:an(m.width,e,W.timestamp),rightPosition:an(m.width,e,W.timestamp),active:!1,error:W.isError});return J},[n,D,i,e,m]);U.useMemo(()=>{for(const J of K)o?J.active=J.action===o:u!==void 0?J.active=J.resource===(r==null?void 0:r[u]):f!==void 0?J.active=J.consoleMessage===(i==null?void 0:i[f]):J.active=!1},[K,o,u,f,i,r]);const Q=U.useCallback(J=>{if(_(void 0),!w.current)return;const W=J.clientX-w.current.getBoundingClientRect().left,Ae=En(m.width,e,W),B=h?an(m.width,e,h.minimum):0,P=h?an(m.width,e,h.maximum):0;h&&Math.abs(W-B)<10?E({startX:P,endX:W,type:"resize"}):h&&Math.abs(W-P)<10?E({startX:B,endX:W,type:"resize"}):h&&Ae>h.minimum&&Ae<h.maximum&&J.clientY-w.current.getBoundingClientRect().top<20?E({startX:B,endX:P,pivot:W,type:"move"}):E({startX:W,endX:W,type:"resize"})},[e,m,w,h]),q=U.useCallback(J=>{if(!w.current)return;const W=J.clientX-w.current.getBoundingClientRect().left,Ae=En(m.width,e,W),B=D==null?void 0:D.findLast(we=>we.startTime<=Ae);if(!J.buttons){E(void 0);return}if(B&&l(B),!v)return;let P=v;if(v.type==="resize")P={...v,endX:W};else{const we=W-v.pivot;let k=v.startX+we,Y=v.endX+we;k<0&&(k=0,Y=k+(v.endX-v.startX)),Y>m.width&&(Y=m.width,k=Y-(v.endX-v.startX)),P={...v,startX:k,endX:Y,pivot:W}}E(P);const se=En(m.width,e,P.startX),Se=En(m.width,e,P.endX);se!==Se&&g({minimum:Math.min(se,Se),maximum:Math.max(se,Se)})},[e,v,m,D,l,w,g]),j=U.useCallback(()=>{if(_(void 0),!!v){if(v.startX!==v.endX){const J=En(m.width,e,v.startX),W=En(m.width,e,v.endX);g({minimum:Math.min(J,W),maximum:Math.max(J,W)})}else{const J=En(m.width,e,v.startX),W=D==null?void 0:D.findLast(Ae=>Ae.startTime<=J);W&&l(W),g(void 0)}E(void 0)}},[e,v,m,D,g,l]),ne=U.useCallback(J=>{if(!w.current)return;const W=J.clientX-w.current.getBoundingClientRect().left,Ae=En(m.width,e,W),B=D==null?void 0:D.findLast(P=>P.startTime<=Ae);_({x:W,clientY:J.clientY,action:B,sdkLanguage:y})},[e,m,D,w,y]),le=U.useCallback(()=>{_(void 0)},[]),V=U.useCallback(()=>{g(void 0)},[g]);return S.jsxs("div",{className:"timeline-view-container",children:[!!v&&S.jsx(jb,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:j,onPaneMouseMove:q,onPaneDoubleClick:V}),S.jsxs("div",{ref:w,className:"timeline-view",onMouseDown:Q,onMouseMove:ne,onMouseLeave:le,children:[S.jsx("div",{className:"timeline-grid",children:C.map((J,W)=>S.jsx("div",{className:"timeline-divider",style:{left:J.position+"px"},children:S.jsx("div",{className:"timeline-time",children:Et(J.time-e.minimum)})},W))}),S.jsx("div",{style:{height:8}}),S.jsx(mC,{boundaries:e,previewPoint:x}),S.jsx("div",{className:"timeline-bars",children:K.filter(J=>!J.action||J.action.class!=="Test").map((J,W)=>S.jsx("div",{className:Fe("timeline-bar",J.action&&"action",J.resource&&"network",J.consoleMessage&&"console-message",J.active&&"active",J.error&&"error"),style:{left:J.leftPosition,width:Math.max(5,J.rightPosition-J.leftPosition),top:SC(J),bottom:0}},W))}),S.jsx("div",{className:"timeline-marker",style:{display:x!==void 0?"block":"none",left:((x==null?void 0:x.x)||0)+"px"}}),h&&S.jsxs("div",{className:"timeline-window",children:[S.jsx("div",{className:"timeline-window-curtain left",style:{width:$}}),S.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),S.jsx("div",{className:"timeline-window-center",children:S.jsx("div",{className:"timeline-window-drag"})}),S.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),S.jsx("div",{className:"timeline-window-curtain right",style:{width:I}})]})]})]})};function vC(n,e){let r=n/64;const l=e.maximum-e.minimum,o=n/l;let u=l/r;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 h=e.minimum;let g=e.maximum;g+=64/o,r=Math.ceil((g-h)/u),u||(r=0);const y=[];for(let m=0;m<r;++m){const w=h+u*m;y.push({position:an(n,e,w),time:w})}return y}function an(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function En(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}function SC(n){return n.resource?25:20}const wC=({model:n})=>{var i,r;if(!n)return S.jsx(S.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return S.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&S.jsxs("div",{className:"call-line",children:["start time:",S.jsx("span",{className:"call-value datetime",title:e,children:e})]}),S.jsxs("div",{className:"call-line",children:["duration:",S.jsx("span",{className:"call-value number",title:Et(n.endTime-n.startTime),children:Et(n.endTime-n.startTime)})]}),S.jsx("div",{className:"call-section",children:"Browser"}),S.jsxs("div",{className:"call-line",children:["engine:",S.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&S.jsxs("div",{className:"call-line",children:["channel:",S.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&S.jsxs("div",{className:"call-line",children:["platform:",S.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.playwrightVersion&&S.jsxs("div",{className:"call-line",children:["playwright version:",S.jsx("span",{className:"call-value string",title:n.playwrightVersion,children:n.playwrightVersion})]}),n.options.userAgent&&S.jsxs("div",{className:"call-line",children:["user agent:",S.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),S.jsxs("div",{className:"call-line",children:["baseURL:",S.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL})]})]}),S.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["width:",S.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["height:",S.jsx("span",{className:"call-value number",title:String(!!((r=n.options.viewport)!=null&&r.height)),children:n.options.viewport.height})]}),S.jsxs("div",{className:"call-line",children:["is mobile:",S.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&S.jsxs("div",{className:"call-line",children:["device scale:",S.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),S.jsx("div",{className:"call-section",children:"Counts"}),S.jsxs("div",{className:"call-line",children:["pages:",S.jsx("span",{className:"call-value number",children:n.pages.length})]}),S.jsxs("div",{className:"call-line",children:["actions:",S.jsx("span",{className:"call-value number",children:n.actions.length})]}),S.jsxs("div",{className:"call-line",children:["events:",S.jsx("span",{className:"call-value number",children:n.events.length})]})]})},xC=({annotations:n})=>n.length?S.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>S.jsxs("div",{className:"annotation-item",children:[S.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&S.jsxs("span",{children:[": ",Db(e.description)]})]},`annotation-${i}`))}):S.jsx(ms,{text:"No annotations"}),_C=({sdkLanguage:n,isInspecting:e,setIsInspecting:i,highlightedElement:r,setHighlightedElement:l})=>{const[o,u]=U.useState(),f=U.useCallback(h=>{const{errors:g}=id(US,h,{prettyErrors:!1}),y=g.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));u(y),l({...r,ariaSnapshot:h,lastEdited:"ariaSnapshot"}),i(!1)},[r,l,i]);return S.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{children:"Locator"}),S.jsx(Ht,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>i(!e)}),S.jsx("div",{style:{flex:"auto"}}),S.jsx(Ht,{icon:"files",title:"Copy locator",onClick:()=>{Vy(r.locator||"")}})]}),S.jsx("div",{style:{height:50},children:S.jsx(xr,{text:r.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:h=>{l({...r,locator:h,lastEdited:"locator"}),i(!1)}})}),S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),S.jsx(Ht,{icon:"files",title:"Copy snapshot",onClick:()=>{Vy(r.ariaSnapshot||"")}})]}),S.jsx("div",{style:{height:150},children:S.jsx(xr,{text:r.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:f})})]})},TC=({className:n,style:e,open:i,isModal:r,minWidth:l,verticalOffset:o,requestClose:u,anchor:f,dataTestId:h,children:g})=>{const y=U.useRef(null),[m,w]=U.useState(0),[v]=Eh(y),[E,x]=Eh(f),_=f?EC(v,E,o):void 0;return U.useEffect(()=>{const N=$=>{!y.current||!($.target instanceof Node)||y.current.contains($.target)||u==null||u()},C=$=>{$.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",N),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",C)}):()=>{}},[i,u]),U.useLayoutEffect(()=>x(),[i,x]),U.useEffect(()=>{const N=()=>w(C=>C+1);return window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}},[]),U.useLayoutEffect(()=>{y.current&&(i?r?y.current.showModal():y.current.show():y.current.close())},[i,r]),S.jsx("dialog",{ref:y,style:{position:"fixed",margin:_?0:void 0,zIndex:110,top:_==null?void 0:_.top,left:_==null?void 0:_.left,minWidth:l||0,...e},className:n,"data-testid":h,children:g})};function EC(n,e,i=4,r=4){let l=Math.max(r,e.left);l+n.width>window.innerWidth-r&&(l=window.innerWidth-n.width-r);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 AC=({title:n,icon:e,buttonChildren:i,anchorRef:r,dialogDataTestId:l,children:o})=>{const u=U.useRef(null),f=r??u,[h,g]=U.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsx(Ht,{ref:u,icon:e,title:n,onClick:()=>g(y=>!y),children:i}),S.jsx(TC,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:h,verticalOffset:8,requestClose:()=>g(!1),anchor:f,dataTestId:l,children:o})]})},KS=({settings:n})=>S.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return S.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:NC(e,i)},e.name)})}),NC=(n,e)=>{switch(n.type){case"check":return S.jsxs(S.Fragment,{children:[S.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),S.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return S.jsxs(S.Fragment,{children:[S.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]}),S.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},HC=n=>{var i;const e=MC((i=n.model)==null?void 0:i.traceUri);return S.jsx(zb.Provider,{value:n.model,children:S.jsx(CC,{partition:e,...n})})},CC=n=>{var gl;const{partition:e,model:i,showSourcesFirst:r,rootDir:l,fallbackLocation:o,isLive:u,hideTimeline:f,status:h,annotations:g,inert:y,onOpenExternally:m,revealSource:w,testRunMetadata:v}=n,[E,x]=on("navigatorTab","actions"),[_,N]=on("propertiesTab",r?"source":"call"),[C,$]=on("propertiesSidebarLocation","bottom"),[I]=on("actionsFilter",[]),[D,K]=ki("selectedCallId"),[Q,q]=ki("selectedTime"),[j,ne]=ki("highlightedCallId"),[le,V]=ki("revealedErrorKey"),[J,W]=ki("highlightedConsoleMessageOrdinal"),[Ae,B]=ki("revealedAttachmentCallId"),[P,se]=ki("highlightedResourceOrdinal"),[Se,we]=ki("treeState",{expandedItems:new Map});hx(e);const[k,Y]=U.useState({lastEdited:"none"}),[Z,ee]=U.useState(!1),ue=U.useCallback(ce=>{K(ce==null?void 0:ce.callId),V(void 0)},[K,V]),re=U.useMemo(()=>i==null?void 0:i.filteredActions(I),[i,I]),xe=((i==null?void 0:i.actions.length)??0)-((re==null?void 0:re.length)??0),tt=U.useMemo(()=>re==null?void 0:re.find(ce=>ce.callId===j),[re,j]),Re=U.useCallback(ce=>{ne(ce==null?void 0:ce.callId)},[ne]),Bi=U.useMemo(()=>(i==null?void 0:i.sources)||new Map,[i]);U.useEffect(()=>{q(void 0),V(void 0)},[i,q,V]);const kn=U.useMemo(()=>{if(D){const Sn=re==null?void 0:re.find(Ft=>Ft.callId===D);if(Sn)return Sn}const ce=i==null?void 0:i.failedAction();if(ce)return ce;if(re!=null&&re.length){let Sn=re.length-1;for(let Ft=0;Ft<re.length;++Ft)if(re[Ft].title==="After Hooks"&&Ft){Sn=Ft-1;break}return re[Sn]}},[i,re,D]),hn=U.useMemo(()=>tt||kn,[kn,tt]),Dr=U.useCallback(ce=>{ue(ce),Re(void 0)},[ue,Re]),nt=U.useCallback(ce=>{N(ce),ce!=="inspector"&&ee(!1)},[N]),vs=U.useCallback(ce=>{!Z&&ce&&nt("inspector"),ee(ce)},[ee,nt,Z]),zr=U.useCallback(ce=>{Y(ce),nt("inspector")},[nt]),zc=U.useCallback(ce=>{nt("attachments"),B({callId:ce})},[nt,B]);U.useEffect(()=>{w&&nt("source")},[w,nt]);const Ss=rT(i,Q),Ui=MT(i,Q),ni=eT(i),Br=U.useMemo(()=>{var ce;return le!==void 0?(ce=ni.errors.get(le))==null?void 0:ce.stack:hn==null?void 0:hn.stack},[hn,le,ni]),ii=(i==null?void 0:i.sdkLanguage)||"javascript",Bc={id:"inspector",title:"Locator",render:()=>S.jsx(_C,{sdkLanguage:ii,isInspecting:Z,setIsInspecting:vs,highlightedElement:k,setHighlightedElement:Y})},St={id:"call",title:"Call",render:()=>S.jsx(w_,{action:hn,startTimeOffset:(i==null?void 0:i.startTime)??0,sdkLanguage:ii})},Uc={id:"log",title:"Log",render:()=>S.jsx(T_,{action:hn,isLive:u})},dl={id:"errors",title:"Errors",errorCount:ni.errors.size,render:()=>S.jsx(nT,{errorsModel:ni,testRunMetadata:v,sdkLanguage:ii,revealInSource:ce=>{ce.action?ue(ce.action):V(ce.message),nt("source")},wallTime:(i==null?void 0:i.wallTime)??0})};let Ur;!kn&&o&&(Ur=(gl=o.source)==null?void 0:gl.errors.length);const si={id:"source",title:"Source",errorCount:Ur,render:()=>S.jsx(P_,{stack:Br,sources:Bi,rootDir:l,stackFrameLocation:C==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:m})},Hc={id:"console",title:"Console",count:Ss.entries.length,render:()=>S.jsx(aT,{consoleModel:Ss,boundaries:Mn,selectedTime:Q,onAccepted:ce=>q({minimum:ce.timestamp,maximum:ce.timestamp}),onEntryHovered:W})},pl={id:"network",title:"Network",count:Ui.resources.length,render:()=>S.jsx(OT,{boundaries:Mn,networkModel:Ui,onResourceHovered:se,sdkLanguage:(i==null?void 0:i.sdkLanguage)??"javascript"})},qc={id:"attachments",title:"Attachments",count:i==null?void 0:i.visibleAttachments.length,render:()=>S.jsx(V_,{revealedAttachmentCallId:Ae})},Hi=[Bc,St,Uc,dl,Hc,pl,si,qc];if(g!==void 0){const ce={id:"annotations",title:"Annotations",count:g.length,render:()=>S.jsx(xC,{annotations:g})};Hi.push(ce)}if(r){const ce=Hi.indexOf(si);Hi.splice(ce,1),Hi.splice(1,0,si)}const{boundaries:Mn}=U.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 rt=0;!u&&i&&i.endTime>=0?rt=i.endTime-i.startTime:i&&i.wallTime&&(rt=Date.now()-i.wallTime);const vn={id:"actions",title:"Actions",component:S.jsxs("div",{className:"vbox",children:[h&&S.jsxs("div",{className:"workbench-run-status","data-testid":"workbench-run-status",children:[S.jsx("span",{className:Fe("codicon",Mb(h))}),S.jsx("div",{children:b_(h)}),S.jsx("div",{className:"spacer"}),S.jsx("div",{className:"workbench-run-duration",children:rt?Et(rt):""})]}),S.jsx(S_,{sdkLanguage:ii,actions:re||[],selectedAction:i?kn:void 0,selectedTime:Q,setSelectedTime:q,treeState:Se,setTreeState:we,onSelected:Dr,onHighlighted:Re,revealActionAttachment:zc,revealConsole:()=>nt("console"),isLive:u})]})},wt={id:"metadata",title:"Metadata",component:S.jsx(wC,{model:i})},$c=E==="actions"&&S.jsx(kC,{counters:i==null?void 0:i.actionCounters,hiddenActionsCount:xe});return S.jsxs("div",{className:"vbox workbench",...y?{inert:!0}:{},children:[!f&&S.jsx(bC,{model:i,consoleEntries:Ss.entries,networkResources:Ui.resources,boundaries:Mn,highlightedAction:tt,highlightedResourceOrdinal:P,highlightedConsoleEntryOrdinal:J,onSelected:Dr,sdkLanguage:ii,selectedTime:Q,setSelectedTime:q}),S.jsx(nc,{sidebarSize:250,orientation:C==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:S.jsx(nc,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:S.jsx(lC,{action:hn,model:i,sdkLanguage:ii,testIdAttributeName:(i==null?void 0:i.testIdAttributeName)||"data-testid",isInspecting:Z,setIsInspecting:vs,highlightedElement:k,setHighlightedElement:zr}),sidebar:S.jsx(jh,{tabs:[vn,wt],rightToolbar:[$c],selectedTab:E,setSelectedTab:x})}),sidebar:S.jsx(jh,{tabs:Hi,selectedTab:_,setSelectedTab:nt,rightToolbar:[C==="bottom"?S.jsx(Ht,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{$("right")}}):S.jsx(Ht,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{$("bottom")}})],mode:C==="bottom"?"default":"select"})})]})},kC=({counters:n,hiddenActionsCount:e})=>{const[i,r]=on("actionsFilter",[]),l=U.useRef(null),o=S.jsxs(S.Fragment,{children:[e>0&&S.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),S.jsx("span",{ref:l,className:"codicon codicon-filter"})]});return S.jsx(AC,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:o,anchorRef:l,children:S.jsx(KS,{settings:[{type:"check",value:i.includes("getter"),set:u=>r(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=>r(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=>r(u?[...i,"configuration"]:i.filter(f=>f!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};function MC(n){if(!n)return"default";const e=new URL(n,"http://localhost");return e.searchParams.delete("timestamp"),e.toString()}var X0;(n=>{function e(i){for(const r of i.splice(0))r.dispose()}n.disposeAll=e})(X0||(X0={}));class ur{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let r=!1;const l=this,o={dispose(){r||(r=!0,l._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(i){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:l,event:o}=this._deliveryQueue[r];l.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class OC extends Error{constructor(){super("Test server connection closed")}}class qC{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 $C{constructor(e){this._onCloseEmitter=new ur,this._onReportEmitter=new ur,this._onStdioEmitter=new ur,this._onTestFilesChangedEmitter=new ur,this._onLoadTraceRequestedEmitter=new ur,this._onTestPausedEmitter=new ur,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(r=>{const l=JSON.parse(r),{id:o,result:u,error:f,method:h,params:g}=l;if(o){const y=this._callbacks.get(o);if(!y)return;this._callbacks.delete(o),f?y.reject(new Error(f)):y.resolve(u)}else this._dispatchEvent(h,g)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,l)=>{this._transport.onopen(r),this._transport.onerror(l)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i);for(const r of this._callbacks.values())r.reject(new OC);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,i){const r=globalThis.__logForTest;r==null||r({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 IC=({location:n})=>{const[e,i]=on("shouldPopulateCanvasFromScreenshot",!1),[r,l]=bx(),[o,u]=on("mergeFiles",!1);return S.jsx(KS,{settings:[{type:"select",value:r,set:l,name:"Theme",options:mx},...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{AC as D,Rb as E,gt as R,nc as S,BC as T,qC as W,L_ as _,$C as a,IC as b,HC as c,TC as d,LC as e,zC as f,yx as g,RC as h,DC as i,S as j,Fe as k,m_ as l,Et as m,nd as n,Ht as o,on as p,KS as q,U as r,ls as s,Mb as t,gs as u,lx as v};
