playwright-core 1.56.0-alpha-2025-09-16 → 1.56.0-alpha-2025-09-17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-CLiCgG_Q.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
- var _0=Object.defineProperty;var E0=(t,e,n)=>e in t?_0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>E0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function k0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hu={exports:{}},bi={},pu={exports:{}},he={};/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-DhpE2H4B.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
+ var E0=Object.defineProperty;var k0=(t,e,n)=>e in t?E0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>k0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function b0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hu={exports:{}},bi={},pu={exports:{}},he={};/**
3
3
  * @license React
4
4
  * react.production.min.js
5
5
  *
@@ -7,7 +7,7 @@ var _0=Object.defineProperty;var E0=(t,e,n)=>e in t?_0(t,e,{enumerable:!0,config
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var Ip;function b0(){if(Ip)return he;Ip=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function E(L,U,ce){this.props=L,this.context=U,this.refs=S,this.updater=ce||x}E.prototype.isReactComponent={},E.prototype.setState=function(L,U){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,U,"setState")},E.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function N(){}N.prototype=E.prototype;function T(L,U,ce){this.props=L,this.context=U,this.refs=S,this.updater=ce||x}var F=T.prototype=new N;F.constructor=T,k(F,E.prototype),F.isPureReactComponent=!0;var O=Array.isArray,D=Object.prototype.hasOwnProperty,z={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(L,U,ce){var de,ye={},ge=null,ve=null;if(U!=null)for(de in U.ref!==void 0&&(ve=U.ref),U.key!==void 0&&(ge=""+U.key),U)D.call(U,de)&&!G.hasOwnProperty(de)&&(ye[de]=U[de]);var _e=arguments.length-2;if(_e===1)ye.children=ce;else if(1<_e){for(var ke=Array(_e),Ne=0;Ne<_e;Ne++)ke[Ne]=arguments[Ne+2];ye.children=ke}if(L&&L.defaultProps)for(de in _e=L.defaultProps,_e)ye[de]===void 0&&(ye[de]=_e[de]);return{$$typeof:t,type:L,key:ge,ref:ve,props:ye,_owner:z.current}}function I(L,U){return{$$typeof:t,type:L.type,key:U,ref:L.ref,props:L.props,_owner:L._owner}}function Z(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function oe(L){var U={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ce){return U[ce]})}var M=/\/+/g;function H(L,U){return typeof L=="object"&&L!==null&&L.key!=null?oe(""+L.key):U.toString(36)}function fe(L,U,ce,de,ye){var ge=typeof L;(ge==="undefined"||ge==="boolean")&&(L=null);var ve=!1;if(L===null)ve=!0;else switch(ge){case"string":case"number":ve=!0;break;case"object":switch(L.$$typeof){case t:case e:ve=!0}}if(ve)return ve=L,ye=ye(ve),L=de===""?"."+H(ve,0):de,O(ye)?(ce="",L!=null&&(ce=L.replace(M,"$&/")+"/"),fe(ye,U,ce,"",function(Ne){return Ne})):ye!=null&&(Z(ye)&&(ye=I(ye,ce+(!ye.key||ve&&ve.key===ye.key?"":(""+ye.key).replace(M,"$&/")+"/")+L)),U.push(ye)),1;if(ve=0,de=de===""?".":de+":",O(L))for(var _e=0;_e<L.length;_e++){ge=L[_e];var ke=de+H(ge,_e);ve+=fe(ge,U,ce,ke,ye)}else if(ke=v(L),typeof ke=="function")for(L=ke.call(L),_e=0;!(ge=L.next()).done;)ge=ge.value,ke=de+H(ge,_e++),ve+=fe(ge,U,ce,ke,ye);else if(ge==="object")throw U=String(L),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return ve}function xe(L,U,ce){if(L==null)return L;var de=[],ye=0;return fe(L,de,"","",function(ge){return U.call(ce,ge,ye++)}),de}function pe(L){if(L._status===-1){var U=L._result;U=U(),U.then(function(ce){(L._status===0||L._status===-1)&&(L._status=1,L._result=ce)},function(ce){(L._status===0||L._status===-1)&&(L._status=2,L._result=ce)}),L._status===-1&&(L._status=0,L._result=U)}if(L._status===1)return L._result.default;throw L._result}var me={current:null},Q={transition:null},re={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:Q,ReactCurrentOwner:z};function J(){throw Error("act(...) is not supported in production builds of React.")}return he.Children={map:xe,forEach:function(L,U,ce){xe(L,function(){U.apply(this,arguments)},ce)},count:function(L){var U=0;return xe(L,function(){U++}),U},toArray:function(L){return xe(L,function(U){return U})||[]},only:function(L){if(!Z(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},he.Component=E,he.Fragment=n,he.Profiler=o,he.PureComponent=T,he.StrictMode=r,he.Suspense=d,he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,he.act=J,he.cloneElement=function(L,U,ce){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var de=k({},L.props),ye=L.key,ge=L.ref,ve=L._owner;if(U!=null){if(U.ref!==void 0&&(ge=U.ref,ve=z.current),U.key!==void 0&&(ye=""+U.key),L.type&&L.type.defaultProps)var _e=L.type.defaultProps;for(ke in U)D.call(U,ke)&&!G.hasOwnProperty(ke)&&(de[ke]=U[ke]===void 0&&_e!==void 0?_e[ke]:U[ke])}var ke=arguments.length-2;if(ke===1)de.children=ce;else if(1<ke){_e=Array(ke);for(var Ne=0;Ne<ke;Ne++)_e[Ne]=arguments[Ne+2];de.children=_e}return{$$typeof:t,type:L.type,key:ye,ref:ge,props:de,_owner:ve}},he.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:l,_context:L},L.Consumer=L},he.createElement=B,he.createFactory=function(L){var U=B.bind(null,L);return U.type=L,U},he.createRef=function(){return{current:null}},he.forwardRef=function(L){return{$$typeof:u,render:L}},he.isValidElement=Z,he.lazy=function(L){return{$$typeof:m,_payload:{_status:-1,_result:L},_init:pe}},he.memo=function(L,U){return{$$typeof:p,type:L,compare:U===void 0?null:U}},he.startTransition=function(L){var U=Q.transition;Q.transition={};try{L()}finally{Q.transition=U}},he.unstable_act=J,he.useCallback=function(L,U){return me.current.useCallback(L,U)},he.useContext=function(L){return me.current.useContext(L)},he.useDebugValue=function(){},he.useDeferredValue=function(L){return me.current.useDeferredValue(L)},he.useEffect=function(L,U){return me.current.useEffect(L,U)},he.useId=function(){return me.current.useId()},he.useImperativeHandle=function(L,U,ce){return me.current.useImperativeHandle(L,U,ce)},he.useInsertionEffect=function(L,U){return me.current.useInsertionEffect(L,U)},he.useLayoutEffect=function(L,U){return me.current.useLayoutEffect(L,U)},he.useMemo=function(L,U){return me.current.useMemo(L,U)},he.useReducer=function(L,U,ce){return me.current.useReducer(L,U,ce)},he.useRef=function(L){return me.current.useRef(L)},he.useState=function(L){return me.current.useState(L)},he.useSyncExternalStore=function(L,U,ce){return me.current.useSyncExternalStore(L,U,ce)},he.useTransition=function(){return me.current.useTransition()},he.version="18.3.1",he}var Mp;function Zu(){return Mp||(Mp=1,pu.exports=b0()),pu.exports}/**
10
+ */var Ip;function T0(){if(Ip)return he;Ip=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function E(L,U,ce){this.props=L,this.context=U,this.refs=S,this.updater=ce||x}E.prototype.isReactComponent={},E.prototype.setState=function(L,U){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,U,"setState")},E.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function N(){}N.prototype=E.prototype;function T(L,U,ce){this.props=L,this.context=U,this.refs=S,this.updater=ce||x}var F=T.prototype=new N;F.constructor=T,k(F,E.prototype),F.isPureReactComponent=!0;var O=Array.isArray,D=Object.prototype.hasOwnProperty,z={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(L,U,ce){var de,ye={},ge=null,ve=null;if(U!=null)for(de in U.ref!==void 0&&(ve=U.ref),U.key!==void 0&&(ge=""+U.key),U)D.call(U,de)&&!G.hasOwnProperty(de)&&(ye[de]=U[de]);var _e=arguments.length-2;if(_e===1)ye.children=ce;else if(1<_e){for(var ke=Array(_e),Ne=0;Ne<_e;Ne++)ke[Ne]=arguments[Ne+2];ye.children=ke}if(L&&L.defaultProps)for(de in _e=L.defaultProps,_e)ye[de]===void 0&&(ye[de]=_e[de]);return{$$typeof:t,type:L,key:ge,ref:ve,props:ye,_owner:z.current}}function I(L,U){return{$$typeof:t,type:L.type,key:U,ref:L.ref,props:L.props,_owner:L._owner}}function Z(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function oe(L){var U={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ce){return U[ce]})}var M=/\/+/g;function H(L,U){return typeof L=="object"&&L!==null&&L.key!=null?oe(""+L.key):U.toString(36)}function fe(L,U,ce,de,ye){var ge=typeof L;(ge==="undefined"||ge==="boolean")&&(L=null);var ve=!1;if(L===null)ve=!0;else switch(ge){case"string":case"number":ve=!0;break;case"object":switch(L.$$typeof){case t:case e:ve=!0}}if(ve)return ve=L,ye=ye(ve),L=de===""?"."+H(ve,0):de,O(ye)?(ce="",L!=null&&(ce=L.replace(M,"$&/")+"/"),fe(ye,U,ce,"",function(Ne){return Ne})):ye!=null&&(Z(ye)&&(ye=I(ye,ce+(!ye.key||ve&&ve.key===ye.key?"":(""+ye.key).replace(M,"$&/")+"/")+L)),U.push(ye)),1;if(ve=0,de=de===""?".":de+":",O(L))for(var _e=0;_e<L.length;_e++){ge=L[_e];var ke=de+H(ge,_e);ve+=fe(ge,U,ce,ke,ye)}else if(ke=v(L),typeof ke=="function")for(L=ke.call(L),_e=0;!(ge=L.next()).done;)ge=ge.value,ke=de+H(ge,_e++),ve+=fe(ge,U,ce,ke,ye);else if(ge==="object")throw U=String(L),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return ve}function xe(L,U,ce){if(L==null)return L;var de=[],ye=0;return fe(L,de,"","",function(ge){return U.call(ce,ge,ye++)}),de}function pe(L){if(L._status===-1){var U=L._result;U=U(),U.then(function(ce){(L._status===0||L._status===-1)&&(L._status=1,L._result=ce)},function(ce){(L._status===0||L._status===-1)&&(L._status=2,L._result=ce)}),L._status===-1&&(L._status=0,L._result=U)}if(L._status===1)return L._result.default;throw L._result}var me={current:null},Q={transition:null},re={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:Q,ReactCurrentOwner:z};function J(){throw Error("act(...) is not supported in production builds of React.")}return he.Children={map:xe,forEach:function(L,U,ce){xe(L,function(){U.apply(this,arguments)},ce)},count:function(L){var U=0;return xe(L,function(){U++}),U},toArray:function(L){return xe(L,function(U){return U})||[]},only:function(L){if(!Z(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},he.Component=E,he.Fragment=n,he.Profiler=o,he.PureComponent=T,he.StrictMode=r,he.Suspense=d,he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,he.act=J,he.cloneElement=function(L,U,ce){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var de=k({},L.props),ye=L.key,ge=L.ref,ve=L._owner;if(U!=null){if(U.ref!==void 0&&(ge=U.ref,ve=z.current),U.key!==void 0&&(ye=""+U.key),L.type&&L.type.defaultProps)var _e=L.type.defaultProps;for(ke in U)D.call(U,ke)&&!G.hasOwnProperty(ke)&&(de[ke]=U[ke]===void 0&&_e!==void 0?_e[ke]:U[ke])}var ke=arguments.length-2;if(ke===1)de.children=ce;else if(1<ke){_e=Array(ke);for(var Ne=0;Ne<ke;Ne++)_e[Ne]=arguments[Ne+2];de.children=_e}return{$$typeof:t,type:L.type,key:ye,ref:ge,props:de,_owner:ve}},he.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:l,_context:L},L.Consumer=L},he.createElement=B,he.createFactory=function(L){var U=B.bind(null,L);return U.type=L,U},he.createRef=function(){return{current:null}},he.forwardRef=function(L){return{$$typeof:u,render:L}},he.isValidElement=Z,he.lazy=function(L){return{$$typeof:m,_payload:{_status:-1,_result:L},_init:pe}},he.memo=function(L,U){return{$$typeof:p,type:L,compare:U===void 0?null:U}},he.startTransition=function(L){var U=Q.transition;Q.transition={};try{L()}finally{Q.transition=U}},he.unstable_act=J,he.useCallback=function(L,U){return me.current.useCallback(L,U)},he.useContext=function(L){return me.current.useContext(L)},he.useDebugValue=function(){},he.useDeferredValue=function(L){return me.current.useDeferredValue(L)},he.useEffect=function(L,U){return me.current.useEffect(L,U)},he.useId=function(){return me.current.useId()},he.useImperativeHandle=function(L,U,ce){return me.current.useImperativeHandle(L,U,ce)},he.useInsertionEffect=function(L,U){return me.current.useInsertionEffect(L,U)},he.useLayoutEffect=function(L,U){return me.current.useLayoutEffect(L,U)},he.useMemo=function(L,U){return me.current.useMemo(L,U)},he.useReducer=function(L,U,ce){return me.current.useReducer(L,U,ce)},he.useRef=function(L){return me.current.useRef(L)},he.useState=function(L){return me.current.useState(L)},he.useSyncExternalStore=function(L,U,ce){return me.current.useSyncExternalStore(L,U,ce)},he.useTransition=function(){return me.current.useTransition()},he.version="18.3.1",he}var Mp;function ef(){return Mp||(Mp=1,pu.exports=T0()),pu.exports}/**
11
11
  * @license React
12
12
  * react-jsx-runtime.production.min.js
13
13
  *
@@ -15,7 +15,7 @@ var _0=Object.defineProperty;var E0=(t,e,n)=>e in t?_0(t,e,{enumerable:!0,config
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var jp;function T0(){if(jp)return bi;jp=1;var t=Zu(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,p){var m,y={},v=null,x=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(x=d.ref);for(m in d)r.call(d,m)&&!l.hasOwnProperty(m)&&(y[m]=d[m]);if(u&&u.defaultProps)for(m in d=u.defaultProps,d)y[m]===void 0&&(y[m]=d[m]);return{$$typeof:e,type:u,key:v,ref:x,props:y,_owner:o.current}}return bi.Fragment=n,bi.jsx=c,bi.jsxs=c,bi}var Pp;function C0(){return Pp||(Pp=1,hu.exports=T0()),hu.exports}var w=C0(),$=Zu();const Mt=k0($);function Ul(t,e,n,r){const[o,l]=Mt.useState(n);return Mt.useEffect(()=>{let c=!1;return t().then(u=>{c||l(u)}),()=>{c=!0}},e),o}function Pr(){const t=Mt.useRef(null),[e,n]=Mt.useState(new DOMRect(0,0,10,10));return Mt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=r.getBoundingClientRect();n(new DOMRect(0,0,o.width,o.height));const l=new ResizeObserver(c=>{const u=c[c.length-1];u&&u.contentRect&&n(u.contentRect)});return l.observe(r),()=>l.disconnect()},[t]),[e,t]}function pt(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function N0(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function Fg(t,e,n,r,o){let l=0,c=t.length;for(;l<c;){const u=l+c>>1;n(e,t[u])>=0?l=u+1:c=u}return c}function Op(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Nn(t,e){t&&(e=br.getObject(t,e));const[n,r]=Mt.useState(e),o=Mt.useCallback(l=>{t?br.setObject(t,l):r(l)},[t,r]);return Mt.useEffect(()=>{if(t){const l=()=>r(br.getObject(t,e));return br.onChangeEmitter.addEventListener(t,l),()=>br.onChangeEmitter.removeEventListener(t,l)}},[e,t]),[n,o]}class A0{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const br=new A0;function Ue(...t){return t.filter(Boolean).join(" ")}function zg(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Rp="\\u0000-\\u0020\\u007f-\\u009f",Ug=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Rp+'"]{2,}[^\\s'+Rp+`"')}\\],:;.!?]`,"ug");function L0(){const[t,e]=Mt.useState(!1),n=Mt.useCallback(()=>{const r=[];return e(o=>(r.push(setTimeout(()=>e(!1),1e3)),o?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function Fk(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",r=>{r.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",r=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";br.getString("theme",e)==="dark-mode"&&document.body.classList.add("dark-mode")}const ef=new Set;function I0(){const t=Ou(),e=t==="dark-mode"?"light-mode":"dark-mode";document.body.classList.remove(t),document.body.classList.add(e),br.setString("theme",e);for(const n of ef)n(e)}function zk(t){ef.add(t)}function Uk(t){ef.delete(t)}function Ou(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function M0(){const[t,e]=Mt.useState(Ou()==="dark-mode");return[t,n=>{Ou()==="dark-mode"!==n&&I0(),e(n)}]}var wl={},gu={exports:{}},xt={},mu={exports:{}},yu={};/**
18
+ */var jp;function C0(){if(jp)return bi;jp=1;var t=ef(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,p){var m,y={},v=null,x=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(x=d.ref);for(m in d)r.call(d,m)&&!l.hasOwnProperty(m)&&(y[m]=d[m]);if(u&&u.defaultProps)for(m in d=u.defaultProps,d)y[m]===void 0&&(y[m]=d[m]);return{$$typeof:e,type:u,key:v,ref:x,props:y,_owner:o.current}}return bi.Fragment=n,bi.jsx=c,bi.jsxs=c,bi}var Pp;function N0(){return Pp||(Pp=1,hu.exports=C0()),hu.exports}var w=N0(),$=ef();const Mt=b0($);function Ul(t,e,n,r){const[o,l]=Mt.useState(n);return Mt.useEffect(()=>{let c=!1;return t().then(u=>{c||l(u)}),()=>{c=!0}},e),o}function Pr(){const t=Mt.useRef(null),[e,n]=Mt.useState(new DOMRect(0,0,10,10));return Mt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=r.getBoundingClientRect();n(new DOMRect(0,0,o.width,o.height));const l=new ResizeObserver(c=>{const u=c[c.length-1];u&&u.contentRect&&n(u.contentRect)});return l.observe(r),()=>l.disconnect()},[t]),[e,t]}function pt(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function A0(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function zg(t,e,n,r,o){let l=0,c=t.length;for(;l<c;){const u=l+c>>1;n(e,t[u])>=0?l=u+1:c=u}return c}function Op(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Nn(t,e){t&&(e=br.getObject(t,e));const[n,r]=Mt.useState(e),o=Mt.useCallback(l=>{t?br.setObject(t,l):r(l)},[t,r]);return Mt.useEffect(()=>{if(t){const l=()=>r(br.getObject(t,e));return br.onChangeEmitter.addEventListener(t,l),()=>br.onChangeEmitter.removeEventListener(t,l)}},[e,t]),[n,o]}class L0{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const br=new L0;function Ue(...t){return t.filter(Boolean).join(" ")}function Ug(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Rp="\\u0000-\\u0020\\u007f-\\u009f",Hg=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Rp+'"]{2,}[^\\s'+Rp+`"')}\\],:;.!?]`,"ug");function I0(){const[t,e]=Mt.useState(!1),n=Mt.useCallback(()=>{const r=[];return e(o=>(r.push(setTimeout(()=>e(!1),1e3)),o?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function zk(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",r=>{r.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",r=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";br.getString("theme",e)==="dark-mode"&&document.body.classList.add("dark-mode")}const tf=new Set;function M0(){const t=Ru(),e=t==="dark-mode"?"light-mode":"dark-mode";document.body.classList.remove(t),document.body.classList.add(e),br.setString("theme",e);for(const n of tf)n(e)}function Uk(t){tf.add(t)}function Hk(t){tf.delete(t)}function Ru(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function j0(){const[t,e]=Mt.useState(Ru()==="dark-mode");return[t,n=>{Ru()==="dark-mode"!==n&&M0(),e(n)}]}var wl={},gu={exports:{}},xt={},mu={exports:{}},yu={};/**
19
19
  * @license React
20
20
  * scheduler.production.min.js
21
21
  *
@@ -23,7 +23,7 @@ var _0=Object.defineProperty;var E0=(t,e,n)=>e in t?_0(t,e,{enumerable:!0,config
23
23
  *
24
24
  * This source code is licensed under the MIT license found in the
25
25
  * LICENSE file in the root directory of this source tree.
26
- */var $p;function j0(){return $p||($p=1,(function(t){function e(Q,re){var J=Q.length;Q.push(re);e:for(;0<J;){var L=J-1>>>1,U=Q[L];if(0<o(U,re))Q[L]=re,Q[J]=U,J=L;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var re=Q[0],J=Q.pop();if(J!==re){Q[0]=J;e:for(var L=0,U=Q.length,ce=U>>>1;L<ce;){var de=2*(L+1)-1,ye=Q[de],ge=de+1,ve=Q[ge];if(0>o(ye,J))ge<U&&0>o(ve,ye)?(Q[L]=ve,Q[ge]=J,L=ge):(Q[L]=ye,Q[de]=J,L=de);else if(ge<U&&0>o(ve,J))Q[L]=ve,Q[ge]=J,L=ge;else break e}}return re}function o(Q,re){var J=Q.sortIndex-re.sortIndex;return J!==0?J:Q.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();t.unstable_now=function(){return c.now()-u}}var d=[],p=[],m=1,y=null,v=3,x=!1,k=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(Q){for(var re=n(p);re!==null;){if(re.callback===null)r(p);else if(re.startTime<=Q)r(p),re.sortIndex=re.expirationTime,e(d,re);else break;re=n(p)}}function O(Q){if(S=!1,F(Q),!k)if(n(d)!==null)k=!0,pe(D);else{var re=n(p);re!==null&&me(O,re.startTime-Q)}}function D(Q,re){k=!1,S&&(S=!1,N(B),B=-1),x=!0;var J=v;try{for(F(re),y=n(d);y!==null&&(!(y.expirationTime>re)||Q&&!oe());){var L=y.callback;if(typeof L=="function"){y.callback=null,v=y.priorityLevel;var U=L(y.expirationTime<=re);re=t.unstable_now(),typeof U=="function"?y.callback=U:y===n(d)&&r(d),F(re)}else r(d);y=n(d)}if(y!==null)var ce=!0;else{var de=n(p);de!==null&&me(O,de.startTime-re),ce=!1}return ce}finally{y=null,v=J,x=!1}}var z=!1,G=null,B=-1,I=5,Z=-1;function oe(){return!(t.unstable_now()-Z<I)}function M(){if(G!==null){var Q=t.unstable_now();Z=Q;var re=!0;try{re=G(!0,Q)}finally{re?H():(z=!1,G=null)}}else z=!1}var H;if(typeof T=="function")H=function(){T(M)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,xe=fe.port2;fe.port1.onmessage=M,H=function(){xe.postMessage(null)}}else H=function(){E(M,0)};function pe(Q){G=Q,z||(z=!0,H())}function me(Q,re){B=E(function(){Q(t.unstable_now())},re)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_continueExecution=function(){k||x||(k=!0,pe(D))},t.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var re=3;break;default:re=v}var J=v;v=re;try{return Q()}finally{v=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Q,re){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var J=v;v=Q;try{return re()}finally{v=J}},t.unstable_scheduleCallback=function(Q,re,J){var L=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?L+J:L):J=L,Q){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=J+U,Q={id:m++,callback:re,priorityLevel:Q,startTime:J,expirationTime:U,sortIndex:-1},J>L?(Q.sortIndex=J,e(p,Q),n(d)===null&&Q===n(p)&&(S?(N(B),B=-1):S=!0,me(O,J-L))):(Q.sortIndex=U,e(d,Q),k||x||(k=!0,pe(D))),Q},t.unstable_shouldYield=oe,t.unstable_wrapCallback=function(Q){var re=v;return function(){var J=v;v=re;try{return Q.apply(this,arguments)}finally{v=J}}}})(yu)),yu}var Dp;function P0(){return Dp||(Dp=1,mu.exports=j0()),mu.exports}/**
26
+ */var $p;function P0(){return $p||($p=1,(function(t){function e(Q,re){var J=Q.length;Q.push(re);e:for(;0<J;){var L=J-1>>>1,U=Q[L];if(0<o(U,re))Q[L]=re,Q[J]=U,J=L;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var re=Q[0],J=Q.pop();if(J!==re){Q[0]=J;e:for(var L=0,U=Q.length,ce=U>>>1;L<ce;){var de=2*(L+1)-1,ye=Q[de],ge=de+1,ve=Q[ge];if(0>o(ye,J))ge<U&&0>o(ve,ye)?(Q[L]=ve,Q[ge]=J,L=ge):(Q[L]=ye,Q[de]=J,L=de);else if(ge<U&&0>o(ve,J))Q[L]=ve,Q[ge]=J,L=ge;else break e}}return re}function o(Q,re){var J=Q.sortIndex-re.sortIndex;return J!==0?J:Q.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();t.unstable_now=function(){return c.now()-u}}var d=[],p=[],m=1,y=null,v=3,x=!1,k=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(Q){for(var re=n(p);re!==null;){if(re.callback===null)r(p);else if(re.startTime<=Q)r(p),re.sortIndex=re.expirationTime,e(d,re);else break;re=n(p)}}function O(Q){if(S=!1,F(Q),!k)if(n(d)!==null)k=!0,pe(D);else{var re=n(p);re!==null&&me(O,re.startTime-Q)}}function D(Q,re){k=!1,S&&(S=!1,N(B),B=-1),x=!0;var J=v;try{for(F(re),y=n(d);y!==null&&(!(y.expirationTime>re)||Q&&!oe());){var L=y.callback;if(typeof L=="function"){y.callback=null,v=y.priorityLevel;var U=L(y.expirationTime<=re);re=t.unstable_now(),typeof U=="function"?y.callback=U:y===n(d)&&r(d),F(re)}else r(d);y=n(d)}if(y!==null)var ce=!0;else{var de=n(p);de!==null&&me(O,de.startTime-re),ce=!1}return ce}finally{y=null,v=J,x=!1}}var z=!1,G=null,B=-1,I=5,Z=-1;function oe(){return!(t.unstable_now()-Z<I)}function M(){if(G!==null){var Q=t.unstable_now();Z=Q;var re=!0;try{re=G(!0,Q)}finally{re?H():(z=!1,G=null)}}else z=!1}var H;if(typeof T=="function")H=function(){T(M)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,xe=fe.port2;fe.port1.onmessage=M,H=function(){xe.postMessage(null)}}else H=function(){E(M,0)};function pe(Q){G=Q,z||(z=!0,H())}function me(Q,re){B=E(function(){Q(t.unstable_now())},re)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_continueExecution=function(){k||x||(k=!0,pe(D))},t.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var re=3;break;default:re=v}var J=v;v=re;try{return Q()}finally{v=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Q,re){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var J=v;v=Q;try{return re()}finally{v=J}},t.unstable_scheduleCallback=function(Q,re,J){var L=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?L+J:L):J=L,Q){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=J+U,Q={id:m++,callback:re,priorityLevel:Q,startTime:J,expirationTime:U,sortIndex:-1},J>L?(Q.sortIndex=J,e(p,Q),n(d)===null&&Q===n(p)&&(S?(N(B),B=-1):S=!0,me(O,J-L))):(Q.sortIndex=U,e(d,Q),k||x||(k=!0,pe(D))),Q},t.unstable_shouldYield=oe,t.unstable_wrapCallback=function(Q){var re=v;return function(){var J=v;v=re;try{return Q.apply(this,arguments)}finally{v=J}}}})(yu)),yu}var Dp;function O0(){return Dp||(Dp=1,mu.exports=P0()),mu.exports}/**
27
27
  * @license React
28
28
  * react-dom.production.min.js
29
29
  *
@@ -31,46 +31,46 @@ var _0=Object.defineProperty;var E0=(t,e,n)=>e in t?_0(t,e,{enumerable:!0,config
31
31
  *
32
32
  * This source code is licensed under the MIT license found in the
33
33
  * LICENSE file in the root directory of this source tree.
34
- */var Bp;function O0(){if(Bp)return xt;Bp=1;var t=Zu(),e=P0();function n(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function l(s,i){c(s,i),c(s+"Capture",i)}function c(s,i){for(o[s]=i,s=0;s<i.length;s++)r.add(i[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},y={};function v(s){return d.call(y,s)?!0:d.call(m,s)?!1:p.test(s)?y[s]=!0:(m[s]=!0,!1)}function x(s,i,a,f){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function k(s,i,a,f){if(i===null||typeof i>"u"||x(s,i,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function S(s,i,a,f,h,g,_){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=f,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=s,this.type=i,this.sanitizeURL=g,this.removeEmptyString=_}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){E[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];E[i]=new S(i,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){E[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){E[s]=new S(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){E[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){E[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){E[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){E[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){E[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function T(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var i=s.replace(N,T);E[i]=new S(i,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(N,T);E[i]=new S(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(N,T);E[i]=new S(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){E[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),E.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){E[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function F(s,i,a,f){var h=E.hasOwnProperty(i)?E[i]:null;(h!==null?h.type!==0:f||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(k(i,a,h,f)&&(a=null),f||h===null?v(i)&&(a===null?s.removeAttribute(i):s.setAttribute(i,""+a)):h.mustUseProperty?s[h.propertyName]=a===null?h.type===3?!1:"":a:(i=h.attributeName,f=h.attributeNamespace,a===null?s.removeAttribute(i):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,f?s.setAttributeNS(f,i,a):s.setAttribute(i,a))))}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),z=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),oe=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),Q=Symbol.iterator;function re(s){return s===null||typeof s!="object"?null:(s=Q&&s[Q]||s["@@iterator"],typeof s=="function"?s:null)}var J=Object.assign,L;function U(s){if(L===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);L=i&&i[1]||""}return`
34
+ */var Bp;function R0(){if(Bp)return xt;Bp=1;var t=ef(),e=O0();function n(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function l(s,i){c(s,i),c(s+"Capture",i)}function c(s,i){for(o[s]=i,s=0;s<i.length;s++)r.add(i[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},y={};function v(s){return d.call(y,s)?!0:d.call(m,s)?!1:p.test(s)?y[s]=!0:(m[s]=!0,!1)}function x(s,i,a,f){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function k(s,i,a,f){if(i===null||typeof i>"u"||x(s,i,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function S(s,i,a,f,h,g,_){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=f,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=s,this.type=i,this.sanitizeURL=g,this.removeEmptyString=_}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){E[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];E[i]=new S(i,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){E[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){E[s]=new S(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){E[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){E[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){E[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){E[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){E[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function T(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var i=s.replace(N,T);E[i]=new S(i,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(N,T);E[i]=new S(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(N,T);E[i]=new S(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){E[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),E.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){E[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function F(s,i,a,f){var h=E.hasOwnProperty(i)?E[i]:null;(h!==null?h.type!==0:f||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(k(i,a,h,f)&&(a=null),f||h===null?v(i)&&(a===null?s.removeAttribute(i):s.setAttribute(i,""+a)):h.mustUseProperty?s[h.propertyName]=a===null?h.type===3?!1:"":a:(i=h.attributeName,f=h.attributeNamespace,a===null?s.removeAttribute(i):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,f?s.setAttributeNS(f,i,a):s.setAttribute(i,a))))}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),z=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),oe=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),Q=Symbol.iterator;function re(s){return s===null||typeof s!="object"?null:(s=Q&&s[Q]||s["@@iterator"],typeof s=="function"?s:null)}var J=Object.assign,L;function U(s){if(L===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);L=i&&i[1]||""}return`
35
35
  `+L+s}var ce=!1;function de(s,i){if(!s||ce)return"";ce=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(R){var f=R}Reflect.construct(s,[],i)}else{try{i.call()}catch(R){f=R}s.call(i.prototype)}else{try{throw Error()}catch(R){f=R}s()}}catch(R){if(R&&f&&typeof R.stack=="string"){for(var h=R.stack.split(`
36
36
  `),g=f.stack.split(`
37
37
  `),_=h.length-1,b=g.length-1;1<=_&&0<=b&&h[_]!==g[b];)b--;for(;1<=_&&0<=b;_--,b--)if(h[_]!==g[b]){if(_!==1||b!==1)do if(_--,b--,0>b||h[_]!==g[b]){var C=`
38
- `+h[_].replace(" at new "," at ");return s.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",s.displayName)),C}while(1<=_&&0<=b);break}}}finally{ce=!1,Error.prepareStackTrace=a}return(s=s?s.displayName||s.name:"")?U(s):""}function ye(s){switch(s.tag){case 5:return U(s.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return s=de(s.type,!1),s;case 11:return s=de(s.type.render,!1),s;case 1:return s=de(s.type,!0),s;default:return""}}function ge(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case G:return"Fragment";case z:return"Portal";case I:return"Profiler";case B:return"StrictMode";case H:return"Suspense";case fe:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case oe:return(s.displayName||"Context")+".Consumer";case Z:return(s._context.displayName||"Context")+".Provider";case M:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case xe:return i=s.displayName||null,i!==null?i:ge(s.type)||"Memo";case pe:i=s._payload,s=s._init;try{return ge(s(i))}catch{}}return null}function ve(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(i);case 8:return i===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function _e(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ke(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ne(s){var i=ke(s)?"checked":"value",a=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),f=""+s[i];if(!s.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return h.call(this)},set:function(_){f=""+_,g.call(this,_)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function rr(s){s._valueTracker||(s._valueTracker=Ne(s))}function io(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var a=i.getValue(),f="";return s&&(f=ke(s)?s.checked?"true":"false":s.value),s=f,s!==a?(i.setValue(s),!0):!1}function Dr(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function sr(s,i){var a=i.checked;return J({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??s._wrapperState.initialChecked})}function Fs(s,i){var a=i.defaultValue==null?"":i.defaultValue,f=i.checked!=null?i.checked:i.defaultChecked;a=_e(i.value!=null?i.value:a),s._wrapperState={initialChecked:f,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function zs(s,i){i=i.checked,i!=null&&F(s,"checked",i,!1)}function rn(s,i){zs(s,i);var a=_e(i.value),f=i.type;if(a!=null)f==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+a):s.value!==""+a&&(s.value=""+a);else if(f==="submit"||f==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?Us(s,i.type,a):i.hasOwnProperty("defaultValue")&&Us(s,i.type,_e(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function oo(s,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var f=i.type;if(!(f!=="submit"&&f!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,a||i===s.value||(s.value=i),s.defaultValue=i}a=s.name,a!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,a!==""&&(s.name=a)}function Us(s,i,a){(i!=="number"||Dr(s.ownerDocument)!==s)&&(a==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+a&&(s.defaultValue=""+a))}var ir=Array.isArray;function Ln(s,i,a,f){if(s=s.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<s.length;a++)h=i.hasOwnProperty("$"+s[a].value),s[a].selected!==h&&(s[a].selected=h),h&&f&&(s[a].defaultSelected=!0)}else{for(a=""+_e(a),i=null,h=0;h<s.length;h++){if(s[h].value===a){s[h].selected=!0,f&&(s[h].defaultSelected=!0);return}i!==null||s[h].disabled||(i=s[h])}i!==null&&(i.selected=!0)}}function Br(s,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return J({},i,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Fr(s,i){var a=i.value;if(a==null){if(a=i.children,i=i.defaultValue,a!=null){if(i!=null)throw Error(n(92));if(ir(a)){if(1<a.length)throw Error(n(93));a=a[0]}i=a}i==null&&(i=""),a=i}s._wrapperState={initialValue:_e(a)}}function lo(s,i){var a=_e(i.value),f=_e(i.defaultValue);a!=null&&(a=""+a,a!==s.value&&(s.value=a),i.defaultValue==null&&s.defaultValue!==a&&(s.defaultValue=a)),f!=null&&(s.defaultValue=""+f)}function ao(s){var i=s.textContent;i===s._wrapperState.initialValue&&i!==""&&i!==null&&(s.value=i)}function co(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hn(s,i){return s==null||s==="http://www.w3.org/1999/xhtml"?co(i):s==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var In,or=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,a,f,h){MSApp.execUnsafeLocalFunction(function(){return s(i,a,f,h)})}:s})(function(s,i){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=i;else{for(In=In||document.createElement("div"),In.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=In.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}});function lr(s,i){if(i){var a=s.firstChild;if(a&&a===s.lastChild&&a.nodeType===3){a.nodeValue=i;return}}s.textContent=i}var ar={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},uo=["Webkit","ms","Moz","O"];Object.keys(ar).forEach(function(s){uo.forEach(function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),ar[i]=ar[s]})});function le(s,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||ar.hasOwnProperty(s)&&ar[s]?(""+i).trim():i+"px"}function Vt(s,i){s=s.style;for(var a in i)if(i.hasOwnProperty(a)){var f=a.indexOf("--")===0,h=le(a,i[a],f);a==="float"&&(a="cssFloat"),f?s.setProperty(a,h):s[a]=h}}var Wt=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ba(s,i){if(i){if(Wt[s]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Ta(s,i){if(s.indexOf("-")===-1)return typeof i.is=="string";switch(s){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 Ca=null;function Na(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Aa=null,zr=null,Ur=null;function Gf(s){if(s=ui(s)){if(typeof Aa!="function")throw Error(n(280));var i=s.stateNode;i&&(i=Po(i),Aa(s.stateNode,s.type,i))}}function Qf(s){zr?Ur?Ur.push(s):Ur=[s]:zr=s}function Jf(){if(zr){var s=zr,i=Ur;if(Ur=zr=null,Gf(s),i)for(s=0;s<i.length;s++)Gf(i[s])}}function Xf(s,i){return s(i)}function Yf(){}var La=!1;function Zf(s,i,a){if(La)return s(i,a);La=!0;try{return Xf(s,i,a)}finally{La=!1,(zr!==null||Ur!==null)&&(Yf(),Jf())}}function Hs(s,i){var a=s.stateNode;if(a===null)return null;var f=Po(a);if(f===null)return null;a=f[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(s=s.type,f=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!f;break e;default:s=!1}if(s)return null;if(a&&typeof a!="function")throw Error(n(231,i,typeof a));return a}var Ia=!1;if(u)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){Ia=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{Ia=!1}function Nv(s,i,a,f,h,g,_,b,C){var R=Array.prototype.slice.call(arguments,3);try{i.apply(a,R)}catch(V){this.onError(V)}}var Vs=!1,fo=null,ho=!1,Ma=null,Av={onError:function(s){Vs=!0,fo=s}};function Lv(s,i,a,f,h,g,_,b,C){Vs=!1,fo=null,Nv.apply(Av,arguments)}function Iv(s,i,a,f,h,g,_,b,C){if(Lv.apply(this,arguments),Vs){if(Vs){var R=fo;Vs=!1,fo=null}else throw Error(n(198));ho||(ho=!0,Ma=R)}}function cr(s){var i=s,a=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do i=s,(i.flags&4098)!==0&&(a=i.return),s=i.return;while(s)}return i.tag===3?a:null}function ed(s){if(s.tag===13){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function td(s){if(cr(s)!==s)throw Error(n(188))}function Mv(s){var i=s.alternate;if(!i){if(i=cr(s),i===null)throw Error(n(188));return i!==s?null:s}for(var a=s,f=i;;){var h=a.return;if(h===null)break;var g=h.alternate;if(g===null){if(f=h.return,f!==null){a=f;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===a)return td(h),s;if(g===f)return td(h),i;g=g.sibling}throw Error(n(188))}if(a.return!==f.return)a=h,f=g;else{for(var _=!1,b=h.child;b;){if(b===a){_=!0,a=h,f=g;break}if(b===f){_=!0,f=h,a=g;break}b=b.sibling}if(!_){for(b=g.child;b;){if(b===a){_=!0,a=g,f=h;break}if(b===f){_=!0,f=g,a=h;break}b=b.sibling}if(!_)throw Error(n(189))}}if(a.alternate!==f)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?s:i}function nd(s){return s=Mv(s),s!==null?rd(s):null}function rd(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var i=rd(s);if(i!==null)return i;s=s.sibling}return null}var sd=e.unstable_scheduleCallback,id=e.unstable_cancelCallback,jv=e.unstable_shouldYield,Pv=e.unstable_requestPaint,Fe=e.unstable_now,Ov=e.unstable_getCurrentPriorityLevel,ja=e.unstable_ImmediatePriority,od=e.unstable_UserBlockingPriority,po=e.unstable_NormalPriority,Rv=e.unstable_LowPriority,ld=e.unstable_IdlePriority,go=null,sn=null;function $v(s){if(sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(go,s,void 0,(s.current.flags&128)===128)}catch{}}var Kt=Math.clz32?Math.clz32:Fv,Dv=Math.log,Bv=Math.LN2;function Fv(s){return s>>>=0,s===0?32:31-(Dv(s)/Bv|0)|0}var mo=64,yo=4194304;function Ws(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function vo(s,i){var a=s.pendingLanes;if(a===0)return 0;var f=0,h=s.suspendedLanes,g=s.pingedLanes,_=a&268435455;if(_!==0){var b=_&~h;b!==0?f=Ws(b):(g&=_,g!==0&&(f=Ws(g)))}else _=a&~h,_!==0?f=Ws(_):g!==0&&(f=Ws(g));if(f===0)return 0;if(i!==0&&i!==f&&(i&h)===0&&(h=f&-f,g=i&-i,h>=g||h===16&&(g&4194240)!==0))return i;if((f&4)!==0&&(f|=a&16),i=s.entangledLanes,i!==0)for(s=s.entanglements,i&=f;0<i;)a=31-Kt(i),h=1<<a,f|=s[a],i&=~h;return f}function zv(s,i){switch(s){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Uv(s,i){for(var a=s.suspendedLanes,f=s.pingedLanes,h=s.expirationTimes,g=s.pendingLanes;0<g;){var _=31-Kt(g),b=1<<_,C=h[_];C===-1?((b&a)===0||(b&f)!==0)&&(h[_]=zv(b,i)):C<=i&&(s.expiredLanes|=b),g&=~b}}function Pa(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function ad(){var s=mo;return mo<<=1,(mo&4194240)===0&&(mo=64),s}function Oa(s){for(var i=[],a=0;31>a;a++)i.push(s);return i}function Ks(s,i,a){s.pendingLanes|=i,i!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,i=31-Kt(i),s[i]=a}function Hv(s,i){var a=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var f=s.eventTimes;for(s=s.expirationTimes;0<a;){var h=31-Kt(a),g=1<<h;i[h]=0,f[h]=-1,s[h]=-1,a&=~g}}function Ra(s,i){var a=s.entangledLanes|=i;for(s=s.entanglements;a;){var f=31-Kt(a),h=1<<f;h&i|s[f]&i&&(s[f]|=i),a&=~h}}var Ee=0;function cd(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var ud,$a,fd,dd,hd,Da=!1,wo=[],Mn=null,jn=null,Pn=null,Gs=new Map,Qs=new Map,On=[],qv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pd(s,i){switch(s){case"focusin":case"focusout":Mn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":Gs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(i.pointerId)}}function Js(s,i,a,f,h,g){return s===null||s.nativeEvent!==g?(s={blockedOn:i,domEventName:a,eventSystemFlags:f,nativeEvent:g,targetContainers:[h]},i!==null&&(i=ui(i),i!==null&&$a(i)),s):(s.eventSystemFlags|=f,i=s.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),s)}function Vv(s,i,a,f,h){switch(i){case"focusin":return Mn=Js(Mn,s,i,a,f,h),!0;case"dragenter":return jn=Js(jn,s,i,a,f,h),!0;case"mouseover":return Pn=Js(Pn,s,i,a,f,h),!0;case"pointerover":var g=h.pointerId;return Gs.set(g,Js(Gs.get(g)||null,s,i,a,f,h)),!0;case"gotpointercapture":return g=h.pointerId,Qs.set(g,Js(Qs.get(g)||null,s,i,a,f,h)),!0}return!1}function gd(s){var i=ur(s.target);if(i!==null){var a=cr(i);if(a!==null){if(i=a.tag,i===13){if(i=ed(a),i!==null){s.blockedOn=i,hd(s.priority,function(){fd(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){s.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}s.blockedOn=null}function So(s){if(s.blockedOn!==null)return!1;for(var i=s.targetContainers;0<i.length;){var a=Fa(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(a===null){a=s.nativeEvent;var f=new a.constructor(a.type,a);Ca=f,a.target.dispatchEvent(f),Ca=null}else return i=ui(a),i!==null&&$a(i),s.blockedOn=a,!1;i.shift()}return!0}function md(s,i,a){So(s)&&a.delete(i)}function Wv(){Da=!1,Mn!==null&&So(Mn)&&(Mn=null),jn!==null&&So(jn)&&(jn=null),Pn!==null&&So(Pn)&&(Pn=null),Gs.forEach(md),Qs.forEach(md)}function Xs(s,i){s.blockedOn===i&&(s.blockedOn=null,Da||(Da=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Wv)))}function Ys(s){function i(h){return Xs(h,s)}if(0<wo.length){Xs(wo[0],s);for(var a=1;a<wo.length;a++){var f=wo[a];f.blockedOn===s&&(f.blockedOn=null)}}for(Mn!==null&&Xs(Mn,s),jn!==null&&Xs(jn,s),Pn!==null&&Xs(Pn,s),Gs.forEach(i),Qs.forEach(i),a=0;a<On.length;a++)f=On[a],f.blockedOn===s&&(f.blockedOn=null);for(;0<On.length&&(a=On[0],a.blockedOn===null);)gd(a),a.blockedOn===null&&On.shift()}var Hr=O.ReactCurrentBatchConfig,xo=!0;function Kv(s,i,a,f){var h=Ee,g=Hr.transition;Hr.transition=null;try{Ee=1,Ba(s,i,a,f)}finally{Ee=h,Hr.transition=g}}function Gv(s,i,a,f){var h=Ee,g=Hr.transition;Hr.transition=null;try{Ee=4,Ba(s,i,a,f)}finally{Ee=h,Hr.transition=g}}function Ba(s,i,a,f){if(xo){var h=Fa(s,i,a,f);if(h===null)rc(s,i,f,_o,a),pd(s,f);else if(Vv(h,s,i,a,f))f.stopPropagation();else if(pd(s,f),i&4&&-1<qv.indexOf(s)){for(;h!==null;){var g=ui(h);if(g!==null&&ud(g),g=Fa(s,i,a,f),g===null&&rc(s,i,f,_o,a),g===h)break;h=g}h!==null&&f.stopPropagation()}else rc(s,i,f,null,a)}}var _o=null;function Fa(s,i,a,f){if(_o=null,s=Na(f),s=ur(s),s!==null)if(i=cr(s),i===null)s=null;else if(a=i.tag,a===13){if(s=ed(i),s!==null)return s;s=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return _o=s,null}function yd(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ov()){case ja:return 1;case od:return 4;case po:case Rv:return 16;case ld:return 536870912;default:return 16}default:return 16}}var Rn=null,za=null,Eo=null;function vd(){if(Eo)return Eo;var s,i=za,a=i.length,f,h="value"in Rn?Rn.value:Rn.textContent,g=h.length;for(s=0;s<a&&i[s]===h[s];s++);var _=a-s;for(f=1;f<=_&&i[a-f]===h[g-f];f++);return Eo=h.slice(s,1<f?1-f:void 0)}function ko(s){var i=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&i===13&&(s=13)):s=i,s===10&&(s=13),32<=s||s===13?s:0}function bo(){return!0}function wd(){return!1}function Ct(s){function i(a,f,h,g,_){this._reactName=a,this._targetInst=h,this.type=f,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var b in s)s.hasOwnProperty(b)&&(a=s[b],this[b]=a?a(g):g[b]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?bo:wd,this.isPropagationStopped=wd,this}return J(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),i}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ua=Ct(qr),Zs=J({},qr,{view:0,detail:0}),Qv=Ct(Zs),Ha,qa,ei,To=J({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wa,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ei&&(ei&&s.type==="mousemove"?(Ha=s.screenX-ei.screenX,qa=s.screenY-ei.screenY):qa=Ha=0,ei=s),Ha)},movementY:function(s){return"movementY"in s?s.movementY:qa}}),Sd=Ct(To),Jv=J({},To,{dataTransfer:0}),Xv=Ct(Jv),Yv=J({},Zs,{relatedTarget:0}),Va=Ct(Yv),Zv=J({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),ew=Ct(Zv),tw=J({},qr,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),nw=Ct(tw),rw=J({},qr,{data:0}),xd=Ct(rw),sw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iw={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"},ow={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lw(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):(s=ow[s])?!!i[s]:!1}function Wa(){return lw}var aw=J({},Zs,{key:function(s){if(s.key){var i=sw[s.key]||s.key;if(i!=="Unidentified")return i}return s.type==="keypress"?(s=ko(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?iw[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wa,charCode:function(s){return s.type==="keypress"?ko(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ko(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),cw=Ct(aw),uw=J({},To,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_d=Ct(uw),fw=J({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wa}),dw=Ct(fw),hw=J({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),pw=Ct(hw),gw=J({},To,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),mw=Ct(gw),yw=[9,13,27,32],Ka=u&&"CompositionEvent"in window,ti=null;u&&"documentMode"in document&&(ti=document.documentMode);var vw=u&&"TextEvent"in window&&!ti,Ed=u&&(!Ka||ti&&8<ti&&11>=ti),kd=" ",bd=!1;function Td(s,i){switch(s){case"keyup":return yw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cd(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Vr=!1;function ww(s,i){switch(s){case"compositionend":return Cd(i);case"keypress":return i.which!==32?null:(bd=!0,kd);case"textInput":return s=i.data,s===kd&&bd?null:s;default:return null}}function Sw(s,i){if(Vr)return s==="compositionend"||!Ka&&Td(s,i)?(s=vd(),Eo=za=Rn=null,Vr=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ed&&i.locale!=="ko"?null:i.data;default:return null}}var xw={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 Nd(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i==="input"?!!xw[s.type]:i==="textarea"}function Ad(s,i,a,f){Qf(f),i=Io(i,"onChange"),0<i.length&&(a=new Ua("onChange","change",null,a,f),s.push({event:a,listeners:i}))}var ni=null,ri=null;function _w(s){Kd(s,0)}function Co(s){var i=Jr(s);if(io(i))return s}function Ew(s,i){if(s==="change")return i}var Ld=!1;if(u){var Ga;if(u){var Qa="oninput"in document;if(!Qa){var Id=document.createElement("div");Id.setAttribute("oninput","return;"),Qa=typeof Id.oninput=="function"}Ga=Qa}else Ga=!1;Ld=Ga&&(!document.documentMode||9<document.documentMode)}function Md(){ni&&(ni.detachEvent("onpropertychange",jd),ri=ni=null)}function jd(s){if(s.propertyName==="value"&&Co(ri)){var i=[];Ad(i,ri,s,Na(s)),Zf(_w,i)}}function kw(s,i,a){s==="focusin"?(Md(),ni=i,ri=a,ni.attachEvent("onpropertychange",jd)):s==="focusout"&&Md()}function bw(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Co(ri)}function Tw(s,i){if(s==="click")return Co(i)}function Cw(s,i){if(s==="input"||s==="change")return Co(i)}function Nw(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var Gt=typeof Object.is=="function"?Object.is:Nw;function si(s,i){if(Gt(s,i))return!0;if(typeof s!="object"||s===null||typeof i!="object"||i===null)return!1;var a=Object.keys(s),f=Object.keys(i);if(a.length!==f.length)return!1;for(f=0;f<a.length;f++){var h=a[f];if(!d.call(i,h)||!Gt(s[h],i[h]))return!1}return!0}function Pd(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Od(s,i){var a=Pd(s);s=0;for(var f;a;){if(a.nodeType===3){if(f=s+a.textContent.length,s<=i&&f>=i)return{node:a,offset:i-s};s=f}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Pd(a)}}function Rd(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?Rd(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function $d(){for(var s=window,i=Dr();i instanceof s.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)s=i.contentWindow;else break;i=Dr(s.document)}return i}function Ja(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}function Aw(s){var i=$d(),a=s.focusedElem,f=s.selectionRange;if(i!==a&&a&&a.ownerDocument&&Rd(a.ownerDocument.documentElement,a)){if(f!==null&&Ja(a)){if(i=f.start,s=f.end,s===void 0&&(s=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(s,a.value.length);else if(s=(i=a.ownerDocument||document)&&i.defaultView||window,s.getSelection){s=s.getSelection();var h=a.textContent.length,g=Math.min(f.start,h);f=f.end===void 0?g:Math.min(f.end,h),!s.extend&&g>f&&(h=f,f=g,g=h),h=Od(a,g);var _=Od(a,f);h&&_&&(s.rangeCount!==1||s.anchorNode!==h.node||s.anchorOffset!==h.offset||s.focusNode!==_.node||s.focusOffset!==_.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),s.removeAllRanges(),g>f?(s.addRange(i),s.extend(_.node,_.offset)):(i.setEnd(_.node,_.offset),s.addRange(i)))}}for(i=[],s=a;s=s.parentNode;)s.nodeType===1&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<i.length;a++)s=i[a],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Lw=u&&"documentMode"in document&&11>=document.documentMode,Wr=null,Xa=null,ii=null,Ya=!1;function Dd(s,i,a){var f=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ya||Wr==null||Wr!==Dr(f)||(f=Wr,"selectionStart"in f&&Ja(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),ii&&si(ii,f)||(ii=f,f=Io(Xa,"onSelect"),0<f.length&&(i=new Ua("onSelect","select",null,i,a),s.push({event:i,listeners:f}),i.target=Wr)))}function No(s,i){var a={};return a[s.toLowerCase()]=i.toLowerCase(),a["Webkit"+s]="webkit"+i,a["Moz"+s]="moz"+i,a}var Kr={animationend:No("Animation","AnimationEnd"),animationiteration:No("Animation","AnimationIteration"),animationstart:No("Animation","AnimationStart"),transitionend:No("Transition","TransitionEnd")},Za={},Bd={};u&&(Bd=document.createElement("div").style,"AnimationEvent"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),"TransitionEvent"in window||delete Kr.transitionend.transition);function Ao(s){if(Za[s])return Za[s];if(!Kr[s])return s;var i=Kr[s],a;for(a in i)if(i.hasOwnProperty(a)&&a in Bd)return Za[s]=i[a];return s}var Fd=Ao("animationend"),zd=Ao("animationiteration"),Ud=Ao("animationstart"),Hd=Ao("transitionend"),qd=new Map,Vd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $n(s,i){qd.set(s,i),l(i,[s])}for(var ec=0;ec<Vd.length;ec++){var tc=Vd[ec],Iw=tc.toLowerCase(),Mw=tc[0].toUpperCase()+tc.slice(1);$n(Iw,"on"+Mw)}$n(Fd,"onAnimationEnd"),$n(zd,"onAnimationIteration"),$n(Ud,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(Hd,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jw=new Set("cancel close invalid load scroll toggle".split(" ").concat(oi));function Wd(s,i,a){var f=s.type||"unknown-event";s.currentTarget=a,Iv(f,i,void 0,s),s.currentTarget=null}function Kd(s,i){i=(i&4)!==0;for(var a=0;a<s.length;a++){var f=s[a],h=f.event;f=f.listeners;e:{var g=void 0;if(i)for(var _=f.length-1;0<=_;_--){var b=f[_],C=b.instance,R=b.currentTarget;if(b=b.listener,C!==g&&h.isPropagationStopped())break e;Wd(h,b,R),g=C}else for(_=0;_<f.length;_++){if(b=f[_],C=b.instance,R=b.currentTarget,b=b.listener,C!==g&&h.isPropagationStopped())break e;Wd(h,b,R),g=C}}}if(ho)throw s=Ma,ho=!1,Ma=null,s}function Ae(s,i){var a=i[cc];a===void 0&&(a=i[cc]=new Set);var f=s+"__bubble";a.has(f)||(Gd(i,s,2,!1),a.add(f))}function nc(s,i,a){var f=0;i&&(f|=4),Gd(a,s,f,i)}var Lo="_reactListening"+Math.random().toString(36).slice(2);function li(s){if(!s[Lo]){s[Lo]=!0,r.forEach(function(a){a!=="selectionchange"&&(jw.has(a)||nc(a,!1,s),nc(a,!0,s))});var i=s.nodeType===9?s:s.ownerDocument;i===null||i[Lo]||(i[Lo]=!0,nc("selectionchange",!1,i))}}function Gd(s,i,a,f){switch(yd(i)){case 1:var h=Kv;break;case 4:h=Gv;break;default:h=Ba}a=h.bind(null,i,a,s),h=void 0,!Ia||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),f?h!==void 0?s.addEventListener(i,a,{capture:!0,passive:h}):s.addEventListener(i,a,!0):h!==void 0?s.addEventListener(i,a,{passive:h}):s.addEventListener(i,a,!1)}function rc(s,i,a,f,h){var g=f;if((i&1)===0&&(i&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var b=f.stateNode.containerInfo;if(b===h||b.nodeType===8&&b.parentNode===h)break;if(_===4)for(_=f.return;_!==null;){var C=_.tag;if((C===3||C===4)&&(C=_.stateNode.containerInfo,C===h||C.nodeType===8&&C.parentNode===h))return;_=_.return}for(;b!==null;){if(_=ur(b),_===null)return;if(C=_.tag,C===5||C===6){f=g=_;continue e}b=b.parentNode}}f=f.return}Zf(function(){var R=g,V=Na(a),W=[];e:{var q=qd.get(s);if(q!==void 0){var X=Ua,ee=s;switch(s){case"keypress":if(ko(a)===0)break e;case"keydown":case"keyup":X=cw;break;case"focusin":ee="focus",X=Va;break;case"focusout":ee="blur",X=Va;break;case"beforeblur":case"afterblur":X=Va;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":X=Sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Xv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=dw;break;case Fd:case zd:case Ud:X=ew;break;case Hd:X=pw;break;case"scroll":X=Qv;break;case"wheel":X=mw;break;case"copy":case"cut":case"paste":X=nw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=_d}var te=(i&4)!==0,ze=!te&&s==="scroll",j=te?q!==null?q+"Capture":null:q;te=[];for(var A=R,P;A!==null;){P=A;var K=P.stateNode;if(P.tag===5&&K!==null&&(P=K,j!==null&&(K=Hs(A,j),K!=null&&te.push(ai(A,K,P)))),ze)break;A=A.return}0<te.length&&(q=new X(q,ee,null,a,V),W.push({event:q,listeners:te}))}}if((i&7)===0){e:{if(q=s==="mouseover"||s==="pointerover",X=s==="mouseout"||s==="pointerout",q&&a!==Ca&&(ee=a.relatedTarget||a.fromElement)&&(ur(ee)||ee[pn]))break e;if((X||q)&&(q=V.window===V?V:(q=V.ownerDocument)?q.defaultView||q.parentWindow:window,X?(ee=a.relatedTarget||a.toElement,X=R,ee=ee?ur(ee):null,ee!==null&&(ze=cr(ee),ee!==ze||ee.tag!==5&&ee.tag!==6)&&(ee=null)):(X=null,ee=R),X!==ee)){if(te=Sd,K="onMouseLeave",j="onMouseEnter",A="mouse",(s==="pointerout"||s==="pointerover")&&(te=_d,K="onPointerLeave",j="onPointerEnter",A="pointer"),ze=X==null?q:Jr(X),P=ee==null?q:Jr(ee),q=new te(K,A+"leave",X,a,V),q.target=ze,q.relatedTarget=P,K=null,ur(V)===R&&(te=new te(j,A+"enter",ee,a,V),te.target=P,te.relatedTarget=ze,K=te),ze=K,X&&ee)t:{for(te=X,j=ee,A=0,P=te;P;P=Gr(P))A++;for(P=0,K=j;K;K=Gr(K))P++;for(;0<A-P;)te=Gr(te),A--;for(;0<P-A;)j=Gr(j),P--;for(;A--;){if(te===j||j!==null&&te===j.alternate)break t;te=Gr(te),j=Gr(j)}te=null}else te=null;X!==null&&Qd(W,q,X,te,!1),ee!==null&&ze!==null&&Qd(W,ze,ee,te,!0)}}e:{if(q=R?Jr(R):window,X=q.nodeName&&q.nodeName.toLowerCase(),X==="select"||X==="input"&&q.type==="file")var ne=Ew;else if(Nd(q))if(Ld)ne=Cw;else{ne=bw;var se=kw}else(X=q.nodeName)&&X.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(ne=Tw);if(ne&&(ne=ne(s,R))){Ad(W,ne,a,V);break e}se&&se(s,q,R),s==="focusout"&&(se=q._wrapperState)&&se.controlled&&q.type==="number"&&Us(q,"number",q.value)}switch(se=R?Jr(R):window,s){case"focusin":(Nd(se)||se.contentEditable==="true")&&(Wr=se,Xa=R,ii=null);break;case"focusout":ii=Xa=Wr=null;break;case"mousedown":Ya=!0;break;case"contextmenu":case"mouseup":case"dragend":Ya=!1,Dd(W,a,V);break;case"selectionchange":if(Lw)break;case"keydown":case"keyup":Dd(W,a,V)}var ie;if(Ka)e:{switch(s){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else Vr?Td(s,a)&&(ae="onCompositionEnd"):s==="keydown"&&a.keyCode===229&&(ae="onCompositionStart");ae&&(Ed&&a.locale!=="ko"&&(Vr||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Vr&&(ie=vd()):(Rn=V,za="value"in Rn?Rn.value:Rn.textContent,Vr=!0)),se=Io(R,ae),0<se.length&&(ae=new xd(ae,s,null,a,V),W.push({event:ae,listeners:se}),ie?ae.data=ie:(ie=Cd(a),ie!==null&&(ae.data=ie)))),(ie=vw?ww(s,a):Sw(s,a))&&(R=Io(R,"onBeforeInput"),0<R.length&&(V=new xd("onBeforeInput","beforeinput",null,a,V),W.push({event:V,listeners:R}),V.data=ie))}Kd(W,i)})}function ai(s,i,a){return{instance:s,listener:i,currentTarget:a}}function Io(s,i){for(var a=i+"Capture",f=[];s!==null;){var h=s,g=h.stateNode;h.tag===5&&g!==null&&(h=g,g=Hs(s,a),g!=null&&f.unshift(ai(s,g,h)),g=Hs(s,i),g!=null&&f.push(ai(s,g,h))),s=s.return}return f}function Gr(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function Qd(s,i,a,f,h){for(var g=i._reactName,_=[];a!==null&&a!==f;){var b=a,C=b.alternate,R=b.stateNode;if(C!==null&&C===f)break;b.tag===5&&R!==null&&(b=R,h?(C=Hs(a,g),C!=null&&_.unshift(ai(a,C,b))):h||(C=Hs(a,g),C!=null&&_.push(ai(a,C,b)))),a=a.return}_.length!==0&&s.push({event:i,listeners:_})}var Pw=/\r\n?/g,Ow=/\u0000|\uFFFD/g;function Jd(s){return(typeof s=="string"?s:""+s).replace(Pw,`
39
- `).replace(Ow,"")}function Mo(s,i,a){if(i=Jd(i),Jd(s)!==i&&a)throw Error(n(425))}function jo(){}var sc=null,ic=null;function oc(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var lc=typeof setTimeout=="function"?setTimeout:void 0,Rw=typeof clearTimeout=="function"?clearTimeout:void 0,Xd=typeof Promise=="function"?Promise:void 0,$w=typeof queueMicrotask=="function"?queueMicrotask:typeof Xd<"u"?function(s){return Xd.resolve(null).then(s).catch(Dw)}:lc;function Dw(s){setTimeout(function(){throw s})}function ac(s,i){var a=i,f=0;do{var h=a.nextSibling;if(s.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(f===0){s.removeChild(h),Ys(i);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=h}while(a);Ys(i)}function Dn(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function Yd(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return s;i--}else a==="/$"&&i++}s=s.previousSibling}return null}var Qr=Math.random().toString(36).slice(2),on="__reactFiber$"+Qr,ci="__reactProps$"+Qr,pn="__reactContainer$"+Qr,cc="__reactEvents$"+Qr,Bw="__reactListeners$"+Qr,Fw="__reactHandles$"+Qr;function ur(s){var i=s[on];if(i)return i;for(var a=s.parentNode;a;){if(i=a[pn]||a[on]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(s=Yd(s);s!==null;){if(a=s[on])return a;s=Yd(s)}return i}s=a,a=s.parentNode}return null}function ui(s){return s=s[on]||s[pn],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Jr(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Po(s){return s[ci]||null}var uc=[],Xr=-1;function Bn(s){return{current:s}}function Le(s){0>Xr||(s.current=uc[Xr],uc[Xr]=null,Xr--)}function Ce(s,i){Xr++,uc[Xr]=s.current,s.current=i}var Fn={},st=Bn(Fn),mt=Bn(!1),fr=Fn;function Yr(s,i){var a=s.type.contextTypes;if(!a)return Fn;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===i)return f.__reactInternalMemoizedMaskedChildContext;var h={},g;for(g in a)h[g]=i[g];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=h),h}function yt(s){return s=s.childContextTypes,s!=null}function Oo(){Le(mt),Le(st)}function Zd(s,i,a){if(st.current!==Fn)throw Error(n(168));Ce(st,i),Ce(mt,a)}function eh(s,i,a){var f=s.stateNode;if(i=i.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var h in f)if(!(h in i))throw Error(n(108,ve(s)||"Unknown",h));return J({},a,f)}function Ro(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Fn,fr=st.current,Ce(st,s),Ce(mt,mt.current),!0}function th(s,i,a){var f=s.stateNode;if(!f)throw Error(n(169));a?(s=eh(s,i,fr),f.__reactInternalMemoizedMergedChildContext=s,Le(mt),Le(st),Ce(st,s)):Le(mt),Ce(mt,a)}var gn=null,$o=!1,fc=!1;function nh(s){gn===null?gn=[s]:gn.push(s)}function zw(s){$o=!0,nh(s)}function zn(){if(!fc&&gn!==null){fc=!0;var s=0,i=Ee;try{var a=gn;for(Ee=1;s<a.length;s++){var f=a[s];do f=f(!0);while(f!==null)}gn=null,$o=!1}catch(h){throw gn!==null&&(gn=gn.slice(s+1)),sd(ja,zn),h}finally{Ee=i,fc=!1}}return null}var Zr=[],es=0,Do=null,Bo=0,Pt=[],Ot=0,dr=null,mn=1,yn="";function hr(s,i){Zr[es++]=Bo,Zr[es++]=Do,Do=s,Bo=i}function rh(s,i,a){Pt[Ot++]=mn,Pt[Ot++]=yn,Pt[Ot++]=dr,dr=s;var f=mn;s=yn;var h=32-Kt(f)-1;f&=~(1<<h),a+=1;var g=32-Kt(i)+h;if(30<g){var _=h-h%5;g=(f&(1<<_)-1).toString(32),f>>=_,h-=_,mn=1<<32-Kt(i)+h|a<<h|f,yn=g+s}else mn=1<<g|a<<h|f,yn=s}function dc(s){s.return!==null&&(hr(s,1),rh(s,1,0))}function hc(s){for(;s===Do;)Do=Zr[--es],Zr[es]=null,Bo=Zr[--es],Zr[es]=null;for(;s===dr;)dr=Pt[--Ot],Pt[Ot]=null,yn=Pt[--Ot],Pt[Ot]=null,mn=Pt[--Ot],Pt[Ot]=null}var Nt=null,At=null,Ie=!1,Qt=null;function sh(s,i){var a=Bt(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=s,i=s.deletions,i===null?(s.deletions=[a],s.flags|=16):i.push(a)}function ih(s,i){switch(s.tag){case 5:var a=s.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,Nt=s,At=Dn(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,Nt=s,At=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=dr!==null?{id:mn,overflow:yn}:null,s.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Bt(18,null,null,0),a.stateNode=i,a.return=s,s.child=a,Nt=s,At=null,!0):!1;default:return!1}}function pc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function gc(s){if(Ie){var i=At;if(i){var a=i;if(!ih(s,i)){if(pc(s))throw Error(n(418));i=Dn(a.nextSibling);var f=Nt;i&&ih(s,i)?sh(f,a):(s.flags=s.flags&-4097|2,Ie=!1,Nt=s)}}else{if(pc(s))throw Error(n(418));s.flags=s.flags&-4097|2,Ie=!1,Nt=s}}}function oh(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Nt=s}function Fo(s){if(s!==Nt)return!1;if(!Ie)return oh(s),Ie=!0,!1;var i;if((i=s.tag!==3)&&!(i=s.tag!==5)&&(i=s.type,i=i!=="head"&&i!=="body"&&!oc(s.type,s.memoizedProps)),i&&(i=At)){if(pc(s))throw lh(),Error(n(418));for(;i;)sh(s,i),i=Dn(i.nextSibling)}if(oh(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="/$"){if(i===0){At=Dn(s.nextSibling);break e}i--}else a!=="$"&&a!=="$!"&&a!=="$?"||i++}s=s.nextSibling}At=null}}else At=Nt?Dn(s.stateNode.nextSibling):null;return!0}function lh(){for(var s=At;s;)s=Dn(s.nextSibling)}function ts(){At=Nt=null,Ie=!1}function mc(s){Qt===null?Qt=[s]:Qt.push(s)}var Uw=O.ReactCurrentBatchConfig;function fi(s,i,a){if(s=a.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var f=a.stateNode}if(!f)throw Error(n(147,s));var h=f,g=""+s;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===g?i.ref:(i=function(_){var b=h.refs;_===null?delete b[g]:b[g]=_},i._stringRef=g,i)}if(typeof s!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,s))}return s}function zo(s,i){throw s=Object.prototype.toString.call(i),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s))}function ah(s){var i=s._init;return i(s._payload)}function ch(s){function i(j,A){if(s){var P=j.deletions;P===null?(j.deletions=[A],j.flags|=16):P.push(A)}}function a(j,A){if(!s)return null;for(;A!==null;)i(j,A),A=A.sibling;return null}function f(j,A){for(j=new Map;A!==null;)A.key!==null?j.set(A.key,A):j.set(A.index,A),A=A.sibling;return j}function h(j,A){return j=Qn(j,A),j.index=0,j.sibling=null,j}function g(j,A,P){return j.index=P,s?(P=j.alternate,P!==null?(P=P.index,P<A?(j.flags|=2,A):P):(j.flags|=2,A)):(j.flags|=1048576,A)}function _(j){return s&&j.alternate===null&&(j.flags|=2),j}function b(j,A,P,K){return A===null||A.tag!==6?(A=lu(P,j.mode,K),A.return=j,A):(A=h(A,P),A.return=j,A)}function C(j,A,P,K){var ne=P.type;return ne===G?V(j,A,P.props.children,K,P.key):A!==null&&(A.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===pe&&ah(ne)===A.type)?(K=h(A,P.props),K.ref=fi(j,A,P),K.return=j,K):(K=fl(P.type,P.key,P.props,null,j.mode,K),K.ref=fi(j,A,P),K.return=j,K)}function R(j,A,P,K){return A===null||A.tag!==4||A.stateNode.containerInfo!==P.containerInfo||A.stateNode.implementation!==P.implementation?(A=au(P,j.mode,K),A.return=j,A):(A=h(A,P.children||[]),A.return=j,A)}function V(j,A,P,K,ne){return A===null||A.tag!==7?(A=xr(P,j.mode,K,ne),A.return=j,A):(A=h(A,P),A.return=j,A)}function W(j,A,P){if(typeof A=="string"&&A!==""||typeof A=="number")return A=lu(""+A,j.mode,P),A.return=j,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case D:return P=fl(A.type,A.key,A.props,null,j.mode,P),P.ref=fi(j,null,A),P.return=j,P;case z:return A=au(A,j.mode,P),A.return=j,A;case pe:var K=A._init;return W(j,K(A._payload),P)}if(ir(A)||re(A))return A=xr(A,j.mode,P,null),A.return=j,A;zo(j,A)}return null}function q(j,A,P,K){var ne=A!==null?A.key:null;if(typeof P=="string"&&P!==""||typeof P=="number")return ne!==null?null:b(j,A,""+P,K);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case D:return P.key===ne?C(j,A,P,K):null;case z:return P.key===ne?R(j,A,P,K):null;case pe:return ne=P._init,q(j,A,ne(P._payload),K)}if(ir(P)||re(P))return ne!==null?null:V(j,A,P,K,null);zo(j,P)}return null}function X(j,A,P,K,ne){if(typeof K=="string"&&K!==""||typeof K=="number")return j=j.get(P)||null,b(A,j,""+K,ne);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case D:return j=j.get(K.key===null?P:K.key)||null,C(A,j,K,ne);case z:return j=j.get(K.key===null?P:K.key)||null,R(A,j,K,ne);case pe:var se=K._init;return X(j,A,P,se(K._payload),ne)}if(ir(K)||re(K))return j=j.get(P)||null,V(A,j,K,ne,null);zo(A,K)}return null}function ee(j,A,P,K){for(var ne=null,se=null,ie=A,ae=A=0,Xe=null;ie!==null&&ae<P.length;ae++){ie.index>ae?(Xe=ie,ie=null):Xe=ie.sibling;var Se=q(j,ie,P[ae],K);if(Se===null){ie===null&&(ie=Xe);break}s&&ie&&Se.alternate===null&&i(j,ie),A=g(Se,A,ae),se===null?ne=Se:se.sibling=Se,se=Se,ie=Xe}if(ae===P.length)return a(j,ie),Ie&&hr(j,ae),ne;if(ie===null){for(;ae<P.length;ae++)ie=W(j,P[ae],K),ie!==null&&(A=g(ie,A,ae),se===null?ne=ie:se.sibling=ie,se=ie);return Ie&&hr(j,ae),ne}for(ie=f(j,ie);ae<P.length;ae++)Xe=X(ie,j,ae,P[ae],K),Xe!==null&&(s&&Xe.alternate!==null&&ie.delete(Xe.key===null?ae:Xe.key),A=g(Xe,A,ae),se===null?ne=Xe:se.sibling=Xe,se=Xe);return s&&ie.forEach(function(Jn){return i(j,Jn)}),Ie&&hr(j,ae),ne}function te(j,A,P,K){var ne=re(P);if(typeof ne!="function")throw Error(n(150));if(P=ne.call(P),P==null)throw Error(n(151));for(var se=ne=null,ie=A,ae=A=0,Xe=null,Se=P.next();ie!==null&&!Se.done;ae++,Se=P.next()){ie.index>ae?(Xe=ie,ie=null):Xe=ie.sibling;var Jn=q(j,ie,Se.value,K);if(Jn===null){ie===null&&(ie=Xe);break}s&&ie&&Jn.alternate===null&&i(j,ie),A=g(Jn,A,ae),se===null?ne=Jn:se.sibling=Jn,se=Jn,ie=Xe}if(Se.done)return a(j,ie),Ie&&hr(j,ae),ne;if(ie===null){for(;!Se.done;ae++,Se=P.next())Se=W(j,Se.value,K),Se!==null&&(A=g(Se,A,ae),se===null?ne=Se:se.sibling=Se,se=Se);return Ie&&hr(j,ae),ne}for(ie=f(j,ie);!Se.done;ae++,Se=P.next())Se=X(ie,j,ae,Se.value,K),Se!==null&&(s&&Se.alternate!==null&&ie.delete(Se.key===null?ae:Se.key),A=g(Se,A,ae),se===null?ne=Se:se.sibling=Se,se=Se);return s&&ie.forEach(function(x0){return i(j,x0)}),Ie&&hr(j,ae),ne}function ze(j,A,P,K){if(typeof P=="object"&&P!==null&&P.type===G&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case D:e:{for(var ne=P.key,se=A;se!==null;){if(se.key===ne){if(ne=P.type,ne===G){if(se.tag===7){a(j,se.sibling),A=h(se,P.props.children),A.return=j,j=A;break e}}else if(se.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===pe&&ah(ne)===se.type){a(j,se.sibling),A=h(se,P.props),A.ref=fi(j,se,P),A.return=j,j=A;break e}a(j,se);break}else i(j,se);se=se.sibling}P.type===G?(A=xr(P.props.children,j.mode,K,P.key),A.return=j,j=A):(K=fl(P.type,P.key,P.props,null,j.mode,K),K.ref=fi(j,A,P),K.return=j,j=K)}return _(j);case z:e:{for(se=P.key;A!==null;){if(A.key===se)if(A.tag===4&&A.stateNode.containerInfo===P.containerInfo&&A.stateNode.implementation===P.implementation){a(j,A.sibling),A=h(A,P.children||[]),A.return=j,j=A;break e}else{a(j,A);break}else i(j,A);A=A.sibling}A=au(P,j.mode,K),A.return=j,j=A}return _(j);case pe:return se=P._init,ze(j,A,se(P._payload),K)}if(ir(P))return ee(j,A,P,K);if(re(P))return te(j,A,P,K);zo(j,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,A!==null&&A.tag===6?(a(j,A.sibling),A=h(A,P),A.return=j,j=A):(a(j,A),A=lu(P,j.mode,K),A.return=j,j=A),_(j)):a(j,A)}return ze}var ns=ch(!0),uh=ch(!1),Uo=Bn(null),Ho=null,rs=null,yc=null;function vc(){yc=rs=Ho=null}function wc(s){var i=Uo.current;Le(Uo),s._currentValue=i}function Sc(s,i,a){for(;s!==null;){var f=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),s===a)break;s=s.return}}function ss(s,i){Ho=s,yc=rs=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&i)!==0&&(vt=!0),s.firstContext=null)}function Rt(s){var i=s._currentValue;if(yc!==s)if(s={context:s,memoizedValue:i,next:null},rs===null){if(Ho===null)throw Error(n(308));rs=s,Ho.dependencies={lanes:0,firstContext:s}}else rs=rs.next=s;return i}var pr=null;function xc(s){pr===null?pr=[s]:pr.push(s)}function fh(s,i,a,f){var h=i.interleaved;return h===null?(a.next=a,xc(i)):(a.next=h.next,h.next=a),i.interleaved=a,vn(s,f)}function vn(s,i){s.lanes|=i;var a=s.alternate;for(a!==null&&(a.lanes|=i),a=s,s=s.return;s!==null;)s.childLanes|=i,a=s.alternate,a!==null&&(a.childLanes|=i),a=s,s=s.return;return a.tag===3?a.stateNode:null}var Un=!1;function _c(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dh(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function wn(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function Hn(s,i,a){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(we&2)!==0){var h=f.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),f.pending=i,vn(s,a)}return h=f.interleaved,h===null?(i.next=i,xc(f)):(i.next=h.next,h.next=i),f.interleaved=i,vn(s,a)}function qo(s,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,Ra(s,a)}}function hh(s,i){var a=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var _={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?h=g=_:g=g.next=_,a=a.next}while(a!==null);g===null?h=g=i:g=g.next=i}else h=g=i;a={baseState:f.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:f.shared,effects:f.effects},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=i:s.next=i,a.lastBaseUpdate=i}function Vo(s,i,a,f){var h=s.updateQueue;Un=!1;var g=h.firstBaseUpdate,_=h.lastBaseUpdate,b=h.shared.pending;if(b!==null){h.shared.pending=null;var C=b,R=C.next;C.next=null,_===null?g=R:_.next=R,_=C;var V=s.alternate;V!==null&&(V=V.updateQueue,b=V.lastBaseUpdate,b!==_&&(b===null?V.firstBaseUpdate=R:b.next=R,V.lastBaseUpdate=C))}if(g!==null){var W=h.baseState;_=0,V=R=C=null,b=g;do{var q=b.lane,X=b.eventTime;if((f&q)===q){V!==null&&(V=V.next={eventTime:X,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var ee=s,te=b;switch(q=i,X=a,te.tag){case 1:if(ee=te.payload,typeof ee=="function"){W=ee.call(X,W,q);break e}W=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=te.payload,q=typeof ee=="function"?ee.call(X,W,q):ee,q==null)break e;W=J({},W,q);break e;case 2:Un=!0}}b.callback!==null&&b.lane!==0&&(s.flags|=64,q=h.effects,q===null?h.effects=[b]:q.push(b))}else X={eventTime:X,lane:q,tag:b.tag,payload:b.payload,callback:b.callback,next:null},V===null?(R=V=X,C=W):V=V.next=X,_|=q;if(b=b.next,b===null){if(b=h.shared.pending,b===null)break;q=b,b=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);if(V===null&&(C=W),h.baseState=C,h.firstBaseUpdate=R,h.lastBaseUpdate=V,i=h.shared.interleaved,i!==null){h=i;do _|=h.lane,h=h.next;while(h!==i)}else g===null&&(h.shared.lanes=0);yr|=_,s.lanes=_,s.memoizedState=W}}function ph(s,i,a){if(s=i.effects,i.effects=null,s!==null)for(i=0;i<s.length;i++){var f=s[i],h=f.callback;if(h!==null){if(f.callback=null,f=a,typeof h!="function")throw Error(n(191,h));h.call(f)}}}var di={},ln=Bn(di),hi=Bn(di),pi=Bn(di);function gr(s){if(s===di)throw Error(n(174));return s}function Ec(s,i){switch(Ce(pi,i),Ce(hi,s),Ce(ln,di),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:hn(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=hn(i,s)}Le(ln),Ce(ln,i)}function is(){Le(ln),Le(hi),Le(pi)}function gh(s){gr(pi.current);var i=gr(ln.current),a=hn(i,s.type);i!==a&&(Ce(hi,s),Ce(ln,a))}function kc(s){hi.current===s&&(Le(ln),Le(hi))}var Pe=Bn(0);function Wo(s){for(var i=s;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var bc=[];function Tc(){for(var s=0;s<bc.length;s++)bc[s]._workInProgressVersionPrimary=null;bc.length=0}var Ko=O.ReactCurrentDispatcher,Cc=O.ReactCurrentBatchConfig,mr=0,Oe=null,We=null,Qe=null,Go=!1,gi=!1,mi=0,Hw=0;function it(){throw Error(n(321))}function Nc(s,i){if(i===null)return!1;for(var a=0;a<i.length&&a<s.length;a++)if(!Gt(s[a],i[a]))return!1;return!0}function Ac(s,i,a,f,h,g){if(mr=g,Oe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Ko.current=s===null||s.memoizedState===null?Kw:Gw,s=a(f,h),gi){g=0;do{if(gi=!1,mi=0,25<=g)throw Error(n(301));g+=1,Qe=We=null,i.updateQueue=null,Ko.current=Qw,s=a(f,h)}while(gi)}if(Ko.current=Xo,i=We!==null&&We.next!==null,mr=0,Qe=We=Oe=null,Go=!1,i)throw Error(n(300));return s}function Lc(){var s=mi!==0;return mi=0,s}function an(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?Oe.memoizedState=Qe=s:Qe=Qe.next=s,Qe}function $t(){if(We===null){var s=Oe.alternate;s=s!==null?s.memoizedState:null}else s=We.next;var i=Qe===null?Oe.memoizedState:Qe.next;if(i!==null)Qe=i,We=s;else{if(s===null)throw Error(n(310));We=s,s={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Qe===null?Oe.memoizedState=Qe=s:Qe=Qe.next=s}return Qe}function yi(s,i){return typeof i=="function"?i(s):i}function Ic(s){var i=$t(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=We,h=f.baseQueue,g=a.pending;if(g!==null){if(h!==null){var _=h.next;h.next=g.next,g.next=_}f.baseQueue=h=g,a.pending=null}if(h!==null){g=h.next,f=f.baseState;var b=_=null,C=null,R=g;do{var V=R.lane;if((mr&V)===V)C!==null&&(C=C.next={lane:0,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),f=R.hasEagerState?R.eagerState:s(f,R.action);else{var W={lane:V,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null};C===null?(b=C=W,_=f):C=C.next=W,Oe.lanes|=V,yr|=V}R=R.next}while(R!==null&&R!==g);C===null?_=f:C.next=b,Gt(f,i.memoizedState)||(vt=!0),i.memoizedState=f,i.baseState=_,i.baseQueue=C,a.lastRenderedState=f}if(s=a.interleaved,s!==null){h=s;do g=h.lane,Oe.lanes|=g,yr|=g,h=h.next;while(h!==s)}else h===null&&(a.lanes=0);return[i.memoizedState,a.dispatch]}function Mc(s){var i=$t(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=a.dispatch,h=a.pending,g=i.memoizedState;if(h!==null){a.pending=null;var _=h=h.next;do g=s(g,_.action),_=_.next;while(_!==h);Gt(g,i.memoizedState)||(vt=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),a.lastRenderedState=g}return[g,f]}function mh(){}function yh(s,i){var a=Oe,f=$t(),h=i(),g=!Gt(f.memoizedState,h);if(g&&(f.memoizedState=h,vt=!0),f=f.queue,jc(Sh.bind(null,a,f,s),[s]),f.getSnapshot!==i||g||Qe!==null&&Qe.memoizedState.tag&1){if(a.flags|=2048,vi(9,wh.bind(null,a,f,h,i),void 0,null),Je===null)throw Error(n(349));(mr&30)!==0||vh(a,i,h)}return h}function vh(s,i,a){s.flags|=16384,s={getSnapshot:i,value:a},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.stores=[s]):(a=i.stores,a===null?i.stores=[s]:a.push(s))}function wh(s,i,a,f){i.value=a,i.getSnapshot=f,xh(i)&&_h(s)}function Sh(s,i,a){return a(function(){xh(i)&&_h(s)})}function xh(s){var i=s.getSnapshot;s=s.value;try{var a=i();return!Gt(s,a)}catch{return!0}}function _h(s){var i=vn(s,1);i!==null&&Zt(i,s,1,-1)}function Eh(s){var i=an();return typeof s=="function"&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yi,lastRenderedState:s},i.queue=s,s=s.dispatch=Ww.bind(null,Oe,s),[i.memoizedState,s]}function vi(s,i,a,f){return s={tag:s,create:i,destroy:a,deps:f,next:null},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.lastEffect=s.next=s):(a=i.lastEffect,a===null?i.lastEffect=s.next=s:(f=a.next,a.next=s,s.next=f,i.lastEffect=s)),s}function kh(){return $t().memoizedState}function Qo(s,i,a,f){var h=an();Oe.flags|=s,h.memoizedState=vi(1|i,a,void 0,f===void 0?null:f)}function Jo(s,i,a,f){var h=$t();f=f===void 0?null:f;var g=void 0;if(We!==null){var _=We.memoizedState;if(g=_.destroy,f!==null&&Nc(f,_.deps)){h.memoizedState=vi(i,a,g,f);return}}Oe.flags|=s,h.memoizedState=vi(1|i,a,g,f)}function bh(s,i){return Qo(8390656,8,s,i)}function jc(s,i){return Jo(2048,8,s,i)}function Th(s,i){return Jo(4,2,s,i)}function Ch(s,i){return Jo(4,4,s,i)}function Nh(s,i){if(typeof i=="function")return s=s(),i(s),function(){i(null)};if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function Ah(s,i,a){return a=a!=null?a.concat([s]):null,Jo(4,4,Nh.bind(null,i,s),a)}function Pc(){}function Lh(s,i){var a=$t();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&Nc(i,f[1])?f[0]:(a.memoizedState=[s,i],s)}function Ih(s,i){var a=$t();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&Nc(i,f[1])?f[0]:(s=s(),a.memoizedState=[s,i],s)}function Mh(s,i,a){return(mr&21)===0?(s.baseState&&(s.baseState=!1,vt=!0),s.memoizedState=a):(Gt(a,i)||(a=ad(),Oe.lanes|=a,yr|=a,s.baseState=!0),i)}function qw(s,i){var a=Ee;Ee=a!==0&&4>a?a:4,s(!0);var f=Cc.transition;Cc.transition={};try{s(!1),i()}finally{Ee=a,Cc.transition=f}}function jh(){return $t().memoizedState}function Vw(s,i,a){var f=Kn(s);if(a={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null},Ph(s))Oh(i,a);else if(a=fh(s,i,a,f),a!==null){var h=ft();Zt(a,s,f,h),Rh(a,i,f)}}function Ww(s,i,a){var f=Kn(s),h={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ph(s))Oh(i,h);else{var g=s.alternate;if(s.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var _=i.lastRenderedState,b=g(_,a);if(h.hasEagerState=!0,h.eagerState=b,Gt(b,_)){var C=i.interleaved;C===null?(h.next=h,xc(i)):(h.next=C.next,C.next=h),i.interleaved=h;return}}catch{}finally{}a=fh(s,i,h,f),a!==null&&(h=ft(),Zt(a,s,f,h),Rh(a,i,f))}}function Ph(s){var i=s.alternate;return s===Oe||i!==null&&i===Oe}function Oh(s,i){gi=Go=!0;var a=s.pending;a===null?i.next=i:(i.next=a.next,a.next=i),s.pending=i}function Rh(s,i,a){if((a&4194240)!==0){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,Ra(s,a)}}var Xo={readContext:Rt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},Kw={readContext:Rt,useCallback:function(s,i){return an().memoizedState=[s,i===void 0?null:i],s},useContext:Rt,useEffect:bh,useImperativeHandle:function(s,i,a){return a=a!=null?a.concat([s]):null,Qo(4194308,4,Nh.bind(null,i,s),a)},useLayoutEffect:function(s,i){return Qo(4194308,4,s,i)},useInsertionEffect:function(s,i){return Qo(4,2,s,i)},useMemo:function(s,i){var a=an();return i=i===void 0?null:i,s=s(),a.memoizedState=[s,i],s},useReducer:function(s,i,a){var f=an();return i=a!==void 0?a(i):i,f.memoizedState=f.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},f.queue=s,s=s.dispatch=Vw.bind(null,Oe,s),[f.memoizedState,s]},useRef:function(s){var i=an();return s={current:s},i.memoizedState=s},useState:Eh,useDebugValue:Pc,useDeferredValue:function(s){return an().memoizedState=s},useTransition:function(){var s=Eh(!1),i=s[0];return s=qw.bind(null,s[1]),an().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,a){var f=Oe,h=an();if(Ie){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),Je===null)throw Error(n(349));(mr&30)!==0||vh(f,i,a)}h.memoizedState=a;var g={value:a,getSnapshot:i};return h.queue=g,bh(Sh.bind(null,f,g,s),[s]),f.flags|=2048,vi(9,wh.bind(null,f,g,a,i),void 0,null),a},useId:function(){var s=an(),i=Je.identifierPrefix;if(Ie){var a=yn,f=mn;a=(f&~(1<<32-Kt(f)-1)).toString(32)+a,i=":"+i+"R"+a,a=mi++,0<a&&(i+="H"+a.toString(32)),i+=":"}else a=Hw++,i=":"+i+"r"+a.toString(32)+":";return s.memoizedState=i},unstable_isNewReconciler:!1},Gw={readContext:Rt,useCallback:Lh,useContext:Rt,useEffect:jc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:Ch,useMemo:Ih,useReducer:Ic,useRef:kh,useState:function(){return Ic(yi)},useDebugValue:Pc,useDeferredValue:function(s){var i=$t();return Mh(i,We.memoizedState,s)},useTransition:function(){var s=Ic(yi)[0],i=$t().memoizedState;return[s,i]},useMutableSource:mh,useSyncExternalStore:yh,useId:jh,unstable_isNewReconciler:!1},Qw={readContext:Rt,useCallback:Lh,useContext:Rt,useEffect:jc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:Ch,useMemo:Ih,useReducer:Mc,useRef:kh,useState:function(){return Mc(yi)},useDebugValue:Pc,useDeferredValue:function(s){var i=$t();return We===null?i.memoizedState=s:Mh(i,We.memoizedState,s)},useTransition:function(){var s=Mc(yi)[0],i=$t().memoizedState;return[s,i]},useMutableSource:mh,useSyncExternalStore:yh,useId:jh,unstable_isNewReconciler:!1};function Jt(s,i){if(s&&s.defaultProps){i=J({},i),s=s.defaultProps;for(var a in s)i[a]===void 0&&(i[a]=s[a]);return i}return i}function Oc(s,i,a,f){i=s.memoizedState,a=a(f,i),a=a==null?i:J({},i,a),s.memoizedState=a,s.lanes===0&&(s.updateQueue.baseState=a)}var Yo={isMounted:function(s){return(s=s._reactInternals)?cr(s)===s:!1},enqueueSetState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Kn(s),g=wn(f,h);g.payload=i,a!=null&&(g.callback=a),i=Hn(s,g,h),i!==null&&(Zt(i,s,h,f),qo(i,s,h))},enqueueReplaceState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Kn(s),g=wn(f,h);g.tag=1,g.payload=i,a!=null&&(g.callback=a),i=Hn(s,g,h),i!==null&&(Zt(i,s,h,f),qo(i,s,h))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var a=ft(),f=Kn(s),h=wn(a,f);h.tag=2,i!=null&&(h.callback=i),i=Hn(s,h,f),i!==null&&(Zt(i,s,f,a),qo(i,s,f))}};function $h(s,i,a,f,h,g,_){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,g,_):i.prototype&&i.prototype.isPureReactComponent?!si(a,f)||!si(h,g):!0}function Dh(s,i,a){var f=!1,h=Fn,g=i.contextType;return typeof g=="object"&&g!==null?g=Rt(g):(h=yt(i)?fr:st.current,f=i.contextTypes,g=(f=f!=null)?Yr(s,h):Fn),i=new i(a,g),s.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Yo,s.stateNode=i,i._reactInternals=s,f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=h,s.__reactInternalMemoizedMaskedChildContext=g),i}function Bh(s,i,a,f){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,f),i.state!==s&&Yo.enqueueReplaceState(i,i.state,null)}function Rc(s,i,a,f){var h=s.stateNode;h.props=a,h.state=s.memoizedState,h.refs={},_c(s);var g=i.contextType;typeof g=="object"&&g!==null?h.context=Rt(g):(g=yt(i)?fr:st.current,h.context=Yr(s,g)),h.state=s.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Oc(s,i,g,a),h.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&Yo.enqueueReplaceState(h,h.state,null),Vo(s,a,h,f),h.state=s.memoizedState),typeof h.componentDidMount=="function"&&(s.flags|=4194308)}function os(s,i){try{var a="",f=i;do a+=ye(f),f=f.return;while(f);var h=a}catch(g){h=`
38
+ `+h[_].replace(" at new "," at ");return s.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",s.displayName)),C}while(1<=_&&0<=b);break}}}finally{ce=!1,Error.prepareStackTrace=a}return(s=s?s.displayName||s.name:"")?U(s):""}function ye(s){switch(s.tag){case 5:return U(s.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return s=de(s.type,!1),s;case 11:return s=de(s.type.render,!1),s;case 1:return s=de(s.type,!0),s;default:return""}}function ge(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case G:return"Fragment";case z:return"Portal";case I:return"Profiler";case B:return"StrictMode";case H:return"Suspense";case fe:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case oe:return(s.displayName||"Context")+".Consumer";case Z:return(s._context.displayName||"Context")+".Provider";case M:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case xe:return i=s.displayName||null,i!==null?i:ge(s.type)||"Memo";case pe:i=s._payload,s=s._init;try{return ge(s(i))}catch{}}return null}function ve(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(i);case 8:return i===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function _e(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ke(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ne(s){var i=ke(s)?"checked":"value",a=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),f=""+s[i];if(!s.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return h.call(this)},set:function(_){f=""+_,g.call(this,_)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function rr(s){s._valueTracker||(s._valueTracker=Ne(s))}function io(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var a=i.getValue(),f="";return s&&(f=ke(s)?s.checked?"true":"false":s.value),s=f,s!==a?(i.setValue(s),!0):!1}function Dr(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function sr(s,i){var a=i.checked;return J({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??s._wrapperState.initialChecked})}function Fs(s,i){var a=i.defaultValue==null?"":i.defaultValue,f=i.checked!=null?i.checked:i.defaultChecked;a=_e(i.value!=null?i.value:a),s._wrapperState={initialChecked:f,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function zs(s,i){i=i.checked,i!=null&&F(s,"checked",i,!1)}function rn(s,i){zs(s,i);var a=_e(i.value),f=i.type;if(a!=null)f==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+a):s.value!==""+a&&(s.value=""+a);else if(f==="submit"||f==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?Us(s,i.type,a):i.hasOwnProperty("defaultValue")&&Us(s,i.type,_e(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function oo(s,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var f=i.type;if(!(f!=="submit"&&f!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,a||i===s.value||(s.value=i),s.defaultValue=i}a=s.name,a!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,a!==""&&(s.name=a)}function Us(s,i,a){(i!=="number"||Dr(s.ownerDocument)!==s)&&(a==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+a&&(s.defaultValue=""+a))}var ir=Array.isArray;function Ln(s,i,a,f){if(s=s.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<s.length;a++)h=i.hasOwnProperty("$"+s[a].value),s[a].selected!==h&&(s[a].selected=h),h&&f&&(s[a].defaultSelected=!0)}else{for(a=""+_e(a),i=null,h=0;h<s.length;h++){if(s[h].value===a){s[h].selected=!0,f&&(s[h].defaultSelected=!0);return}i!==null||s[h].disabled||(i=s[h])}i!==null&&(i.selected=!0)}}function Br(s,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return J({},i,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Fr(s,i){var a=i.value;if(a==null){if(a=i.children,i=i.defaultValue,a!=null){if(i!=null)throw Error(n(92));if(ir(a)){if(1<a.length)throw Error(n(93));a=a[0]}i=a}i==null&&(i=""),a=i}s._wrapperState={initialValue:_e(a)}}function lo(s,i){var a=_e(i.value),f=_e(i.defaultValue);a!=null&&(a=""+a,a!==s.value&&(s.value=a),i.defaultValue==null&&s.defaultValue!==a&&(s.defaultValue=a)),f!=null&&(s.defaultValue=""+f)}function ao(s){var i=s.textContent;i===s._wrapperState.initialValue&&i!==""&&i!==null&&(s.value=i)}function co(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hn(s,i){return s==null||s==="http://www.w3.org/1999/xhtml"?co(i):s==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var In,or=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,a,f,h){MSApp.execUnsafeLocalFunction(function(){return s(i,a,f,h)})}:s})(function(s,i){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=i;else{for(In=In||document.createElement("div"),In.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=In.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}});function lr(s,i){if(i){var a=s.firstChild;if(a&&a===s.lastChild&&a.nodeType===3){a.nodeValue=i;return}}s.textContent=i}var ar={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},uo=["Webkit","ms","Moz","O"];Object.keys(ar).forEach(function(s){uo.forEach(function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),ar[i]=ar[s]})});function le(s,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||ar.hasOwnProperty(s)&&ar[s]?(""+i).trim():i+"px"}function Vt(s,i){s=s.style;for(var a in i)if(i.hasOwnProperty(a)){var f=a.indexOf("--")===0,h=le(a,i[a],f);a==="float"&&(a="cssFloat"),f?s.setProperty(a,h):s[a]=h}}var Wt=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ba(s,i){if(i){if(Wt[s]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Ta(s,i){if(s.indexOf("-")===-1)return typeof i.is=="string";switch(s){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 Ca=null;function Na(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Aa=null,zr=null,Ur=null;function Gf(s){if(s=ui(s)){if(typeof Aa!="function")throw Error(n(280));var i=s.stateNode;i&&(i=Po(i),Aa(s.stateNode,s.type,i))}}function Qf(s){zr?Ur?Ur.push(s):Ur=[s]:zr=s}function Jf(){if(zr){var s=zr,i=Ur;if(Ur=zr=null,Gf(s),i)for(s=0;s<i.length;s++)Gf(i[s])}}function Xf(s,i){return s(i)}function Yf(){}var La=!1;function Zf(s,i,a){if(La)return s(i,a);La=!0;try{return Xf(s,i,a)}finally{La=!1,(zr!==null||Ur!==null)&&(Yf(),Jf())}}function Hs(s,i){var a=s.stateNode;if(a===null)return null;var f=Po(a);if(f===null)return null;a=f[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(s=s.type,f=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!f;break e;default:s=!1}if(s)return null;if(a&&typeof a!="function")throw Error(n(231,i,typeof a));return a}var Ia=!1;if(u)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){Ia=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{Ia=!1}function Av(s,i,a,f,h,g,_,b,C){var R=Array.prototype.slice.call(arguments,3);try{i.apply(a,R)}catch(V){this.onError(V)}}var Vs=!1,fo=null,ho=!1,Ma=null,Lv={onError:function(s){Vs=!0,fo=s}};function Iv(s,i,a,f,h,g,_,b,C){Vs=!1,fo=null,Av.apply(Lv,arguments)}function Mv(s,i,a,f,h,g,_,b,C){if(Iv.apply(this,arguments),Vs){if(Vs){var R=fo;Vs=!1,fo=null}else throw Error(n(198));ho||(ho=!0,Ma=R)}}function cr(s){var i=s,a=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do i=s,(i.flags&4098)!==0&&(a=i.return),s=i.return;while(s)}return i.tag===3?a:null}function ed(s){if(s.tag===13){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function td(s){if(cr(s)!==s)throw Error(n(188))}function jv(s){var i=s.alternate;if(!i){if(i=cr(s),i===null)throw Error(n(188));return i!==s?null:s}for(var a=s,f=i;;){var h=a.return;if(h===null)break;var g=h.alternate;if(g===null){if(f=h.return,f!==null){a=f;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===a)return td(h),s;if(g===f)return td(h),i;g=g.sibling}throw Error(n(188))}if(a.return!==f.return)a=h,f=g;else{for(var _=!1,b=h.child;b;){if(b===a){_=!0,a=h,f=g;break}if(b===f){_=!0,f=h,a=g;break}b=b.sibling}if(!_){for(b=g.child;b;){if(b===a){_=!0,a=g,f=h;break}if(b===f){_=!0,f=g,a=h;break}b=b.sibling}if(!_)throw Error(n(189))}}if(a.alternate!==f)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?s:i}function nd(s){return s=jv(s),s!==null?rd(s):null}function rd(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var i=rd(s);if(i!==null)return i;s=s.sibling}return null}var sd=e.unstable_scheduleCallback,id=e.unstable_cancelCallback,Pv=e.unstable_shouldYield,Ov=e.unstable_requestPaint,Fe=e.unstable_now,Rv=e.unstable_getCurrentPriorityLevel,ja=e.unstable_ImmediatePriority,od=e.unstable_UserBlockingPriority,po=e.unstable_NormalPriority,$v=e.unstable_LowPriority,ld=e.unstable_IdlePriority,go=null,sn=null;function Dv(s){if(sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(go,s,void 0,(s.current.flags&128)===128)}catch{}}var Kt=Math.clz32?Math.clz32:zv,Bv=Math.log,Fv=Math.LN2;function zv(s){return s>>>=0,s===0?32:31-(Bv(s)/Fv|0)|0}var mo=64,yo=4194304;function Ws(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function vo(s,i){var a=s.pendingLanes;if(a===0)return 0;var f=0,h=s.suspendedLanes,g=s.pingedLanes,_=a&268435455;if(_!==0){var b=_&~h;b!==0?f=Ws(b):(g&=_,g!==0&&(f=Ws(g)))}else _=a&~h,_!==0?f=Ws(_):g!==0&&(f=Ws(g));if(f===0)return 0;if(i!==0&&i!==f&&(i&h)===0&&(h=f&-f,g=i&-i,h>=g||h===16&&(g&4194240)!==0))return i;if((f&4)!==0&&(f|=a&16),i=s.entangledLanes,i!==0)for(s=s.entanglements,i&=f;0<i;)a=31-Kt(i),h=1<<a,f|=s[a],i&=~h;return f}function Uv(s,i){switch(s){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hv(s,i){for(var a=s.suspendedLanes,f=s.pingedLanes,h=s.expirationTimes,g=s.pendingLanes;0<g;){var _=31-Kt(g),b=1<<_,C=h[_];C===-1?((b&a)===0||(b&f)!==0)&&(h[_]=Uv(b,i)):C<=i&&(s.expiredLanes|=b),g&=~b}}function Pa(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function ad(){var s=mo;return mo<<=1,(mo&4194240)===0&&(mo=64),s}function Oa(s){for(var i=[],a=0;31>a;a++)i.push(s);return i}function Ks(s,i,a){s.pendingLanes|=i,i!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,i=31-Kt(i),s[i]=a}function qv(s,i){var a=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var f=s.eventTimes;for(s=s.expirationTimes;0<a;){var h=31-Kt(a),g=1<<h;i[h]=0,f[h]=-1,s[h]=-1,a&=~g}}function Ra(s,i){var a=s.entangledLanes|=i;for(s=s.entanglements;a;){var f=31-Kt(a),h=1<<f;h&i|s[f]&i&&(s[f]|=i),a&=~h}}var Ee=0;function cd(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var ud,$a,fd,dd,hd,Da=!1,wo=[],Mn=null,jn=null,Pn=null,Gs=new Map,Qs=new Map,On=[],Vv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pd(s,i){switch(s){case"focusin":case"focusout":Mn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":Gs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(i.pointerId)}}function Js(s,i,a,f,h,g){return s===null||s.nativeEvent!==g?(s={blockedOn:i,domEventName:a,eventSystemFlags:f,nativeEvent:g,targetContainers:[h]},i!==null&&(i=ui(i),i!==null&&$a(i)),s):(s.eventSystemFlags|=f,i=s.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),s)}function Wv(s,i,a,f,h){switch(i){case"focusin":return Mn=Js(Mn,s,i,a,f,h),!0;case"dragenter":return jn=Js(jn,s,i,a,f,h),!0;case"mouseover":return Pn=Js(Pn,s,i,a,f,h),!0;case"pointerover":var g=h.pointerId;return Gs.set(g,Js(Gs.get(g)||null,s,i,a,f,h)),!0;case"gotpointercapture":return g=h.pointerId,Qs.set(g,Js(Qs.get(g)||null,s,i,a,f,h)),!0}return!1}function gd(s){var i=ur(s.target);if(i!==null){var a=cr(i);if(a!==null){if(i=a.tag,i===13){if(i=ed(a),i!==null){s.blockedOn=i,hd(s.priority,function(){fd(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){s.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}s.blockedOn=null}function So(s){if(s.blockedOn!==null)return!1;for(var i=s.targetContainers;0<i.length;){var a=Fa(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(a===null){a=s.nativeEvent;var f=new a.constructor(a.type,a);Ca=f,a.target.dispatchEvent(f),Ca=null}else return i=ui(a),i!==null&&$a(i),s.blockedOn=a,!1;i.shift()}return!0}function md(s,i,a){So(s)&&a.delete(i)}function Kv(){Da=!1,Mn!==null&&So(Mn)&&(Mn=null),jn!==null&&So(jn)&&(jn=null),Pn!==null&&So(Pn)&&(Pn=null),Gs.forEach(md),Qs.forEach(md)}function Xs(s,i){s.blockedOn===i&&(s.blockedOn=null,Da||(Da=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Kv)))}function Ys(s){function i(h){return Xs(h,s)}if(0<wo.length){Xs(wo[0],s);for(var a=1;a<wo.length;a++){var f=wo[a];f.blockedOn===s&&(f.blockedOn=null)}}for(Mn!==null&&Xs(Mn,s),jn!==null&&Xs(jn,s),Pn!==null&&Xs(Pn,s),Gs.forEach(i),Qs.forEach(i),a=0;a<On.length;a++)f=On[a],f.blockedOn===s&&(f.blockedOn=null);for(;0<On.length&&(a=On[0],a.blockedOn===null);)gd(a),a.blockedOn===null&&On.shift()}var Hr=O.ReactCurrentBatchConfig,xo=!0;function Gv(s,i,a,f){var h=Ee,g=Hr.transition;Hr.transition=null;try{Ee=1,Ba(s,i,a,f)}finally{Ee=h,Hr.transition=g}}function Qv(s,i,a,f){var h=Ee,g=Hr.transition;Hr.transition=null;try{Ee=4,Ba(s,i,a,f)}finally{Ee=h,Hr.transition=g}}function Ba(s,i,a,f){if(xo){var h=Fa(s,i,a,f);if(h===null)rc(s,i,f,_o,a),pd(s,f);else if(Wv(h,s,i,a,f))f.stopPropagation();else if(pd(s,f),i&4&&-1<Vv.indexOf(s)){for(;h!==null;){var g=ui(h);if(g!==null&&ud(g),g=Fa(s,i,a,f),g===null&&rc(s,i,f,_o,a),g===h)break;h=g}h!==null&&f.stopPropagation()}else rc(s,i,f,null,a)}}var _o=null;function Fa(s,i,a,f){if(_o=null,s=Na(f),s=ur(s),s!==null)if(i=cr(s),i===null)s=null;else if(a=i.tag,a===13){if(s=ed(i),s!==null)return s;s=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return _o=s,null}function yd(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Rv()){case ja:return 1;case od:return 4;case po:case $v:return 16;case ld:return 536870912;default:return 16}default:return 16}}var Rn=null,za=null,Eo=null;function vd(){if(Eo)return Eo;var s,i=za,a=i.length,f,h="value"in Rn?Rn.value:Rn.textContent,g=h.length;for(s=0;s<a&&i[s]===h[s];s++);var _=a-s;for(f=1;f<=_&&i[a-f]===h[g-f];f++);return Eo=h.slice(s,1<f?1-f:void 0)}function ko(s){var i=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&i===13&&(s=13)):s=i,s===10&&(s=13),32<=s||s===13?s:0}function bo(){return!0}function wd(){return!1}function Ct(s){function i(a,f,h,g,_){this._reactName=a,this._targetInst=h,this.type=f,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var b in s)s.hasOwnProperty(b)&&(a=s[b],this[b]=a?a(g):g[b]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?bo:wd,this.isPropagationStopped=wd,this}return J(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),i}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ua=Ct(qr),Zs=J({},qr,{view:0,detail:0}),Jv=Ct(Zs),Ha,qa,ei,To=J({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wa,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ei&&(ei&&s.type==="mousemove"?(Ha=s.screenX-ei.screenX,qa=s.screenY-ei.screenY):qa=Ha=0,ei=s),Ha)},movementY:function(s){return"movementY"in s?s.movementY:qa}}),Sd=Ct(To),Xv=J({},To,{dataTransfer:0}),Yv=Ct(Xv),Zv=J({},Zs,{relatedTarget:0}),Va=Ct(Zv),ew=J({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),tw=Ct(ew),nw=J({},qr,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),rw=Ct(nw),sw=J({},qr,{data:0}),xd=Ct(sw),iw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ow={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"},lw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aw(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):(s=lw[s])?!!i[s]:!1}function Wa(){return aw}var cw=J({},Zs,{key:function(s){if(s.key){var i=iw[s.key]||s.key;if(i!=="Unidentified")return i}return s.type==="keypress"?(s=ko(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?ow[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wa,charCode:function(s){return s.type==="keypress"?ko(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ko(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),uw=Ct(cw),fw=J({},To,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_d=Ct(fw),dw=J({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wa}),hw=Ct(dw),pw=J({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),gw=Ct(pw),mw=J({},To,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),yw=Ct(mw),vw=[9,13,27,32],Ka=u&&"CompositionEvent"in window,ti=null;u&&"documentMode"in document&&(ti=document.documentMode);var ww=u&&"TextEvent"in window&&!ti,Ed=u&&(!Ka||ti&&8<ti&&11>=ti),kd=" ",bd=!1;function Td(s,i){switch(s){case"keyup":return vw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cd(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Vr=!1;function Sw(s,i){switch(s){case"compositionend":return Cd(i);case"keypress":return i.which!==32?null:(bd=!0,kd);case"textInput":return s=i.data,s===kd&&bd?null:s;default:return null}}function xw(s,i){if(Vr)return s==="compositionend"||!Ka&&Td(s,i)?(s=vd(),Eo=za=Rn=null,Vr=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ed&&i.locale!=="ko"?null:i.data;default:return null}}var _w={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 Nd(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i==="input"?!!_w[s.type]:i==="textarea"}function Ad(s,i,a,f){Qf(f),i=Io(i,"onChange"),0<i.length&&(a=new Ua("onChange","change",null,a,f),s.push({event:a,listeners:i}))}var ni=null,ri=null;function Ew(s){Kd(s,0)}function Co(s){var i=Jr(s);if(io(i))return s}function kw(s,i){if(s==="change")return i}var Ld=!1;if(u){var Ga;if(u){var Qa="oninput"in document;if(!Qa){var Id=document.createElement("div");Id.setAttribute("oninput","return;"),Qa=typeof Id.oninput=="function"}Ga=Qa}else Ga=!1;Ld=Ga&&(!document.documentMode||9<document.documentMode)}function Md(){ni&&(ni.detachEvent("onpropertychange",jd),ri=ni=null)}function jd(s){if(s.propertyName==="value"&&Co(ri)){var i=[];Ad(i,ri,s,Na(s)),Zf(Ew,i)}}function bw(s,i,a){s==="focusin"?(Md(),ni=i,ri=a,ni.attachEvent("onpropertychange",jd)):s==="focusout"&&Md()}function Tw(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Co(ri)}function Cw(s,i){if(s==="click")return Co(i)}function Nw(s,i){if(s==="input"||s==="change")return Co(i)}function Aw(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var Gt=typeof Object.is=="function"?Object.is:Aw;function si(s,i){if(Gt(s,i))return!0;if(typeof s!="object"||s===null||typeof i!="object"||i===null)return!1;var a=Object.keys(s),f=Object.keys(i);if(a.length!==f.length)return!1;for(f=0;f<a.length;f++){var h=a[f];if(!d.call(i,h)||!Gt(s[h],i[h]))return!1}return!0}function Pd(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Od(s,i){var a=Pd(s);s=0;for(var f;a;){if(a.nodeType===3){if(f=s+a.textContent.length,s<=i&&f>=i)return{node:a,offset:i-s};s=f}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Pd(a)}}function Rd(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?Rd(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function $d(){for(var s=window,i=Dr();i instanceof s.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)s=i.contentWindow;else break;i=Dr(s.document)}return i}function Ja(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}function Lw(s){var i=$d(),a=s.focusedElem,f=s.selectionRange;if(i!==a&&a&&a.ownerDocument&&Rd(a.ownerDocument.documentElement,a)){if(f!==null&&Ja(a)){if(i=f.start,s=f.end,s===void 0&&(s=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(s,a.value.length);else if(s=(i=a.ownerDocument||document)&&i.defaultView||window,s.getSelection){s=s.getSelection();var h=a.textContent.length,g=Math.min(f.start,h);f=f.end===void 0?g:Math.min(f.end,h),!s.extend&&g>f&&(h=f,f=g,g=h),h=Od(a,g);var _=Od(a,f);h&&_&&(s.rangeCount!==1||s.anchorNode!==h.node||s.anchorOffset!==h.offset||s.focusNode!==_.node||s.focusOffset!==_.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),s.removeAllRanges(),g>f?(s.addRange(i),s.extend(_.node,_.offset)):(i.setEnd(_.node,_.offset),s.addRange(i)))}}for(i=[],s=a;s=s.parentNode;)s.nodeType===1&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<i.length;a++)s=i[a],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Iw=u&&"documentMode"in document&&11>=document.documentMode,Wr=null,Xa=null,ii=null,Ya=!1;function Dd(s,i,a){var f=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ya||Wr==null||Wr!==Dr(f)||(f=Wr,"selectionStart"in f&&Ja(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),ii&&si(ii,f)||(ii=f,f=Io(Xa,"onSelect"),0<f.length&&(i=new Ua("onSelect","select",null,i,a),s.push({event:i,listeners:f}),i.target=Wr)))}function No(s,i){var a={};return a[s.toLowerCase()]=i.toLowerCase(),a["Webkit"+s]="webkit"+i,a["Moz"+s]="moz"+i,a}var Kr={animationend:No("Animation","AnimationEnd"),animationiteration:No("Animation","AnimationIteration"),animationstart:No("Animation","AnimationStart"),transitionend:No("Transition","TransitionEnd")},Za={},Bd={};u&&(Bd=document.createElement("div").style,"AnimationEvent"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),"TransitionEvent"in window||delete Kr.transitionend.transition);function Ao(s){if(Za[s])return Za[s];if(!Kr[s])return s;var i=Kr[s],a;for(a in i)if(i.hasOwnProperty(a)&&a in Bd)return Za[s]=i[a];return s}var Fd=Ao("animationend"),zd=Ao("animationiteration"),Ud=Ao("animationstart"),Hd=Ao("transitionend"),qd=new Map,Vd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $n(s,i){qd.set(s,i),l(i,[s])}for(var ec=0;ec<Vd.length;ec++){var tc=Vd[ec],Mw=tc.toLowerCase(),jw=tc[0].toUpperCase()+tc.slice(1);$n(Mw,"on"+jw)}$n(Fd,"onAnimationEnd"),$n(zd,"onAnimationIteration"),$n(Ud,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(Hd,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oi="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(" "),Pw=new Set("cancel close invalid load scroll toggle".split(" ").concat(oi));function Wd(s,i,a){var f=s.type||"unknown-event";s.currentTarget=a,Mv(f,i,void 0,s),s.currentTarget=null}function Kd(s,i){i=(i&4)!==0;for(var a=0;a<s.length;a++){var f=s[a],h=f.event;f=f.listeners;e:{var g=void 0;if(i)for(var _=f.length-1;0<=_;_--){var b=f[_],C=b.instance,R=b.currentTarget;if(b=b.listener,C!==g&&h.isPropagationStopped())break e;Wd(h,b,R),g=C}else for(_=0;_<f.length;_++){if(b=f[_],C=b.instance,R=b.currentTarget,b=b.listener,C!==g&&h.isPropagationStopped())break e;Wd(h,b,R),g=C}}}if(ho)throw s=Ma,ho=!1,Ma=null,s}function Ae(s,i){var a=i[cc];a===void 0&&(a=i[cc]=new Set);var f=s+"__bubble";a.has(f)||(Gd(i,s,2,!1),a.add(f))}function nc(s,i,a){var f=0;i&&(f|=4),Gd(a,s,f,i)}var Lo="_reactListening"+Math.random().toString(36).slice(2);function li(s){if(!s[Lo]){s[Lo]=!0,r.forEach(function(a){a!=="selectionchange"&&(Pw.has(a)||nc(a,!1,s),nc(a,!0,s))});var i=s.nodeType===9?s:s.ownerDocument;i===null||i[Lo]||(i[Lo]=!0,nc("selectionchange",!1,i))}}function Gd(s,i,a,f){switch(yd(i)){case 1:var h=Gv;break;case 4:h=Qv;break;default:h=Ba}a=h.bind(null,i,a,s),h=void 0,!Ia||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),f?h!==void 0?s.addEventListener(i,a,{capture:!0,passive:h}):s.addEventListener(i,a,!0):h!==void 0?s.addEventListener(i,a,{passive:h}):s.addEventListener(i,a,!1)}function rc(s,i,a,f,h){var g=f;if((i&1)===0&&(i&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var b=f.stateNode.containerInfo;if(b===h||b.nodeType===8&&b.parentNode===h)break;if(_===4)for(_=f.return;_!==null;){var C=_.tag;if((C===3||C===4)&&(C=_.stateNode.containerInfo,C===h||C.nodeType===8&&C.parentNode===h))return;_=_.return}for(;b!==null;){if(_=ur(b),_===null)return;if(C=_.tag,C===5||C===6){f=g=_;continue e}b=b.parentNode}}f=f.return}Zf(function(){var R=g,V=Na(a),W=[];e:{var q=qd.get(s);if(q!==void 0){var X=Ua,ee=s;switch(s){case"keypress":if(ko(a)===0)break e;case"keydown":case"keyup":X=uw;break;case"focusin":ee="focus",X=Va;break;case"focusout":ee="blur",X=Va;break;case"beforeblur":case"afterblur":X=Va;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":X=Sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Yv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=hw;break;case Fd:case zd:case Ud:X=tw;break;case Hd:X=gw;break;case"scroll":X=Jv;break;case"wheel":X=yw;break;case"copy":case"cut":case"paste":X=rw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=_d}var te=(i&4)!==0,ze=!te&&s==="scroll",j=te?q!==null?q+"Capture":null:q;te=[];for(var A=R,P;A!==null;){P=A;var K=P.stateNode;if(P.tag===5&&K!==null&&(P=K,j!==null&&(K=Hs(A,j),K!=null&&te.push(ai(A,K,P)))),ze)break;A=A.return}0<te.length&&(q=new X(q,ee,null,a,V),W.push({event:q,listeners:te}))}}if((i&7)===0){e:{if(q=s==="mouseover"||s==="pointerover",X=s==="mouseout"||s==="pointerout",q&&a!==Ca&&(ee=a.relatedTarget||a.fromElement)&&(ur(ee)||ee[pn]))break e;if((X||q)&&(q=V.window===V?V:(q=V.ownerDocument)?q.defaultView||q.parentWindow:window,X?(ee=a.relatedTarget||a.toElement,X=R,ee=ee?ur(ee):null,ee!==null&&(ze=cr(ee),ee!==ze||ee.tag!==5&&ee.tag!==6)&&(ee=null)):(X=null,ee=R),X!==ee)){if(te=Sd,K="onMouseLeave",j="onMouseEnter",A="mouse",(s==="pointerout"||s==="pointerover")&&(te=_d,K="onPointerLeave",j="onPointerEnter",A="pointer"),ze=X==null?q:Jr(X),P=ee==null?q:Jr(ee),q=new te(K,A+"leave",X,a,V),q.target=ze,q.relatedTarget=P,K=null,ur(V)===R&&(te=new te(j,A+"enter",ee,a,V),te.target=P,te.relatedTarget=ze,K=te),ze=K,X&&ee)t:{for(te=X,j=ee,A=0,P=te;P;P=Gr(P))A++;for(P=0,K=j;K;K=Gr(K))P++;for(;0<A-P;)te=Gr(te),A--;for(;0<P-A;)j=Gr(j),P--;for(;A--;){if(te===j||j!==null&&te===j.alternate)break t;te=Gr(te),j=Gr(j)}te=null}else te=null;X!==null&&Qd(W,q,X,te,!1),ee!==null&&ze!==null&&Qd(W,ze,ee,te,!0)}}e:{if(q=R?Jr(R):window,X=q.nodeName&&q.nodeName.toLowerCase(),X==="select"||X==="input"&&q.type==="file")var ne=kw;else if(Nd(q))if(Ld)ne=Nw;else{ne=Tw;var se=bw}else(X=q.nodeName)&&X.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(ne=Cw);if(ne&&(ne=ne(s,R))){Ad(W,ne,a,V);break e}se&&se(s,q,R),s==="focusout"&&(se=q._wrapperState)&&se.controlled&&q.type==="number"&&Us(q,"number",q.value)}switch(se=R?Jr(R):window,s){case"focusin":(Nd(se)||se.contentEditable==="true")&&(Wr=se,Xa=R,ii=null);break;case"focusout":ii=Xa=Wr=null;break;case"mousedown":Ya=!0;break;case"contextmenu":case"mouseup":case"dragend":Ya=!1,Dd(W,a,V);break;case"selectionchange":if(Iw)break;case"keydown":case"keyup":Dd(W,a,V)}var ie;if(Ka)e:{switch(s){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else Vr?Td(s,a)&&(ae="onCompositionEnd"):s==="keydown"&&a.keyCode===229&&(ae="onCompositionStart");ae&&(Ed&&a.locale!=="ko"&&(Vr||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Vr&&(ie=vd()):(Rn=V,za="value"in Rn?Rn.value:Rn.textContent,Vr=!0)),se=Io(R,ae),0<se.length&&(ae=new xd(ae,s,null,a,V),W.push({event:ae,listeners:se}),ie?ae.data=ie:(ie=Cd(a),ie!==null&&(ae.data=ie)))),(ie=ww?Sw(s,a):xw(s,a))&&(R=Io(R,"onBeforeInput"),0<R.length&&(V=new xd("onBeforeInput","beforeinput",null,a,V),W.push({event:V,listeners:R}),V.data=ie))}Kd(W,i)})}function ai(s,i,a){return{instance:s,listener:i,currentTarget:a}}function Io(s,i){for(var a=i+"Capture",f=[];s!==null;){var h=s,g=h.stateNode;h.tag===5&&g!==null&&(h=g,g=Hs(s,a),g!=null&&f.unshift(ai(s,g,h)),g=Hs(s,i),g!=null&&f.push(ai(s,g,h))),s=s.return}return f}function Gr(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function Qd(s,i,a,f,h){for(var g=i._reactName,_=[];a!==null&&a!==f;){var b=a,C=b.alternate,R=b.stateNode;if(C!==null&&C===f)break;b.tag===5&&R!==null&&(b=R,h?(C=Hs(a,g),C!=null&&_.unshift(ai(a,C,b))):h||(C=Hs(a,g),C!=null&&_.push(ai(a,C,b)))),a=a.return}_.length!==0&&s.push({event:i,listeners:_})}var Ow=/\r\n?/g,Rw=/\u0000|\uFFFD/g;function Jd(s){return(typeof s=="string"?s:""+s).replace(Ow,`
39
+ `).replace(Rw,"")}function Mo(s,i,a){if(i=Jd(i),Jd(s)!==i&&a)throw Error(n(425))}function jo(){}var sc=null,ic=null;function oc(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var lc=typeof setTimeout=="function"?setTimeout:void 0,$w=typeof clearTimeout=="function"?clearTimeout:void 0,Xd=typeof Promise=="function"?Promise:void 0,Dw=typeof queueMicrotask=="function"?queueMicrotask:typeof Xd<"u"?function(s){return Xd.resolve(null).then(s).catch(Bw)}:lc;function Bw(s){setTimeout(function(){throw s})}function ac(s,i){var a=i,f=0;do{var h=a.nextSibling;if(s.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(f===0){s.removeChild(h),Ys(i);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=h}while(a);Ys(i)}function Dn(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function Yd(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return s;i--}else a==="/$"&&i++}s=s.previousSibling}return null}var Qr=Math.random().toString(36).slice(2),on="__reactFiber$"+Qr,ci="__reactProps$"+Qr,pn="__reactContainer$"+Qr,cc="__reactEvents$"+Qr,Fw="__reactListeners$"+Qr,zw="__reactHandles$"+Qr;function ur(s){var i=s[on];if(i)return i;for(var a=s.parentNode;a;){if(i=a[pn]||a[on]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(s=Yd(s);s!==null;){if(a=s[on])return a;s=Yd(s)}return i}s=a,a=s.parentNode}return null}function ui(s){return s=s[on]||s[pn],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Jr(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Po(s){return s[ci]||null}var uc=[],Xr=-1;function Bn(s){return{current:s}}function Le(s){0>Xr||(s.current=uc[Xr],uc[Xr]=null,Xr--)}function Ce(s,i){Xr++,uc[Xr]=s.current,s.current=i}var Fn={},st=Bn(Fn),mt=Bn(!1),fr=Fn;function Yr(s,i){var a=s.type.contextTypes;if(!a)return Fn;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===i)return f.__reactInternalMemoizedMaskedChildContext;var h={},g;for(g in a)h[g]=i[g];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=h),h}function yt(s){return s=s.childContextTypes,s!=null}function Oo(){Le(mt),Le(st)}function Zd(s,i,a){if(st.current!==Fn)throw Error(n(168));Ce(st,i),Ce(mt,a)}function eh(s,i,a){var f=s.stateNode;if(i=i.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var h in f)if(!(h in i))throw Error(n(108,ve(s)||"Unknown",h));return J({},a,f)}function Ro(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Fn,fr=st.current,Ce(st,s),Ce(mt,mt.current),!0}function th(s,i,a){var f=s.stateNode;if(!f)throw Error(n(169));a?(s=eh(s,i,fr),f.__reactInternalMemoizedMergedChildContext=s,Le(mt),Le(st),Ce(st,s)):Le(mt),Ce(mt,a)}var gn=null,$o=!1,fc=!1;function nh(s){gn===null?gn=[s]:gn.push(s)}function Uw(s){$o=!0,nh(s)}function zn(){if(!fc&&gn!==null){fc=!0;var s=0,i=Ee;try{var a=gn;for(Ee=1;s<a.length;s++){var f=a[s];do f=f(!0);while(f!==null)}gn=null,$o=!1}catch(h){throw gn!==null&&(gn=gn.slice(s+1)),sd(ja,zn),h}finally{Ee=i,fc=!1}}return null}var Zr=[],es=0,Do=null,Bo=0,Pt=[],Ot=0,dr=null,mn=1,yn="";function hr(s,i){Zr[es++]=Bo,Zr[es++]=Do,Do=s,Bo=i}function rh(s,i,a){Pt[Ot++]=mn,Pt[Ot++]=yn,Pt[Ot++]=dr,dr=s;var f=mn;s=yn;var h=32-Kt(f)-1;f&=~(1<<h),a+=1;var g=32-Kt(i)+h;if(30<g){var _=h-h%5;g=(f&(1<<_)-1).toString(32),f>>=_,h-=_,mn=1<<32-Kt(i)+h|a<<h|f,yn=g+s}else mn=1<<g|a<<h|f,yn=s}function dc(s){s.return!==null&&(hr(s,1),rh(s,1,0))}function hc(s){for(;s===Do;)Do=Zr[--es],Zr[es]=null,Bo=Zr[--es],Zr[es]=null;for(;s===dr;)dr=Pt[--Ot],Pt[Ot]=null,yn=Pt[--Ot],Pt[Ot]=null,mn=Pt[--Ot],Pt[Ot]=null}var Nt=null,At=null,Ie=!1,Qt=null;function sh(s,i){var a=Bt(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=s,i=s.deletions,i===null?(s.deletions=[a],s.flags|=16):i.push(a)}function ih(s,i){switch(s.tag){case 5:var a=s.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,Nt=s,At=Dn(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,Nt=s,At=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=dr!==null?{id:mn,overflow:yn}:null,s.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Bt(18,null,null,0),a.stateNode=i,a.return=s,s.child=a,Nt=s,At=null,!0):!1;default:return!1}}function pc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function gc(s){if(Ie){var i=At;if(i){var a=i;if(!ih(s,i)){if(pc(s))throw Error(n(418));i=Dn(a.nextSibling);var f=Nt;i&&ih(s,i)?sh(f,a):(s.flags=s.flags&-4097|2,Ie=!1,Nt=s)}}else{if(pc(s))throw Error(n(418));s.flags=s.flags&-4097|2,Ie=!1,Nt=s}}}function oh(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Nt=s}function Fo(s){if(s!==Nt)return!1;if(!Ie)return oh(s),Ie=!0,!1;var i;if((i=s.tag!==3)&&!(i=s.tag!==5)&&(i=s.type,i=i!=="head"&&i!=="body"&&!oc(s.type,s.memoizedProps)),i&&(i=At)){if(pc(s))throw lh(),Error(n(418));for(;i;)sh(s,i),i=Dn(i.nextSibling)}if(oh(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="/$"){if(i===0){At=Dn(s.nextSibling);break e}i--}else a!=="$"&&a!=="$!"&&a!=="$?"||i++}s=s.nextSibling}At=null}}else At=Nt?Dn(s.stateNode.nextSibling):null;return!0}function lh(){for(var s=At;s;)s=Dn(s.nextSibling)}function ts(){At=Nt=null,Ie=!1}function mc(s){Qt===null?Qt=[s]:Qt.push(s)}var Hw=O.ReactCurrentBatchConfig;function fi(s,i,a){if(s=a.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var f=a.stateNode}if(!f)throw Error(n(147,s));var h=f,g=""+s;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===g?i.ref:(i=function(_){var b=h.refs;_===null?delete b[g]:b[g]=_},i._stringRef=g,i)}if(typeof s!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,s))}return s}function zo(s,i){throw s=Object.prototype.toString.call(i),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s))}function ah(s){var i=s._init;return i(s._payload)}function ch(s){function i(j,A){if(s){var P=j.deletions;P===null?(j.deletions=[A],j.flags|=16):P.push(A)}}function a(j,A){if(!s)return null;for(;A!==null;)i(j,A),A=A.sibling;return null}function f(j,A){for(j=new Map;A!==null;)A.key!==null?j.set(A.key,A):j.set(A.index,A),A=A.sibling;return j}function h(j,A){return j=Qn(j,A),j.index=0,j.sibling=null,j}function g(j,A,P){return j.index=P,s?(P=j.alternate,P!==null?(P=P.index,P<A?(j.flags|=2,A):P):(j.flags|=2,A)):(j.flags|=1048576,A)}function _(j){return s&&j.alternate===null&&(j.flags|=2),j}function b(j,A,P,K){return A===null||A.tag!==6?(A=lu(P,j.mode,K),A.return=j,A):(A=h(A,P),A.return=j,A)}function C(j,A,P,K){var ne=P.type;return ne===G?V(j,A,P.props.children,K,P.key):A!==null&&(A.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===pe&&ah(ne)===A.type)?(K=h(A,P.props),K.ref=fi(j,A,P),K.return=j,K):(K=fl(P.type,P.key,P.props,null,j.mode,K),K.ref=fi(j,A,P),K.return=j,K)}function R(j,A,P,K){return A===null||A.tag!==4||A.stateNode.containerInfo!==P.containerInfo||A.stateNode.implementation!==P.implementation?(A=au(P,j.mode,K),A.return=j,A):(A=h(A,P.children||[]),A.return=j,A)}function V(j,A,P,K,ne){return A===null||A.tag!==7?(A=xr(P,j.mode,K,ne),A.return=j,A):(A=h(A,P),A.return=j,A)}function W(j,A,P){if(typeof A=="string"&&A!==""||typeof A=="number")return A=lu(""+A,j.mode,P),A.return=j,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case D:return P=fl(A.type,A.key,A.props,null,j.mode,P),P.ref=fi(j,null,A),P.return=j,P;case z:return A=au(A,j.mode,P),A.return=j,A;case pe:var K=A._init;return W(j,K(A._payload),P)}if(ir(A)||re(A))return A=xr(A,j.mode,P,null),A.return=j,A;zo(j,A)}return null}function q(j,A,P,K){var ne=A!==null?A.key:null;if(typeof P=="string"&&P!==""||typeof P=="number")return ne!==null?null:b(j,A,""+P,K);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case D:return P.key===ne?C(j,A,P,K):null;case z:return P.key===ne?R(j,A,P,K):null;case pe:return ne=P._init,q(j,A,ne(P._payload),K)}if(ir(P)||re(P))return ne!==null?null:V(j,A,P,K,null);zo(j,P)}return null}function X(j,A,P,K,ne){if(typeof K=="string"&&K!==""||typeof K=="number")return j=j.get(P)||null,b(A,j,""+K,ne);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case D:return j=j.get(K.key===null?P:K.key)||null,C(A,j,K,ne);case z:return j=j.get(K.key===null?P:K.key)||null,R(A,j,K,ne);case pe:var se=K._init;return X(j,A,P,se(K._payload),ne)}if(ir(K)||re(K))return j=j.get(P)||null,V(A,j,K,ne,null);zo(A,K)}return null}function ee(j,A,P,K){for(var ne=null,se=null,ie=A,ae=A=0,Xe=null;ie!==null&&ae<P.length;ae++){ie.index>ae?(Xe=ie,ie=null):Xe=ie.sibling;var Se=q(j,ie,P[ae],K);if(Se===null){ie===null&&(ie=Xe);break}s&&ie&&Se.alternate===null&&i(j,ie),A=g(Se,A,ae),se===null?ne=Se:se.sibling=Se,se=Se,ie=Xe}if(ae===P.length)return a(j,ie),Ie&&hr(j,ae),ne;if(ie===null){for(;ae<P.length;ae++)ie=W(j,P[ae],K),ie!==null&&(A=g(ie,A,ae),se===null?ne=ie:se.sibling=ie,se=ie);return Ie&&hr(j,ae),ne}for(ie=f(j,ie);ae<P.length;ae++)Xe=X(ie,j,ae,P[ae],K),Xe!==null&&(s&&Xe.alternate!==null&&ie.delete(Xe.key===null?ae:Xe.key),A=g(Xe,A,ae),se===null?ne=Xe:se.sibling=Xe,se=Xe);return s&&ie.forEach(function(Jn){return i(j,Jn)}),Ie&&hr(j,ae),ne}function te(j,A,P,K){var ne=re(P);if(typeof ne!="function")throw Error(n(150));if(P=ne.call(P),P==null)throw Error(n(151));for(var se=ne=null,ie=A,ae=A=0,Xe=null,Se=P.next();ie!==null&&!Se.done;ae++,Se=P.next()){ie.index>ae?(Xe=ie,ie=null):Xe=ie.sibling;var Jn=q(j,ie,Se.value,K);if(Jn===null){ie===null&&(ie=Xe);break}s&&ie&&Jn.alternate===null&&i(j,ie),A=g(Jn,A,ae),se===null?ne=Jn:se.sibling=Jn,se=Jn,ie=Xe}if(Se.done)return a(j,ie),Ie&&hr(j,ae),ne;if(ie===null){for(;!Se.done;ae++,Se=P.next())Se=W(j,Se.value,K),Se!==null&&(A=g(Se,A,ae),se===null?ne=Se:se.sibling=Se,se=Se);return Ie&&hr(j,ae),ne}for(ie=f(j,ie);!Se.done;ae++,Se=P.next())Se=X(ie,j,ae,Se.value,K),Se!==null&&(s&&Se.alternate!==null&&ie.delete(Se.key===null?ae:Se.key),A=g(Se,A,ae),se===null?ne=Se:se.sibling=Se,se=Se);return s&&ie.forEach(function(_0){return i(j,_0)}),Ie&&hr(j,ae),ne}function ze(j,A,P,K){if(typeof P=="object"&&P!==null&&P.type===G&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case D:e:{for(var ne=P.key,se=A;se!==null;){if(se.key===ne){if(ne=P.type,ne===G){if(se.tag===7){a(j,se.sibling),A=h(se,P.props.children),A.return=j,j=A;break e}}else if(se.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===pe&&ah(ne)===se.type){a(j,se.sibling),A=h(se,P.props),A.ref=fi(j,se,P),A.return=j,j=A;break e}a(j,se);break}else i(j,se);se=se.sibling}P.type===G?(A=xr(P.props.children,j.mode,K,P.key),A.return=j,j=A):(K=fl(P.type,P.key,P.props,null,j.mode,K),K.ref=fi(j,A,P),K.return=j,j=K)}return _(j);case z:e:{for(se=P.key;A!==null;){if(A.key===se)if(A.tag===4&&A.stateNode.containerInfo===P.containerInfo&&A.stateNode.implementation===P.implementation){a(j,A.sibling),A=h(A,P.children||[]),A.return=j,j=A;break e}else{a(j,A);break}else i(j,A);A=A.sibling}A=au(P,j.mode,K),A.return=j,j=A}return _(j);case pe:return se=P._init,ze(j,A,se(P._payload),K)}if(ir(P))return ee(j,A,P,K);if(re(P))return te(j,A,P,K);zo(j,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,A!==null&&A.tag===6?(a(j,A.sibling),A=h(A,P),A.return=j,j=A):(a(j,A),A=lu(P,j.mode,K),A.return=j,j=A),_(j)):a(j,A)}return ze}var ns=ch(!0),uh=ch(!1),Uo=Bn(null),Ho=null,rs=null,yc=null;function vc(){yc=rs=Ho=null}function wc(s){var i=Uo.current;Le(Uo),s._currentValue=i}function Sc(s,i,a){for(;s!==null;){var f=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),s===a)break;s=s.return}}function ss(s,i){Ho=s,yc=rs=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&i)!==0&&(vt=!0),s.firstContext=null)}function Rt(s){var i=s._currentValue;if(yc!==s)if(s={context:s,memoizedValue:i,next:null},rs===null){if(Ho===null)throw Error(n(308));rs=s,Ho.dependencies={lanes:0,firstContext:s}}else rs=rs.next=s;return i}var pr=null;function xc(s){pr===null?pr=[s]:pr.push(s)}function fh(s,i,a,f){var h=i.interleaved;return h===null?(a.next=a,xc(i)):(a.next=h.next,h.next=a),i.interleaved=a,vn(s,f)}function vn(s,i){s.lanes|=i;var a=s.alternate;for(a!==null&&(a.lanes|=i),a=s,s=s.return;s!==null;)s.childLanes|=i,a=s.alternate,a!==null&&(a.childLanes|=i),a=s,s=s.return;return a.tag===3?a.stateNode:null}var Un=!1;function _c(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dh(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function wn(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function Hn(s,i,a){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(we&2)!==0){var h=f.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),f.pending=i,vn(s,a)}return h=f.interleaved,h===null?(i.next=i,xc(f)):(i.next=h.next,h.next=i),f.interleaved=i,vn(s,a)}function qo(s,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,Ra(s,a)}}function hh(s,i){var a=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var _={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?h=g=_:g=g.next=_,a=a.next}while(a!==null);g===null?h=g=i:g=g.next=i}else h=g=i;a={baseState:f.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:f.shared,effects:f.effects},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=i:s.next=i,a.lastBaseUpdate=i}function Vo(s,i,a,f){var h=s.updateQueue;Un=!1;var g=h.firstBaseUpdate,_=h.lastBaseUpdate,b=h.shared.pending;if(b!==null){h.shared.pending=null;var C=b,R=C.next;C.next=null,_===null?g=R:_.next=R,_=C;var V=s.alternate;V!==null&&(V=V.updateQueue,b=V.lastBaseUpdate,b!==_&&(b===null?V.firstBaseUpdate=R:b.next=R,V.lastBaseUpdate=C))}if(g!==null){var W=h.baseState;_=0,V=R=C=null,b=g;do{var q=b.lane,X=b.eventTime;if((f&q)===q){V!==null&&(V=V.next={eventTime:X,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var ee=s,te=b;switch(q=i,X=a,te.tag){case 1:if(ee=te.payload,typeof ee=="function"){W=ee.call(X,W,q);break e}W=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=te.payload,q=typeof ee=="function"?ee.call(X,W,q):ee,q==null)break e;W=J({},W,q);break e;case 2:Un=!0}}b.callback!==null&&b.lane!==0&&(s.flags|=64,q=h.effects,q===null?h.effects=[b]:q.push(b))}else X={eventTime:X,lane:q,tag:b.tag,payload:b.payload,callback:b.callback,next:null},V===null?(R=V=X,C=W):V=V.next=X,_|=q;if(b=b.next,b===null){if(b=h.shared.pending,b===null)break;q=b,b=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);if(V===null&&(C=W),h.baseState=C,h.firstBaseUpdate=R,h.lastBaseUpdate=V,i=h.shared.interleaved,i!==null){h=i;do _|=h.lane,h=h.next;while(h!==i)}else g===null&&(h.shared.lanes=0);yr|=_,s.lanes=_,s.memoizedState=W}}function ph(s,i,a){if(s=i.effects,i.effects=null,s!==null)for(i=0;i<s.length;i++){var f=s[i],h=f.callback;if(h!==null){if(f.callback=null,f=a,typeof h!="function")throw Error(n(191,h));h.call(f)}}}var di={},ln=Bn(di),hi=Bn(di),pi=Bn(di);function gr(s){if(s===di)throw Error(n(174));return s}function Ec(s,i){switch(Ce(pi,i),Ce(hi,s),Ce(ln,di),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:hn(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=hn(i,s)}Le(ln),Ce(ln,i)}function is(){Le(ln),Le(hi),Le(pi)}function gh(s){gr(pi.current);var i=gr(ln.current),a=hn(i,s.type);i!==a&&(Ce(hi,s),Ce(ln,a))}function kc(s){hi.current===s&&(Le(ln),Le(hi))}var Pe=Bn(0);function Wo(s){for(var i=s;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var bc=[];function Tc(){for(var s=0;s<bc.length;s++)bc[s]._workInProgressVersionPrimary=null;bc.length=0}var Ko=O.ReactCurrentDispatcher,Cc=O.ReactCurrentBatchConfig,mr=0,Oe=null,We=null,Qe=null,Go=!1,gi=!1,mi=0,qw=0;function it(){throw Error(n(321))}function Nc(s,i){if(i===null)return!1;for(var a=0;a<i.length&&a<s.length;a++)if(!Gt(s[a],i[a]))return!1;return!0}function Ac(s,i,a,f,h,g){if(mr=g,Oe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Ko.current=s===null||s.memoizedState===null?Gw:Qw,s=a(f,h),gi){g=0;do{if(gi=!1,mi=0,25<=g)throw Error(n(301));g+=1,Qe=We=null,i.updateQueue=null,Ko.current=Jw,s=a(f,h)}while(gi)}if(Ko.current=Xo,i=We!==null&&We.next!==null,mr=0,Qe=We=Oe=null,Go=!1,i)throw Error(n(300));return s}function Lc(){var s=mi!==0;return mi=0,s}function an(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?Oe.memoizedState=Qe=s:Qe=Qe.next=s,Qe}function $t(){if(We===null){var s=Oe.alternate;s=s!==null?s.memoizedState:null}else s=We.next;var i=Qe===null?Oe.memoizedState:Qe.next;if(i!==null)Qe=i,We=s;else{if(s===null)throw Error(n(310));We=s,s={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Qe===null?Oe.memoizedState=Qe=s:Qe=Qe.next=s}return Qe}function yi(s,i){return typeof i=="function"?i(s):i}function Ic(s){var i=$t(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=We,h=f.baseQueue,g=a.pending;if(g!==null){if(h!==null){var _=h.next;h.next=g.next,g.next=_}f.baseQueue=h=g,a.pending=null}if(h!==null){g=h.next,f=f.baseState;var b=_=null,C=null,R=g;do{var V=R.lane;if((mr&V)===V)C!==null&&(C=C.next={lane:0,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),f=R.hasEagerState?R.eagerState:s(f,R.action);else{var W={lane:V,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null};C===null?(b=C=W,_=f):C=C.next=W,Oe.lanes|=V,yr|=V}R=R.next}while(R!==null&&R!==g);C===null?_=f:C.next=b,Gt(f,i.memoizedState)||(vt=!0),i.memoizedState=f,i.baseState=_,i.baseQueue=C,a.lastRenderedState=f}if(s=a.interleaved,s!==null){h=s;do g=h.lane,Oe.lanes|=g,yr|=g,h=h.next;while(h!==s)}else h===null&&(a.lanes=0);return[i.memoizedState,a.dispatch]}function Mc(s){var i=$t(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=a.dispatch,h=a.pending,g=i.memoizedState;if(h!==null){a.pending=null;var _=h=h.next;do g=s(g,_.action),_=_.next;while(_!==h);Gt(g,i.memoizedState)||(vt=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),a.lastRenderedState=g}return[g,f]}function mh(){}function yh(s,i){var a=Oe,f=$t(),h=i(),g=!Gt(f.memoizedState,h);if(g&&(f.memoizedState=h,vt=!0),f=f.queue,jc(Sh.bind(null,a,f,s),[s]),f.getSnapshot!==i||g||Qe!==null&&Qe.memoizedState.tag&1){if(a.flags|=2048,vi(9,wh.bind(null,a,f,h,i),void 0,null),Je===null)throw Error(n(349));(mr&30)!==0||vh(a,i,h)}return h}function vh(s,i,a){s.flags|=16384,s={getSnapshot:i,value:a},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.stores=[s]):(a=i.stores,a===null?i.stores=[s]:a.push(s))}function wh(s,i,a,f){i.value=a,i.getSnapshot=f,xh(i)&&_h(s)}function Sh(s,i,a){return a(function(){xh(i)&&_h(s)})}function xh(s){var i=s.getSnapshot;s=s.value;try{var a=i();return!Gt(s,a)}catch{return!0}}function _h(s){var i=vn(s,1);i!==null&&Zt(i,s,1,-1)}function Eh(s){var i=an();return typeof s=="function"&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yi,lastRenderedState:s},i.queue=s,s=s.dispatch=Kw.bind(null,Oe,s),[i.memoizedState,s]}function vi(s,i,a,f){return s={tag:s,create:i,destroy:a,deps:f,next:null},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.lastEffect=s.next=s):(a=i.lastEffect,a===null?i.lastEffect=s.next=s:(f=a.next,a.next=s,s.next=f,i.lastEffect=s)),s}function kh(){return $t().memoizedState}function Qo(s,i,a,f){var h=an();Oe.flags|=s,h.memoizedState=vi(1|i,a,void 0,f===void 0?null:f)}function Jo(s,i,a,f){var h=$t();f=f===void 0?null:f;var g=void 0;if(We!==null){var _=We.memoizedState;if(g=_.destroy,f!==null&&Nc(f,_.deps)){h.memoizedState=vi(i,a,g,f);return}}Oe.flags|=s,h.memoizedState=vi(1|i,a,g,f)}function bh(s,i){return Qo(8390656,8,s,i)}function jc(s,i){return Jo(2048,8,s,i)}function Th(s,i){return Jo(4,2,s,i)}function Ch(s,i){return Jo(4,4,s,i)}function Nh(s,i){if(typeof i=="function")return s=s(),i(s),function(){i(null)};if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function Ah(s,i,a){return a=a!=null?a.concat([s]):null,Jo(4,4,Nh.bind(null,i,s),a)}function Pc(){}function Lh(s,i){var a=$t();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&Nc(i,f[1])?f[0]:(a.memoizedState=[s,i],s)}function Ih(s,i){var a=$t();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&Nc(i,f[1])?f[0]:(s=s(),a.memoizedState=[s,i],s)}function Mh(s,i,a){return(mr&21)===0?(s.baseState&&(s.baseState=!1,vt=!0),s.memoizedState=a):(Gt(a,i)||(a=ad(),Oe.lanes|=a,yr|=a,s.baseState=!0),i)}function Vw(s,i){var a=Ee;Ee=a!==0&&4>a?a:4,s(!0);var f=Cc.transition;Cc.transition={};try{s(!1),i()}finally{Ee=a,Cc.transition=f}}function jh(){return $t().memoizedState}function Ww(s,i,a){var f=Kn(s);if(a={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null},Ph(s))Oh(i,a);else if(a=fh(s,i,a,f),a!==null){var h=ft();Zt(a,s,f,h),Rh(a,i,f)}}function Kw(s,i,a){var f=Kn(s),h={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ph(s))Oh(i,h);else{var g=s.alternate;if(s.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var _=i.lastRenderedState,b=g(_,a);if(h.hasEagerState=!0,h.eagerState=b,Gt(b,_)){var C=i.interleaved;C===null?(h.next=h,xc(i)):(h.next=C.next,C.next=h),i.interleaved=h;return}}catch{}finally{}a=fh(s,i,h,f),a!==null&&(h=ft(),Zt(a,s,f,h),Rh(a,i,f))}}function Ph(s){var i=s.alternate;return s===Oe||i!==null&&i===Oe}function Oh(s,i){gi=Go=!0;var a=s.pending;a===null?i.next=i:(i.next=a.next,a.next=i),s.pending=i}function Rh(s,i,a){if((a&4194240)!==0){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,Ra(s,a)}}var Xo={readContext:Rt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},Gw={readContext:Rt,useCallback:function(s,i){return an().memoizedState=[s,i===void 0?null:i],s},useContext:Rt,useEffect:bh,useImperativeHandle:function(s,i,a){return a=a!=null?a.concat([s]):null,Qo(4194308,4,Nh.bind(null,i,s),a)},useLayoutEffect:function(s,i){return Qo(4194308,4,s,i)},useInsertionEffect:function(s,i){return Qo(4,2,s,i)},useMemo:function(s,i){var a=an();return i=i===void 0?null:i,s=s(),a.memoizedState=[s,i],s},useReducer:function(s,i,a){var f=an();return i=a!==void 0?a(i):i,f.memoizedState=f.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},f.queue=s,s=s.dispatch=Ww.bind(null,Oe,s),[f.memoizedState,s]},useRef:function(s){var i=an();return s={current:s},i.memoizedState=s},useState:Eh,useDebugValue:Pc,useDeferredValue:function(s){return an().memoizedState=s},useTransition:function(){var s=Eh(!1),i=s[0];return s=Vw.bind(null,s[1]),an().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,a){var f=Oe,h=an();if(Ie){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),Je===null)throw Error(n(349));(mr&30)!==0||vh(f,i,a)}h.memoizedState=a;var g={value:a,getSnapshot:i};return h.queue=g,bh(Sh.bind(null,f,g,s),[s]),f.flags|=2048,vi(9,wh.bind(null,f,g,a,i),void 0,null),a},useId:function(){var s=an(),i=Je.identifierPrefix;if(Ie){var a=yn,f=mn;a=(f&~(1<<32-Kt(f)-1)).toString(32)+a,i=":"+i+"R"+a,a=mi++,0<a&&(i+="H"+a.toString(32)),i+=":"}else a=qw++,i=":"+i+"r"+a.toString(32)+":";return s.memoizedState=i},unstable_isNewReconciler:!1},Qw={readContext:Rt,useCallback:Lh,useContext:Rt,useEffect:jc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:Ch,useMemo:Ih,useReducer:Ic,useRef:kh,useState:function(){return Ic(yi)},useDebugValue:Pc,useDeferredValue:function(s){var i=$t();return Mh(i,We.memoizedState,s)},useTransition:function(){var s=Ic(yi)[0],i=$t().memoizedState;return[s,i]},useMutableSource:mh,useSyncExternalStore:yh,useId:jh,unstable_isNewReconciler:!1},Jw={readContext:Rt,useCallback:Lh,useContext:Rt,useEffect:jc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:Ch,useMemo:Ih,useReducer:Mc,useRef:kh,useState:function(){return Mc(yi)},useDebugValue:Pc,useDeferredValue:function(s){var i=$t();return We===null?i.memoizedState=s:Mh(i,We.memoizedState,s)},useTransition:function(){var s=Mc(yi)[0],i=$t().memoizedState;return[s,i]},useMutableSource:mh,useSyncExternalStore:yh,useId:jh,unstable_isNewReconciler:!1};function Jt(s,i){if(s&&s.defaultProps){i=J({},i),s=s.defaultProps;for(var a in s)i[a]===void 0&&(i[a]=s[a]);return i}return i}function Oc(s,i,a,f){i=s.memoizedState,a=a(f,i),a=a==null?i:J({},i,a),s.memoizedState=a,s.lanes===0&&(s.updateQueue.baseState=a)}var Yo={isMounted:function(s){return(s=s._reactInternals)?cr(s)===s:!1},enqueueSetState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Kn(s),g=wn(f,h);g.payload=i,a!=null&&(g.callback=a),i=Hn(s,g,h),i!==null&&(Zt(i,s,h,f),qo(i,s,h))},enqueueReplaceState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Kn(s),g=wn(f,h);g.tag=1,g.payload=i,a!=null&&(g.callback=a),i=Hn(s,g,h),i!==null&&(Zt(i,s,h,f),qo(i,s,h))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var a=ft(),f=Kn(s),h=wn(a,f);h.tag=2,i!=null&&(h.callback=i),i=Hn(s,h,f),i!==null&&(Zt(i,s,f,a),qo(i,s,f))}};function $h(s,i,a,f,h,g,_){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,g,_):i.prototype&&i.prototype.isPureReactComponent?!si(a,f)||!si(h,g):!0}function Dh(s,i,a){var f=!1,h=Fn,g=i.contextType;return typeof g=="object"&&g!==null?g=Rt(g):(h=yt(i)?fr:st.current,f=i.contextTypes,g=(f=f!=null)?Yr(s,h):Fn),i=new i(a,g),s.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Yo,s.stateNode=i,i._reactInternals=s,f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=h,s.__reactInternalMemoizedMaskedChildContext=g),i}function Bh(s,i,a,f){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,f),i.state!==s&&Yo.enqueueReplaceState(i,i.state,null)}function Rc(s,i,a,f){var h=s.stateNode;h.props=a,h.state=s.memoizedState,h.refs={},_c(s);var g=i.contextType;typeof g=="object"&&g!==null?h.context=Rt(g):(g=yt(i)?fr:st.current,h.context=Yr(s,g)),h.state=s.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Oc(s,i,g,a),h.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&Yo.enqueueReplaceState(h,h.state,null),Vo(s,a,h,f),h.state=s.memoizedState),typeof h.componentDidMount=="function"&&(s.flags|=4194308)}function os(s,i){try{var a="",f=i;do a+=ye(f),f=f.return;while(f);var h=a}catch(g){h=`
40
40
  Error generating stack: `+g.message+`
41
- `+g.stack}return{value:s,source:i,stack:h,digest:null}}function $c(s,i,a){return{value:s,source:null,stack:a??null,digest:i??null}}function Dc(s,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Jw=typeof WeakMap=="function"?WeakMap:Map;function Fh(s,i,a){a=wn(-1,a),a.tag=3,a.payload={element:null};var f=i.value;return a.callback=function(){il||(il=!0,Zc=f),Dc(s,i)},a}function zh(s,i,a){a=wn(-1,a),a.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=i.value;a.payload=function(){return f(h)},a.callback=function(){Dc(s,i)}}var g=s.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){Dc(s,i),typeof f!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})}),a}function Uh(s,i,a){var f=s.pingCache;if(f===null){f=s.pingCache=new Jw;var h=new Set;f.set(i,h)}else h=f.get(i),h===void 0&&(h=new Set,f.set(i,h));h.has(a)||(h.add(a),s=u0.bind(null,s,i,a),i.then(s,s))}function Hh(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function qh(s,i,a,f,h){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=wn(-1,1),i.tag=2,Hn(a,i,1))),a.lanes|=1),s):(s.flags|=65536,s.lanes=h,s)}var Xw=O.ReactCurrentOwner,vt=!1;function ut(s,i,a,f){i.child=s===null?uh(i,null,a,f):ns(i,s.child,a,f)}function Vh(s,i,a,f,h){a=a.render;var g=i.ref;return ss(i,h),f=Ac(s,i,a,f,g,h),a=Lc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Ie&&a&&dc(i),i.flags|=1,ut(s,i,f,h),i.child)}function Wh(s,i,a,f,h){if(s===null){var g=a.type;return typeof g=="function"&&!ou(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=g,Kh(s,i,g,f,h)):(s=fl(a.type,null,f,i,i.mode,h),s.ref=i.ref,s.return=i,i.child=s)}if(g=s.child,(s.lanes&h)===0){var _=g.memoizedProps;if(a=a.compare,a=a!==null?a:si,a(_,f)&&s.ref===i.ref)return Sn(s,i,h)}return i.flags|=1,s=Qn(g,f),s.ref=i.ref,s.return=i,i.child=s}function Kh(s,i,a,f,h){if(s!==null){var g=s.memoizedProps;if(si(g,f)&&s.ref===i.ref)if(vt=!1,i.pendingProps=f=g,(s.lanes&h)!==0)(s.flags&131072)!==0&&(vt=!0);else return i.lanes=s.lanes,Sn(s,i,h)}return Bc(s,i,a,f,h)}function Gh(s,i,a){var f=i.pendingProps,h=f.children,g=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(as,Lt),Lt|=a;else{if((a&1073741824)===0)return s=g!==null?g.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,Ce(as,Lt),Lt|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=g!==null?g.baseLanes:a,Ce(as,Lt),Lt|=f}else g!==null?(f=g.baseLanes|a,i.memoizedState=null):f=a,Ce(as,Lt),Lt|=f;return ut(s,i,h,a),i.child}function Qh(s,i){var a=i.ref;(s===null&&a!==null||s!==null&&s.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function Bc(s,i,a,f,h){var g=yt(a)?fr:st.current;return g=Yr(i,g),ss(i,h),a=Ac(s,i,a,f,g,h),f=Lc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Ie&&f&&dc(i),i.flags|=1,ut(s,i,a,h),i.child)}function Jh(s,i,a,f,h){if(yt(a)){var g=!0;Ro(i)}else g=!1;if(ss(i,h),i.stateNode===null)el(s,i),Dh(i,a,f),Rc(i,a,f,h),f=!0;else if(s===null){var _=i.stateNode,b=i.memoizedProps;_.props=b;var C=_.context,R=a.contextType;typeof R=="object"&&R!==null?R=Rt(R):(R=yt(a)?fr:st.current,R=Yr(i,R));var V=a.getDerivedStateFromProps,W=typeof V=="function"||typeof _.getSnapshotBeforeUpdate=="function";W||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==f||C!==R)&&Bh(i,_,f,R),Un=!1;var q=i.memoizedState;_.state=q,Vo(i,f,_,h),C=i.memoizedState,b!==f||q!==C||mt.current||Un?(typeof V=="function"&&(Oc(i,a,V,f),C=i.memoizedState),(b=Un||$h(i,a,b,f,q,C,R))?(W||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=C),_.props=f,_.state=C,_.context=R,f=b):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{_=i.stateNode,dh(s,i),b=i.memoizedProps,R=i.type===i.elementType?b:Jt(i.type,b),_.props=R,W=i.pendingProps,q=_.context,C=a.contextType,typeof C=="object"&&C!==null?C=Rt(C):(C=yt(a)?fr:st.current,C=Yr(i,C));var X=a.getDerivedStateFromProps;(V=typeof X=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==W||q!==C)&&Bh(i,_,f,C),Un=!1,q=i.memoizedState,_.state=q,Vo(i,f,_,h);var ee=i.memoizedState;b!==W||q!==ee||mt.current||Un?(typeof X=="function"&&(Oc(i,a,X,f),ee=i.memoizedState),(R=Un||$h(i,a,R,f,q,ee,C)||!1)?(V||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,ee,C),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,ee,C)),typeof _.componentDidUpdate=="function"&&(i.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof _.componentDidUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=ee),_.props=f,_.state=ee,_.context=C,f=R):(typeof _.componentDidUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=1024),f=!1)}return Fc(s,i,a,f,g,h)}function Fc(s,i,a,f,h,g){Qh(s,i);var _=(i.flags&128)!==0;if(!f&&!_)return h&&th(i,a,!1),Sn(s,i,g);f=i.stateNode,Xw.current=i;var b=_&&typeof a.getDerivedStateFromError!="function"?null:f.render();return i.flags|=1,s!==null&&_?(i.child=ns(i,s.child,null,g),i.child=ns(i,null,b,g)):ut(s,i,b,g),i.memoizedState=f.state,h&&th(i,a,!0),i.child}function Xh(s){var i=s.stateNode;i.pendingContext?Zd(s,i.pendingContext,i.pendingContext!==i.context):i.context&&Zd(s,i.context,!1),Ec(s,i.containerInfo)}function Yh(s,i,a,f,h){return ts(),mc(h),i.flags|=256,ut(s,i,a,f),i.child}var zc={dehydrated:null,treeContext:null,retryLane:0};function Uc(s){return{baseLanes:s,cachePool:null,transitions:null}}function Zh(s,i,a){var f=i.pendingProps,h=Pe.current,g=!1,_=(i.flags&128)!==0,b;if((b=_)||(b=s!==null&&s.memoizedState===null?!1:(h&2)!==0),b?(g=!0,i.flags&=-129):(s===null||s.memoizedState!==null)&&(h|=1),Ce(Pe,h&1),s===null)return gc(i),s=i.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((i.mode&1)===0?i.lanes=1:s.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(_=f.children,s=f.fallback,g?(f=i.mode,g=i.child,_={mode:"hidden",children:_},(f&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=_):g=dl(_,f,0,null),s=xr(s,f,a,null),g.return=i,s.return=i,g.sibling=s,i.child=g,i.child.memoizedState=Uc(a),i.memoizedState=zc,s):Hc(i,_));if(h=s.memoizedState,h!==null&&(b=h.dehydrated,b!==null))return Yw(s,i,_,f,b,h,a);if(g){g=f.fallback,_=i.mode,h=s.child,b=h.sibling;var C={mode:"hidden",children:f.children};return(_&1)===0&&i.child!==h?(f=i.child,f.childLanes=0,f.pendingProps=C,i.deletions=null):(f=Qn(h,C),f.subtreeFlags=h.subtreeFlags&14680064),b!==null?g=Qn(b,g):(g=xr(g,_,a,null),g.flags|=2),g.return=i,f.return=i,f.sibling=g,i.child=f,f=g,g=i.child,_=s.child.memoizedState,_=_===null?Uc(a):{baseLanes:_.baseLanes|a,cachePool:null,transitions:_.transitions},g.memoizedState=_,g.childLanes=s.childLanes&~a,i.memoizedState=zc,f}return g=s.child,s=g.sibling,f=Qn(g,{mode:"visible",children:f.children}),(i.mode&1)===0&&(f.lanes=a),f.return=i,f.sibling=null,s!==null&&(a=i.deletions,a===null?(i.deletions=[s],i.flags|=16):a.push(s)),i.child=f,i.memoizedState=null,f}function Hc(s,i){return i=dl({mode:"visible",children:i},s.mode,0,null),i.return=s,s.child=i}function Zo(s,i,a,f){return f!==null&&mc(f),ns(i,s.child,null,a),s=Hc(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function Yw(s,i,a,f,h,g,_){if(a)return i.flags&256?(i.flags&=-257,f=$c(Error(n(422))),Zo(s,i,_,f)):i.memoizedState!==null?(i.child=s.child,i.flags|=128,null):(g=f.fallback,h=i.mode,f=dl({mode:"visible",children:f.children},h,0,null),g=xr(g,h,_,null),g.flags|=2,f.return=i,g.return=i,f.sibling=g,i.child=f,(i.mode&1)!==0&&ns(i,s.child,null,_),i.child.memoizedState=Uc(_),i.memoizedState=zc,g);if((i.mode&1)===0)return Zo(s,i,_,null);if(h.data==="$!"){if(f=h.nextSibling&&h.nextSibling.dataset,f)var b=f.dgst;return f=b,g=Error(n(419)),f=$c(g,f,void 0),Zo(s,i,_,f)}if(b=(_&s.childLanes)!==0,vt||b){if(f=Je,f!==null){switch(_&-_){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(f.suspendedLanes|_))!==0?0:h,h!==0&&h!==g.retryLane&&(g.retryLane=h,vn(s,h),Zt(f,s,h,-1))}return iu(),f=$c(Error(n(421))),Zo(s,i,_,f)}return h.data==="$?"?(i.flags|=128,i.child=s.child,i=f0.bind(null,s),h._reactRetry=i,null):(s=g.treeContext,At=Dn(h.nextSibling),Nt=i,Ie=!0,Qt=null,s!==null&&(Pt[Ot++]=mn,Pt[Ot++]=yn,Pt[Ot++]=dr,mn=s.id,yn=s.overflow,dr=i),i=Hc(i,f.children),i.flags|=4096,i)}function ep(s,i,a){s.lanes|=i;var f=s.alternate;f!==null&&(f.lanes|=i),Sc(s.return,i,a)}function qc(s,i,a,f,h){var g=s.memoizedState;g===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:h}:(g.isBackwards=i,g.rendering=null,g.renderingStartTime=0,g.last=f,g.tail=a,g.tailMode=h)}function tp(s,i,a){var f=i.pendingProps,h=f.revealOrder,g=f.tail;if(ut(s,i,f.children,a),f=Pe.current,(f&2)!==0)f=f&1|2,i.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&ep(s,a,i);else if(s.tag===19)ep(s,a,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}f&=1}if(Ce(Pe,f),(i.mode&1)===0)i.memoizedState=null;else switch(h){case"forwards":for(a=i.child,h=null;a!==null;)s=a.alternate,s!==null&&Wo(s)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),qc(i,!1,h,a,g);break;case"backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(s=h.alternate,s!==null&&Wo(s)===null){i.child=h;break}s=h.sibling,h.sibling=a,a=h,h=s}qc(i,!0,a,null,g);break;case"together":qc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function el(s,i){(i.mode&1)===0&&s!==null&&(s.alternate=null,i.alternate=null,i.flags|=2)}function Sn(s,i,a){if(s!==null&&(i.dependencies=s.dependencies),yr|=i.lanes,(a&i.childLanes)===0)return null;if(s!==null&&i.child!==s.child)throw Error(n(153));if(i.child!==null){for(s=i.child,a=Qn(s,s.pendingProps),i.child=a,a.return=i;s.sibling!==null;)s=s.sibling,a=a.sibling=Qn(s,s.pendingProps),a.return=i;a.sibling=null}return i.child}function Zw(s,i,a){switch(i.tag){case 3:Xh(i),ts();break;case 5:gh(i);break;case 1:yt(i.type)&&Ro(i);break;case 4:Ec(i,i.stateNode.containerInfo);break;case 10:var f=i.type._context,h=i.memoizedProps.value;Ce(Uo,f._currentValue),f._currentValue=h;break;case 13:if(f=i.memoizedState,f!==null)return f.dehydrated!==null?(Ce(Pe,Pe.current&1),i.flags|=128,null):(a&i.child.childLanes)!==0?Zh(s,i,a):(Ce(Pe,Pe.current&1),s=Sn(s,i,a),s!==null?s.sibling:null);Ce(Pe,Pe.current&1);break;case 19:if(f=(a&i.childLanes)!==0,(s.flags&128)!==0){if(f)return tp(s,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ce(Pe,Pe.current),f)break;return null;case 22:case 23:return i.lanes=0,Gh(s,i,a)}return Sn(s,i,a)}var np,Vc,rp,sp;np=function(s,i){for(var a=i.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Vc=function(){},rp=function(s,i,a,f){var h=s.memoizedProps;if(h!==f){s=i.stateNode,gr(ln.current);var g=null;switch(a){case"input":h=sr(s,h),f=sr(s,f),g=[];break;case"select":h=J({},h,{value:void 0}),f=J({},f,{value:void 0}),g=[];break;case"textarea":h=Br(s,h),f=Br(s,f),g=[];break;default:typeof h.onClick!="function"&&typeof f.onClick=="function"&&(s.onclick=jo)}ba(a,f);var _;a=null;for(R in h)if(!f.hasOwnProperty(R)&&h.hasOwnProperty(R)&&h[R]!=null)if(R==="style"){var b=h[R];for(_ in b)b.hasOwnProperty(_)&&(a||(a={}),a[_]="")}else R!=="dangerouslySetInnerHTML"&&R!=="children"&&R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(o.hasOwnProperty(R)?g||(g=[]):(g=g||[]).push(R,null));for(R in f){var C=f[R];if(b=h!=null?h[R]:void 0,f.hasOwnProperty(R)&&C!==b&&(C!=null||b!=null))if(R==="style")if(b){for(_ in b)!b.hasOwnProperty(_)||C&&C.hasOwnProperty(_)||(a||(a={}),a[_]="");for(_ in C)C.hasOwnProperty(_)&&b[_]!==C[_]&&(a||(a={}),a[_]=C[_])}else a||(g||(g=[]),g.push(R,a)),a=C;else R==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,b=b?b.__html:void 0,C!=null&&b!==C&&(g=g||[]).push(R,C)):R==="children"?typeof C!="string"&&typeof C!="number"||(g=g||[]).push(R,""+C):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&(o.hasOwnProperty(R)?(C!=null&&R==="onScroll"&&Ae("scroll",s),g||b===C||(g=[])):(g=g||[]).push(R,C))}a&&(g=g||[]).push("style",a);var R=g;(i.updateQueue=R)&&(i.flags|=4)}},sp=function(s,i,a,f){a!==f&&(i.flags|=4)};function wi(s,i){if(!Ie)switch(s.tailMode){case"hidden":i=s.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?s.tail=null:a.sibling=null;break;case"collapsed":a=s.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function ot(s){var i=s.alternate!==null&&s.alternate.child===s.child,a=0,f=0;if(i)for(var h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags&14680064,f|=h.flags&14680064,h.return=s,h=h.sibling;else for(h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags,f|=h.flags,h.return=s,h=h.sibling;return s.subtreeFlags|=f,s.childLanes=a,i}function e0(s,i,a){var f=i.pendingProps;switch(hc(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(i),null;case 1:return yt(i.type)&&Oo(),ot(i),null;case 3:return f=i.stateNode,is(),Le(mt),Le(st),Tc(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&(Fo(i)?i.flags|=4:s===null||s.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Qt!==null&&(nu(Qt),Qt=null))),Vc(s,i),ot(i),null;case 5:kc(i);var h=gr(pi.current);if(a=i.type,s!==null&&i.stateNode!=null)rp(s,i,a,f,h),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!f){if(i.stateNode===null)throw Error(n(166));return ot(i),null}if(s=gr(ln.current),Fo(i)){f=i.stateNode,a=i.type;var g=i.memoizedProps;switch(f[on]=i,f[ci]=g,s=(i.mode&1)!==0,a){case"dialog":Ae("cancel",f),Ae("close",f);break;case"iframe":case"object":case"embed":Ae("load",f);break;case"video":case"audio":for(h=0;h<oi.length;h++)Ae(oi[h],f);break;case"source":Ae("error",f);break;case"img":case"image":case"link":Ae("error",f),Ae("load",f);break;case"details":Ae("toggle",f);break;case"input":Fs(f,g),Ae("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!g.multiple},Ae("invalid",f);break;case"textarea":Fr(f,g),Ae("invalid",f)}ba(a,g),h=null;for(var _ in g)if(g.hasOwnProperty(_)){var b=g[_];_==="children"?typeof b=="string"?f.textContent!==b&&(g.suppressHydrationWarning!==!0&&Mo(f.textContent,b,s),h=["children",b]):typeof b=="number"&&f.textContent!==""+b&&(g.suppressHydrationWarning!==!0&&Mo(f.textContent,b,s),h=["children",""+b]):o.hasOwnProperty(_)&&b!=null&&_==="onScroll"&&Ae("scroll",f)}switch(a){case"input":rr(f),oo(f,g,!0);break;case"textarea":rr(f),ao(f);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(f.onclick=jo)}f=h,i.updateQueue=f,f!==null&&(i.flags|=4)}else{_=h.nodeType===9?h:h.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=co(a)),s==="http://www.w3.org/1999/xhtml"?a==="script"?(s=_.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof f.is=="string"?s=_.createElement(a,{is:f.is}):(s=_.createElement(a),a==="select"&&(_=s,f.multiple?_.multiple=!0:f.size&&(_.size=f.size))):s=_.createElementNS(s,a),s[on]=i,s[ci]=f,np(s,i,!1,!1),i.stateNode=s;e:{switch(_=Ta(a,f),a){case"dialog":Ae("cancel",s),Ae("close",s),h=f;break;case"iframe":case"object":case"embed":Ae("load",s),h=f;break;case"video":case"audio":for(h=0;h<oi.length;h++)Ae(oi[h],s);h=f;break;case"source":Ae("error",s),h=f;break;case"img":case"image":case"link":Ae("error",s),Ae("load",s),h=f;break;case"details":Ae("toggle",s),h=f;break;case"input":Fs(s,f),h=sr(s,f),Ae("invalid",s);break;case"option":h=f;break;case"select":s._wrapperState={wasMultiple:!!f.multiple},h=J({},f,{value:void 0}),Ae("invalid",s);break;case"textarea":Fr(s,f),h=Br(s,f),Ae("invalid",s);break;default:h=f}ba(a,h),b=h;for(g in b)if(b.hasOwnProperty(g)){var C=b[g];g==="style"?Vt(s,C):g==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,C!=null&&or(s,C)):g==="children"?typeof C=="string"?(a!=="textarea"||C!=="")&&lr(s,C):typeof C=="number"&&lr(s,""+C):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(o.hasOwnProperty(g)?C!=null&&g==="onScroll"&&Ae("scroll",s):C!=null&&F(s,g,C,_))}switch(a){case"input":rr(s),oo(s,f,!1);break;case"textarea":rr(s),ao(s);break;case"option":f.value!=null&&s.setAttribute("value",""+_e(f.value));break;case"select":s.multiple=!!f.multiple,g=f.value,g!=null?Ln(s,!!f.multiple,g,!1):f.defaultValue!=null&&Ln(s,!!f.multiple,f.defaultValue,!0);break;default:typeof h.onClick=="function"&&(s.onclick=jo)}switch(a){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return ot(i),null;case 6:if(s&&i.stateNode!=null)sp(s,i,s.memoizedProps,f);else{if(typeof f!="string"&&i.stateNode===null)throw Error(n(166));if(a=gr(pi.current),gr(ln.current),Fo(i)){if(f=i.stateNode,a=i.memoizedProps,f[on]=i,(g=f.nodeValue!==a)&&(s=Nt,s!==null))switch(s.tag){case 3:Mo(f.nodeValue,a,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Mo(f.nodeValue,a,(s.mode&1)!==0)}g&&(i.flags|=4)}else f=(a.nodeType===9?a:a.ownerDocument).createTextNode(f),f[on]=i,i.stateNode=f}return ot(i),null;case 13:if(Le(Pe),f=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Ie&&At!==null&&(i.mode&1)!==0&&(i.flags&128)===0)lh(),ts(),i.flags|=98560,g=!1;else if(g=Fo(i),f!==null&&f.dehydrated!==null){if(s===null){if(!g)throw Error(n(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[on]=i}else ts(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),g=!1}else Qt!==null&&(nu(Qt),Qt=null),g=!0;if(!g)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=a,i):(f=f!==null,f!==(s!==null&&s.memoizedState!==null)&&f&&(i.child.flags|=8192,(i.mode&1)!==0&&(s===null||(Pe.current&1)!==0?Ke===0&&(Ke=3):iu())),i.updateQueue!==null&&(i.flags|=4),ot(i),null);case 4:return is(),Vc(s,i),s===null&&li(i.stateNode.containerInfo),ot(i),null;case 10:return wc(i.type._context),ot(i),null;case 17:return yt(i.type)&&Oo(),ot(i),null;case 19:if(Le(Pe),g=i.memoizedState,g===null)return ot(i),null;if(f=(i.flags&128)!==0,_=g.rendering,_===null)if(f)wi(g,!1);else{if(Ke!==0||s!==null&&(s.flags&128)!==0)for(s=i.child;s!==null;){if(_=Wo(s),_!==null){for(i.flags|=128,wi(g,!1),f=_.updateQueue,f!==null&&(i.updateQueue=f,i.flags|=4),i.subtreeFlags=0,f=a,a=i.child;a!==null;)g=a,s=f,g.flags&=14680066,_=g.alternate,_===null?(g.childLanes=0,g.lanes=s,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=_.childLanes,g.lanes=_.lanes,g.child=_.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=_.memoizedProps,g.memoizedState=_.memoizedState,g.updateQueue=_.updateQueue,g.type=_.type,s=_.dependencies,g.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a=a.sibling;return Ce(Pe,Pe.current&1|2),i.child}s=s.sibling}g.tail!==null&&Fe()>cs&&(i.flags|=128,f=!0,wi(g,!1),i.lanes=4194304)}else{if(!f)if(s=Wo(_),s!==null){if(i.flags|=128,f=!0,a=s.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),wi(g,!0),g.tail===null&&g.tailMode==="hidden"&&!_.alternate&&!Ie)return ot(i),null}else 2*Fe()-g.renderingStartTime>cs&&a!==1073741824&&(i.flags|=128,f=!0,wi(g,!1),i.lanes=4194304);g.isBackwards?(_.sibling=i.child,i.child=_):(a=g.last,a!==null?a.sibling=_:i.child=_,g.last=_)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=Fe(),i.sibling=null,a=Pe.current,Ce(Pe,f?a&1|2:a&1),i):(ot(i),null);case 22:case 23:return su(),f=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==f&&(i.flags|=8192),f&&(i.mode&1)!==0?(Lt&1073741824)!==0&&(ot(i),i.subtreeFlags&6&&(i.flags|=8192)):ot(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function t0(s,i){switch(hc(i),i.tag){case 1:return yt(i.type)&&Oo(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return is(),Le(mt),Le(st),Tc(),s=i.flags,(s&65536)!==0&&(s&128)===0?(i.flags=s&-65537|128,i):null;case 5:return kc(i),null;case 13:if(Le(Pe),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(n(340));ts()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return Le(Pe),null;case 4:return is(),null;case 10:return wc(i.type._context),null;case 22:case 23:return su(),null;case 24:return null;default:return null}}var tl=!1,lt=!1,n0=typeof WeakSet=="function"?WeakSet:Set,Y=null;function ls(s,i){var a=s.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(f){Be(s,i,f)}else a.current=null}function Wc(s,i,a){try{a()}catch(f){Be(s,i,f)}}var ip=!1;function r0(s,i){if(sc=xo,s=$d(),Ja(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var h=f.anchorOffset,g=f.focusNode;f=f.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var _=0,b=-1,C=-1,R=0,V=0,W=s,q=null;t:for(;;){for(var X;W!==a||h!==0&&W.nodeType!==3||(b=_+h),W!==g||f!==0&&W.nodeType!==3||(C=_+f),W.nodeType===3&&(_+=W.nodeValue.length),(X=W.firstChild)!==null;)q=W,W=X;for(;;){if(W===s)break t;if(q===a&&++R===h&&(b=_),q===g&&++V===f&&(C=_),(X=W.nextSibling)!==null)break;W=q,q=W.parentNode}W=X}a=b===-1||C===-1?null:{start:b,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(ic={focusedElem:s,selectionRange:a},xo=!1,Y=i;Y!==null;)if(i=Y,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,Y=s;else for(;Y!==null;){i=Y;try{var ee=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var te=ee.memoizedProps,ze=ee.memoizedState,j=i.stateNode,A=j.getSnapshotBeforeUpdate(i.elementType===i.type?te:Jt(i.type,te),ze);j.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var P=i.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(K){Be(i,i.return,K)}if(s=i.sibling,s!==null){s.return=i.return,Y=s;break}Y=i.return}return ee=ip,ip=!1,ee}function Si(s,i,a){var f=i.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var h=f=f.next;do{if((h.tag&s)===s){var g=h.destroy;h.destroy=void 0,g!==void 0&&Wc(i,a,g)}h=h.next}while(h!==f)}}function nl(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&s)===s){var f=a.create;a.destroy=f()}a=a.next}while(a!==i)}}function Kc(s){var i=s.ref;if(i!==null){var a=s.stateNode;switch(s.tag){case 5:s=a;break;default:s=a}typeof i=="function"?i(s):i.current=s}}function op(s){var i=s.alternate;i!==null&&(s.alternate=null,op(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[on],delete i[ci],delete i[cc],delete i[Bw],delete i[Fw])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function lp(s){return s.tag===5||s.tag===3||s.tag===4}function ap(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||lp(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Gc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(s,i):a.insertBefore(s,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(s,a)):(i=a,i.appendChild(s)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=jo));else if(f!==4&&(s=s.child,s!==null))for(Gc(s,i,a),s=s.sibling;s!==null;)Gc(s,i,a),s=s.sibling}function Qc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.insertBefore(s,i):a.appendChild(s);else if(f!==4&&(s=s.child,s!==null))for(Qc(s,i,a),s=s.sibling;s!==null;)Qc(s,i,a),s=s.sibling}var Ze=null,Xt=!1;function qn(s,i,a){for(a=a.child;a!==null;)cp(s,i,a),a=a.sibling}function cp(s,i,a){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(go,a)}catch{}switch(a.tag){case 5:lt||ls(a,i);case 6:var f=Ze,h=Xt;Ze=null,qn(s,i,a),Ze=f,Xt=h,Ze!==null&&(Xt?(s=Ze,a=a.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):Ze.removeChild(a.stateNode));break;case 18:Ze!==null&&(Xt?(s=Ze,a=a.stateNode,s.nodeType===8?ac(s.parentNode,a):s.nodeType===1&&ac(s,a),Ys(s)):ac(Ze,a.stateNode));break;case 4:f=Ze,h=Xt,Ze=a.stateNode.containerInfo,Xt=!0,qn(s,i,a),Ze=f,Xt=h;break;case 0:case 11:case 14:case 15:if(!lt&&(f=a.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){h=f=f.next;do{var g=h,_=g.destroy;g=g.tag,_!==void 0&&((g&2)!==0||(g&4)!==0)&&Wc(a,i,_),h=h.next}while(h!==f)}qn(s,i,a);break;case 1:if(!lt&&(ls(a,i),f=a.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=a.memoizedProps,f.state=a.memoizedState,f.componentWillUnmount()}catch(b){Be(a,i,b)}qn(s,i,a);break;case 21:qn(s,i,a);break;case 22:a.mode&1?(lt=(f=lt)||a.memoizedState!==null,qn(s,i,a),lt=f):qn(s,i,a);break;default:qn(s,i,a)}}function up(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var a=s.stateNode;a===null&&(a=s.stateNode=new n0),i.forEach(function(f){var h=d0.bind(null,s,f);a.has(f)||(a.add(f),f.then(h,h))})}}function Yt(s,i){var a=i.deletions;if(a!==null)for(var f=0;f<a.length;f++){var h=a[f];try{var g=s,_=i,b=_;e:for(;b!==null;){switch(b.tag){case 5:Ze=b.stateNode,Xt=!1;break e;case 3:Ze=b.stateNode.containerInfo,Xt=!0;break e;case 4:Ze=b.stateNode.containerInfo,Xt=!0;break e}b=b.return}if(Ze===null)throw Error(n(160));cp(g,_,h),Ze=null,Xt=!1;var C=h.alternate;C!==null&&(C.return=null),h.return=null}catch(R){Be(h,i,R)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)fp(i,s),i=i.sibling}function fp(s,i){var a=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Yt(i,s),cn(s),f&4){try{Si(3,s,s.return),nl(3,s)}catch(te){Be(s,s.return,te)}try{Si(5,s,s.return)}catch(te){Be(s,s.return,te)}}break;case 1:Yt(i,s),cn(s),f&512&&a!==null&&ls(a,a.return);break;case 5:if(Yt(i,s),cn(s),f&512&&a!==null&&ls(a,a.return),s.flags&32){var h=s.stateNode;try{lr(h,"")}catch(te){Be(s,s.return,te)}}if(f&4&&(h=s.stateNode,h!=null)){var g=s.memoizedProps,_=a!==null?a.memoizedProps:g,b=s.type,C=s.updateQueue;if(s.updateQueue=null,C!==null)try{b==="input"&&g.type==="radio"&&g.name!=null&&zs(h,g),Ta(b,_);var R=Ta(b,g);for(_=0;_<C.length;_+=2){var V=C[_],W=C[_+1];V==="style"?Vt(h,W):V==="dangerouslySetInnerHTML"?or(h,W):V==="children"?lr(h,W):F(h,V,W,R)}switch(b){case"input":rn(h,g);break;case"textarea":lo(h,g);break;case"select":var q=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!g.multiple;var X=g.value;X!=null?Ln(h,!!g.multiple,X,!1):q!==!!g.multiple&&(g.defaultValue!=null?Ln(h,!!g.multiple,g.defaultValue,!0):Ln(h,!!g.multiple,g.multiple?[]:"",!1))}h[ci]=g}catch(te){Be(s,s.return,te)}}break;case 6:if(Yt(i,s),cn(s),f&4){if(s.stateNode===null)throw Error(n(162));h=s.stateNode,g=s.memoizedProps;try{h.nodeValue=g}catch(te){Be(s,s.return,te)}}break;case 3:if(Yt(i,s),cn(s),f&4&&a!==null&&a.memoizedState.isDehydrated)try{Ys(i.containerInfo)}catch(te){Be(s,s.return,te)}break;case 4:Yt(i,s),cn(s);break;case 13:Yt(i,s),cn(s),h=s.child,h.flags&8192&&(g=h.memoizedState!==null,h.stateNode.isHidden=g,!g||h.alternate!==null&&h.alternate.memoizedState!==null||(Yc=Fe())),f&4&&up(s);break;case 22:if(V=a!==null&&a.memoizedState!==null,s.mode&1?(lt=(R=lt)||V,Yt(i,s),lt=R):Yt(i,s),cn(s),f&8192){if(R=s.memoizedState!==null,(s.stateNode.isHidden=R)&&!V&&(s.mode&1)!==0)for(Y=s,V=s.child;V!==null;){for(W=Y=V;Y!==null;){switch(q=Y,X=q.child,q.tag){case 0:case 11:case 14:case 15:Si(4,q,q.return);break;case 1:ls(q,q.return);var ee=q.stateNode;if(typeof ee.componentWillUnmount=="function"){f=q,a=q.return;try{i=f,ee.props=i.memoizedProps,ee.state=i.memoizedState,ee.componentWillUnmount()}catch(te){Be(f,a,te)}}break;case 5:ls(q,q.return);break;case 22:if(q.memoizedState!==null){pp(W);continue}}X!==null?(X.return=q,Y=X):pp(W)}V=V.sibling}e:for(V=null,W=s;;){if(W.tag===5){if(V===null){V=W;try{h=W.stateNode,R?(g=h.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(b=W.stateNode,C=W.memoizedProps.style,_=C!=null&&C.hasOwnProperty("display")?C.display:null,b.style.display=le("display",_))}catch(te){Be(s,s.return,te)}}}else if(W.tag===6){if(V===null)try{W.stateNode.nodeValue=R?"":W.memoizedProps}catch(te){Be(s,s.return,te)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===s)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===s)break e;for(;W.sibling===null;){if(W.return===null||W.return===s)break e;V===W&&(V=null),W=W.return}V===W&&(V=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Yt(i,s),cn(s),f&4&&up(s);break;case 21:break;default:Yt(i,s),cn(s)}}function cn(s){var i=s.flags;if(i&2){try{e:{for(var a=s.return;a!==null;){if(lp(a)){var f=a;break e}a=a.return}throw Error(n(160))}switch(f.tag){case 5:var h=f.stateNode;f.flags&32&&(lr(h,""),f.flags&=-33);var g=ap(s);Qc(s,g,h);break;case 3:case 4:var _=f.stateNode.containerInfo,b=ap(s);Gc(s,b,_);break;default:throw Error(n(161))}}catch(C){Be(s,s.return,C)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function s0(s,i,a){Y=s,dp(s)}function dp(s,i,a){for(var f=(s.mode&1)!==0;Y!==null;){var h=Y,g=h.child;if(h.tag===22&&f){var _=h.memoizedState!==null||tl;if(!_){var b=h.alternate,C=b!==null&&b.memoizedState!==null||lt;b=tl;var R=lt;if(tl=_,(lt=C)&&!R)for(Y=h;Y!==null;)_=Y,C=_.child,_.tag===22&&_.memoizedState!==null?gp(h):C!==null?(C.return=_,Y=C):gp(h);for(;g!==null;)Y=g,dp(g),g=g.sibling;Y=h,tl=b,lt=R}hp(s)}else(h.subtreeFlags&8772)!==0&&g!==null?(g.return=h,Y=g):hp(s)}}function hp(s){for(;Y!==null;){var i=Y;if((i.flags&8772)!==0){var a=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:lt||nl(5,i);break;case 1:var f=i.stateNode;if(i.flags&4&&!lt)if(a===null)f.componentDidMount();else{var h=i.elementType===i.type?a.memoizedProps:Jt(i.type,a.memoizedProps);f.componentDidUpdate(h,a.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var g=i.updateQueue;g!==null&&ph(i,g,f);break;case 3:var _=i.updateQueue;if(_!==null){if(a=null,i.child!==null)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}ph(i,_,a)}break;case 5:var b=i.stateNode;if(a===null&&i.flags&4){a=b;var C=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":C.autoFocus&&a.focus();break;case"img":C.src&&(a.src=C.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var R=i.alternate;if(R!==null){var V=R.memoizedState;if(V!==null){var W=V.dehydrated;W!==null&&Ys(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}lt||i.flags&512&&Kc(i)}catch(q){Be(i,i.return,q)}}if(i===s){Y=null;break}if(a=i.sibling,a!==null){a.return=i.return,Y=a;break}Y=i.return}}function pp(s){for(;Y!==null;){var i=Y;if(i===s){Y=null;break}var a=i.sibling;if(a!==null){a.return=i.return,Y=a;break}Y=i.return}}function gp(s){for(;Y!==null;){var i=Y;try{switch(i.tag){case 0:case 11:case 15:var a=i.return;try{nl(4,i)}catch(C){Be(i,a,C)}break;case 1:var f=i.stateNode;if(typeof f.componentDidMount=="function"){var h=i.return;try{f.componentDidMount()}catch(C){Be(i,h,C)}}var g=i.return;try{Kc(i)}catch(C){Be(i,g,C)}break;case 5:var _=i.return;try{Kc(i)}catch(C){Be(i,_,C)}}}catch(C){Be(i,i.return,C)}if(i===s){Y=null;break}var b=i.sibling;if(b!==null){b.return=i.return,Y=b;break}Y=i.return}}var i0=Math.ceil,rl=O.ReactCurrentDispatcher,Jc=O.ReactCurrentOwner,Dt=O.ReactCurrentBatchConfig,we=0,Je=null,qe=null,et=0,Lt=0,as=Bn(0),Ke=0,xi=null,yr=0,sl=0,Xc=0,_i=null,wt=null,Yc=0,cs=1/0,xn=null,il=!1,Zc=null,Vn=null,ol=!1,Wn=null,ll=0,Ei=0,eu=null,al=-1,cl=0;function ft(){return(we&6)!==0?Fe():al!==-1?al:al=Fe()}function Kn(s){return(s.mode&1)===0?1:(we&2)!==0&&et!==0?et&-et:Uw.transition!==null?(cl===0&&(cl=ad()),cl):(s=Ee,s!==0||(s=window.event,s=s===void 0?16:yd(s.type)),s)}function Zt(s,i,a,f){if(50<Ei)throw Ei=0,eu=null,Error(n(185));Ks(s,a,f),((we&2)===0||s!==Je)&&(s===Je&&((we&2)===0&&(sl|=a),Ke===4&&Gn(s,et)),St(s,f),a===1&&we===0&&(i.mode&1)===0&&(cs=Fe()+500,$o&&zn()))}function St(s,i){var a=s.callbackNode;Uv(s,i);var f=vo(s,s===Je?et:0);if(f===0)a!==null&&id(a),s.callbackNode=null,s.callbackPriority=0;else if(i=f&-f,s.callbackPriority!==i){if(a!=null&&id(a),i===1)s.tag===0?zw(yp.bind(null,s)):nh(yp.bind(null,s)),$w(function(){(we&6)===0&&zn()}),a=null;else{switch(cd(f)){case 1:a=ja;break;case 4:a=od;break;case 16:a=po;break;case 536870912:a=ld;break;default:a=po}a=bp(a,mp.bind(null,s))}s.callbackPriority=i,s.callbackNode=a}}function mp(s,i){if(al=-1,cl=0,(we&6)!==0)throw Error(n(327));var a=s.callbackNode;if(us()&&s.callbackNode!==a)return null;var f=vo(s,s===Je?et:0);if(f===0)return null;if((f&30)!==0||(f&s.expiredLanes)!==0||i)i=ul(s,f);else{i=f;var h=we;we|=2;var g=wp();(Je!==s||et!==i)&&(xn=null,cs=Fe()+500,wr(s,i));do try{a0();break}catch(b){vp(s,b)}while(!0);vc(),rl.current=g,we=h,qe!==null?i=0:(Je=null,et=0,i=Ke)}if(i!==0){if(i===2&&(h=Pa(s),h!==0&&(f=h,i=tu(s,h))),i===1)throw a=xi,wr(s,0),Gn(s,f),St(s,Fe()),a;if(i===6)Gn(s,f);else{if(h=s.current.alternate,(f&30)===0&&!o0(h)&&(i=ul(s,f),i===2&&(g=Pa(s),g!==0&&(f=g,i=tu(s,g))),i===1))throw a=xi,wr(s,0),Gn(s,f),St(s,Fe()),a;switch(s.finishedWork=h,s.finishedLanes=f,i){case 0:case 1:throw Error(n(345));case 2:Sr(s,wt,xn);break;case 3:if(Gn(s,f),(f&130023424)===f&&(i=Yc+500-Fe(),10<i)){if(vo(s,0)!==0)break;if(h=s.suspendedLanes,(h&f)!==f){ft(),s.pingedLanes|=s.suspendedLanes&h;break}s.timeoutHandle=lc(Sr.bind(null,s,wt,xn),i);break}Sr(s,wt,xn);break;case 4:if(Gn(s,f),(f&4194240)===f)break;for(i=s.eventTimes,h=-1;0<f;){var _=31-Kt(f);g=1<<_,_=i[_],_>h&&(h=_),f&=~g}if(f=h,f=Fe()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*i0(f/1960))-f,10<f){s.timeoutHandle=lc(Sr.bind(null,s,wt,xn),f);break}Sr(s,wt,xn);break;case 5:Sr(s,wt,xn);break;default:throw Error(n(329))}}}return St(s,Fe()),s.callbackNode===a?mp.bind(null,s):null}function tu(s,i){var a=_i;return s.current.memoizedState.isDehydrated&&(wr(s,i).flags|=256),s=ul(s,i),s!==2&&(i=wt,wt=a,i!==null&&nu(i)),s}function nu(s){wt===null?wt=s:wt.push.apply(wt,s)}function o0(s){for(var i=s;;){if(i.flags&16384){var a=i.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var f=0;f<a.length;f++){var h=a[f],g=h.getSnapshot;h=h.value;try{if(!Gt(g(),h))return!1}catch{return!1}}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Gn(s,i){for(i&=~Xc,i&=~sl,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var a=31-Kt(i),f=1<<a;s[a]=-1,i&=~f}}function yp(s){if((we&6)!==0)throw Error(n(327));us();var i=vo(s,0);if((i&1)===0)return St(s,Fe()),null;var a=ul(s,i);if(s.tag!==0&&a===2){var f=Pa(s);f!==0&&(i=f,a=tu(s,f))}if(a===1)throw a=xi,wr(s,0),Gn(s,i),St(s,Fe()),a;if(a===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,Sr(s,wt,xn),St(s,Fe()),null}function ru(s,i){var a=we;we|=1;try{return s(i)}finally{we=a,we===0&&(cs=Fe()+500,$o&&zn())}}function vr(s){Wn!==null&&Wn.tag===0&&(we&6)===0&&us();var i=we;we|=1;var a=Dt.transition,f=Ee;try{if(Dt.transition=null,Ee=1,s)return s()}finally{Ee=f,Dt.transition=a,we=i,(we&6)===0&&zn()}}function su(){Lt=as.current,Le(as)}function wr(s,i){s.finishedWork=null,s.finishedLanes=0;var a=s.timeoutHandle;if(a!==-1&&(s.timeoutHandle=-1,Rw(a)),qe!==null)for(a=qe.return;a!==null;){var f=a;switch(hc(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Oo();break;case 3:is(),Le(mt),Le(st),Tc();break;case 5:kc(f);break;case 4:is();break;case 13:Le(Pe);break;case 19:Le(Pe);break;case 10:wc(f.type._context);break;case 22:case 23:su()}a=a.return}if(Je=s,qe=s=Qn(s.current,null),et=Lt=i,Ke=0,xi=null,Xc=sl=yr=0,wt=_i=null,pr!==null){for(i=0;i<pr.length;i++)if(a=pr[i],f=a.interleaved,f!==null){a.interleaved=null;var h=f.next,g=a.pending;if(g!==null){var _=g.next;g.next=h,f.next=_}a.pending=f}pr=null}return s}function vp(s,i){do{var a=qe;try{if(vc(),Ko.current=Xo,Go){for(var f=Oe.memoizedState;f!==null;){var h=f.queue;h!==null&&(h.pending=null),f=f.next}Go=!1}if(mr=0,Qe=We=Oe=null,gi=!1,mi=0,Jc.current=null,a===null||a.return===null){Ke=1,xi=i,qe=null;break}e:{var g=s,_=a.return,b=a,C=i;if(i=et,b.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){var R=C,V=b,W=V.tag;if((V.mode&1)===0&&(W===0||W===11||W===15)){var q=V.alternate;q?(V.updateQueue=q.updateQueue,V.memoizedState=q.memoizedState,V.lanes=q.lanes):(V.updateQueue=null,V.memoizedState=null)}var X=Hh(_);if(X!==null){X.flags&=-257,qh(X,_,b,g,i),X.mode&1&&Uh(g,R,i),i=X,C=R;var ee=i.updateQueue;if(ee===null){var te=new Set;te.add(C),i.updateQueue=te}else ee.add(C);break e}else{if((i&1)===0){Uh(g,R,i),iu();break e}C=Error(n(426))}}else if(Ie&&b.mode&1){var ze=Hh(_);if(ze!==null){(ze.flags&65536)===0&&(ze.flags|=256),qh(ze,_,b,g,i),mc(os(C,b));break e}}g=C=os(C,b),Ke!==4&&(Ke=2),_i===null?_i=[g]:_i.push(g),g=_;do{switch(g.tag){case 3:g.flags|=65536,i&=-i,g.lanes|=i;var j=Fh(g,C,i);hh(g,j);break e;case 1:b=C;var A=g.type,P=g.stateNode;if((g.flags&128)===0&&(typeof A.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Vn===null||!Vn.has(P)))){g.flags|=65536,i&=-i,g.lanes|=i;var K=zh(g,b,i);hh(g,K);break e}}g=g.return}while(g!==null)}xp(a)}catch(ne){i=ne,qe===a&&a!==null&&(qe=a=a.return);continue}break}while(!0)}function wp(){var s=rl.current;return rl.current=Xo,s===null?Xo:s}function iu(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),Je===null||(yr&268435455)===0&&(sl&268435455)===0||Gn(Je,et)}function ul(s,i){var a=we;we|=2;var f=wp();(Je!==s||et!==i)&&(xn=null,wr(s,i));do try{l0();break}catch(h){vp(s,h)}while(!0);if(vc(),we=a,rl.current=f,qe!==null)throw Error(n(261));return Je=null,et=0,Ke}function l0(){for(;qe!==null;)Sp(qe)}function a0(){for(;qe!==null&&!jv();)Sp(qe)}function Sp(s){var i=kp(s.alternate,s,Lt);s.memoizedProps=s.pendingProps,i===null?xp(s):qe=i,Jc.current=null}function xp(s){var i=s;do{var a=i.alternate;if(s=i.return,(i.flags&32768)===0){if(a=e0(a,i,Lt),a!==null){qe=a;return}}else{if(a=t0(a,i),a!==null){a.flags&=32767,qe=a;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Ke=6,qe=null;return}}if(i=i.sibling,i!==null){qe=i;return}qe=i=s}while(i!==null);Ke===0&&(Ke=5)}function Sr(s,i,a){var f=Ee,h=Dt.transition;try{Dt.transition=null,Ee=1,c0(s,i,a,f)}finally{Dt.transition=h,Ee=f}return null}function c0(s,i,a,f){do us();while(Wn!==null);if((we&6)!==0)throw Error(n(327));a=s.finishedWork;var h=s.finishedLanes;if(a===null)return null;if(s.finishedWork=null,s.finishedLanes=0,a===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var g=a.lanes|a.childLanes;if(Hv(s,g),s===Je&&(qe=Je=null,et=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||ol||(ol=!0,bp(po,function(){return us(),null})),g=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||g){g=Dt.transition,Dt.transition=null;var _=Ee;Ee=1;var b=we;we|=4,Jc.current=null,r0(s,a),fp(a,s),Aw(ic),xo=!!sc,ic=sc=null,s.current=a,s0(a),Pv(),we=b,Ee=_,Dt.transition=g}else s.current=a;if(ol&&(ol=!1,Wn=s,ll=h),g=s.pendingLanes,g===0&&(Vn=null),$v(a.stateNode),St(s,Fe()),i!==null)for(f=s.onRecoverableError,a=0;a<i.length;a++)h=i[a],f(h.value,{componentStack:h.stack,digest:h.digest});if(il)throw il=!1,s=Zc,Zc=null,s;return(ll&1)!==0&&s.tag!==0&&us(),g=s.pendingLanes,(g&1)!==0?s===eu?Ei++:(Ei=0,eu=s):Ei=0,zn(),null}function us(){if(Wn!==null){var s=cd(ll),i=Dt.transition,a=Ee;try{if(Dt.transition=null,Ee=16>s?16:s,Wn===null)var f=!1;else{if(s=Wn,Wn=null,ll=0,(we&6)!==0)throw Error(n(331));var h=we;for(we|=4,Y=s.current;Y!==null;){var g=Y,_=g.child;if((Y.flags&16)!==0){var b=g.deletions;if(b!==null){for(var C=0;C<b.length;C++){var R=b[C];for(Y=R;Y!==null;){var V=Y;switch(V.tag){case 0:case 11:case 15:Si(8,V,g)}var W=V.child;if(W!==null)W.return=V,Y=W;else for(;Y!==null;){V=Y;var q=V.sibling,X=V.return;if(op(V),V===R){Y=null;break}if(q!==null){q.return=X,Y=q;break}Y=X}}}var ee=g.alternate;if(ee!==null){var te=ee.child;if(te!==null){ee.child=null;do{var ze=te.sibling;te.sibling=null,te=ze}while(te!==null)}}Y=g}}if((g.subtreeFlags&2064)!==0&&_!==null)_.return=g,Y=_;else e:for(;Y!==null;){if(g=Y,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:Si(9,g,g.return)}var j=g.sibling;if(j!==null){j.return=g.return,Y=j;break e}Y=g.return}}var A=s.current;for(Y=A;Y!==null;){_=Y;var P=_.child;if((_.subtreeFlags&2064)!==0&&P!==null)P.return=_,Y=P;else e:for(_=A;Y!==null;){if(b=Y,(b.flags&2048)!==0)try{switch(b.tag){case 0:case 11:case 15:nl(9,b)}}catch(ne){Be(b,b.return,ne)}if(b===_){Y=null;break e}var K=b.sibling;if(K!==null){K.return=b.return,Y=K;break e}Y=b.return}}if(we=h,zn(),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(go,s)}catch{}f=!0}return f}finally{Ee=a,Dt.transition=i}}return!1}function _p(s,i,a){i=os(a,i),i=Fh(s,i,1),s=Hn(s,i,1),i=ft(),s!==null&&(Ks(s,1,i),St(s,i))}function Be(s,i,a){if(s.tag===3)_p(s,s,a);else for(;i!==null;){if(i.tag===3){_p(i,s,a);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Vn===null||!Vn.has(f))){s=os(a,s),s=zh(i,s,1),i=Hn(i,s,1),s=ft(),i!==null&&(Ks(i,1,s),St(i,s));break}}i=i.return}}function u0(s,i,a){var f=s.pingCache;f!==null&&f.delete(i),i=ft(),s.pingedLanes|=s.suspendedLanes&a,Je===s&&(et&a)===a&&(Ke===4||Ke===3&&(et&130023424)===et&&500>Fe()-Yc?wr(s,0):Xc|=a),St(s,i)}function Ep(s,i){i===0&&((s.mode&1)===0?i=1:(i=yo,yo<<=1,(yo&130023424)===0&&(yo=4194304)));var a=ft();s=vn(s,i),s!==null&&(Ks(s,i,a),St(s,a))}function f0(s){var i=s.memoizedState,a=0;i!==null&&(a=i.retryLane),Ep(s,a)}function d0(s,i){var a=0;switch(s.tag){case 13:var f=s.stateNode,h=s.memoizedState;h!==null&&(a=h.retryLane);break;case 19:f=s.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(i),Ep(s,a)}var kp;kp=function(s,i,a){if(s!==null)if(s.memoizedProps!==i.pendingProps||mt.current)vt=!0;else{if((s.lanes&a)===0&&(i.flags&128)===0)return vt=!1,Zw(s,i,a);vt=(s.flags&131072)!==0}else vt=!1,Ie&&(i.flags&1048576)!==0&&rh(i,Bo,i.index);switch(i.lanes=0,i.tag){case 2:var f=i.type;el(s,i),s=i.pendingProps;var h=Yr(i,st.current);ss(i,a),h=Ac(null,i,f,s,h,a);var g=Lc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,yt(f)?(g=!0,Ro(i)):g=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,_c(i),h.updater=Yo,i.stateNode=h,h._reactInternals=i,Rc(i,f,s,a),i=Fc(null,i,f,!0,g,a)):(i.tag=0,Ie&&g&&dc(i),ut(null,i,h,a),i=i.child),i;case 16:f=i.elementType;e:{switch(el(s,i),s=i.pendingProps,h=f._init,f=h(f._payload),i.type=f,h=i.tag=p0(f),s=Jt(f,s),h){case 0:i=Bc(null,i,f,s,a);break e;case 1:i=Jh(null,i,f,s,a);break e;case 11:i=Vh(null,i,f,s,a);break e;case 14:i=Wh(null,i,f,Jt(f.type,s),a);break e}throw Error(n(306,f,""))}return i;case 0:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Bc(s,i,f,h,a);case 1:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Jh(s,i,f,h,a);case 3:e:{if(Xh(i),s===null)throw Error(n(387));f=i.pendingProps,g=i.memoizedState,h=g.element,dh(s,i),Vo(i,f,null,a);var _=i.memoizedState;if(f=_.element,g.isDehydrated)if(g={element:f,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){h=os(Error(n(423)),i),i=Yh(s,i,f,a,h);break e}else if(f!==h){h=os(Error(n(424)),i),i=Yh(s,i,f,a,h);break e}else for(At=Dn(i.stateNode.containerInfo.firstChild),Nt=i,Ie=!0,Qt=null,a=uh(i,null,f,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ts(),f===h){i=Sn(s,i,a);break e}ut(s,i,f,a)}i=i.child}return i;case 5:return gh(i),s===null&&gc(i),f=i.type,h=i.pendingProps,g=s!==null?s.memoizedProps:null,_=h.children,oc(f,h)?_=null:g!==null&&oc(f,g)&&(i.flags|=32),Qh(s,i),ut(s,i,_,a),i.child;case 6:return s===null&&gc(i),null;case 13:return Zh(s,i,a);case 4:return Ec(i,i.stateNode.containerInfo),f=i.pendingProps,s===null?i.child=ns(i,null,f,a):ut(s,i,f,a),i.child;case 11:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Vh(s,i,f,h,a);case 7:return ut(s,i,i.pendingProps,a),i.child;case 8:return ut(s,i,i.pendingProps.children,a),i.child;case 12:return ut(s,i,i.pendingProps.children,a),i.child;case 10:e:{if(f=i.type._context,h=i.pendingProps,g=i.memoizedProps,_=h.value,Ce(Uo,f._currentValue),f._currentValue=_,g!==null)if(Gt(g.value,_)){if(g.children===h.children&&!mt.current){i=Sn(s,i,a);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var b=g.dependencies;if(b!==null){_=g.child;for(var C=b.firstContext;C!==null;){if(C.context===f){if(g.tag===1){C=wn(-1,a&-a),C.tag=2;var R=g.updateQueue;if(R!==null){R=R.shared;var V=R.pending;V===null?C.next=C:(C.next=V.next,V.next=C),R.pending=C}}g.lanes|=a,C=g.alternate,C!==null&&(C.lanes|=a),Sc(g.return,a,i),b.lanes|=a;break}C=C.next}}else if(g.tag===10)_=g.type===i.type?null:g.child;else if(g.tag===18){if(_=g.return,_===null)throw Error(n(341));_.lanes|=a,b=_.alternate,b!==null&&(b.lanes|=a),Sc(_,a,i),_=g.sibling}else _=g.child;if(_!==null)_.return=g;else for(_=g;_!==null;){if(_===i){_=null;break}if(g=_.sibling,g!==null){g.return=_.return,_=g;break}_=_.return}g=_}ut(s,i,h.children,a),i=i.child}return i;case 9:return h=i.type,f=i.pendingProps.children,ss(i,a),h=Rt(h),f=f(h),i.flags|=1,ut(s,i,f,a),i.child;case 14:return f=i.type,h=Jt(f,i.pendingProps),h=Jt(f.type,h),Wh(s,i,f,h,a);case 15:return Kh(s,i,i.type,i.pendingProps,a);case 17:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),el(s,i),i.tag=1,yt(f)?(s=!0,Ro(i)):s=!1,ss(i,a),Dh(i,f,h),Rc(i,f,h,a),Fc(null,i,f,!0,s,a);case 19:return tp(s,i,a);case 22:return Gh(s,i,a)}throw Error(n(156,i.tag))};function bp(s,i){return sd(s,i)}function h0(s,i,a,f){this.tag=s,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(s,i,a,f){return new h0(s,i,a,f)}function ou(s){return s=s.prototype,!(!s||!s.isReactComponent)}function p0(s){if(typeof s=="function")return ou(s)?1:0;if(s!=null){if(s=s.$$typeof,s===M)return 11;if(s===xe)return 14}return 2}function Qn(s,i){var a=s.alternate;return a===null?(a=Bt(s.tag,i,s.key,s.mode),a.elementType=s.elementType,a.type=s.type,a.stateNode=s.stateNode,a.alternate=s,s.alternate=a):(a.pendingProps=i,a.type=s.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=s.flags&14680064,a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,i=s.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=s.sibling,a.index=s.index,a.ref=s.ref,a}function fl(s,i,a,f,h,g){var _=2;if(f=s,typeof s=="function")ou(s)&&(_=1);else if(typeof s=="string")_=5;else e:switch(s){case G:return xr(a.children,h,g,i);case B:_=8,h|=8;break;case I:return s=Bt(12,a,i,h|2),s.elementType=I,s.lanes=g,s;case H:return s=Bt(13,a,i,h),s.elementType=H,s.lanes=g,s;case fe:return s=Bt(19,a,i,h),s.elementType=fe,s.lanes=g,s;case me:return dl(a,h,g,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Z:_=10;break e;case oe:_=9;break e;case M:_=11;break e;case xe:_=14;break e;case pe:_=16,f=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return i=Bt(_,a,i,h),i.elementType=s,i.type=f,i.lanes=g,i}function xr(s,i,a,f){return s=Bt(7,s,f,i),s.lanes=a,s}function dl(s,i,a,f){return s=Bt(22,s,f,i),s.elementType=me,s.lanes=a,s.stateNode={isHidden:!1},s}function lu(s,i,a){return s=Bt(6,s,null,i),s.lanes=a,s}function au(s,i,a){return i=Bt(4,s.children!==null?s.children:[],s.key,i),i.lanes=a,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function g0(s,i,a,f,h){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Oa(0),this.expirationTimes=Oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oa(0),this.identifierPrefix=f,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function cu(s,i,a,f,h,g,_,b,C){return s=new g0(s,i,a,b,C),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Bt(3,null,null,i),s.current=g,g.stateNode=s,g.memoizedState={element:f,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},_c(g),s}function m0(s,i,a){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:f==null?null:""+f,children:s,containerInfo:i,implementation:a}}function Tp(s){if(!s)return Fn;s=s._reactInternals;e:{if(cr(s)!==s||s.tag!==1)throw Error(n(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(yt(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(s.tag===1){var a=s.type;if(yt(a))return eh(s,a,i)}return i}function Cp(s,i,a,f,h,g,_,b,C){return s=cu(a,f,!0,s,h,g,_,b,C),s.context=Tp(null),a=s.current,f=ft(),h=Kn(a),g=wn(f,h),g.callback=i??null,Hn(a,g,h),s.current.lanes=h,Ks(s,h,f),St(s,f),s}function hl(s,i,a,f){var h=i.current,g=ft(),_=Kn(h);return a=Tp(a),i.context===null?i.context=a:i.pendingContext=a,i=wn(g,_),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Hn(h,i,_),s!==null&&(Zt(s,h,_,g),qo(s,h,_)),_}function pl(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Np(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var a=s.retryLane;s.retryLane=a!==0&&a<i?a:i}}function uu(s,i){Np(s,i),(s=s.alternate)&&Np(s,i)}function y0(){return null}var Ap=typeof reportError=="function"?reportError:function(s){console.error(s)};function fu(s){this._internalRoot=s}gl.prototype.render=fu.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(n(409));hl(s,i,null,null)},gl.prototype.unmount=fu.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;vr(function(){hl(null,s,null,null)}),i[pn]=null}};function gl(s){this._internalRoot=s}gl.prototype.unstable_scheduleHydration=function(s){if(s){var i=dd();s={blockedOn:null,target:s,priority:i};for(var a=0;a<On.length&&i!==0&&i<On[a].priority;a++);On.splice(a,0,s),a===0&&gd(s)}};function du(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function ml(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Lp(){}function v0(s,i,a,f,h){if(h){if(typeof f=="function"){var g=f;f=function(){var R=pl(_);g.call(R)}}var _=Cp(i,f,s,0,null,!1,!1,"",Lp);return s._reactRootContainer=_,s[pn]=_.current,li(s.nodeType===8?s.parentNode:s),vr(),_}for(;h=s.lastChild;)s.removeChild(h);if(typeof f=="function"){var b=f;f=function(){var R=pl(C);b.call(R)}}var C=cu(s,0,!1,null,null,!1,!1,"",Lp);return s._reactRootContainer=C,s[pn]=C.current,li(s.nodeType===8?s.parentNode:s),vr(function(){hl(i,C,a,f)}),C}function yl(s,i,a,f,h){var g=a._reactRootContainer;if(g){var _=g;if(typeof h=="function"){var b=h;h=function(){var C=pl(_);b.call(C)}}hl(i,_,s,h)}else _=v0(a,i,s,h,f);return pl(_)}ud=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var a=Ws(i.pendingLanes);a!==0&&(Ra(i,a|1),St(i,Fe()),(we&6)===0&&(cs=Fe()+500,zn()))}break;case 13:vr(function(){var f=vn(s,1);if(f!==null){var h=ft();Zt(f,s,1,h)}}),uu(s,1)}},$a=function(s){if(s.tag===13){var i=vn(s,134217728);if(i!==null){var a=ft();Zt(i,s,134217728,a)}uu(s,134217728)}},fd=function(s){if(s.tag===13){var i=Kn(s),a=vn(s,i);if(a!==null){var f=ft();Zt(a,s,i,f)}uu(s,i)}},dd=function(){return Ee},hd=function(s,i){var a=Ee;try{return Ee=s,i()}finally{Ee=a}},Aa=function(s,i,a){switch(i){case"input":if(rn(s,a),i=a.name,a.type==="radio"&&i!=null){for(a=s;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<a.length;i++){var f=a[i];if(f!==s&&f.form===s.form){var h=Po(f);if(!h)throw Error(n(90));io(f),rn(f,h)}}}break;case"textarea":lo(s,a);break;case"select":i=a.value,i!=null&&Ln(s,!!a.multiple,i,!1)}},Xf=ru,Yf=vr;var w0={usingClientEntryPoint:!1,Events:[ui,Jr,Po,Qf,Jf,ru]},ki={findFiberByHostInstance:ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},S0={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=nd(s),s===null?null:s.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||y0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{go=vl.inject(S0),sn=vl}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=w0,xt.createPortal=function(s,i){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!du(i))throw Error(n(200));return m0(s,i,null,a)},xt.createRoot=function(s,i){if(!du(s))throw Error(n(299));var a=!1,f="",h=Ap;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=cu(s,1,!1,null,null,a,!1,f,h),s[pn]=i.current,li(s.nodeType===8?s.parentNode:s),new fu(i)},xt.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=nd(i),s=s===null?null:s.stateNode,s},xt.flushSync=function(s){return vr(s)},xt.hydrate=function(s,i,a){if(!ml(i))throw Error(n(200));return yl(null,s,i,!0,a)},xt.hydrateRoot=function(s,i,a){if(!du(s))throw Error(n(405));var f=a!=null&&a.hydratedSources||null,h=!1,g="",_=Ap;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),i=Cp(i,null,s,1,a??null,h,!1,g,_),s[pn]=i.current,li(s),f)for(s=0;s<f.length;s++)a=f[s],h=a._getVersion,h=h(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,h]:i.mutableSourceEagerHydrationData.push(a,h);return new gl(i)},xt.render=function(s,i,a){if(!ml(i))throw Error(n(200));return yl(null,s,i,!1,a)},xt.unmountComponentAtNode=function(s){if(!ml(s))throw Error(n(40));return s._reactRootContainer?(vr(function(){yl(null,null,s,!1,function(){s._reactRootContainer=null,s[pn]=null})}),!0):!1},xt.unstable_batchedUpdates=ru,xt.unstable_renderSubtreeIntoContainer=function(s,i,a,f){if(!ml(a))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return yl(s,i,a,!1,f)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var Fp;function R0(){if(Fp)return gu.exports;Fp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),gu.exports=O0(),gu.exports}var zp;function $0(){if(zp)return wl;zp=1;var t=R0();return wl.createRoot=t.createRoot,wl.hydrateRoot=t.hydrateRoot,wl}var Hk=$0();const Hg=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.closeBrowser",{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}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.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.accessibilitySnapshot",{title:"Accessibility snapshot",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function D0(t,e){if(t)for(const n of e.split("|")){if(n==="url")try{const o=new URL(t[n]);return o.protocol==="data:"?o.protocol:o.protocol==="about:"?t[n]:o.pathname+o.search}catch{if(t[n]!==void 0)return t[n]}if(n==="timeNumber"&&t[n]!==void 0)return new Date(t[n]).toString();const r=B0(t,n);if(r!==void 0)return r}}function B0(t,e){const n=e.split(".");let r=t;for(const o of n){if(typeof r!="object"||r===null)return;r=r[o]}if(r!==void 0)return String(r)}function F0(t){var e;return(e=Hg.get(t.type+"."+t.method))==null?void 0:e.group}const Pi=Symbol("context"),qg=Symbol("nextInContext"),Vg=Symbol("prevByEndTime"),Wg=Symbol("nextByStartTime"),Up=Symbol("events");class qk{constructor(e){be(this,"startTime");be(this,"endTime");be(this,"browserName");be(this,"channel");be(this,"platform");be(this,"wallTime");be(this,"title");be(this,"options");be(this,"pages");be(this,"actions");be(this,"attachments");be(this,"visibleAttachments");be(this,"events");be(this,"stdio");be(this,"errors");be(this,"errorDescriptors");be(this,"hasSource");be(this,"hasStepData");be(this,"sdkLanguage");be(this,"testIdAttributeName");be(this,"sources");be(this,"resources");e.forEach(r=>z0(r));const n=e.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=U0(e),this.pages=[].concat(...e.map(r=>r.pages)),this.wallTime=e.map(r=>r.wallTime).reduce((r,o)=>Math.min(r||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=e.map(r=>r.startTime).reduce((r,o)=>Math.min(r,o),Number.MAX_VALUE),this.endTime=e.map(r=>r.endTime).reduce((r,o)=>Math.max(r,o),Number.MIN_VALUE),this.events=[].concat(...e.map(r=>r.events)),this.stdio=[].concat(...e.map(r=>r.stdio)),this.errors=[].concat(...e.map(r=>r.errors)),this.hasSource=e.some(r=>r.hasSource),this.hasStepData=e.some(r=>r.origin==="testRunner"),this.resources=[...e.map(r=>r.resources)].flat(),this.attachments=this.actions.flatMap(r=>{var o;return((o=r.attachments)==null?void 0:o.map(l=>({...l,traceUrl:r.context.traceUrl})))??[]}),this.visibleAttachments=this.attachments.filter(r=>!r.name.startsWith("_")),this.events.sort((r,o)=>r.time-o.time),this.resources.sort((r,o)=>r._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=X0(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const n=new Set(e);return this.actions.filter(r=>{const o=r.group??F0({type:r.class,method:r.method});return!o||n.has(o)})}_errorDescriptorsFromActions(){var n;const e=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,n)=>({stack:e.stack,message:e.message}))}}function z0(t){for(const n of t.pages)n[Pi]=t;for(let n=0;n<t.actions.length;++n){const r=t.actions[n];r[Pi]=t}let e;for(let n=t.actions.length-1;n>=0;n--){const r=t.actions[n];r[qg]=e,r.class!=="Route"&&(e=r)}for(const n of t.events)n[Pi]=t;for(const n of t.resources)n[Pi]=t}function U0(t){const e=new Map;for(const o of t){const l=o.traceUrl;let c=e.get(l);c||(c=[],e.set(l,c)),c.push(o)}const n=[];let r=0;for(const[,o]of e){e.size>1&&H0(o,++r);const l=q0(o);n.push(...l)}n.sort((o,l)=>l.parentId===o.callId?1:o.parentId===l.callId?-1:o.endTime-l.endTime);for(let o=1;o<n.length;++o)n[o][Vg]=n[o-1];n.sort((o,l)=>l.parentId===o.callId?-1:o.parentId===l.callId?1:o.startTime-l.startTime);for(let o=0;o+1<n.length;++o)n[o][Wg]=n[o+1];return n}function H0(t,e){for(const n of t)for(const r of n.actions)r.callId&&(r.callId=`${e}:${r.callId}`),r.parentId&&(r.parentId=`${e}:${r.parentId}`)}let Hp=0;function q0(t){const e=new Map,n=t.filter(c=>c.origin==="library"),r=t.filter(c=>c.origin==="testRunner");if(!r.length||!n.length)return t.map(c=>c.actions.map(u=>({...u,context:c}))).flat();for(const c of n)for(const u of c.actions)e.set(u.stepId||`tmp-step@${++Hp}`,{...u,context:c});const o=W0(r,e);o&&V0(n,o);const l=new Map;for(const c of r)for(const u of c.actions){const d=u.stepId&&e.get(u.stepId);if(d){l.set(u.callId,d.callId),u.error&&(d.error=u.error),u.attachments&&(d.attachments=u.attachments),u.annotations&&(d.annotations=u.annotations),u.parentId&&(d.parentId=l.get(u.parentId)??u.parentId),u.group&&(d.group=u.group),d.startTime=u.startTime,d.endTime=u.endTime;continue}u.parentId&&(u.parentId=l.get(u.parentId)??u.parentId),e.set(u.stepId||`tmp-step@${++Hp}`,{...u,context:c})}return[...e.values()]}function V0(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const r of n.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of n.events)r.time+=e;for(const r of n.stdio)r.timestamp+=e;for(const r of n.pages)for(const o of r.screencastFrames)o.timestamp+=e;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function W0(t,e){for(const n of t)for(const r of n.actions){if(!r.startTime)continue;const o=r.stepId?e.get(r.stepId):void 0;if(o)return r.startTime-o.startTime}return 0}function K0(t){const e=new Map;for(const r of t)e.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of e.values()){const o=r.action.parentId&&e.get(r.action.parentId)||n;o.children.push(r),r.parent=o}return{rootItem:n,itemMap:e}}function Hl(t){return t[Pi]}function G0(t){return t[qg]}function qp(t){return t[Vg]}function Vp(t){return t[Wg]}function Q0(t){let e=0,n=0;for(const r of J0(t)){if(r.type==="console"){const o=r.messageType;o==="warning"?++n:o==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:n}}function J0(t){let e=t[Up];if(e)return e;const n=G0(t);return e=Hl(t).events.filter(r=>r.time>=t.startTime&&(!n||r.time<n.startTime)),t[Up]=e,e}function X0(t,e){var r;const n=new Map;for(const o of t)for(const l of o.stack||[]){let c=n.get(l.file);c||(c={errors:[],content:void 0},n.set(l.file,c))}for(const o of e){const{action:l,stack:c,message:u}=o;!l||!c||(r=n.get(c[0].file))==null||r.errors.push({line:c[0].line||0,message:u})}return n}const Y0=50,ql=({sidebarSize:t,sidebarHidden:e=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:o=Y0,settingName:l,sidebar:c,main:u})=>{const d=Math.max(o,t)*window.devicePixelRatio,[p,m]=Nn(l?l+"."+r+":size":void 0,d),[y,v]=Nn(l?l+"."+r+":size":void 0,d),[x,k]=$.useState(null),[S,E]=Pr();let N;r==="vertical"?(N=y/window.devicePixelRatio,S&&S.height<N&&(N=S.height-10)):(N=p/window.devicePixelRatio,S&&S.width<N&&(N=S.width-10)),document.body.style.userSelect=x?"none":"inherit";let T={};return r==="vertical"?n?T={top:x?0:N-4,bottom:x?0:void 0,height:x?"initial":8}:T={bottom:x?0:N-4,top:x?0:void 0,height:x?"initial":8}:n?T={left:x?0:N-4,right:x?0:void 0,width:x?"initial":8}:T={right:x?0:N-4,left:x?0:void 0,width:x?"initial":8},w.jsxs("div",{className:Ue("split-view",r,n&&"sidebar-first"),ref:E,children:[w.jsx("div",{className:"split-view-main",children:u}),!e&&w.jsx("div",{style:{flexBasis:N},className:"split-view-sidebar",children:c}),!e&&w.jsx("div",{style:T,className:"split-view-resizer",onMouseDown:F=>k({offset:r==="vertical"?F.clientY:F.clientX,size:N}),onMouseUp:()=>k(null),onMouseMove:F=>{if(!F.buttons)k(null);else if(x){const D=(r==="vertical"?F.clientY:F.clientX)-x.offset,z=n?x.size+D:x.size-D,B=F.target.parentElement.getBoundingClientRect(),I=Math.min(Math.max(o,z),(r==="vertical"?B.height:B.width)-o);r==="vertical"?v(I*window.devicePixelRatio):m(I*window.devicePixelRatio)}}})]})},Ve=function(t,e,n){return t>=e&&t<=n};function _t(t){return Ve(t,48,57)}function Wp(t){return _t(t)||Ve(t,65,70)||Ve(t,97,102)}function Z0(t){return Ve(t,65,90)}function eS(t){return Ve(t,97,122)}function tS(t){return Z0(t)||eS(t)}function nS(t){return t>=128}function Al(t){return tS(t)||nS(t)||t===95}function Kp(t){return Al(t)||_t(t)||t===45}function rS(t){return Ve(t,0,8)||t===11||Ve(t,14,31)||t===127}function Ll(t){return t===10}function _n(t){return Ll(t)||t===9||t===32}const sS=1114111;class tf extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function iS(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r===13&&t.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),Ve(r,55296,56319)&&Ve(t.charCodeAt(n+1),56320,57343)){const o=r-55296,l=t.charCodeAt(n+1)-56320;r=Math.pow(2,16)+o*Math.pow(2,10)+l,n++}e.push(r)}return e}function Ge(t){if(t<=65535)return String.fromCharCode(t);t-=Math.pow(2,16);const e=Math.floor(t/Math.pow(2,10))+55296,n=t%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(n)}function Kg(t){const e=iS(t);let n=-1;const r=[];let o;const l=function(M){return M>=e.length?-1:e[M]},c=function(M){if(M===void 0&&(M=1),M>3)throw"Spec Error: no more than three codepoints of lookahead.";return l(n+M)},u=function(M){return M===void 0&&(M=1),n+=M,o=l(n),!0},d=function(){return n-=1,!0},p=function(M){return M===void 0&&(M=o),M===-1},m=function(){if(y(),u(),_n(o)){for(;_n(c());)u();return new Vl}else{if(o===34)return k();if(o===35)if(Kp(c())||N(c(1),c(2))){const M=new om("");return F(c(1),c(2),c(3))&&(M.type="id"),M.value=G(),M}else return new tt(o);else return o===36?c()===61?(u(),new cS):new tt(o):o===39?k():o===40?new rm:o===41?new nf:o===42?c()===61?(u(),new uS):new tt(o):o===43?z()?(d(),v()):new tt(o):o===44?new Zg:o===45?z()?(d(),v()):c(1)===45&&c(2)===62?(u(2),new Jg):O()?(d(),x()):new tt(o):o===46?z()?(d(),v()):new tt(o):o===58?new Xg:o===59?new Yg:o===60?c(1)===33&&c(2)===45&&c(3)===45?(u(3),new Qg):new tt(o):o===64?F(c(1),c(2),c(3))?new im(G()):new tt(o):o===91?new nm:o===92?T()?(d(),x()):new tt(o):o===93?new Ru:o===94?c()===61?(u(),new aS):new tt(o):o===123?new em:o===124?c()===61?(u(),new lS):c()===124?(u(),new sm):new tt(o):o===125?new tm:o===126?c()===61?(u(),new oS):new tt(o):_t(o)?(d(),v()):Al(o)?(d(),x()):p()?new Ml:new tt(o)}},y=function(){for(;c(1)===47&&c(2)===42;)for(u(2);;)if(u(),o===42&&c()===47){u();break}else if(p())return},v=function(){const M=B();if(F(c(1),c(2),c(3))){const H=new fS;return H.value=M.value,H.repr=M.repr,H.type=M.type,H.unit=G(),H}else if(c()===37){u();const H=new cm;return H.value=M.value,H.repr=M.repr,H}else{const H=new am;return H.value=M.value,H.repr=M.repr,H.type=M.type,H}},x=function(){const M=G();if(M.toLowerCase()==="url"&&c()===40){for(u();_n(c(1))&&_n(c(2));)u();return c()===34||c()===39?new Fi(M):_n(c())&&(c(2)===34||c(2)===39)?new Fi(M):S()}else return c()===40?(u(),new Fi(M)):new rf(M)},k=function(M){M===void 0&&(M=o);let H="";for(;u();){if(o===M||p())return new sf(H);if(Ll(o))return d(),new Gg;o===92?p(c())||(Ll(c())?u():H+=Ge(E())):H+=Ge(o)}throw new Error("Internal error")},S=function(){const M=new lm("");for(;_n(c());)u();if(p(c()))return M;for(;u();){if(o===41||p())return M;if(_n(o)){for(;_n(c());)u();return c()===41||p(c())?(u(),M):(Z(),new Il)}else{if(o===34||o===39||o===40||rS(o))return Z(),new Il;if(o===92)if(T())M.value+=Ge(E());else return Z(),new Il;else M.value+=Ge(o)}}throw new Error("Internal error")},E=function(){if(u(),Wp(o)){const M=[o];for(let fe=0;fe<5&&Wp(c());fe++)u(),M.push(o);_n(c())&&u();let H=parseInt(M.map(function(fe){return String.fromCharCode(fe)}).join(""),16);return H>sS&&(H=65533),H}else return p()?65533:o},N=function(M,H){return!(M!==92||Ll(H))},T=function(){return N(o,c())},F=function(M,H,fe){return M===45?Al(H)||H===45||N(H,fe):Al(M)?!0:M===92?N(M,H):!1},O=function(){return F(o,c(1),c(2))},D=function(M,H,fe){return M===43||M===45?!!(_t(H)||H===46&&_t(fe)):M===46?!!_t(H):!!_t(M)},z=function(){return D(o,c(1),c(2))},G=function(){let M="";for(;u();)if(Kp(o))M+=Ge(o);else if(T())M+=Ge(E());else return d(),M;throw new Error("Internal parse error")},B=function(){let M="",H="integer";for((c()===43||c()===45)&&(u(),M+=Ge(o));_t(c());)u(),M+=Ge(o);if(c(1)===46&&_t(c(2)))for(u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);const fe=c(1),xe=c(2),pe=c(3);if((fe===69||fe===101)&&_t(xe))for(u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);else if((fe===69||fe===101)&&(xe===43||xe===45)&&_t(pe))for(u(),M+=Ge(o),u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);const me=I(M);return{type:H,value:me,repr:M}},I=function(M){return+M},Z=function(){for(;u();){if(o===41||p())return;T()&&E()}};let oe=0;for(;!p(c());)if(r.push(m()),oe++,oe>e.length*2)throw new Error("I'm infinite-looping!");return r}class He{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Gg extends He{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Il extends He{constructor(){super(...arguments),this.tokenType="BADURL"}}class Vl extends He{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Qg extends He{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class Jg extends He{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Xg extends He{constructor(){super(...arguments),this.tokenType=":"}}class Yg extends He{constructor(){super(...arguments),this.tokenType=";"}}class Zg extends He{constructor(){super(...arguments),this.tokenType=","}}class Ls extends He{constructor(){super(...arguments),this.value="",this.mirror=""}}class em extends Ls{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class tm extends Ls{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class nm extends Ls{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Ru extends Ls{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class rm extends Ls{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class nf extends Ls{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class oS extends He{constructor(){super(...arguments),this.tokenType="~="}}class lS extends He{constructor(){super(...arguments),this.tokenType="|="}}class aS extends He{constructor(){super(...arguments),this.tokenType="^="}}class cS extends He{constructor(){super(...arguments),this.tokenType="$="}}class uS extends He{constructor(){super(...arguments),this.tokenType="*="}}class sm extends He{constructor(){super(...arguments),this.tokenType="||"}}class Ml extends He{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class tt extends He{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Ge(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==="\\"?`\\
42
- `:this.value}}class Is extends He{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 rf extends Is{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return eo(this.value)}}class Fi extends Is{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return eo(this.value)+"("}}class im extends Is{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+eo(this.value)}}class om extends Is{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"?"#"+eo(this.value):"#"+dS(this.value)}}class sf extends Is{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+um(this.value)+'"'}}class lm extends Is{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+um(this.value)+'")'}}class am extends He{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 cm extends He{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 fS extends He{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 n=eo(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||Ve(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function eo(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);if(o===0)throw new tf("Invalid character: the input contains U+0000.");Ve(o,1,31)||o===127||r===0&&Ve(o,48,57)||r===1&&Ve(o,48,57)&&n===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||Ve(o,48,57)||Ve(o,65,90)||Ve(o,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function dS(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new tf("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||Ve(r,48,57)||Ve(r,65,90)||Ve(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function um(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new tf("Invalid character: the input contains U+0000.");Ve(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class Et extends Error{}function hS(t,e){let n;try{n=Kg(t),n[n.length-1]instanceof Ml||n.push(new Ml)}catch(I){const Z=I.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,oe=(I.stack||"").indexOf(I.message);throw oe!==-1&&(I.stack=I.stack.substring(0,oe)+Z+I.stack.substring(oe+I.message.length)),I.message=Z,I}const r=n.find(I=>I instanceof im||I instanceof Gg||I instanceof Il||I instanceof sm||I instanceof Qg||I instanceof Jg||I instanceof Yg||I instanceof em||I instanceof tm||I instanceof lm||I instanceof cm);if(r)throw new Et(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function c(){return new Et(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Vl;)o++}function d(I=o){return n[I]instanceof rf}function p(I=o){return n[I]instanceof sf}function m(I=o){return n[I]instanceof am}function y(I=o){return n[I]instanceof Zg}function v(I=o){return n[I]instanceof rm}function x(I=o){return n[I]instanceof nf}function k(I=o){return n[I]instanceof Fi}function S(I=o){return n[I]instanceof tt&&n[I].value==="*"}function E(I=o){return n[I]instanceof Ml}function N(I=o){return n[I]instanceof tt&&[">","+","~"].includes(n[I].value)}function T(I=o){return y(I)||x(I)||E(I)||N(I)||n[I]instanceof Vl}function F(){const I=[O()];for(;u(),!!y();)o++,I.push(O());return I}function O(){return u(),m()||p()?n[o++].value:D()}function D(){const I={simples:[]};for(u(),N()?I.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):I.simples.push({selector:z(),combinator:""});;){if(u(),N())I.simples[I.simples.length-1].combinator=n[o++].value,u();else if(T())break;I.simples.push({combinator:"",selector:z()})}return I}function z(){let I="";const Z=[];for(;!T();)if(d()||S())I+=n[o++].toSource();else if(n[o]instanceof om)I+=n[o++].toSource();else if(n[o]instanceof tt&&n[o].value===".")if(o++,d())I+="."+n[o++].toSource();else throw c();else if(n[o]instanceof Xg)if(o++,d())if(!e.has(n[o].value.toLowerCase()))I+=":"+n[o++].toSource();else{const oe=n[o++].value.toLowerCase();Z.push({name:oe,args:[]}),l.add(oe)}else if(k()){const oe=n[o++].value.toLowerCase();if(e.has(oe)?(Z.push({name:oe,args:F()}),l.add(oe)):I+=`:${oe}(${G()})`,u(),!x())throw c();o++}else throw c();else if(n[o]instanceof nm){for(I+="[",o++;!(n[o]instanceof Ru)&&!E();)I+=n[o++].toSource();if(!(n[o]instanceof Ru))throw c();I+="]",o++}else throw c();if(!I&&!Z.length)throw c();return{css:I||void 0,functions:Z}}function G(){let I="",Z=1;for(;!E()&&((v()||k())&&Z++,x()&&Z--,!!Z);)I+=n[o++].toSource();return I}const B=F();if(!E())throw c();if(B.some(I=>typeof I!="object"||!("simples"in I)))throw new Et(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:B,names:Array.from(l)}}const $u=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),pS=new Set(["left-of","right-of","above","below","near"]),fm=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 to(t){const e=yS(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const o=hS(r.body,fm);n.push({name:"css",body:o.selector,source:r.body});continue}if($u.has(r.name)){let o,l;try{const p=JSON.parse("["+r.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Et(`Malformed selector: ${r.name}=`+r.body);if(o=p[0],p.length===2){if(typeof p[1]!="number"||!pS.has(r.name))throw new Et(`Malformed selector: ${r.name}=`+r.body);l=p[1]}}catch{throw new Et(`Malformed selector: ${r.name}=`+r.body)}const c={name:r.name,source:r.body,body:{parsed:to(o),distance:l}},u=[...c.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=u?c.body.parsed.parts.indexOf(u):-1;d!==-1&&gS(c.body.parsed.parts.slice(0,d+1),n.slice(0,d+1))&&c.body.parsed.parts.splice(0,d+1),n.push(c);continue}n.push({...r,source:r.body})}if($u.has(n[0].name))throw new Et(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function gS(t,e){return Tn({parts:t})===Tn({parts:e})}function Tn(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let o=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(o=!1);const l=o?n.name+"=":"";return`${r===t.capture?"*":""}${l}${n.source}`}).join(" >> ")}function mS(t,e){const n=(r,o)=>{for(const l of r.parts)e(l,o),$u.has(l.name)&&n(l.body.parsed,!0)};n(t,!1)}function yS(t){let e=0,n,r=0;const o={parts:[]},l=()=>{const u=t.substring(r,e).trim(),d=u.indexOf("=");let p,m;d!==-1&&u.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=u.substring(0,d).trim(),m=u.substring(d+1)):u.length>1&&u[0]==='"'&&u[u.length-1]==='"'||u.length>1&&u[0]==="'"&&u[u.length-1]==="'"?(p="text",m=u):/^\(*\/\//.test(u)||u.startsWith("..")?(p="xpath",m=u):(p="css",m=u);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),o.parts.push({name:p,body:m}),y){if(o.capture!==void 0)throw new Et("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!t.includes(">>"))return e=t.length,l(),o;const c=()=>{const d=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<t.length;){const u=t[e];u==="\\"&&e+1<t.length?e+=2:u===n?(n=void 0,e++):!n&&(u==='"'||u==="'"||u==="`")&&!c()?(n=u,e++):!n&&u===">"&&t[e+1]===">"?(l(),e+=2,r=e):e++}return l(),o}function Ir(t,e){let n=0,r=t.length===0;const o=()=>t[n]||"",l=()=>{const E=o();return++n,r=n>=t.length,E},c=E=>{throw r?new Et(`Unexpected end of selector while parsing selector \`${t}\``):new Et(`Error while parsing selector \`${t}\` - unexpected symbol "${o()}" at position ${n}`+(E?" during "+E:""))};function u(){for(;!r&&/\s/.test(o());)l()}function d(E){return E>="€"||E>="0"&&E<="9"||E>="A"&&E<="Z"||E>="a"&&E<="z"||E>="0"&&E<="9"||E==="_"||E==="-"}function p(){let E="";for(u();!r&&d(o());)E+=l();return E}function m(E){let N=l();for(N!==E&&c("parsing quoted string");!r&&o()!==E;)o()==="\\"&&l(),N+=l();return o()!==E&&c("parsing quoted string"),N+=l(),N}function y(){l()!=="/"&&c("parsing regular expression");let E="",N=!1;for(;!r;){if(o()==="\\")E+=l(),r&&c("parsing regular expression");else if(N&&o()==="]")N=!1;else if(!N&&o()==="[")N=!0;else if(!N&&o()==="/")break;E+=l()}l()!=="/"&&c("parsing regular expression");let T="";for(;!r&&o().match(/[dgimsuy]/);)T+=l();try{return new RegExp(E,T)}catch(F){throw new Et(`Error while parsing selector \`${t}\`: ${F.message}`)}}function v(){let E="";return u(),o()==="'"||o()==='"'?E=m(o()).slice(1,-1):E=p(),E||c("parsing property path"),E}function x(){u();let E="";return r||(E+=l()),!r&&E!=="="&&(E+=l()),["=","*=","^=","$=","|=","~="].includes(E)||c("parsing operator"),E}function k(){l();const E=[];for(E.push(v()),u();o()===".";)l(),E.push(v()),u();if(o()==="]")return l(),{name:E.join("."),jsonPath:E,op:"<truthy>",value:null,caseSensitive:!1};const N=x();let T,F=!0;if(u(),o()==="/"){if(N!=="=")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${N} in attribute with regular expression`);T=y()}else if(o()==="'"||o()==='"')T=m(o()).slice(1,-1),u(),o()==="i"||o()==="I"?(F=!1,l()):(o()==="s"||o()==="S")&&(F=!0,l());else{for(T="";!r&&(d(o())||o()==="+"||o()===".");)T+=l();T==="true"?T=!0:T==="false"?T=!1:e||(T=+T,Number.isNaN(T)&&c("parsing attribute value"))}if(u(),o()!=="]"&&c("parsing attribute value"),l(),N!=="="&&typeof T!="string")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${N} in attribute with non-string matching value - ${T}`);return{name:E.join("."),jsonPath:E,op:N,value:T,caseSensitive:F}}const S={name:"",attributes:[]};for(S.name=p(),u();o()==="[";)S.attributes.push(k()),u();if(r||c(void 0),!S.name&&!S.attributes.length)throw new Et(`Error while parsing selector \`${t}\` - selector cannot be empty`);return S}function sa(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.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 Wl(t){return t.charAt(0).toUpperCase()+t.substring(1)}function dm(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ms(t){return`"${t.replace(/["\\]/g,e=>"\\"+e)}"`}let _r;function vS(){_r=new Map}function gt(t){let e=_r==null?void 0:_r.get(t);return e===void 0&&(e=t.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),_r==null||_r.set(t,e)),e}function ia(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function hm(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function kt(t,e){return typeof t!="string"?hm(t):`${JSON.stringify(t)}${e?"s":"i"}`}function ht(t,e){return typeof t!="string"?hm(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function wS(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Gp(t,e){return wS(t,e,"…")}function Kl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function SS(t,e){const n=t.length,r=e.length;let o=0,l=0;const c=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=r;d++)t[u-1]===e[d-1]&&(c[u][d]=c[u-1][d-1]+1,c[u][d]>o&&(o=c[u][d],l=u));return t.slice(l-o,l)}function xS(t,e){try{const n=to(e),r=n.parts[n.parts.length-1];if((r==null?void 0:r.name)==="internal:describe"){const o=JSON.parse(r.body);if(typeof o=="string")return o}return Tr(new gm[t],n,!1,1)[0]}catch{return e}}function Mr(t,e,n=!1){return pm(t,e,n,1)[0]}function pm(t,e,n=!1,r=20,o){try{return Tr(new gm[t](o),to(e),n,r)}catch{return[e]}}function Tr(t,e,n=!1,r=20){const o=[...e.parts],l=[];let c=n?"frame-locator":"page";for(let u=0;u<o.length;u++){const d=o[u],p=c;if(c="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?l.push([t.generateLocator(p,"first",""),t.generateLocator(p,"nth","0")]):d.body==="-1"?l.push([t.generateLocator(p,"last",""),t.generateLocator(p,"nth","-1")]):l.push([t.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){l.push([t.generateLocator(p,"visible",d.body),t.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:k,text:S}=Ti(d.body);l.push([t.generateLocator(p,"text",S,{exact:k})]);continue}if(d.name==="internal:has-text"){const{exact:k,text:S}=Ti(d.body);if(!k){l.push([t.generateLocator(p,"has-text",S,{exact:k})]);continue}}if(d.name==="internal:has-not-text"){const{exact:k,text:S}=Ti(d.body);if(!k){l.push([t.generateLocator(p,"has-not-text",S,{exact:k})]);continue}}if(d.name==="internal:has"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"has",S)));continue}if(d.name==="internal:has-not"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"hasNot",S)));continue}if(d.name==="internal:and"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"and",S)));continue}if(d.name==="internal:or"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"or",S)));continue}if(d.name==="internal:chain"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"chain",S)));continue}if(d.name==="internal:label"){const{exact:k,text:S}=Ti(d.body);l.push([t.generateLocator(p,"label",S,{exact:k})]);continue}if(d.name==="internal:role"){const k=Ir(d.body,!0),S={attrs:[]};for(const E of k.attributes)E.name==="name"?(S.exact=E.caseSensitive,S.name=E.value):(E.name==="level"&&typeof E.value=="string"&&(E.value=+E.value),S.attrs.push({name:E.name==="include-hidden"?"includeHidden":E.name,value:E.value}));l.push([t.generateLocator(p,"role",k.name,S)]);continue}if(d.name==="internal:testid"){const k=Ir(d.body,!0),{value:S}=k.attributes[0];l.push([t.generateLocator(p,"test-id",S)]);continue}if(d.name==="internal:attr"){const k=Ir(d.body,!0),{name:S,value:E,caseSensitive:N}=k.attributes[0],T=E,F=!!N;if(S==="placeholder"){l.push([t.generateLocator(p,"placeholder",T,{exact:F})]);continue}if(S==="alt"){l.push([t.generateLocator(p,"alt",T,{exact:F})]);continue}if(S==="title"){l.push([t.generateLocator(p,"title",T,{exact:F})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const k=l[l.length-1],S=o[u-1],E=k.map(N=>t.chainLocators([N,t.generateLocator(p,"frame","")]));["xpath","css"].includes(S.name)&&E.push(t.generateLocator(p,"frame-locator",Tn({parts:[S]})),t.generateLocator(p,"frame-locator",Tn({parts:[S]},!0))),k.splice(0,k.length,...E),c="frame-locator";continue}const m=o[u+1],y=Tn({parts:[d]}),v=t.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:k,text:S}=Ti(m.body);if(!k){const E=t.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",S,{exact:k}),N={};m.name==="internal:has-text"?N.hasText=S:N.hasNotText=S;const T=t.generateLocator(p,"default",y,N);l.push([t.chainLocators([v,E]),T]),u++;continue}}let x;if(["xpath","css"].includes(d.name)){const k=Tn({parts:[d]},!0);x=t.generateLocator(p,"default",k)}l.push([v,x].filter(Boolean))}return _S(t,l,r)}function _S(t,e,n){const r=e.map(()=>""),o=[],l=c=>{if(c===e.length)return o.push(t.chainLocators(r)),o.length<n;for(const u of e[c])if(r[c]=u,!l(c+1))return!1;return!0};return l(0),o}function Ti(t){let e=!1;const n=t.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(t.endsWith('"')?(t=JSON.parse(t),e=!0):t.endsWith('"s')?(t=JSON.parse(t.substring(0,t.length-1)),e=!0):t.endsWith('"i')&&(t=JSON.parse(t.substring(0,t.length-1)),e=!1),{exact:e,text:t})}class ES{constructor(e){this.preferredQuote=e}generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(o.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 l=[];nt(o.name)?l.push(`name: ${this.regexToSourceString(o.name)}`):typeof o.name=="string"&&(l.push(`name: ${this.quote(o.name)}`),o.exact&&l.push("exact: true"));for(const{name:u,value:d}of o.attrs)l.push(`${u}: ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, { ${l.join(", ")} }`:"";return`getByRole(${this.quote(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("getByLabel",r,!!o.exact);case"title":return this.toCallWithExact("getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return ia(String(e))}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToSourceString(n)})`:r?`${e}(${this.quote(n)}, { exact: true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return sa(e,this.preferredQuote??"'")}}class kS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(o.hasText)})`:o.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(o.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 l=[];nt(o.name)?l.push(`name=${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`name=${this.quote(o.name)}`),o.exact&&l.push("exact=True"));for(const{name:u,value:d}of o.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),l.push(`${dm(u)}=${p}`)}const c=l.length?`, ${l.join(", ")}`:"";return`get_by_role(${this.quote(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!o.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!o.exact);case"label":return this.toCallWithExact("get_by_label",r,!!o.exact);case"title":return this.toCallWithExact("get_by_title",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${ia(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, exact=True)`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return sa(e,'"')}}class bS{generateLocator(e,n,r,o={}){let l;switch(e){case"page":l="Page";break;case"frame-locator":l="FrameLocator";break;case"locator":l="Locator";break}switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasText(${this.toHasText(o.hasText)}))`:o.hasNotText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasNotText(${this.toHasText(o.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 ${l}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const c=[];nt(o.name)?c.push(`.setName(${this.regexToString(o.name)})`):typeof o.name=="string"&&(c.push(`.setName(${this.quote(o.name)})`),o.exact&&c.push(".setExact(true)"));for(const{name:d,value:p}of o.attrs)c.push(`.set${Wl(d)}(${typeof p=="string"?this.quote(p):p})`);const u=c.length?`, new ${l}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${dm(r).toUpperCase()}${u})`;case"has-text":return`filter(new ${l}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${l}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${l}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${l}.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(l,"getByText",r,!!o.exact);case"alt":return this.toCallWithExact(l,"getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact(l,"getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact(l,"getByLabel",r,!!o.exact);case"title":return this.toCallWithExact(l,"getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(ia(e.source))}${n})`}toCallWithExact(e,n,r,o){return nt(r)?`${n}(${this.regexToString(r)})`:o?`${n}(${this.quote(r)}, new ${e}.${Wl(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(e){return nt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return sa(e,'"')}}class TS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(o.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 l=[];nt(o.name)?l.push(`NameRegex = ${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`Name = ${this.quote(o.name)}`),o.exact&&l.push("Exact = true"));for(const{name:u,value:d}of o.attrs)l.push(`${Wl(u)} = ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, new() { ${l.join(", ")} }`:"";return`GetByRole(AriaRole.${Wl(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!o.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(ia(e.source))}${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, new() { Exact = true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return nt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return sa(e,'"')}}class CS{generateLocator(e,n,r,o={}){return JSON.stringify({kind:n,body:r,options:o})}chainLocators(e){const n=e.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const gm={javascript:ES,python:kS,java:bS,csharp:TS,jsonl:CS};function nt(t){return t instanceof RegExp}const Qp=new Map;function NS({name:t,rootItem:e,render:n,title:r,icon:o,isError:l,isVisible:c,selectedItem:u,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:v,noItemsMessage:x,dataTestId:k,autoExpandDepth:S}){const E=$.useMemo(()=>AS(e,u,y.expandedItems,S||0,c),[e,u,y,S,c]),N=$.useRef(null),[T,F]=$.useState(),[O,D]=$.useState(!1);$.useEffect(()=>{m==null||m(T)},[m,T]),$.useEffect(()=>{const B=N.current;if(!B)return;const I=()=>{Qp.set(t,B.scrollTop)};return B.addEventListener("scroll",I,{passive:!0}),()=>B.removeEventListener("scroll",I)},[t]),$.useEffect(()=>{N.current&&(N.current.scrollTop=Qp.get(t)||0)},[t]);const z=$.useCallback(B=>{const{expanded:I}=E.get(B);if(I){for(let Z=u;Z;Z=Z.parent)if(Z===B){p==null||p(B);break}y.expandedItems.set(B.id,!1)}else y.expandedItems.set(B.id,!0);v({...y})},[E,u,p,y,v]),G=$.useCallback(B=>{const{expanded:I}=E.get(B),Z=[B];for(;Z.length;){const oe=Z.pop();Z.push(...oe.children),y.expandedItems.set(oe.id,!I)}v({...y})},[E,y,v]);return w.jsx("div",{className:Ue("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":k||t+"-tree",children:w.jsxs("div",{className:Ue("tree-view-content"),tabIndex:0,onKeyDown:B=>{if(u&&B.key==="Enter"){d==null||d(u);return}if(B.key!=="ArrowDown"&&B.key!=="ArrowUp"&&B.key!=="ArrowLeft"&&B.key!=="ArrowRight")return;if(B.stopPropagation(),B.preventDefault(),u&&B.key==="ArrowLeft"){const{expanded:Z,parent:oe}=E.get(u);Z?(y.expandedItems.set(u.id,!1),v({...y})):oe&&(p==null||p(oe));return}if(u&&B.key==="ArrowRight"){u.children.length&&(y.expandedItems.set(u.id,!0),v({...y}));return}let I=u;if(B.key==="ArrowDown"&&(u?I=E.get(u).next:E.size&&(I=[...E.keys()][0])),B.key==="ArrowUp"){if(u)I=E.get(u).prev;else if(E.size){const Z=[...E.keys()];I=Z[Z.length-1]}}m==null||m(void 0),I&&(D(!0),p==null||p(I)),F(void 0)},ref:N,children:[x&&E.size===0&&w.jsx("div",{className:"tree-view-empty",children:x}),e.children.map(B=>E.get(B)&&w.jsx(mm,{item:B,treeItems:E,selectedItem:u,onSelected:p,onAccepted:d,isError:l,toggleExpanded:z,toggleSubtree:G,highlightedItem:T,setHighlightedItem:F,render:n,icon:o,title:r,isKeyboardNavigation:O,setIsKeyboardNavigation:D},B.id))]})})}function mm({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:o,setHighlightedItem:l,isError:c,onAccepted:u,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:v,isKeyboardNavigation:x,setIsKeyboardNavigation:k}){const S=$.useId(),E=$.useRef(null);$.useEffect(()=>{n===t&&x&&E.current&&(zg(E.current),k(!1))},[t,n,x,k]);const N=e.get(t),T=N.depth,F=N.expanded;let O="codicon-blank";typeof F=="boolean"&&(O=F?"codicon-chevron-down":"codicon-chevron-right");const D=m(t),z=F&&t.children.length?t.children:[],G=y==null?void 0:y(t),B=(v==null?void 0:v(t))||"codicon-blank";return w.jsxs("div",{ref:E,role:"treeitem","aria-selected":t===n,"aria-expanded":F,"aria-controls":S,title:G,className:"vbox",style:{flex:"none"},children:[w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(t),className:Ue("tree-view-entry",n===t&&"selected",o===t&&"highlighted",(c==null?void 0:c(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>l(t),onMouseLeave:()=>l(void 0),children:[T?new Array(T).fill(0).map((I,Z)=>w.jsx("div",{className:"tree-view-indent"},"indent-"+Z)):void 0,w.jsx("div",{"aria-hidden":"true",className:"codicon "+O,style:{minWidth:16,marginRight:4},onDoubleClick:I=>{I.preventDefault(),I.stopPropagation()},onClick:I=>{I.stopPropagation(),I.preventDefault(),I.altKey?p(t):d(t)}}),v&&w.jsx("div",{className:"codicon "+B,style:{minWidth:16,marginRight:4},"aria-label":"["+B.replace("codicon","icon")+"]"}),typeof D=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:D}):D]}),!!z.length&&w.jsx("div",{id:S,role:"group",children:z.map(I=>e.get(I)&&w.jsx(mm,{item:I,treeItems:e,selectedItem:n,onSelected:r,onAccepted:u,isError:c,toggleExpanded:d,toggleSubtree:p,highlightedItem:o,setHighlightedItem:l,render:m,title:y,icon:v,isKeyboardNavigation:x,setIsKeyboardNavigation:k},I.id))})]})}function AS(t,e,n,r,o=()=>!0){if(!o(t))return new Map;const l=new Map,c=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)c.add(p.id);let u=null;const d=(p,m)=>{for(const y of p.children){if(!o(y))continue;const v=c.has(y.id)||n.get(y.id),x=r>m&&l.size<25&&v!==!1,k=y.children.length?v??x:void 0,S={depth:m,expanded:k,parent:t===p?null:p,next:null,prev:u};u&&(l.get(u).next=y),u=y,l.set(y,S),k&&d(y,m+1)}};return d(t,0),l}const jt=$.forwardRef(function({children:e,title:n="",icon:r,disabled:o=!1,toggled:l=!1,onClick:c=()=>{},style:u,testId:d,className:p,ariaLabel:m},y){return w.jsxs("button",{ref:y,className:Ue(p,"toolbar-button",r,l&&"toggled"),onMouseDown:Jp,onClick:c,onDoubleClick:Jp,title:n,disabled:!!o,style:u,"data-testid":d,"aria-label":m||n,children:[r&&w.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),Jp=t=>{t.stopPropagation(),t.preventDefault()};function ym(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function LS(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const IS=NS,MS=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:o,onSelected:l,onHighlighted:c,revealConsole:u,revealAttachment:d,isLive:p})=>{const[m,y]=$.useState({expandedItems:new Map}),{rootItem:v,itemMap:x}=$.useMemo(()=>K0(t),[t]),{selectedItem:k}=$.useMemo(()=>({selectedItem:e?x.get(e.callId):void 0}),[x,e]),S=$.useCallback(D=>{var z,G;return!!((G=(z=D.action)==null?void 0:z.error)!=null&&G.message)},[]),E=$.useCallback(D=>r({minimum:D.action.startTime,maximum:D.action.endTime}),[r]),N=$.useCallback(D=>of(D.action,{sdkLanguage:o,revealConsole:u,revealAttachment:d,isLive:p,showDuration:!0,showBadges:!0}),[p,u,d,o]),T=$.useCallback(D=>!n||!D.action||D.action.startTime<=n.maximum&&D.action.endTime>=n.minimum,[n]),F=$.useCallback(D=>{l==null||l(D.action)},[l]),O=$.useCallback(D=>{c==null||c(D==null?void 0:D.action)},[c]);return w.jsxs("div",{className:"vbox",children:[n&&w.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[w.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),w.jsx(IS,{name:"actions",rootItem:v,treeState:m,setTreeState:y,selectedItem:k,onSelected:F,onHighlighted:O,onAccepted:E,isError:S,isVisible:T,render:N})]})},of=(t,e)=>{var E,N;const{sdkLanguage:n,revealConsole:r,revealAttachment:o,isLive:l,showDuration:c,showBadges:u}=e,{errors:d,warnings:p}=Q0(t),m=!!((E=t.attachments)!=null&&E.length)&&!!o,y=t.params.selector?xS(n||"javascript",t.params.selector):void 0,v=t.class==="Test"&&t.method==="test.step"&&((N=t.annotations)==null?void 0:N.some(T=>T.type==="skip"));let x="";t.endTime?x=pt(t.endTime-t.startTime):t.error?x="Timed out":l||(x="-");const{elements:k,title:S}=jS(t);return w.jsxs("div",{className:"action-title vbox",children:[w.jsxs("div",{className:"hbox",children:[w.jsx("span",{className:"action-title-method",title:S,children:k}),(c||u||m||v)&&w.jsx("div",{className:"spacer"}),m&&w.jsx(jt,{icon:"attach",title:"Open Attachment",onClick:()=>o(t.attachments[0])}),c&&!v&&w.jsx("div",{className:"action-duration",children:x||w.jsx("span",{className:"codicon codicon-loading"})}),v&&w.jsx("span",{className:Ue("action-skipped","codicon",ym("skipped")),title:"skipped"}),u&&w.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!d&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-error"}),w.jsx("span",{className:"action-icon-value",children:d})]}),!!p&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-warning"}),w.jsx("span",{className:"action-icon-value",children:p})]})]})]}),y&&w.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function jS(t){var u;const e=t.title??((u=Hg.get(t.class+"."+t.method))==null?void 0:u.title)??t.method,n=[],r=[];let o=0;const l=/\{([^}]+)\}/g;let c;for(;(c=l.exec(e))!==null;){const[d,p]=c,m=e.slice(o,c.index);n.push(m),r.push(m);const y=D0(t.params,p);y===void 0?(n.push(d),r.push(d)):c.index===0?(n.push(y),r.push(y)):(n.push(w.jsx("span",{className:"action-title-param",children:y})),r.push(y)),o=c.index+d.length}if(o<e.length){const d=e.slice(o);n.push(d),r.push(d)}return{elements:n,title:r.join("")}}const lf=({value:t,description:e})=>{const[n,r]=$.useState("copy"),o=$.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(c=>{navigator.clipboard.writeText(c).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return w.jsx(jt,{title:e||"Copy",icon:n,onClick:o})},jl=({value:t,description:e,copiedDescription:n=e,style:r})=>{const[o,l]=$.useState(!1),c=$.useCallback(async()=>{const u=typeof t=="function"?await t():t;await navigator.clipboard.writeText(u),l(!0),setTimeout(()=>l(!1),3e3)},[t]);return w.jsx(jt,{style:r,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:o?n:e})},Or=({text:t})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),PS=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=$.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(c=>c!=="info"),[t]);if(!t)return w.jsx(Or,{text:"No action selected"});const o=t.startTime-e,l=pt(o);return w.jsxs("div",{className:"call-tab",children:[w.jsx("div",{className:"call-line",children:t.title}),w.jsx("div",{className:"call-section",children:"Time"}),w.jsx(Xp,{name:"start:",value:l}),w.jsx(Xp,{name:"duration:",value:OS(t)}),!!r.length&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Parameters"}),r.map(c=>Yp(Zp(t,c,t.params[c],n)))]}),!!t.result&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(c=>Yp(Zp(t,c,t.result[c],n)))]})]})},Xp=({name:t,value:e})=>w.jsxs("div",{className:"call-line",children:[t,w.jsx("span",{className:"call-value datetime",title:e,children:e})]});function OS(t){return t.endTime?pt(t.endTime-t.startTime):t.error?"Timed Out":"Running"}function Yp(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),w.jsxs("div",{className:"call-line",children:[t.name,":",w.jsx("span",{className:Ue("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&w.jsx(lf,{value:t.text})]},t.name)}function Zp(t,e,n,r){const o=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&o)&&(n=Gl(n.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&o||e==="received"&&t.method==="expect")&&(n=Gl(n,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Mr(r||"javascript",t.params.selector),type:"locator",name:"locator"};const l=typeof n;return l!=="object"||n===null?{text:String(n),type:l,name:e}:n.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Gl(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Gl(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:o}of t.o)n[r]=Gl(o,e);return n}return t.h!==void 0?e===void 0?"<object>":e[t.h]:"<object>"}const eg=new Map;function oa({name:t,items:e=[],id:n,render:r,icon:o,isError:l,isWarning:c,isInfo:u,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:v,noItemsMessage:x,dataTestId:k,notSelectable:S,ariaLabel:E}){const N=$.useRef(null),[T,F]=$.useState();return $.useEffect(()=>{y==null||y(T)},[y,T]),$.useEffect(()=>{const O=N.current;if(!O)return;const D=()=>{eg.set(t,O.scrollTop)};return O.addEventListener("scroll",D,{passive:!0}),()=>O.removeEventListener("scroll",D)},[t]),$.useEffect(()=>{N.current&&(N.current.scrollTop=eg.get(t)||0)},[t]),w.jsx("div",{className:Ue("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"aria-label":E,children:w.jsxs("div",{className:Ue("list-view-content",S&&"not-selectable"),tabIndex:0,onKeyDown:O=>{var B;if(d&&O.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(O.key!=="ArrowDown"&&O.key!=="ArrowUp")return;O.stopPropagation(),O.preventDefault();const D=d?e.indexOf(d):-1;let z=D;O.key==="ArrowDown"&&(D===-1?z=0:z=Math.min(D+1,e.length-1)),O.key==="ArrowUp"&&(D===-1?z=e.length-1:z=Math.max(D-1,0));const G=(B=N.current)==null?void 0:B.children.item(z);zg(G||void 0),y==null||y(void 0),m==null||m(e[z],z),F(void 0)},ref:N,children:[x&&e.length===0&&w.jsx("div",{className:"list-view-empty",children:x}),e.map((O,D)=>{const z=r(O,D);return w.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(O,D),role:"listitem",className:Ue("list-view-entry",d===O&&"selected",!S&&T===O&&"highlighted",(l==null?void 0:l(O,D))&&"error",(c==null?void 0:c(O,D))&&"warning",(u==null?void 0:u(O,D))&&"info"),"aria-selected":d===O,onClick:()=>m==null?void 0:m(O,D),onMouseEnter:()=>F(O),onMouseLeave:()=>F(void 0),children:[o&&w.jsx("div",{className:"codicon "+(o(O,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:G=>{G.preventDefault(),G.stopPropagation()},onClick:G=>{G.stopPropagation(),G.preventDefault(),v==null||v(O,D)}}),typeof z=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:z}):z]},(n==null?void 0:n(O,D))||D)})]})})}const RS=oa,$S=({action:t,isLive:e})=>{const n=$.useMemo(()=>{var c;if(!t||!t.log.length)return[];const r=t.log,o=t.context.wallTime-t.context.startTime,l=[];for(let u=0;u<r.length;++u){let d="";if(r[u].time!==-1){const p=(c=r[u])==null?void 0:c.time;u+1<r.length?d=pt(r[u+1].time-p):t.endTime>0?d=pt(t.endTime-p):e?d=pt(Date.now()-o-p):d="-"}l.push({message:r[u].message,time:d})}return l},[t,e]);return n.length?w.jsx(RS,{name:"log",ariaLabel:"Log entries",items:n,render:r=>w.jsxs("div",{className:"log-list-item",children:[w.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):w.jsx(Or,{text:"No log entries"})};function Gi(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let o,l={},c=!1,u=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(o=n.exec(t))!==null;){const[,,p,,m]=o;if(p){const y=+p;switch(y){case 0:l={};break;case 1:l["font-weight"]="bold";break;case 2:l.opacity="0.8";break;case 3:l["font-style"]="italic";break;case 4:l["text-decoration"]="underline";break;case 7:c=!0;break;case 8:l.display="none";break;case 9:l["text-decoration"]="line-through";break;case 22:delete l["font-weight"],delete l["font-style"],delete l.opacity,delete l["text-decoration"];break;case 23:delete l["font-weight"],delete l["font-style"],delete l.opacity;break;case 24:delete l["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:u=tg[y-30];break;case 39:u=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=tg[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:l["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:u=ng[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=ng[y-100];break}}else if(m){const y={...l},v=c?d:u;v!==void 0&&(y.color=v);const x=c?u:d;x!==void 0&&(y["background-color"]=x),r.push(`<span style="${BS(y)}">${DS(m)}</span>`)}}return r.join("")}const tg={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)"},ng={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 DS(t){return t.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function BS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const FS=({error:t})=>{const e=$.useMemo(()=>Gi(t),[t]);return w.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},vm=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(Mt.useEffect(()=>{const o=document.createElement("div");return o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.left="0",o.style.zIndex="9999",o.style.cursor=t,document.body.appendChild(o),e&&o.addEventListener("mousemove",e),n&&o.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&o.removeEventListener("mousemove",e),n&&o.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(o)}},[t,e,n,r]),w.jsx(w.Fragment,{})),zS={position:"absolute",top:0,right:0,bottom:0,left:0},wm=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:o,minColumnWidth:l})=>{const c=l||0,[u,d]=Mt.useState(null),[p,m]=Pr(),y={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-o)/2,borderRightWidth:t==="horizontal"?(7-o)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-o)/2,borderLeftWidth:t==="horizontal"?(7-o)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return w.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-o)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!u&&w.jsx(vm,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(u){const x=t==="horizontal"?v.clientX-u.clientX:v.clientY-u.clientY,k=u.offset+x,S=u.index>0?e[u.index-1]:0,E=t==="horizontal"?p.width:p.height,N=Math.min(Math.max(S+c,k),E-c)-e[u.index];for(let T=u.index;T<e.length;++T)e[T]=e[T]+N;n([...e])}}}),e.map((v,x)=>w.jsx("div",{style:{...y,top:t==="horizontal"?0:v,left:t==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:k=>d({clientX:k.clientX,clientY:k.clientY,offset:v,index:x}),children:w.jsx("div",{style:{...zS,background:r}})},x))]})};async function vu(t){const e=new Image;return t&&(e.src=t,await new Promise((n,r)=>{e.onload=n,e.onerror=n})),e}const Du={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
41
+ `+g.stack}return{value:s,source:i,stack:h,digest:null}}function $c(s,i,a){return{value:s,source:null,stack:a??null,digest:i??null}}function Dc(s,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Xw=typeof WeakMap=="function"?WeakMap:Map;function Fh(s,i,a){a=wn(-1,a),a.tag=3,a.payload={element:null};var f=i.value;return a.callback=function(){il||(il=!0,Zc=f),Dc(s,i)},a}function zh(s,i,a){a=wn(-1,a),a.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=i.value;a.payload=function(){return f(h)},a.callback=function(){Dc(s,i)}}var g=s.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){Dc(s,i),typeof f!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})}),a}function Uh(s,i,a){var f=s.pingCache;if(f===null){f=s.pingCache=new Xw;var h=new Set;f.set(i,h)}else h=f.get(i),h===void 0&&(h=new Set,f.set(i,h));h.has(a)||(h.add(a),s=f0.bind(null,s,i,a),i.then(s,s))}function Hh(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function qh(s,i,a,f,h){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=wn(-1,1),i.tag=2,Hn(a,i,1))),a.lanes|=1),s):(s.flags|=65536,s.lanes=h,s)}var Yw=O.ReactCurrentOwner,vt=!1;function ut(s,i,a,f){i.child=s===null?uh(i,null,a,f):ns(i,s.child,a,f)}function Vh(s,i,a,f,h){a=a.render;var g=i.ref;return ss(i,h),f=Ac(s,i,a,f,g,h),a=Lc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Ie&&a&&dc(i),i.flags|=1,ut(s,i,f,h),i.child)}function Wh(s,i,a,f,h){if(s===null){var g=a.type;return typeof g=="function"&&!ou(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=g,Kh(s,i,g,f,h)):(s=fl(a.type,null,f,i,i.mode,h),s.ref=i.ref,s.return=i,i.child=s)}if(g=s.child,(s.lanes&h)===0){var _=g.memoizedProps;if(a=a.compare,a=a!==null?a:si,a(_,f)&&s.ref===i.ref)return Sn(s,i,h)}return i.flags|=1,s=Qn(g,f),s.ref=i.ref,s.return=i,i.child=s}function Kh(s,i,a,f,h){if(s!==null){var g=s.memoizedProps;if(si(g,f)&&s.ref===i.ref)if(vt=!1,i.pendingProps=f=g,(s.lanes&h)!==0)(s.flags&131072)!==0&&(vt=!0);else return i.lanes=s.lanes,Sn(s,i,h)}return Bc(s,i,a,f,h)}function Gh(s,i,a){var f=i.pendingProps,h=f.children,g=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(as,Lt),Lt|=a;else{if((a&1073741824)===0)return s=g!==null?g.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,Ce(as,Lt),Lt|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=g!==null?g.baseLanes:a,Ce(as,Lt),Lt|=f}else g!==null?(f=g.baseLanes|a,i.memoizedState=null):f=a,Ce(as,Lt),Lt|=f;return ut(s,i,h,a),i.child}function Qh(s,i){var a=i.ref;(s===null&&a!==null||s!==null&&s.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function Bc(s,i,a,f,h){var g=yt(a)?fr:st.current;return g=Yr(i,g),ss(i,h),a=Ac(s,i,a,f,g,h),f=Lc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Ie&&f&&dc(i),i.flags|=1,ut(s,i,a,h),i.child)}function Jh(s,i,a,f,h){if(yt(a)){var g=!0;Ro(i)}else g=!1;if(ss(i,h),i.stateNode===null)el(s,i),Dh(i,a,f),Rc(i,a,f,h),f=!0;else if(s===null){var _=i.stateNode,b=i.memoizedProps;_.props=b;var C=_.context,R=a.contextType;typeof R=="object"&&R!==null?R=Rt(R):(R=yt(a)?fr:st.current,R=Yr(i,R));var V=a.getDerivedStateFromProps,W=typeof V=="function"||typeof _.getSnapshotBeforeUpdate=="function";W||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==f||C!==R)&&Bh(i,_,f,R),Un=!1;var q=i.memoizedState;_.state=q,Vo(i,f,_,h),C=i.memoizedState,b!==f||q!==C||mt.current||Un?(typeof V=="function"&&(Oc(i,a,V,f),C=i.memoizedState),(b=Un||$h(i,a,b,f,q,C,R))?(W||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=C),_.props=f,_.state=C,_.context=R,f=b):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{_=i.stateNode,dh(s,i),b=i.memoizedProps,R=i.type===i.elementType?b:Jt(i.type,b),_.props=R,W=i.pendingProps,q=_.context,C=a.contextType,typeof C=="object"&&C!==null?C=Rt(C):(C=yt(a)?fr:st.current,C=Yr(i,C));var X=a.getDerivedStateFromProps;(V=typeof X=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==W||q!==C)&&Bh(i,_,f,C),Un=!1,q=i.memoizedState,_.state=q,Vo(i,f,_,h);var ee=i.memoizedState;b!==W||q!==ee||mt.current||Un?(typeof X=="function"&&(Oc(i,a,X,f),ee=i.memoizedState),(R=Un||$h(i,a,R,f,q,ee,C)||!1)?(V||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,ee,C),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,ee,C)),typeof _.componentDidUpdate=="function"&&(i.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof _.componentDidUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=ee),_.props=f,_.state=ee,_.context=C,f=R):(typeof _.componentDidUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=1024),f=!1)}return Fc(s,i,a,f,g,h)}function Fc(s,i,a,f,h,g){Qh(s,i);var _=(i.flags&128)!==0;if(!f&&!_)return h&&th(i,a,!1),Sn(s,i,g);f=i.stateNode,Yw.current=i;var b=_&&typeof a.getDerivedStateFromError!="function"?null:f.render();return i.flags|=1,s!==null&&_?(i.child=ns(i,s.child,null,g),i.child=ns(i,null,b,g)):ut(s,i,b,g),i.memoizedState=f.state,h&&th(i,a,!0),i.child}function Xh(s){var i=s.stateNode;i.pendingContext?Zd(s,i.pendingContext,i.pendingContext!==i.context):i.context&&Zd(s,i.context,!1),Ec(s,i.containerInfo)}function Yh(s,i,a,f,h){return ts(),mc(h),i.flags|=256,ut(s,i,a,f),i.child}var zc={dehydrated:null,treeContext:null,retryLane:0};function Uc(s){return{baseLanes:s,cachePool:null,transitions:null}}function Zh(s,i,a){var f=i.pendingProps,h=Pe.current,g=!1,_=(i.flags&128)!==0,b;if((b=_)||(b=s!==null&&s.memoizedState===null?!1:(h&2)!==0),b?(g=!0,i.flags&=-129):(s===null||s.memoizedState!==null)&&(h|=1),Ce(Pe,h&1),s===null)return gc(i),s=i.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((i.mode&1)===0?i.lanes=1:s.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(_=f.children,s=f.fallback,g?(f=i.mode,g=i.child,_={mode:"hidden",children:_},(f&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=_):g=dl(_,f,0,null),s=xr(s,f,a,null),g.return=i,s.return=i,g.sibling=s,i.child=g,i.child.memoizedState=Uc(a),i.memoizedState=zc,s):Hc(i,_));if(h=s.memoizedState,h!==null&&(b=h.dehydrated,b!==null))return Zw(s,i,_,f,b,h,a);if(g){g=f.fallback,_=i.mode,h=s.child,b=h.sibling;var C={mode:"hidden",children:f.children};return(_&1)===0&&i.child!==h?(f=i.child,f.childLanes=0,f.pendingProps=C,i.deletions=null):(f=Qn(h,C),f.subtreeFlags=h.subtreeFlags&14680064),b!==null?g=Qn(b,g):(g=xr(g,_,a,null),g.flags|=2),g.return=i,f.return=i,f.sibling=g,i.child=f,f=g,g=i.child,_=s.child.memoizedState,_=_===null?Uc(a):{baseLanes:_.baseLanes|a,cachePool:null,transitions:_.transitions},g.memoizedState=_,g.childLanes=s.childLanes&~a,i.memoizedState=zc,f}return g=s.child,s=g.sibling,f=Qn(g,{mode:"visible",children:f.children}),(i.mode&1)===0&&(f.lanes=a),f.return=i,f.sibling=null,s!==null&&(a=i.deletions,a===null?(i.deletions=[s],i.flags|=16):a.push(s)),i.child=f,i.memoizedState=null,f}function Hc(s,i){return i=dl({mode:"visible",children:i},s.mode,0,null),i.return=s,s.child=i}function Zo(s,i,a,f){return f!==null&&mc(f),ns(i,s.child,null,a),s=Hc(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function Zw(s,i,a,f,h,g,_){if(a)return i.flags&256?(i.flags&=-257,f=$c(Error(n(422))),Zo(s,i,_,f)):i.memoizedState!==null?(i.child=s.child,i.flags|=128,null):(g=f.fallback,h=i.mode,f=dl({mode:"visible",children:f.children},h,0,null),g=xr(g,h,_,null),g.flags|=2,f.return=i,g.return=i,f.sibling=g,i.child=f,(i.mode&1)!==0&&ns(i,s.child,null,_),i.child.memoizedState=Uc(_),i.memoizedState=zc,g);if((i.mode&1)===0)return Zo(s,i,_,null);if(h.data==="$!"){if(f=h.nextSibling&&h.nextSibling.dataset,f)var b=f.dgst;return f=b,g=Error(n(419)),f=$c(g,f,void 0),Zo(s,i,_,f)}if(b=(_&s.childLanes)!==0,vt||b){if(f=Je,f!==null){switch(_&-_){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(f.suspendedLanes|_))!==0?0:h,h!==0&&h!==g.retryLane&&(g.retryLane=h,vn(s,h),Zt(f,s,h,-1))}return iu(),f=$c(Error(n(421))),Zo(s,i,_,f)}return h.data==="$?"?(i.flags|=128,i.child=s.child,i=d0.bind(null,s),h._reactRetry=i,null):(s=g.treeContext,At=Dn(h.nextSibling),Nt=i,Ie=!0,Qt=null,s!==null&&(Pt[Ot++]=mn,Pt[Ot++]=yn,Pt[Ot++]=dr,mn=s.id,yn=s.overflow,dr=i),i=Hc(i,f.children),i.flags|=4096,i)}function ep(s,i,a){s.lanes|=i;var f=s.alternate;f!==null&&(f.lanes|=i),Sc(s.return,i,a)}function qc(s,i,a,f,h){var g=s.memoizedState;g===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:h}:(g.isBackwards=i,g.rendering=null,g.renderingStartTime=0,g.last=f,g.tail=a,g.tailMode=h)}function tp(s,i,a){var f=i.pendingProps,h=f.revealOrder,g=f.tail;if(ut(s,i,f.children,a),f=Pe.current,(f&2)!==0)f=f&1|2,i.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&ep(s,a,i);else if(s.tag===19)ep(s,a,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}f&=1}if(Ce(Pe,f),(i.mode&1)===0)i.memoizedState=null;else switch(h){case"forwards":for(a=i.child,h=null;a!==null;)s=a.alternate,s!==null&&Wo(s)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),qc(i,!1,h,a,g);break;case"backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(s=h.alternate,s!==null&&Wo(s)===null){i.child=h;break}s=h.sibling,h.sibling=a,a=h,h=s}qc(i,!0,a,null,g);break;case"together":qc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function el(s,i){(i.mode&1)===0&&s!==null&&(s.alternate=null,i.alternate=null,i.flags|=2)}function Sn(s,i,a){if(s!==null&&(i.dependencies=s.dependencies),yr|=i.lanes,(a&i.childLanes)===0)return null;if(s!==null&&i.child!==s.child)throw Error(n(153));if(i.child!==null){for(s=i.child,a=Qn(s,s.pendingProps),i.child=a,a.return=i;s.sibling!==null;)s=s.sibling,a=a.sibling=Qn(s,s.pendingProps),a.return=i;a.sibling=null}return i.child}function e0(s,i,a){switch(i.tag){case 3:Xh(i),ts();break;case 5:gh(i);break;case 1:yt(i.type)&&Ro(i);break;case 4:Ec(i,i.stateNode.containerInfo);break;case 10:var f=i.type._context,h=i.memoizedProps.value;Ce(Uo,f._currentValue),f._currentValue=h;break;case 13:if(f=i.memoizedState,f!==null)return f.dehydrated!==null?(Ce(Pe,Pe.current&1),i.flags|=128,null):(a&i.child.childLanes)!==0?Zh(s,i,a):(Ce(Pe,Pe.current&1),s=Sn(s,i,a),s!==null?s.sibling:null);Ce(Pe,Pe.current&1);break;case 19:if(f=(a&i.childLanes)!==0,(s.flags&128)!==0){if(f)return tp(s,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ce(Pe,Pe.current),f)break;return null;case 22:case 23:return i.lanes=0,Gh(s,i,a)}return Sn(s,i,a)}var np,Vc,rp,sp;np=function(s,i){for(var a=i.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Vc=function(){},rp=function(s,i,a,f){var h=s.memoizedProps;if(h!==f){s=i.stateNode,gr(ln.current);var g=null;switch(a){case"input":h=sr(s,h),f=sr(s,f),g=[];break;case"select":h=J({},h,{value:void 0}),f=J({},f,{value:void 0}),g=[];break;case"textarea":h=Br(s,h),f=Br(s,f),g=[];break;default:typeof h.onClick!="function"&&typeof f.onClick=="function"&&(s.onclick=jo)}ba(a,f);var _;a=null;for(R in h)if(!f.hasOwnProperty(R)&&h.hasOwnProperty(R)&&h[R]!=null)if(R==="style"){var b=h[R];for(_ in b)b.hasOwnProperty(_)&&(a||(a={}),a[_]="")}else R!=="dangerouslySetInnerHTML"&&R!=="children"&&R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(o.hasOwnProperty(R)?g||(g=[]):(g=g||[]).push(R,null));for(R in f){var C=f[R];if(b=h!=null?h[R]:void 0,f.hasOwnProperty(R)&&C!==b&&(C!=null||b!=null))if(R==="style")if(b){for(_ in b)!b.hasOwnProperty(_)||C&&C.hasOwnProperty(_)||(a||(a={}),a[_]="");for(_ in C)C.hasOwnProperty(_)&&b[_]!==C[_]&&(a||(a={}),a[_]=C[_])}else a||(g||(g=[]),g.push(R,a)),a=C;else R==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,b=b?b.__html:void 0,C!=null&&b!==C&&(g=g||[]).push(R,C)):R==="children"?typeof C!="string"&&typeof C!="number"||(g=g||[]).push(R,""+C):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&(o.hasOwnProperty(R)?(C!=null&&R==="onScroll"&&Ae("scroll",s),g||b===C||(g=[])):(g=g||[]).push(R,C))}a&&(g=g||[]).push("style",a);var R=g;(i.updateQueue=R)&&(i.flags|=4)}},sp=function(s,i,a,f){a!==f&&(i.flags|=4)};function wi(s,i){if(!Ie)switch(s.tailMode){case"hidden":i=s.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?s.tail=null:a.sibling=null;break;case"collapsed":a=s.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function ot(s){var i=s.alternate!==null&&s.alternate.child===s.child,a=0,f=0;if(i)for(var h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags&14680064,f|=h.flags&14680064,h.return=s,h=h.sibling;else for(h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags,f|=h.flags,h.return=s,h=h.sibling;return s.subtreeFlags|=f,s.childLanes=a,i}function t0(s,i,a){var f=i.pendingProps;switch(hc(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(i),null;case 1:return yt(i.type)&&Oo(),ot(i),null;case 3:return f=i.stateNode,is(),Le(mt),Le(st),Tc(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&(Fo(i)?i.flags|=4:s===null||s.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Qt!==null&&(nu(Qt),Qt=null))),Vc(s,i),ot(i),null;case 5:kc(i);var h=gr(pi.current);if(a=i.type,s!==null&&i.stateNode!=null)rp(s,i,a,f,h),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!f){if(i.stateNode===null)throw Error(n(166));return ot(i),null}if(s=gr(ln.current),Fo(i)){f=i.stateNode,a=i.type;var g=i.memoizedProps;switch(f[on]=i,f[ci]=g,s=(i.mode&1)!==0,a){case"dialog":Ae("cancel",f),Ae("close",f);break;case"iframe":case"object":case"embed":Ae("load",f);break;case"video":case"audio":for(h=0;h<oi.length;h++)Ae(oi[h],f);break;case"source":Ae("error",f);break;case"img":case"image":case"link":Ae("error",f),Ae("load",f);break;case"details":Ae("toggle",f);break;case"input":Fs(f,g),Ae("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!g.multiple},Ae("invalid",f);break;case"textarea":Fr(f,g),Ae("invalid",f)}ba(a,g),h=null;for(var _ in g)if(g.hasOwnProperty(_)){var b=g[_];_==="children"?typeof b=="string"?f.textContent!==b&&(g.suppressHydrationWarning!==!0&&Mo(f.textContent,b,s),h=["children",b]):typeof b=="number"&&f.textContent!==""+b&&(g.suppressHydrationWarning!==!0&&Mo(f.textContent,b,s),h=["children",""+b]):o.hasOwnProperty(_)&&b!=null&&_==="onScroll"&&Ae("scroll",f)}switch(a){case"input":rr(f),oo(f,g,!0);break;case"textarea":rr(f),ao(f);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(f.onclick=jo)}f=h,i.updateQueue=f,f!==null&&(i.flags|=4)}else{_=h.nodeType===9?h:h.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=co(a)),s==="http://www.w3.org/1999/xhtml"?a==="script"?(s=_.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof f.is=="string"?s=_.createElement(a,{is:f.is}):(s=_.createElement(a),a==="select"&&(_=s,f.multiple?_.multiple=!0:f.size&&(_.size=f.size))):s=_.createElementNS(s,a),s[on]=i,s[ci]=f,np(s,i,!1,!1),i.stateNode=s;e:{switch(_=Ta(a,f),a){case"dialog":Ae("cancel",s),Ae("close",s),h=f;break;case"iframe":case"object":case"embed":Ae("load",s),h=f;break;case"video":case"audio":for(h=0;h<oi.length;h++)Ae(oi[h],s);h=f;break;case"source":Ae("error",s),h=f;break;case"img":case"image":case"link":Ae("error",s),Ae("load",s),h=f;break;case"details":Ae("toggle",s),h=f;break;case"input":Fs(s,f),h=sr(s,f),Ae("invalid",s);break;case"option":h=f;break;case"select":s._wrapperState={wasMultiple:!!f.multiple},h=J({},f,{value:void 0}),Ae("invalid",s);break;case"textarea":Fr(s,f),h=Br(s,f),Ae("invalid",s);break;default:h=f}ba(a,h),b=h;for(g in b)if(b.hasOwnProperty(g)){var C=b[g];g==="style"?Vt(s,C):g==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,C!=null&&or(s,C)):g==="children"?typeof C=="string"?(a!=="textarea"||C!=="")&&lr(s,C):typeof C=="number"&&lr(s,""+C):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(o.hasOwnProperty(g)?C!=null&&g==="onScroll"&&Ae("scroll",s):C!=null&&F(s,g,C,_))}switch(a){case"input":rr(s),oo(s,f,!1);break;case"textarea":rr(s),ao(s);break;case"option":f.value!=null&&s.setAttribute("value",""+_e(f.value));break;case"select":s.multiple=!!f.multiple,g=f.value,g!=null?Ln(s,!!f.multiple,g,!1):f.defaultValue!=null&&Ln(s,!!f.multiple,f.defaultValue,!0);break;default:typeof h.onClick=="function"&&(s.onclick=jo)}switch(a){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return ot(i),null;case 6:if(s&&i.stateNode!=null)sp(s,i,s.memoizedProps,f);else{if(typeof f!="string"&&i.stateNode===null)throw Error(n(166));if(a=gr(pi.current),gr(ln.current),Fo(i)){if(f=i.stateNode,a=i.memoizedProps,f[on]=i,(g=f.nodeValue!==a)&&(s=Nt,s!==null))switch(s.tag){case 3:Mo(f.nodeValue,a,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Mo(f.nodeValue,a,(s.mode&1)!==0)}g&&(i.flags|=4)}else f=(a.nodeType===9?a:a.ownerDocument).createTextNode(f),f[on]=i,i.stateNode=f}return ot(i),null;case 13:if(Le(Pe),f=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Ie&&At!==null&&(i.mode&1)!==0&&(i.flags&128)===0)lh(),ts(),i.flags|=98560,g=!1;else if(g=Fo(i),f!==null&&f.dehydrated!==null){if(s===null){if(!g)throw Error(n(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[on]=i}else ts(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),g=!1}else Qt!==null&&(nu(Qt),Qt=null),g=!0;if(!g)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=a,i):(f=f!==null,f!==(s!==null&&s.memoizedState!==null)&&f&&(i.child.flags|=8192,(i.mode&1)!==0&&(s===null||(Pe.current&1)!==0?Ke===0&&(Ke=3):iu())),i.updateQueue!==null&&(i.flags|=4),ot(i),null);case 4:return is(),Vc(s,i),s===null&&li(i.stateNode.containerInfo),ot(i),null;case 10:return wc(i.type._context),ot(i),null;case 17:return yt(i.type)&&Oo(),ot(i),null;case 19:if(Le(Pe),g=i.memoizedState,g===null)return ot(i),null;if(f=(i.flags&128)!==0,_=g.rendering,_===null)if(f)wi(g,!1);else{if(Ke!==0||s!==null&&(s.flags&128)!==0)for(s=i.child;s!==null;){if(_=Wo(s),_!==null){for(i.flags|=128,wi(g,!1),f=_.updateQueue,f!==null&&(i.updateQueue=f,i.flags|=4),i.subtreeFlags=0,f=a,a=i.child;a!==null;)g=a,s=f,g.flags&=14680066,_=g.alternate,_===null?(g.childLanes=0,g.lanes=s,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=_.childLanes,g.lanes=_.lanes,g.child=_.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=_.memoizedProps,g.memoizedState=_.memoizedState,g.updateQueue=_.updateQueue,g.type=_.type,s=_.dependencies,g.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a=a.sibling;return Ce(Pe,Pe.current&1|2),i.child}s=s.sibling}g.tail!==null&&Fe()>cs&&(i.flags|=128,f=!0,wi(g,!1),i.lanes=4194304)}else{if(!f)if(s=Wo(_),s!==null){if(i.flags|=128,f=!0,a=s.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),wi(g,!0),g.tail===null&&g.tailMode==="hidden"&&!_.alternate&&!Ie)return ot(i),null}else 2*Fe()-g.renderingStartTime>cs&&a!==1073741824&&(i.flags|=128,f=!0,wi(g,!1),i.lanes=4194304);g.isBackwards?(_.sibling=i.child,i.child=_):(a=g.last,a!==null?a.sibling=_:i.child=_,g.last=_)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=Fe(),i.sibling=null,a=Pe.current,Ce(Pe,f?a&1|2:a&1),i):(ot(i),null);case 22:case 23:return su(),f=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==f&&(i.flags|=8192),f&&(i.mode&1)!==0?(Lt&1073741824)!==0&&(ot(i),i.subtreeFlags&6&&(i.flags|=8192)):ot(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function n0(s,i){switch(hc(i),i.tag){case 1:return yt(i.type)&&Oo(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return is(),Le(mt),Le(st),Tc(),s=i.flags,(s&65536)!==0&&(s&128)===0?(i.flags=s&-65537|128,i):null;case 5:return kc(i),null;case 13:if(Le(Pe),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(n(340));ts()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return Le(Pe),null;case 4:return is(),null;case 10:return wc(i.type._context),null;case 22:case 23:return su(),null;case 24:return null;default:return null}}var tl=!1,lt=!1,r0=typeof WeakSet=="function"?WeakSet:Set,Y=null;function ls(s,i){var a=s.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(f){Be(s,i,f)}else a.current=null}function Wc(s,i,a){try{a()}catch(f){Be(s,i,f)}}var ip=!1;function s0(s,i){if(sc=xo,s=$d(),Ja(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var h=f.anchorOffset,g=f.focusNode;f=f.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var _=0,b=-1,C=-1,R=0,V=0,W=s,q=null;t:for(;;){for(var X;W!==a||h!==0&&W.nodeType!==3||(b=_+h),W!==g||f!==0&&W.nodeType!==3||(C=_+f),W.nodeType===3&&(_+=W.nodeValue.length),(X=W.firstChild)!==null;)q=W,W=X;for(;;){if(W===s)break t;if(q===a&&++R===h&&(b=_),q===g&&++V===f&&(C=_),(X=W.nextSibling)!==null)break;W=q,q=W.parentNode}W=X}a=b===-1||C===-1?null:{start:b,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(ic={focusedElem:s,selectionRange:a},xo=!1,Y=i;Y!==null;)if(i=Y,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,Y=s;else for(;Y!==null;){i=Y;try{var ee=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var te=ee.memoizedProps,ze=ee.memoizedState,j=i.stateNode,A=j.getSnapshotBeforeUpdate(i.elementType===i.type?te:Jt(i.type,te),ze);j.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var P=i.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(K){Be(i,i.return,K)}if(s=i.sibling,s!==null){s.return=i.return,Y=s;break}Y=i.return}return ee=ip,ip=!1,ee}function Si(s,i,a){var f=i.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var h=f=f.next;do{if((h.tag&s)===s){var g=h.destroy;h.destroy=void 0,g!==void 0&&Wc(i,a,g)}h=h.next}while(h!==f)}}function nl(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&s)===s){var f=a.create;a.destroy=f()}a=a.next}while(a!==i)}}function Kc(s){var i=s.ref;if(i!==null){var a=s.stateNode;switch(s.tag){case 5:s=a;break;default:s=a}typeof i=="function"?i(s):i.current=s}}function op(s){var i=s.alternate;i!==null&&(s.alternate=null,op(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[on],delete i[ci],delete i[cc],delete i[Fw],delete i[zw])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function lp(s){return s.tag===5||s.tag===3||s.tag===4}function ap(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||lp(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Gc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(s,i):a.insertBefore(s,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(s,a)):(i=a,i.appendChild(s)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=jo));else if(f!==4&&(s=s.child,s!==null))for(Gc(s,i,a),s=s.sibling;s!==null;)Gc(s,i,a),s=s.sibling}function Qc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.insertBefore(s,i):a.appendChild(s);else if(f!==4&&(s=s.child,s!==null))for(Qc(s,i,a),s=s.sibling;s!==null;)Qc(s,i,a),s=s.sibling}var Ze=null,Xt=!1;function qn(s,i,a){for(a=a.child;a!==null;)cp(s,i,a),a=a.sibling}function cp(s,i,a){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(go,a)}catch{}switch(a.tag){case 5:lt||ls(a,i);case 6:var f=Ze,h=Xt;Ze=null,qn(s,i,a),Ze=f,Xt=h,Ze!==null&&(Xt?(s=Ze,a=a.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):Ze.removeChild(a.stateNode));break;case 18:Ze!==null&&(Xt?(s=Ze,a=a.stateNode,s.nodeType===8?ac(s.parentNode,a):s.nodeType===1&&ac(s,a),Ys(s)):ac(Ze,a.stateNode));break;case 4:f=Ze,h=Xt,Ze=a.stateNode.containerInfo,Xt=!0,qn(s,i,a),Ze=f,Xt=h;break;case 0:case 11:case 14:case 15:if(!lt&&(f=a.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){h=f=f.next;do{var g=h,_=g.destroy;g=g.tag,_!==void 0&&((g&2)!==0||(g&4)!==0)&&Wc(a,i,_),h=h.next}while(h!==f)}qn(s,i,a);break;case 1:if(!lt&&(ls(a,i),f=a.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=a.memoizedProps,f.state=a.memoizedState,f.componentWillUnmount()}catch(b){Be(a,i,b)}qn(s,i,a);break;case 21:qn(s,i,a);break;case 22:a.mode&1?(lt=(f=lt)||a.memoizedState!==null,qn(s,i,a),lt=f):qn(s,i,a);break;default:qn(s,i,a)}}function up(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var a=s.stateNode;a===null&&(a=s.stateNode=new r0),i.forEach(function(f){var h=h0.bind(null,s,f);a.has(f)||(a.add(f),f.then(h,h))})}}function Yt(s,i){var a=i.deletions;if(a!==null)for(var f=0;f<a.length;f++){var h=a[f];try{var g=s,_=i,b=_;e:for(;b!==null;){switch(b.tag){case 5:Ze=b.stateNode,Xt=!1;break e;case 3:Ze=b.stateNode.containerInfo,Xt=!0;break e;case 4:Ze=b.stateNode.containerInfo,Xt=!0;break e}b=b.return}if(Ze===null)throw Error(n(160));cp(g,_,h),Ze=null,Xt=!1;var C=h.alternate;C!==null&&(C.return=null),h.return=null}catch(R){Be(h,i,R)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)fp(i,s),i=i.sibling}function fp(s,i){var a=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Yt(i,s),cn(s),f&4){try{Si(3,s,s.return),nl(3,s)}catch(te){Be(s,s.return,te)}try{Si(5,s,s.return)}catch(te){Be(s,s.return,te)}}break;case 1:Yt(i,s),cn(s),f&512&&a!==null&&ls(a,a.return);break;case 5:if(Yt(i,s),cn(s),f&512&&a!==null&&ls(a,a.return),s.flags&32){var h=s.stateNode;try{lr(h,"")}catch(te){Be(s,s.return,te)}}if(f&4&&(h=s.stateNode,h!=null)){var g=s.memoizedProps,_=a!==null?a.memoizedProps:g,b=s.type,C=s.updateQueue;if(s.updateQueue=null,C!==null)try{b==="input"&&g.type==="radio"&&g.name!=null&&zs(h,g),Ta(b,_);var R=Ta(b,g);for(_=0;_<C.length;_+=2){var V=C[_],W=C[_+1];V==="style"?Vt(h,W):V==="dangerouslySetInnerHTML"?or(h,W):V==="children"?lr(h,W):F(h,V,W,R)}switch(b){case"input":rn(h,g);break;case"textarea":lo(h,g);break;case"select":var q=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!g.multiple;var X=g.value;X!=null?Ln(h,!!g.multiple,X,!1):q!==!!g.multiple&&(g.defaultValue!=null?Ln(h,!!g.multiple,g.defaultValue,!0):Ln(h,!!g.multiple,g.multiple?[]:"",!1))}h[ci]=g}catch(te){Be(s,s.return,te)}}break;case 6:if(Yt(i,s),cn(s),f&4){if(s.stateNode===null)throw Error(n(162));h=s.stateNode,g=s.memoizedProps;try{h.nodeValue=g}catch(te){Be(s,s.return,te)}}break;case 3:if(Yt(i,s),cn(s),f&4&&a!==null&&a.memoizedState.isDehydrated)try{Ys(i.containerInfo)}catch(te){Be(s,s.return,te)}break;case 4:Yt(i,s),cn(s);break;case 13:Yt(i,s),cn(s),h=s.child,h.flags&8192&&(g=h.memoizedState!==null,h.stateNode.isHidden=g,!g||h.alternate!==null&&h.alternate.memoizedState!==null||(Yc=Fe())),f&4&&up(s);break;case 22:if(V=a!==null&&a.memoizedState!==null,s.mode&1?(lt=(R=lt)||V,Yt(i,s),lt=R):Yt(i,s),cn(s),f&8192){if(R=s.memoizedState!==null,(s.stateNode.isHidden=R)&&!V&&(s.mode&1)!==0)for(Y=s,V=s.child;V!==null;){for(W=Y=V;Y!==null;){switch(q=Y,X=q.child,q.tag){case 0:case 11:case 14:case 15:Si(4,q,q.return);break;case 1:ls(q,q.return);var ee=q.stateNode;if(typeof ee.componentWillUnmount=="function"){f=q,a=q.return;try{i=f,ee.props=i.memoizedProps,ee.state=i.memoizedState,ee.componentWillUnmount()}catch(te){Be(f,a,te)}}break;case 5:ls(q,q.return);break;case 22:if(q.memoizedState!==null){pp(W);continue}}X!==null?(X.return=q,Y=X):pp(W)}V=V.sibling}e:for(V=null,W=s;;){if(W.tag===5){if(V===null){V=W;try{h=W.stateNode,R?(g=h.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(b=W.stateNode,C=W.memoizedProps.style,_=C!=null&&C.hasOwnProperty("display")?C.display:null,b.style.display=le("display",_))}catch(te){Be(s,s.return,te)}}}else if(W.tag===6){if(V===null)try{W.stateNode.nodeValue=R?"":W.memoizedProps}catch(te){Be(s,s.return,te)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===s)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===s)break e;for(;W.sibling===null;){if(W.return===null||W.return===s)break e;V===W&&(V=null),W=W.return}V===W&&(V=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Yt(i,s),cn(s),f&4&&up(s);break;case 21:break;default:Yt(i,s),cn(s)}}function cn(s){var i=s.flags;if(i&2){try{e:{for(var a=s.return;a!==null;){if(lp(a)){var f=a;break e}a=a.return}throw Error(n(160))}switch(f.tag){case 5:var h=f.stateNode;f.flags&32&&(lr(h,""),f.flags&=-33);var g=ap(s);Qc(s,g,h);break;case 3:case 4:var _=f.stateNode.containerInfo,b=ap(s);Gc(s,b,_);break;default:throw Error(n(161))}}catch(C){Be(s,s.return,C)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function i0(s,i,a){Y=s,dp(s)}function dp(s,i,a){for(var f=(s.mode&1)!==0;Y!==null;){var h=Y,g=h.child;if(h.tag===22&&f){var _=h.memoizedState!==null||tl;if(!_){var b=h.alternate,C=b!==null&&b.memoizedState!==null||lt;b=tl;var R=lt;if(tl=_,(lt=C)&&!R)for(Y=h;Y!==null;)_=Y,C=_.child,_.tag===22&&_.memoizedState!==null?gp(h):C!==null?(C.return=_,Y=C):gp(h);for(;g!==null;)Y=g,dp(g),g=g.sibling;Y=h,tl=b,lt=R}hp(s)}else(h.subtreeFlags&8772)!==0&&g!==null?(g.return=h,Y=g):hp(s)}}function hp(s){for(;Y!==null;){var i=Y;if((i.flags&8772)!==0){var a=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:lt||nl(5,i);break;case 1:var f=i.stateNode;if(i.flags&4&&!lt)if(a===null)f.componentDidMount();else{var h=i.elementType===i.type?a.memoizedProps:Jt(i.type,a.memoizedProps);f.componentDidUpdate(h,a.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var g=i.updateQueue;g!==null&&ph(i,g,f);break;case 3:var _=i.updateQueue;if(_!==null){if(a=null,i.child!==null)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}ph(i,_,a)}break;case 5:var b=i.stateNode;if(a===null&&i.flags&4){a=b;var C=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":C.autoFocus&&a.focus();break;case"img":C.src&&(a.src=C.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var R=i.alternate;if(R!==null){var V=R.memoizedState;if(V!==null){var W=V.dehydrated;W!==null&&Ys(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}lt||i.flags&512&&Kc(i)}catch(q){Be(i,i.return,q)}}if(i===s){Y=null;break}if(a=i.sibling,a!==null){a.return=i.return,Y=a;break}Y=i.return}}function pp(s){for(;Y!==null;){var i=Y;if(i===s){Y=null;break}var a=i.sibling;if(a!==null){a.return=i.return,Y=a;break}Y=i.return}}function gp(s){for(;Y!==null;){var i=Y;try{switch(i.tag){case 0:case 11:case 15:var a=i.return;try{nl(4,i)}catch(C){Be(i,a,C)}break;case 1:var f=i.stateNode;if(typeof f.componentDidMount=="function"){var h=i.return;try{f.componentDidMount()}catch(C){Be(i,h,C)}}var g=i.return;try{Kc(i)}catch(C){Be(i,g,C)}break;case 5:var _=i.return;try{Kc(i)}catch(C){Be(i,_,C)}}}catch(C){Be(i,i.return,C)}if(i===s){Y=null;break}var b=i.sibling;if(b!==null){b.return=i.return,Y=b;break}Y=i.return}}var o0=Math.ceil,rl=O.ReactCurrentDispatcher,Jc=O.ReactCurrentOwner,Dt=O.ReactCurrentBatchConfig,we=0,Je=null,qe=null,et=0,Lt=0,as=Bn(0),Ke=0,xi=null,yr=0,sl=0,Xc=0,_i=null,wt=null,Yc=0,cs=1/0,xn=null,il=!1,Zc=null,Vn=null,ol=!1,Wn=null,ll=0,Ei=0,eu=null,al=-1,cl=0;function ft(){return(we&6)!==0?Fe():al!==-1?al:al=Fe()}function Kn(s){return(s.mode&1)===0?1:(we&2)!==0&&et!==0?et&-et:Hw.transition!==null?(cl===0&&(cl=ad()),cl):(s=Ee,s!==0||(s=window.event,s=s===void 0?16:yd(s.type)),s)}function Zt(s,i,a,f){if(50<Ei)throw Ei=0,eu=null,Error(n(185));Ks(s,a,f),((we&2)===0||s!==Je)&&(s===Je&&((we&2)===0&&(sl|=a),Ke===4&&Gn(s,et)),St(s,f),a===1&&we===0&&(i.mode&1)===0&&(cs=Fe()+500,$o&&zn()))}function St(s,i){var a=s.callbackNode;Hv(s,i);var f=vo(s,s===Je?et:0);if(f===0)a!==null&&id(a),s.callbackNode=null,s.callbackPriority=0;else if(i=f&-f,s.callbackPriority!==i){if(a!=null&&id(a),i===1)s.tag===0?Uw(yp.bind(null,s)):nh(yp.bind(null,s)),Dw(function(){(we&6)===0&&zn()}),a=null;else{switch(cd(f)){case 1:a=ja;break;case 4:a=od;break;case 16:a=po;break;case 536870912:a=ld;break;default:a=po}a=bp(a,mp.bind(null,s))}s.callbackPriority=i,s.callbackNode=a}}function mp(s,i){if(al=-1,cl=0,(we&6)!==0)throw Error(n(327));var a=s.callbackNode;if(us()&&s.callbackNode!==a)return null;var f=vo(s,s===Je?et:0);if(f===0)return null;if((f&30)!==0||(f&s.expiredLanes)!==0||i)i=ul(s,f);else{i=f;var h=we;we|=2;var g=wp();(Je!==s||et!==i)&&(xn=null,cs=Fe()+500,wr(s,i));do try{c0();break}catch(b){vp(s,b)}while(!0);vc(),rl.current=g,we=h,qe!==null?i=0:(Je=null,et=0,i=Ke)}if(i!==0){if(i===2&&(h=Pa(s),h!==0&&(f=h,i=tu(s,h))),i===1)throw a=xi,wr(s,0),Gn(s,f),St(s,Fe()),a;if(i===6)Gn(s,f);else{if(h=s.current.alternate,(f&30)===0&&!l0(h)&&(i=ul(s,f),i===2&&(g=Pa(s),g!==0&&(f=g,i=tu(s,g))),i===1))throw a=xi,wr(s,0),Gn(s,f),St(s,Fe()),a;switch(s.finishedWork=h,s.finishedLanes=f,i){case 0:case 1:throw Error(n(345));case 2:Sr(s,wt,xn);break;case 3:if(Gn(s,f),(f&130023424)===f&&(i=Yc+500-Fe(),10<i)){if(vo(s,0)!==0)break;if(h=s.suspendedLanes,(h&f)!==f){ft(),s.pingedLanes|=s.suspendedLanes&h;break}s.timeoutHandle=lc(Sr.bind(null,s,wt,xn),i);break}Sr(s,wt,xn);break;case 4:if(Gn(s,f),(f&4194240)===f)break;for(i=s.eventTimes,h=-1;0<f;){var _=31-Kt(f);g=1<<_,_=i[_],_>h&&(h=_),f&=~g}if(f=h,f=Fe()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*o0(f/1960))-f,10<f){s.timeoutHandle=lc(Sr.bind(null,s,wt,xn),f);break}Sr(s,wt,xn);break;case 5:Sr(s,wt,xn);break;default:throw Error(n(329))}}}return St(s,Fe()),s.callbackNode===a?mp.bind(null,s):null}function tu(s,i){var a=_i;return s.current.memoizedState.isDehydrated&&(wr(s,i).flags|=256),s=ul(s,i),s!==2&&(i=wt,wt=a,i!==null&&nu(i)),s}function nu(s){wt===null?wt=s:wt.push.apply(wt,s)}function l0(s){for(var i=s;;){if(i.flags&16384){var a=i.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var f=0;f<a.length;f++){var h=a[f],g=h.getSnapshot;h=h.value;try{if(!Gt(g(),h))return!1}catch{return!1}}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Gn(s,i){for(i&=~Xc,i&=~sl,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var a=31-Kt(i),f=1<<a;s[a]=-1,i&=~f}}function yp(s){if((we&6)!==0)throw Error(n(327));us();var i=vo(s,0);if((i&1)===0)return St(s,Fe()),null;var a=ul(s,i);if(s.tag!==0&&a===2){var f=Pa(s);f!==0&&(i=f,a=tu(s,f))}if(a===1)throw a=xi,wr(s,0),Gn(s,i),St(s,Fe()),a;if(a===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,Sr(s,wt,xn),St(s,Fe()),null}function ru(s,i){var a=we;we|=1;try{return s(i)}finally{we=a,we===0&&(cs=Fe()+500,$o&&zn())}}function vr(s){Wn!==null&&Wn.tag===0&&(we&6)===0&&us();var i=we;we|=1;var a=Dt.transition,f=Ee;try{if(Dt.transition=null,Ee=1,s)return s()}finally{Ee=f,Dt.transition=a,we=i,(we&6)===0&&zn()}}function su(){Lt=as.current,Le(as)}function wr(s,i){s.finishedWork=null,s.finishedLanes=0;var a=s.timeoutHandle;if(a!==-1&&(s.timeoutHandle=-1,$w(a)),qe!==null)for(a=qe.return;a!==null;){var f=a;switch(hc(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Oo();break;case 3:is(),Le(mt),Le(st),Tc();break;case 5:kc(f);break;case 4:is();break;case 13:Le(Pe);break;case 19:Le(Pe);break;case 10:wc(f.type._context);break;case 22:case 23:su()}a=a.return}if(Je=s,qe=s=Qn(s.current,null),et=Lt=i,Ke=0,xi=null,Xc=sl=yr=0,wt=_i=null,pr!==null){for(i=0;i<pr.length;i++)if(a=pr[i],f=a.interleaved,f!==null){a.interleaved=null;var h=f.next,g=a.pending;if(g!==null){var _=g.next;g.next=h,f.next=_}a.pending=f}pr=null}return s}function vp(s,i){do{var a=qe;try{if(vc(),Ko.current=Xo,Go){for(var f=Oe.memoizedState;f!==null;){var h=f.queue;h!==null&&(h.pending=null),f=f.next}Go=!1}if(mr=0,Qe=We=Oe=null,gi=!1,mi=0,Jc.current=null,a===null||a.return===null){Ke=1,xi=i,qe=null;break}e:{var g=s,_=a.return,b=a,C=i;if(i=et,b.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){var R=C,V=b,W=V.tag;if((V.mode&1)===0&&(W===0||W===11||W===15)){var q=V.alternate;q?(V.updateQueue=q.updateQueue,V.memoizedState=q.memoizedState,V.lanes=q.lanes):(V.updateQueue=null,V.memoizedState=null)}var X=Hh(_);if(X!==null){X.flags&=-257,qh(X,_,b,g,i),X.mode&1&&Uh(g,R,i),i=X,C=R;var ee=i.updateQueue;if(ee===null){var te=new Set;te.add(C),i.updateQueue=te}else ee.add(C);break e}else{if((i&1)===0){Uh(g,R,i),iu();break e}C=Error(n(426))}}else if(Ie&&b.mode&1){var ze=Hh(_);if(ze!==null){(ze.flags&65536)===0&&(ze.flags|=256),qh(ze,_,b,g,i),mc(os(C,b));break e}}g=C=os(C,b),Ke!==4&&(Ke=2),_i===null?_i=[g]:_i.push(g),g=_;do{switch(g.tag){case 3:g.flags|=65536,i&=-i,g.lanes|=i;var j=Fh(g,C,i);hh(g,j);break e;case 1:b=C;var A=g.type,P=g.stateNode;if((g.flags&128)===0&&(typeof A.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Vn===null||!Vn.has(P)))){g.flags|=65536,i&=-i,g.lanes|=i;var K=zh(g,b,i);hh(g,K);break e}}g=g.return}while(g!==null)}xp(a)}catch(ne){i=ne,qe===a&&a!==null&&(qe=a=a.return);continue}break}while(!0)}function wp(){var s=rl.current;return rl.current=Xo,s===null?Xo:s}function iu(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),Je===null||(yr&268435455)===0&&(sl&268435455)===0||Gn(Je,et)}function ul(s,i){var a=we;we|=2;var f=wp();(Je!==s||et!==i)&&(xn=null,wr(s,i));do try{a0();break}catch(h){vp(s,h)}while(!0);if(vc(),we=a,rl.current=f,qe!==null)throw Error(n(261));return Je=null,et=0,Ke}function a0(){for(;qe!==null;)Sp(qe)}function c0(){for(;qe!==null&&!Pv();)Sp(qe)}function Sp(s){var i=kp(s.alternate,s,Lt);s.memoizedProps=s.pendingProps,i===null?xp(s):qe=i,Jc.current=null}function xp(s){var i=s;do{var a=i.alternate;if(s=i.return,(i.flags&32768)===0){if(a=t0(a,i,Lt),a!==null){qe=a;return}}else{if(a=n0(a,i),a!==null){a.flags&=32767,qe=a;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Ke=6,qe=null;return}}if(i=i.sibling,i!==null){qe=i;return}qe=i=s}while(i!==null);Ke===0&&(Ke=5)}function Sr(s,i,a){var f=Ee,h=Dt.transition;try{Dt.transition=null,Ee=1,u0(s,i,a,f)}finally{Dt.transition=h,Ee=f}return null}function u0(s,i,a,f){do us();while(Wn!==null);if((we&6)!==0)throw Error(n(327));a=s.finishedWork;var h=s.finishedLanes;if(a===null)return null;if(s.finishedWork=null,s.finishedLanes=0,a===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var g=a.lanes|a.childLanes;if(qv(s,g),s===Je&&(qe=Je=null,et=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||ol||(ol=!0,bp(po,function(){return us(),null})),g=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||g){g=Dt.transition,Dt.transition=null;var _=Ee;Ee=1;var b=we;we|=4,Jc.current=null,s0(s,a),fp(a,s),Lw(ic),xo=!!sc,ic=sc=null,s.current=a,i0(a),Ov(),we=b,Ee=_,Dt.transition=g}else s.current=a;if(ol&&(ol=!1,Wn=s,ll=h),g=s.pendingLanes,g===0&&(Vn=null),Dv(a.stateNode),St(s,Fe()),i!==null)for(f=s.onRecoverableError,a=0;a<i.length;a++)h=i[a],f(h.value,{componentStack:h.stack,digest:h.digest});if(il)throw il=!1,s=Zc,Zc=null,s;return(ll&1)!==0&&s.tag!==0&&us(),g=s.pendingLanes,(g&1)!==0?s===eu?Ei++:(Ei=0,eu=s):Ei=0,zn(),null}function us(){if(Wn!==null){var s=cd(ll),i=Dt.transition,a=Ee;try{if(Dt.transition=null,Ee=16>s?16:s,Wn===null)var f=!1;else{if(s=Wn,Wn=null,ll=0,(we&6)!==0)throw Error(n(331));var h=we;for(we|=4,Y=s.current;Y!==null;){var g=Y,_=g.child;if((Y.flags&16)!==0){var b=g.deletions;if(b!==null){for(var C=0;C<b.length;C++){var R=b[C];for(Y=R;Y!==null;){var V=Y;switch(V.tag){case 0:case 11:case 15:Si(8,V,g)}var W=V.child;if(W!==null)W.return=V,Y=W;else for(;Y!==null;){V=Y;var q=V.sibling,X=V.return;if(op(V),V===R){Y=null;break}if(q!==null){q.return=X,Y=q;break}Y=X}}}var ee=g.alternate;if(ee!==null){var te=ee.child;if(te!==null){ee.child=null;do{var ze=te.sibling;te.sibling=null,te=ze}while(te!==null)}}Y=g}}if((g.subtreeFlags&2064)!==0&&_!==null)_.return=g,Y=_;else e:for(;Y!==null;){if(g=Y,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:Si(9,g,g.return)}var j=g.sibling;if(j!==null){j.return=g.return,Y=j;break e}Y=g.return}}var A=s.current;for(Y=A;Y!==null;){_=Y;var P=_.child;if((_.subtreeFlags&2064)!==0&&P!==null)P.return=_,Y=P;else e:for(_=A;Y!==null;){if(b=Y,(b.flags&2048)!==0)try{switch(b.tag){case 0:case 11:case 15:nl(9,b)}}catch(ne){Be(b,b.return,ne)}if(b===_){Y=null;break e}var K=b.sibling;if(K!==null){K.return=b.return,Y=K;break e}Y=b.return}}if(we=h,zn(),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(go,s)}catch{}f=!0}return f}finally{Ee=a,Dt.transition=i}}return!1}function _p(s,i,a){i=os(a,i),i=Fh(s,i,1),s=Hn(s,i,1),i=ft(),s!==null&&(Ks(s,1,i),St(s,i))}function Be(s,i,a){if(s.tag===3)_p(s,s,a);else for(;i!==null;){if(i.tag===3){_p(i,s,a);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Vn===null||!Vn.has(f))){s=os(a,s),s=zh(i,s,1),i=Hn(i,s,1),s=ft(),i!==null&&(Ks(i,1,s),St(i,s));break}}i=i.return}}function f0(s,i,a){var f=s.pingCache;f!==null&&f.delete(i),i=ft(),s.pingedLanes|=s.suspendedLanes&a,Je===s&&(et&a)===a&&(Ke===4||Ke===3&&(et&130023424)===et&&500>Fe()-Yc?wr(s,0):Xc|=a),St(s,i)}function Ep(s,i){i===0&&((s.mode&1)===0?i=1:(i=yo,yo<<=1,(yo&130023424)===0&&(yo=4194304)));var a=ft();s=vn(s,i),s!==null&&(Ks(s,i,a),St(s,a))}function d0(s){var i=s.memoizedState,a=0;i!==null&&(a=i.retryLane),Ep(s,a)}function h0(s,i){var a=0;switch(s.tag){case 13:var f=s.stateNode,h=s.memoizedState;h!==null&&(a=h.retryLane);break;case 19:f=s.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(i),Ep(s,a)}var kp;kp=function(s,i,a){if(s!==null)if(s.memoizedProps!==i.pendingProps||mt.current)vt=!0;else{if((s.lanes&a)===0&&(i.flags&128)===0)return vt=!1,e0(s,i,a);vt=(s.flags&131072)!==0}else vt=!1,Ie&&(i.flags&1048576)!==0&&rh(i,Bo,i.index);switch(i.lanes=0,i.tag){case 2:var f=i.type;el(s,i),s=i.pendingProps;var h=Yr(i,st.current);ss(i,a),h=Ac(null,i,f,s,h,a);var g=Lc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,yt(f)?(g=!0,Ro(i)):g=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,_c(i),h.updater=Yo,i.stateNode=h,h._reactInternals=i,Rc(i,f,s,a),i=Fc(null,i,f,!0,g,a)):(i.tag=0,Ie&&g&&dc(i),ut(null,i,h,a),i=i.child),i;case 16:f=i.elementType;e:{switch(el(s,i),s=i.pendingProps,h=f._init,f=h(f._payload),i.type=f,h=i.tag=g0(f),s=Jt(f,s),h){case 0:i=Bc(null,i,f,s,a);break e;case 1:i=Jh(null,i,f,s,a);break e;case 11:i=Vh(null,i,f,s,a);break e;case 14:i=Wh(null,i,f,Jt(f.type,s),a);break e}throw Error(n(306,f,""))}return i;case 0:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Bc(s,i,f,h,a);case 1:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Jh(s,i,f,h,a);case 3:e:{if(Xh(i),s===null)throw Error(n(387));f=i.pendingProps,g=i.memoizedState,h=g.element,dh(s,i),Vo(i,f,null,a);var _=i.memoizedState;if(f=_.element,g.isDehydrated)if(g={element:f,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){h=os(Error(n(423)),i),i=Yh(s,i,f,a,h);break e}else if(f!==h){h=os(Error(n(424)),i),i=Yh(s,i,f,a,h);break e}else for(At=Dn(i.stateNode.containerInfo.firstChild),Nt=i,Ie=!0,Qt=null,a=uh(i,null,f,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ts(),f===h){i=Sn(s,i,a);break e}ut(s,i,f,a)}i=i.child}return i;case 5:return gh(i),s===null&&gc(i),f=i.type,h=i.pendingProps,g=s!==null?s.memoizedProps:null,_=h.children,oc(f,h)?_=null:g!==null&&oc(f,g)&&(i.flags|=32),Qh(s,i),ut(s,i,_,a),i.child;case 6:return s===null&&gc(i),null;case 13:return Zh(s,i,a);case 4:return Ec(i,i.stateNode.containerInfo),f=i.pendingProps,s===null?i.child=ns(i,null,f,a):ut(s,i,f,a),i.child;case 11:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Vh(s,i,f,h,a);case 7:return ut(s,i,i.pendingProps,a),i.child;case 8:return ut(s,i,i.pendingProps.children,a),i.child;case 12:return ut(s,i,i.pendingProps.children,a),i.child;case 10:e:{if(f=i.type._context,h=i.pendingProps,g=i.memoizedProps,_=h.value,Ce(Uo,f._currentValue),f._currentValue=_,g!==null)if(Gt(g.value,_)){if(g.children===h.children&&!mt.current){i=Sn(s,i,a);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var b=g.dependencies;if(b!==null){_=g.child;for(var C=b.firstContext;C!==null;){if(C.context===f){if(g.tag===1){C=wn(-1,a&-a),C.tag=2;var R=g.updateQueue;if(R!==null){R=R.shared;var V=R.pending;V===null?C.next=C:(C.next=V.next,V.next=C),R.pending=C}}g.lanes|=a,C=g.alternate,C!==null&&(C.lanes|=a),Sc(g.return,a,i),b.lanes|=a;break}C=C.next}}else if(g.tag===10)_=g.type===i.type?null:g.child;else if(g.tag===18){if(_=g.return,_===null)throw Error(n(341));_.lanes|=a,b=_.alternate,b!==null&&(b.lanes|=a),Sc(_,a,i),_=g.sibling}else _=g.child;if(_!==null)_.return=g;else for(_=g;_!==null;){if(_===i){_=null;break}if(g=_.sibling,g!==null){g.return=_.return,_=g;break}_=_.return}g=_}ut(s,i,h.children,a),i=i.child}return i;case 9:return h=i.type,f=i.pendingProps.children,ss(i,a),h=Rt(h),f=f(h),i.flags|=1,ut(s,i,f,a),i.child;case 14:return f=i.type,h=Jt(f,i.pendingProps),h=Jt(f.type,h),Wh(s,i,f,h,a);case 15:return Kh(s,i,i.type,i.pendingProps,a);case 17:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),el(s,i),i.tag=1,yt(f)?(s=!0,Ro(i)):s=!1,ss(i,a),Dh(i,f,h),Rc(i,f,h,a),Fc(null,i,f,!0,s,a);case 19:return tp(s,i,a);case 22:return Gh(s,i,a)}throw Error(n(156,i.tag))};function bp(s,i){return sd(s,i)}function p0(s,i,a,f){this.tag=s,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(s,i,a,f){return new p0(s,i,a,f)}function ou(s){return s=s.prototype,!(!s||!s.isReactComponent)}function g0(s){if(typeof s=="function")return ou(s)?1:0;if(s!=null){if(s=s.$$typeof,s===M)return 11;if(s===xe)return 14}return 2}function Qn(s,i){var a=s.alternate;return a===null?(a=Bt(s.tag,i,s.key,s.mode),a.elementType=s.elementType,a.type=s.type,a.stateNode=s.stateNode,a.alternate=s,s.alternate=a):(a.pendingProps=i,a.type=s.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=s.flags&14680064,a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,i=s.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=s.sibling,a.index=s.index,a.ref=s.ref,a}function fl(s,i,a,f,h,g){var _=2;if(f=s,typeof s=="function")ou(s)&&(_=1);else if(typeof s=="string")_=5;else e:switch(s){case G:return xr(a.children,h,g,i);case B:_=8,h|=8;break;case I:return s=Bt(12,a,i,h|2),s.elementType=I,s.lanes=g,s;case H:return s=Bt(13,a,i,h),s.elementType=H,s.lanes=g,s;case fe:return s=Bt(19,a,i,h),s.elementType=fe,s.lanes=g,s;case me:return dl(a,h,g,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Z:_=10;break e;case oe:_=9;break e;case M:_=11;break e;case xe:_=14;break e;case pe:_=16,f=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return i=Bt(_,a,i,h),i.elementType=s,i.type=f,i.lanes=g,i}function xr(s,i,a,f){return s=Bt(7,s,f,i),s.lanes=a,s}function dl(s,i,a,f){return s=Bt(22,s,f,i),s.elementType=me,s.lanes=a,s.stateNode={isHidden:!1},s}function lu(s,i,a){return s=Bt(6,s,null,i),s.lanes=a,s}function au(s,i,a){return i=Bt(4,s.children!==null?s.children:[],s.key,i),i.lanes=a,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function m0(s,i,a,f,h){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Oa(0),this.expirationTimes=Oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oa(0),this.identifierPrefix=f,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function cu(s,i,a,f,h,g,_,b,C){return s=new m0(s,i,a,b,C),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Bt(3,null,null,i),s.current=g,g.stateNode=s,g.memoizedState={element:f,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},_c(g),s}function y0(s,i,a){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:f==null?null:""+f,children:s,containerInfo:i,implementation:a}}function Tp(s){if(!s)return Fn;s=s._reactInternals;e:{if(cr(s)!==s||s.tag!==1)throw Error(n(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(yt(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(s.tag===1){var a=s.type;if(yt(a))return eh(s,a,i)}return i}function Cp(s,i,a,f,h,g,_,b,C){return s=cu(a,f,!0,s,h,g,_,b,C),s.context=Tp(null),a=s.current,f=ft(),h=Kn(a),g=wn(f,h),g.callback=i??null,Hn(a,g,h),s.current.lanes=h,Ks(s,h,f),St(s,f),s}function hl(s,i,a,f){var h=i.current,g=ft(),_=Kn(h);return a=Tp(a),i.context===null?i.context=a:i.pendingContext=a,i=wn(g,_),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Hn(h,i,_),s!==null&&(Zt(s,h,_,g),qo(s,h,_)),_}function pl(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Np(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var a=s.retryLane;s.retryLane=a!==0&&a<i?a:i}}function uu(s,i){Np(s,i),(s=s.alternate)&&Np(s,i)}function v0(){return null}var Ap=typeof reportError=="function"?reportError:function(s){console.error(s)};function fu(s){this._internalRoot=s}gl.prototype.render=fu.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(n(409));hl(s,i,null,null)},gl.prototype.unmount=fu.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;vr(function(){hl(null,s,null,null)}),i[pn]=null}};function gl(s){this._internalRoot=s}gl.prototype.unstable_scheduleHydration=function(s){if(s){var i=dd();s={blockedOn:null,target:s,priority:i};for(var a=0;a<On.length&&i!==0&&i<On[a].priority;a++);On.splice(a,0,s),a===0&&gd(s)}};function du(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function ml(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Lp(){}function w0(s,i,a,f,h){if(h){if(typeof f=="function"){var g=f;f=function(){var R=pl(_);g.call(R)}}var _=Cp(i,f,s,0,null,!1,!1,"",Lp);return s._reactRootContainer=_,s[pn]=_.current,li(s.nodeType===8?s.parentNode:s),vr(),_}for(;h=s.lastChild;)s.removeChild(h);if(typeof f=="function"){var b=f;f=function(){var R=pl(C);b.call(R)}}var C=cu(s,0,!1,null,null,!1,!1,"",Lp);return s._reactRootContainer=C,s[pn]=C.current,li(s.nodeType===8?s.parentNode:s),vr(function(){hl(i,C,a,f)}),C}function yl(s,i,a,f,h){var g=a._reactRootContainer;if(g){var _=g;if(typeof h=="function"){var b=h;h=function(){var C=pl(_);b.call(C)}}hl(i,_,s,h)}else _=w0(a,i,s,h,f);return pl(_)}ud=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var a=Ws(i.pendingLanes);a!==0&&(Ra(i,a|1),St(i,Fe()),(we&6)===0&&(cs=Fe()+500,zn()))}break;case 13:vr(function(){var f=vn(s,1);if(f!==null){var h=ft();Zt(f,s,1,h)}}),uu(s,1)}},$a=function(s){if(s.tag===13){var i=vn(s,134217728);if(i!==null){var a=ft();Zt(i,s,134217728,a)}uu(s,134217728)}},fd=function(s){if(s.tag===13){var i=Kn(s),a=vn(s,i);if(a!==null){var f=ft();Zt(a,s,i,f)}uu(s,i)}},dd=function(){return Ee},hd=function(s,i){var a=Ee;try{return Ee=s,i()}finally{Ee=a}},Aa=function(s,i,a){switch(i){case"input":if(rn(s,a),i=a.name,a.type==="radio"&&i!=null){for(a=s;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<a.length;i++){var f=a[i];if(f!==s&&f.form===s.form){var h=Po(f);if(!h)throw Error(n(90));io(f),rn(f,h)}}}break;case"textarea":lo(s,a);break;case"select":i=a.value,i!=null&&Ln(s,!!a.multiple,i,!1)}},Xf=ru,Yf=vr;var S0={usingClientEntryPoint:!1,Events:[ui,Jr,Po,Qf,Jf,ru]},ki={findFiberByHostInstance:ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},x0={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=nd(s),s===null?null:s.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||v0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{go=vl.inject(x0),sn=vl}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=S0,xt.createPortal=function(s,i){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!du(i))throw Error(n(200));return y0(s,i,null,a)},xt.createRoot=function(s,i){if(!du(s))throw Error(n(299));var a=!1,f="",h=Ap;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=cu(s,1,!1,null,null,a,!1,f,h),s[pn]=i.current,li(s.nodeType===8?s.parentNode:s),new fu(i)},xt.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=nd(i),s=s===null?null:s.stateNode,s},xt.flushSync=function(s){return vr(s)},xt.hydrate=function(s,i,a){if(!ml(i))throw Error(n(200));return yl(null,s,i,!0,a)},xt.hydrateRoot=function(s,i,a){if(!du(s))throw Error(n(405));var f=a!=null&&a.hydratedSources||null,h=!1,g="",_=Ap;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),i=Cp(i,null,s,1,a??null,h,!1,g,_),s[pn]=i.current,li(s),f)for(s=0;s<f.length;s++)a=f[s],h=a._getVersion,h=h(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,h]:i.mutableSourceEagerHydrationData.push(a,h);return new gl(i)},xt.render=function(s,i,a){if(!ml(i))throw Error(n(200));return yl(null,s,i,!1,a)},xt.unmountComponentAtNode=function(s){if(!ml(s))throw Error(n(40));return s._reactRootContainer?(vr(function(){yl(null,null,s,!1,function(){s._reactRootContainer=null,s[pn]=null})}),!0):!1},xt.unstable_batchedUpdates=ru,xt.unstable_renderSubtreeIntoContainer=function(s,i,a,f){if(!ml(a))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return yl(s,i,a,!1,f)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var Fp;function $0(){if(Fp)return gu.exports;Fp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),gu.exports=R0(),gu.exports}var zp;function D0(){if(zp)return wl;zp=1;var t=$0();return wl.createRoot=t.createRoot,wl.hydrateRoot=t.hydrateRoot,wl}var qk=D0();const qg=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.closeBrowser",{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}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.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.accessibilitySnapshot",{title:"Accessibility snapshot",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function B0(t,e){if(t)for(const n of e.split("|")){if(n==="url")try{const o=new URL(t[n]);return o.protocol==="data:"?o.protocol:o.protocol==="about:"?t[n]:o.pathname+o.search}catch{if(t[n]!==void 0)return t[n]}if(n==="timeNumber"&&t[n]!==void 0)return new Date(t[n]).toString();const r=F0(t,n);if(r!==void 0)return r}}function F0(t,e){const n=e.split(".");let r=t;for(const o of n){if(typeof r!="object"||r===null)return;r=r[o]}if(r!==void 0)return String(r)}function z0(t){var e;return(e=qg.get(t.type+"."+t.method))==null?void 0:e.group}const Pi=Symbol("context"),Vg=Symbol("nextInContext"),Wg=Symbol("prevByEndTime"),Kg=Symbol("nextByStartTime"),Up=Symbol("events");class Vk{constructor(e){be(this,"startTime");be(this,"endTime");be(this,"browserName");be(this,"channel");be(this,"platform");be(this,"wallTime");be(this,"title");be(this,"options");be(this,"pages");be(this,"actions");be(this,"attachments");be(this,"visibleAttachments");be(this,"events");be(this,"stdio");be(this,"errors");be(this,"errorDescriptors");be(this,"hasSource");be(this,"hasStepData");be(this,"sdkLanguage");be(this,"testIdAttributeName");be(this,"sources");be(this,"resources");e.forEach(r=>U0(r));const n=e.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=H0(e),this.pages=[].concat(...e.map(r=>r.pages)),this.wallTime=e.map(r=>r.wallTime).reduce((r,o)=>Math.min(r||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=e.map(r=>r.startTime).reduce((r,o)=>Math.min(r,o),Number.MAX_VALUE),this.endTime=e.map(r=>r.endTime).reduce((r,o)=>Math.max(r,o),Number.MIN_VALUE),this.events=[].concat(...e.map(r=>r.events)),this.stdio=[].concat(...e.map(r=>r.stdio)),this.errors=[].concat(...e.map(r=>r.errors)),this.hasSource=e.some(r=>r.hasSource),this.hasStepData=e.some(r=>r.origin==="testRunner"),this.resources=[...e.map(r=>r.resources)].flat(),this.attachments=this.actions.flatMap(r=>{var o;return((o=r.attachments)==null?void 0:o.map(l=>({...l,traceUrl:r.context.traceUrl})))??[]}),this.visibleAttachments=this.attachments.filter(r=>!r.name.startsWith("_")),this.events.sort((r,o)=>r.time-o.time),this.resources.sort((r,o)=>r._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Y0(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const n=new Set(e);return this.actions.filter(r=>{const o=r.group??z0({type:r.class,method:r.method});return!o||n.has(o)})}_errorDescriptorsFromActions(){var n;const e=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,n)=>({stack:e.stack,message:e.message}))}}function U0(t){for(const n of t.pages)n[Pi]=t;for(let n=0;n<t.actions.length;++n){const r=t.actions[n];r[Pi]=t}let e;for(let n=t.actions.length-1;n>=0;n--){const r=t.actions[n];r[Vg]=e,r.class!=="Route"&&(e=r)}for(const n of t.events)n[Pi]=t;for(const n of t.resources)n[Pi]=t}function H0(t){const e=new Map;for(const o of t){const l=o.traceUrl;let c=e.get(l);c||(c=[],e.set(l,c)),c.push(o)}const n=[];let r=0;for(const[,o]of e){e.size>1&&q0(o,++r);const l=V0(o);n.push(...l)}n.sort((o,l)=>l.parentId===o.callId?1:o.parentId===l.callId?-1:o.endTime-l.endTime);for(let o=1;o<n.length;++o)n[o][Wg]=n[o-1];n.sort((o,l)=>l.parentId===o.callId?-1:o.parentId===l.callId?1:o.startTime-l.startTime);for(let o=0;o+1<n.length;++o)n[o][Kg]=n[o+1];return n}function q0(t,e){for(const n of t)for(const r of n.actions)r.callId&&(r.callId=`${e}:${r.callId}`),r.parentId&&(r.parentId=`${e}:${r.parentId}`)}let Hp=0;function V0(t){const e=new Map,n=t.filter(c=>c.origin==="library"),r=t.filter(c=>c.origin==="testRunner");if(!r.length||!n.length)return t.map(c=>c.actions.map(u=>({...u,context:c}))).flat();for(const c of n)for(const u of c.actions)e.set(u.stepId||`tmp-step@${++Hp}`,{...u,context:c});const o=K0(r,e);o&&W0(n,o);const l=new Map;for(const c of r)for(const u of c.actions){const d=u.stepId&&e.get(u.stepId);if(d){l.set(u.callId,d.callId),u.error&&(d.error=u.error),u.attachments&&(d.attachments=u.attachments),u.annotations&&(d.annotations=u.annotations),u.parentId&&(d.parentId=l.get(u.parentId)??u.parentId),u.group&&(d.group=u.group),d.startTime=u.startTime,d.endTime=u.endTime;continue}u.parentId&&(u.parentId=l.get(u.parentId)??u.parentId),e.set(u.stepId||`tmp-step@${++Hp}`,{...u,context:c})}return[...e.values()]}function W0(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const r of n.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of n.events)r.time+=e;for(const r of n.stdio)r.timestamp+=e;for(const r of n.pages)for(const o of r.screencastFrames)o.timestamp+=e;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function K0(t,e){for(const n of t)for(const r of n.actions){if(!r.startTime)continue;const o=r.stepId?e.get(r.stepId):void 0;if(o)return r.startTime-o.startTime}return 0}function G0(t){const e=new Map;for(const r of t)e.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of e.values()){const o=r.action.parentId&&e.get(r.action.parentId)||n;o.children.push(r),r.parent=o}return{rootItem:n,itemMap:e}}function Hl(t){return t[Pi]}function Q0(t){return t[Vg]}function qp(t){return t[Wg]}function Vp(t){return t[Kg]}function J0(t){let e=0,n=0;for(const r of X0(t)){if(r.type==="console"){const o=r.messageType;o==="warning"?++n:o==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:n}}function X0(t){let e=t[Up];if(e)return e;const n=Q0(t);return e=Hl(t).events.filter(r=>r.time>=t.startTime&&(!n||r.time<n.startTime)),t[Up]=e,e}function Y0(t,e){var r;const n=new Map;for(const o of t)for(const l of o.stack||[]){let c=n.get(l.file);c||(c={errors:[],content:void 0},n.set(l.file,c))}for(const o of e){const{action:l,stack:c,message:u}=o;!l||!c||(r=n.get(c[0].file))==null||r.errors.push({line:c[0].line||0,message:u})}return n}const Z0=50,ql=({sidebarSize:t,sidebarHidden:e=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:o=Z0,settingName:l,sidebar:c,main:u})=>{const d=Math.max(o,t)*window.devicePixelRatio,[p,m]=Nn(l?l+"."+r+":size":void 0,d),[y,v]=Nn(l?l+"."+r+":size":void 0,d),[x,k]=$.useState(null),[S,E]=Pr();let N;r==="vertical"?(N=y/window.devicePixelRatio,S&&S.height<N&&(N=S.height-10)):(N=p/window.devicePixelRatio,S&&S.width<N&&(N=S.width-10)),document.body.style.userSelect=x?"none":"inherit";let T={};return r==="vertical"?n?T={top:x?0:N-4,bottom:x?0:void 0,height:x?"initial":8}:T={bottom:x?0:N-4,top:x?0:void 0,height:x?"initial":8}:n?T={left:x?0:N-4,right:x?0:void 0,width:x?"initial":8}:T={right:x?0:N-4,left:x?0:void 0,width:x?"initial":8},w.jsxs("div",{className:Ue("split-view",r,n&&"sidebar-first"),ref:E,children:[w.jsx("div",{className:"split-view-main",children:u}),!e&&w.jsx("div",{style:{flexBasis:N},className:"split-view-sidebar",children:c}),!e&&w.jsx("div",{style:T,className:"split-view-resizer",onMouseDown:F=>k({offset:r==="vertical"?F.clientY:F.clientX,size:N}),onMouseUp:()=>k(null),onMouseMove:F=>{if(!F.buttons)k(null);else if(x){const D=(r==="vertical"?F.clientY:F.clientX)-x.offset,z=n?x.size+D:x.size-D,B=F.target.parentElement.getBoundingClientRect(),I=Math.min(Math.max(o,z),(r==="vertical"?B.height:B.width)-o);r==="vertical"?v(I*window.devicePixelRatio):m(I*window.devicePixelRatio)}}})]})},Ve=function(t,e,n){return t>=e&&t<=n};function _t(t){return Ve(t,48,57)}function Wp(t){return _t(t)||Ve(t,65,70)||Ve(t,97,102)}function eS(t){return Ve(t,65,90)}function tS(t){return Ve(t,97,122)}function nS(t){return eS(t)||tS(t)}function rS(t){return t>=128}function Al(t){return nS(t)||rS(t)||t===95}function Kp(t){return Al(t)||_t(t)||t===45}function sS(t){return Ve(t,0,8)||t===11||Ve(t,14,31)||t===127}function Ll(t){return t===10}function _n(t){return Ll(t)||t===9||t===32}const iS=1114111;class nf extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function oS(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r===13&&t.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),Ve(r,55296,56319)&&Ve(t.charCodeAt(n+1),56320,57343)){const o=r-55296,l=t.charCodeAt(n+1)-56320;r=Math.pow(2,16)+o*Math.pow(2,10)+l,n++}e.push(r)}return e}function Ge(t){if(t<=65535)return String.fromCharCode(t);t-=Math.pow(2,16);const e=Math.floor(t/Math.pow(2,10))+55296,n=t%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(n)}function Gg(t){const e=oS(t);let n=-1;const r=[];let o;const l=function(M){return M>=e.length?-1:e[M]},c=function(M){if(M===void 0&&(M=1),M>3)throw"Spec Error: no more than three codepoints of lookahead.";return l(n+M)},u=function(M){return M===void 0&&(M=1),n+=M,o=l(n),!0},d=function(){return n-=1,!0},p=function(M){return M===void 0&&(M=o),M===-1},m=function(){if(y(),u(),_n(o)){for(;_n(c());)u();return new Vl}else{if(o===34)return k();if(o===35)if(Kp(c())||N(c(1),c(2))){const M=new lm("");return F(c(1),c(2),c(3))&&(M.type="id"),M.value=G(),M}else return new tt(o);else return o===36?c()===61?(u(),new uS):new tt(o):o===39?k():o===40?new sm:o===41?new rf:o===42?c()===61?(u(),new fS):new tt(o):o===43?z()?(d(),v()):new tt(o):o===44?new em:o===45?z()?(d(),v()):c(1)===45&&c(2)===62?(u(2),new Xg):O()?(d(),x()):new tt(o):o===46?z()?(d(),v()):new tt(o):o===58?new Yg:o===59?new Zg:o===60?c(1)===33&&c(2)===45&&c(3)===45?(u(3),new Jg):new tt(o):o===64?F(c(1),c(2),c(3))?new om(G()):new tt(o):o===91?new rm:o===92?T()?(d(),x()):new tt(o):o===93?new $u:o===94?c()===61?(u(),new cS):new tt(o):o===123?new tm:o===124?c()===61?(u(),new aS):c()===124?(u(),new im):new tt(o):o===125?new nm:o===126?c()===61?(u(),new lS):new tt(o):_t(o)?(d(),v()):Al(o)?(d(),x()):p()?new Ml:new tt(o)}},y=function(){for(;c(1)===47&&c(2)===42;)for(u(2);;)if(u(),o===42&&c()===47){u();break}else if(p())return},v=function(){const M=B();if(F(c(1),c(2),c(3))){const H=new dS;return H.value=M.value,H.repr=M.repr,H.type=M.type,H.unit=G(),H}else if(c()===37){u();const H=new um;return H.value=M.value,H.repr=M.repr,H}else{const H=new cm;return H.value=M.value,H.repr=M.repr,H.type=M.type,H}},x=function(){const M=G();if(M.toLowerCase()==="url"&&c()===40){for(u();_n(c(1))&&_n(c(2));)u();return c()===34||c()===39?new Fi(M):_n(c())&&(c(2)===34||c(2)===39)?new Fi(M):S()}else return c()===40?(u(),new Fi(M)):new sf(M)},k=function(M){M===void 0&&(M=o);let H="";for(;u();){if(o===M||p())return new of(H);if(Ll(o))return d(),new Qg;o===92?p(c())||(Ll(c())?u():H+=Ge(E())):H+=Ge(o)}throw new Error("Internal error")},S=function(){const M=new am("");for(;_n(c());)u();if(p(c()))return M;for(;u();){if(o===41||p())return M;if(_n(o)){for(;_n(c());)u();return c()===41||p(c())?(u(),M):(Z(),new Il)}else{if(o===34||o===39||o===40||sS(o))return Z(),new Il;if(o===92)if(T())M.value+=Ge(E());else return Z(),new Il;else M.value+=Ge(o)}}throw new Error("Internal error")},E=function(){if(u(),Wp(o)){const M=[o];for(let fe=0;fe<5&&Wp(c());fe++)u(),M.push(o);_n(c())&&u();let H=parseInt(M.map(function(fe){return String.fromCharCode(fe)}).join(""),16);return H>iS&&(H=65533),H}else return p()?65533:o},N=function(M,H){return!(M!==92||Ll(H))},T=function(){return N(o,c())},F=function(M,H,fe){return M===45?Al(H)||H===45||N(H,fe):Al(M)?!0:M===92?N(M,H):!1},O=function(){return F(o,c(1),c(2))},D=function(M,H,fe){return M===43||M===45?!!(_t(H)||H===46&&_t(fe)):M===46?!!_t(H):!!_t(M)},z=function(){return D(o,c(1),c(2))},G=function(){let M="";for(;u();)if(Kp(o))M+=Ge(o);else if(T())M+=Ge(E());else return d(),M;throw new Error("Internal parse error")},B=function(){let M="",H="integer";for((c()===43||c()===45)&&(u(),M+=Ge(o));_t(c());)u(),M+=Ge(o);if(c(1)===46&&_t(c(2)))for(u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);const fe=c(1),xe=c(2),pe=c(3);if((fe===69||fe===101)&&_t(xe))for(u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);else if((fe===69||fe===101)&&(xe===43||xe===45)&&_t(pe))for(u(),M+=Ge(o),u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);const me=I(M);return{type:H,value:me,repr:M}},I=function(M){return+M},Z=function(){for(;u();){if(o===41||p())return;T()&&E()}};let oe=0;for(;!p(c());)if(r.push(m()),oe++,oe>e.length*2)throw new Error("I'm infinite-looping!");return r}class He{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Qg extends He{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Il extends He{constructor(){super(...arguments),this.tokenType="BADURL"}}class Vl extends He{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Jg extends He{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class Xg extends He{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Yg extends He{constructor(){super(...arguments),this.tokenType=":"}}class Zg extends He{constructor(){super(...arguments),this.tokenType=";"}}class em extends He{constructor(){super(...arguments),this.tokenType=","}}class Ls extends He{constructor(){super(...arguments),this.value="",this.mirror=""}}class tm extends Ls{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class nm extends Ls{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class rm extends Ls{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class $u extends Ls{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class sm extends Ls{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class rf extends Ls{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class lS extends He{constructor(){super(...arguments),this.tokenType="~="}}class aS extends He{constructor(){super(...arguments),this.tokenType="|="}}class cS extends He{constructor(){super(...arguments),this.tokenType="^="}}class uS extends He{constructor(){super(...arguments),this.tokenType="$="}}class fS extends He{constructor(){super(...arguments),this.tokenType="*="}}class im extends He{constructor(){super(...arguments),this.tokenType="||"}}class Ml extends He{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class tt extends He{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Ge(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==="\\"?`\\
42
+ `:this.value}}class Is extends He{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 sf extends Is{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return eo(this.value)}}class Fi extends Is{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return eo(this.value)+"("}}class om extends Is{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+eo(this.value)}}class lm extends Is{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"?"#"+eo(this.value):"#"+hS(this.value)}}class of extends Is{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+fm(this.value)+'"'}}class am extends Is{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+fm(this.value)+'")'}}class cm extends He{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 um extends He{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 dS extends He{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 n=eo(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||Ve(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function eo(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);if(o===0)throw new nf("Invalid character: the input contains U+0000.");Ve(o,1,31)||o===127||r===0&&Ve(o,48,57)||r===1&&Ve(o,48,57)&&n===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||Ve(o,48,57)||Ve(o,65,90)||Ve(o,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function hS(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new nf("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||Ve(r,48,57)||Ve(r,65,90)||Ve(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function fm(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new nf("Invalid character: the input contains U+0000.");Ve(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class Et extends Error{}function pS(t,e){let n;try{n=Gg(t),n[n.length-1]instanceof Ml||n.push(new Ml)}catch(I){const Z=I.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,oe=(I.stack||"").indexOf(I.message);throw oe!==-1&&(I.stack=I.stack.substring(0,oe)+Z+I.stack.substring(oe+I.message.length)),I.message=Z,I}const r=n.find(I=>I instanceof om||I instanceof Qg||I instanceof Il||I instanceof im||I instanceof Jg||I instanceof Xg||I instanceof Zg||I instanceof tm||I instanceof nm||I instanceof am||I instanceof um);if(r)throw new Et(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function c(){return new Et(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Vl;)o++}function d(I=o){return n[I]instanceof sf}function p(I=o){return n[I]instanceof of}function m(I=o){return n[I]instanceof cm}function y(I=o){return n[I]instanceof em}function v(I=o){return n[I]instanceof sm}function x(I=o){return n[I]instanceof rf}function k(I=o){return n[I]instanceof Fi}function S(I=o){return n[I]instanceof tt&&n[I].value==="*"}function E(I=o){return n[I]instanceof Ml}function N(I=o){return n[I]instanceof tt&&[">","+","~"].includes(n[I].value)}function T(I=o){return y(I)||x(I)||E(I)||N(I)||n[I]instanceof Vl}function F(){const I=[O()];for(;u(),!!y();)o++,I.push(O());return I}function O(){return u(),m()||p()?n[o++].value:D()}function D(){const I={simples:[]};for(u(),N()?I.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):I.simples.push({selector:z(),combinator:""});;){if(u(),N())I.simples[I.simples.length-1].combinator=n[o++].value,u();else if(T())break;I.simples.push({combinator:"",selector:z()})}return I}function z(){let I="";const Z=[];for(;!T();)if(d()||S())I+=n[o++].toSource();else if(n[o]instanceof lm)I+=n[o++].toSource();else if(n[o]instanceof tt&&n[o].value===".")if(o++,d())I+="."+n[o++].toSource();else throw c();else if(n[o]instanceof Yg)if(o++,d())if(!e.has(n[o].value.toLowerCase()))I+=":"+n[o++].toSource();else{const oe=n[o++].value.toLowerCase();Z.push({name:oe,args:[]}),l.add(oe)}else if(k()){const oe=n[o++].value.toLowerCase();if(e.has(oe)?(Z.push({name:oe,args:F()}),l.add(oe)):I+=`:${oe}(${G()})`,u(),!x())throw c();o++}else throw c();else if(n[o]instanceof rm){for(I+="[",o++;!(n[o]instanceof $u)&&!E();)I+=n[o++].toSource();if(!(n[o]instanceof $u))throw c();I+="]",o++}else throw c();if(!I&&!Z.length)throw c();return{css:I||void 0,functions:Z}}function G(){let I="",Z=1;for(;!E()&&((v()||k())&&Z++,x()&&Z--,!!Z);)I+=n[o++].toSource();return I}const B=F();if(!E())throw c();if(B.some(I=>typeof I!="object"||!("simples"in I)))throw new Et(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:B,names:Array.from(l)}}const Du=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),gS=new Set(["left-of","right-of","above","below","near"]),dm=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 to(t){const e=vS(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const o=pS(r.body,dm);n.push({name:"css",body:o.selector,source:r.body});continue}if(Du.has(r.name)){let o,l;try{const p=JSON.parse("["+r.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Et(`Malformed selector: ${r.name}=`+r.body);if(o=p[0],p.length===2){if(typeof p[1]!="number"||!gS.has(r.name))throw new Et(`Malformed selector: ${r.name}=`+r.body);l=p[1]}}catch{throw new Et(`Malformed selector: ${r.name}=`+r.body)}const c={name:r.name,source:r.body,body:{parsed:to(o),distance:l}},u=[...c.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=u?c.body.parsed.parts.indexOf(u):-1;d!==-1&&mS(c.body.parsed.parts.slice(0,d+1),n.slice(0,d+1))&&c.body.parsed.parts.splice(0,d+1),n.push(c);continue}n.push({...r,source:r.body})}if(Du.has(n[0].name))throw new Et(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function mS(t,e){return Tn({parts:t})===Tn({parts:e})}function Tn(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let o=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(o=!1);const l=o?n.name+"=":"";return`${r===t.capture?"*":""}${l}${n.source}`}).join(" >> ")}function yS(t,e){const n=(r,o)=>{for(const l of r.parts)e(l,o),Du.has(l.name)&&n(l.body.parsed,!0)};n(t,!1)}function vS(t){let e=0,n,r=0;const o={parts:[]},l=()=>{const u=t.substring(r,e).trim(),d=u.indexOf("=");let p,m;d!==-1&&u.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=u.substring(0,d).trim(),m=u.substring(d+1)):u.length>1&&u[0]==='"'&&u[u.length-1]==='"'||u.length>1&&u[0]==="'"&&u[u.length-1]==="'"?(p="text",m=u):/^\(*\/\//.test(u)||u.startsWith("..")?(p="xpath",m=u):(p="css",m=u);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),o.parts.push({name:p,body:m}),y){if(o.capture!==void 0)throw new Et("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!t.includes(">>"))return e=t.length,l(),o;const c=()=>{const d=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<t.length;){const u=t[e];u==="\\"&&e+1<t.length?e+=2:u===n?(n=void 0,e++):!n&&(u==='"'||u==="'"||u==="`")&&!c()?(n=u,e++):!n&&u===">"&&t[e+1]===">"?(l(),e+=2,r=e):e++}return l(),o}function Ir(t,e){let n=0,r=t.length===0;const o=()=>t[n]||"",l=()=>{const E=o();return++n,r=n>=t.length,E},c=E=>{throw r?new Et(`Unexpected end of selector while parsing selector \`${t}\``):new Et(`Error while parsing selector \`${t}\` - unexpected symbol "${o()}" at position ${n}`+(E?" during "+E:""))};function u(){for(;!r&&/\s/.test(o());)l()}function d(E){return E>="€"||E>="0"&&E<="9"||E>="A"&&E<="Z"||E>="a"&&E<="z"||E>="0"&&E<="9"||E==="_"||E==="-"}function p(){let E="";for(u();!r&&d(o());)E+=l();return E}function m(E){let N=l();for(N!==E&&c("parsing quoted string");!r&&o()!==E;)o()==="\\"&&l(),N+=l();return o()!==E&&c("parsing quoted string"),N+=l(),N}function y(){l()!=="/"&&c("parsing regular expression");let E="",N=!1;for(;!r;){if(o()==="\\")E+=l(),r&&c("parsing regular expression");else if(N&&o()==="]")N=!1;else if(!N&&o()==="[")N=!0;else if(!N&&o()==="/")break;E+=l()}l()!=="/"&&c("parsing regular expression");let T="";for(;!r&&o().match(/[dgimsuy]/);)T+=l();try{return new RegExp(E,T)}catch(F){throw new Et(`Error while parsing selector \`${t}\`: ${F.message}`)}}function v(){let E="";return u(),o()==="'"||o()==='"'?E=m(o()).slice(1,-1):E=p(),E||c("parsing property path"),E}function x(){u();let E="";return r||(E+=l()),!r&&E!=="="&&(E+=l()),["=","*=","^=","$=","|=","~="].includes(E)||c("parsing operator"),E}function k(){l();const E=[];for(E.push(v()),u();o()===".";)l(),E.push(v()),u();if(o()==="]")return l(),{name:E.join("."),jsonPath:E,op:"<truthy>",value:null,caseSensitive:!1};const N=x();let T,F=!0;if(u(),o()==="/"){if(N!=="=")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${N} in attribute with regular expression`);T=y()}else if(o()==="'"||o()==='"')T=m(o()).slice(1,-1),u(),o()==="i"||o()==="I"?(F=!1,l()):(o()==="s"||o()==="S")&&(F=!0,l());else{for(T="";!r&&(d(o())||o()==="+"||o()===".");)T+=l();T==="true"?T=!0:T==="false"?T=!1:e||(T=+T,Number.isNaN(T)&&c("parsing attribute value"))}if(u(),o()!=="]"&&c("parsing attribute value"),l(),N!=="="&&typeof T!="string")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${N} in attribute with non-string matching value - ${T}`);return{name:E.join("."),jsonPath:E,op:N,value:T,caseSensitive:F}}const S={name:"",attributes:[]};for(S.name=p(),u();o()==="[";)S.attributes.push(k()),u();if(r||c(void 0),!S.name&&!S.attributes.length)throw new Et(`Error while parsing selector \`${t}\` - selector cannot be empty`);return S}function sa(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.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 Wl(t){return t.charAt(0).toUpperCase()+t.substring(1)}function hm(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ms(t){return`"${t.replace(/["\\]/g,e=>"\\"+e)}"`}let _r;function wS(){_r=new Map}function gt(t){let e=_r==null?void 0:_r.get(t);return e===void 0&&(e=t.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),_r==null||_r.set(t,e)),e}function ia(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function pm(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function kt(t,e){return typeof t!="string"?pm(t):`${JSON.stringify(t)}${e?"s":"i"}`}function ht(t,e){return typeof t!="string"?pm(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function SS(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Gp(t,e){return SS(t,e,"…")}function Kl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xS(t,e){const n=t.length,r=e.length;let o=0,l=0;const c=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=r;d++)t[u-1]===e[d-1]&&(c[u][d]=c[u-1][d-1]+1,c[u][d]>o&&(o=c[u][d],l=u));return t.slice(l-o,l)}function _S(t,e){try{const n=to(e),r=n.parts[n.parts.length-1];if((r==null?void 0:r.name)==="internal:describe"){const o=JSON.parse(r.body);if(typeof o=="string")return o}return Tr(new mm[t],n,!1,1)[0]}catch{return e}}function Mr(t,e,n=!1){return gm(t,e,n,1)[0]}function gm(t,e,n=!1,r=20,o){try{return Tr(new mm[t](o),to(e),n,r)}catch{return[e]}}function Tr(t,e,n=!1,r=20){const o=[...e.parts],l=[];let c=n?"frame-locator":"page";for(let u=0;u<o.length;u++){const d=o[u],p=c;if(c="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?l.push([t.generateLocator(p,"first",""),t.generateLocator(p,"nth","0")]):d.body==="-1"?l.push([t.generateLocator(p,"last",""),t.generateLocator(p,"nth","-1")]):l.push([t.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){l.push([t.generateLocator(p,"visible",d.body),t.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:k,text:S}=Ti(d.body);l.push([t.generateLocator(p,"text",S,{exact:k})]);continue}if(d.name==="internal:has-text"){const{exact:k,text:S}=Ti(d.body);if(!k){l.push([t.generateLocator(p,"has-text",S,{exact:k})]);continue}}if(d.name==="internal:has-not-text"){const{exact:k,text:S}=Ti(d.body);if(!k){l.push([t.generateLocator(p,"has-not-text",S,{exact:k})]);continue}}if(d.name==="internal:has"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"has",S)));continue}if(d.name==="internal:has-not"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"hasNot",S)));continue}if(d.name==="internal:and"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"and",S)));continue}if(d.name==="internal:or"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"or",S)));continue}if(d.name==="internal:chain"){const k=Tr(t,d.body.parsed,!1,r);l.push(k.map(S=>t.generateLocator(p,"chain",S)));continue}if(d.name==="internal:label"){const{exact:k,text:S}=Ti(d.body);l.push([t.generateLocator(p,"label",S,{exact:k})]);continue}if(d.name==="internal:role"){const k=Ir(d.body,!0),S={attrs:[]};for(const E of k.attributes)E.name==="name"?(S.exact=E.caseSensitive,S.name=E.value):(E.name==="level"&&typeof E.value=="string"&&(E.value=+E.value),S.attrs.push({name:E.name==="include-hidden"?"includeHidden":E.name,value:E.value}));l.push([t.generateLocator(p,"role",k.name,S)]);continue}if(d.name==="internal:testid"){const k=Ir(d.body,!0),{value:S}=k.attributes[0];l.push([t.generateLocator(p,"test-id",S)]);continue}if(d.name==="internal:attr"){const k=Ir(d.body,!0),{name:S,value:E,caseSensitive:N}=k.attributes[0],T=E,F=!!N;if(S==="placeholder"){l.push([t.generateLocator(p,"placeholder",T,{exact:F})]);continue}if(S==="alt"){l.push([t.generateLocator(p,"alt",T,{exact:F})]);continue}if(S==="title"){l.push([t.generateLocator(p,"title",T,{exact:F})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const k=l[l.length-1],S=o[u-1],E=k.map(N=>t.chainLocators([N,t.generateLocator(p,"frame","")]));["xpath","css"].includes(S.name)&&E.push(t.generateLocator(p,"frame-locator",Tn({parts:[S]})),t.generateLocator(p,"frame-locator",Tn({parts:[S]},!0))),k.splice(0,k.length,...E),c="frame-locator";continue}const m=o[u+1],y=Tn({parts:[d]}),v=t.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:k,text:S}=Ti(m.body);if(!k){const E=t.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",S,{exact:k}),N={};m.name==="internal:has-text"?N.hasText=S:N.hasNotText=S;const T=t.generateLocator(p,"default",y,N);l.push([t.chainLocators([v,E]),T]),u++;continue}}let x;if(["xpath","css"].includes(d.name)){const k=Tn({parts:[d]},!0);x=t.generateLocator(p,"default",k)}l.push([v,x].filter(Boolean))}return ES(t,l,r)}function ES(t,e,n){const r=e.map(()=>""),o=[],l=c=>{if(c===e.length)return o.push(t.chainLocators(r)),o.length<n;for(const u of e[c])if(r[c]=u,!l(c+1))return!1;return!0};return l(0),o}function Ti(t){let e=!1;const n=t.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(t.endsWith('"')?(t=JSON.parse(t),e=!0):t.endsWith('"s')?(t=JSON.parse(t.substring(0,t.length-1)),e=!0):t.endsWith('"i')&&(t=JSON.parse(t.substring(0,t.length-1)),e=!1),{exact:e,text:t})}class kS{constructor(e){this.preferredQuote=e}generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(o.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 l=[];nt(o.name)?l.push(`name: ${this.regexToSourceString(o.name)}`):typeof o.name=="string"&&(l.push(`name: ${this.quote(o.name)}`),o.exact&&l.push("exact: true"));for(const{name:u,value:d}of o.attrs)l.push(`${u}: ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, { ${l.join(", ")} }`:"";return`getByRole(${this.quote(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("getByLabel",r,!!o.exact);case"title":return this.toCallWithExact("getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return ia(String(e))}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToSourceString(n)})`:r?`${e}(${this.quote(n)}, { exact: true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return sa(e,this.preferredQuote??"'")}}class bS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(o.hasText)})`:o.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(o.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 l=[];nt(o.name)?l.push(`name=${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`name=${this.quote(o.name)}`),o.exact&&l.push("exact=True"));for(const{name:u,value:d}of o.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),l.push(`${hm(u)}=${p}`)}const c=l.length?`, ${l.join(", ")}`:"";return`get_by_role(${this.quote(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!o.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!o.exact);case"label":return this.toCallWithExact("get_by_label",r,!!o.exact);case"title":return this.toCallWithExact("get_by_title",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${ia(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, exact=True)`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return sa(e,'"')}}class TS{generateLocator(e,n,r,o={}){let l;switch(e){case"page":l="Page";break;case"frame-locator":l="FrameLocator";break;case"locator":l="Locator";break}switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasText(${this.toHasText(o.hasText)}))`:o.hasNotText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasNotText(${this.toHasText(o.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 ${l}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const c=[];nt(o.name)?c.push(`.setName(${this.regexToString(o.name)})`):typeof o.name=="string"&&(c.push(`.setName(${this.quote(o.name)})`),o.exact&&c.push(".setExact(true)"));for(const{name:d,value:p}of o.attrs)c.push(`.set${Wl(d)}(${typeof p=="string"?this.quote(p):p})`);const u=c.length?`, new ${l}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${hm(r).toUpperCase()}${u})`;case"has-text":return`filter(new ${l}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${l}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${l}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${l}.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(l,"getByText",r,!!o.exact);case"alt":return this.toCallWithExact(l,"getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact(l,"getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact(l,"getByLabel",r,!!o.exact);case"title":return this.toCallWithExact(l,"getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(ia(e.source))}${n})`}toCallWithExact(e,n,r,o){return nt(r)?`${n}(${this.regexToString(r)})`:o?`${n}(${this.quote(r)}, new ${e}.${Wl(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(e){return nt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return sa(e,'"')}}class CS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(o.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 l=[];nt(o.name)?l.push(`NameRegex = ${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`Name = ${this.quote(o.name)}`),o.exact&&l.push("Exact = true"));for(const{name:u,value:d}of o.attrs)l.push(`${Wl(u)} = ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, new() { ${l.join(", ")} }`:"";return`GetByRole(AriaRole.${Wl(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!o.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(ia(e.source))}${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, new() { Exact = true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return nt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return sa(e,'"')}}class NS{generateLocator(e,n,r,o={}){return JSON.stringify({kind:n,body:r,options:o})}chainLocators(e){const n=e.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const mm={javascript:kS,python:bS,java:TS,csharp:CS,jsonl:NS};function nt(t){return t instanceof RegExp}const Qp=new Map;function AS({name:t,rootItem:e,render:n,title:r,icon:o,isError:l,isVisible:c,selectedItem:u,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:v,noItemsMessage:x,dataTestId:k,autoExpandDepth:S}){const E=$.useMemo(()=>LS(e,u,y.expandedItems,S||0,c),[e,u,y,S,c]),N=$.useRef(null),[T,F]=$.useState(),[O,D]=$.useState(!1);$.useEffect(()=>{m==null||m(T)},[m,T]),$.useEffect(()=>{const B=N.current;if(!B)return;const I=()=>{Qp.set(t,B.scrollTop)};return B.addEventListener("scroll",I,{passive:!0}),()=>B.removeEventListener("scroll",I)},[t]),$.useEffect(()=>{N.current&&(N.current.scrollTop=Qp.get(t)||0)},[t]);const z=$.useCallback(B=>{const{expanded:I}=E.get(B);if(I){for(let Z=u;Z;Z=Z.parent)if(Z===B){p==null||p(B);break}y.expandedItems.set(B.id,!1)}else y.expandedItems.set(B.id,!0);v({...y})},[E,u,p,y,v]),G=$.useCallback(B=>{const{expanded:I}=E.get(B),Z=[B];for(;Z.length;){const oe=Z.pop();Z.push(...oe.children),y.expandedItems.set(oe.id,!I)}v({...y})},[E,y,v]);return w.jsx("div",{className:Ue("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":k||t+"-tree",children:w.jsxs("div",{className:Ue("tree-view-content"),tabIndex:0,onKeyDown:B=>{if(u&&B.key==="Enter"){d==null||d(u);return}if(B.key!=="ArrowDown"&&B.key!=="ArrowUp"&&B.key!=="ArrowLeft"&&B.key!=="ArrowRight")return;if(B.stopPropagation(),B.preventDefault(),u&&B.key==="ArrowLeft"){const{expanded:Z,parent:oe}=E.get(u);Z?(y.expandedItems.set(u.id,!1),v({...y})):oe&&(p==null||p(oe));return}if(u&&B.key==="ArrowRight"){u.children.length&&(y.expandedItems.set(u.id,!0),v({...y}));return}let I=u;if(B.key==="ArrowDown"&&(u?I=E.get(u).next:E.size&&(I=[...E.keys()][0])),B.key==="ArrowUp"){if(u)I=E.get(u).prev;else if(E.size){const Z=[...E.keys()];I=Z[Z.length-1]}}m==null||m(void 0),I&&(D(!0),p==null||p(I)),F(void 0)},ref:N,children:[x&&E.size===0&&w.jsx("div",{className:"tree-view-empty",children:x}),e.children.map(B=>E.get(B)&&w.jsx(ym,{item:B,treeItems:E,selectedItem:u,onSelected:p,onAccepted:d,isError:l,toggleExpanded:z,toggleSubtree:G,highlightedItem:T,setHighlightedItem:F,render:n,icon:o,title:r,isKeyboardNavigation:O,setIsKeyboardNavigation:D},B.id))]})})}function ym({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:o,setHighlightedItem:l,isError:c,onAccepted:u,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:v,isKeyboardNavigation:x,setIsKeyboardNavigation:k}){const S=$.useId(),E=$.useRef(null);$.useEffect(()=>{n===t&&x&&E.current&&(Ug(E.current),k(!1))},[t,n,x,k]);const N=e.get(t),T=N.depth,F=N.expanded;let O="codicon-blank";typeof F=="boolean"&&(O=F?"codicon-chevron-down":"codicon-chevron-right");const D=m(t),z=F&&t.children.length?t.children:[],G=y==null?void 0:y(t),B=(v==null?void 0:v(t))||"codicon-blank";return w.jsxs("div",{ref:E,role:"treeitem","aria-selected":t===n,"aria-expanded":F,"aria-controls":S,title:G,className:"vbox",style:{flex:"none"},children:[w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(t),className:Ue("tree-view-entry",n===t&&"selected",o===t&&"highlighted",(c==null?void 0:c(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>l(t),onMouseLeave:()=>l(void 0),children:[T?new Array(T).fill(0).map((I,Z)=>w.jsx("div",{className:"tree-view-indent"},"indent-"+Z)):void 0,w.jsx("div",{"aria-hidden":"true",className:"codicon "+O,style:{minWidth:16,marginRight:4},onDoubleClick:I=>{I.preventDefault(),I.stopPropagation()},onClick:I=>{I.stopPropagation(),I.preventDefault(),I.altKey?p(t):d(t)}}),v&&w.jsx("div",{className:"codicon "+B,style:{minWidth:16,marginRight:4},"aria-label":"["+B.replace("codicon","icon")+"]"}),typeof D=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:D}):D]}),!!z.length&&w.jsx("div",{id:S,role:"group",children:z.map(I=>e.get(I)&&w.jsx(ym,{item:I,treeItems:e,selectedItem:n,onSelected:r,onAccepted:u,isError:c,toggleExpanded:d,toggleSubtree:p,highlightedItem:o,setHighlightedItem:l,render:m,title:y,icon:v,isKeyboardNavigation:x,setIsKeyboardNavigation:k},I.id))})]})}function LS(t,e,n,r,o=()=>!0){if(!o(t))return new Map;const l=new Map,c=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)c.add(p.id);let u=null;const d=(p,m)=>{for(const y of p.children){if(!o(y))continue;const v=c.has(y.id)||n.get(y.id),x=r>m&&l.size<25&&v!==!1,k=y.children.length?v??x:void 0,S={depth:m,expanded:k,parent:t===p?null:p,next:null,prev:u};u&&(l.get(u).next=y),u=y,l.set(y,S),k&&d(y,m+1)}};return d(t,0),l}const jt=$.forwardRef(function({children:e,title:n="",icon:r,disabled:o=!1,toggled:l=!1,onClick:c=()=>{},style:u,testId:d,className:p,ariaLabel:m},y){return w.jsxs("button",{ref:y,className:Ue(p,"toolbar-button",r,l&&"toggled"),onMouseDown:Jp,onClick:c,onDoubleClick:Jp,title:n,disabled:!!o,style:u,"data-testid":d,"aria-label":m||n,children:[r&&w.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),Jp=t=>{t.stopPropagation(),t.preventDefault()};function vm(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function IS(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const MS=AS,jS=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:o,onSelected:l,onHighlighted:c,revealConsole:u,revealAttachment:d,isLive:p})=>{const[m,y]=$.useState({expandedItems:new Map}),{rootItem:v,itemMap:x}=$.useMemo(()=>G0(t),[t]),{selectedItem:k}=$.useMemo(()=>({selectedItem:e?x.get(e.callId):void 0}),[x,e]),S=$.useCallback(D=>{var z,G;return!!((G=(z=D.action)==null?void 0:z.error)!=null&&G.message)},[]),E=$.useCallback(D=>r({minimum:D.action.startTime,maximum:D.action.endTime}),[r]),N=$.useCallback(D=>lf(D.action,{sdkLanguage:o,revealConsole:u,revealAttachment:d,isLive:p,showDuration:!0,showBadges:!0}),[p,u,d,o]),T=$.useCallback(D=>!n||!D.action||D.action.startTime<=n.maximum&&D.action.endTime>=n.minimum,[n]),F=$.useCallback(D=>{l==null||l(D.action)},[l]),O=$.useCallback(D=>{c==null||c(D==null?void 0:D.action)},[c]);return w.jsxs("div",{className:"vbox",children:[n&&w.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[w.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),w.jsx(MS,{name:"actions",rootItem:v,treeState:m,setTreeState:y,selectedItem:k,onSelected:F,onHighlighted:O,onAccepted:E,isError:S,isVisible:T,render:N})]})},lf=(t,e)=>{var E,N;const{sdkLanguage:n,revealConsole:r,revealAttachment:o,isLive:l,showDuration:c,showBadges:u}=e,{errors:d,warnings:p}=J0(t),m=!!((E=t.attachments)!=null&&E.length)&&!!o,y=t.params.selector?_S(n||"javascript",t.params.selector):void 0,v=t.class==="Test"&&t.method==="test.step"&&((N=t.annotations)==null?void 0:N.some(T=>T.type==="skip"));let x="";t.endTime?x=pt(t.endTime-t.startTime):t.error?x="Timed out":l||(x="-");const{elements:k,title:S}=PS(t);return w.jsxs("div",{className:"action-title vbox",children:[w.jsxs("div",{className:"hbox",children:[w.jsx("span",{className:"action-title-method",title:S,children:k}),(c||u||m||v)&&w.jsx("div",{className:"spacer"}),m&&w.jsx(jt,{icon:"attach",title:"Open Attachment",onClick:()=>o(t.attachments[0])}),c&&!v&&w.jsx("div",{className:"action-duration",children:x||w.jsx("span",{className:"codicon codicon-loading"})}),v&&w.jsx("span",{className:Ue("action-skipped","codicon",vm("skipped")),title:"skipped"}),u&&w.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!d&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-error"}),w.jsx("span",{className:"action-icon-value",children:d})]}),!!p&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-warning"}),w.jsx("span",{className:"action-icon-value",children:p})]})]})]}),y&&w.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function PS(t){var u;const e=t.title??((u=qg.get(t.class+"."+t.method))==null?void 0:u.title)??t.method,n=[],r=[];let o=0;const l=/\{([^}]+)\}/g;let c;for(;(c=l.exec(e))!==null;){const[d,p]=c,m=e.slice(o,c.index);n.push(m),r.push(m);const y=B0(t.params,p);y===void 0?(n.push(d),r.push(d)):c.index===0?(n.push(y),r.push(y)):(n.push(w.jsx("span",{className:"action-title-param",children:y})),r.push(y)),o=c.index+d.length}if(o<e.length){const d=e.slice(o);n.push(d),r.push(d)}return{elements:n,title:r.join("")}}const af=({value:t,description:e})=>{const[n,r]=$.useState("copy"),o=$.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(c=>{navigator.clipboard.writeText(c).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return w.jsx(jt,{title:e||"Copy",icon:n,onClick:o})},jl=({value:t,description:e,copiedDescription:n=e,style:r})=>{const[o,l]=$.useState(!1),c=$.useCallback(async()=>{const u=typeof t=="function"?await t():t;await navigator.clipboard.writeText(u),l(!0),setTimeout(()=>l(!1),3e3)},[t]);return w.jsx(jt,{style:r,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:o?n:e})},Or=({text:t})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),OS=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=$.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(c=>c!=="info"),[t]);if(!t)return w.jsx(Or,{text:"No action selected"});const o=t.startTime-e,l=pt(o);return w.jsxs("div",{className:"call-tab",children:[w.jsx("div",{className:"call-line",children:t.title}),w.jsx("div",{className:"call-section",children:"Time"}),w.jsx(Xp,{name:"start:",value:l}),w.jsx(Xp,{name:"duration:",value:RS(t)}),!!r.length&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Parameters"}),r.map(c=>Yp(Zp(t,c,t.params[c],n)))]}),!!t.result&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(c=>Yp(Zp(t,c,t.result[c],n)))]})]})},Xp=({name:t,value:e})=>w.jsxs("div",{className:"call-line",children:[t,w.jsx("span",{className:"call-value datetime",title:e,children:e})]});function RS(t){return t.endTime?pt(t.endTime-t.startTime):t.error?"Timed Out":"Running"}function Yp(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),w.jsxs("div",{className:"call-line",children:[t.name,":",w.jsx("span",{className:Ue("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&w.jsx(af,{value:t.text})]},t.name)}function Zp(t,e,n,r){const o=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&o)&&(n=Gl(n.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&o||e==="received"&&t.method==="expect")&&(n=Gl(n,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Mr(r||"javascript",t.params.selector),type:"locator",name:"locator"};const l=typeof n;return l!=="object"||n===null?{text:String(n),type:l,name:e}:n.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Gl(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Gl(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:o}of t.o)n[r]=Gl(o,e);return n}return t.h!==void 0?e===void 0?"<object>":e[t.h]:"<object>"}const eg=new Map;function oa({name:t,items:e=[],id:n,render:r,icon:o,isError:l,isWarning:c,isInfo:u,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:v,noItemsMessage:x,dataTestId:k,notSelectable:S,ariaLabel:E}){const N=$.useRef(null),[T,F]=$.useState();return $.useEffect(()=>{y==null||y(T)},[y,T]),$.useEffect(()=>{const O=N.current;if(!O)return;const D=()=>{eg.set(t,O.scrollTop)};return O.addEventListener("scroll",D,{passive:!0}),()=>O.removeEventListener("scroll",D)},[t]),$.useEffect(()=>{N.current&&(N.current.scrollTop=eg.get(t)||0)},[t]),w.jsx("div",{className:Ue("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"aria-label":E,children:w.jsxs("div",{className:Ue("list-view-content",S&&"not-selectable"),tabIndex:0,onKeyDown:O=>{var B;if(d&&O.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(O.key!=="ArrowDown"&&O.key!=="ArrowUp")return;O.stopPropagation(),O.preventDefault();const D=d?e.indexOf(d):-1;let z=D;O.key==="ArrowDown"&&(D===-1?z=0:z=Math.min(D+1,e.length-1)),O.key==="ArrowUp"&&(D===-1?z=e.length-1:z=Math.max(D-1,0));const G=(B=N.current)==null?void 0:B.children.item(z);Ug(G||void 0),y==null||y(void 0),m==null||m(e[z],z),F(void 0)},ref:N,children:[x&&e.length===0&&w.jsx("div",{className:"list-view-empty",children:x}),e.map((O,D)=>{const z=r(O,D);return w.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(O,D),role:"listitem",className:Ue("list-view-entry",d===O&&"selected",!S&&T===O&&"highlighted",(l==null?void 0:l(O,D))&&"error",(c==null?void 0:c(O,D))&&"warning",(u==null?void 0:u(O,D))&&"info"),"aria-selected":d===O,onClick:()=>m==null?void 0:m(O,D),onMouseEnter:()=>F(O),onMouseLeave:()=>F(void 0),children:[o&&w.jsx("div",{className:"codicon "+(o(O,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:G=>{G.preventDefault(),G.stopPropagation()},onClick:G=>{G.stopPropagation(),G.preventDefault(),v==null||v(O,D)}}),typeof z=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:z}):z]},(n==null?void 0:n(O,D))||D)})]})})}const $S=oa,DS=({action:t,isLive:e})=>{const n=$.useMemo(()=>{var c;if(!t||!t.log.length)return[];const r=t.log,o=t.context.wallTime-t.context.startTime,l=[];for(let u=0;u<r.length;++u){let d="";if(r[u].time!==-1){const p=(c=r[u])==null?void 0:c.time;u+1<r.length?d=pt(r[u+1].time-p):t.endTime>0?d=pt(t.endTime-p):e?d=pt(Date.now()-o-p):d="-"}l.push({message:r[u].message,time:d})}return l},[t,e]);return n.length?w.jsx($S,{name:"log",ariaLabel:"Log entries",items:n,render:r=>w.jsxs("div",{className:"log-list-item",children:[w.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):w.jsx(Or,{text:"No log entries"})};function Gi(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let o,l={},c=!1,u=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(o=n.exec(t))!==null;){const[,,p,,m]=o;if(p){const y=+p;switch(y){case 0:l={};break;case 1:l["font-weight"]="bold";break;case 2:l.opacity="0.8";break;case 3:l["font-style"]="italic";break;case 4:l["text-decoration"]="underline";break;case 7:c=!0;break;case 8:l.display="none";break;case 9:l["text-decoration"]="line-through";break;case 22:delete l["font-weight"],delete l["font-style"],delete l.opacity,delete l["text-decoration"];break;case 23:delete l["font-weight"],delete l["font-style"],delete l.opacity;break;case 24:delete l["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:u=tg[y-30];break;case 39:u=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=tg[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:l["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:u=ng[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=ng[y-100];break}}else if(m){const y={...l},v=c?d:u;v!==void 0&&(y.color=v);const x=c?u:d;x!==void 0&&(y["background-color"]=x),r.push(`<span style="${FS(y)}">${BS(m)}</span>`)}}return r.join("")}const tg={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)"},ng={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 BS(t){return t.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function FS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const zS=({error:t})=>{const e=$.useMemo(()=>Gi(t),[t]);return w.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},wm=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(Mt.useEffect(()=>{const o=document.createElement("div");return o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.left="0",o.style.zIndex="9999",o.style.cursor=t,document.body.appendChild(o),e&&o.addEventListener("mousemove",e),n&&o.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&o.removeEventListener("mousemove",e),n&&o.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(o)}},[t,e,n,r]),w.jsx(w.Fragment,{})),US={position:"absolute",top:0,right:0,bottom:0,left:0},Sm=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:o,minColumnWidth:l})=>{const c=l||0,[u,d]=Mt.useState(null),[p,m]=Pr(),y={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-o)/2,borderRightWidth:t==="horizontal"?(7-o)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-o)/2,borderLeftWidth:t==="horizontal"?(7-o)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return w.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-o)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!u&&w.jsx(wm,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(u){const x=t==="horizontal"?v.clientX-u.clientX:v.clientY-u.clientY,k=u.offset+x,S=u.index>0?e[u.index-1]:0,E=t==="horizontal"?p.width:p.height,N=Math.min(Math.max(S+c,k),E-c)-e[u.index];for(let T=u.index;T<e.length;++T)e[T]=e[T]+N;n([...e])}}}),e.map((v,x)=>w.jsx("div",{style:{...y,top:t==="horizontal"?0:v,left:t==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:k=>d({clientX:k.clientX,clientY:k.clientY,offset:v,index:x}),children:w.jsx("div",{style:{...US,background:r}})},x))]})};async function vu(t){const e=new Image;return t&&(e.src=t,await new Promise((n,r)=>{e.onload=n,e.onerror=n})),e}const Bu={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
43
43
  linear-gradient(-45deg, #80808020 25%, transparent 25%),
44
44
  linear-gradient(45deg, transparent 75%, #80808020 75%),
45
45
  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,
46
46
  rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
47
47
  rgb(0 0 0 / 10%) 0px -2px 4px,
48
48
  rgb(0 0 0 / 15%) 0px -6.1px 12px,
49
- rgb(0 0 0 / 25%) 0px 6px 12px`},US=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,m]=$.useState("Expected"),[y,v]=$.useState(null),[x,k]=$.useState(null),[S,E]=Pr();$.useEffect(()=>{(async()=>{var I,Z,oe,M;d(await vu((I=t.expected)==null?void 0:I.attachment.path)),m(((Z=t.expected)==null?void 0:Z.title)||"Expected"),v(await vu((oe=t.actual)==null?void 0:oe.attachment.path)),k(await vu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const N=u&&y&&x,T=N?Math.max(u.naturalWidth,y.naturalWidth,200):500,F=N?Math.max(u.naturalHeight,y.naturalHeight,200):500,O=Math.min(1,(S.width-30)/T),D=Math.min(1,(S.width-50)/T/2),z=T*O,G=F*O,B={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:E,children:N&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...B,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...B,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...B,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...B,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...B,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:G+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:p,hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),t.diff&&r==="slider"&&w.jsx(HS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:G,scale:O,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:D*T,canvasHeight:D*F,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*T,canvasHeight:D*F,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,canvasWidth:D*T,canvasHeight:D*F,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*T,canvasHeight:D*F,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},HS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.useState(n/2),m=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!m&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!m&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&w.jsx("span",{children:e.naturalWidth}),!m&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Du},children:[w.jsx(wm,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Du},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:o,height:l,margin:15,...Du},children:w.jsx("img",{width:t.naturalWidth*c,height:t.naturalHeight*c,alt:e||n,style:{cursor:u?"pointer":"initial"},draggable:"false",src:t.src,onClick:u})})]}),qS="modulepreload",VS=function(t,e){return new URL(t,e).href},rg={},WS=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const u=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(m=>{if(m=VS(m,r),m in rg)return;rg[m]=!0;const y=m.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!r)for(let S=u.length-1;S>=0;S--){const E=u[S];if(E.href===m&&(!y||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${v}`))return;const k=document.createElement("link");if(k.rel=y?"stylesheet":qS,y||(k.as="script"),k.crossOrigin="",k.href=m,p&&k.setAttribute("nonce",p),document.head.appendChild(k),y)return new Promise((S,E)=>{k.addEventListener("load",S),k.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},KS=20,Cs=({text:t,highlighter:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:v,placeholder:x})=>{const[k,S]=Pr(),[E]=$.useState(WS(()=>import("./codeMirrorModule-CLiCgG_Q.js"),__vite__mapDeps([0,1]),import.meta.url).then(O=>O.default)),N=$.useRef(null),[T,F]=$.useState();return $.useEffect(()=>{(async()=>{var B,I;const O=await E;QS(O);const D=S.current;if(!D)return;const z=XS(e)||JS(n)||(r?"text/linkified":"");if(N.current&&z===N.current.cm.getOption("mode")&&!!o===N.current.cm.getOption("readOnly")&&u===N.current.cm.getOption("lineNumbers")&&m===N.current.cm.getOption("lineWrapping")&&x===N.current.cm.getOption("placeholder"))return;(I=(B=N.current)==null?void 0:B.cm)==null||I.getWrapperElement().remove();const G=O(D,{value:"",mode:z,readOnly:!!o,lineNumbers:u,lineWrapping:m,placeholder:x});return N.current={cm:G},d&&G.focus(),F(G),G})()},[E,T,S,e,n,r,u,m,o,d,x]),$.useEffect(()=>{N.current&&N.current.cm.setSize(k.width,k.height)},[k]),$.useLayoutEffect(()=>{var z;if(!T)return;let O=!1;if(T.getValue()!==t&&(T.setValue(t),O=!0,p&&(T.execCommand("selectAll"),T.focus())),O||JSON.stringify(l)!==JSON.stringify(N.current.highlight)){for(const I of N.current.highlight||[])T.removeLineClass(I.line-1,"wrap");for(const I of l||[])T.addLineClass(I.line-1,"wrap",`source-line-${I.type}`);for(const I of N.current.widgets||[])T.removeLineWidget(I);for(const I of N.current.markers||[])I.clear();const G=[],B=[];for(const I of l||[]){if(I.type!=="subtle-error"&&I.type!=="error")continue;const Z=(z=N.current)==null?void 0:z.cm.getLine(I.line-1);if(Z){const oe={};oe.title=I.message||"",B.push(T.markText({line:I.line-1,ch:0},{line:I.line-1,ch:I.column||Z.length},{className:"source-line-error-underline",attributes:oe}))}if(I.type==="error"){const oe=document.createElement("div");oe.innerHTML=Gi(I.message||""),oe.className="source-line-error-widget",G.push(T.addLineWidget(I.line,oe,{above:!0,coverGutter:!1}))}}N.current.highlight=l,N.current.widgets=G,N.current.markers=B}typeof c=="number"&&N.current.cm.lineCount()>=c&&T.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return y&&(D=()=>y(T.getValue()),T.on("change",D)),()=>{D&&T.off("change",D)}},[T,t,l,c,p,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:GS})};function GS(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let sg=!1;function QS(t){sg||(sg=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Ug,token:"linkified"}]}))}function JS(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function XS(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}function YS(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const ZS=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:o})=>{const l=$.useId();return w.jsxs("div",{className:Ue("expandable",r&&"expanded"),children:[w.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":l,className:"expandable-title",onClick:()=>o&&n(!r),children:[w.jsx("div",{className:Ue("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!o&&n(!r)}),t]}),r&&w.jsx("div",{id:l,role:"region",style:{marginLeft:25},children:e})]})};function Sm(t){const e=[];let n=0,r;for(;(r=Ug.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(ex(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function ex(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const tx=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,p]=L0(),m=$.useRef(null),y=YS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=m.current)==null||S.scrollIntoView({behavior:"smooth"}),p()},[e,p]),$.useEffect(()=>{n&&o===null&&c===null&&(u("Loading ..."),fetch(la(t)).then(S=>S.text()).then(S=>{l(S),u(null)}).catch(S=>{u("Failed to load: "+S.message)}))},[n,o,c,t]);const x=$.useMemo(()=>{const S=o?o.split(`
50
- `).length:0;return Math.min(Math.max(5,S),20)*KS},[o]),k=w.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":t.name,children:[w.jsx("span",{children:Sm(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Pl(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:k}):w.jsxs("div",{className:Ue(d&&"yellow-flash"),children:[w.jsx(ZS,{title:k,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:c&&w.jsx("i",{children:c})}),n&&o!==null&&w.jsx("div",{className:"vbox",style:{height:x},children:w.jsx(Cs,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},nx=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:o}=$.useMemo(()=>{const l=new Set((t==null?void 0:t.visibleAttachments)??[]),c=new Set,u=new Map;for(const d of l){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const m=p[1],y=p[2],v=u.get(m)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,u.set(m,v),l.delete(d)}else d.contentType.startsWith("image/")&&(c.add(d),l.delete(d))}return{diffMap:u,attachments:l,screenshots:c}},[t]);return!n.size&&!r.size&&!o.size?w.jsx(Or,{text:"No attachments"}):w.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:l,actual:c,diff:u})=>w.jsxs(w.Fragment,{children:[l&&c&&w.jsx("div",{className:"attachments-section",children:"Image diff"}),l&&c&&w.jsx(US,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...l,path:Pl(l)},title:"Expected"},actual:{attachment:{...c,path:Pl(c)}},diff:u?{attachment:{...u,path:Pl(u)}}:void 0}})]})),r.size?w.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((l,c)=>{const u=la(l);return w.jsxs("div",{className:"attachment-item",children:[w.jsx("div",{children:w.jsx("img",{draggable:"false",src:u})}),w.jsx("div",{children:w.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:l.name})})]},`screenshot-${c}`)}),o.size?w.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((l,c)=>w.jsx("div",{className:"attachment-item",children:w.jsx(tx,{attachment:l,reveal:e&&rx(l,e[0])?e:void 0})},sx(l,c)))]})};function rx(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function la(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function Pl(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),la(t,e)}function sx(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const ix=`
49
+ rgb(0 0 0 / 25%) 0px 6px 12px`},HS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,m]=$.useState("Expected"),[y,v]=$.useState(null),[x,k]=$.useState(null),[S,E]=Pr();$.useEffect(()=>{(async()=>{var I,Z,oe,M;d(await vu((I=t.expected)==null?void 0:I.attachment.path)),m(((Z=t.expected)==null?void 0:Z.title)||"Expected"),v(await vu((oe=t.actual)==null?void 0:oe.attachment.path)),k(await vu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const N=u&&y&&x,T=N?Math.max(u.naturalWidth,y.naturalWidth,200):500,F=N?Math.max(u.naturalHeight,y.naturalHeight,200):500,O=Math.min(1,(S.width-30)/T),D=Math.min(1,(S.width-50)/T/2),z=T*O,G=F*O,B={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:E,children:N&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...B,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...B,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...B,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...B,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...B,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:G+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:p,hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),t.diff&&r==="slider"&&w.jsx(qS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:G,scale:O,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:D*T,canvasHeight:D*F,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*T,canvasHeight:D*F,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:z,canvasHeight:G,scale:O}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,canvasWidth:D*T,canvasHeight:D*F,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*T,canvasHeight:D*F,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},qS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.useState(n/2),m=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!m&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!m&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&w.jsx("span",{children:e.naturalWidth}),!m&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Bu},children:[w.jsx(Sm,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Bu},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:o,height:l,margin:15,...Bu},children:w.jsx("img",{width:t.naturalWidth*c,height:t.naturalHeight*c,alt:e||n,style:{cursor:u?"pointer":"initial"},draggable:"false",src:t.src,onClick:u})})]}),VS="modulepreload",WS=function(t,e){return new URL(t,e).href},rg={},KS=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const u=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(m=>{if(m=WS(m,r),m in rg)return;rg[m]=!0;const y=m.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!r)for(let S=u.length-1;S>=0;S--){const E=u[S];if(E.href===m&&(!y||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${v}`))return;const k=document.createElement("link");if(k.rel=y?"stylesheet":VS,y||(k.as="script"),k.crossOrigin="",k.href=m,p&&k.setAttribute("nonce",p),document.head.appendChild(k),y)return new Promise((S,E)=>{k.addEventListener("load",S),k.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},GS=20,Cs=({text:t,highlighter:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:v,placeholder:x})=>{const[k,S]=Pr(),[E]=$.useState(KS(()=>import("./codeMirrorModule-DhpE2H4B.js"),__vite__mapDeps([0,1]),import.meta.url).then(O=>O.default)),N=$.useRef(null),[T,F]=$.useState();return $.useEffect(()=>{(async()=>{var B,I;const O=await E;JS(O);const D=S.current;if(!D)return;const z=YS(e)||XS(n)||(r?"text/linkified":"");if(N.current&&z===N.current.cm.getOption("mode")&&!!o===N.current.cm.getOption("readOnly")&&u===N.current.cm.getOption("lineNumbers")&&m===N.current.cm.getOption("lineWrapping")&&x===N.current.cm.getOption("placeholder"))return;(I=(B=N.current)==null?void 0:B.cm)==null||I.getWrapperElement().remove();const G=O(D,{value:"",mode:z,readOnly:!!o,lineNumbers:u,lineWrapping:m,placeholder:x});return N.current={cm:G},d&&G.focus(),F(G),G})()},[E,T,S,e,n,r,u,m,o,d,x]),$.useEffect(()=>{N.current&&N.current.cm.setSize(k.width,k.height)},[k]),$.useLayoutEffect(()=>{var z;if(!T)return;let O=!1;if(T.getValue()!==t&&(T.setValue(t),O=!0,p&&(T.execCommand("selectAll"),T.focus())),O||JSON.stringify(l)!==JSON.stringify(N.current.highlight)){for(const I of N.current.highlight||[])T.removeLineClass(I.line-1,"wrap");for(const I of l||[])T.addLineClass(I.line-1,"wrap",`source-line-${I.type}`);for(const I of N.current.widgets||[])T.removeLineWidget(I);for(const I of N.current.markers||[])I.clear();const G=[],B=[];for(const I of l||[]){if(I.type!=="subtle-error"&&I.type!=="error")continue;const Z=(z=N.current)==null?void 0:z.cm.getLine(I.line-1);if(Z){const oe={};oe.title=I.message||"",B.push(T.markText({line:I.line-1,ch:0},{line:I.line-1,ch:I.column||Z.length},{className:"source-line-error-underline",attributes:oe}))}if(I.type==="error"){const oe=document.createElement("div");oe.innerHTML=Gi(I.message||""),oe.className="source-line-error-widget",G.push(T.addLineWidget(I.line,oe,{above:!0,coverGutter:!1}))}}N.current.highlight=l,N.current.widgets=G,N.current.markers=B}typeof c=="number"&&N.current.cm.lineCount()>=c&&T.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return y&&(D=()=>y(T.getValue()),T.on("change",D)),()=>{D&&T.off("change",D)}},[T,t,l,c,p,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:QS})};function QS(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let sg=!1;function JS(t){sg||(sg=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Hg,token:"linkified"}]}))}function XS(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function YS(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}function ZS(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const ex=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:o})=>{const l=$.useId();return w.jsxs("div",{className:Ue("expandable",r&&"expanded"),children:[w.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":l,className:"expandable-title",onClick:()=>o&&n(!r),children:[w.jsx("div",{className:Ue("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!o&&n(!r)}),t]}),r&&w.jsx("div",{id:l,role:"region",style:{marginLeft:25},children:e})]})};function xm(t){const e=[];let n=0,r;for(;(r=Hg.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(tx(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function tx(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const nx=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,p]=I0(),m=$.useRef(null),y=ZS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=m.current)==null||S.scrollIntoView({behavior:"smooth"}),p()},[e,p]),$.useEffect(()=>{n&&o===null&&c===null&&(u("Loading ..."),fetch(la(t)).then(S=>S.text()).then(S=>{l(S),u(null)}).catch(S=>{u("Failed to load: "+S.message)}))},[n,o,c,t]);const x=$.useMemo(()=>{const S=o?o.split(`
50
+ `).length:0;return Math.min(Math.max(5,S),20)*GS},[o]),k=w.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":t.name,children:[w.jsx("span",{children:xm(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Pl(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:k}):w.jsxs("div",{className:Ue(d&&"yellow-flash"),children:[w.jsx(ex,{title:k,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:c&&w.jsx("i",{children:c})}),n&&o!==null&&w.jsx("div",{className:"vbox",style:{height:x},children:w.jsx(Cs,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},rx=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:o}=$.useMemo(()=>{const l=new Set((t==null?void 0:t.visibleAttachments)??[]),c=new Set,u=new Map;for(const d of l){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const m=p[1],y=p[2],v=u.get(m)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,u.set(m,v),l.delete(d)}else d.contentType.startsWith("image/")&&(c.add(d),l.delete(d))}return{diffMap:u,attachments:l,screenshots:c}},[t]);return!n.size&&!r.size&&!o.size?w.jsx(Or,{text:"No attachments"}):w.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:l,actual:c,diff:u})=>w.jsxs(w.Fragment,{children:[l&&c&&w.jsx("div",{className:"attachments-section",children:"Image diff"}),l&&c&&w.jsx(HS,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...l,path:Pl(l)},title:"Expected"},actual:{attachment:{...c,path:Pl(c)}},diff:u?{attachment:{...u,path:Pl(u)}}:void 0}})]})),r.size?w.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((l,c)=>{const u=la(l);return w.jsxs("div",{className:"attachment-item",children:[w.jsx("div",{children:w.jsx("img",{draggable:"false",src:u})}),w.jsx("div",{children:w.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:l.name})})]},`screenshot-${c}`)}),o.size?w.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((l,c)=>w.jsx("div",{className:"attachment-item",children:w.jsx(nx,{attachment:l,reveal:e&&sx(l,e[0])?e:void 0})},ix(l,c)))]})};function sx(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function la(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function Pl(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),la(t,e)}function ix(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const ox=`
51
51
  # Instructions
52
52
 
53
53
  - Following Playwright test failed.
54
54
  - Explain why, be concise, respect Playwright best practices.
55
55
  - Provide a snippet of code with the fix, if possible.
56
- `.trimStart();async function ox({testInfo:t,metadata:e,errorContext:n,errors:r,buildCodeFrame:o,stdout:l,stderr:c}){var y;const u=new Set(r.filter(v=>v.message&&!v.message.includes(`
56
+ `.trimStart();async function lx({testInfo:t,metadata:e,errorContext:n,errors:r,buildCodeFrame:o,stdout:l,stderr:c}){var y;const u=new Set(r.filter(v=>v.message&&!v.message.includes(`
57
57
  `)).map(v=>v.message));for(const v of r)for(const x of u.keys())(y=v.message)!=null&&y.includes(x)&&u.delete(x);const d=r.filter(v=>!(!v.message||!v.message.includes(`
58
- `)&&!u.has(v.message)));if(!d.length)return;const p=[ix,"# Test info","",t];l&&p.push("","# Stdout","","```",Ol(l),"```"),c&&p.push("","# Stderr","","```",Ol(c),"```"),p.push("","# Error details");for(const v of d)p.push("","```",Ol(v.message||""),"```");n&&p.push(n);const m=await o(d[d.length-1]);return m&&p.push("","# Test source","","```ts",m,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
59
- `)}const lx=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 Ol(t){return t.replace(lx,"")}const ax=oa,cx=({stack:t,setSelectedFrame:e,selectedFrame:n})=>{const r=t||[];return w.jsx(ax,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[n],render:o=>{const l=o.file[1]===":"?"\\":"/";return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"stack-trace-frame-function",children:o.function||"(anonymous)"}),w.jsx("span",{className:"stack-trace-frame-location",children:o.file.split(l).pop()}),w.jsx("span",{className:"stack-trace-frame-line",children:":"+o.line})]})},onSelected:o=>e(r.indexOf(o))})},af=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:o,onClick:l})=>w.jsx("div",{className:Ue("toolbar",t&&"no-shadow",n&&"no-min-height",r,o&&"toolbar-sidebar-background"),onClick:l,children:e});function ux(t,e,n,r,o){return Ul(async()=>{var v,x,k,S;const l=t==null?void 0:t[e],c=l!=null&&l.file?l:o;if(!c)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const u=c.file;let d=n.get(u);d||(d={errors:((v=o==null?void 0:o.source)==null?void 0:v.errors)||[],content:(x=o==null?void 0:o.source)==null?void 0:x.content},n.set(u,d));const p=(c==null?void 0:c.line)||((k=d.errors[0])==null?void 0:k.line)||0,m=r&&u.startsWith(r)?u.substring(r.length+1):u,y=d.errors.map(E=>({type:"error",line:E.line,message:E.message}));if(y.push({line:p,type:"running"}),((S=o==null?void 0:o.source)==null?void 0:S.content)!==void 0)d.content=o.source.content;else if(d.content===void 0||c===o){const E=await xm(u);try{let N=await fetch(`sha1/src@${E}.txt`);N.status===404&&(N=await fetch(`file?path=${encodeURIComponent(u)}`)),N.status>=400?d.content=`<Unable to read "${u}">`:d.content=await N.text()}catch{d.content=`<Unable to read "${u}">`}}return{source:d,highlight:y,targetLine:p,fileName:m,location:c}},[t,e,r,o],{source:{errors:[],content:"Loading…"},highlight:[]})}const fx=({stack:t,sources:e,rootDir:n,fallbackLocation:r,stackFrameLocation:o,onOpenExternally:l})=>{const[c,u]=$.useState(),[d,p]=$.useState(0);$.useEffect(()=>{c!==t&&(u(t),p(0))},[t,c,u,p]);const{source:m,highlight:y,targetLine:v,fileName:x,location:k}=ux(t,d,e,n,r),S=$.useCallback(()=>{k&&(l?l(k):window.location.href=`vscode://file//${k.file}:${k.line}`)},[l,k]),E=((t==null?void 0:t.length)??0)>1,N=dx(x);return w.jsx(ql,{sidebarSize:200,orientation:o==="bottom"?"vertical":"horizontal",sidebarHidden:!E,main:w.jsxs("div",{className:"vbox","data-testid":"source-code",children:[x&&w.jsxs(af,{children:[w.jsx("div",{className:"source-tab-file-name",title:x,children:w.jsx("div",{children:N})}),w.jsx(lf,{description:"Copy filename",value:N}),k&&w.jsx(jt,{icon:"link-external",title:"Open in VS Code",onClick:S})]}),w.jsx(Cs,{text:m.content||"",highlighter:"javascript",highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:w.jsx(cx,{stack:t,selectedFrame:d,setSelectedFrame:p})})};async function xm(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-1",e),r=[],o=new DataView(n);for(let l=0;l<o.byteLength;l+=1){const c=o.getUint8(l).toString(16).padStart(2,"0");r.push(c)}return r.join("")}function dx(t){if(!t)return"";const e=t!=null&&t.includes("/")?"/":"\\";return(t==null?void 0:t.split(e).pop())??""}const hx=({prompt:t})=>w.jsx(jl,{value:t,description:"Copy prompt",copiedDescription:w.jsxs(w.Fragment,{children:["Copied ",w.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function px(t){return $.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}function gx({message:t,error:e,sdkLanguage:n,revealInSource:r}){var u;let o,l;const c=(u=e.stack)==null?void 0:u[0];return c&&(o=c.file.replace(/.*[/\\](.*)/,"$1")+":"+c.line,l=c.file+":"+c.line),w.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[w.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&of(e.action,{sdkLanguage:n}),o&&w.jsxs("div",{className:"action-location",children:["@ ",w.jsx("span",{title:l,onClick:()=>r(e),children:o})]})]}),w.jsx(FS,{error:t})]})}const mx=({errorsModel:t,model:e,sdkLanguage:n,revealInSource:r,wallTime:o,testRunMetadata:l})=>{const c=Ul(async()=>{const p=e==null?void 0:e.attachments.find(m=>m.name==="error-context");if(p)return await fetch(la(p)).then(m=>m.text())},[e],void 0),u=$.useCallback(async p=>{var x;const m=(x=p.stack)==null?void 0:x[0];if(!m)return;let y=await fetch(`sha1/src@${await xm(m.file)}.txt`);if(y.status===404&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const v=await y.text();return yx({source:v,message:Ol(p.message).split(`
60
- `)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[]),d=Ul(()=>ox({testInfo:(e==null?void 0:e.title)??"",metadata:l,errorContext:c,errors:(e==null?void 0:e.errorDescriptors)??[],buildCodeFrame:u}),[c,l,e,u],void 0);return t.errors.size?w.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[w.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&w.jsx(hx,{prompt:d})}),[...t.errors.entries()].map(([p,m])=>{const y=`error-${o}-${p}`;return w.jsx(gx,{message:p,error:m,revealInSource:r,sdkLanguage:n},y)})]}):w.jsx(Or,{text:"No errors"})};function yx({source:t,message:e,location:n,linesAbove:r,linesBelow:o}){const l=t.split(`
58
+ `)&&!u.has(v.message)));if(!d.length)return;const p=[ox,"# Test info","",t];l&&p.push("","# Stdout","","```",Ol(l),"```"),c&&p.push("","# Stderr","","```",Ol(c),"```"),p.push("","# Error details");for(const v of d)p.push("","```",Ol(v.message||""),"```");n&&p.push(n);const m=await o(d[d.length-1]);return m&&p.push("","# Test source","","```ts",m,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
59
+ `)}const ax=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 Ol(t){return t.replace(ax,"")}const cx=oa,ux=({stack:t,setSelectedFrame:e,selectedFrame:n})=>{const r=t||[];return w.jsx(cx,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[n],render:o=>{const l=o.file[1]===":"?"\\":"/";return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"stack-trace-frame-function",children:o.function||"(anonymous)"}),w.jsx("span",{className:"stack-trace-frame-location",children:o.file.split(l).pop()}),w.jsx("span",{className:"stack-trace-frame-line",children:":"+o.line})]})},onSelected:o=>e(r.indexOf(o))})},cf=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:o,onClick:l})=>w.jsx("div",{className:Ue("toolbar",t&&"no-shadow",n&&"no-min-height",r,o&&"toolbar-sidebar-background"),onClick:l,children:e});function fx(t,e,n,r,o){return Ul(async()=>{var v,x,k,S;const l=t==null?void 0:t[e],c=l!=null&&l.file?l:o;if(!c)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const u=c.file;let d=n.get(u);d||(d={errors:((v=o==null?void 0:o.source)==null?void 0:v.errors)||[],content:(x=o==null?void 0:o.source)==null?void 0:x.content},n.set(u,d));const p=(c==null?void 0:c.line)||((k=d.errors[0])==null?void 0:k.line)||0,m=r&&u.startsWith(r)?u.substring(r.length+1):u,y=d.errors.map(E=>({type:"error",line:E.line,message:E.message}));if(y.push({line:p,type:"running"}),((S=o==null?void 0:o.source)==null?void 0:S.content)!==void 0)d.content=o.source.content;else if(d.content===void 0||c===o){const E=await _m(u);try{let N=await fetch(`sha1/src@${E}.txt`);N.status===404&&(N=await fetch(`file?path=${encodeURIComponent(u)}`)),N.status>=400?d.content=`<Unable to read "${u}">`:d.content=await N.text()}catch{d.content=`<Unable to read "${u}">`}}return{source:d,highlight:y,targetLine:p,fileName:m,location:c}},[t,e,r,o],{source:{errors:[],content:"Loading…"},highlight:[]})}const dx=({stack:t,sources:e,rootDir:n,fallbackLocation:r,stackFrameLocation:o,onOpenExternally:l})=>{const[c,u]=$.useState(),[d,p]=$.useState(0);$.useEffect(()=>{c!==t&&(u(t),p(0))},[t,c,u,p]);const{source:m,highlight:y,targetLine:v,fileName:x,location:k}=fx(t,d,e,n,r),S=$.useCallback(()=>{k&&(l?l(k):window.location.href=`vscode://file//${k.file}:${k.line}`)},[l,k]),E=((t==null?void 0:t.length)??0)>1,N=hx(x);return w.jsx(ql,{sidebarSize:200,orientation:o==="bottom"?"vertical":"horizontal",sidebarHidden:!E,main:w.jsxs("div",{className:"vbox","data-testid":"source-code",children:[x&&w.jsxs(cf,{children:[w.jsx("div",{className:"source-tab-file-name",title:x,children:w.jsx("div",{children:N})}),w.jsx(af,{description:"Copy filename",value:N}),k&&w.jsx(jt,{icon:"link-external",title:"Open in VS Code",onClick:S})]}),w.jsx(Cs,{text:m.content||"",highlighter:"javascript",highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:w.jsx(ux,{stack:t,selectedFrame:d,setSelectedFrame:p})})};async function _m(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-1",e),r=[],o=new DataView(n);for(let l=0;l<o.byteLength;l+=1){const c=o.getUint8(l).toString(16).padStart(2,"0");r.push(c)}return r.join("")}function hx(t){if(!t)return"";const e=t!=null&&t.includes("/")?"/":"\\";return(t==null?void 0:t.split(e).pop())??""}const px=({prompt:t})=>w.jsx(jl,{value:t,description:"Copy prompt",copiedDescription:w.jsxs(w.Fragment,{children:["Copied ",w.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function gx(t){return $.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}function mx({message:t,error:e,sdkLanguage:n,revealInSource:r}){var u;let o,l;const c=(u=e.stack)==null?void 0:u[0];return c&&(o=c.file.replace(/.*[/\\](.*)/,"$1")+":"+c.line,l=c.file+":"+c.line),w.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[w.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&lf(e.action,{sdkLanguage:n}),o&&w.jsxs("div",{className:"action-location",children:["@ ",w.jsx("span",{title:l,onClick:()=>r(e),children:o})]})]}),w.jsx(zS,{error:t})]})}const yx=({errorsModel:t,model:e,sdkLanguage:n,revealInSource:r,wallTime:o,testRunMetadata:l})=>{const c=Ul(async()=>{const p=e==null?void 0:e.attachments.find(m=>m.name==="error-context");if(p)return await fetch(la(p)).then(m=>m.text())},[e],void 0),u=$.useCallback(async p=>{var x;const m=(x=p.stack)==null?void 0:x[0];if(!m)return;let y=await fetch(`sha1/src@${await _m(m.file)}.txt`);if(y.status===404&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const v=await y.text();return vx({source:v,message:Ol(p.message).split(`
60
+ `)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[]),d=Ul(()=>lx({testInfo:(e==null?void 0:e.title)??"",metadata:l,errorContext:c,errors:(e==null?void 0:e.errorDescriptors)??[],buildCodeFrame:u}),[c,l,e,u],void 0);return t.errors.size?w.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[w.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&w.jsx(px,{prompt:d})}),[...t.errors.entries()].map(([p,m])=>{const y=`error-${o}-${p}`;return w.jsx(mx,{message:p,error:m,revealInSource:r,sdkLanguage:n},y)})]}):w.jsx(Or,{text:"No errors"})};function vx({source:t,message:e,location:n,linesAbove:r,linesBelow:o}){const l=t.split(`
61
61
  `).slice(),c=Math.max(0,n.line-r-1),u=Math.min(l.length,n.line+o),d=l.slice(c,u),p=String(u).length,m=d.map((y,v)=>`${c+v+1===n.line?"> ":" "}${(c+v+1).toString().padEnd(p," ")} | ${y}`);return e&&m.splice(n.line-c,0,`${" ".repeat(p+2)} | ${" ".repeat(n.column-2)} ^ ${e}`),m.join(`
62
- `)}const vx=oa;function wx(t,e){const{entries:n}=$.useMemo(()=>{if(!t)return{entries:[]};const o=[];function l(u){var m,y,v,x,k,S;const d=o[o.length-1];d&&((m=u.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=u.browserMessage)==null?void 0:v.location)===((x=d.browserMessage)==null?void 0:x.location)&&u.browserError===d.browserError&&((k=u.nodeMessage)==null?void 0:k.html)===((S=d.nodeMessage)==null?void 0:S.html)&&u.isError===d.isError&&u.isWarning===d.isWarning&&u.timestamp-d.timestamp<1e3?d.repeat++:o.push({...u,repeat:1})}const c=[...t.events,...t.stdio].sort((u,d)=>{const p="time"in u?u.time:u.timestamp,m="time"in d?d.time:d.timestamp;return p-m});for(const u of c){if(u.type==="console"){const d=u.args&&u.args.length?xx(u.args):_m(u.text),p=u.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${u.location.lineNumber}`;l({browserMessage:{body:d,bodyString:u.text,location:y},isError:u.messageType==="error",isWarning:u.messageType==="warning",timestamp:u.time})}if(u.type==="event"&&u.method==="pageError"&&l({browserError:u.params.error,isError:!0,isWarning:!1,timestamp:u.time}),u.type==="stderr"||u.type==="stdout"){let d="";u.text&&(d=Gi(u.text.trim())||""),u.base64&&(d=Gi(atob(u.base64).trim())||""),l({nodeMessage:{html:d},isError:u.type==="stderr",isWarning:!1,timestamp:u.timestamp})}}return{entries:o}},[t]);return{entries:$.useMemo(()=>e?n.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):n,[n,e])}}const Sx=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(vx,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:o=>o.isError,isWarning:o=>o.isWarning,render:o=>{const l=pt(o.timestamp-e.minimum),c=w.jsx("span",{className:"console-time",children:l}),u=o.isError?"status-error":o.isWarning?"status-warning":"status-none",d=o.browserMessage||o.browserError?w.jsx("span",{className:Ue("codicon","codicon-browser",u),title:"Browser message"}):w.jsx("span",{className:Ue("codicon","codicon-file",u),title:"Runner message"});let p,m,y,v;const{browserMessage:x,browserError:k,nodeMessage:S}=o;if(x&&(p=x.location,m=x.body),k){const{error:E,value:N}=k;E?(m=E.message,v=E.stack):m=String(N)}return S&&(y=S.html),w.jsxs("div",{className:"console-line",children:[c,d,p&&w.jsx("span",{className:"console-location",children:p}),o.repeat>1&&w.jsx("span",{className:"console-repeat",children:o.repeat}),m&&w.jsx("span",{className:"console-line-message",children:m}),y&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&w.jsx("div",{className:"console-stack",children:v})]})}})}):w.jsx(Or,{text:"No console entries"});function xx(t){if(t.length===1)return _m(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let o=0;const l=/%([%sdifoOc])/g;let c;const u=[];let d=[];u.push(w.jsx("span",{children:d},u.length+1));let p=0;for(;(c=l.exec(n))!==null;){const m=n.substring(p,c.index);d.push(w.jsx("span",{children:m},d.length+1)),p=c.index+2;const y=c[0][1];if(y==="%")d.push(w.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=r[o++],x={};typeof(v==null?void 0:v.value)!="string"&&(x.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:x,children:(v==null?void 0:v.preview)||""},d.length+1))}else if(y==="c"){d=[];const v=r[o++],x=v?_x(v.preview):{};u.push(w.jsx("span",{style:x,children:d},u.length+1))}}for(p<n.length&&d.push(w.jsx("span",{children:n.substring(p)},d.length+1));o<r.length;o++){const m=r[o],y={};d.length&&d.push(w.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return u}function _m(t){return[w.jsx("span",{dangerouslySetInnerHTML:{__html:Gi(t.trim())}})]}function _x(t){try{const e={},n=t.split(";");for(const r of n){const o=r.trim();if(!o)continue;let[l,c]=o.split(":");if(l=l.trim(),c=c.trim(),!Ex(l))continue;const u=l.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[u]=c}return e}catch{return{}}}function Ex(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Bu=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:o,dataTestId:l,mode:c})=>{const u=$.useId();return e||(e=t[0].id),c||(c="default"),w.jsx("div",{className:"tabbed-pane","data-testid":l,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(af,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),c==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(d=>w.jsx(Em,{id:d.id,ariaControls:`${u}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:n},d.id))]}),c==="select"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:w.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{n==null||n(t[d.currentTarget.selectedIndex].id)},children:t.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),w.jsxs("option",{value:d.id,role:"tab","aria-controls":`${u}-${d.id}`,children:[d.title,p]},d.id)})})}),o&&w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...o]})]}),t.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return w.jsx("div",{id:`${u}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return w.jsx("div",{id:`${u}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},Em=({id:t,title:e,count:n,errorCount:r,selected:o,onSelect:l,ariaControls:c})=>w.jsxs("div",{className:Ue("tabbed-pane-tab",o&&"selected"),onClick:()=>l==null?void 0:l(t),role:"tab",title:e,"aria-controls":c,children:[w.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!n&&w.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&w.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]});async function kx(t){const e=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(y){return'^"'+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
62
+ `)}const wx=oa;function Sx(t,e){const{entries:n}=$.useMemo(()=>{if(!t)return{entries:[]};const o=[];function l(u){var m,y,v,x,k,S;const d=o[o.length-1];d&&((m=u.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=u.browserMessage)==null?void 0:v.location)===((x=d.browserMessage)==null?void 0:x.location)&&u.browserError===d.browserError&&((k=u.nodeMessage)==null?void 0:k.html)===((S=d.nodeMessage)==null?void 0:S.html)&&u.isError===d.isError&&u.isWarning===d.isWarning&&u.timestamp-d.timestamp<1e3?d.repeat++:o.push({...u,repeat:1})}const c=[...t.events,...t.stdio].sort((u,d)=>{const p="time"in u?u.time:u.timestamp,m="time"in d?d.time:d.timestamp;return p-m});for(const u of c){if(u.type==="console"){const d=u.args&&u.args.length?_x(u.args):Em(u.text),p=u.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${u.location.lineNumber}`;l({browserMessage:{body:d,bodyString:u.text,location:y},isError:u.messageType==="error",isWarning:u.messageType==="warning",timestamp:u.time})}if(u.type==="event"&&u.method==="pageError"&&l({browserError:u.params.error,isError:!0,isWarning:!1,timestamp:u.time}),u.type==="stderr"||u.type==="stdout"){let d="";u.text&&(d=Gi(u.text.trim())||""),u.base64&&(d=Gi(atob(u.base64).trim())||""),l({nodeMessage:{html:d},isError:u.type==="stderr",isWarning:!1,timestamp:u.timestamp})}}return{entries:o}},[t]);return{entries:$.useMemo(()=>e?n.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):n,[n,e])}}const xx=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(wx,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:o=>o.isError,isWarning:o=>o.isWarning,render:o=>{const l=pt(o.timestamp-e.minimum),c=w.jsx("span",{className:"console-time",children:l}),u=o.isError?"status-error":o.isWarning?"status-warning":"status-none",d=o.browserMessage||o.browserError?w.jsx("span",{className:Ue("codicon","codicon-browser",u),title:"Browser message"}):w.jsx("span",{className:Ue("codicon","codicon-file",u),title:"Runner message"});let p,m,y,v;const{browserMessage:x,browserError:k,nodeMessage:S}=o;if(x&&(p=x.location,m=x.body),k){const{error:E,value:N}=k;E?(m=E.message,v=E.stack):m=String(N)}return S&&(y=S.html),w.jsxs("div",{className:"console-line",children:[c,d,p&&w.jsx("span",{className:"console-location",children:p}),o.repeat>1&&w.jsx("span",{className:"console-repeat",children:o.repeat}),m&&w.jsx("span",{className:"console-line-message",children:m}),y&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&w.jsx("div",{className:"console-stack",children:v})]})}})}):w.jsx(Or,{text:"No console entries"});function _x(t){if(t.length===1)return Em(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let o=0;const l=/%([%sdifoOc])/g;let c;const u=[];let d=[];u.push(w.jsx("span",{children:d},u.length+1));let p=0;for(;(c=l.exec(n))!==null;){const m=n.substring(p,c.index);d.push(w.jsx("span",{children:m},d.length+1)),p=c.index+2;const y=c[0][1];if(y==="%")d.push(w.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=r[o++],x={};typeof(v==null?void 0:v.value)!="string"&&(x.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:x,children:(v==null?void 0:v.preview)||""},d.length+1))}else if(y==="c"){d=[];const v=r[o++],x=v?Ex(v.preview):{};u.push(w.jsx("span",{style:x,children:d},u.length+1))}}for(p<n.length&&d.push(w.jsx("span",{children:n.substring(p)},d.length+1));o<r.length;o++){const m=r[o],y={};d.length&&d.push(w.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return u}function Em(t){return[w.jsx("span",{dangerouslySetInnerHTML:{__html:Gi(t.trim())}})]}function Ex(t){try{const e={},n=t.split(";");for(const r of n){const o=r.trim();if(!o)continue;let[l,c]=o.split(":");if(l=l.trim(),c=c.trim(),!kx(l))continue;const u=l.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[u]=c}return e}catch{return{}}}function kx(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Fu=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:o,dataTestId:l,mode:c})=>{const u=$.useId();return e||(e=t[0].id),c||(c="default"),w.jsx("div",{className:"tabbed-pane","data-testid":l,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(cf,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),c==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(d=>w.jsx(km,{id:d.id,ariaControls:`${u}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:n},d.id))]}),c==="select"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:w.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{n==null||n(t[d.currentTarget.selectedIndex].id)},children:t.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),w.jsxs("option",{value:d.id,role:"tab","aria-controls":`${u}-${d.id}`,children:[d.title,p]},d.id)})})}),o&&w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...o]})]}),t.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return w.jsx("div",{id:`${u}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return w.jsx("div",{id:`${u}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},km=({id:t,title:e,count:n,errorCount:r,selected:o,onSelect:l,ariaControls:c})=>w.jsxs("div",{className:Ue("tabbed-pane-tab",o&&"selected"),onClick:()=>l==null?void 0:l(t),role:"tab",title:e,"aria-controls":c,children:[w.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!n&&w.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&w.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]});async function bx(t){const e=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(y){return'^"'+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
63
63
 
64
- `)+'^"'}function l(y){function v(x){let S=x.charCodeAt(0).toString(16);for(;S.length<4;)S="0"+S;return"\\u"+S}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+y+"'"}const c=e==="win"?o:l;n.push(c(t.request.url).replace(/[[{}\]]/g,"\\$&"));let u="GET";const d=[],p=await km(t);p&&(d.push("--data-raw "+c(p)),r.add("content-length"),u="POST"),t.request.method!==u&&n.push("-X "+c(t.request.method));const m=t.request.headers;for(let y=0;y<m.length;y++){const v=m[y],x=v.name.replace(/^:/,"");r.has(x.toLowerCase())||(v.value.trim()?n.push("-H "+c(x+": "+v.value)):n.push("-H "+c(x+";")))}return n=n.concat(d),"curl "+n.join(n.length>=3?e==="win"?` ^
64
+ `)+'^"'}function l(y){function v(x){let S=x.charCodeAt(0).toString(16);for(;S.length<4;)S="0"+S;return"\\u"+S}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+y+"'"}const c=e==="win"?o:l;n.push(c(t.request.url).replace(/[[{}\]]/g,"\\$&"));let u="GET";const d=[],p=await bm(t);p&&(d.push("--data-raw "+c(p)),r.add("content-length"),u="POST"),t.request.method!==u&&n.push("-X "+c(t.request.method));const m=t.request.headers;for(let y=0;y<m.length;y++){const v=m[y],x=v.name.replace(/^:/,"");r.has(x.toLowerCase())||(v.value.trim()?n.push("-H "+c(x+": "+v.value)):n.push("-H "+c(x+";")))}return n=n.concat(d),"curl "+n.join(n.length>=3?e==="win"?` ^
65
65
  `:` \\
66
- `:" ")}async function bx(t,e=0){const n=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"]),r=new Set(["cookie","authorization"]),o=JSON.stringify(t.request.url),l=t.request.headers,c=l.reduce((k,S)=>{const E=S.name;return!n.has(E.toLowerCase())&&!E.includes(":")&&k.append(E,S.value),k},new Headers),u={};for(const k of c)u[k[0]]=k[1];const d=t.request.cookies.length||l.some(({name:k})=>r.has(k.toLowerCase()))?"include":"omit",p=l.find(({name:k})=>k.toLowerCase()==="referer"),m=p?p.value:void 0,y=await km(t),v={headers:Object.keys(u).length?u:void 0,referrer:m,body:y,method:t.request.method,mode:"cors"};if(e===1){const k=l.find(E=>E.name.toLowerCase()==="cookie"),S={};delete v.mode,k&&(S.cookie=k.value),m&&(delete v.referrer,S.Referer=m),Object.keys(S).length&&(v.headers={...u,...S})}else v.credentials=d;const x=JSON.stringify(v,null,2);return`fetch(${o}, ${x});`}async function km(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class Tx{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const o=new URL(e.url),l=`${o.origin}${o.pathname}`,c={};["delete","get","head","post","put","patch"].includes(r)||(c.method=r,r="fetch"),o.searchParams.size&&(c.params=Object.fromEntries(o.searchParams.entries())),n&&(c.data=n),e.headers.length&&(c.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const u=[`'${l}'`];return Object.keys(c).length>0&&u.push(this.prettyPrintObject(c)),`await page.request.${r}(${u.join(", ")});`}prettyPrintObject(e,n=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 u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
66
+ `:" ")}async function Tx(t,e=0){const n=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"]),r=new Set(["cookie","authorization"]),o=JSON.stringify(t.request.url),l=t.request.headers,c=l.reduce((k,S)=>{const E=S.name;return!n.has(E.toLowerCase())&&!E.includes(":")&&k.append(E,S.value),k},new Headers),u={};for(const k of c)u[k[0]]=k[1];const d=t.request.cookies.length||l.some(({name:k})=>r.has(k.toLowerCase()))?"include":"omit",p=l.find(({name:k})=>k.toLowerCase()==="referer"),m=p?p.value:void 0,y=await bm(t),v={headers:Object.keys(u).length?u:void 0,referrer:m,body:y,method:t.request.method,mode:"cors"};if(e===1){const k=l.find(E=>E.name.toLowerCase()==="cookie"),S={};delete v.mode,k&&(S.cookie=k.value),m&&(delete v.referrer,S.Referer=m),Object.keys(S).length&&(v.headers={...u,...S})}else v.credentials=d;const x=JSON.stringify(v,null,2);return`fetch(${o}, ${x});`}async function bm(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class Cx{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const o=new URL(e.url),l=`${o.origin}${o.pathname}`,c={};["delete","get","head","post","put","patch"].includes(r)||(c.method=r,r="fetch"),o.searchParams.size&&(c.params=Object.fromEntries(o.searchParams.entries())),n&&(c.data=n),e.headers.length&&(c.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const u=[`'${l}'`];return Object.keys(c).length>0&&u.push(this.prettyPrintObject(c)),`await page.request.${r}(${u.join(", ")});`}prettyPrintObject(e,n=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 u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
67
67
  ${e.map(m=>`${d}${this.prettyPrintObject(m,n,r+1)}`).join(`,
68
68
  `)}
69
69
  ${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
70
70
  ${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),m=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(u)?u:this.stringLiteral(u);return`${l}${m}: ${p}`}).join(`,
71
71
  `)}
72
72
  ${o}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
73
- `)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class Cx{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),l=[`"${`${r.origin}${r.pathname}`}"`];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`method="${c}"`),c="fetch"),r.searchParams.size&&l.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&l.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&l.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const u=l.length===1?l[0]:`
73
+ `)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class Nx{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),l=[`"${`${r.origin}${r.pathname}`}"`];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`method="${c}"`),c="fetch"),r.searchParams.size&&l.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&l.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&l.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const u=l.length===1?l[0]:`
74
74
  ${l.map(d=>this.indent(d,2)).join(`,
75
75
  `)}
76
76
  `;return`await page.request.${c}(${u})`}indent(e,n){return e.split(`
@@ -81,7 +81,7 @@ ${e.map(m=>`${d}${this.prettyPrintObject(m,n,r+1)}`).join(`,
81
81
  ${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
82
82
  ${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1);return`${l}${this.stringLiteral(u)}: ${p}`}).join(`,
83
83
  `)}
84
- ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class Nx{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=`${r.origin}${r.pathname}`,l={},c=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(l.Method=u,u="fetch"),r.searchParams.size&&(l.Params=Object.fromEntries(r.searchParams.entries())),n&&(l.Data=n),e.headers.length&&(l.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${o}"`];return Object.keys(l).length>0&&d.push(this.prettyPrintObject(l)),`${c.join(`
84
+ ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class Ax{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=`${r.origin}${r.pathname}`,l={},c=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(l.Method=u,u="fetch"),r.searchParams.size&&(l.Params=Object.fromEntries(r.searchParams.entries())),n&&(l.Data=n),e.headers.length&&(l.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${o}"`];return Object.keys(l).length>0&&d.push(this.prettyPrintObject(l)),`${c.join(`
85
85
  `)}${c.length?`
86
86
  `:""}await request.${this.toFunctionName(u)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,n=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 u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`new object[] {
87
87
  ${e.map(m=>`${d}${this.prettyPrintObject(m,n,r+1)}`).join(`,
@@ -89,66 +89,66 @@ ${e.map(m=>`${d}${this.prettyPrintObject(m,n,r+1)}`).join(`,
89
89
  ${u}}`}if(Object.keys(e).length===0)return"new {}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`new() {
90
90
  ${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),m=r===0?u:`[${this.stringLiteral(u)}]`;return`${l}${m} = ${p}`}).join(`,
91
91
  `)}
92
- ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class Ax{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=[`"${r.origin}${r.pathname}"`],l=[];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`setMethod("${c}")`),c="fetch");for(const[u,d]of r.searchParams)l.push(`setQueryParam(${this.stringLiteral(u)}, ${this.stringLiteral(d)})`);n&&l.push(`setData(${this.stringLiteral(n)})`);for(const u of e.headers)l.push(`setHeader(${this.stringLiteral(u.name)}, ${this.stringLiteral(u.value)})`);return l.length>0&&o.push(`RequestOptions.create()
92
+ ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class Lx{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=[`"${r.origin}${r.pathname}"`],l=[];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`setMethod("${c}")`),c="fetch");for(const[u,d]of r.searchParams)l.push(`setQueryParam(${this.stringLiteral(u)}, ${this.stringLiteral(d)})`);n&&l.push(`setData(${this.stringLiteral(n)})`);for(const u of e.headers)l.push(`setHeader(${this.stringLiteral(u.name)}, ${this.stringLiteral(u.value)})`);return l.length>0&&o.push(`RequestOptions.create()
93
93
  .${l.join(`
94
94
  .`)}
95
- `),`request.${c}(${o.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function Lx(t){if(t==="javascript")return new Tx;if(t==="python")return new Cx;if(t==="csharp")return new Nx;if(t==="java")return new Ax;throw new Error("Unsupported language: "+t)}const Ix=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[o,l]=$.useState("request"),c=Ul(async()=>{if(t.request.postData){const u=t.request.headers.find(p=>p.name.toLowerCase()==="content-type"),d=u?u.value:"";if(t.request.postData._sha1){const p=await fetch(`sha1/${t.request.postData._sha1}`);return{text:Fu(await p.text(),d),mimeType:d}}else return{text:Fu(t.request.postData.text,d),mimeType:d}}else return null},[t],null);return w.jsx(Bu,{dataTestId:"network-request-details",leftToolbar:[w.jsx(jt,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[w.jsx(Mx,{requestBody:c,resource:t,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>w.jsx(jx,{resource:t,startTimeOffset:n,requestBody:c})},{id:"response",title:"Response",render:()=>w.jsx(Px,{resource:t})},{id:"body",title:"Body",render:()=>w.jsx(Ox,{resource:t})}],selectedTab:o,setSelectedTab:l})},Mx=({resource:t,sdkLanguage:e,requestBody:n})=>{const r=w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>Lx(e).generatePlaywrightRequestCall(t.request,n==null?void 0:n.text);return w.jsxs("div",{className:"copy-request-dropdown",children:[w.jsxs(jt,{className:"copy-request-dropdown-toggle",children:[w.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",w.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),w.jsxs("div",{className:"copy-request-dropdown-menu",children:[w.jsx(jl,{description:"Copy as cURL",copiedDescription:r,value:()=>kx(t)}),w.jsx(jl,{description:"Copy as Fetch",copiedDescription:r,value:()=>bx(t)}),w.jsx(jl,{description:"Copy as Playwright",copiedDescription:r,value:o})]})]})},jx=({resource:t,startTimeOffset:e,requestBody:n})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"General"}),w.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),w.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&w.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",w.jsx("span",{className:$x(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(r=>`${r.name}: ${r.value}`).join(`
95
+ `),`request.${c}(${o.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function Ix(t){if(t==="javascript")return new Cx;if(t==="python")return new Nx;if(t==="csharp")return new Ax;if(t==="java")return new Lx;throw new Error("Unsupported language: "+t)}const Mx=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[o,l]=$.useState("request"),c=Ul(async()=>{if(t.request.postData){const u=t.request.headers.find(p=>p.name.toLowerCase()==="content-type"),d=u?u.value:"";if(t.request.postData._sha1){const p=await fetch(`sha1/${t.request.postData._sha1}`);return{text:zu(await p.text(),d),mimeType:d}}else return{text:zu(t.request.postData.text,d),mimeType:d}}else return null},[t],null);return w.jsx(Fu,{dataTestId:"network-request-details",leftToolbar:[w.jsx(jt,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[w.jsx(jx,{requestBody:c,resource:t,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>w.jsx(Px,{resource:t,startTimeOffset:n,requestBody:c})},{id:"response",title:"Response",render:()=>w.jsx(Ox,{resource:t})},{id:"body",title:"Body",render:()=>w.jsx(Rx,{resource:t})}],selectedTab:o,setSelectedTab:l})},jx=({resource:t,sdkLanguage:e,requestBody:n})=>{const r=w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>Ix(e).generatePlaywrightRequestCall(t.request,n==null?void 0:n.text);return w.jsxs("div",{className:"copy-request-dropdown",children:[w.jsxs(jt,{className:"copy-request-dropdown-toggle",children:[w.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",w.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),w.jsxs("div",{className:"copy-request-dropdown-menu",children:[w.jsx(jl,{description:"Copy as cURL",copiedDescription:r,value:()=>bx(t)}),w.jsx(jl,{description:"Copy as Fetch",copiedDescription:r,value:()=>Tx(t)}),w.jsx(jl,{description:"Copy as Playwright",copiedDescription:r,value:o})]})]})},Px=({resource:t,startTimeOffset:e,requestBody:n})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"General"}),w.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),w.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&w.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",w.jsx("span",{className:Dx(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(r=>`${r.name}: ${r.value}`).join(`
96
96
  `)})]}):null,w.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.headers.map(r=>`${r.name}: ${r.value}`).join(`
97
- `)}),w.jsx("div",{className:"network-request-details-header",children:"Time"}),w.jsx("div",{className:"network-request-details-general",children:`Start: ${pt(e)}`}),w.jsx("div",{className:"network-request-details-general",children:`Duration: ${pt(t.time)}`}),n&&w.jsx("div",{className:"network-request-details-header",children:"Request Body"}),n&&w.jsx(Cs,{text:n.text,mimeType:n.mimeType,readOnly:!0,lineNumbers:!0})]}),Px=({resource:t})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
98
- `)})]}),Ox=({resource:t})=>{const[e,n]=$.useState(null);return $.useEffect(()=>{(async()=>{if(t.response.content._sha1){const o=t.response.content.mimeType.includes("image"),l=t.response.content.mimeType.includes("font"),c=await fetch(`sha1/${t.response.content._sha1}`);if(o){const u=await c.blob(),d=new FileReader,p=new Promise(m=>d.onload=m);d.readAsDataURL(u),n({dataUrl:(await p).target.result})}else if(l){const u=await c.arrayBuffer();n({font:u})}else{const u=Fu(await c.text(),t.response.content.mimeType);n({text:u,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),w.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&w.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&w.jsx(Rx,{font:e.font}),e&&e.dataUrl&&w.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&w.jsx(Cs,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},Rx=({font:t})=>{const[e,n]=$.useState(!1);return $.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?w.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):w.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",w.jsx("br",{}),"NOPQRSTUVWXYZ",w.jsx("br",{}),"abcdefghijklm",w.jsx("br",{}),"nopqrstuvwxyz",w.jsx("br",{}),"1234567890"]})};function $x(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function Fu(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}function Dx(t){const[e,n]=$.useState([]);$.useEffect(()=>{const l=[];for(let c=0;c<t.columns.length-1;++c){const u=t.columns[c];l[c]=(l[c-1]||0)+t.columnWidths.get(u)}n(l)},[t.columns,t.columnWidths]);function r(l){const c=new Map(t.columnWidths.entries());for(let u=0;u<l.length;++u){const d=l[u]-(l[u-1]||0),p=t.columns[u];c.set(p,d)}t.setColumnWidths(c)}const o=$.useCallback(l=>{var c,u;(u=t.setSorting)==null||u.call(t,{by:l,negate:((c=t.sorting)==null?void 0:c.by)===l?!t.sorting.negate:!1})},[t]);return w.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[w.jsx(wm,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),w.jsxs("div",{className:"vbox",children:[w.jsx("div",{className:"grid-view-header",children:t.columns.map((l,c)=>w.jsxs("div",{className:"grid-view-header-cell "+Bx(l,t.sorting),style:{width:c<t.columns.length-1?t.columnWidths.get(l):void 0},onClick:()=>t.setSorting&&o(l),children:[w.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(l)}),w.jsx("span",{className:"codicon codicon-triangle-up"}),w.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(l)))}),w.jsx(oa,{name:t.name,items:t.items,ariaLabel:t.ariaLabel,id:t.id,render:(l,c)=>w.jsx(w.Fragment,{children:t.columns.map((u,d)=>{const{body:p,title:m}=t.render(l,u,c);return w.jsx("div",{className:`grid-view-cell grid-view-column-${String(u)}`,title:m,style:{width:d<t.columns.length-1?t.columnWidths.get(u):void 0},children:p},t.columnTitle(u))})}),icon:t.icon,isError:t.isError,isWarning:t.isWarning,isInfo:t.isInfo,selectedItem:t.selectedItem,onAccepted:t.onAccepted,onSelected:t.onSelected,onHighlighted:t.onHighlighted,onIconClicked:t.onIconClicked,noItemsMessage:t.noItemsMessage,dataTestId:t.dataTestId,notSelectable:t.notSelectable})]})]})}function Bx(t,e){return t===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const Fx=["All","Fetch","HTML","JS","CSS","Font","Image"],zx={searchValue:"",resourceType:"All"},Ux=({filterState:t,onFilterStateChange:e})=>w.jsxs("div",{className:"network-filters",children:[w.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),w.jsx("div",{className:"network-filters-resource-types",children:Fx.map(n=>w.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),Hx=Dx;function qx(t,e){const n=$.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[t,e]),r=$.useMemo(()=>new Jx(t),[t]);return{resources:n,contextIdMap:r}}const Vx=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[o,l]=$.useState(void 0),[c,u]=$.useState(void 0),[d,p]=$.useState(zx),{renderedEntries:m,renderedEntryMap:y}=$.useMemo(()=>{const T=e.resources.map(O=>Xx(O,t,e.contextIdMap)).filter(n1(d));o&&Zx(T,o);const F=new Map(T.map((O,D)=>[`${O.frameref}:${D}`,O]));return{renderedEntries:T,renderedEntryMap:F}},[e.resources,e.contextIdMap,d,o,t]),v=c?y.get(c):void 0,[x,k]=$.useState(()=>new Map(bm().map(T=>[T,Kx(T)]))),S=$.useCallback(T=>{const F=m.indexOf(T);u(F!==-1?`${T.frameref}:${F}`:void 0)},[m]),E=$.useCallback(T=>{p(T),u(void 0)},[]);if(!e.resources.length)return w.jsx(Or,{text:"No network calls"});const N=w.jsx(Hx,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:v,onSelected:S,onHighlighted:T=>n==null?void 0:n(T==null?void 0:T.resource),columns:Gx(!!v,m),columnTitle:Wx,columnWidths:x,setColumnWidths:k,isError:T=>T.status.code>=400||T.status.code===-1,isInfo:T=>!!T.route,render:(T,F)=>Qx(T,F),sorting:o,setSorting:l});return w.jsxs(w.Fragment,{children:[w.jsx(Ux,{filterState:d,onFilterStateChange:E}),!v&&N,v&&w.jsx(ql,{sidebarSize:x.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:w.jsx(Ix,{resource:v.resource,sdkLanguage:r,startTimeOffset:v.start,onClose:()=>u(void 0)}),sidebar:N})]})},Wx=t=>t==="contextId"?"Source":t==="name"?"Name":t==="method"?"Method":t==="status"?"Status":t==="contentType"?"Content Type":t==="duration"?"Duration":t==="size"?"Size":t==="start"?"Start":t==="route"?"Route":"",Kx=t=>t==="name"?200:t==="method"||t==="status"?60:t==="contentType"?200:t==="contextId"?60:100;function Gx(t,e){if(t){const r=["name"];return ig(e)&&r.unshift("contextId"),r}let n=bm();return ig(e)||(n=n.filter(r=>r!=="contextId")),n}function bm(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const Qx=(t,e)=>e==="contextId"?{body:t.contextId,title:t.name.url}:e==="name"?{body:t.name.name,title:t.name.url}:e==="method"?{body:t.method}:e==="status"?{body:t.status.code>0?t.status.code:"",title:t.status.text}:e==="contentType"?{body:t.contentType}:e==="duration"?{body:pt(t.duration)}:e==="size"?{body:N0(t.size)}:e==="start"?{body:pt(t.start)}:e==="route"?{body:t.route}:{body:""};class Jx{constructor(e){be(this,"_pagerefToShortId",new Map);be(this,"_contextToId",new Map);be(this,"_lastPageId",0);be(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let n=this._pagerefToShortId.get(e);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(e,n)),n}_apiRequestContextId(e){const n=Hl(e);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function ig(t){const e=new Set;for(const n of t)if(e.add(n.contextId),e.size>1)return!0;return!1}const Xx=(t,e,n)=>{const r=Yx(t);let o;try{const u=new URL(t.request.url);o=u.pathname.substring(u.pathname.lastIndexOf("/")+1),o||(o=u.host),u.search&&(o+=u.search)}catch{o=t.request.url}let l=t.response.content.mimeType;const c=l.match(/^(.*);\s*charset=.*$/);return c&&(l=c[1]),{name:{name:o,url:t.request.url},method:t.request.method,status:{code:t.response.status,text:t.response.statusText},contentType:l,duration:t.time,size:t.response._transferSize>0?t.response._transferSize:t.response.bodySize,start:t._monotonicTime-e.minimum,route:r,resource:t,contextId:n.contextId(t),frameref:t._frameref}};function Yx(t){return t._wasAborted?"aborted":t._wasContinued?"continued":t._wasFulfilled?"fulfilled":t._apiRequest?"api":""}function Zx(t,e){const n=e1(e==null?void 0:e.by);n&&t.sort(n),e.negate&&t.reverse()}function e1(t){if(t==="start")return(e,n)=>e.start-n.start;if(t==="duration")return(e,n)=>e.duration-n.duration;if(t==="status")return(e,n)=>e.status.code-n.status.code;if(t==="method")return(e,n)=>{const r=e.method,o=n.method;return r.localeCompare(o)};if(t==="size")return(e,n)=>e.size-n.size;if(t==="contentType")return(e,n)=>e.contentType.localeCompare(n.contentType);if(t==="name")return(e,n)=>e.name.name.localeCompare(n.name.name);if(t==="route")return(e,n)=>e.route.localeCompare(n.route);if(t==="contextId")return(e,n)=>e.contextId.localeCompare(n.contextId)}const t1={All:()=>!0,Fetch:t=>t==="application/json",HTML:t=>t==="text/html",CSS:t=>t==="text/css",JS:t=>t.includes("javascript"),Font:t=>t.includes("font"),Image:t=>t.includes("image")};function n1({searchValue:t,resourceType:e}){return n=>{const r=t1[e];return r(n.contentType)&&n.name.url.toLowerCase().includes(t.toLowerCase())}}function cf(t,e,n={}){var v;const r=new t.LineCounter,o={keepSourceTokens:!0,lineCounter:r,...n},l=t.parseDocument(e,o),c=[],u=x=>[r.linePos(x[0]),r.linePos(x[1])],d=x=>{c.push({message:x.message,range:[r.linePos(x.pos[0]),r.linePos(x.pos[1])]})},p=(x,k)=>{for(const S of k.items){if(S instanceof t.Scalar&&typeof S.value=="string"){const T=Ql.parse(S,o,c);T&&(x.children=x.children||[],x.children.push(T));continue}if(S instanceof t.YAMLMap){m(x,S);continue}c.push({message:"Sequence items should be strings or maps",range:u(S.range||k.range)})}},m=(x,k)=>{for(const S of k.items){if(x.children=x.children||[],!(S.key instanceof t.Scalar&&typeof S.key.value=="string")){c.push({message:"Only string keys are supported",range:u(S.key.range||k.range)});continue}const N=S.key,T=S.value;if(N.value==="text"){if(!(T instanceof t.Scalar&&typeof T.value=="string")){c.push({message:"Text value should be a string",range:u(S.value.range||k.range)});continue}x.children.push({kind:"text",text:wu(T.value)});continue}if(N.value==="/children"){if(!(T instanceof t.Scalar&&typeof T.value=="string")||T.value!=="contain"&&T.value!=="equal"&&T.value!=="deep-equal"){c.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:u(S.value.range||k.range)});continue}x.containerMode=T.value;continue}if(N.value.startsWith("/")){if(!(T instanceof t.Scalar&&typeof T.value=="string")){c.push({message:"Property value should be a string",range:u(S.value.range||k.range)});continue}x.props=x.props??{},x.props[N.value.slice(1)]=wu(T.value);continue}const F=Ql.parse(N,o,c);if(!F)continue;if(T instanceof t.Scalar){const z=typeof T.value;if(z!=="string"&&z!=="number"&&z!=="boolean"){c.push({message:"Node value should be a string or a sequence",range:u(S.value.range||k.range)});continue}x.children.push({...F,children:[{kind:"text",text:wu(String(T.value))}]});continue}if(T instanceof t.YAMLSeq){x.children.push(F),p(F,T);continue}c.push({message:"Map values should be strings or sequences",range:u(S.value.range||k.range)})}},y={kind:"role",role:"fragment"};return l.errors.forEach(d),c.length?{errors:c,fragment:y}:(l.contents instanceof t.YAMLSeq||c.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:l.contents?u(l.contents.range):[{line:0,col:0},{line:0,col:0}]}),c.length?{errors:c,fragment:y}:(p(y,l.contents),c.length?{errors:c,fragment:r1}:((v=y.children)==null?void 0:v.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const r1={kind:"role",role:"fragment"};function Tm(t){return t.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function wu(t){return t.startsWith("/")&&t.endsWith("/")&&t.length>1?{pattern:t.slice(1,-1)}:Tm(t)}class Ql{static parse(e,n,r){try{return new Ql(e.value,n)._parse()}catch(o){if(o instanceof og){const l=n.prettyErrors===!1?o.message:o.message+`:
97
+ `)}),w.jsx("div",{className:"network-request-details-header",children:"Time"}),w.jsx("div",{className:"network-request-details-general",children:`Start: ${pt(e)}`}),w.jsx("div",{className:"network-request-details-general",children:`Duration: ${pt(t.time)}`}),n&&w.jsx("div",{className:"network-request-details-header",children:"Request Body"}),n&&w.jsx(Cs,{text:n.text,mimeType:n.mimeType,readOnly:!0,lineNumbers:!0})]}),Ox=({resource:t})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
98
+ `)})]}),Rx=({resource:t})=>{const[e,n]=$.useState(null);return $.useEffect(()=>{(async()=>{if(t.response.content._sha1){const o=t.response.content.mimeType.includes("image"),l=t.response.content.mimeType.includes("font"),c=await fetch(`sha1/${t.response.content._sha1}`);if(o){const u=await c.blob(),d=new FileReader,p=new Promise(m=>d.onload=m);d.readAsDataURL(u),n({dataUrl:(await p).target.result})}else if(l){const u=await c.arrayBuffer();n({font:u})}else{const u=zu(await c.text(),t.response.content.mimeType);n({text:u,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),w.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&w.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&w.jsx($x,{font:e.font}),e&&e.dataUrl&&w.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&w.jsx(Cs,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},$x=({font:t})=>{const[e,n]=$.useState(!1);return $.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?w.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):w.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",w.jsx("br",{}),"NOPQRSTUVWXYZ",w.jsx("br",{}),"abcdefghijklm",w.jsx("br",{}),"nopqrstuvwxyz",w.jsx("br",{}),"1234567890"]})};function Dx(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function zu(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}function Bx(t){const[e,n]=$.useState([]);$.useEffect(()=>{const l=[];for(let c=0;c<t.columns.length-1;++c){const u=t.columns[c];l[c]=(l[c-1]||0)+t.columnWidths.get(u)}n(l)},[t.columns,t.columnWidths]);function r(l){const c=new Map(t.columnWidths.entries());for(let u=0;u<l.length;++u){const d=l[u]-(l[u-1]||0),p=t.columns[u];c.set(p,d)}t.setColumnWidths(c)}const o=$.useCallback(l=>{var c,u;(u=t.setSorting)==null||u.call(t,{by:l,negate:((c=t.sorting)==null?void 0:c.by)===l?!t.sorting.negate:!1})},[t]);return w.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[w.jsx(Sm,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),w.jsxs("div",{className:"vbox",children:[w.jsx("div",{className:"grid-view-header",children:t.columns.map((l,c)=>w.jsxs("div",{className:"grid-view-header-cell "+Fx(l,t.sorting),style:{width:c<t.columns.length-1?t.columnWidths.get(l):void 0},onClick:()=>t.setSorting&&o(l),children:[w.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(l)}),w.jsx("span",{className:"codicon codicon-triangle-up"}),w.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(l)))}),w.jsx(oa,{name:t.name,items:t.items,ariaLabel:t.ariaLabel,id:t.id,render:(l,c)=>w.jsx(w.Fragment,{children:t.columns.map((u,d)=>{const{body:p,title:m}=t.render(l,u,c);return w.jsx("div",{className:`grid-view-cell grid-view-column-${String(u)}`,title:m,style:{width:d<t.columns.length-1?t.columnWidths.get(u):void 0},children:p},t.columnTitle(u))})}),icon:t.icon,isError:t.isError,isWarning:t.isWarning,isInfo:t.isInfo,selectedItem:t.selectedItem,onAccepted:t.onAccepted,onSelected:t.onSelected,onHighlighted:t.onHighlighted,onIconClicked:t.onIconClicked,noItemsMessage:t.noItemsMessage,dataTestId:t.dataTestId,notSelectable:t.notSelectable})]})]})}function Fx(t,e){return t===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const zx=["All","Fetch","HTML","JS","CSS","Font","Image"],Ux={searchValue:"",resourceType:"All"},Hx=({filterState:t,onFilterStateChange:e})=>w.jsxs("div",{className:"network-filters",children:[w.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),w.jsx("div",{className:"network-filters-resource-types",children:zx.map(n=>w.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),qx=Bx;function Vx(t,e){const n=$.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[t,e]),r=$.useMemo(()=>new Xx(t),[t]);return{resources:n,contextIdMap:r}}const Wx=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[o,l]=$.useState(void 0),[c,u]=$.useState(void 0),[d,p]=$.useState(Ux),{renderedEntries:m,renderedEntryMap:y}=$.useMemo(()=>{const T=e.resources.map(O=>Yx(O,t,e.contextIdMap)).filter(r1(d));o&&e1(T,o);const F=new Map(T.map((O,D)=>[`${O.frameref}:${D}`,O]));return{renderedEntries:T,renderedEntryMap:F}},[e.resources,e.contextIdMap,d,o,t]),v=c?y.get(c):void 0,[x,k]=$.useState(()=>new Map(Tm().map(T=>[T,Gx(T)]))),S=$.useCallback(T=>{const F=m.indexOf(T);u(F!==-1?`${T.frameref}:${F}`:void 0)},[m]),E=$.useCallback(T=>{p(T),u(void 0)},[]);if(!e.resources.length)return w.jsx(Or,{text:"No network calls"});const N=w.jsx(qx,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:v,onSelected:S,onHighlighted:T=>n==null?void 0:n(T==null?void 0:T.resource),columns:Qx(!!v,m),columnTitle:Kx,columnWidths:x,setColumnWidths:k,isError:T=>T.status.code>=400||T.status.code===-1,isInfo:T=>!!T.route,render:(T,F)=>Jx(T,F),sorting:o,setSorting:l});return w.jsxs(w.Fragment,{children:[w.jsx(Hx,{filterState:d,onFilterStateChange:E}),!v&&N,v&&w.jsx(ql,{sidebarSize:x.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:w.jsx(Mx,{resource:v.resource,sdkLanguage:r,startTimeOffset:v.start,onClose:()=>u(void 0)}),sidebar:N})]})},Kx=t=>t==="contextId"?"Source":t==="name"?"Name":t==="method"?"Method":t==="status"?"Status":t==="contentType"?"Content Type":t==="duration"?"Duration":t==="size"?"Size":t==="start"?"Start":t==="route"?"Route":"",Gx=t=>t==="name"?200:t==="method"||t==="status"?60:t==="contentType"?200:t==="contextId"?60:100;function Qx(t,e){if(t){const r=["name"];return ig(e)&&r.unshift("contextId"),r}let n=Tm();return ig(e)||(n=n.filter(r=>r!=="contextId")),n}function Tm(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const Jx=(t,e)=>e==="contextId"?{body:t.contextId,title:t.name.url}:e==="name"?{body:t.name.name,title:t.name.url}:e==="method"?{body:t.method}:e==="status"?{body:t.status.code>0?t.status.code:"",title:t.status.text}:e==="contentType"?{body:t.contentType}:e==="duration"?{body:pt(t.duration)}:e==="size"?{body:A0(t.size)}:e==="start"?{body:pt(t.start)}:e==="route"?{body:t.route}:{body:""};class Xx{constructor(e){be(this,"_pagerefToShortId",new Map);be(this,"_contextToId",new Map);be(this,"_lastPageId",0);be(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let n=this._pagerefToShortId.get(e);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(e,n)),n}_apiRequestContextId(e){const n=Hl(e);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function ig(t){const e=new Set;for(const n of t)if(e.add(n.contextId),e.size>1)return!0;return!1}const Yx=(t,e,n)=>{const r=Zx(t);let o;try{const u=new URL(t.request.url);o=u.pathname.substring(u.pathname.lastIndexOf("/")+1),o||(o=u.host),u.search&&(o+=u.search)}catch{o=t.request.url}let l=t.response.content.mimeType;const c=l.match(/^(.*);\s*charset=.*$/);return c&&(l=c[1]),{name:{name:o,url:t.request.url},method:t.request.method,status:{code:t.response.status,text:t.response.statusText},contentType:l,duration:t.time,size:t.response._transferSize>0?t.response._transferSize:t.response.bodySize,start:t._monotonicTime-e.minimum,route:r,resource:t,contextId:n.contextId(t),frameref:t._frameref}};function Zx(t){return t._wasAborted?"aborted":t._wasContinued?"continued":t._wasFulfilled?"fulfilled":t._apiRequest?"api":""}function e1(t,e){const n=t1(e==null?void 0:e.by);n&&t.sort(n),e.negate&&t.reverse()}function t1(t){if(t==="start")return(e,n)=>e.start-n.start;if(t==="duration")return(e,n)=>e.duration-n.duration;if(t==="status")return(e,n)=>e.status.code-n.status.code;if(t==="method")return(e,n)=>{const r=e.method,o=n.method;return r.localeCompare(o)};if(t==="size")return(e,n)=>e.size-n.size;if(t==="contentType")return(e,n)=>e.contentType.localeCompare(n.contentType);if(t==="name")return(e,n)=>e.name.name.localeCompare(n.name.name);if(t==="route")return(e,n)=>e.route.localeCompare(n.route);if(t==="contextId")return(e,n)=>e.contextId.localeCompare(n.contextId)}const n1={All:()=>!0,Fetch:t=>t==="application/json",HTML:t=>t==="text/html",CSS:t=>t==="text/css",JS:t=>t.includes("javascript"),Font:t=>t.includes("font"),Image:t=>t.includes("image")};function r1({searchValue:t,resourceType:e}){return n=>{const r=n1[e];return r(n.contentType)&&n.name.url.toLowerCase().includes(t.toLowerCase())}}function uf(t,e,n={}){var v;const r=new t.LineCounter,o={keepSourceTokens:!0,lineCounter:r,...n},l=t.parseDocument(e,o),c=[],u=x=>[r.linePos(x[0]),r.linePos(x[1])],d=x=>{c.push({message:x.message,range:[r.linePos(x.pos[0]),r.linePos(x.pos[1])]})},p=(x,k)=>{for(const S of k.items){if(S instanceof t.Scalar&&typeof S.value=="string"){const T=Ql.parse(S,o,c);T&&(x.children=x.children||[],x.children.push(T));continue}if(S instanceof t.YAMLMap){m(x,S);continue}c.push({message:"Sequence items should be strings or maps",range:u(S.range||k.range)})}},m=(x,k)=>{for(const S of k.items){if(x.children=x.children||[],!(S.key instanceof t.Scalar&&typeof S.key.value=="string")){c.push({message:"Only string keys are supported",range:u(S.key.range||k.range)});continue}const N=S.key,T=S.value;if(N.value==="text"){if(!(T instanceof t.Scalar&&typeof T.value=="string")){c.push({message:"Text value should be a string",range:u(S.value.range||k.range)});continue}x.children.push({kind:"text",text:wu(T.value)});continue}if(N.value==="/children"){if(!(T instanceof t.Scalar&&typeof T.value=="string")||T.value!=="contain"&&T.value!=="equal"&&T.value!=="deep-equal"){c.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:u(S.value.range||k.range)});continue}x.containerMode=T.value;continue}if(N.value.startsWith("/")){if(!(T instanceof t.Scalar&&typeof T.value=="string")){c.push({message:"Property value should be a string",range:u(S.value.range||k.range)});continue}x.props=x.props??{},x.props[N.value.slice(1)]=wu(T.value);continue}const F=Ql.parse(N,o,c);if(!F)continue;if(T instanceof t.Scalar){const z=typeof T.value;if(z!=="string"&&z!=="number"&&z!=="boolean"){c.push({message:"Node value should be a string or a sequence",range:u(S.value.range||k.range)});continue}x.children.push({...F,children:[{kind:"text",text:wu(String(T.value))}]});continue}if(T instanceof t.YAMLSeq){x.children.push(F),p(F,T);continue}c.push({message:"Map values should be strings or sequences",range:u(S.value.range||k.range)})}},y={kind:"role",role:"fragment"};return l.errors.forEach(d),c.length?{errors:c,fragment:y}:(l.contents instanceof t.YAMLSeq||c.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:l.contents?u(l.contents.range):[{line:0,col:0},{line:0,col:0}]}),c.length?{errors:c,fragment:y}:(p(y,l.contents),c.length?{errors:c,fragment:s1}:((v=y.children)==null?void 0:v.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const s1={kind:"role",role:"fragment"};function Cm(t){return t.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function wu(t){return{raw:t,normalized:Cm(t)}}class Ql{static parse(e,n,r){try{return new Ql(e.value)._parse()}catch(o){if(o instanceof og){const l=n.prettyErrors===!1?o.message:o.message+`:
99
99
 
100
100
  `+e.value+`
101
101
  `+" ".repeat(o.pos)+`^
102
- `;return r.push({message:l,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}constructor(e,n){this._input=e,this._pos=0,this._length=e.length,this._options=n}_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 n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new og(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const o=this._next();if(n)e+=o,n=!1;else if(o==="\\")n=!0,e+=o;else{if(o==="/"&&!r)return{pattern:e};o==="["?(r=!0,e+=o):o==="]"&&r?(e+=o,r=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Tm(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,o||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,o){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=r==="true";return}if(n==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',o),e.active=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',o),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',o),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,o)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class og extends Error{constructor(e,n){super(e),this.pos=n}}let Cm={};function s1(t){Cm=t}function Qi(t,e){for(;e;){if(t.contains(e))return!0;e=Am(e)}return!1}function at(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function Nm(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Am(t){for(;t.parentElement;)t=t.parentElement;return at(t)}function Oi(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=Am(t)}}function nr(t,e){const n=e==="::before"?ff:e==="::after"?df:uf;if(n&&n.has(t))return n.get(t);const r=t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0;return n==null||n.set(t,r),r}function Lm(t,e){if(e=e??nr(t),!e)return!0;if(Element.prototype.checkVisibility&&Cm.browserNameForWorkarounds!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function Jl(t){const e=nr(t);if(!e)return{visible:!0,inline:!1};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Yn(r))return{visible:!0,inline:!1,style:e};if(r.nodeType===3&&Im(r))return{visible:!0,inline:!0,style:e}}return{visible:!1,inline:!1,style:e}}if(!Lm(t,e))return{style:e,visible:!1,inline:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0,inline:e.display==="inline"}}function Yn(t){return Jl(t).visible}function Im(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Ye(t){const e=t.tagName;return typeof e=="string"?e.toUpperCase():t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}let uf,ff,df,Mm=0;function hf(){++Mm,uf??(uf=new Map),ff??(ff=new Map),df??(df=new Map)}function pf(){--Mm||(uf=void 0,ff=void 0,df=void 0)}function lg(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const ag="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]",i1=[["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 jm(t,e){return i1.some(([n,r])=>!(r!=null&&r.includes(e||""))&&t.hasAttribute(n))}function Pm(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function o1(t){return!Wm(t)&&(l1(t)||Pm(t))}function l1(t){const e=Ye(t);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?t.hasAttribute("href"):e==="INPUT"?!t.hidden:!1}const Su={A:t=>t.hasAttribute("href")?"link":null,AREA:t=>t.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:t=>Oi(t,ag)?null:"contentinfo",FORM:t=>lg(t)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:t=>Oi(t,ag)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:t=>t.getAttribute("alt")===""&&!t.getAttribute("title")&&!jm(t)&&!Pm(t)?"presentation":"img",INPUT:t=>{const e=t.type.toLowerCase();if(e==="search")return t.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const n=Ms(t,t.getAttribute("list"))[0];return n&&Ye(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":E1[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:t=>lg(t)?"region":null,SELECT:t=>t.hasAttribute("multiple")||t.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:t=>{const e=Oi(t,"table"),n=e?Xl(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:t=>{if(t.getAttribute("scope")==="col")return"columnheader";if(t.getAttribute("scope")==="row")return"rowheader";const e=Oi(t,"table"),n=e?Xl(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},a1={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 cg(t){var r;const e=((r=Su[Ye(t)])==null?void 0:r.call(Su,t))||"";if(!e)return null;let n=t;for(;n;){const o=at(n),l=a1[Ye(n)];if(!l||!o||!l.includes(Ye(o)))break;const c=Xl(o);if((c==="none"||c==="presentation")&&!Om(o,c))return c;n=o}return e}const c1=["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 Xl(t){return(t.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>c1.includes(n))||null}function Om(t,e){return jm(t,e)||o1(t)}function rt(t){const e=Xl(t);if(!e)return cg(t);if(e==="none"||e==="presentation"){const n=cg(t);if(Om(t,n))return n}return e}function Rm(t){return t===null?void 0:t.toLowerCase()==="true"}function $m(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ye(t))}function zt(t){if($m(t))return!0;const e=nr(t),n=t.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!n){for(let o=t.firstChild;o;o=o.nextSibling)if(o.nodeType===1&&!zt(o)||o.nodeType===3&&Im(o))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!Lm(t,e)?!0:Dm(t)}function Dm(t){let e=Xn==null?void 0:Xn.get(t);if(e===void 0){if(e=!1,t.parentElement&&t.parentElement.shadowRoot&&!t.assignedSlot&&(e=!0),!e){const n=nr(t);e=!n||n.display==="none"||Rm(t.getAttribute("aria-hidden"))===!0}if(!e){const n=at(t);n&&(e=Dm(n))}Xn==null||Xn.set(t,e)}return e}function Ms(t,e){if(!e)return[];const n=Nm(t);if(!n)return[];try{const r=e.split(" ").filter(l=>!!l),o=[];for(const l of r){const c=n.querySelector("#"+CSS.escape(l));c&&!o.includes(c)&&o.push(c)}return o}catch{return[]}}function kn(t){return t.trim()}function zi(t){return t.split(" ").map(e=>e.replace(/\r\n/g,`
103
- `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function ug(t,e){const n=[...t.querySelectorAll(e)];for(const r of Ms(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Ui(t,e){const n=e==="::before"?Tf:e==="::after"?Cf:bf;if(n!=null&&n.has(t))return n==null?void 0:n.get(t);const r=nr(t,e);let o;if(r){const l=r.content;l&&l!=="none"&&l!=="normal"&&r.display!=="none"&&r.visibility!=="hidden"&&(o=u1(t,l,!!e))}return e&&o!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(o=" "+o+" "),n&&n.set(t,o),o}function u1(t,e,n){if(!(!e||e==="none"||e==="normal"))try{let r=Kg(e).filter(u=>!(u instanceof Vl));const o=r.findIndex(u=>u instanceof tt&&u.value==="/");if(o!==-1)r=r.slice(o+1);else if(!n)return;const l=[];let c=0;for(;c<r.length;)if(r[c]instanceof sf)l.push(r[c].value),c++;else if(c+2<r.length&&r[c]instanceof Fi&&r[c].value==="attr"&&r[c+1]instanceof rf&&r[c+2]instanceof nf){const u=r[c+1].value;l.push(t.getAttribute(u)||""),c+=3}else return;return l.join("")}catch{}}function Bm(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=Ms(t,e);return n.length?n:null}function f1(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),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(t);return n||r}function Ji(t,e){const n=e?_f:xf;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(rt(t)||"")||(r=zi(tn(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function fg(t,e){const n=e?kf:Ef;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const o=Ms(t,t.getAttribute("aria-describedby"));r=zi(o.map(l=>tn(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:zt(l)}})).join(" "))}else t.hasAttribute("aria-description")?r=zi(t.getAttribute("aria-description")||""):r=zi(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}function d1(t){const e=t.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function h1(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function p1(t){const e=vs;let n=vs==null?void 0:vs.get(t);if(n===void 0){n="";const r=d1(t)!=="false",o=h1(t);if(r||o){const l=t.getAttribute("aria-errormessage");n=Ms(t,l).map(d=>zi(tn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:zt(d)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function tn(t,e){var d,p,m,y;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if($m(t)||!v&&zt(t))return e.visitedElements.add(t),""}const r=Bm(t);if(!e.embeddedInLabelledBy){const v=(r||[]).map(x=>tn(x,{...e,embeddedInLabelledBy:{element:x,hidden:zt(x)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const o=rt(t)||"",l=Ye(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...t.labels||[]].includes(t),x=(r||[]).includes(t);if(!v&&!x){if(o==="textbox")return e.visitedElements.add(t),l==="INPUT"||l==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(t);let k;if(l==="SELECT")k=[...t.selectedOptions],!k.length&&t.options.length&&k.push(t.options[0]);else{const S=o==="combobox"?ug(t,"*").find(E=>rt(E)==="listbox"):t;k=S?ug(S,'[aria-selected="true"]').filter(E=>rt(E)==="option"):[]}return!k.length&&l==="INPUT"?t.value:k.map(S=>tn(S,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(t),""}}const c=t.getAttribute("aria-label")||"";if(kn(c))return e.visitedElements.add(t),c;if(!["presentation","none"].includes(o)){if(l==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const v=t.value||"";return kn(v)?v:t.type==="submit"?"Submit":t.type==="reset"?"Reset":t.getAttribute("title")||""}if(l==="INPUT"&&t.type==="file"){e.visitedElements.add(t);const v=t.labels||[];return v.length&&!e.embeddedInLabelledBy?Ci(v,e):"Choose File"}if(l==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const v=t.labels||[];if(v.length&&!e.embeddedInLabelledBy)return Ci(v,e);const x=t.getAttribute("alt")||"";if(kn(x))return x;const k=t.getAttribute("title")||"";return kn(k)?k:"Submit"}if(!r&&l==="BUTTON"){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e)}if(!r&&l==="OUTPUT"){e.visitedElements.add(t);const v=t.labels||[];return v.length?Ci(v,e):t.getAttribute("title")||""}if(!r&&(l==="TEXTAREA"||l==="SELECT"||l==="INPUT")){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e);const x=l==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||l==="TEXTAREA",k=t.getAttribute("placeholder")||"",S=t.getAttribute("title")||"";return!x||S?S:k}if(!r&&l==="FIELDSET"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="LEGEND")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});return t.getAttribute("title")||""}if(!r&&l==="FIGURE"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="FIGCAPTION")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});return t.getAttribute("title")||""}if(l==="IMG"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="TABLE"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="CAPTION")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});const v=t.getAttribute("summary")||"";if(v)return v}if(l==="AREA"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="SVG"||t.ownerSVGElement){e.visitedElements.add(t);for(let v=t.firstElementChild;v;v=v.nextElementSibling)if(Ye(v)==="TITLE"&&v.ownerSVGElement)return tn(v,{...n,embeddedInLabelledBy:{element:v,hidden:zt(v)}})}if(t.ownerSVGElement&&l==="A"){const v=t.getAttribute("xlink:title")||"";if(kn(v))return e.visitedElements.add(t),v}}const u=l==="SUMMARY"&&!["presentation","none"].includes(o);if(f1(o,e.embeddedInTargetElement==="descendant")||u||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const v=g1(t,n);if(e.embeddedInTargetElement==="self"?kn(v):v)return v}if(!["presentation","none"].includes(o)||l==="IFRAME"){e.visitedElements.add(t);const v=t.getAttribute("title")||"";if(kn(v))return v}return e.visitedElements.add(t),""}function g1(t,e){const n=[],r=(l,c)=>{var u;if(!(c&&l.assignedSlot))if(l.nodeType===1){const d=((u=nr(l))==null?void 0:u.display)||"inline";let p=tn(l,e);(d!=="inline"||l.nodeName==="BR")&&(p=" "+p+" "),n.push(p)}else l.nodeType===3&&n.push(l.textContent||"")};n.push(Ui(t,"::before")||"");const o=Ui(t);if(o!==void 0)n.push(o);else{const l=t.nodeName==="SLOT"?t.assignedNodes():[];if(l.length)for(const c of l)r(c,!1);else{for(let c=t.firstChild;c;c=c.nextSibling)r(c,!0);if(t.shadowRoot)for(let c=t.shadowRoot.firstChild;c;c=c.nextSibling)r(c,!0);for(const c of Ms(t,t.getAttribute("aria-owns")))r(c,!0)}}return n.push(Ui(t,"::after")||""),n.join("")}const gf=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Fm(t){return Ye(t)==="OPTION"?t.selected:gf.includes(rt(t)||"")?Rm(t.getAttribute("aria-selected"))===!0:!1}const mf=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function zm(t){const e=yf(t,!0);return e==="error"?!1:e}function m1(t){return yf(t,!0)}function y1(t){return yf(t,!1)}function yf(t,e){const n=Ye(t);if(e&&n==="INPUT"&&t.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(t.type))return t.checked;if(mf.includes(rt(t)||"")){const r=t.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const v1=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function w1(t){const e=Ye(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):v1.includes(rt(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const vf=["button"];function Um(t){if(vf.includes(rt(t)||"")){const e=t.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const wf=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Hm(t){if(Ye(t)==="DETAILS")return t.open;if(wf.includes(rt(t)||"")){const e=t.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Sf=["heading","listitem","row","treeitem"];function qm(t){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Ye(t)];if(e)return e;if(Sf.includes(rt(t)||"")){const n=t.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const Vm=["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 Yl(t){return Wm(t)||Km(t)}function Wm(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Ye(t))&&(t.hasAttribute("disabled")||S1(t)||x1(t))}function S1(t){return Ye(t)==="OPTION"&&!!t.closest("OPTGROUP[DISABLED]")}function x1(t){const e=t==null?void 0:t.closest("FIELDSET[DISABLED]");if(!e)return!1;const n=e.querySelector(":scope > LEGEND");return!n||!n.contains(t)}function Km(t,e=!1){if(!t)return!1;if(e||Vm.includes(rt(t)||"")){const n=(t.getAttribute("aria-disabled")||"").toLowerCase();return n==="true"?!0:n==="false"?!1:Km(at(t),!0)}return!1}function Ci(t,e){return[...t].map(n=>tn(n,{...e,embeddedInLabel:{element:n,hidden:zt(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}function _1(t){const e=Nf;let n=t,r;const o=[];for(;n;n=at(n)){const l=e.get(n);if(l!==void 0){r=l;break}o.push(n);const c=nr(n);if(!c){r=!0;break}const u=c.pointerEvents;if(u){r=u!=="none";break}}r===void 0&&(r=!0);for(const l of o)e.set(l,r);return r}let xf,_f,Ef,kf,vs,Xn,bf,Tf,Cf,Nf,Gm=0;function aa(){hf(),++Gm,xf??(xf=new Map),_f??(_f=new Map),Ef??(Ef=new Map),kf??(kf=new Map),vs??(vs=new Map),Xn??(Xn=new Map),bf??(bf=new Map),Tf??(Tf=new Map),Cf??(Cf=new Map),Nf??(Nf=new Map)}function ca(){--Gm||(xf=void 0,_f=void 0,Ef=void 0,kf=void 0,vs=void 0,Xn=void 0,bf=void 0,Tf=void 0,Cf=void 0,Nf=void 0),pf()}const E1={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function k1(t){return Qm(t)?"'"+t.replace(/'/g,"''")+"'":t}function xu(t){return Qm(t)?'"'+t.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
104
- `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Qm(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}let b1=0;function Jm(t){return t.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:t.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:t.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:t.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Hi(t,e){const n=Jm(e),r=new Set,o={root:{role:"fragment",name:"",children:[],element:t,props:{},box:Jl(t),receivesPointerEvents:!0},elements:new Map,refs:new Map},l=(u,d,p)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const S=d.nodeValue;u.role!=="textbox"&&S&&u.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!zt(m);let v=y;if(n.visibility==="ariaOrVisible"&&(v=y||Yn(m)),n.visibility==="ariaAndVisible"&&(v=y&&Yn(m)),n.visibility==="aria"&&!v)return;const x=[];if(m.hasAttribute("aria-owns")){const S=m.getAttribute("aria-owns").split(/\s+/);for(const E of S){const N=t.ownerDocument.getElementById(E);N&&x.push(N)}}const k=v?T1(m,n):null;k&&(k.ref&&(o.elements.set(k.ref,m),o.refs.set(m,k.ref)),u.children.push(k)),c(k||u,m,x,v)};function c(u,d,p,m){var k;const v=(((k=nr(d))==null?void 0:k.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&u.children.push(v),u.children.push(Ui(d,"::before")||"");const x=d.nodeName==="SLOT"?d.assignedNodes():[];if(x.length)for(const S of x)l(u,S,m);else{for(let S=d.firstChild;S;S=S.nextSibling)S.assignedSlot||l(u,S,m);if(d.shadowRoot)for(let S=d.shadowRoot.firstChild;S;S=S.nextSibling)l(u,S,m)}for(const S of p)l(u,S,m);if(u.children.push(Ui(d,"::after")||""),v&&u.children.push(v),u.children.length===1&&u.name===u.children[0]&&(u.children=[]),u.role==="link"&&d.hasAttribute("href")){const S=d.getAttribute("href");u.props.url=S}if(u.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==u.name){const S=d.getAttribute("placeholder");u.props.placeholder=S}}aa();try{l(o.root,t,!0)}finally{ca()}return N1(o.root),C1(o.root),o}function dg(t,e){if(e.refs==="none"||e.refs==="interactable"&&(!t.box.visible||!t.receivesPointerEvents))return;let n;n=t.element._ariaRef,(!n||n.role!==t.role||n.name!==t.name)&&(n={role:t.role,name:t.name,ref:(e.refPrefix??"")+"e"+ ++b1},t.element._ariaRef=n),t.ref=n.ref}function T1(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},element:t,box:Jl(t),receivesPointerEvents:!0,active:n};return dg(p,e),p}const r=e.includeGenericRole?"generic":null,o=rt(t)??r;if(!o||o==="presentation"||o==="none")return null;const l=gt(Ji(t,!1)||""),c=_1(t),u=Jl(t);if(o==="generic"&&u.inline&&t.childNodes.length===1&&t.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:o,name:l,children:[],props:{},element:t,box:u,receivesPointerEvents:c,active:n};return dg(d,e),mf.includes(o)&&(d.checked=zm(t)),Vm.includes(o)&&(d.disabled=Yl(t)),wf.includes(o)&&(d.expanded=Hm(t)),Sf.includes(o)&&(d.level=qm(t)),vf.includes(o)&&(d.pressed=Um(t)),gf.includes(o)&&(d.selected=Fm(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(d.children=[t.value]),d}function C1(t){const e=n=>{const r=[];for(const l of n.children||[]){if(typeof l=="string"){r.push(l);continue}const c=e(l);r.push(...c)}return n.role==="generic"&&r.length<=1&&r.every(l=>typeof l!="string"&&!!l.ref)?r:(n.children=r,[n])};e(t)}function N1(t){const e=(r,o)=>{if(!r.length)return;const l=gt(r.join(""));l&&o.push(l),r.length=0},n=r=>{const o=[],l=[];for(const c of r.children||[])typeof c=="string"?l.push(c):(e(l,o),n(c),o.push(c));e(l,o),r.children=o.length?o:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function Af(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function A1(t,e){return Af(t,e.text)}function L1(t,e){return Af(t,e.name)}function I1(t,e){const n=Hi(t,{mode:"expect"});return{matches:Xm(n.root,e,!1,!1),received:{raw:Zl(n,{mode:"expect"}),regex:Zl(n,{mode:"codegen"})}}}function M1(t,e){const n=Hi(t,{mode:"expect"}).root;return Xm(n,e,!0,!1).map(o=>o.element)}function Lf(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?A1(t,e):t===null||typeof t!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!L1(t.name,e)||!Af(t.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?pg(t.children||[],e.children||[]):e.containerMode==="equal"?hg(t.children||[],e.children||[],!1):e.containerMode==="deep-equal"||n?hg(t.children||[],e.children||[],!0):pg(t.children||[],e.children||[])}function hg(t,e,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!Lf(t[r],e[r],n))return!1;return!0}function pg(t,e){if(e.length>t.length)return!1;const n=t.slice(),r=e.slice();for(const o of r){let l=n.shift();for(;l&&!Lf(l,o,!1);)l=n.shift();if(!l)return!1}return!0}function Xm(t,e,n,r){const o=[],l=(c,u)=>{if(Lf(c,e,r)){const d=typeof c=="string"?u:c;return d&&o.push(d),!n}if(typeof c=="string")return!1;for(const d of c.children||[])if(l(d,c))return!0;return!1};return l(t,null),o}function Zl(t,e){const n=Jm(e),r=[],o=n.renderStringsAsRegex?P1:()=>!0,l=n.renderStringsAsRegex?j1:d=>d,c=(d,p,m,y)=>{if(typeof d=="string"){if(p&&!o(p,d))return;const E=xu(l(d));E&&r.push(m+"- text: "+E);return}let v=d.role;if(d.name&&d.name.length<=900){const E=l(d.name);if(E){const N=E.startsWith("/")&&E.endsWith("/")?E:JSON.stringify(E);v+=" "+N}}d.checked==="mixed"&&(v+=" [checked=mixed]"),d.checked===!0&&(v+=" [checked]"),d.disabled&&(v+=" [disabled]"),d.expanded&&(v+=" [expanded]"),d.active&&n.renderActive&&(v+=" [active]"),d.level&&(v+=` [level=${d.level}]`),d.pressed==="mixed"&&(v+=" [pressed=mixed]"),d.pressed===!0&&(v+=" [pressed]"),d.selected===!0&&(v+=" [selected]");let x=!1;d.ref&&(v+=` [ref=${d.ref}]`,y&&O1(d)&&(x=!0,v+=" [cursor=pointer]"));const k=m+"- "+k1(v),S=!!Object.keys(d.props).length;if(!d.children.length&&!S)r.push(k);else if(d.children.length===1&&typeof d.children[0]=="string"&&!S){const E=o(d,d.children[0])?l(d.children[0]):null;E?r.push(k+": "+xu(E)):r.push(k)}else{r.push(k+":");for(const[E,N]of Object.entries(d.props))r.push(m+" - /"+E+": "+xu(N));for(const E of d.children||[])c(E,d,m+" ",y&&!x)}},u=t.root;if(u.role==="fragment")for(const d of u.children||[])c(d,u,"",!!n.renderCursorPointer);else c(u,null,"",!!n.renderCursorPointer);return r.join(`
105
- `)}function j1(t){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 n="",r=0;const o=new RegExp(e.map(l=>"("+l.regex.source+")").join("|"),"g");return t.replace(o,(l,...c)=>{const u=c[c.length-2],d=c.slice(0,-2);n+=Kl(t.slice(r,u));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];n+=m;break}return r=u+l.length,l}),n?(n+=Kl(t.slice(r)),String(new RegExp(n))):t}function P1(t,e){if(!e.length)return!1;if(!t.name)return!0;if(t.name.length>e.length)return!1;const n=e.length<=200&&t.name.length<=200?SS(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function O1(t){var e;return((e=t.box.style)==null?void 0:e.cursor)==="pointer"}const gg=":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.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 _u{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const n=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=n.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=n.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(gg),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=gg,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 n=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),r=Mr(this._language,Tn(e)),o=n.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(n.map((l,c)=>{const u=n.length>1?` [${c+1} of ${n.length}]`:"";return{element:l,color:o,tooltipText:r+u}})),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,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,n;for(const r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(n=r.tooltipElement)==null||n.remove();this._renderedEntries=[]}maskElements(e,n){this.updateHighlight(e.map(r=>({element:r,color:n})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const n of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);let o;if(n.tooltipText){o=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(o),o.style.top="0",o.style.left="0",o.style.display="flex";const l=this._injectedScript.document.createElement("x-pw-tooltip-line");l.textContent=n.tooltipText,o.appendChild(l)}this._renderedEntries.push({targetElement:n.element,color:n.color,tooltipElement:o,highlightElement:r})}for(const n of this._renderedEntries){if(n.box=n.targetElement.getBoundingClientRect(),!n.tooltipElement)continue;const{anchorLeft:r,anchorTop:o}=this.tooltipPosition(n.box,n.tooltipElement);n.tooltipTop=o,n.tooltipLeft=r}for(const n of this._renderedEntries){n.tooltipElement&&(n.tooltipElement.style.top=n.tooltipTop+"px",n.tooltipElement.style.left=n.tooltipLeft+"px");const r=n.box;n.highlightElement.style.backgroundColor=n.color,n.highlightElement.style.left=r.x+"px",n.highlightElement.style.top=r.y+"px",n.highlightElement.style.width=r.width+"px",n.highlightElement.style.height=r.height+"px",n.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,n){const r=n.offsetWidth,o=n.offsetHeight,l=this._glassPaneElement.offsetWidth,c=this._glassPaneElement.offsetHeight;let u=Math.max(5,e.left);u+r>l-5&&(u=l-r-5);let d=Math.max(0,e.bottom)+5;return d+o>c-5&&(Math.max(0,e.top)>o+5?d=Math.max(0,e.top)-o-5:d=c-5-o),{anchorLeft:u,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let n=0;n<this._renderedEntries.length;++n){if(e[n].element!==this._renderedEntries[n].targetElement||e[n].color!==this._renderedEntries[n].color)return!1;const r=this._renderedEntries[n].box;if(!r)return!1;const o=e[n].element.getBoundingClientRect();if(o.top!==r.top||o.right!==r.right||o.bottom!==r.bottom||o.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 R1(t,e,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function $1(t,e,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function D1(t,e,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function B1(t,e,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function F1(t,e,n){const r=n===void 0?50:n;let o=0;return t.left-e.right>=0&&(o+=t.left-e.right),e.left-t.right>=0&&(o+=e.left-t.right),e.top-t.bottom>=0&&(o+=e.top-t.bottom),t.top-e.bottom>=0&&(o+=t.top-e.bottom),o>r?void 0:o}const z1=["left-of","right-of","above","below","near"];function Ym(t,e,n,r){const o=e.getBoundingClientRect(),l={"left-of":$1,"right-of":R1,above:D1,below:B1,near:F1}[t];let c;for(const u of n){if(u===e)continue;const d=l(o,u.getBoundingClientRect(),r);d!==void 0&&(c===void 0||d<c)&&(c=d)}return c}function Zm(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return ey(t,e)}function ey(t,e){const n=typeof t=="string"&&!e.caseSensitive?t.toUpperCase():t,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!n:e.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:e.op==="*="?n.includes(r):e.op==="^="?n.startsWith(r):e.op==="$="?n.endsWith(r):e.op==="|="?n===r||n.startsWith(r+"-"):e.op==="~="?n.split(" ").includes(r):!1}function If(t){const e=t.ownerDocument;return t.nodeName==="SCRIPT"||t.nodeName==="NOSCRIPT"||t.nodeName==="STYLE"||e.head&&e.head.contains(t)}function Tt(t,e){let n=t.get(e);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!If(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))n={full:e.value,normalized:gt(e.value),immediate:[e.value]};else{for(let o=e.firstChild;o;o=o.nextSibling)if(o.nodeType===Node.TEXT_NODE)n.full+=o.nodeValue||"",r+=o.nodeValue||"";else{if(o.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",o.nodeType===Node.ELEMENT_NODE&&(n.full+=Tt(t,o).full)}r&&n.immediate.push(r),e.shadowRoot&&(n.full+=Tt(t,e.shadowRoot).full),n.full&&(n.normalized=gt(n.full))}}t.set(e,n)}return n}function ua(t,e,n){if(If(e)||!n(Tt(t,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Tt(t,r)))return"selfAndChildren";return e.shadowRoot&&n(Tt(t,e.shadowRoot))?"selfAndChildren":"self"}function ty(t,e){const n=Bm(e);if(n)return n.map(l=>Tt(t,l));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:gt(r),immediate:[r]}];const o=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||o){const l=e.labels;if(l)return[...l].map(c=>Tt(t,c))}return[]}function mg(t){return t.displayName||t.name||"Anonymous"}function U1(t){if(t.type)switch(typeof t.type){case"function":return mg(t.type);case"string":return t.type;case"object":return t.type.displayName||(t.type.render?mg(t.type.render):"")}if(t._currentElement){const e=t._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function H1(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function q1(t){if(t.child){const n=[];for(let r=t.child;r;r=r.sibling)n.push(r);return n}if(!t._currentElement)return[];const e=n=>{var o;const r=(o=n._currentElement)==null?void 0:o.type;return typeof r=="function"||typeof r=="string"};if(t._renderedComponent){const n=t._renderedComponent;return e(n)?[n]:[]}return t._renderedChildren?[...Object.values(t._renderedChildren)].filter(e):[]}function V1(t){var r;const e=t.memoizedProps||((r=t._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const n={...e};return delete n.children,n}function ny(t){var r;const e={key:H1(t),name:U1(t),children:q1(t).map(ny),rootElements:[],props:V1(t)},n=t.stateNode||t._hostNode||((r=t._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)e.rootElements.push(n);else for(const o of e.children)e.rootElements.push(...o.rootElements);return e}function ry(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)ry(r,e,n);return n}function sy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);do{const o=r.currentNode,l=o,c=Object.keys(l).find(d=>d.startsWith("__reactContainer")&&l[d]!==null);if(c)e.push(l[c].stateNode.current);else{const d="_reactRootContainer";l.hasOwnProperty(d)&&l[d]!==null&&e.push(l[d]._internalRoot.current)}if(o instanceof Element&&o.hasAttribute("data-reactroot"))for(const d of Object.keys(o))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(o[d]);const u=o instanceof Element?o.shadowRoot:null;u&&sy(u,e)}while(r.nextNode());return e}const W1=()=>({queryAll(t,e){const{name:n,attributes:r}=Ir(e,!1),c=sy(t.ownerDocument||t).map(d=>ny(d)).map(d=>ry(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),n&&p.name!==n||p.rootElements.some(y=>!Qi(t,y)))return!1;for(const y of r)if(!Zm(m,y))return!1;return!0})).flat(),u=new Set;for(const d of c)for(const p of d.rootElements)u.add(p);return[...u]}}),iy=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];iy.sort();function Ni(t,e,n){if(!e.includes(n))throw new Error(`"${t}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function fs(t,e){if(t.op!=="<truthy>"&&!e.includes(t.value))throw new Error(`"${t.name}" must be one of ${e.map(n=>JSON.stringify(n)).join(", ")}`)}function ds(t,e){if(!e.includes(t.op))throw new Error(`"${t.name}" does not support "${t.op}" matcher`)}function K1(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ni(r.name,mf,e),fs(r,[!0,!1,"mixed"]),ds(r,["<truthy>","="]),n.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ni(r.name,vf,e),fs(r,[!0,!1,"mixed"]),ds(r,["<truthy>","="]),n.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ni(r.name,gf,e),fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ni(r.name,wf,e),fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ni(r.name,Sf,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');n.level=r.value;break}case"disabled":{fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.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');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${iy.map(o=>`"${o}"`).join(", ")}.`)}return n}function G1(t,e,n){const r=[],o=c=>{if(rt(c)===e.role&&!(e.selected!==void 0&&Fm(c)!==e.selected)&&!(e.checked!==void 0&&zm(c)!==e.checked)&&!(e.pressed!==void 0&&Um(c)!==e.pressed)&&!(e.expanded!==void 0&&Hm(c)!==e.expanded)&&!(e.level!==void 0&&qm(c)!==e.level)&&!(e.disabled!==void 0&&Yl(c)!==e.disabled)&&!(!e.includeHidden&&zt(c))){if(e.name!==void 0){const u=gt(Ji(c,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=gt(e.name)),n&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!ey(u,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(c)}},l=c=>{const u=[];c.shadowRoot&&u.push(c.shadowRoot);for(const d of c.querySelectorAll("*"))o(d),d.shadowRoot&&u.push(d.shadowRoot);u.forEach(l)};return l(t),r}function yg(t){return{queryAll:(e,n)=>{const r=Ir(n,!0),o=r.name.toLowerCase();if(!o)throw new Error("Role must not be empty");const l=K1(r.attributes,o);aa();try{return G1(e,l,t)}finally{ca()}}}}class Q1{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",Y1),this._engines.set("is",Ri),this._engines.set("where",Ri),this._engines.set("has",J1),this._engines.set("scope",X1),this._engines.set("light",Z1),this._engines.set("visible",e_),this._engines.set("text",t_),this._engines.set("text-is",n_),this._engines.set("text-matches",r_),this._engines.set("has-text",s_),this._engines.set("right-of",Ai("right-of")),this._engines.set("left-of",Ai("left-of")),this._engines.set("above",Ai("above")),this._engines.set("below",Ai("below")),this._engines.set("near",Ai("near")),this._engines.set("nth-match",i_);const e=[...this._engines.keys()];e.sort();const n=[...fm];if(n.sort(),e.join("|")!==n.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${n.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,n,r,o){e.has(n)||e.set(n,[]);const l=e.get(n),c=l.find(d=>r.every((p,m)=>d.rest[m]===p));if(c)return c.result;const u=o();return l.push({rest:r,result:u}),u}_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,n,r){const o=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,e,[o,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(o)?this._matchesEngine(Ri,e,o,r):(this._hasScopeClause(o)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,o.simples[o.simples.length-1].selector,r)?this._matchesParents(e,o,o.simples.length-2,r):!1))}finally{this.end()}}query(e,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Ri,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const o=this._scoreMap;this._scoreMap=new Map;let l=this._querySimple(e,r.simples[r.simples.length-1].selector);return l=l.filter(c=>this._matchesParents(c,r,r.simples.length-2,e)),this._scoreMap.size&&l.sort((c,u)=>{const d=this._scoreMap.get(c),p=this._scoreMap.get(u);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=o,l})}finally{this.end()}}_markScore(e,n){this._scoreMap&&this._scoreMap.set(e,n)}_hasScopeClause(e){return e.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const n=at(e.scope);return n?{...e,scope:n,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,n,r){return this._cached(this._cacheMatchesSimple,e,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||n.css&&!this._matchesCSS(e,n.css))return!1;for(const o of n.functions)if(!this._matchesEngine(this._getEngine(o.name),e,o.args,r))return!1;return!0})}_querySimple(e,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=n.css;const o=n.functions;r==="*"&&o.length&&(r=void 0);let l,c=-1;r!==void 0?l=this._queryCSS(e,r):(c=o.findIndex(u=>this._getEngine(u.name).query!==void 0),c===-1&&(c=0),l=this._queryEngine(this._getEngine(o[c].name),e,o[c].args));for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches!==void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[u].args,e)))}for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches===void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[u].args,e)))}return l}):this._queryCSS(e,n.css||"*")}_matchesParents(e,n,r,o){return r<0?!0:this._cached(this._cacheMatchesParents,e,[n,r,o.scope,o.pierceShadow,o.originalScope],()=>{const{selector:l,combinator:c}=n.simples[r];if(c===">"){const u=Sl(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c==="+"){const u=Eu(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c===""){let u=Sl(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=Sl(u,o)}return!1}if(c==="~"){let u=Eu(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="~")break}u=Eu(u,o)}return!1}if(c===">="){let u=e;for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=Sl(u,o)}return!1}throw new Error(`Unsupported combinator "${c}"`)})}_matchesEngine(e,n,r,o){if(e.matches)return this._callMatches(e,n,r,o);if(e.query)return this._callQuery(e,r,o).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,n,r){if(e.query)return this._callQuery(e,r,n);if(e.matches)return this._queryCSS(n,"*").filter(o=>this._callMatches(e,o,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,n,r,o){return this._cached(this._cacheCallMatches,n,[e,o.scope,o.pierceShadow,o.originalScope,...r],()=>e.matches(n,r,o,this))}_callQuery(e,n,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...n],()=>e.query(r,n,this))}_matchesCSS(e,n){return e.matches(n)}_queryCSS(e,n){return this._cached(this._cacheQueryCSS,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function o(l){if(r=r.concat([...l.querySelectorAll(n)]),!!e.pierceShadow){l.shadowRoot&&o(l.shadowRoot);for(const c of l.querySelectorAll("*"))c.shadowRoot&&o(c.shadowRoot)}}return o(e.scope),r})}_getEngine(e){const n=this._engines.get(e);if(!n)throw new Error(`Unknown selector engine "${e}"`);return n}}const Ri={matches(t,e,n,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(o=>r.matches(t,o,n))},query(t,e,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const o of e)r=r.concat(n.query(t,o));return e.length===1?r:oy(r)}},J1={matches(t,e,n,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:t},e).length>0}},X1={matches(t,e,n,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const o=n.originalScope||n.scope;return o.nodeType===9?t===o.documentElement:t===o},query(t,e,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=t.originalScope||t.scope;if(r.nodeType===9){const o=r.documentElement;return o?[o]:[]}return r.nodeType===1?[r]:[]}},Y1={matches(t,e,n,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(t,e,n)}},Z1={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},e_={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return Yn(t)}},t_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const o=gt(e[0]).toLowerCase(),l=c=>c.normalized.toLowerCase().includes(o);return ua(r._cacheText,t,l)==="self"}},n_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const o=gt(e[0]),l=c=>!o&&!c.immediate.length?!0:c.immediate.some(u=>gt(u)===o);return ua(r._cacheText,t,l)!=="none"}},r_={matches(t,e,n,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 o=new RegExp(e[0],e.length===2?e[1]:void 0),l=c=>o.test(c.full);return ua(r._cacheText,t,l)==="self"}},s_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(If(t))return!1;const o=gt(e[0]).toLowerCase();return(c=>c.normalized.toLowerCase().includes(o))(Tt(r._cacheText,t))}};function Ai(t){return{matches(e,n,r,o){const l=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,c=l===void 0?n:n.slice(0,n.length-1);if(n.length<1+(l===void 0?0:1))throw new Error(`"${t}" engine expects a selector list and optional maximum distance in pixels`);const u=o.query(r,c),d=Ym(t,e,u,l);return d===void 0?!1:(o._markScore(e,d),!0)}}}const i_={query(t,e,n){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 o=Ri.query(t,e.slice(0,e.length-1),n);return r--,r<o.length?[o[r]]:[]}};function Sl(t,e){if(t!==e.scope)return e.pierceShadow?at(t):t.parentElement||void 0}function Eu(t,e){if(t!==e.scope)return t.previousElementSibling||void 0}function oy(t){const e=new Map,n=[],r=[];function o(c){let u=e.get(c);if(u)return u;const d=at(c);return d?o(d).children.push(c):n.push(c),u={children:[],taken:!1},e.set(c,u),u}for(const c of t)o(c).taken=!0;function l(c){const u=e.get(c);if(u.taken&&r.push(c),u.children.length>1){const d=new Set(u.children);u.children=[];let p=c.firstElementChild;for(;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling;for(p=c.shadowRoot?c.shadowRoot.firstElementChild:null;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling}u.children.forEach(l)}return n.forEach(l),r}const ly=10,js=ly/2,vg=1,o_=2,l_=10,a_=50,ay=100,cy=120,uy=140,fy=160,Rl=180,dy=200,wg=250,c_=cy+js,u_=uy+js,f_=ay+js,d_=fy+js,h_=Rl+js,p_=dy+js,g_=300,m_=500,hy=510,ku=520,py=530,zu=1e4,y_=1e7,v_=1e3;function Sg(t,e,n){t._evaluator.begin();const r={allowText:new Map,disallowText:new Map};aa(),hf();try{let o=[];if(n.forTextExpect){let u=$i(t,e.ownerDocument.documentElement,n);for(let d=e;d;d=at(d)){const p=Er(r,t,d,{...n,noText:!0});if(!p)continue;if(kr(p)<=v_){u=p;break}}o=[$l(u)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const u=Oi(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",n.root);u&&Yn(u)&&(e=u)}if(n.multiple){const u=Er(r,t,e,n),d=Er(r,t,e,{...n,noText:!0});let p=[u,d];if(r.allowText.clear(),r.disallowText.clear(),u&&bu(u)&&p.push(Er(r,t,e,{...n,noCSSId:!0})),d&&bu(d)&&p.push(Er(r,t,e,{...n,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=$i(t,e,n);p.push(m),bu(m)&&p.push($i(t,e,{...n,noCSSId:!0}))}o=[...new Set(p.map(m=>$l(m)))]}else{const u=Er(r,t,e,n)||$i(t,e,n);o=[$l(u)]}}const l=o[0],c=t.parseSelector(l);return{selector:l,selectors:o,elements:t.querySelectorAll(c,n.root??e.ownerDocument)}}finally{pf(),ca(),t._evaluator.end()}}function Er(t,e,n,r){if(r.root&&!Qi(r.root,n))throw new Error("Target element must belong to the root's subtree");if(n===r.root)return[{engine:"css",selector:":scope",score:1}];if(n.ownerDocument.documentElement===n)return[{engine:"css",selector:"html",score:1}];let o=null;const l=u=>{(!o||kr(u)<kr(o))&&(o=u)},c=[];if(!r.noText)for(const u of S_(e,n,!r.isRecursive))c.push({candidate:u,isTextCandidate:!0});for(const u of w_(e,n,r))r.omitInternalEngines&&u.engine.startsWith("internal:")||c.push({candidate:[u],isTextCandidate:!1});c.sort((u,d)=>kr(u.candidate)-kr(d.candidate));for(const{candidate:u,isTextCandidate:d}of c){const p=e.querySelectorAll(e.parseSelector($l(u)),r.root??n.ownerDocument);if(!p.includes(n))continue;if(p.length===1){l(u);break}const m=p.indexOf(n);if(!(m>5)&&(l([...u,{engine:"nth",selector:String(m),score:zu}]),!r.isRecursive))for(let y=at(n);y&&y!==r.root;y=at(y)){const v=p.filter(F=>Qi(y,F)&&F!==y),x=v.indexOf(n);if(v.length>5||x===-1||x===m&&v.length>1)continue;const k=v.length===1?u:[...u,{engine:"nth",selector:String(x),score:zu}];if(o&&kr([{engine:"",selector:"",score:1},...k])>=kr(o))continue;const E=!!r.noText||d,N=E?t.disallowText:t.allowText;let T=N.get(y);T===void 0&&(T=Er(t,e,y,{...r,isRecursive:!0,noText:E})||$i(e,y,r),N.set(y,T)),T&&l([...T,...k])}}return o}function w_(t,e,n){const r=[];{for(const c of["data-testid","data-test-id","data-test"])c!==n.testIdAttributeName&&e.getAttribute(c)&&r.push({engine:"css",selector:`[${c}=${ms(e.getAttribute(c))}]`,score:o_});if(!n.noCSSId){const c=e.getAttribute("id");c&&!x_(c)&&r.push({engine:"css",selector:gy(c),score:m_})}r.push({engine:"css",selector:bn(e),score:py})}if(e.nodeName==="IFRAME"){for(const c of["name","title"])e.getAttribute(c)&&r.push({engine:"css",selector:`${bn(e)}[${c}=${ms(e.getAttribute(c))}]`,score:l_});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${ms(e.getAttribute(n.testIdAttributeName))}]`,score:vg}),Uu([r]),r}if(e.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${ht(e.getAttribute(n.testIdAttributeName),!0)}]`,score:vg}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e;if(c.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${ht(c.placeholder,!0)}]`,score:c_});for(const u of ws(c.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${ht(u.text,!1)}]`,score:cy-u.scoreBonus})}}const o=ty(t._evaluator._cacheText,e);for(const c of o){const u=c.normalized;r.push({engine:"internal:label",selector:kt(u,!0),score:u_});for(const d of ws(u))r.push({engine:"internal:label",selector:kt(d.text,!1),score:uy-d.scoreBonus})}const l=rt(e);return l&&!["none","presentation"].includes(l)&&r.push({engine:"internal:role",selector:l,score:hy}),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:`${bn(e)}[name=${ms(e.getAttribute("name"))}]`,score:ku}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${bn(e)}[type=${ms(e.getAttribute("type"))}]`,score:ku}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:bn(e),score:ku+1}),Uu([r]),r}function S_(t,e,n){if(e.nodeName==="SELECT")return[];const r=[],o=e.getAttribute("title");if(o){r.push([{engine:"internal:attr",selector:`[title=${ht(o,!0)}]`,score:p_}]);for(const p of ws(o))r.push([{engine:"internal:attr",selector:`[title=${ht(p.text,!1)}]`,score:dy-p.scoreBonus}])}const l=e.getAttribute("alt");if(l&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${ht(l,!0)}]`,score:d_}]);for(const p of ws(l))r.push([{engine:"internal:attr",selector:`[alt=${ht(p.text,!1)}]`,score:fy-p.scoreBonus}])}const c=Tt(t._evaluator._cacheText,e).normalized,u=c?ws(c):[];if(c){if(n){c.length<=80&&r.push([{engine:"internal:text",selector:kt(c,!0),score:h_}]);for(const m of u)r.push([{engine:"internal:text",selector:kt(m.text,!1),score:Rl-m.scoreBonus}])}const p={engine:"css",selector:bn(e),score:py};for(const m of u)r.push([p,{engine:"internal:has-text",selector:kt(m.text,!1),score:Rl-m.scoreBonus}]);if(n&&c.length<=80){const m=new RegExp("^"+Kl(c)+"$");r.push([p,{engine:"internal:has-text",selector:kt(m,!1),score:wg}])}}const d=rt(e);if(d&&!["none","presentation"].includes(d)){const p=Ji(e,!1);if(p){const m={engine:"internal:role",selector:`${d}[name=${ht(p,!0)}]`,score:f_};r.push([m]);for(const y of ws(p))r.push([{engine:"internal:role",selector:`${d}[name=${ht(y.text,!1)}]`,score:ay-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:hy};for(const y of u)r.push([m,{engine:"internal:has-text",selector:kt(y.text,!1),score:Rl-y.scoreBonus}]);if(n&&c.length<=80){const y=new RegExp("^"+Kl(c)+"$");r.push([m,{engine:"internal:has-text",selector:kt(y,!1),score:wg}])}}}return Uu(r),r}function gy(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id=${ms(t)}]`}function bu(t){return t.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function $i(t,e,n){const r=n.root??e.ownerDocument,o=[];function l(u){const d=o.slice();u&&d.unshift(u);const p=d.join(" > "),m=t.parseSelector(p);return t.querySelector(m,r,!1)===e?p:void 0}function c(u){const d={engine:"css",selector:u,score:y_},p=t.parseSelector(u),m=t.querySelectorAll(p,r);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:zu};return[d,y]}for(let u=e;u&&u!==r;u=at(u)){let d="";if(u.id&&!n.noCSSId){const y=gy(u.id),v=l(y);if(v)return c(v);d=y}const p=u.parentNode,m=[...u.classList].map(__);for(let y=0;y<m.length;++y){const v="."+m.slice(0,y+1).join("."),x=l(v);if(x)return c(x);!d&&p&&p.querySelectorAll(v).length===1&&(d=v)}if(p){const y=[...p.children],v=u.nodeName,k=y.filter(E=>E.nodeName===v).indexOf(u)===0?bn(u):`${bn(u)}:nth-child(${1+y.indexOf(u)})`,S=l(k);if(S)return c(S);d||(d=k)}else d||(d=bn(u));o.unshift(d)}return c(l())}function Uu(t){for(const e of t)for(const n of e)n.score>a_&&n.score<g_&&(n.score+=Math.min(ly,n.selector.length/10|0))}function $l(t){const e=[];let n="";for(const{engine:r,selector:o}of t)e.length&&(n!=="css"||r!=="css"||o.startsWith(":nth-match("))&&e.push(">>"),n=r,r==="css"?e.push(o):e.push(`${r}=${o}`);return e.join(" ")}function kr(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n].score*(t.length-n);return e}function x_(t){let e,n=0;for(let r=0;r<t.length;++r){const o=t[r];let l;if(!(o==="-"||o==="_")){if(o>="a"&&o<="z"?l="lower":o>="A"&&o<="Z"?l="upper":o>="0"&&o<="9"?l="digit":l="other",l==="lower"&&e==="upper"){e=l;continue}e&&e!==l&&++n,e=l}}return n>=t.length/4}function xl(t,e){if(t.length<=e)return t;t=t.substring(0,e);const n=t.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function ws(t){let e=[];{const n=t.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const o=xl(t.substring(r).trimStart(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}{const n=t.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const o=xl(t.substring(0,t.length-r).trimEnd(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}return t.length<=30?e.push({text:t,scoreBonus:0}):(e.push({text:xl(t,80),scoreBonus:0}),e.push({text:xl(t,30),scoreBonus:1})),e=e.filter(n=>n.text),e.length||e.push({text:t.substring(0,80),scoreBonus:0}),e}function bn(t){return t.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function __(t){let e="";for(let n=0;n<t.length;n++)e+=E_(t,n);return e}function E_(t,e){const n=t.charCodeAt(e);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}function my(t,e){const n=t.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function k_(t,e){return e?e.toUpperCase():""}const b_=/(?:^|[-_/])(\w)/g,yy=t=>t&&t.replace(b_,k_);function T_(t){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const v=m.__file;if(v)return yy(my(v,".vue"))}function n(m,y){return m.type.__playwright_guessedName=y,y}function r(m){var v,x,k,S;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const E in(x=(v=m.parent)==null?void 0:v.type)==null?void 0:x.components)if(((k=m.parent)==null?void 0:k.type.components[E])===m.type)return n(m,E);for(const E in(S=m.appContext)==null?void 0:S.components)if(m.appContext.components[E]===m.type)return n(m,E);return"Anonymous Component"}function o(m){return m._isBeingDestroyed||m.isUnmounted}function l(m){return m.subTree.type.toString()==="Symbol(Fragment)"}function c(m){const y=[];return m.component&&y.push(m.component),m.suspense&&y.push(...c(m.suspense.activeBranch)),Array.isArray(m.children)&&m.children.forEach(v=>{v.component?y.push(v.component):y.push(...c(v))}),y.filter(v=>{var x;return!o(v)&&!((x=v.type.devtools)!=null&&x.hide)})}function u(m){return l(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let v=0,x=m.children.length;v<x;v++){const k=m.children[v];k.component?y.push(...u(k.component)):k.el&&y.push(k.el)}return y}function p(m){return{name:r(m),children:c(m.subTree).map(p),rootElements:u(m),props:m.props}}return p(t)}function C_(t){function e(l){const c=l.displayName||l.name||l._componentTag;if(c)return c;const u=l.__file;if(u)return yy(my(u,".vue"))}function n(l){const c=e(l.$options||l.fnOptions||{});return c||(l.$root===l?"Root":"Anonymous Component")}function r(l){return l.$children?l.$children:Array.isArray(l.subTree.children)?l.subTree.children.filter(c=>!!c.component).map(c=>c.component):[]}function o(l){return{name:n(l),children:r(l).map(o),rootElements:[l.$el],props:l._props}}return o(t)}function vy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)vy(r,e,n);return n}function wy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT),o=new Set;do{const l=r.currentNode;l.__vue__&&o.add(l.__vue__.$root),l.__vue_app__&&l._vnode&&l._vnode.component&&e.push({root:l._vnode.component,version:3});const c=l instanceof Element?l.shadowRoot:null;c&&wy(c,e)}while(r.nextNode());for(const l of o)e.push({version:2,root:l});return e}const N_=()=>({queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:o}=Ir(e,!1),u=wy(n).map(p=>p.version===3?T_(p.root):C_(p.root)).map(p=>vy(p,m=>{if(r&&m.name!==r||m.rootElements.some(y=>!Qi(t,y)))return!1;for(const y of o)if(!Zm(m.props,y))return!1;return!0})).flat(),d=new Set;for(const p of u)for(const m of p.rootElements)d.add(m);return[...d]}}),xg={queryAll(t,e){e.startsWith("/")&&t.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const n=[],r=t.ownerDocument||t;if(!r)return n;const o=r.evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let l=o.iterateNext();l;l=o.iterateNext())l.nodeType===Node.ELEMENT_NODE&&n.push(l);return n}};function Mf(t,e,n){return`internal:attr=[${t}=${ht(e,(n==null?void 0:n.exact)||!1)}]`}function A_(t,e){return`internal:testid=[${t}=${ht(e,!0)}]`}function L_(t,e){return"internal:label="+kt(t,!!(e!=null&&e.exact))}function I_(t,e){return Mf("alt",t,e)}function M_(t,e){return Mf("title",t,e)}function j_(t,e){return Mf("placeholder",t,e)}function P_(t,e){return"internal:text="+kt(t,!!(e!=null&&e.exact))}function O_(t,e={}){const n=[];return e.checked!==void 0&&n.push(["checked",String(e.checked)]),e.disabled!==void 0&&n.push(["disabled",String(e.disabled)]),e.selected!==void 0&&n.push(["selected",String(e.selected)]),e.expanded!==void 0&&n.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&n.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&n.push(["level",String(e.level)]),e.name!==void 0&&n.push(["name",ht(e.name,!!e.exact)]),e.pressed!==void 0&&n.push(["pressed",String(e.pressed)]),`internal:role=${t}${n.map(([r,o])=>`[${r}=${o}]`).join("")}`}const Li=Symbol("selector"),R_=class Di{constructor(e,n,r){if(r!=null&&r.hasText&&(n+=` >> internal:has-text=${kt(r.hasText,!1)}`),r!=null&&r.hasNotText&&(n+=` >> internal:has-not-text=${kt(r.hasNotText,!1)}`),r!=null&&r.has&&(n+=" >> internal:has="+JSON.stringify(r.has[Li])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[Li])),(r==null?void 0:r.visible)!==void 0&&(n+=` >> visible=${r.visible?"true":"false"}`),this[Li]=n,n){const c=e.parseSelector(n);this.element=e.querySelector(c,e.document,!1),this.elements=e.querySelectorAll(c,e.document)}const o=n,l=this;l.locator=(c,u)=>new Di(e,o?o+" >> "+c:c,u),l.getByTestId=c=>l.locator(A_(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),l.getByAltText=(c,u)=>l.locator(I_(c,u)),l.getByLabel=(c,u)=>l.locator(L_(c,u)),l.getByPlaceholder=(c,u)=>l.locator(j_(c,u)),l.getByText=(c,u)=>l.locator(P_(c,u)),l.getByTitle=(c,u)=>l.locator(M_(c,u)),l.getByRole=(c,u={})=>l.locator(O_(c,u)),l.filter=c=>new Di(e,n,c),l.first=()=>l.locator("nth=0"),l.last=()=>l.locator("nth=-1"),l.nth=c=>l.locator(`nth=${c}`),l.and=c=>new Di(e,o+" >> internal:and="+JSON.stringify(c[Li])),l.or=c=>new Di(e,o+" >> internal:or="+JSON.stringify(c[Li]))}};let $_=R_;class D_{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,n)=>this._querySelector(e,!!n),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,n)=>this._generateLocator(e,n),ariaSnapshot:(e,n)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,n||{mode:"expect"}),resume:()=>this._resume(),...new $_(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,n){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,n)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const n=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(n,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,n){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(e);return Mr(n||"javascript",r)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function B_(t){try{return t instanceof RegExp||Object.prototype.toString.call(t)==="[object RegExp]"}catch{return!1}}function F_(t){try{return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}catch{return!1}}function z_(t){try{return t instanceof URL||Object.prototype.toString.call(t)==="[object URL]"}catch{return!1}}function U_(t){var e;try{return t instanceof Error||t&&((e=Object.getPrototypeOf(t))==null?void 0:e.name)==="Error"}catch{return!1}}function H_(t,e){try{return t instanceof e||Object.prototype.toString.call(t)===`[object ${e.name}]`}catch{return!1}}const Sy={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function q_(t){if("toBase64"in t)return t.toBase64();const e=Array.from(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).map(n=>String.fromCharCode(n)).join("");return btoa(e)}function V_(t,e){const n=atob(t),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return new e(r.buffer)}function Hu(t,e=[],n=new Map){if(!Object.is(t,void 0)){if(typeof t=="object"&&t){if("ref"in t)return n.get(t.ref);if("v"in t)return t.v==="undefined"?void 0:t.v==="null"?null:t.v==="NaN"?NaN:t.v==="Infinity"?1/0:t.v==="-Infinity"?-1/0:t.v==="-0"?-0:void 0;if("d"in t)return new Date(t.d);if("u"in t)return new URL(t.u);if("bi"in t)return BigInt(t.bi);if("e"in t){const r=new Error(t.e.m);return r.name=t.e.n,r.stack=t.e.s,r}if("r"in t)return new RegExp(t.r.p,t.r.f);if("a"in t){const r=[];n.set(t.id,r);for(const o of t.a)r.push(Hu(o,e,n));return r}if("o"in t){const r={};n.set(t.id,r);for(const{k:o,v:l}of t.o)o!=="__proto__"&&(r[o]=Hu(l,e,n));return r}if("h"in t)return e[t.h];if("ta"in t)return V_(t.ta.b,Sy[t.ta.k])}return t}}function W_(t,e){return qu(t,e,{visited:new Map,lastId:0})}function qu(t,e,n){if(t&&typeof t=="object"){if(typeof globalThis.Window=="function"&&t instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&t instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&t instanceof globalThis.Node)return"ref: <Node>"}return xy(t,e,n)}function xy(t,e,n){var l;const r=e(t);if("fallThrough"in r)t=r.fallThrough;else return r;if(typeof t=="symbol")return{v:"undefined"};if(Object.is(t,void 0))return{v:"undefined"};if(Object.is(t,null))return{v:"null"};if(Object.is(t,NaN))return{v:"NaN"};if(Object.is(t,1/0))return{v:"Infinity"};if(Object.is(t,-1/0))return{v:"-Infinity"};if(Object.is(t,-0))return{v:"-0"};if(typeof t=="boolean"||typeof t=="number"||typeof t=="string")return t;if(typeof t=="bigint")return{bi:t.toString()};if(U_(t)){let c;return(l=t.stack)!=null&&l.startsWith(t.name+": "+t.message)?c=t.stack:c=`${t.name}: ${t.message}
106
- ${t.stack}`,{e:{n:t.name,m:t.message,s:c}}}if(F_(t))return{d:t.toJSON()};if(z_(t))return{u:t.toJSON()};if(B_(t))return{r:{p:t.source,f:t.flags}};for(const[c,u]of Object.entries(Sy))if(H_(t,u))return{ta:{b:q_(t),k:c}};const o=n.visited.get(t);if(o)return{ref:o};if(Array.isArray(t)){const c=[],u=++n.lastId;n.visited.set(t,u);for(let d=0;d<t.length;++d)c.push(qu(t[d],e,n));return{a:c,id:u}}if(typeof t=="object"){const c=[],u=++n.lastId;n.visited.set(t,u);for(const p of Object.keys(t)){let m;try{m=t[p]}catch{continue}p==="toJSON"&&typeof m=="function"?c.push({k:p,v:{o:[],id:0}}):c.push({k:p,v:qu(m,e,n)})}let d;try{c.length===0&&t.toJSON&&typeof t.toJSON=="function"&&(d={value:t.toJSON()})}catch{}return d?xy(d.value,e,n):{o:c,id:u}}}class K_{constructor(e,n){var r,o,l,c,u,d,p,m;this.global=e,this.isUnderTest=n,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(o=e.clearTimeout)==null?void 0:o.bind(e),setInterval:(l=e.setInterval)==null?void 0:l.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(u=e.requestAnimationFrame)==null?void 0:u.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,n,r,o,...l){const c=l.slice(0,o),u=l.slice(o),d=[];for(let m=0;m<c.length;m++)d[m]=Hu(c[m],u);let p=this.global.eval(r);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),n?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,n){if(n!==void 0)return W_(n,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const n=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return n(r)})():n(e)}}class _y{constructor(e,n){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Mr,cacheNormalizedWhitespaces:vS,elementText:Tt,getAriaRole:rt,getElementAccessibleDescription:fg,getElementAccessibleName:Ji,isElementVisible:Yn,isInsideScope:Qi,normalizeWhiteSpace:gt,parseAriaSnapshot:cf,generateAriaTree:Hi,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=n.isUnderTest,this.utils.builtins=new K_(e,n.isUnderTest).builtins,this._sdkLanguage=n.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=n.testIdAttributeName,this._evaluator=new Q1,this.consoleApi=new D_(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",xg),this._engines.set("xpath:light",xg),this._engines.set("_react",W1()),this._engines.set("_vue",N_()),this._engines.set("role",yg(!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",yg(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:o}of n.customEngines)this._engines.set(r,this.eval(o));this._stableRafCount=n.stableRafCount,this._browserName=n.browserName,this._isUtilityWorld=!!n.isUtilityWorld,s1({browserNameForWorkarounds:n.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 n=to(e);return mS(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),n}generateSelector(e,n){return Sg(this,e,n)}generateSelectorSimple(e,n){return Sg(this,e,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,n,r){const o=this.querySelectorAll(e,n);if(r&&o.length>1)throw this.strictModeViolationError(e,o);return o[0]}_queryNth(e,n){const r=[...e];let o=+n.body;return o===-1&&(o=r.length-1),new Set(r.slice(o,o+1))}_queryLayoutSelector(e,n,r){const o=n.name,l=n.body,c=[],u=this.querySelectorAll(l.parsed,r);for(const d of e){const p=Ym(o,d,u,l.distance);p!==void 0&&c.push({element:d,score:p})}return c.sort((d,p)=>d.score-p.score),new Set(c.map(d=>d.element))}ariaSnapshot(e,n){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");return this._lastAriaSnapshot=Hi(e,n),Zl(this._lastAriaSnapshot,n)}ariaSnapshotForRecorder(){const e=Hi(this.document.body,{mode:"ai"});return{ariaSnapshot:Zl(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,n){return M1(e.documentElement,n)}querySelectorAll(e,n){if(e.capture!==void 0){if(e.parts.some(o=>o.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 o={parts:e.parts.slice(e.capture+1)},l={name:"internal:has",body:{parsed:o},source:Tn(o)};r.parts.push(l)}return this.querySelectorAll(r,n)}if(!n.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(n.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[n];this._evaluator.begin();try{let r=new Set([n]);for(const o of e.parts)if(o.name==="nth")r=this._queryNth(r,o);else if(o.name==="internal:and"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(l.filter(c=>r.has(c)))}else if(o.name==="internal:or"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(oy(new Set([...r,...l])))}else if(z1.includes(o.name))r=this._queryLayoutSelector(r,o,n);else{const l=new Set;for(const c of r){const u=this._queryEngineAll(o,c);for(const d of u)l.add(d)}r=l}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,n){const r=this._engines.get(e.name).queryAll(n,e.body);for(const o of r)if(!("nodeName"in o))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(o)}`);return r}_createAttributeEngine(e,n){const r=o=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(o)}]`,functions:[]},combinator:""}]}];return{queryAll:(o,l)=>this._evaluator.query({scope:o,pierceShadow:n},r(l))}}_createCSSEngine(){return{queryAll:(e,n)=>this._evaluator.query({scope:e,pierceShadow:!0},n)}}_createTextEngine(e,n){return{queryAll:(o,l)=>{const{matcher:c,kind:u}=El(l,n),d=[];let p=null;const m=v=>{if(u==="lax"&&p&&p.contains(v))return!1;const x=ua(this._evaluator._cacheText,v,c);x==="none"&&(p=v),(x==="self"||x==="selfAndChildren"&&u==="strict"&&!n)&&d.push(v)};o.nodeType===Node.ELEMENT_NODE&&m(o);const y=this._evaluator._queryCSS({scope:o,pierceShadow:e},"*");for(const v of y)m(v);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=El(n,!0);return l(o)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=El(n,!0);return l(o)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,n)=>{const{matcher:r}=El(n,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(l=>ty(this._evaluator._cacheText,l).some(c=>r(c)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const o=Ir(r,!0);if(o.name||o.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:l,value:c,caseSensitive:u}=o.attributes[0],d=u?null:c.toLowerCase();let p;return c instanceof RegExp?p=y=>!!y.match(c):u?p=y=>y===c:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${l}]`).filter(y=>p(y.getAttribute(l)))}}}_createDescribeEngine(){return{queryAll:n=>n.nodeType!==1?[]:[n]}}_createControlEngine(){return{queryAll(e,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>{if(n.nodeType!==1)return[];const o=r==="true";return Yn(n)===o?[n]:[]}}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(e,n){const r=this.window.eval(`
102
+ `;return r.push({message:l,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}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 n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new og(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const o=this._next();if(n)e+=o,n=!1;else if(o==="\\")n=!0,e+=o;else{if(o==="/"&&!r)return{pattern:e};o==="["?(r=!0,e+=o):o==="]"&&r?(e+=o,r=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Cm(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,o||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,o){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=r==="true";return}if(n==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',o),e.active=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',o),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',o),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,o)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class og extends Error{constructor(e,n){super(e),this.pos=n}}let Nm={};function i1(t){Nm=t}function Qi(t,e){for(;e;){if(t.contains(e))return!0;e=Lm(e)}return!1}function at(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function Am(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Lm(t){for(;t.parentElement;)t=t.parentElement;return at(t)}function Oi(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=Lm(t)}}function nr(t,e){const n=e==="::before"?df:e==="::after"?hf:ff;if(n&&n.has(t))return n.get(t);const r=t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0;return n==null||n.set(t,r),r}function Im(t,e){if(e=e??nr(t),!e)return!0;if(Element.prototype.checkVisibility&&Nm.browserNameForWorkarounds!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function Jl(t){const e=nr(t);if(!e)return{visible:!0,inline:!1};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Yn(r))return{visible:!0,inline:!1,style:e};if(r.nodeType===3&&Mm(r))return{visible:!0,inline:!0,style:e}}return{visible:!1,inline:!1,style:e}}if(!Im(t,e))return{style:e,visible:!1,inline:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0,inline:e.display==="inline"}}function Yn(t){return Jl(t).visible}function Mm(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Ye(t){const e=t.tagName;return typeof e=="string"?e.toUpperCase():t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}let ff,df,hf,jm=0;function pf(){++jm,ff??(ff=new Map),df??(df=new Map),hf??(hf=new Map)}function gf(){--jm||(ff=void 0,df=void 0,hf=void 0)}function lg(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const ag="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]",o1=[["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 Pm(t,e){return o1.some(([n,r])=>!(r!=null&&r.includes(e||""))&&t.hasAttribute(n))}function Om(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function l1(t){return!Km(t)&&(a1(t)||Om(t))}function a1(t){const e=Ye(t);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?t.hasAttribute("href"):e==="INPUT"?!t.hidden:!1}const Su={A:t=>t.hasAttribute("href")?"link":null,AREA:t=>t.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:t=>Oi(t,ag)?null:"contentinfo",FORM:t=>lg(t)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:t=>Oi(t,ag)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:t=>t.getAttribute("alt")===""&&!t.getAttribute("title")&&!Pm(t)&&!Om(t)?"presentation":"img",INPUT:t=>{const e=t.type.toLowerCase();if(e==="search")return t.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const n=Ms(t,t.getAttribute("list"))[0];return n&&Ye(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":k1[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:t=>lg(t)?"region":null,SELECT:t=>t.hasAttribute("multiple")||t.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:t=>{const e=Oi(t,"table"),n=e?Xl(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:t=>{if(t.getAttribute("scope")==="col")return"columnheader";if(t.getAttribute("scope")==="row")return"rowheader";const e=Oi(t,"table"),n=e?Xl(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},c1={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 cg(t){var r;const e=((r=Su[Ye(t)])==null?void 0:r.call(Su,t))||"";if(!e)return null;let n=t;for(;n;){const o=at(n),l=c1[Ye(n)];if(!l||!o||!l.includes(Ye(o)))break;const c=Xl(o);if((c==="none"||c==="presentation")&&!Rm(o,c))return c;n=o}return e}const u1=["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 Xl(t){return(t.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>u1.includes(n))||null}function Rm(t,e){return Pm(t,e)||l1(t)}function rt(t){const e=Xl(t);if(!e)return cg(t);if(e==="none"||e==="presentation"){const n=cg(t);if(Rm(t,n))return n}return e}function $m(t){return t===null?void 0:t.toLowerCase()==="true"}function Dm(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ye(t))}function zt(t){if(Dm(t))return!0;const e=nr(t),n=t.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!n){for(let o=t.firstChild;o;o=o.nextSibling)if(o.nodeType===1&&!zt(o)||o.nodeType===3&&Mm(o))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!Im(t,e)?!0:Bm(t)}function Bm(t){let e=Xn==null?void 0:Xn.get(t);if(e===void 0){if(e=!1,t.parentElement&&t.parentElement.shadowRoot&&!t.assignedSlot&&(e=!0),!e){const n=nr(t);e=!n||n.display==="none"||$m(t.getAttribute("aria-hidden"))===!0}if(!e){const n=at(t);n&&(e=Bm(n))}Xn==null||Xn.set(t,e)}return e}function Ms(t,e){if(!e)return[];const n=Am(t);if(!n)return[];try{const r=e.split(" ").filter(l=>!!l),o=[];for(const l of r){const c=n.querySelector("#"+CSS.escape(l));c&&!o.includes(c)&&o.push(c)}return o}catch{return[]}}function kn(t){return t.trim()}function zi(t){return t.split(" ").map(e=>e.replace(/\r\n/g,`
103
+ `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function ug(t,e){const n=[...t.querySelectorAll(e)];for(const r of Ms(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Ui(t,e){const n=e==="::before"?Cf:e==="::after"?Nf:Tf;if(n!=null&&n.has(t))return n==null?void 0:n.get(t);const r=nr(t,e);let o;if(r){const l=r.content;l&&l!=="none"&&l!=="normal"&&r.display!=="none"&&r.visibility!=="hidden"&&(o=f1(t,l,!!e))}return e&&o!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(o=" "+o+" "),n&&n.set(t,o),o}function f1(t,e,n){if(!(!e||e==="none"||e==="normal"))try{let r=Gg(e).filter(u=>!(u instanceof Vl));const o=r.findIndex(u=>u instanceof tt&&u.value==="/");if(o!==-1)r=r.slice(o+1);else if(!n)return;const l=[];let c=0;for(;c<r.length;)if(r[c]instanceof of)l.push(r[c].value),c++;else if(c+2<r.length&&r[c]instanceof Fi&&r[c].value==="attr"&&r[c+1]instanceof sf&&r[c+2]instanceof rf){const u=r[c+1].value;l.push(t.getAttribute(u)||""),c+=3}else return;return l.join("")}catch{}}function Fm(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=Ms(t,e);return n.length?n:null}function d1(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),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(t);return n||r}function Ji(t,e){const n=e?Ef:_f;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(rt(t)||"")||(r=zi(tn(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function fg(t,e){const n=e?bf:kf;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const o=Ms(t,t.getAttribute("aria-describedby"));r=zi(o.map(l=>tn(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:zt(l)}})).join(" "))}else t.hasAttribute("aria-description")?r=zi(t.getAttribute("aria-description")||""):r=zi(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}function h1(t){const e=t.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function p1(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function g1(t){const e=vs;let n=vs==null?void 0:vs.get(t);if(n===void 0){n="";const r=h1(t)!=="false",o=p1(t);if(r||o){const l=t.getAttribute("aria-errormessage");n=Ms(t,l).map(d=>zi(tn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:zt(d)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function tn(t,e){var d,p,m,y;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Dm(t)||!v&&zt(t))return e.visitedElements.add(t),""}const r=Fm(t);if(!e.embeddedInLabelledBy){const v=(r||[]).map(x=>tn(x,{...e,embeddedInLabelledBy:{element:x,hidden:zt(x)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const o=rt(t)||"",l=Ye(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...t.labels||[]].includes(t),x=(r||[]).includes(t);if(!v&&!x){if(o==="textbox")return e.visitedElements.add(t),l==="INPUT"||l==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(t);let k;if(l==="SELECT")k=[...t.selectedOptions],!k.length&&t.options.length&&k.push(t.options[0]);else{const S=o==="combobox"?ug(t,"*").find(E=>rt(E)==="listbox"):t;k=S?ug(S,'[aria-selected="true"]').filter(E=>rt(E)==="option"):[]}return!k.length&&l==="INPUT"?t.value:k.map(S=>tn(S,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(t),""}}const c=t.getAttribute("aria-label")||"";if(kn(c))return e.visitedElements.add(t),c;if(!["presentation","none"].includes(o)){if(l==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const v=t.value||"";return kn(v)?v:t.type==="submit"?"Submit":t.type==="reset"?"Reset":t.getAttribute("title")||""}if(l==="INPUT"&&t.type==="file"){e.visitedElements.add(t);const v=t.labels||[];return v.length&&!e.embeddedInLabelledBy?Ci(v,e):"Choose File"}if(l==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const v=t.labels||[];if(v.length&&!e.embeddedInLabelledBy)return Ci(v,e);const x=t.getAttribute("alt")||"";if(kn(x))return x;const k=t.getAttribute("title")||"";return kn(k)?k:"Submit"}if(!r&&l==="BUTTON"){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e)}if(!r&&l==="OUTPUT"){e.visitedElements.add(t);const v=t.labels||[];return v.length?Ci(v,e):t.getAttribute("title")||""}if(!r&&(l==="TEXTAREA"||l==="SELECT"||l==="INPUT")){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e);const x=l==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||l==="TEXTAREA",k=t.getAttribute("placeholder")||"",S=t.getAttribute("title")||"";return!x||S?S:k}if(!r&&l==="FIELDSET"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="LEGEND")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});return t.getAttribute("title")||""}if(!r&&l==="FIGURE"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="FIGCAPTION")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});return t.getAttribute("title")||""}if(l==="IMG"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="TABLE"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="CAPTION")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});const v=t.getAttribute("summary")||"";if(v)return v}if(l==="AREA"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="SVG"||t.ownerSVGElement){e.visitedElements.add(t);for(let v=t.firstElementChild;v;v=v.nextElementSibling)if(Ye(v)==="TITLE"&&v.ownerSVGElement)return tn(v,{...n,embeddedInLabelledBy:{element:v,hidden:zt(v)}})}if(t.ownerSVGElement&&l==="A"){const v=t.getAttribute("xlink:title")||"";if(kn(v))return e.visitedElements.add(t),v}}const u=l==="SUMMARY"&&!["presentation","none"].includes(o);if(d1(o,e.embeddedInTargetElement==="descendant")||u||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const v=m1(t,n);if(e.embeddedInTargetElement==="self"?kn(v):v)return v}if(!["presentation","none"].includes(o)||l==="IFRAME"){e.visitedElements.add(t);const v=t.getAttribute("title")||"";if(kn(v))return v}return e.visitedElements.add(t),""}function m1(t,e){const n=[],r=(l,c)=>{var u;if(!(c&&l.assignedSlot))if(l.nodeType===1){const d=((u=nr(l))==null?void 0:u.display)||"inline";let p=tn(l,e);(d!=="inline"||l.nodeName==="BR")&&(p=" "+p+" "),n.push(p)}else l.nodeType===3&&n.push(l.textContent||"")};n.push(Ui(t,"::before")||"");const o=Ui(t);if(o!==void 0)n.push(o);else{const l=t.nodeName==="SLOT"?t.assignedNodes():[];if(l.length)for(const c of l)r(c,!1);else{for(let c=t.firstChild;c;c=c.nextSibling)r(c,!0);if(t.shadowRoot)for(let c=t.shadowRoot.firstChild;c;c=c.nextSibling)r(c,!0);for(const c of Ms(t,t.getAttribute("aria-owns")))r(c,!0)}}return n.push(Ui(t,"::after")||""),n.join("")}const mf=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function zm(t){return Ye(t)==="OPTION"?t.selected:mf.includes(rt(t)||"")?$m(t.getAttribute("aria-selected"))===!0:!1}const yf=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Um(t){const e=vf(t,!0);return e==="error"?!1:e}function y1(t){return vf(t,!0)}function v1(t){return vf(t,!1)}function vf(t,e){const n=Ye(t);if(e&&n==="INPUT"&&t.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(t.type))return t.checked;if(yf.includes(rt(t)||"")){const r=t.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const w1=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function S1(t){const e=Ye(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):w1.includes(rt(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const wf=["button"];function Hm(t){if(wf.includes(rt(t)||"")){const e=t.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Sf=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function qm(t){if(Ye(t)==="DETAILS")return t.open;if(Sf.includes(rt(t)||"")){const e=t.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const xf=["heading","listitem","row","treeitem"];function Vm(t){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Ye(t)];if(e)return e;if(xf.includes(rt(t)||"")){const n=t.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const Wm=["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 Yl(t){return Km(t)||Gm(t)}function Km(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Ye(t))&&(t.hasAttribute("disabled")||x1(t)||_1(t))}function x1(t){return Ye(t)==="OPTION"&&!!t.closest("OPTGROUP[DISABLED]")}function _1(t){const e=t==null?void 0:t.closest("FIELDSET[DISABLED]");if(!e)return!1;const n=e.querySelector(":scope > LEGEND");return!n||!n.contains(t)}function Gm(t,e=!1){if(!t)return!1;if(e||Wm.includes(rt(t)||"")){const n=(t.getAttribute("aria-disabled")||"").toLowerCase();return n==="true"?!0:n==="false"?!1:Gm(at(t),!0)}return!1}function Ci(t,e){return[...t].map(n=>tn(n,{...e,embeddedInLabel:{element:n,hidden:zt(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}function E1(t){const e=Af;let n=t,r;const o=[];for(;n;n=at(n)){const l=e.get(n);if(l!==void 0){r=l;break}o.push(n);const c=nr(n);if(!c){r=!0;break}const u=c.pointerEvents;if(u){r=u!=="none";break}}r===void 0&&(r=!0);for(const l of o)e.set(l,r);return r}let _f,Ef,kf,bf,vs,Xn,Tf,Cf,Nf,Af,Qm=0;function aa(){pf(),++Qm,_f??(_f=new Map),Ef??(Ef=new Map),kf??(kf=new Map),bf??(bf=new Map),vs??(vs=new Map),Xn??(Xn=new Map),Tf??(Tf=new Map),Cf??(Cf=new Map),Nf??(Nf=new Map),Af??(Af=new Map)}function ca(){--Qm||(_f=void 0,Ef=void 0,kf=void 0,bf=void 0,vs=void 0,Xn=void 0,Tf=void 0,Cf=void 0,Nf=void 0,Af=void 0),gf()}const k1={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function b1(t){return Jm(t)?"'"+t.replace(/'/g,"''")+"'":t}function xu(t){return Jm(t)?'"'+t.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
104
+ `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Jm(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}let T1=0;function Xm(t){return t.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:t.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:t.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:t.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Hi(t,e){const n=Xm(e),r=new Set,o={root:{role:"fragment",name:"",children:[],element:t,props:{},box:Jl(t),receivesPointerEvents:!0},elements:new Map,refs:new Map},l=(u,d,p)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const S=d.nodeValue;u.role!=="textbox"&&S&&u.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!zt(m);let v=y;if(n.visibility==="ariaOrVisible"&&(v=y||Yn(m)),n.visibility==="ariaAndVisible"&&(v=y&&Yn(m)),n.visibility==="aria"&&!v)return;const x=[];if(m.hasAttribute("aria-owns")){const S=m.getAttribute("aria-owns").split(/\s+/);for(const E of S){const N=t.ownerDocument.getElementById(E);N&&x.push(N)}}const k=v?C1(m,n):null;k&&(k.ref&&(o.elements.set(k.ref,m),o.refs.set(m,k.ref)),u.children.push(k)),c(k||u,m,x,v)};function c(u,d,p,m){var k;const v=(((k=nr(d))==null?void 0:k.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&u.children.push(v),u.children.push(Ui(d,"::before")||"");const x=d.nodeName==="SLOT"?d.assignedNodes():[];if(x.length)for(const S of x)l(u,S,m);else{for(let S=d.firstChild;S;S=S.nextSibling)S.assignedSlot||l(u,S,m);if(d.shadowRoot)for(let S=d.shadowRoot.firstChild;S;S=S.nextSibling)l(u,S,m)}for(const S of p)l(u,S,m);if(u.children.push(Ui(d,"::after")||""),v&&u.children.push(v),u.children.length===1&&u.name===u.children[0]&&(u.children=[]),u.role==="link"&&d.hasAttribute("href")){const S=d.getAttribute("href");u.props.url=S}if(u.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==u.name){const S=d.getAttribute("placeholder");u.props.placeholder=S}}aa();try{l(o.root,t,!0)}finally{ca()}return A1(o.root),N1(o.root),o}function dg(t,e){if(e.refs==="none"||e.refs==="interactable"&&(!t.box.visible||!t.receivesPointerEvents))return;let n;n=t.element._ariaRef,(!n||n.role!==t.role||n.name!==t.name)&&(n={role:t.role,name:t.name,ref:(e.refPrefix??"")+"e"+ ++T1},t.element._ariaRef=n),t.ref=n.ref}function C1(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},element:t,box:Jl(t),receivesPointerEvents:!0,active:n};return dg(p,e),p}const r=e.includeGenericRole?"generic":null,o=rt(t)??r;if(!o||o==="presentation"||o==="none")return null;const l=gt(Ji(t,!1)||""),c=E1(t),u=Jl(t);if(o==="generic"&&u.inline&&t.childNodes.length===1&&t.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:o,name:l,children:[],props:{},element:t,box:u,receivesPointerEvents:c,active:n};return dg(d,e),yf.includes(o)&&(d.checked=Um(t)),Wm.includes(o)&&(d.disabled=Yl(t)),Sf.includes(o)&&(d.expanded=qm(t)),xf.includes(o)&&(d.level=Vm(t)),wf.includes(o)&&(d.pressed=Hm(t)),mf.includes(o)&&(d.selected=zm(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(d.children=[t.value]),d}function N1(t){const e=n=>{const r=[];for(const l of n.children||[]){if(typeof l=="string"){r.push(l);continue}const c=e(l);r.push(...c)}return n.role==="generic"&&r.length<=1&&r.every(l=>typeof l!="string"&&!!l.ref)?r:(n.children=r,[n])};e(t)}function A1(t){const e=(r,o)=>{if(!r.length)return;const l=gt(r.join(""));l&&o.push(l),r.length=0},n=r=>{const o=[],l=[];for(const c of r.children||[])typeof c=="string"?l.push(c):(e(l,o),n(c),o.push(c));e(l,o),r.children=o.length?o:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function L1(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function hg(t,e){if(!(e!=null&&e.normalized))return!0;if(!t)return!1;if(t===e.normalized||t===e.raw)return!0;const n=I1(e);return n?!!t.match(n):!1}const _u=Symbol("cachedRegex");function I1(t){if(t[_u]!==void 0)return t[_u];const{raw:e}=t,n=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let r;try{r=n?new RegExp(e.slice(1,-1)):null}catch{r=null}return t[_u]=r,r}function M1(t,e){const n=Hi(t,{mode:"expect"});return{matches:Ym(n.root,e,!1,!1),received:{raw:Zl(n,{mode:"expect"}),regex:Zl(n,{mode:"codegen"})}}}function j1(t,e){const n=Hi(t,{mode:"expect"}).root;return Ym(n,e,!0,!1).map(o=>o.element)}function Lf(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?hg(t,e.text):t===null||typeof t!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!L1(t.name,e.name)||!hg(t.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?gg(t.children||[],e.children||[]):e.containerMode==="equal"?pg(t.children||[],e.children||[],!1):e.containerMode==="deep-equal"||n?pg(t.children||[],e.children||[],!0):gg(t.children||[],e.children||[])}function pg(t,e,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!Lf(t[r],e[r],n))return!1;return!0}function gg(t,e){if(e.length>t.length)return!1;const n=t.slice(),r=e.slice();for(const o of r){let l=n.shift();for(;l&&!Lf(l,o,!1);)l=n.shift();if(!l)return!1}return!0}function Ym(t,e,n,r){const o=[],l=(c,u)=>{if(Lf(c,e,r)){const d=typeof c=="string"?u:c;return d&&o.push(d),!n}if(typeof c=="string")return!1;for(const d of c.children||[])if(l(d,c))return!0;return!1};return l(t,null),o}function Zl(t,e){const n=Xm(e),r=[],o=n.renderStringsAsRegex?O1:()=>!0,l=n.renderStringsAsRegex?P1:d=>d,c=(d,p,m,y)=>{if(typeof d=="string"){if(p&&!o(p,d))return;const E=xu(l(d));E&&r.push(m+"- text: "+E);return}let v=d.role;if(d.name&&d.name.length<=900){const E=l(d.name);if(E){const N=E.startsWith("/")&&E.endsWith("/")?E:JSON.stringify(E);v+=" "+N}}d.checked==="mixed"&&(v+=" [checked=mixed]"),d.checked===!0&&(v+=" [checked]"),d.disabled&&(v+=" [disabled]"),d.expanded&&(v+=" [expanded]"),d.active&&n.renderActive&&(v+=" [active]"),d.level&&(v+=` [level=${d.level}]`),d.pressed==="mixed"&&(v+=" [pressed=mixed]"),d.pressed===!0&&(v+=" [pressed]"),d.selected===!0&&(v+=" [selected]");let x=!1;d.ref&&(v+=` [ref=${d.ref}]`,y&&R1(d)&&(x=!0,v+=" [cursor=pointer]"));const k=m+"- "+b1(v),S=!!Object.keys(d.props).length;if(!d.children.length&&!S)r.push(k);else if(d.children.length===1&&typeof d.children[0]=="string"&&!S){const E=o(d,d.children[0])?l(d.children[0]):null;E?r.push(k+": "+xu(E)):r.push(k)}else{r.push(k+":");for(const[E,N]of Object.entries(d.props))r.push(m+" - /"+E+": "+xu(N));for(const E of d.children||[])c(E,d,m+" ",y&&!x)}},u=t.root;if(u.role==="fragment")for(const d of u.children||[])c(d,u,"",!!n.renderCursorPointer);else c(u,null,"",!!n.renderCursorPointer);return r.join(`
105
+ `)}function P1(t){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 n="",r=0;const o=new RegExp(e.map(l=>"("+l.regex.source+")").join("|"),"g");return t.replace(o,(l,...c)=>{const u=c[c.length-2],d=c.slice(0,-2);n+=Kl(t.slice(r,u));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];n+=m;break}return r=u+l.length,l}),n?(n+=Kl(t.slice(r)),String(new RegExp(n))):t}function O1(t,e){if(!e.length)return!1;if(!t.name)return!0;if(t.name.length>e.length)return!1;const n=e.length<=200&&t.name.length<=200?xS(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function R1(t){var e;return((e=t.box.style)==null?void 0:e.cursor)==="pointer"}const mg=":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.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 Eu{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const n=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=n.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=n.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(mg),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=mg,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 n=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),r=Mr(this._language,Tn(e)),o=n.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(n.map((l,c)=>{const u=n.length>1?` [${c+1} of ${n.length}]`:"";return{element:l,color:o,tooltipText:r+u}})),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,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,n;for(const r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(n=r.tooltipElement)==null||n.remove();this._renderedEntries=[]}maskElements(e,n){this.updateHighlight(e.map(r=>({element:r,color:n})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const n of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);let o;if(n.tooltipText){o=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(o),o.style.top="0",o.style.left="0",o.style.display="flex";const l=this._injectedScript.document.createElement("x-pw-tooltip-line");l.textContent=n.tooltipText,o.appendChild(l)}this._renderedEntries.push({targetElement:n.element,color:n.color,tooltipElement:o,highlightElement:r})}for(const n of this._renderedEntries){if(n.box=n.targetElement.getBoundingClientRect(),!n.tooltipElement)continue;const{anchorLeft:r,anchorTop:o}=this.tooltipPosition(n.box,n.tooltipElement);n.tooltipTop=o,n.tooltipLeft=r}for(const n of this._renderedEntries){n.tooltipElement&&(n.tooltipElement.style.top=n.tooltipTop+"px",n.tooltipElement.style.left=n.tooltipLeft+"px");const r=n.box;n.highlightElement.style.backgroundColor=n.color,n.highlightElement.style.left=r.x+"px",n.highlightElement.style.top=r.y+"px",n.highlightElement.style.width=r.width+"px",n.highlightElement.style.height=r.height+"px",n.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,n){const r=n.offsetWidth,o=n.offsetHeight,l=this._glassPaneElement.offsetWidth,c=this._glassPaneElement.offsetHeight;let u=Math.max(5,e.left);u+r>l-5&&(u=l-r-5);let d=Math.max(0,e.bottom)+5;return d+o>c-5&&(Math.max(0,e.top)>o+5?d=Math.max(0,e.top)-o-5:d=c-5-o),{anchorLeft:u,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let n=0;n<this._renderedEntries.length;++n){if(e[n].element!==this._renderedEntries[n].targetElement||e[n].color!==this._renderedEntries[n].color)return!1;const r=this._renderedEntries[n].box;if(!r)return!1;const o=e[n].element.getBoundingClientRect();if(o.top!==r.top||o.right!==r.right||o.bottom!==r.bottom||o.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 $1(t,e,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function D1(t,e,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function B1(t,e,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function F1(t,e,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function z1(t,e,n){const r=n===void 0?50:n;let o=0;return t.left-e.right>=0&&(o+=t.left-e.right),e.left-t.right>=0&&(o+=e.left-t.right),e.top-t.bottom>=0&&(o+=e.top-t.bottom),t.top-e.bottom>=0&&(o+=t.top-e.bottom),o>r?void 0:o}const U1=["left-of","right-of","above","below","near"];function Zm(t,e,n,r){const o=e.getBoundingClientRect(),l={"left-of":D1,"right-of":$1,above:B1,below:F1,near:z1}[t];let c;for(const u of n){if(u===e)continue;const d=l(o,u.getBoundingClientRect(),r);d!==void 0&&(c===void 0||d<c)&&(c=d)}return c}function ey(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return ty(t,e)}function ty(t,e){const n=typeof t=="string"&&!e.caseSensitive?t.toUpperCase():t,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!n:e.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:e.op==="*="?n.includes(r):e.op==="^="?n.startsWith(r):e.op==="$="?n.endsWith(r):e.op==="|="?n===r||n.startsWith(r+"-"):e.op==="~="?n.split(" ").includes(r):!1}function If(t){const e=t.ownerDocument;return t.nodeName==="SCRIPT"||t.nodeName==="NOSCRIPT"||t.nodeName==="STYLE"||e.head&&e.head.contains(t)}function Tt(t,e){let n=t.get(e);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!If(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))n={full:e.value,normalized:gt(e.value),immediate:[e.value]};else{for(let o=e.firstChild;o;o=o.nextSibling)if(o.nodeType===Node.TEXT_NODE)n.full+=o.nodeValue||"",r+=o.nodeValue||"";else{if(o.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",o.nodeType===Node.ELEMENT_NODE&&(n.full+=Tt(t,o).full)}r&&n.immediate.push(r),e.shadowRoot&&(n.full+=Tt(t,e.shadowRoot).full),n.full&&(n.normalized=gt(n.full))}}t.set(e,n)}return n}function ua(t,e,n){if(If(e)||!n(Tt(t,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Tt(t,r)))return"selfAndChildren";return e.shadowRoot&&n(Tt(t,e.shadowRoot))?"selfAndChildren":"self"}function ny(t,e){const n=Fm(e);if(n)return n.map(l=>Tt(t,l));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:gt(r),immediate:[r]}];const o=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||o){const l=e.labels;if(l)return[...l].map(c=>Tt(t,c))}return[]}function yg(t){return t.displayName||t.name||"Anonymous"}function H1(t){if(t.type)switch(typeof t.type){case"function":return yg(t.type);case"string":return t.type;case"object":return t.type.displayName||(t.type.render?yg(t.type.render):"")}if(t._currentElement){const e=t._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function q1(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function V1(t){if(t.child){const n=[];for(let r=t.child;r;r=r.sibling)n.push(r);return n}if(!t._currentElement)return[];const e=n=>{var o;const r=(o=n._currentElement)==null?void 0:o.type;return typeof r=="function"||typeof r=="string"};if(t._renderedComponent){const n=t._renderedComponent;return e(n)?[n]:[]}return t._renderedChildren?[...Object.values(t._renderedChildren)].filter(e):[]}function W1(t){var r;const e=t.memoizedProps||((r=t._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const n={...e};return delete n.children,n}function ry(t){var r;const e={key:q1(t),name:H1(t),children:V1(t).map(ry),rootElements:[],props:W1(t)},n=t.stateNode||t._hostNode||((r=t._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)e.rootElements.push(n);else for(const o of e.children)e.rootElements.push(...o.rootElements);return e}function sy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)sy(r,e,n);return n}function iy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);do{const o=r.currentNode,l=o,c=Object.keys(l).find(d=>d.startsWith("__reactContainer")&&l[d]!==null);if(c)e.push(l[c].stateNode.current);else{const d="_reactRootContainer";l.hasOwnProperty(d)&&l[d]!==null&&e.push(l[d]._internalRoot.current)}if(o instanceof Element&&o.hasAttribute("data-reactroot"))for(const d of Object.keys(o))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(o[d]);const u=o instanceof Element?o.shadowRoot:null;u&&iy(u,e)}while(r.nextNode());return e}const K1=()=>({queryAll(t,e){const{name:n,attributes:r}=Ir(e,!1),c=iy(t.ownerDocument||t).map(d=>ry(d)).map(d=>sy(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),n&&p.name!==n||p.rootElements.some(y=>!Qi(t,y)))return!1;for(const y of r)if(!ey(m,y))return!1;return!0})).flat(),u=new Set;for(const d of c)for(const p of d.rootElements)u.add(p);return[...u]}}),oy=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];oy.sort();function Ni(t,e,n){if(!e.includes(n))throw new Error(`"${t}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function fs(t,e){if(t.op!=="<truthy>"&&!e.includes(t.value))throw new Error(`"${t.name}" must be one of ${e.map(n=>JSON.stringify(n)).join(", ")}`)}function ds(t,e){if(!e.includes(t.op))throw new Error(`"${t.name}" does not support "${t.op}" matcher`)}function G1(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ni(r.name,yf,e),fs(r,[!0,!1,"mixed"]),ds(r,["<truthy>","="]),n.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ni(r.name,wf,e),fs(r,[!0,!1,"mixed"]),ds(r,["<truthy>","="]),n.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ni(r.name,mf,e),fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ni(r.name,Sf,e),fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ni(r.name,xf,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');n.level=r.value;break}case"disabled":{fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.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');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{fs(r,[!0,!1]),ds(r,["<truthy>","="]),n.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${oy.map(o=>`"${o}"`).join(", ")}.`)}return n}function Q1(t,e,n){const r=[],o=c=>{if(rt(c)===e.role&&!(e.selected!==void 0&&zm(c)!==e.selected)&&!(e.checked!==void 0&&Um(c)!==e.checked)&&!(e.pressed!==void 0&&Hm(c)!==e.pressed)&&!(e.expanded!==void 0&&qm(c)!==e.expanded)&&!(e.level!==void 0&&Vm(c)!==e.level)&&!(e.disabled!==void 0&&Yl(c)!==e.disabled)&&!(!e.includeHidden&&zt(c))){if(e.name!==void 0){const u=gt(Ji(c,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=gt(e.name)),n&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!ty(u,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(c)}},l=c=>{const u=[];c.shadowRoot&&u.push(c.shadowRoot);for(const d of c.querySelectorAll("*"))o(d),d.shadowRoot&&u.push(d.shadowRoot);u.forEach(l)};return l(t),r}function vg(t){return{queryAll:(e,n)=>{const r=Ir(n,!0),o=r.name.toLowerCase();if(!o)throw new Error("Role must not be empty");const l=G1(r.attributes,o);aa();try{return Q1(e,l,t)}finally{ca()}}}}class J1{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",Z1),this._engines.set("is",Ri),this._engines.set("where",Ri),this._engines.set("has",X1),this._engines.set("scope",Y1),this._engines.set("light",e_),this._engines.set("visible",t_),this._engines.set("text",n_),this._engines.set("text-is",r_),this._engines.set("text-matches",s_),this._engines.set("has-text",i_),this._engines.set("right-of",Ai("right-of")),this._engines.set("left-of",Ai("left-of")),this._engines.set("above",Ai("above")),this._engines.set("below",Ai("below")),this._engines.set("near",Ai("near")),this._engines.set("nth-match",o_);const e=[...this._engines.keys()];e.sort();const n=[...dm];if(n.sort(),e.join("|")!==n.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${n.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,n,r,o){e.has(n)||e.set(n,[]);const l=e.get(n),c=l.find(d=>r.every((p,m)=>d.rest[m]===p));if(c)return c.result;const u=o();return l.push({rest:r,result:u}),u}_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,n,r){const o=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,e,[o,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(o)?this._matchesEngine(Ri,e,o,r):(this._hasScopeClause(o)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,o.simples[o.simples.length-1].selector,r)?this._matchesParents(e,o,o.simples.length-2,r):!1))}finally{this.end()}}query(e,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Ri,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const o=this._scoreMap;this._scoreMap=new Map;let l=this._querySimple(e,r.simples[r.simples.length-1].selector);return l=l.filter(c=>this._matchesParents(c,r,r.simples.length-2,e)),this._scoreMap.size&&l.sort((c,u)=>{const d=this._scoreMap.get(c),p=this._scoreMap.get(u);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=o,l})}finally{this.end()}}_markScore(e,n){this._scoreMap&&this._scoreMap.set(e,n)}_hasScopeClause(e){return e.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const n=at(e.scope);return n?{...e,scope:n,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,n,r){return this._cached(this._cacheMatchesSimple,e,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||n.css&&!this._matchesCSS(e,n.css))return!1;for(const o of n.functions)if(!this._matchesEngine(this._getEngine(o.name),e,o.args,r))return!1;return!0})}_querySimple(e,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=n.css;const o=n.functions;r==="*"&&o.length&&(r=void 0);let l,c=-1;r!==void 0?l=this._queryCSS(e,r):(c=o.findIndex(u=>this._getEngine(u.name).query!==void 0),c===-1&&(c=0),l=this._queryEngine(this._getEngine(o[c].name),e,o[c].args));for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches!==void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[u].args,e)))}for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches===void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[u].args,e)))}return l}):this._queryCSS(e,n.css||"*")}_matchesParents(e,n,r,o){return r<0?!0:this._cached(this._cacheMatchesParents,e,[n,r,o.scope,o.pierceShadow,o.originalScope],()=>{const{selector:l,combinator:c}=n.simples[r];if(c===">"){const u=Sl(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c==="+"){const u=ku(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c===""){let u=Sl(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=Sl(u,o)}return!1}if(c==="~"){let u=ku(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="~")break}u=ku(u,o)}return!1}if(c===">="){let u=e;for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=Sl(u,o)}return!1}throw new Error(`Unsupported combinator "${c}"`)})}_matchesEngine(e,n,r,o){if(e.matches)return this._callMatches(e,n,r,o);if(e.query)return this._callQuery(e,r,o).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,n,r){if(e.query)return this._callQuery(e,r,n);if(e.matches)return this._queryCSS(n,"*").filter(o=>this._callMatches(e,o,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,n,r,o){return this._cached(this._cacheCallMatches,n,[e,o.scope,o.pierceShadow,o.originalScope,...r],()=>e.matches(n,r,o,this))}_callQuery(e,n,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...n],()=>e.query(r,n,this))}_matchesCSS(e,n){return e.matches(n)}_queryCSS(e,n){return this._cached(this._cacheQueryCSS,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function o(l){if(r=r.concat([...l.querySelectorAll(n)]),!!e.pierceShadow){l.shadowRoot&&o(l.shadowRoot);for(const c of l.querySelectorAll("*"))c.shadowRoot&&o(c.shadowRoot)}}return o(e.scope),r})}_getEngine(e){const n=this._engines.get(e);if(!n)throw new Error(`Unknown selector engine "${e}"`);return n}}const Ri={matches(t,e,n,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(o=>r.matches(t,o,n))},query(t,e,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const o of e)r=r.concat(n.query(t,o));return e.length===1?r:ly(r)}},X1={matches(t,e,n,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:t},e).length>0}},Y1={matches(t,e,n,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const o=n.originalScope||n.scope;return o.nodeType===9?t===o.documentElement:t===o},query(t,e,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=t.originalScope||t.scope;if(r.nodeType===9){const o=r.documentElement;return o?[o]:[]}return r.nodeType===1?[r]:[]}},Z1={matches(t,e,n,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(t,e,n)}},e_={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},t_={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return Yn(t)}},n_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const o=gt(e[0]).toLowerCase(),l=c=>c.normalized.toLowerCase().includes(o);return ua(r._cacheText,t,l)==="self"}},r_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const o=gt(e[0]),l=c=>!o&&!c.immediate.length?!0:c.immediate.some(u=>gt(u)===o);return ua(r._cacheText,t,l)!=="none"}},s_={matches(t,e,n,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 o=new RegExp(e[0],e.length===2?e[1]:void 0),l=c=>o.test(c.full);return ua(r._cacheText,t,l)==="self"}},i_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(If(t))return!1;const o=gt(e[0]).toLowerCase();return(c=>c.normalized.toLowerCase().includes(o))(Tt(r._cacheText,t))}};function Ai(t){return{matches(e,n,r,o){const l=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,c=l===void 0?n:n.slice(0,n.length-1);if(n.length<1+(l===void 0?0:1))throw new Error(`"${t}" engine expects a selector list and optional maximum distance in pixels`);const u=o.query(r,c),d=Zm(t,e,u,l);return d===void 0?!1:(o._markScore(e,d),!0)}}}const o_={query(t,e,n){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 o=Ri.query(t,e.slice(0,e.length-1),n);return r--,r<o.length?[o[r]]:[]}};function Sl(t,e){if(t!==e.scope)return e.pierceShadow?at(t):t.parentElement||void 0}function ku(t,e){if(t!==e.scope)return t.previousElementSibling||void 0}function ly(t){const e=new Map,n=[],r=[];function o(c){let u=e.get(c);if(u)return u;const d=at(c);return d?o(d).children.push(c):n.push(c),u={children:[],taken:!1},e.set(c,u),u}for(const c of t)o(c).taken=!0;function l(c){const u=e.get(c);if(u.taken&&r.push(c),u.children.length>1){const d=new Set(u.children);u.children=[];let p=c.firstElementChild;for(;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling;for(p=c.shadowRoot?c.shadowRoot.firstElementChild:null;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling}u.children.forEach(l)}return n.forEach(l),r}const ay=10,js=ay/2,wg=1,l_=2,a_=10,c_=50,cy=100,uy=120,fy=140,dy=160,Rl=180,hy=200,Sg=250,u_=uy+js,f_=fy+js,d_=cy+js,h_=dy+js,p_=Rl+js,g_=hy+js,m_=300,y_=500,py=510,bu=520,gy=530,Uu=1e4,v_=1e7,w_=1e3;function xg(t,e,n){t._evaluator.begin();const r={allowText:new Map,disallowText:new Map};aa(),pf();try{let o=[];if(n.forTextExpect){let u=$i(t,e.ownerDocument.documentElement,n);for(let d=e;d;d=at(d)){const p=Er(r,t,d,{...n,noText:!0});if(!p)continue;if(kr(p)<=w_){u=p;break}}o=[$l(u)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const u=Oi(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",n.root);u&&Yn(u)&&(e=u)}if(n.multiple){const u=Er(r,t,e,n),d=Er(r,t,e,{...n,noText:!0});let p=[u,d];if(r.allowText.clear(),r.disallowText.clear(),u&&Tu(u)&&p.push(Er(r,t,e,{...n,noCSSId:!0})),d&&Tu(d)&&p.push(Er(r,t,e,{...n,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=$i(t,e,n);p.push(m),Tu(m)&&p.push($i(t,e,{...n,noCSSId:!0}))}o=[...new Set(p.map(m=>$l(m)))]}else{const u=Er(r,t,e,n)||$i(t,e,n);o=[$l(u)]}}const l=o[0],c=t.parseSelector(l);return{selector:l,selectors:o,elements:t.querySelectorAll(c,n.root??e.ownerDocument)}}finally{gf(),ca(),t._evaluator.end()}}function Er(t,e,n,r){if(r.root&&!Qi(r.root,n))throw new Error("Target element must belong to the root's subtree");if(n===r.root)return[{engine:"css",selector:":scope",score:1}];if(n.ownerDocument.documentElement===n)return[{engine:"css",selector:"html",score:1}];let o=null;const l=u=>{(!o||kr(u)<kr(o))&&(o=u)},c=[];if(!r.noText)for(const u of x_(e,n,!r.isRecursive))c.push({candidate:u,isTextCandidate:!0});for(const u of S_(e,n,r))r.omitInternalEngines&&u.engine.startsWith("internal:")||c.push({candidate:[u],isTextCandidate:!1});c.sort((u,d)=>kr(u.candidate)-kr(d.candidate));for(const{candidate:u,isTextCandidate:d}of c){const p=e.querySelectorAll(e.parseSelector($l(u)),r.root??n.ownerDocument);if(!p.includes(n))continue;if(p.length===1){l(u);break}const m=p.indexOf(n);if(!(m>5)&&(l([...u,{engine:"nth",selector:String(m),score:Uu}]),!r.isRecursive))for(let y=at(n);y&&y!==r.root;y=at(y)){const v=p.filter(F=>Qi(y,F)&&F!==y),x=v.indexOf(n);if(v.length>5||x===-1||x===m&&v.length>1)continue;const k=v.length===1?u:[...u,{engine:"nth",selector:String(x),score:Uu}];if(o&&kr([{engine:"",selector:"",score:1},...k])>=kr(o))continue;const E=!!r.noText||d,N=E?t.disallowText:t.allowText;let T=N.get(y);T===void 0&&(T=Er(t,e,y,{...r,isRecursive:!0,noText:E})||$i(e,y,r),N.set(y,T)),T&&l([...T,...k])}}return o}function S_(t,e,n){const r=[];{for(const c of["data-testid","data-test-id","data-test"])c!==n.testIdAttributeName&&e.getAttribute(c)&&r.push({engine:"css",selector:`[${c}=${ms(e.getAttribute(c))}]`,score:l_});if(!n.noCSSId){const c=e.getAttribute("id");c&&!__(c)&&r.push({engine:"css",selector:my(c),score:y_})}r.push({engine:"css",selector:bn(e),score:gy})}if(e.nodeName==="IFRAME"){for(const c of["name","title"])e.getAttribute(c)&&r.push({engine:"css",selector:`${bn(e)}[${c}=${ms(e.getAttribute(c))}]`,score:a_});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${ms(e.getAttribute(n.testIdAttributeName))}]`,score:wg}),Hu([r]),r}if(e.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${ht(e.getAttribute(n.testIdAttributeName),!0)}]`,score:wg}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e;if(c.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${ht(c.placeholder,!0)}]`,score:u_});for(const u of ws(c.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${ht(u.text,!1)}]`,score:uy-u.scoreBonus})}}const o=ny(t._evaluator._cacheText,e);for(const c of o){const u=c.normalized;r.push({engine:"internal:label",selector:kt(u,!0),score:f_});for(const d of ws(u))r.push({engine:"internal:label",selector:kt(d.text,!1),score:fy-d.scoreBonus})}const l=rt(e);return l&&!["none","presentation"].includes(l)&&r.push({engine:"internal:role",selector:l,score:py}),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:`${bn(e)}[name=${ms(e.getAttribute("name"))}]`,score:bu}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${bn(e)}[type=${ms(e.getAttribute("type"))}]`,score:bu}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:bn(e),score:bu+1}),Hu([r]),r}function x_(t,e,n){if(e.nodeName==="SELECT")return[];const r=[],o=e.getAttribute("title");if(o){r.push([{engine:"internal:attr",selector:`[title=${ht(o,!0)}]`,score:g_}]);for(const p of ws(o))r.push([{engine:"internal:attr",selector:`[title=${ht(p.text,!1)}]`,score:hy-p.scoreBonus}])}const l=e.getAttribute("alt");if(l&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${ht(l,!0)}]`,score:h_}]);for(const p of ws(l))r.push([{engine:"internal:attr",selector:`[alt=${ht(p.text,!1)}]`,score:dy-p.scoreBonus}])}const c=Tt(t._evaluator._cacheText,e).normalized,u=c?ws(c):[];if(c){if(n){c.length<=80&&r.push([{engine:"internal:text",selector:kt(c,!0),score:p_}]);for(const m of u)r.push([{engine:"internal:text",selector:kt(m.text,!1),score:Rl-m.scoreBonus}])}const p={engine:"css",selector:bn(e),score:gy};for(const m of u)r.push([p,{engine:"internal:has-text",selector:kt(m.text,!1),score:Rl-m.scoreBonus}]);if(n&&c.length<=80){const m=new RegExp("^"+Kl(c)+"$");r.push([p,{engine:"internal:has-text",selector:kt(m,!1),score:Sg}])}}const d=rt(e);if(d&&!["none","presentation"].includes(d)){const p=Ji(e,!1);if(p){const m={engine:"internal:role",selector:`${d}[name=${ht(p,!0)}]`,score:d_};r.push([m]);for(const y of ws(p))r.push([{engine:"internal:role",selector:`${d}[name=${ht(y.text,!1)}]`,score:cy-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:py};for(const y of u)r.push([m,{engine:"internal:has-text",selector:kt(y.text,!1),score:Rl-y.scoreBonus}]);if(n&&c.length<=80){const y=new RegExp("^"+Kl(c)+"$");r.push([m,{engine:"internal:has-text",selector:kt(y,!1),score:Sg}])}}}return Hu(r),r}function my(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id=${ms(t)}]`}function Tu(t){return t.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function $i(t,e,n){const r=n.root??e.ownerDocument,o=[];function l(u){const d=o.slice();u&&d.unshift(u);const p=d.join(" > "),m=t.parseSelector(p);return t.querySelector(m,r,!1)===e?p:void 0}function c(u){const d={engine:"css",selector:u,score:v_},p=t.parseSelector(u),m=t.querySelectorAll(p,r);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:Uu};return[d,y]}for(let u=e;u&&u!==r;u=at(u)){let d="";if(u.id&&!n.noCSSId){const y=my(u.id),v=l(y);if(v)return c(v);d=y}const p=u.parentNode,m=[...u.classList].map(E_);for(let y=0;y<m.length;++y){const v="."+m.slice(0,y+1).join("."),x=l(v);if(x)return c(x);!d&&p&&p.querySelectorAll(v).length===1&&(d=v)}if(p){const y=[...p.children],v=u.nodeName,k=y.filter(E=>E.nodeName===v).indexOf(u)===0?bn(u):`${bn(u)}:nth-child(${1+y.indexOf(u)})`,S=l(k);if(S)return c(S);d||(d=k)}else d||(d=bn(u));o.unshift(d)}return c(l())}function Hu(t){for(const e of t)for(const n of e)n.score>c_&&n.score<m_&&(n.score+=Math.min(ay,n.selector.length/10|0))}function $l(t){const e=[];let n="";for(const{engine:r,selector:o}of t)e.length&&(n!=="css"||r!=="css"||o.startsWith(":nth-match("))&&e.push(">>"),n=r,r==="css"?e.push(o):e.push(`${r}=${o}`);return e.join(" ")}function kr(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n].score*(t.length-n);return e}function __(t){let e,n=0;for(let r=0;r<t.length;++r){const o=t[r];let l;if(!(o==="-"||o==="_")){if(o>="a"&&o<="z"?l="lower":o>="A"&&o<="Z"?l="upper":o>="0"&&o<="9"?l="digit":l="other",l==="lower"&&e==="upper"){e=l;continue}e&&e!==l&&++n,e=l}}return n>=t.length/4}function xl(t,e){if(t.length<=e)return t;t=t.substring(0,e);const n=t.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function ws(t){let e=[];{const n=t.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const o=xl(t.substring(r).trimStart(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}{const n=t.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const o=xl(t.substring(0,t.length-r).trimEnd(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}return t.length<=30?e.push({text:t,scoreBonus:0}):(e.push({text:xl(t,80),scoreBonus:0}),e.push({text:xl(t,30),scoreBonus:1})),e=e.filter(n=>n.text),e.length||e.push({text:t.substring(0,80),scoreBonus:0}),e}function bn(t){return t.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function E_(t){let e="";for(let n=0;n<t.length;n++)e+=k_(t,n);return e}function k_(t,e){const n=t.charCodeAt(e);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}function yy(t,e){const n=t.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function b_(t,e){return e?e.toUpperCase():""}const T_=/(?:^|[-_/])(\w)/g,vy=t=>t&&t.replace(T_,b_);function C_(t){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const v=m.__file;if(v)return vy(yy(v,".vue"))}function n(m,y){return m.type.__playwright_guessedName=y,y}function r(m){var v,x,k,S;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const E in(x=(v=m.parent)==null?void 0:v.type)==null?void 0:x.components)if(((k=m.parent)==null?void 0:k.type.components[E])===m.type)return n(m,E);for(const E in(S=m.appContext)==null?void 0:S.components)if(m.appContext.components[E]===m.type)return n(m,E);return"Anonymous Component"}function o(m){return m._isBeingDestroyed||m.isUnmounted}function l(m){return m.subTree.type.toString()==="Symbol(Fragment)"}function c(m){const y=[];return m.component&&y.push(m.component),m.suspense&&y.push(...c(m.suspense.activeBranch)),Array.isArray(m.children)&&m.children.forEach(v=>{v.component?y.push(v.component):y.push(...c(v))}),y.filter(v=>{var x;return!o(v)&&!((x=v.type.devtools)!=null&&x.hide)})}function u(m){return l(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let v=0,x=m.children.length;v<x;v++){const k=m.children[v];k.component?y.push(...u(k.component)):k.el&&y.push(k.el)}return y}function p(m){return{name:r(m),children:c(m.subTree).map(p),rootElements:u(m),props:m.props}}return p(t)}function N_(t){function e(l){const c=l.displayName||l.name||l._componentTag;if(c)return c;const u=l.__file;if(u)return vy(yy(u,".vue"))}function n(l){const c=e(l.$options||l.fnOptions||{});return c||(l.$root===l?"Root":"Anonymous Component")}function r(l){return l.$children?l.$children:Array.isArray(l.subTree.children)?l.subTree.children.filter(c=>!!c.component).map(c=>c.component):[]}function o(l){return{name:n(l),children:r(l).map(o),rootElements:[l.$el],props:l._props}}return o(t)}function wy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)wy(r,e,n);return n}function Sy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT),o=new Set;do{const l=r.currentNode;l.__vue__&&o.add(l.__vue__.$root),l.__vue_app__&&l._vnode&&l._vnode.component&&e.push({root:l._vnode.component,version:3});const c=l instanceof Element?l.shadowRoot:null;c&&Sy(c,e)}while(r.nextNode());for(const l of o)e.push({version:2,root:l});return e}const A_=()=>({queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:o}=Ir(e,!1),u=Sy(n).map(p=>p.version===3?C_(p.root):N_(p.root)).map(p=>wy(p,m=>{if(r&&m.name!==r||m.rootElements.some(y=>!Qi(t,y)))return!1;for(const y of o)if(!ey(m.props,y))return!1;return!0})).flat(),d=new Set;for(const p of u)for(const m of p.rootElements)d.add(m);return[...d]}}),_g={queryAll(t,e){e.startsWith("/")&&t.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const n=[],r=t.ownerDocument||t;if(!r)return n;const o=r.evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let l=o.iterateNext();l;l=o.iterateNext())l.nodeType===Node.ELEMENT_NODE&&n.push(l);return n}};function Mf(t,e,n){return`internal:attr=[${t}=${ht(e,(n==null?void 0:n.exact)||!1)}]`}function L_(t,e){return`internal:testid=[${t}=${ht(e,!0)}]`}function I_(t,e){return"internal:label="+kt(t,!!(e!=null&&e.exact))}function M_(t,e){return Mf("alt",t,e)}function j_(t,e){return Mf("title",t,e)}function P_(t,e){return Mf("placeholder",t,e)}function O_(t,e){return"internal:text="+kt(t,!!(e!=null&&e.exact))}function R_(t,e={}){const n=[];return e.checked!==void 0&&n.push(["checked",String(e.checked)]),e.disabled!==void 0&&n.push(["disabled",String(e.disabled)]),e.selected!==void 0&&n.push(["selected",String(e.selected)]),e.expanded!==void 0&&n.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&n.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&n.push(["level",String(e.level)]),e.name!==void 0&&n.push(["name",ht(e.name,!!e.exact)]),e.pressed!==void 0&&n.push(["pressed",String(e.pressed)]),`internal:role=${t}${n.map(([r,o])=>`[${r}=${o}]`).join("")}`}const Li=Symbol("selector"),$_=class Di{constructor(e,n,r){if(r!=null&&r.hasText&&(n+=` >> internal:has-text=${kt(r.hasText,!1)}`),r!=null&&r.hasNotText&&(n+=` >> internal:has-not-text=${kt(r.hasNotText,!1)}`),r!=null&&r.has&&(n+=" >> internal:has="+JSON.stringify(r.has[Li])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[Li])),(r==null?void 0:r.visible)!==void 0&&(n+=` >> visible=${r.visible?"true":"false"}`),this[Li]=n,n){const c=e.parseSelector(n);this.element=e.querySelector(c,e.document,!1),this.elements=e.querySelectorAll(c,e.document)}const o=n,l=this;l.locator=(c,u)=>new Di(e,o?o+" >> "+c:c,u),l.getByTestId=c=>l.locator(L_(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),l.getByAltText=(c,u)=>l.locator(M_(c,u)),l.getByLabel=(c,u)=>l.locator(I_(c,u)),l.getByPlaceholder=(c,u)=>l.locator(P_(c,u)),l.getByText=(c,u)=>l.locator(O_(c,u)),l.getByTitle=(c,u)=>l.locator(j_(c,u)),l.getByRole=(c,u={})=>l.locator(R_(c,u)),l.filter=c=>new Di(e,n,c),l.first=()=>l.locator("nth=0"),l.last=()=>l.locator("nth=-1"),l.nth=c=>l.locator(`nth=${c}`),l.and=c=>new Di(e,o+" >> internal:and="+JSON.stringify(c[Li])),l.or=c=>new Di(e,o+" >> internal:or="+JSON.stringify(c[Li]))}};let D_=$_;class B_{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,n)=>this._querySelector(e,!!n),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,n)=>this._generateLocator(e,n),ariaSnapshot:(e,n)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,n||{mode:"expect"}),resume:()=>this._resume(),...new D_(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,n){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,n)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const n=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(n,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,n){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(e);return Mr(n||"javascript",r)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function F_(t){try{return t instanceof RegExp||Object.prototype.toString.call(t)==="[object RegExp]"}catch{return!1}}function z_(t){try{return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}catch{return!1}}function U_(t){try{return t instanceof URL||Object.prototype.toString.call(t)==="[object URL]"}catch{return!1}}function H_(t){var e;try{return t instanceof Error||t&&((e=Object.getPrototypeOf(t))==null?void 0:e.name)==="Error"}catch{return!1}}function q_(t,e){try{return t instanceof e||Object.prototype.toString.call(t)===`[object ${e.name}]`}catch{return!1}}const xy={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function V_(t){if("toBase64"in t)return t.toBase64();const e=Array.from(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).map(n=>String.fromCharCode(n)).join("");return btoa(e)}function W_(t,e){const n=atob(t),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return new e(r.buffer)}function qu(t,e=[],n=new Map){if(!Object.is(t,void 0)){if(typeof t=="object"&&t){if("ref"in t)return n.get(t.ref);if("v"in t)return t.v==="undefined"?void 0:t.v==="null"?null:t.v==="NaN"?NaN:t.v==="Infinity"?1/0:t.v==="-Infinity"?-1/0:t.v==="-0"?-0:void 0;if("d"in t)return new Date(t.d);if("u"in t)return new URL(t.u);if("bi"in t)return BigInt(t.bi);if("e"in t){const r=new Error(t.e.m);return r.name=t.e.n,r.stack=t.e.s,r}if("r"in t)return new RegExp(t.r.p,t.r.f);if("a"in t){const r=[];n.set(t.id,r);for(const o of t.a)r.push(qu(o,e,n));return r}if("o"in t){const r={};n.set(t.id,r);for(const{k:o,v:l}of t.o)o!=="__proto__"&&(r[o]=qu(l,e,n));return r}if("h"in t)return e[t.h];if("ta"in t)return W_(t.ta.b,xy[t.ta.k])}return t}}function K_(t,e){return Vu(t,e,{visited:new Map,lastId:0})}function Vu(t,e,n){if(t&&typeof t=="object"){if(typeof globalThis.Window=="function"&&t instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&t instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&t instanceof globalThis.Node)return"ref: <Node>"}return _y(t,e,n)}function _y(t,e,n){var l;const r=e(t);if("fallThrough"in r)t=r.fallThrough;else return r;if(typeof t=="symbol")return{v:"undefined"};if(Object.is(t,void 0))return{v:"undefined"};if(Object.is(t,null))return{v:"null"};if(Object.is(t,NaN))return{v:"NaN"};if(Object.is(t,1/0))return{v:"Infinity"};if(Object.is(t,-1/0))return{v:"-Infinity"};if(Object.is(t,-0))return{v:"-0"};if(typeof t=="boolean"||typeof t=="number"||typeof t=="string")return t;if(typeof t=="bigint")return{bi:t.toString()};if(H_(t)){let c;return(l=t.stack)!=null&&l.startsWith(t.name+": "+t.message)?c=t.stack:c=`${t.name}: ${t.message}
106
+ ${t.stack}`,{e:{n:t.name,m:t.message,s:c}}}if(z_(t))return{d:t.toJSON()};if(U_(t))return{u:t.toJSON()};if(F_(t))return{r:{p:t.source,f:t.flags}};for(const[c,u]of Object.entries(xy))if(q_(t,u))return{ta:{b:V_(t),k:c}};const o=n.visited.get(t);if(o)return{ref:o};if(Array.isArray(t)){const c=[],u=++n.lastId;n.visited.set(t,u);for(let d=0;d<t.length;++d)c.push(Vu(t[d],e,n));return{a:c,id:u}}if(typeof t=="object"){const c=[],u=++n.lastId;n.visited.set(t,u);for(const p of Object.keys(t)){let m;try{m=t[p]}catch{continue}p==="toJSON"&&typeof m=="function"?c.push({k:p,v:{o:[],id:0}}):c.push({k:p,v:Vu(m,e,n)})}let d;try{c.length===0&&t.toJSON&&typeof t.toJSON=="function"&&(d={value:t.toJSON()})}catch{}return d?_y(d.value,e,n):{o:c,id:u}}}class G_{constructor(e,n){var r,o,l,c,u,d,p,m;this.global=e,this.isUnderTest=n,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(o=e.clearTimeout)==null?void 0:o.bind(e),setInterval:(l=e.setInterval)==null?void 0:l.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(u=e.requestAnimationFrame)==null?void 0:u.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,n,r,o,...l){const c=l.slice(0,o),u=l.slice(o),d=[];for(let m=0;m<c.length;m++)d[m]=qu(c[m],u);let p=this.global.eval(r);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),n?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,n){if(n!==void 0)return K_(n,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const n=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return n(r)})():n(e)}}class Ey{constructor(e,n){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Mr,cacheNormalizedWhitespaces:wS,elementText:Tt,getAriaRole:rt,getElementAccessibleDescription:fg,getElementAccessibleName:Ji,isElementVisible:Yn,isInsideScope:Qi,normalizeWhiteSpace:gt,parseAriaSnapshot:uf,generateAriaTree:Hi,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=n.isUnderTest,this.utils.builtins=new G_(e,n.isUnderTest).builtins,this._sdkLanguage=n.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=n.testIdAttributeName,this._evaluator=new J1,this.consoleApi=new B_(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",_g),this._engines.set("xpath:light",_g),this._engines.set("_react",K1()),this._engines.set("_vue",A_()),this._engines.set("role",vg(!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",vg(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:o}of n.customEngines)this._engines.set(r,this.eval(o));this._stableRafCount=n.stableRafCount,this._browserName=n.browserName,this._isUtilityWorld=!!n.isUtilityWorld,i1({browserNameForWorkarounds:n.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 n=to(e);return yS(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),n}generateSelector(e,n){return xg(this,e,n)}generateSelectorSimple(e,n){return xg(this,e,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,n,r){const o=this.querySelectorAll(e,n);if(r&&o.length>1)throw this.strictModeViolationError(e,o);return o[0]}_queryNth(e,n){const r=[...e];let o=+n.body;return o===-1&&(o=r.length-1),new Set(r.slice(o,o+1))}_queryLayoutSelector(e,n,r){const o=n.name,l=n.body,c=[],u=this.querySelectorAll(l.parsed,r);for(const d of e){const p=Zm(o,d,u,l.distance);p!==void 0&&c.push({element:d,score:p})}return c.sort((d,p)=>d.score-p.score),new Set(c.map(d=>d.element))}ariaSnapshot(e,n){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");return this._lastAriaSnapshot=Hi(e,n),Zl(this._lastAriaSnapshot,n)}ariaSnapshotForRecorder(){const e=Hi(this.document.body,{mode:"ai"});return{ariaSnapshot:Zl(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,n){return j1(e.documentElement,n)}querySelectorAll(e,n){if(e.capture!==void 0){if(e.parts.some(o=>o.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 o={parts:e.parts.slice(e.capture+1)},l={name:"internal:has",body:{parsed:o},source:Tn(o)};r.parts.push(l)}return this.querySelectorAll(r,n)}if(!n.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(n.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[n];this._evaluator.begin();try{let r=new Set([n]);for(const o of e.parts)if(o.name==="nth")r=this._queryNth(r,o);else if(o.name==="internal:and"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(l.filter(c=>r.has(c)))}else if(o.name==="internal:or"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(ly(new Set([...r,...l])))}else if(U1.includes(o.name))r=this._queryLayoutSelector(r,o,n);else{const l=new Set;for(const c of r){const u=this._queryEngineAll(o,c);for(const d of u)l.add(d)}r=l}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,n){const r=this._engines.get(e.name).queryAll(n,e.body);for(const o of r)if(!("nodeName"in o))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(o)}`);return r}_createAttributeEngine(e,n){const r=o=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(o)}]`,functions:[]},combinator:""}]}];return{queryAll:(o,l)=>this._evaluator.query({scope:o,pierceShadow:n},r(l))}}_createCSSEngine(){return{queryAll:(e,n)=>this._evaluator.query({scope:e,pierceShadow:!0},n)}}_createTextEngine(e,n){return{queryAll:(o,l)=>{const{matcher:c,kind:u}=El(l,n),d=[];let p=null;const m=v=>{if(u==="lax"&&p&&p.contains(v))return!1;const x=ua(this._evaluator._cacheText,v,c);x==="none"&&(p=v),(x==="self"||x==="selfAndChildren"&&u==="strict"&&!n)&&d.push(v)};o.nodeType===Node.ELEMENT_NODE&&m(o);const y=this._evaluator._queryCSS({scope:o,pierceShadow:e},"*");for(const v of y)m(v);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=El(n,!0);return l(o)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=El(n,!0);return l(o)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,n)=>{const{matcher:r}=El(n,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(l=>ny(this._evaluator._cacheText,l).some(c=>r(c)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const o=Ir(r,!0);if(o.name||o.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:l,value:c,caseSensitive:u}=o.attributes[0],d=u?null:c.toLowerCase();let p;return c instanceof RegExp?p=y=>!!y.match(c):u?p=y=>y===c:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${l}]`).filter(y=>p(y.getAttribute(l)))}}}_createDescribeEngine(){return{queryAll:n=>n.nodeType!==1?[]:[n]}}_createControlEngine(){return{queryAll(e,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>{if(n.nodeType!==1)return[];const o=r==="true";return Yn(n)===o?[n]:[]}}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(e,n){const r=this.window.eval(`
107
107
  (() => {
108
108
  const module = {};
109
109
  ${e}
110
110
  return module.exports.default();
111
- })()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(o=>{n(o[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 n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let o=e;o;o=at(o))if(n.getComputedStyle(o).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const o=r.closest("label");o&&o.control&&(r=o.control)}return r}async checkElementStates(e,n){if(n.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 n)if(r!=="stable"){const o=this.elementState(e,r);if(o.received==="error:notconnected")return"error:notconnected";if(!o.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,o=0,l=0;const c=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=this.utils.builtins.performance.now();if(this._stableRafCount>1&&v-l<15)return n;l=v;const x=y.getBoundingClientRect(),k={x:x.top,y:x.left,width:x.width,height:x.height};if(r){if(!(k.x===r.x&&k.y===r.y&&k.width===r.width&&k.height===r.height))return!1;if(++o>=this._stableRafCount)return!0}return r=k,n};let u,d;const p=new Promise((y,v)=>{u=y,d=v}),m=()=>{try{const y=c();y!==n?u(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),p}_createAriaRefEngine(){return{queryAll:(n,r)=>{var l,c;const o=(c=(l=this._lastAriaSnapshot)==null?void 0:l.elements)==null?void 0:c.get(r);return o&&o.isConnected?[o]:[]}}}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const o=Yn(r);return{matches:n==="visible"?o:!o,received:o?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const o=Yl(r);return{matches:n==="disabled"?o:!o,received:o?"disabled":"enabled"}}if(n==="editable"){const o=Yl(r),l=w1(r);if(l==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!o&&!l,received:o?"disabled":l?"readOnly":"editable"}}if(n==="checked"||n==="unchecked"){const o=n==="checked",l=y1(r);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");const c=r.nodeName==="INPUT"&&r.type==="radio";return{matches:o===l,received:l?"checked":"unchecked",isRadio:c}}if(n==="indeterminate"){const o=m1(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o==="mixed",received:o===!0?"checked":o===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${n}"`)}selectOptions(e,n){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 o=r,l=[...o.options],c=[];let u=n.slice();for(let d=0;d<l.length;d++){const p=l[d],m=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(u.some(m)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(c.push(p),o.multiple)u=u.filter(y=>!m(y));else{u=[];break}}}return u.length?"error:optionsnotfound":(o.value=void 0,c.forEach(d=>d.selected=!0),o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})),c.map(d=>d.value))}fill(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const o=r,l=o.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(l)&&!c.has(l))throw this.createStacklessError(`Input of type "${l}" cannot be filled`);if(l==="number"&&(n=n.trim(),isNaN(Number(n))))throw this.createStacklessError("Cannot type text into input[type=number]");if(c.has(l)){if(n=n.trim(),o.focus(),o.value=n,o.value!==n)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 n=this.retarget(e,"follow-label");if(!n)return"error:notconnected";if(n.nodeName.toLowerCase()==="input"){const l=n;return l.select(),l.focus(),"done"}if(n.nodeName.toLowerCase()==="textarea"){const l=n;return l.selectionStart=0,l.selectionEnd=l.value.length,l.focus(),"done"}const r=n.ownerDocument.createRange();r.selectNodeContents(n);const o=n.ownerDocument.defaultView.getSelection();return o&&(o.removeAllRanges(),o.addRange(r)),n.focus(),"done"}_activelyFocused(e){const n=e.getRootNode().activeElement,r=n===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:n,isFocused:r}}focusNode(e,n){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:r,isFocused:o}=this._activelyFocused(e);if(e.isContentEditable&&!o&&r&&r.blur&&r.blur(),e.focus(),e.focus(),n&&!o&&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,n){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 o=r;if((o.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const c=n.map(d=>{const p=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),u=new DataTransfer;for(const d of c)u.items.add(d);o.files=u.files,o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,n){const r=[];let o=n;for(;o;){const m=Nm(o);if(!m||(r.push(m),m.nodeType===9))break;o=m.host}let l;for(let m=r.length-1;m>=0;m--){const y=r[m],v=y.elementsFromPoint(e.x,e.y),x=y.elementFromPoint(e.x,e.y);if(x&&v[0]&&at(x)===v[0]){const S=this.window.getComputedStyle(x);(S==null?void 0:S.display)==="contents"&&v.unshift(x)}v[0]&&v[0].shadowRoot===y&&v[1]===x&&v.shift();const k=v[0];if(!k||(l=k,m&&k!==r[m-1].host))break}const c=[];for(;l&&l!==n;)c.push(l),l=at(l);if(l===n)return"done";const u=this.previewNode(c[0]||this.document.documentElement);let d,p=n;for(;p;){const m=c.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(c[m-1]));break}p=at(p)}return d?{hitTargetDescription:`${u} from ${d} subtree`}:{hitTargetDescription:u}}setupHitTargetInterceptor(e,n,r,o){const l=this.retarget(e,"button-link");if(!l||!l.isConnected)return"error:notconnected";if(r){const m=this.expectHitTarget(r,l);if(m!=="done")return m.hitTargetDescription}if(n==="drag")return{stop:()=>"done"};const c={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[n];let u;const d=m=>{if(!c.has(m.type)||!m.isTrusted)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;u===void 0&&y&&(u=this.expectHitTarget({x:y.clientX,y:y.clientY},l)),(o||u!=="done"&&u!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),u||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,n,r){var c,u,d;let o;const l={bubbles:!0,cancelable:!0,composed:!0,...r};switch(this._eventTypes.get(n)){case"mouse":o=new MouseEvent(n,l);break;case"keyboard":o=new KeyboardEvent(n,l);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var k,S;if(y instanceof Touch)return y;let v=y.pageX;v===void 0&&y.clientX!==void 0&&(v=y.clientX+(((k=this.document.scrollingElement)==null?void 0:k.scrollLeft)||0));let x=y.pageY;return x===void 0&&y.clientY!==void 0&&(x=y.clientY+(((S=this.document.scrollingElement)==null?void 0:S.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,v,x,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));l.target??(l.target=e),l.touches=m(l.touches),l.targetTouches=m(l.targetTouches),l.changedTouches=m(l.changedTouches),o=new TouchEvent(n,l)}else l.target??(l.target=e),l.touches=(c=l.touches)==null?void 0:c.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.targetTouches=(u=l.targetTouches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.changedTouches=(d=l.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o=new TouchEvent(n,l);break}case"pointer":o=new PointerEvent(n,l);break;case"focus":o=new FocusEvent(n,l);break;case"drag":o=new DragEvent(n,l);break;case"wheel":o=new WheelEvent(n,l);break;case"deviceorientation":try{o=new DeviceOrientationEvent(n,l)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:v,gamma:x,absolute:k}=l;o=this.document.createEvent("DeviceOrientationEvent"),o.initDeviceOrientationEvent(n,p,m,y,v,x,k)}break;case"devicemotion":try{o=new DeviceMotionEvent(n,l)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:v,rotationRate:x,interval:k}=l;o=this.document.createEvent("DeviceMotionEvent"),o.initDeviceMotionEvent(n,p,m,y,v,x,k)}break;default:o=new Event(n,l);break}e.dispatchEvent(o)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return _l(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return _l(`<${e.nodeName.toLowerCase()} />`);const n=e,r=[];for(let d=0;d<n.attributes.length;d++){const{name:p,value:m}=n.attributes[d];p!=="style"&&(!m&&this._booleanAttributes.has(p)?r.push(` ${p}`):r.push(` ${p}="${m}"`))}r.sort((d,p)=>d.length-p.length);const o=Gp(r.join(""),500);if(this._autoClosingTags.has(n.nodeName))return _l(`<${n.nodeName.toLowerCase()}${o}/>`);const l=n.childNodes;let c=!1;if(l.length<=5){c=!0;for(let d=0;d<l.length;d++)c=c&&l[d].nodeType===Node.TEXT_NODE}const u=c?n.textContent||"":l.length?"…":"";return _l(`<${n.nodeName.toLowerCase()}${o}>${Gp(u,50)}</${n.nodeName.toLowerCase()}>`)}strictModeViolationError(e,n){this._evaluator.begin(),aa(),hf();try{const r=this._isUtilityWorld&&this._browserName==="firefox"?2:10,o=n.slice(0,r).map(c=>({preview:this.previewNode(c),selector:this.generateSelectorSimple(c)})),l=o.map((c,u)=>`
111
+ })()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(o=>{n(o[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 n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let o=e;o;o=at(o))if(n.getComputedStyle(o).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const o=r.closest("label");o&&o.control&&(r=o.control)}return r}async checkElementStates(e,n){if(n.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 n)if(r!=="stable"){const o=this.elementState(e,r);if(o.received==="error:notconnected")return"error:notconnected";if(!o.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,o=0,l=0;const c=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=this.utils.builtins.performance.now();if(this._stableRafCount>1&&v-l<15)return n;l=v;const x=y.getBoundingClientRect(),k={x:x.top,y:x.left,width:x.width,height:x.height};if(r){if(!(k.x===r.x&&k.y===r.y&&k.width===r.width&&k.height===r.height))return!1;if(++o>=this._stableRafCount)return!0}return r=k,n};let u,d;const p=new Promise((y,v)=>{u=y,d=v}),m=()=>{try{const y=c();y!==n?u(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),p}_createAriaRefEngine(){return{queryAll:(n,r)=>{var l,c;const o=(c=(l=this._lastAriaSnapshot)==null?void 0:l.elements)==null?void 0:c.get(r);return o&&o.isConnected?[o]:[]}}}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const o=Yn(r);return{matches:n==="visible"?o:!o,received:o?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const o=Yl(r);return{matches:n==="disabled"?o:!o,received:o?"disabled":"enabled"}}if(n==="editable"){const o=Yl(r),l=S1(r);if(l==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!o&&!l,received:o?"disabled":l?"readOnly":"editable"}}if(n==="checked"||n==="unchecked"){const o=n==="checked",l=v1(r);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");const c=r.nodeName==="INPUT"&&r.type==="radio";return{matches:o===l,received:l?"checked":"unchecked",isRadio:c}}if(n==="indeterminate"){const o=y1(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o==="mixed",received:o===!0?"checked":o===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${n}"`)}selectOptions(e,n){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 o=r,l=[...o.options],c=[];let u=n.slice();for(let d=0;d<l.length;d++){const p=l[d],m=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(u.some(m)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(c.push(p),o.multiple)u=u.filter(y=>!m(y));else{u=[];break}}}return u.length?"error:optionsnotfound":(o.value=void 0,c.forEach(d=>d.selected=!0),o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})),c.map(d=>d.value))}fill(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const o=r,l=o.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(l)&&!c.has(l))throw this.createStacklessError(`Input of type "${l}" cannot be filled`);if(l==="number"&&(n=n.trim(),isNaN(Number(n))))throw this.createStacklessError("Cannot type text into input[type=number]");if(c.has(l)){if(n=n.trim(),o.focus(),o.value=n,o.value!==n)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 n=this.retarget(e,"follow-label");if(!n)return"error:notconnected";if(n.nodeName.toLowerCase()==="input"){const l=n;return l.select(),l.focus(),"done"}if(n.nodeName.toLowerCase()==="textarea"){const l=n;return l.selectionStart=0,l.selectionEnd=l.value.length,l.focus(),"done"}const r=n.ownerDocument.createRange();r.selectNodeContents(n);const o=n.ownerDocument.defaultView.getSelection();return o&&(o.removeAllRanges(),o.addRange(r)),n.focus(),"done"}_activelyFocused(e){const n=e.getRootNode().activeElement,r=n===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:n,isFocused:r}}focusNode(e,n){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:r,isFocused:o}=this._activelyFocused(e);if(e.isContentEditable&&!o&&r&&r.blur&&r.blur(),e.focus(),e.focus(),n&&!o&&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,n){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 o=r;if((o.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const c=n.map(d=>{const p=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),u=new DataTransfer;for(const d of c)u.items.add(d);o.files=u.files,o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,n){const r=[];let o=n;for(;o;){const m=Am(o);if(!m||(r.push(m),m.nodeType===9))break;o=m.host}let l;for(let m=r.length-1;m>=0;m--){const y=r[m],v=y.elementsFromPoint(e.x,e.y),x=y.elementFromPoint(e.x,e.y);if(x&&v[0]&&at(x)===v[0]){const S=this.window.getComputedStyle(x);(S==null?void 0:S.display)==="contents"&&v.unshift(x)}v[0]&&v[0].shadowRoot===y&&v[1]===x&&v.shift();const k=v[0];if(!k||(l=k,m&&k!==r[m-1].host))break}const c=[];for(;l&&l!==n;)c.push(l),l=at(l);if(l===n)return"done";const u=this.previewNode(c[0]||this.document.documentElement);let d,p=n;for(;p;){const m=c.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(c[m-1]));break}p=at(p)}return d?{hitTargetDescription:`${u} from ${d} subtree`}:{hitTargetDescription:u}}setupHitTargetInterceptor(e,n,r,o){const l=this.retarget(e,"button-link");if(!l||!l.isConnected)return"error:notconnected";if(r){const m=this.expectHitTarget(r,l);if(m!=="done")return m.hitTargetDescription}if(n==="drag")return{stop:()=>"done"};const c={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[n];let u;const d=m=>{if(!c.has(m.type)||!m.isTrusted)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;u===void 0&&y&&(u=this.expectHitTarget({x:y.clientX,y:y.clientY},l)),(o||u!=="done"&&u!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),u||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,n,r){var c,u,d;let o;const l={bubbles:!0,cancelable:!0,composed:!0,...r};switch(this._eventTypes.get(n)){case"mouse":o=new MouseEvent(n,l);break;case"keyboard":o=new KeyboardEvent(n,l);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var k,S;if(y instanceof Touch)return y;let v=y.pageX;v===void 0&&y.clientX!==void 0&&(v=y.clientX+(((k=this.document.scrollingElement)==null?void 0:k.scrollLeft)||0));let x=y.pageY;return x===void 0&&y.clientY!==void 0&&(x=y.clientY+(((S=this.document.scrollingElement)==null?void 0:S.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,v,x,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));l.target??(l.target=e),l.touches=m(l.touches),l.targetTouches=m(l.targetTouches),l.changedTouches=m(l.changedTouches),o=new TouchEvent(n,l)}else l.target??(l.target=e),l.touches=(c=l.touches)==null?void 0:c.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.targetTouches=(u=l.targetTouches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.changedTouches=(d=l.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o=new TouchEvent(n,l);break}case"pointer":o=new PointerEvent(n,l);break;case"focus":o=new FocusEvent(n,l);break;case"drag":o=new DragEvent(n,l);break;case"wheel":o=new WheelEvent(n,l);break;case"deviceorientation":try{o=new DeviceOrientationEvent(n,l)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:v,gamma:x,absolute:k}=l;o=this.document.createEvent("DeviceOrientationEvent"),o.initDeviceOrientationEvent(n,p,m,y,v,x,k)}break;case"devicemotion":try{o=new DeviceMotionEvent(n,l)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:v,rotationRate:x,interval:k}=l;o=this.document.createEvent("DeviceMotionEvent"),o.initDeviceMotionEvent(n,p,m,y,v,x,k)}break;default:o=new Event(n,l);break}e.dispatchEvent(o)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return _l(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return _l(`<${e.nodeName.toLowerCase()} />`);const n=e,r=[];for(let d=0;d<n.attributes.length;d++){const{name:p,value:m}=n.attributes[d];p!=="style"&&(!m&&this._booleanAttributes.has(p)?r.push(` ${p}`):r.push(` ${p}="${m}"`))}r.sort((d,p)=>d.length-p.length);const o=Gp(r.join(""),500);if(this._autoClosingTags.has(n.nodeName))return _l(`<${n.nodeName.toLowerCase()}${o}/>`);const l=n.childNodes;let c=!1;if(l.length<=5){c=!0;for(let d=0;d<l.length;d++)c=c&&l[d].nodeType===Node.TEXT_NODE}const u=c?n.textContent||"":l.length?"…":"";return _l(`<${n.nodeName.toLowerCase()}${o}>${Gp(u,50)}</${n.nodeName.toLowerCase()}>`)}strictModeViolationError(e,n){this._evaluator.begin(),aa(),pf();try{const r=this._isUtilityWorld&&this._browserName==="firefox"?2:10,o=n.slice(0,r).map(c=>({preview:this.previewNode(c),selector:this.generateSelectorSimple(c)})),l=o.map((c,u)=>`
112
112
  ${u+1}) ${c.preview} aka ${Mr(this._sdkLanguage,c.selector)}`);return o.length<n.length&&l.push(`
113
113
  ...`),this.createStacklessError(`strict mode violation: ${Mr(this._sdkLanguage,Tn(e))} resolved to ${n.length} elements:${l.join("")}
114
- `)}finally{pf(),ca(),this._evaluator.end()}}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const n=new Error(e);return delete n.stack,n}createHighlight(){return new _u(this)}maskSelectors(e,n){this._highlight&&this.hideHighlight(),this._highlight=new _u(this),this._highlight.install();const r=[];for(const o of e)r.push(this.querySelectorAll(o,this.document.documentElement));this._highlight.maskElements(r.flat(),n)}highlight(e){this._highlight||(this._highlight=new _u(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,n){var c,u;((c=this._markedElements)==null?void 0:c.callId)!==n&&(this._markedElements=void 0);const r=((u=this._markedElements)==null?void 0:u.elements)||new Set,o=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of r)e.has(d)||d.dispatchEvent(o);const l=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of e)r.has(d)||d.dispatchEvent(l);this._markedElements={callId:n,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let n=!1;const r=()=>n=!0;this.window.addEventListener(e,r),new MutationObserver(o=>{if(o.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(n=!1,this.window.dispatchEvent(new CustomEvent(e)),!n)){this.window.addEventListener(e,r);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var o;return(o=this._hitTargetInterceptor)==null?void 0:o.call(this,r)},n=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};n(),this.onGlobalListenersRemoved.add(n)}async expect(e,n,r){var l,c;if(n.expression==="to.have.count"||n.expression.endsWith(".array"))return this.expectArray(r,n);if(!e){if(!n.isNot&&n.expression==="to.be.hidden")return{matches:!0};if(n.isNot&&n.expression==="to.be.visible")return{matches:!1};if(!n.isNot&&n.expression==="to.be.detached")return{matches:!0};if(n.isNot&&n.expression==="to.be.attached")return{matches:!1};if(n.isNot&&n.expression==="to.be.in.viewport")return{matches:!1};if(n.expression==="to.have.title"&&((l=n==null?void 0:n.expectedText)!=null&&l[0])){const u=new hs(n.expectedText[0]),d=this.document.title;return{received:d,matches:u.matches(d)}}if(n.expression==="to.have.url"&&((c=n==null?void 0:n.expectedText)!=null&&c[0])){const u=new hs(n.expectedText[0]),d=this.document.location.href;return{received:d,matches:u.matches(d)}}return{matches:n.isNot,missingReceived:!0}}return await this.expectSingleElement(e,n)}async expectSingleElement(e,n){var o;const r=n.expression;{let l;if(r==="to.have.attribute"){const c=e.hasAttribute(n.expressionArg);l={matches:c,received:c?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:c,indeterminate:u}=n.expectedValue;if(u){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");l=this.elementState(e,"indeterminate")}else l=this.elementState(e,c===!1?"unchecked":"checked")}else if(r==="to.be.disabled")l=this.elementState(e,"disabled");else if(r==="to.be.editable")l=this.elementState(e,"editable");else if(r==="to.be.readonly")l=this.elementState(e,"editable"),l.matches=!l.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;l={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(o=e.textContent)==null?void 0:o.trim();l={matches:!c,received:c?"notEmpty":"empty"}}else if(r==="to.be.enabled")l=this.elementState(e,"enabled");else if(r==="to.be.focused"){const c=this._activelyFocused(e).isFocused;l={matches:c,received:c?"focused":"inactive"}}else r==="to.be.hidden"?l=this.elementState(e,"hidden"):r==="to.be.visible"?l=this.elementState(e,"visible"):r==="to.be.attached"?l={matches:!0,received:"attached"}:r==="to.be.detached"&&(l={matches:!1,received:"attached"});if(l){if(l.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return l}}if(r==="to.have.property"){let l=e;const c=n.expressionArg.split(".");for(let p=0;p<c.length-1;p++){if(typeof l!="object"||!(c[p]in l))return{received:void 0,matches:!1};l=l[c[p]]}const u=l[c[c.length-1]],d=Vu(u,n.expectedValue);return{received:u,matches:d}}if(r==="to.be.in.viewport"){const l=await this.viewportRatio(e);return{received:`viewport ratio ${l}`,matches:l>0&&l>(n.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 l=[...e.selectedOptions].map(c=>c.value);return l.length!==n.expectedText.length?{received:l,matches:!1}:{received:l,matches:l.map((c,u)=>new hs(n.expectedText[u]).matches(c)).every(Boolean)}}if(r==="to.match.aria"){const l=I1(e,n.expectedValue);return{received:l.received,matches:!!l.matches.length}}{let l;if(r==="to.have.attribute.value"){const c=e.getAttribute(n.expressionArg);if(c===null)return{received:null,matches:!1};l=c}else if(["to.have.class","to.contain.class"].includes(r)){if(!n.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);return{received:e.classList.toString(),matches:new hs(n.expectedText[0]).matchesClassList(this,e.classList,r==="to.contain.class")}}else if(r==="to.have.css")l=this.window.getComputedStyle(e).getPropertyValue(n.expressionArg);else if(r==="to.have.id")l=e.id;else if(r==="to.have.text")l=n.useInnerText?e.innerText:Tt(new Map,e).full;else if(r==="to.have.accessible.name")l=Ji(e,!1);else if(r==="to.have.accessible.description")l=fg(e,!1);else if(r==="to.have.accessible.error.message")l=p1(e);else if(r==="to.have.role")l=rt(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");l=e.value}if(l!==void 0&&n.expectedText){const c=new hs(n.expectedText[0]);return{received:l,matches:c.matches(l)}}}throw this.createStacklessError("Unknown expect matcher: "+r)}expectArray(e,n){const r=n.expression;if(r==="to.have.count"){const d=e.length,p=d===n.expectedNumber;return{received:d,matches:p}}if(!n.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);if(["to.have.class.array","to.contain.class.array"].includes(r)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==n.expectedText.length)return{received:p,matches:!1};const m=this._matchSequentially(n.expectedText,d,(y,v)=>y.matchesClassList(this,v,r==="to.contain.class.array"));return{received:p,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(r))throw this.createStacklessError("Unknown expect matcher: "+r);const o=e.map(d=>n.useInnerText?d.innerText:Tt(new Map,d).full),l=r!=="to.contain.text.array";if(!(o.length===n.expectedText.length||!l))return{received:o,matches:!1};const u=this._matchSequentially(n.expectedText,o,(d,p)=>d.matches(p));return{received:o,matches:u}}_matchSequentially(e,n,r){const o=e.map(u=>new hs(u));let l=0,c=0;for(;l<o.length&&c<n.length;)r(o[l],n[c])&&++l,++c;return l===o.length}}function _l(t){return t.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function G_(t){if(t=t.substring(1,t.length-1),!t.includes("\\"))return t;const e=[];let n=0;for(;n<t.length;)t[n]==="\\"&&n+1<t.length&&n++,e.push(t[n++]);return e.join("")}function El(t,e){if(t[0]==="/"&&t.lastIndexOf("/")>0){const o=t.lastIndexOf("/"),l=new RegExp(t.substring(1,o),t.substring(o+1));return{matcher:c=>l.test(c.full),kind:"regex"}}const n=e?JSON.parse.bind(JSON):G_;let r=!1;return t.length>1&&t[0]==='"'&&t[t.length-1]==='"'?(t=n(t),r=!0):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="i"?(t=n(t.substring(0,t.length-1)),r=!1):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="s"?(t=n(t.substring(0,t.length-1)),r=!0):t.length>1&&t[0]==="'"&&t[t.length-1]==="'"&&(t=n(t),r=!0),t=gt(t),r?e?{kind:"strict",matcher:l=>l.normalized===t}:{matcher:l=>!t&&!l.immediate.length?!0:l.immediate.some(c=>gt(c)===t),kind:"strict"}:(t=t.toLowerCase(),{kind:"lax",matcher:o=>o.normalized.toLowerCase().includes(t)})}class hs{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 n=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&n.delete("i"),e.ignoreCase===!0&&n.add("i"),this._regex=new RegExp(e.regexSource,[...n].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,n,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(o=>n.contains(o))}return this.matches(n.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=gt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Vu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Vu(t[r],e[r]))return!1;return!0}if(t instanceof RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let r=0;r<n.length;++r)if(!e.hasOwnProperty(n[r]))return!1;for(const r of n)if(!Vu(t[r],e[r]))return!1;return!0}return typeof t=="number"&&typeof e=="number"?isNaN(t)&&isNaN(e):!1}const Q_={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-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"}}]}]}]},Ut={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class _g{}class Tu{constructor(e,n){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=n}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var n;Re(e),e.button===0&&(n=this._hoveredModel)!=null&&n.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Re(e)}onPointerUp(e){Re(e)}onMouseDown(e){Re(e)}onMouseUp(e){Re(e)}onMouseMove(e){var o;Re(e);let n=this._recorder.deepEventTarget(e);if(n.isConnected||(n=null),this._hoveredElement===n)return;this._hoveredElement=n;let r=null;if(this._hoveredElement){const l=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});r={selector:l.selector,elements:l.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,l.selector),color:this._assertVisibility?Ut.assert:Ut.single}}((o=this._hoveredModel)==null?void 0:o.selector)!==(r==null?void 0:r.selector)&&(this._hoveredModel=r,this._recorder.updateHighlight(r,!0))}onMouseEnter(e){Re(e)}onMouseLeave(e){Re(e);const n=this._recorder.injectedScript.window;n.top!==n&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Re(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Re(e)}onScroll(e){this._reset(!1)}_commit(e,n){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,n)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class J_{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 Ey(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(n=>{if(this._hoveredElement)for(const r of n)for(const o of r.removedNodes)(o===this._hoveredElement||o.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"&&Re(e);return}if(Wi(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 n=Vi(this._recorder.deepEventTarget(e));if(n&&e.detail===1){this._performAction({name:n.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:qi(e),signals:[],button:Wu(e),modifiers:ks(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||Wi(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:qi(e),signals:[],button:Wu(e),modifiers:ks(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()){Re(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 n=this._recorder.deepEventTarget(e);this._hoveredElement!==n&&(this._hoveredElement=n,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const n=this._recorder.injectedScript.window;n.top!==n&&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 n=this._recorder.deepEventTarget(e);if(n.nodeName==="INPUT"&&n.type.toLowerCase()==="file"){this._recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...n.files||[]].map(r=>r.name)});return}if(Wi(n)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:n.value});return}if(["INPUT","TEXTAREA"].includes(n.nodeName)||n.isContentEditable){if(n.nodeName==="INPUT"&&["checkbox","radio"].includes(n.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:n.isContentEditable?n.innerText:n.value})}if(n.nodeName==="SELECT"){const r=n;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...r.selectedOptions].map(o=>o.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 n=Vi(this._recorder.deepEventTarget(e));if(n&&e.detail===0){this._performAction({name:n.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:ks(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Re(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,n){Re(n);const r=qi(n),o=[{title:"Click",action:{name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:0}},{title:"Right click",action:{name:"click",selector:e.selector,position:r,signals:[],button:"right",modifiers:0,clickCount:0}},{title:"Double click",action:{name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:2}},{title:"Hover",action:{name:"hover",selector:e.selector,position:r,signals:[]}}],l=this._recorder.document.createElement("x-pw-action-list");l.setAttribute("role","list"),l.setAttribute("aria-label","Choose action");for(const p of o){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=p.title,m.setAttribute("aria-label",p.title),m.addEventListener("click",()=>{this._dialog.close(),this._performAction(p.action)}),l.appendChild(m)}const c=this._dialog.show({label:"Choose action",body:l,autosize:!0}),u=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(u,c);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const n=eE(this._recorder.document);if(e&&n===this._recorder.document.body)return;const r=n?this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=r&&r.selector?{...r,color:Ut.action}:null,e&&(this._hoveredElement=n,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const n=this._recorder.deepEventTarget(e),r=n.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(n.type))}_actionInProgress(e){const n=e instanceof KeyboardEvent,r=e instanceof MouseEvent||e instanceof PointerEvent;for(const o of this._performingActions)if(n&&o.name==="press"&&e.key===o.key||r&&(o.name==="click"||o.name==="hover"||o.name==="check"||o.name==="uncheck"))return!0;return Re(e),!1}_consumedDueToNoModel(e,n){return n?!1:(Re(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Re(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||Re(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const n=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&n.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 n=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!n?!!Vi(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:n}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:n,color:Ut.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class X_{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const n=this._recorder.deepEventTarget(e);if(Wi(n)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const r=Vi(n),{ariaSnapshot:o,selector:l,ref:c}=this._ariaSnapshot(n);if(r&&e.detail===1){this._recorder.recordAction({name:r.checked?"check":"uncheck",selector:l,ref:c,signals:[],ariaSnapshot:o});return}this._recorder.recordAction({name:"click",selector:l,ref:c,ariaSnapshot:o,position:qi(e),signals:[],button:Wu(e),modifiers:ks(e),clickCount:e.detail})}onContextMenu(e){const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o,ref:l}=this._ariaSnapshot(n);this._recorder.recordAction({name:"click",selector:o,ref:l,ariaSnapshot:r,position:qi(e),signals:[],button:"right",modifiers:ks(e),clickCount:1})}onInput(e){const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o,ref:l}=this._ariaSnapshot(n);if(Wi(n)){this._recorder.recordAction({name:"fill",selector:o,ref:l,ariaSnapshot:r,signals:[],text:n.value});return}if(["INPUT","TEXTAREA"].includes(n.nodeName)||n.isContentEditable){if(n.nodeName==="INPUT"&&["checkbox","radio"].includes(n.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:l,selector:o,ariaSnapshot:r,signals:[],text:n.isContentEditable?n.innerText:n.value});return}if(n.nodeName==="SELECT"){const c=n;this._recorder.recordAction({name:"select",selector:o,ref:l,ariaSnapshot:r,options:[...c.selectedOptions].map(u=>u.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o,ref:l}=this._ariaSnapshot(n);if(e.key===" "){const c=Vi(n);if(c&&e.detail===0){this._recorder.recordAction({name:c.checked?"uncheck":"check",selector:o,ref:l,ariaSnapshot:r,signals:[]});return}}this._recorder.recordAction({name:"press",selector:o,ref:l,ariaSnapshot:r,signals:[],key:e.key,modifiers:ks(e)})}_shouldIgnoreMouseEvent(e){const n=this._recorder.deepEventTarget(e),r=n.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(n.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 n=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!n?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:n,refs:r}=this._recorder.injectedScript.ariaSnapshotForRecorder(),o=e?r.get(e):void 0,l=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:n,selector:l==null?void 0:l.selector,ref:o}}}class Cu{constructor(e,n){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=n,this._dialog=new Ey(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Re(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const n=this._recorder.deepEventTarget(e);this._elementHasValue(n)&&e.preventDefault()}onPointerUp(e){var r;const n=(r=this._hoverHighlight)==null?void 0:r.elements[0];this._kind==="value"&&n&&(n.nodeName==="INPUT"||n.nodeName==="SELECT")&&n.disabled&&this._commitAssertValue()}onMouseMove(e){var r;if(this._dialog.isShowing())return;const n=this._recorder.deepEventTarget(e);if(((r=this._hoverHighlight)==null?void 0:r.elements[0])!==n){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,n).full?{elements:[n],selector:"",color:Ut.assert}:null;else if(this._elementHasValue(n)){const o=this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:o.selector,elements:o.elements,color:Ut.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Re(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 n;this._textCache.clear();const e=(n=this._hoverHighlight)==null?void 0:n.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:Ut.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:Ut.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,n,r,o;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((n=this._action)==null?void 0:n.name)==="assertText"?this._showTextDialog(this._action):((r=this._action)==null?void 0:r.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(o=this._recorder.overlay)==null||o.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const n=this._recorder.document.createElement("textarea");n.setAttribute("spellcheck","false"),n.value=this._renderValue(e),n.classList.add("text-editor");const r=()=>{var y;const u=this._recorder.injectedScript.utils.normalizeWhiteSpace(n.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=u;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=u&&p.includes(u);n.classList.toggle("does-not-match",!m)};n.addEventListener("input",r);const l=this._dialog.show({label:"Assert that element contains text",body:n,onCommit:()=>this._commit()}),c=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),l);this._dialog.moveTo(c.anchorTop,c.anchorLeft),n.focus()}_commitAssertValue(){var n;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(n=this._recorder.overlay)==null||n.flashToolSucceeded("assertingValue"))}}class Y_{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const n=this._recorder.document;this._overlayElement=n.createElement("x-pw-overlay");const r=n.createElement("x-pw-tools-list");this._overlayElement.appendChild(r),this._dragHandle=n.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(n.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(){ky(this._listeners),this._listeners=[Me(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),Me(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")}),Me(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])}),Me(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),Me(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),Me(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),Me(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){this._recordToggle.classList.toggle("toggled",e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting"),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 n;e==="assertingVisibility"?n=this._assertVisibilityToggle:e==="assertingSnapshot"?n=this._assertSnapshotToggle:n=this._assertValuesToggle,n.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>n.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 n=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-n,Math.min(n,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Re(e),!0}return!1}onMouseUp(e){return this._dragState?(Re(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Re(e),!0):!1}onDblClick(e){return!1}}class Z_{constructor(e,n){var r,o;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 _g,standby:new _g,inspecting:new Tu(this,!1),recording:(n==null?void 0:n.recorderMode)==="api"?new X_(this):new J_(this),"recording-inspecting":new Tu(this,!1),assertingText:new Cu(this,"text"),assertingVisibility:new Tu(this,!0),assertingValue:new Cu(this,"value"),assertingSnapshot:new Cu(this,"snapshot")},this._currentTool=this._tools.none,(o=(r=this._currentTool).install)==null||o.call(r),e.window.top===e.window&&(this.overlay=new Y_(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
114
+ `)}finally{gf(),ca(),this._evaluator.end()}}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const n=new Error(e);return delete n.stack,n}createHighlight(){return new Eu(this)}maskSelectors(e,n){this._highlight&&this.hideHighlight(),this._highlight=new Eu(this),this._highlight.install();const r=[];for(const o of e)r.push(this.querySelectorAll(o,this.document.documentElement));this._highlight.maskElements(r.flat(),n)}highlight(e){this._highlight||(this._highlight=new Eu(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,n){var c,u;((c=this._markedElements)==null?void 0:c.callId)!==n&&(this._markedElements=void 0);const r=((u=this._markedElements)==null?void 0:u.elements)||new Set,o=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of r)e.has(d)||d.dispatchEvent(o);const l=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of e)r.has(d)||d.dispatchEvent(l);this._markedElements={callId:n,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let n=!1;const r=()=>n=!0;this.window.addEventListener(e,r),new MutationObserver(o=>{if(o.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(n=!1,this.window.dispatchEvent(new CustomEvent(e)),!n)){this.window.addEventListener(e,r);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var o;return(o=this._hitTargetInterceptor)==null?void 0:o.call(this,r)},n=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};n(),this.onGlobalListenersRemoved.add(n)}async expect(e,n,r){var l,c;if(n.expression==="to.have.count"||n.expression.endsWith(".array"))return this.expectArray(r,n);if(!e){if(!n.isNot&&n.expression==="to.be.hidden")return{matches:!0};if(n.isNot&&n.expression==="to.be.visible")return{matches:!1};if(!n.isNot&&n.expression==="to.be.detached")return{matches:!0};if(n.isNot&&n.expression==="to.be.attached")return{matches:!1};if(n.isNot&&n.expression==="to.be.in.viewport")return{matches:!1};if(n.expression==="to.have.title"&&((l=n==null?void 0:n.expectedText)!=null&&l[0])){const u=new hs(n.expectedText[0]),d=this.document.title;return{received:d,matches:u.matches(d)}}if(n.expression==="to.have.url"&&((c=n==null?void 0:n.expectedText)!=null&&c[0])){const u=new hs(n.expectedText[0]),d=this.document.location.href;return{received:d,matches:u.matches(d)}}return{matches:n.isNot,missingReceived:!0}}return await this.expectSingleElement(e,n)}async expectSingleElement(e,n){var o;const r=n.expression;{let l;if(r==="to.have.attribute"){const c=e.hasAttribute(n.expressionArg);l={matches:c,received:c?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:c,indeterminate:u}=n.expectedValue;if(u){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");l=this.elementState(e,"indeterminate")}else l=this.elementState(e,c===!1?"unchecked":"checked")}else if(r==="to.be.disabled")l=this.elementState(e,"disabled");else if(r==="to.be.editable")l=this.elementState(e,"editable");else if(r==="to.be.readonly")l=this.elementState(e,"editable"),l.matches=!l.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;l={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(o=e.textContent)==null?void 0:o.trim();l={matches:!c,received:c?"notEmpty":"empty"}}else if(r==="to.be.enabled")l=this.elementState(e,"enabled");else if(r==="to.be.focused"){const c=this._activelyFocused(e).isFocused;l={matches:c,received:c?"focused":"inactive"}}else r==="to.be.hidden"?l=this.elementState(e,"hidden"):r==="to.be.visible"?l=this.elementState(e,"visible"):r==="to.be.attached"?l={matches:!0,received:"attached"}:r==="to.be.detached"&&(l={matches:!1,received:"attached"});if(l){if(l.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return l}}if(r==="to.have.property"){let l=e;const c=n.expressionArg.split(".");for(let p=0;p<c.length-1;p++){if(typeof l!="object"||!(c[p]in l))return{received:void 0,matches:!1};l=l[c[p]]}const u=l[c[c.length-1]],d=Wu(u,n.expectedValue);return{received:u,matches:d}}if(r==="to.be.in.viewport"){const l=await this.viewportRatio(e);return{received:`viewport ratio ${l}`,matches:l>0&&l>(n.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 l=[...e.selectedOptions].map(c=>c.value);return l.length!==n.expectedText.length?{received:l,matches:!1}:{received:l,matches:l.map((c,u)=>new hs(n.expectedText[u]).matches(c)).every(Boolean)}}if(r==="to.match.aria"){const l=M1(e,n.expectedValue);return{received:l.received,matches:!!l.matches.length}}{let l;if(r==="to.have.attribute.value"){const c=e.getAttribute(n.expressionArg);if(c===null)return{received:null,matches:!1};l=c}else if(["to.have.class","to.contain.class"].includes(r)){if(!n.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);return{received:e.classList.toString(),matches:new hs(n.expectedText[0]).matchesClassList(this,e.classList,r==="to.contain.class")}}else if(r==="to.have.css")l=this.window.getComputedStyle(e).getPropertyValue(n.expressionArg);else if(r==="to.have.id")l=e.id;else if(r==="to.have.text")l=n.useInnerText?e.innerText:Tt(new Map,e).full;else if(r==="to.have.accessible.name")l=Ji(e,!1);else if(r==="to.have.accessible.description")l=fg(e,!1);else if(r==="to.have.accessible.error.message")l=g1(e);else if(r==="to.have.role")l=rt(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");l=e.value}if(l!==void 0&&n.expectedText){const c=new hs(n.expectedText[0]);return{received:l,matches:c.matches(l)}}}throw this.createStacklessError("Unknown expect matcher: "+r)}expectArray(e,n){const r=n.expression;if(r==="to.have.count"){const d=e.length,p=d===n.expectedNumber;return{received:d,matches:p}}if(!n.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);if(["to.have.class.array","to.contain.class.array"].includes(r)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==n.expectedText.length)return{received:p,matches:!1};const m=this._matchSequentially(n.expectedText,d,(y,v)=>y.matchesClassList(this,v,r==="to.contain.class.array"));return{received:p,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(r))throw this.createStacklessError("Unknown expect matcher: "+r);const o=e.map(d=>n.useInnerText?d.innerText:Tt(new Map,d).full),l=r!=="to.contain.text.array";if(!(o.length===n.expectedText.length||!l))return{received:o,matches:!1};const u=this._matchSequentially(n.expectedText,o,(d,p)=>d.matches(p));return{received:o,matches:u}}_matchSequentially(e,n,r){const o=e.map(u=>new hs(u));let l=0,c=0;for(;l<o.length&&c<n.length;)r(o[l],n[c])&&++l,++c;return l===o.length}}function _l(t){return t.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function Q_(t){if(t=t.substring(1,t.length-1),!t.includes("\\"))return t;const e=[];let n=0;for(;n<t.length;)t[n]==="\\"&&n+1<t.length&&n++,e.push(t[n++]);return e.join("")}function El(t,e){if(t[0]==="/"&&t.lastIndexOf("/")>0){const o=t.lastIndexOf("/"),l=new RegExp(t.substring(1,o),t.substring(o+1));return{matcher:c=>l.test(c.full),kind:"regex"}}const n=e?JSON.parse.bind(JSON):Q_;let r=!1;return t.length>1&&t[0]==='"'&&t[t.length-1]==='"'?(t=n(t),r=!0):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="i"?(t=n(t.substring(0,t.length-1)),r=!1):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="s"?(t=n(t.substring(0,t.length-1)),r=!0):t.length>1&&t[0]==="'"&&t[t.length-1]==="'"&&(t=n(t),r=!0),t=gt(t),r?e?{kind:"strict",matcher:l=>l.normalized===t}:{matcher:l=>!t&&!l.immediate.length?!0:l.immediate.some(c=>gt(c)===t),kind:"strict"}:(t=t.toLowerCase(),{kind:"lax",matcher:o=>o.normalized.toLowerCase().includes(t)})}class hs{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 n=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&n.delete("i"),e.ignoreCase===!0&&n.add("i"),this._regex=new RegExp(e.regexSource,[...n].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,n,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(o=>n.contains(o))}return this.matches(n.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=gt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Wu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Wu(t[r],e[r]))return!1;return!0}if(t instanceof RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let r=0;r<n.length;++r)if(!e.hasOwnProperty(n[r]))return!1;for(const r of n)if(!Wu(t[r],e[r]))return!1;return!0}return typeof t=="number"&&typeof e=="number"?isNaN(t)&&isNaN(e):!1}const J_={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-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"}}]}]}]},Ut={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class Eg{}class Cu{constructor(e,n){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=n}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var n;Re(e),e.button===0&&(n=this._hoveredModel)!=null&&n.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Re(e)}onPointerUp(e){Re(e)}onMouseDown(e){Re(e)}onMouseUp(e){Re(e)}onMouseMove(e){var o;Re(e);let n=this._recorder.deepEventTarget(e);if(n.isConnected||(n=null),this._hoveredElement===n)return;this._hoveredElement=n;let r=null;if(this._hoveredElement){const l=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});r={selector:l.selector,elements:l.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,l.selector),color:this._assertVisibility?Ut.assert:Ut.single}}((o=this._hoveredModel)==null?void 0:o.selector)!==(r==null?void 0:r.selector)&&(this._hoveredModel=r,this._recorder.updateHighlight(r,!0))}onMouseEnter(e){Re(e)}onMouseLeave(e){Re(e);const n=this._recorder.injectedScript.window;n.top!==n&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Re(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Re(e)}onScroll(e){this._reset(!1)}_commit(e,n){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,n)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class X_{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 ky(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(n=>{if(this._hoveredElement)for(const r of n)for(const o of r.removedNodes)(o===this._hoveredElement||o.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"&&Re(e);return}if(Wi(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 n=Vi(this._recorder.deepEventTarget(e));if(n&&e.detail===1){this._performAction({name:n.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:qi(e),signals:[],button:Ku(e),modifiers:ks(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||Wi(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:qi(e),signals:[],button:Ku(e),modifiers:ks(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()){Re(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 n=this._recorder.deepEventTarget(e);this._hoveredElement!==n&&(this._hoveredElement=n,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const n=this._recorder.injectedScript.window;n.top!==n&&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 n=this._recorder.deepEventTarget(e);if(n.nodeName==="INPUT"&&n.type.toLowerCase()==="file"){this._recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...n.files||[]].map(r=>r.name)});return}if(Wi(n)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:n.value});return}if(["INPUT","TEXTAREA"].includes(n.nodeName)||n.isContentEditable){if(n.nodeName==="INPUT"&&["checkbox","radio"].includes(n.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:n.isContentEditable?n.innerText:n.value})}if(n.nodeName==="SELECT"){const r=n;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...r.selectedOptions].map(o=>o.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 n=Vi(this._recorder.deepEventTarget(e));if(n&&e.detail===0){this._performAction({name:n.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:ks(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Re(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,n){Re(n);const r=qi(n),o=[{title:"Click",action:{name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:0}},{title:"Right click",action:{name:"click",selector:e.selector,position:r,signals:[],button:"right",modifiers:0,clickCount:0}},{title:"Double click",action:{name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:2}},{title:"Hover",action:{name:"hover",selector:e.selector,position:r,signals:[]}}],l=this._recorder.document.createElement("x-pw-action-list");l.setAttribute("role","list"),l.setAttribute("aria-label","Choose action");for(const p of o){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=p.title,m.setAttribute("aria-label",p.title),m.addEventListener("click",()=>{this._dialog.close(),this._performAction(p.action)}),l.appendChild(m)}const c=this._dialog.show({label:"Choose action",body:l,autosize:!0}),u=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(u,c);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const n=tE(this._recorder.document);if(e&&n===this._recorder.document.body)return;const r=n?this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=r&&r.selector?{...r,color:Ut.action}:null,e&&(this._hoveredElement=n,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const n=this._recorder.deepEventTarget(e),r=n.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(n.type))}_actionInProgress(e){const n=e instanceof KeyboardEvent,r=e instanceof MouseEvent||e instanceof PointerEvent;for(const o of this._performingActions)if(n&&o.name==="press"&&e.key===o.key||r&&(o.name==="click"||o.name==="hover"||o.name==="check"||o.name==="uncheck"))return!0;return Re(e),!1}_consumedDueToNoModel(e,n){return n?!1:(Re(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Re(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||Re(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const n=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&n.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 n=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!n?!!Vi(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:n}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:n,color:Ut.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class Y_{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const n=this._recorder.deepEventTarget(e);if(Wi(n)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const r=Vi(n),{ariaSnapshot:o,selector:l,ref:c}=this._ariaSnapshot(n);if(r&&e.detail===1){this._recorder.recordAction({name:r.checked?"check":"uncheck",selector:l,ref:c,signals:[],ariaSnapshot:o});return}this._recorder.recordAction({name:"click",selector:l,ref:c,ariaSnapshot:o,position:qi(e),signals:[],button:Ku(e),modifiers:ks(e),clickCount:e.detail})}onContextMenu(e){const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o,ref:l}=this._ariaSnapshot(n);this._recorder.recordAction({name:"click",selector:o,ref:l,ariaSnapshot:r,position:qi(e),signals:[],button:"right",modifiers:ks(e),clickCount:1})}onInput(e){const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o,ref:l}=this._ariaSnapshot(n);if(Wi(n)){this._recorder.recordAction({name:"fill",selector:o,ref:l,ariaSnapshot:r,signals:[],text:n.value});return}if(["INPUT","TEXTAREA"].includes(n.nodeName)||n.isContentEditable){if(n.nodeName==="INPUT"&&["checkbox","radio"].includes(n.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:l,selector:o,ariaSnapshot:r,signals:[],text:n.isContentEditable?n.innerText:n.value});return}if(n.nodeName==="SELECT"){const c=n;this._recorder.recordAction({name:"select",selector:o,ref:l,ariaSnapshot:r,options:[...c.selectedOptions].map(u=>u.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o,ref:l}=this._ariaSnapshot(n);if(e.key===" "){const c=Vi(n);if(c&&e.detail===0){this._recorder.recordAction({name:c.checked?"uncheck":"check",selector:o,ref:l,ariaSnapshot:r,signals:[]});return}}this._recorder.recordAction({name:"press",selector:o,ref:l,ariaSnapshot:r,signals:[],key:e.key,modifiers:ks(e)})}_shouldIgnoreMouseEvent(e){const n=this._recorder.deepEventTarget(e),r=n.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(n.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 n=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!n?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:n,refs:r}=this._recorder.injectedScript.ariaSnapshotForRecorder(),o=e?r.get(e):void 0,l=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:n,selector:l==null?void 0:l.selector,ref:o}}}class Nu{constructor(e,n){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=n,this._dialog=new ky(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Re(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const n=this._recorder.deepEventTarget(e);this._elementHasValue(n)&&e.preventDefault()}onPointerUp(e){var r;const n=(r=this._hoverHighlight)==null?void 0:r.elements[0];this._kind==="value"&&n&&(n.nodeName==="INPUT"||n.nodeName==="SELECT")&&n.disabled&&this._commitAssertValue()}onMouseMove(e){var r;if(this._dialog.isShowing())return;const n=this._recorder.deepEventTarget(e);if(((r=this._hoverHighlight)==null?void 0:r.elements[0])!==n){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,n).full?{elements:[n],selector:"",color:Ut.assert}:null;else if(this._elementHasValue(n)){const o=this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:o.selector,elements:o.elements,color:Ut.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Re(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 n;this._textCache.clear();const e=(n=this._hoverHighlight)==null?void 0:n.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:Ut.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:Ut.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,n,r,o;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((n=this._action)==null?void 0:n.name)==="assertText"?this._showTextDialog(this._action):((r=this._action)==null?void 0:r.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(o=this._recorder.overlay)==null||o.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const n=this._recorder.document.createElement("textarea");n.setAttribute("spellcheck","false"),n.value=this._renderValue(e),n.classList.add("text-editor");const r=()=>{var y;const u=this._recorder.injectedScript.utils.normalizeWhiteSpace(n.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=u;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=u&&p.includes(u);n.classList.toggle("does-not-match",!m)};n.addEventListener("input",r);const l=this._dialog.show({label:"Assert that element contains text",body:n,onCommit:()=>this._commit()}),c=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),l);this._dialog.moveTo(c.anchorTop,c.anchorLeft),n.focus()}_commitAssertValue(){var n;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(n=this._recorder.overlay)==null||n.flashToolSucceeded("assertingValue"))}}class Z_{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const n=this._recorder.document;this._overlayElement=n.createElement("x-pw-overlay");const r=n.createElement("x-pw-tools-list");this._overlayElement.appendChild(r),this._dragHandle=n.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(n.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(){by(this._listeners),this._listeners=[Me(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),Me(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")}),Me(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])}),Me(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),Me(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),Me(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),Me(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){this._recordToggle.classList.toggle("toggled",e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting"),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 n;e==="assertingVisibility"?n=this._assertVisibilityToggle:e==="assertingSnapshot"?n=this._assertSnapshotToggle:n=this._assertValuesToggle,n.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>n.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 n=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-n,Math.min(n,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Re(e),!0}return!1}onMouseUp(e){return this._dragState?(Re(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Re(e),!0):!1}onDblClick(e){return!1}}class eE{constructor(e,n){var r,o;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 Eg,standby:new Eg,inspecting:new Cu(this,!1),recording:(n==null?void 0:n.recorderMode)==="api"?new Y_(this):new X_(this),"recording-inspecting":new Cu(this,!1),assertingText:new Nu(this,"text"),assertingVisibility:new Cu(this,!0),assertingValue:new Nu(this,"value"),assertingSnapshot:new Nu(this,"snapshot")},this._currentTool=this._tools.none,(o=(r=this._currentTool).install)==null||o.call(r),e.window.top===e.window&&(this.overlay=new Z_(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
115
115
  body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
116
116
  body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
117
- `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var r,o,l;ky(this._listeners),this._listeners=[Me(this.document,"click",c=>this._onClick(c),!0),Me(this.document,"auxclick",c=>this._onClick(c),!0),Me(this.document,"dblclick",c=>this._onDblClick(c),!0),Me(this.document,"contextmenu",c=>this._onContextMenu(c),!0),Me(this.document,"dragstart",c=>this._onDragStart(c),!0),Me(this.document,"input",c=>this._onInput(c),!0),Me(this.document,"keydown",c=>this._onKeyDown(c),!0),Me(this.document,"keyup",c=>this._onKeyUp(c),!0),Me(this.document,"pointerdown",c=>this._onPointerDown(c),!0),Me(this.document,"pointerup",c=>this._onPointerUp(c),!0),Me(this.document,"mousedown",c=>this._onMouseDown(c),!0),Me(this.document,"mouseup",c=>this._onMouseUp(c),!0),Me(this.document,"mousemove",c=>this._onMouseMove(c),!0),Me(this.document,"mouseleave",c=>this._onMouseLeave(c),!0),Me(this.document,"mouseenter",c=>this._onMouseEnter(c),!0),Me(this.document,"focus",c=>this._onFocus(c),!0),Me(this.document,"scroll",c=>this._onScroll(c),!0)],this.highlight.install();let e;const n=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(n,500)};e=this.injectedScript.utils.builtins.setTimeout(n,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(by(this.document,Q_)),(r=this.overlay)==null||r.install(),(l=(o=this._currentTool)==null?void 0:o.install)==null||l.call(o),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,o,l,c,u,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(o=(r=this._currentTool).uninstall)==null||o.call(r),this.clearHighlight(),this._currentTool=e,(c=(l=this._currentTool).install)==null||c.call(l);const n=(u=e.cursor)==null?void 0:u.call(e);n&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",n))}setUIState(e,n){var l;this._delegate=n,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(),(l=this.overlay)==null||l.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const c=e.actionSelector?tE(this.injectedScript,e.language,e.actionSelector,this.document):null;r=c!=null&&c.length?c:"clear",this._lastHighlightedSelector=c!=null&&c.length?e.actionSelector:void 0}const o=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==o){const c=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(c.length){const u=c.length>1?Ut.multiple:Ut.single;r=c.map(d=>({element:d,color:u})),this._lastHighlightedAriaTemplateJSON=o}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 n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onClick)==null||o.call(r,e))}_onDblClick(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onDblClick)==null||o.call(r,e))}_onContextMenu(e){var n,r;e.isTrusted&&((r=(n=this._currentTool).onContextMenu)==null||r.call(n,e))}_onDragStart(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,e))}_onPointerDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,e))}_onPointerUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,e))}_onMouseDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,e))}_onMouseUp(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseUp)==null||o.call(r,e))}_onMouseMove(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseMove)==null||o.call(r,e))}_onMouseEnter(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,e))}_onMouseLeave(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,e))}_onFocus(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onFocus)==null||r.call(n,e))}_onScroll(e){var n,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(n=this._currentTool).onScroll)==null||r.call(n,e))}_onInput(e){var n,r;this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onInput)==null||r.call(n,e)}_onKeyDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyDown)==null||r.call(n,e))}_onKeyUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyUp)==null||r.call(n,e))}updateHighlight(e,n){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,n)}_updateHighlight(e,n){var o,l;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(c=>({element:c,color:e.color,tooltipText:r}))):this.highlight.clearHighlight(),n&&((l=(o=this._delegate).highlightUpdated)==null||l.call(o))}_ignoreOverlayEvent(e){return e.composedPath().some(n=>(n.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var n;for(const r of e.composedPath())if(!((n=this.overlay)!=null&&n.contains(r)))return r;return e.composedPath()[0]}setMode(e){var n,r;(r=(n=this._delegate).setMode)==null||r.call(n,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var r,o;const n=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!nE(e)&&this._lastActionAutoexpectSnapshot){const l=rE(n,this._lastActionAutoexpectSnapshot);e.preconditionSelector=l?this.injectedScript.generateSelector(l,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((o=(r=this._delegate).performAction)==null?void 0:o.call(r,e).catch(()=>{}))}recordAction(e){var n,r;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(r=(n=this._delegate).recordAction)==null||r.call(n,e)}setOverlayState(e){var n,r;(r=(n=this._delegate).setOverlayState)==null||r.call(n,e)}elementPicked(e,n){var o,l;const r=this.injectedScript.ariaSnapshot(n.elements[0],{mode:"expect"});(l=(o=this._delegate).elementPicked)==null||l.call(o,{selector:e,ariaSnapshot:r})}}let Ey=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const n=this._recorder.document.createElement("x-pw-tool-item");n.title="Accept",n.classList.add("accept"),n.appendChild(this._recorder.document.createElement("x-div")),n.addEventListener("click",()=>{var u;return(u=e.onCommit)==null?void 0:u.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 u;this.close(),(u=e.onCancel)==null||u.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=u=>{var d;if(u.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&u.key==="Enter"&&(u.ctrlKey||u.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=u=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)};const o=this._recorder.document.createElement("x-pw-tools-list"),l=this._recorder.document.createElement("label");l.textContent=e.label,o.appendChild(l),o.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&o.appendChild(n),o.appendChild(r),this._dialogElement.appendChild(o);const c=this._recorder.document.createElement("x-pw-dialog-body");return c.appendChild(e.body),this._dialogElement.appendChild(c),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,n){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=n+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function eE(t){let e=t.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function ks(t){return(t.altKey?1:0)|(t.ctrlKey?2:0)|(t.metaKey?4:0)|(t.shiftKey?8:0)}function Wu(t){switch(t.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function qi(t){if(t.target.nodeName==="CANVAS")return{x:t.offsetX,y:t.offsetY}}function Re(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}function Vi(t){if(!t||t.nodeName!=="INPUT")return null;const e=t;return["checkbox","radio"].includes(e.type)?e:null}function Wi(t){return!t||t.nodeName!=="INPUT"?!1:t.type.toLowerCase()==="range"}function Me(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function ky(t){for(const e of t)e();t.splice(0,t.length)}function tE(t,e,n,r){try{const o=t.parseSelector(n),l=t.querySelectorAll(o,r),c=l.length>1?Ut.multiple:Ut.single,u=t.utils.asLocator(e,n);return l.map((d,p)=>{const m=l.length>1?` [${p+1} of ${l.length}]`:"";return{element:d,color:c,tooltipText:u+m}})}catch{return[]}}function by(t,{tagName:e,attrs:n,children:r}){const o=t.createElementNS("http://www.w3.org/2000/svg",e);if(n)for(const[l,c]of Object.entries(n))o.setAttribute(l,c);if(r)for(const l of r)o.appendChild(by(t,l));return o}function nE(t){return t.name.startsWith("assert")}function rE(t,e){var c,u;function n(d,p,m){let y=1,v=m+y;for(const x of d.children||[])typeof x=="string"?(y++,v++):(y+=n(x,p,v),v+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let x=p.get(d.role);x||(x=new Map,p.set(d.role,x));const k=x.get(d.name),S=y*100-m;(!k||k.sizeAndPosition<S)&&x.set(d.name,{node:d,sizeAndPosition:S})}return y}const r=new Map;t&&n(t.root,r,0);const o=new Map;n(e.root,o,0);const l=[];for(const[d,p]of o)for(const[m,y]of p)((c=r.get(d))==null?void 0:c.get(m))||l.push(y);return l.sort((d,p)=>p.sizeAndPosition-d.sizeAndPosition),(u=l[0])==null?void 0:u.node.element}function sE(t,e){t=t.replace(/AriaRole\s*\.\s*([\w]+)/g,(l,c)=>c.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(l,c,u)=>`${c}(${u.toLowerCase()}`);const n=[];let r="";for(let l=0;l<t.length;++l){const c=t[l];if(c!=='"'&&c!=="'"&&c!=="`"&&c!=="/"){r+=c;continue}const u=t[l-1]==="r"||t[l]==="/";++l;let d="";for(;l<t.length;){if(t[l]==="\\"){u?(t[l+1]!==c&&(d+=t[l]),++l,d+=t[l]):(++l,t[l]==="n"?d+=`
118
- `:t[l]==="r"?d+="\r":t[l]==="t"?d+=" ":d+=t[l]),++l;continue}if(t[l]!==c){d+=t[l++];continue}break}n.push({quote:c,text:d}),r+=(c==="/"?"r":"")+"$"+n.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 o=n.map(l=>l.quote).filter(l=>"'\"`".includes(l))[0];return{selector:Ty(r,n,e),preferredQuote:o}}function Eg(t){return[...t.matchAll(/\$\d+/g)].length}function kg(t,e){return t.replace(/\$(\d+)/g,(n,r)=>`$${r-e}`)}function Ty(t,e,n){for(;;){const o=t.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!o)break;const l=o.index+o[0].length;let c=0,u=l;for(;u<t.length&&(t[u]==="("?c++:t[u]===")"&&c--,!(c<0));u++);let d=t.substring(0,l),p=0;["sethas(","sethasnot("].includes(o[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=Eg(t.substring(0,l)),y=kg(t.substring(l,u),m),v=Eg(y),x=e.slice(m,m+v),k=JSON.stringify(Ty(y,x,n));t=d.replace(/=$/,"2=")+`$${m+1}`+kg(t.substring(u+p),v-1);const S=e.slice(0,m),E=e.slice(m+v);e=S.concat([{quote:'"',text:k}]).concat(E)}t=t.replace(/\,set([\w]+)\(([^)]+)\)/g,(o,l,c)=>","+l.toLowerCase()+"="+c.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=[${n}=$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=t.split(".");for(let o=0;o<r.length-1;o++)if(r[o]==="internal:control=enter-frame"&&r[o+1].startsWith("nth=")){const[l]=r.splice(o,1);r.splice(o+1,0,l)}return r.map(o=>!o.startsWith("internal:")||o==="internal:control"?o.replace(/\$(\d+)/g,(l,c)=>e[+c-1].text):(o=o.includes("[")?o.replace(/\]/,"")+"]":o,o=o.replace(/(?:r)\$(\d+)(i)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:attr")||o.startsWith("internal:testid")||o.startsWith("internal:role")?ht(new RegExp(d.text),!1)+(u||""):kt(new RegExp(d.text,u),!1)}).replace(/\$(\d+)(i|s)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:has=")||o.startsWith("internal:has-not=")?d.text:o.startsWith("internal:testid")?ht(d.text,!0):o.startsWith("internal:attr")||o.startsWith("internal:role")?ht(d.text,u==="s"):kt(d.text,u==="s")}),o)).join(" >> ")}function iE(t,e,n){try{return oE(t,e,n)}catch{return""}}function oE(t,e,n){try{return to(e),e}catch{}const{selector:r,preferredQuote:o}=sE(e,n),l=pm(t,r,void 0,void 0,o),c=bg(t,e);return l.some(u=>bg(t,u)===c)?r:""}function bg(t,e){return e=e.replace(/\s/g,""),t==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const lE=({url:t})=>w.jsxs("div",{className:"browser-frame-header",children:[w.jsxs("div",{className:"browser-traffic-lights",children:[w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),w.jsxs("div",{className:"browser-frame-address-bar",title:t||"about:blank",children:[t||"about:blank",t&&w.jsx(lf,{value:t})]}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsxs("div",{children:[w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),jf=Symbol.for("yaml.alias"),Ku=Symbol.for("yaml.document"),Zn=Symbol.for("yaml.map"),Cy=Symbol.for("yaml.pair"),dn=Symbol.for("yaml.scalar"),Ps=Symbol.for("yaml.seq"),qt=Symbol.for("yaml.node.type"),Rr=t=>!!t&&typeof t=="object"&&t[qt]===jf,$r=t=>!!t&&typeof t=="object"&&t[qt]===Ku,Os=t=>!!t&&typeof t=="object"&&t[qt]===Zn,je=t=>!!t&&typeof t=="object"&&t[qt]===Cy,Te=t=>!!t&&typeof t=="object"&&t[qt]===dn,Rs=t=>!!t&&typeof t=="object"&&t[qt]===Ps;function $e(t){if(t&&typeof t=="object")switch(t[qt]){case Zn:case Ps:return!0}return!1}function De(t){if(t&&typeof t=="object")switch(t[qt]){case jf:case Zn:case dn:case Ps:return!0}return!1}const aE=t=>(Te(t)||$e(t))&&!!t.anchor,bt=Symbol("break visit"),Ny=Symbol("skip children"),fn=Symbol("remove node");function er(t,e){const n=Ay(e);$r(t)?Ss(null,t.contents,n,Object.freeze([t]))===fn&&(t.contents=null):Ss(null,t,n,Object.freeze([]))}er.BREAK=bt;er.SKIP=Ny;er.REMOVE=fn;function Ss(t,e,n,r){const o=Ly(t,e,n,r);if(De(o)||je(o))return Iy(t,r,o),Ss(t,o,n,r);if(typeof o!="symbol"){if($e(e)){r=Object.freeze(r.concat(e));for(let l=0;l<e.items.length;++l){const c=Ss(l,e.items[l],n,r);if(typeof c=="number")l=c-1;else{if(c===bt)return bt;c===fn&&(e.items.splice(l,1),l-=1)}}}else if(je(e)){r=Object.freeze(r.concat(e));const l=Ss("key",e.key,n,r);if(l===bt)return bt;l===fn&&(e.key=null);const c=Ss("value",e.value,n,r);if(c===bt)return bt;c===fn&&(e.value=null)}}return o}async function fa(t,e){const n=Ay(e);$r(t)?await xs(null,t.contents,n,Object.freeze([t]))===fn&&(t.contents=null):await xs(null,t,n,Object.freeze([]))}fa.BREAK=bt;fa.SKIP=Ny;fa.REMOVE=fn;async function xs(t,e,n,r){const o=await Ly(t,e,n,r);if(De(o)||je(o))return Iy(t,r,o),xs(t,o,n,r);if(typeof o!="symbol"){if($e(e)){r=Object.freeze(r.concat(e));for(let l=0;l<e.items.length;++l){const c=await xs(l,e.items[l],n,r);if(typeof c=="number")l=c-1;else{if(c===bt)return bt;c===fn&&(e.items.splice(l,1),l-=1)}}}else if(je(e)){r=Object.freeze(r.concat(e));const l=await xs("key",e.key,n,r);if(l===bt)return bt;l===fn&&(e.key=null);const c=await xs("value",e.value,n,r);if(c===bt)return bt;c===fn&&(e.value=null)}}return o}function Ay(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Ly(t,e,n,r){var o,l,c,u,d;if(typeof n=="function")return n(t,e,r);if(Os(e))return(o=n.Map)==null?void 0:o.call(n,t,e,r);if(Rs(e))return(l=n.Seq)==null?void 0:l.call(n,t,e,r);if(je(e))return(c=n.Pair)==null?void 0:c.call(n,t,e,r);if(Te(e))return(u=n.Scalar)==null?void 0:u.call(n,t,e,r);if(Rr(e))return(d=n.Alias)==null?void 0:d.call(n,t,e,r)}function Iy(t,e,n){const r=e[e.length-1];if($e(r))r.items[t]=n;else if(je(r))t==="key"?r.key=n:r.value=n;else if($r(r))r.contents=n;else{const o=Rr(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const cE={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},uE=t=>t.replace(/[!,[\]{}]/g,e=>cE[e]);class dt{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},dt.defaultYaml,e),this.tags=Object.assign({},dt.defaultTags,n)}clone(){const e=new dt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new dt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:dt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},dt.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:dt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},dt.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),o=r.shift();switch(o){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[l,c]=r;return this.tags[l]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[l]=r;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const c=/^\d+\.\d+$/.test(l);return n(6,`Unsupported YAML version ${l}`,c),!1}}default:return n(0,`Unknown directive ${o}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const c=e.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,r,o]=e.match(/^(.*!)([^!]*)$/s);o||n(`The ${e} tag has no suffix`);const l=this.tags[r];if(l)try{return l+decodeURIComponent(o)}catch(c){return n(String(c)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+uE(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let o;if(e&&r.length>0&&De(e.contents)){const l={};er(e.contents,(c,u)=>{De(u)&&u.tag&&(l[u.tag]=!0)}),o=Object.keys(l)}else o=[];for(const[l,c]of r)l==="!!"&&c==="tag:yaml.org,2002:"||(!e||o.some(u=>u.startsWith(c)))&&n.push(`%TAG ${l} ${c}`);return n.join(`
119
- `)}}dt.defaultYaml={explicit:!1,version:"1.2"};dt.defaultTags={"!!":"tag:yaml.org,2002:"};function My(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function jy(t){const e=new Set;return er(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Py(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function fE(t,e){const n=[],r=new Map;let o=null;return{onAnchor:l=>{n.push(l),o||(o=jy(t));const c=Py(e,o);return o.add(c),c},setAnchors:()=>{for(const l of n){const c=r.get(l);if(typeof c=="object"&&c.anchor&&(Te(c.node)||$e(c.node)))c.node.anchor=c.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=l,u}}},sourceObjects:r}}function _s(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let o=0,l=r.length;o<l;++o){const c=r[o],u=_s(t,r,String(o),c);u===void 0?delete r[o]:u!==c&&(r[o]=u)}else if(r instanceof Map)for(const o of Array.from(r.keys())){const l=r.get(o),c=_s(t,r,o,l);c===void 0?r.delete(o):c!==l&&r.set(o,c)}else if(r instanceof Set)for(const o of Array.from(r)){const l=_s(t,r,o,o);l===void 0?r.delete(o):l!==o&&(r.delete(o),r.add(l))}else for(const[o,l]of Object.entries(r)){const c=_s(t,r,o,l);c===void 0?delete r[o]:c!==l&&(r[o]=c)}return t.call(e,n,r)}function Ht(t,e,n){if(Array.isArray(t))return t.map((r,o)=>Ht(r,String(o),n));if(t&&typeof t.toJSON=="function"){if(!n||!aE(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=l=>{r.res=l,delete n.onCreate};const o=t.toJSON(e,n);return n.onCreate&&n.onCreate(o),o}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class Pf{constructor(e){Object.defineProperty(this,qt,{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:n,maxAliasCount:r,onAnchor:o,reviver:l}={}){if(!$r(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Ht(this,"",c);if(typeof o=="function")for(const{count:d,res:p}of c.anchors.values())o(p,d);return typeof l=="function"?_s(l,{"":u},"",u):u}}class da extends Pf{constructor(e){super(jf),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return er(e,{Node:(r,o)=>{if(o===this)return er.BREAK;o.anchor===this.source&&(n=o)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:o,maxAliasCount:l}=n,c=this.resolve(o);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let u=r.get(c);if(u||(Ht(c,null,n),u=r.get(c)),!u||u.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(l>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Dl(o,c,r)),u.count*u.aliasCount>l)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return u.res}toString(e,n,r){const o=`*${this.source}`;if(e){if(My(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(e.implicitKey)return`${o} `}return o}}function Dl(t,e,n){if(Rr(e)){const r=e.resolve(t),o=n&&r&&n.get(r);return o?o.count*o.aliasCount:0}else if($e(e)){let r=0;for(const o of e.items){const l=Dl(t,o,n);l>r&&(r=l)}return r}else if(je(e)){const r=Dl(t,e.key,n),o=Dl(t,e.value,n);return Math.max(r,o)}return 1}const Oy=t=>!t||typeof t!="function"&&typeof t!="object";class ue extends Pf{constructor(e){super(dn),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:Ht(this.value,e,n)}toString(){return String(this.value)}}ue.BLOCK_FOLDED="BLOCK_FOLDED";ue.BLOCK_LITERAL="BLOCK_LITERAL";ue.PLAIN="PLAIN";ue.QUOTE_DOUBLE="QUOTE_DOUBLE";ue.QUOTE_SINGLE="QUOTE_SINGLE";const dE="tag:yaml.org,2002:";function hE(t,e,n){if(e){const r=n.filter(l=>l.tag===e),o=r.find(l=>!l.format)??r[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return n.find(r=>{var o;return((o=r.identify)==null?void 0:o.call(r,t))&&!r.format})}function Xi(t,e,n){var y,v,x;if($r(t)&&(t=t.contents),De(t))return t;if(je(t)){const k=(v=(y=n.schema[Zn]).createNode)==null?void 0:v.call(y,n.schema,null,n);return k.items.push(t),k}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:o,onTagObj:l,schema:c,sourceObjects:u}=n;let d;if(r&&t&&typeof t=="object"){if(d=u.get(t),d)return d.anchor||(d.anchor=o(t)),new da(d.anchor);d={anchor:null,node:null},u.set(t,d)}e!=null&&e.startsWith("!!")&&(e=dE+e.slice(2));let p=hE(t,e,c.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const k=new ue(t);return d&&(d.node=k),k}p=t instanceof Map?c[Zn]:Symbol.iterator in Object(t)?c[Ps]:c[Zn]}l&&(l(p),delete n.onTagObj);const m=p!=null&&p.createNode?p.createNode(n.schema,t,n):typeof((x=p==null?void 0:p.nodeClass)==null?void 0:x.from)=="function"?p.nodeClass.from(n.schema,t,n):new ue(t);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function ea(t,e,n){let r=n;for(let o=e.length-1;o>=0;--o){const l=e[o];if(typeof l=="number"&&Number.isInteger(l)&&l>=0){const c=[];c[l]=r,r=c}else r=new Map([[l,r]])}return Xi(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Bi=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class Ry extends Pf{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>De(r)||je(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Bi(e))this.add(n);else{const[r,...o]=e,l=this.get(r,!0);if($e(l))l.addIn(o,n);else if(l===void 0&&this.schema)this.set(r,ea(this.schema,o,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const o=this.get(n,!0);if($e(o))return o.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...o]=e,l=this.get(r,!0);return o.length===0?!n&&Te(l)?l.value:l:$e(l)?l.getIn(o,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!je(n))return!1;const r=n.value;return r==null||e&&Te(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const o=this.get(n,!0);return $e(o)?o.hasIn(r):!1}setIn(e,n){const[r,...o]=e;if(o.length===0)this.set(r,n);else{const l=this.get(r,!0);if($e(l))l.setIn(o,n);else if(l===void 0&&this.schema)this.set(r,ea(this.schema,o,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}}const pE=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Cn(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Nr=(t,e,n)=>t.endsWith(`
117
+ `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var r,o,l;by(this._listeners),this._listeners=[Me(this.document,"click",c=>this._onClick(c),!0),Me(this.document,"auxclick",c=>this._onClick(c),!0),Me(this.document,"dblclick",c=>this._onDblClick(c),!0),Me(this.document,"contextmenu",c=>this._onContextMenu(c),!0),Me(this.document,"dragstart",c=>this._onDragStart(c),!0),Me(this.document,"input",c=>this._onInput(c),!0),Me(this.document,"keydown",c=>this._onKeyDown(c),!0),Me(this.document,"keyup",c=>this._onKeyUp(c),!0),Me(this.document,"pointerdown",c=>this._onPointerDown(c),!0),Me(this.document,"pointerup",c=>this._onPointerUp(c),!0),Me(this.document,"mousedown",c=>this._onMouseDown(c),!0),Me(this.document,"mouseup",c=>this._onMouseUp(c),!0),Me(this.document,"mousemove",c=>this._onMouseMove(c),!0),Me(this.document,"mouseleave",c=>this._onMouseLeave(c),!0),Me(this.document,"mouseenter",c=>this._onMouseEnter(c),!0),Me(this.document,"focus",c=>this._onFocus(c),!0),Me(this.document,"scroll",c=>this._onScroll(c),!0)],this.highlight.install();let e;const n=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(n,500)};e=this.injectedScript.utils.builtins.setTimeout(n,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(Ty(this.document,J_)),(r=this.overlay)==null||r.install(),(l=(o=this._currentTool)==null?void 0:o.install)==null||l.call(o),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,o,l,c,u,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(o=(r=this._currentTool).uninstall)==null||o.call(r),this.clearHighlight(),this._currentTool=e,(c=(l=this._currentTool).install)==null||c.call(l);const n=(u=e.cursor)==null?void 0:u.call(e);n&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",n))}setUIState(e,n){var l;this._delegate=n,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(),(l=this.overlay)==null||l.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const c=e.actionSelector?nE(this.injectedScript,e.language,e.actionSelector,this.document):null;r=c!=null&&c.length?c:"clear",this._lastHighlightedSelector=c!=null&&c.length?e.actionSelector:void 0}const o=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==o){const c=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(c.length){const u=c.length>1?Ut.multiple:Ut.single;r=c.map(d=>({element:d,color:u})),this._lastHighlightedAriaTemplateJSON=o}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 n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onClick)==null||o.call(r,e))}_onDblClick(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onDblClick)==null||o.call(r,e))}_onContextMenu(e){var n,r;e.isTrusted&&((r=(n=this._currentTool).onContextMenu)==null||r.call(n,e))}_onDragStart(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,e))}_onPointerDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,e))}_onPointerUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,e))}_onMouseDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,e))}_onMouseUp(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseUp)==null||o.call(r,e))}_onMouseMove(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseMove)==null||o.call(r,e))}_onMouseEnter(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,e))}_onMouseLeave(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,e))}_onFocus(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onFocus)==null||r.call(n,e))}_onScroll(e){var n,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(n=this._currentTool).onScroll)==null||r.call(n,e))}_onInput(e){var n,r;this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onInput)==null||r.call(n,e)}_onKeyDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyDown)==null||r.call(n,e))}_onKeyUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyUp)==null||r.call(n,e))}updateHighlight(e,n){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,n)}_updateHighlight(e,n){var o,l;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(c=>({element:c,color:e.color,tooltipText:r}))):this.highlight.clearHighlight(),n&&((l=(o=this._delegate).highlightUpdated)==null||l.call(o))}_ignoreOverlayEvent(e){return e.composedPath().some(n=>(n.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var n;for(const r of e.composedPath())if(!((n=this.overlay)!=null&&n.contains(r)))return r;return e.composedPath()[0]}setMode(e){var n,r;(r=(n=this._delegate).setMode)==null||r.call(n,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var r,o;const n=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!rE(e)&&this._lastActionAutoexpectSnapshot){const l=sE(n,this._lastActionAutoexpectSnapshot);e.preconditionSelector=l?this.injectedScript.generateSelector(l,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((o=(r=this._delegate).performAction)==null?void 0:o.call(r,e).catch(()=>{}))}recordAction(e){var n,r;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(r=(n=this._delegate).recordAction)==null||r.call(n,e)}setOverlayState(e){var n,r;(r=(n=this._delegate).setOverlayState)==null||r.call(n,e)}elementPicked(e,n){var o,l;const r=this.injectedScript.ariaSnapshot(n.elements[0],{mode:"expect"});(l=(o=this._delegate).elementPicked)==null||l.call(o,{selector:e,ariaSnapshot:r})}}let ky=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const n=this._recorder.document.createElement("x-pw-tool-item");n.title="Accept",n.classList.add("accept"),n.appendChild(this._recorder.document.createElement("x-div")),n.addEventListener("click",()=>{var u;return(u=e.onCommit)==null?void 0:u.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 u;this.close(),(u=e.onCancel)==null||u.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=u=>{var d;if(u.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&u.key==="Enter"&&(u.ctrlKey||u.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=u=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)};const o=this._recorder.document.createElement("x-pw-tools-list"),l=this._recorder.document.createElement("label");l.textContent=e.label,o.appendChild(l),o.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&o.appendChild(n),o.appendChild(r),this._dialogElement.appendChild(o);const c=this._recorder.document.createElement("x-pw-dialog-body");return c.appendChild(e.body),this._dialogElement.appendChild(c),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,n){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=n+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function tE(t){let e=t.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function ks(t){return(t.altKey?1:0)|(t.ctrlKey?2:0)|(t.metaKey?4:0)|(t.shiftKey?8:0)}function Ku(t){switch(t.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function qi(t){if(t.target.nodeName==="CANVAS")return{x:t.offsetX,y:t.offsetY}}function Re(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}function Vi(t){if(!t||t.nodeName!=="INPUT")return null;const e=t;return["checkbox","radio"].includes(e.type)?e:null}function Wi(t){return!t||t.nodeName!=="INPUT"?!1:t.type.toLowerCase()==="range"}function Me(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function by(t){for(const e of t)e();t.splice(0,t.length)}function nE(t,e,n,r){try{const o=t.parseSelector(n),l=t.querySelectorAll(o,r),c=l.length>1?Ut.multiple:Ut.single,u=t.utils.asLocator(e,n);return l.map((d,p)=>{const m=l.length>1?` [${p+1} of ${l.length}]`:"";return{element:d,color:c,tooltipText:u+m}})}catch{return[]}}function Ty(t,{tagName:e,attrs:n,children:r}){const o=t.createElementNS("http://www.w3.org/2000/svg",e);if(n)for(const[l,c]of Object.entries(n))o.setAttribute(l,c);if(r)for(const l of r)o.appendChild(Ty(t,l));return o}function rE(t){return t.name.startsWith("assert")}function sE(t,e){var c,u;function n(d,p,m){let y=1,v=m+y;for(const x of d.children||[])typeof x=="string"?(y++,v++):(y+=n(x,p,v),v+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let x=p.get(d.role);x||(x=new Map,p.set(d.role,x));const k=x.get(d.name),S=y*100-m;(!k||k.sizeAndPosition<S)&&x.set(d.name,{node:d,sizeAndPosition:S})}return y}const r=new Map;t&&n(t.root,r,0);const o=new Map;n(e.root,o,0);const l=[];for(const[d,p]of o)for(const[m,y]of p)((c=r.get(d))==null?void 0:c.get(m))||l.push(y);return l.sort((d,p)=>p.sizeAndPosition-d.sizeAndPosition),(u=l[0])==null?void 0:u.node.element}function iE(t,e){t=t.replace(/AriaRole\s*\.\s*([\w]+)/g,(l,c)=>c.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(l,c,u)=>`${c}(${u.toLowerCase()}`);const n=[];let r="";for(let l=0;l<t.length;++l){const c=t[l];if(c!=='"'&&c!=="'"&&c!=="`"&&c!=="/"){r+=c;continue}const u=t[l-1]==="r"||t[l]==="/";++l;let d="";for(;l<t.length;){if(t[l]==="\\"){u?(t[l+1]!==c&&(d+=t[l]),++l,d+=t[l]):(++l,t[l]==="n"?d+=`
118
+ `:t[l]==="r"?d+="\r":t[l]==="t"?d+=" ":d+=t[l]),++l;continue}if(t[l]!==c){d+=t[l++];continue}break}n.push({quote:c,text:d}),r+=(c==="/"?"r":"")+"$"+n.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 o=n.map(l=>l.quote).filter(l=>"'\"`".includes(l))[0];return{selector:Cy(r,n,e),preferredQuote:o}}function kg(t){return[...t.matchAll(/\$\d+/g)].length}function bg(t,e){return t.replace(/\$(\d+)/g,(n,r)=>`$${r-e}`)}function Cy(t,e,n){for(;;){const o=t.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!o)break;const l=o.index+o[0].length;let c=0,u=l;for(;u<t.length&&(t[u]==="("?c++:t[u]===")"&&c--,!(c<0));u++);let d=t.substring(0,l),p=0;["sethas(","sethasnot("].includes(o[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=kg(t.substring(0,l)),y=bg(t.substring(l,u),m),v=kg(y),x=e.slice(m,m+v),k=JSON.stringify(Cy(y,x,n));t=d.replace(/=$/,"2=")+`$${m+1}`+bg(t.substring(u+p),v-1);const S=e.slice(0,m),E=e.slice(m+v);e=S.concat([{quote:'"',text:k}]).concat(E)}t=t.replace(/\,set([\w]+)\(([^)]+)\)/g,(o,l,c)=>","+l.toLowerCase()+"="+c.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=[${n}=$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=t.split(".");for(let o=0;o<r.length-1;o++)if(r[o]==="internal:control=enter-frame"&&r[o+1].startsWith("nth=")){const[l]=r.splice(o,1);r.splice(o+1,0,l)}return r.map(o=>!o.startsWith("internal:")||o==="internal:control"?o.replace(/\$(\d+)/g,(l,c)=>e[+c-1].text):(o=o.includes("[")?o.replace(/\]/,"")+"]":o,o=o.replace(/(?:r)\$(\d+)(i)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:attr")||o.startsWith("internal:testid")||o.startsWith("internal:role")?ht(new RegExp(d.text),!1)+(u||""):kt(new RegExp(d.text,u),!1)}).replace(/\$(\d+)(i|s)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:has=")||o.startsWith("internal:has-not=")?d.text:o.startsWith("internal:testid")?ht(d.text,!0):o.startsWith("internal:attr")||o.startsWith("internal:role")?ht(d.text,u==="s"):kt(d.text,u==="s")}),o)).join(" >> ")}function oE(t,e,n){try{return lE(t,e,n)}catch{return""}}function lE(t,e,n){try{return to(e),e}catch{}const{selector:r,preferredQuote:o}=iE(e,n),l=gm(t,r,void 0,void 0,o),c=Tg(t,e);return l.some(u=>Tg(t,u)===c)?r:""}function Tg(t,e){return e=e.replace(/\s/g,""),t==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const aE=({url:t})=>w.jsxs("div",{className:"browser-frame-header",children:[w.jsxs("div",{className:"browser-traffic-lights",children:[w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),w.jsxs("div",{className:"browser-frame-address-bar",title:t||"about:blank",children:[t||"about:blank",t&&w.jsx(af,{value:t})]}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsxs("div",{children:[w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),jf=Symbol.for("yaml.alias"),Gu=Symbol.for("yaml.document"),Zn=Symbol.for("yaml.map"),Ny=Symbol.for("yaml.pair"),dn=Symbol.for("yaml.scalar"),Ps=Symbol.for("yaml.seq"),qt=Symbol.for("yaml.node.type"),Rr=t=>!!t&&typeof t=="object"&&t[qt]===jf,$r=t=>!!t&&typeof t=="object"&&t[qt]===Gu,Os=t=>!!t&&typeof t=="object"&&t[qt]===Zn,je=t=>!!t&&typeof t=="object"&&t[qt]===Ny,Te=t=>!!t&&typeof t=="object"&&t[qt]===dn,Rs=t=>!!t&&typeof t=="object"&&t[qt]===Ps;function $e(t){if(t&&typeof t=="object")switch(t[qt]){case Zn:case Ps:return!0}return!1}function De(t){if(t&&typeof t=="object")switch(t[qt]){case jf:case Zn:case dn:case Ps:return!0}return!1}const cE=t=>(Te(t)||$e(t))&&!!t.anchor,bt=Symbol("break visit"),Ay=Symbol("skip children"),fn=Symbol("remove node");function er(t,e){const n=Ly(e);$r(t)?Ss(null,t.contents,n,Object.freeze([t]))===fn&&(t.contents=null):Ss(null,t,n,Object.freeze([]))}er.BREAK=bt;er.SKIP=Ay;er.REMOVE=fn;function Ss(t,e,n,r){const o=Iy(t,e,n,r);if(De(o)||je(o))return My(t,r,o),Ss(t,o,n,r);if(typeof o!="symbol"){if($e(e)){r=Object.freeze(r.concat(e));for(let l=0;l<e.items.length;++l){const c=Ss(l,e.items[l],n,r);if(typeof c=="number")l=c-1;else{if(c===bt)return bt;c===fn&&(e.items.splice(l,1),l-=1)}}}else if(je(e)){r=Object.freeze(r.concat(e));const l=Ss("key",e.key,n,r);if(l===bt)return bt;l===fn&&(e.key=null);const c=Ss("value",e.value,n,r);if(c===bt)return bt;c===fn&&(e.value=null)}}return o}async function fa(t,e){const n=Ly(e);$r(t)?await xs(null,t.contents,n,Object.freeze([t]))===fn&&(t.contents=null):await xs(null,t,n,Object.freeze([]))}fa.BREAK=bt;fa.SKIP=Ay;fa.REMOVE=fn;async function xs(t,e,n,r){const o=await Iy(t,e,n,r);if(De(o)||je(o))return My(t,r,o),xs(t,o,n,r);if(typeof o!="symbol"){if($e(e)){r=Object.freeze(r.concat(e));for(let l=0;l<e.items.length;++l){const c=await xs(l,e.items[l],n,r);if(typeof c=="number")l=c-1;else{if(c===bt)return bt;c===fn&&(e.items.splice(l,1),l-=1)}}}else if(je(e)){r=Object.freeze(r.concat(e));const l=await xs("key",e.key,n,r);if(l===bt)return bt;l===fn&&(e.key=null);const c=await xs("value",e.value,n,r);if(c===bt)return bt;c===fn&&(e.value=null)}}return o}function Ly(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Iy(t,e,n,r){var o,l,c,u,d;if(typeof n=="function")return n(t,e,r);if(Os(e))return(o=n.Map)==null?void 0:o.call(n,t,e,r);if(Rs(e))return(l=n.Seq)==null?void 0:l.call(n,t,e,r);if(je(e))return(c=n.Pair)==null?void 0:c.call(n,t,e,r);if(Te(e))return(u=n.Scalar)==null?void 0:u.call(n,t,e,r);if(Rr(e))return(d=n.Alias)==null?void 0:d.call(n,t,e,r)}function My(t,e,n){const r=e[e.length-1];if($e(r))r.items[t]=n;else if(je(r))t==="key"?r.key=n:r.value=n;else if($r(r))r.contents=n;else{const o=Rr(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const uE={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},fE=t=>t.replace(/[!,[\]{}]/g,e=>uE[e]);class dt{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},dt.defaultYaml,e),this.tags=Object.assign({},dt.defaultTags,n)}clone(){const e=new dt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new dt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:dt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},dt.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:dt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},dt.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),o=r.shift();switch(o){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[l,c]=r;return this.tags[l]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[l]=r;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const c=/^\d+\.\d+$/.test(l);return n(6,`Unsupported YAML version ${l}`,c),!1}}default:return n(0,`Unknown directive ${o}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const c=e.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,r,o]=e.match(/^(.*!)([^!]*)$/s);o||n(`The ${e} tag has no suffix`);const l=this.tags[r];if(l)try{return l+decodeURIComponent(o)}catch(c){return n(String(c)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+fE(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let o;if(e&&r.length>0&&De(e.contents)){const l={};er(e.contents,(c,u)=>{De(u)&&u.tag&&(l[u.tag]=!0)}),o=Object.keys(l)}else o=[];for(const[l,c]of r)l==="!!"&&c==="tag:yaml.org,2002:"||(!e||o.some(u=>u.startsWith(c)))&&n.push(`%TAG ${l} ${c}`);return n.join(`
119
+ `)}}dt.defaultYaml={explicit:!1,version:"1.2"};dt.defaultTags={"!!":"tag:yaml.org,2002:"};function jy(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Py(t){const e=new Set;return er(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Oy(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function dE(t,e){const n=[],r=new Map;let o=null;return{onAnchor:l=>{n.push(l),o||(o=Py(t));const c=Oy(e,o);return o.add(c),c},setAnchors:()=>{for(const l of n){const c=r.get(l);if(typeof c=="object"&&c.anchor&&(Te(c.node)||$e(c.node)))c.node.anchor=c.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=l,u}}},sourceObjects:r}}function _s(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let o=0,l=r.length;o<l;++o){const c=r[o],u=_s(t,r,String(o),c);u===void 0?delete r[o]:u!==c&&(r[o]=u)}else if(r instanceof Map)for(const o of Array.from(r.keys())){const l=r.get(o),c=_s(t,r,o,l);c===void 0?r.delete(o):c!==l&&r.set(o,c)}else if(r instanceof Set)for(const o of Array.from(r)){const l=_s(t,r,o,o);l===void 0?r.delete(o):l!==o&&(r.delete(o),r.add(l))}else for(const[o,l]of Object.entries(r)){const c=_s(t,r,o,l);c===void 0?delete r[o]:c!==l&&(r[o]=c)}return t.call(e,n,r)}function Ht(t,e,n){if(Array.isArray(t))return t.map((r,o)=>Ht(r,String(o),n));if(t&&typeof t.toJSON=="function"){if(!n||!cE(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=l=>{r.res=l,delete n.onCreate};const o=t.toJSON(e,n);return n.onCreate&&n.onCreate(o),o}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class Pf{constructor(e){Object.defineProperty(this,qt,{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:n,maxAliasCount:r,onAnchor:o,reviver:l}={}){if(!$r(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Ht(this,"",c);if(typeof o=="function")for(const{count:d,res:p}of c.anchors.values())o(p,d);return typeof l=="function"?_s(l,{"":u},"",u):u}}class da extends Pf{constructor(e){super(jf),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return er(e,{Node:(r,o)=>{if(o===this)return er.BREAK;o.anchor===this.source&&(n=o)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:o,maxAliasCount:l}=n,c=this.resolve(o);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let u=r.get(c);if(u||(Ht(c,null,n),u=r.get(c)),!u||u.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(l>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Dl(o,c,r)),u.count*u.aliasCount>l)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return u.res}toString(e,n,r){const o=`*${this.source}`;if(e){if(jy(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(e.implicitKey)return`${o} `}return o}}function Dl(t,e,n){if(Rr(e)){const r=e.resolve(t),o=n&&r&&n.get(r);return o?o.count*o.aliasCount:0}else if($e(e)){let r=0;for(const o of e.items){const l=Dl(t,o,n);l>r&&(r=l)}return r}else if(je(e)){const r=Dl(t,e.key,n),o=Dl(t,e.value,n);return Math.max(r,o)}return 1}const Ry=t=>!t||typeof t!="function"&&typeof t!="object";class ue extends Pf{constructor(e){super(dn),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:Ht(this.value,e,n)}toString(){return String(this.value)}}ue.BLOCK_FOLDED="BLOCK_FOLDED";ue.BLOCK_LITERAL="BLOCK_LITERAL";ue.PLAIN="PLAIN";ue.QUOTE_DOUBLE="QUOTE_DOUBLE";ue.QUOTE_SINGLE="QUOTE_SINGLE";const hE="tag:yaml.org,2002:";function pE(t,e,n){if(e){const r=n.filter(l=>l.tag===e),o=r.find(l=>!l.format)??r[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return n.find(r=>{var o;return((o=r.identify)==null?void 0:o.call(r,t))&&!r.format})}function Xi(t,e,n){var y,v,x;if($r(t)&&(t=t.contents),De(t))return t;if(je(t)){const k=(v=(y=n.schema[Zn]).createNode)==null?void 0:v.call(y,n.schema,null,n);return k.items.push(t),k}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:o,onTagObj:l,schema:c,sourceObjects:u}=n;let d;if(r&&t&&typeof t=="object"){if(d=u.get(t),d)return d.anchor||(d.anchor=o(t)),new da(d.anchor);d={anchor:null,node:null},u.set(t,d)}e!=null&&e.startsWith("!!")&&(e=hE+e.slice(2));let p=pE(t,e,c.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const k=new ue(t);return d&&(d.node=k),k}p=t instanceof Map?c[Zn]:Symbol.iterator in Object(t)?c[Ps]:c[Zn]}l&&(l(p),delete n.onTagObj);const m=p!=null&&p.createNode?p.createNode(n.schema,t,n):typeof((x=p==null?void 0:p.nodeClass)==null?void 0:x.from)=="function"?p.nodeClass.from(n.schema,t,n):new ue(t);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function ea(t,e,n){let r=n;for(let o=e.length-1;o>=0;--o){const l=e[o];if(typeof l=="number"&&Number.isInteger(l)&&l>=0){const c=[];c[l]=r,r=c}else r=new Map([[l,r]])}return Xi(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Bi=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class $y extends Pf{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>De(r)||je(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Bi(e))this.add(n);else{const[r,...o]=e,l=this.get(r,!0);if($e(l))l.addIn(o,n);else if(l===void 0&&this.schema)this.set(r,ea(this.schema,o,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const o=this.get(n,!0);if($e(o))return o.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...o]=e,l=this.get(r,!0);return o.length===0?!n&&Te(l)?l.value:l:$e(l)?l.getIn(o,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!je(n))return!1;const r=n.value;return r==null||e&&Te(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const o=this.get(n,!0);return $e(o)?o.hasIn(r):!1}setIn(e,n){const[r,...o]=e;if(o.length===0)this.set(r,n);else{const l=this.get(r,!0);if($e(l))l.setIn(o,n);else if(l===void 0&&this.schema)this.set(r,ea(this.schema,o,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}}const gE=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Cn(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Nr=(t,e,n)=>t.endsWith(`
120
120
  `)?Cn(n,e):n.includes(`
121
121
  `)?`
122
- `+Cn(n,e):(t.endsWith(" ")?"":" ")+n,$y="flow",Gu="block",Bl="quoted";function ha(t,e,n="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){if(!o||o<0)return t;o<l&&(l=0);const d=Math.max(1+l,1+o-e.length);if(t.length<=d)return t;const p=[],m={};let y=o-e.length;typeof r=="number"&&(r>o-Math.max(2,l)?p.push(0):y=o-r);let v,x,k=!1,S=-1,E=-1,N=-1;n===Gu&&(S=Tg(t,S,e.length),S!==-1&&(y=S+d));for(let F;F=t[S+=1];){if(n===Bl&&F==="\\"){switch(E=S,t[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}N=S}if(F===`
123
- `)n===Gu&&(S=Tg(t,S,e.length)),y=S+e.length+d,v=void 0;else{if(F===" "&&x&&x!==" "&&x!==`
122
+ `+Cn(n,e):(t.endsWith(" ")?"":" ")+n,Dy="flow",Qu="block",Bl="quoted";function ha(t,e,n="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){if(!o||o<0)return t;o<l&&(l=0);const d=Math.max(1+l,1+o-e.length);if(t.length<=d)return t;const p=[],m={};let y=o-e.length;typeof r=="number"&&(r>o-Math.max(2,l)?p.push(0):y=o-r);let v,x,k=!1,S=-1,E=-1,N=-1;n===Qu&&(S=Cg(t,S,e.length),S!==-1&&(y=S+d));for(let F;F=t[S+=1];){if(n===Bl&&F==="\\"){switch(E=S,t[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}N=S}if(F===`
123
+ `)n===Qu&&(S=Cg(t,S,e.length)),y=S+e.length+d,v=void 0;else{if(F===" "&&x&&x!==" "&&x!==`
124
124
  `&&x!==" "){const O=t[S+1];O&&O!==" "&&O!==`
125
125
  `&&O!==" "&&(v=S)}if(S>=y)if(v)p.push(v),y=v+d,v=void 0;else if(n===Bl){for(;x===" "||x===" ";)x=F,F=t[S+=1],k=!0;const O=S>N+1?S-2:E-1;if(m[O])return t;p.push(O),m[O]=!0,y=O+d,v=void 0}else k=!0}x=F}if(k&&u&&u(),p.length===0)return t;c&&c();let T=t.slice(0,p[0]);for(let F=0;F<p.length;++F){const O=p[F],D=p[F+1]||t.length;O===0?T=`
126
126
  ${e}${t.slice(0,D)}`:(n===Bl&&m[O]&&(T+=`${t[O]}\\`),T+=`
127
- ${e}${t.slice(O+1,D)}`)}return T}function Tg(t,e,n){let r=e,o=e+1,l=t[o];for(;l===" "||l===" ";)if(e<o+n)l=t[++e];else{do l=t[++e];while(l&&l!==`
128
- `);r=e,o=e+1,l=t[o]}return r}const pa=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),ga=t=>/^(%|---|\.\.\.)/m.test(t);function gE(t,e,n){if(!e||e<0)return!1;const r=e-n,o=t.length;if(o<=r)return!1;for(let l=0,c=0;l<o;++l)if(t[l]===`
127
+ ${e}${t.slice(O+1,D)}`)}return T}function Cg(t,e,n){let r=e,o=e+1,l=t[o];for(;l===" "||l===" ";)if(e<o+n)l=t[++e];else{do l=t[++e];while(l&&l!==`
128
+ `);r=e,o=e+1,l=t[o]}return r}const pa=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),ga=t=>/^(%|---|\.\.\.)/m.test(t);function mE(t,e,n){if(!e||e<0)return!1;const r=e-n,o=t.length;if(o<=r)return!1;for(let l=0,c=0;l<o;++l)if(t[l]===`
129
129
  `){if(l-c>r)return!0;if(c=l+1,o-c<=r)return!1}return!0}function Ki(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,o=e.options.doubleQuotedMinMultiLineLength,l=e.indent||(ga(t)?" ":"");let c="",u=0;for(let d=0,p=n[d];p;p=n[++d])if(p===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(c+=n.slice(u,d)+"\\ ",d+=1,u=d,p="\\"),p==="\\")switch(n[d+1]){case"u":{c+=n.slice(u,d);const m=n.substr(d+2,4);switch(m){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:m.substr(0,2)==="00"?c+="\\x"+m.substr(2):c+=n.substr(d,6)}d+=5,u=d+1}break;case"n":if(r||n[d+2]==='"'||n.length<o)d+=1;else{for(c+=n.slice(u,d)+`
130
130
 
131
131
  `;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)c+=`
132
- `,d+=2;c+=l,n[d+2]===" "&&(c+="\\"),d+=1,u=d+1}break;default:d+=1}return c=u?c+n.slice(u):n,r?c:ha(c,l,Bl,pa(e,!1))}function Qu(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
132
+ `,d+=2;c+=l,n[d+2]===" "&&(c+="\\"),d+=1,u=d+1}break;default:d+=1}return c=u?c+n.slice(u):n,r?c:ha(c,l,Bl,pa(e,!1))}function Ju(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
133
133
  `)||/[ \t]\n|\n[ \t]/.test(t))return Ki(t,e);const n=e.indent||(ga(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
134
- ${n}`)+"'";return e.implicitKey?r:ha(r,n,$y,pa(e,!1))}function Es(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=Ki;else{const o=t.includes('"'),l=t.includes("'");o&&!l?r=Qu:l&&!o?r=Ki:r=n?Qu:Ki}return r(t,e)}let Ju;try{Ju=new RegExp(`(^|(?<!
134
+ ${n}`)+"'";return e.implicitKey?r:ha(r,n,Dy,pa(e,!1))}function Es(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=Ki;else{const o=t.includes('"'),l=t.includes("'");o&&!l?r=Ju:l&&!o?r=Ki:r=n?Ju:Ki}return r(t,e)}let Xu;try{Xu=new RegExp(`(^|(?<!
135
135
  ))
136
136
  +(?!
137
- |$)`,"g")}catch{Ju=/\n+(?!\n|$)/g}function Fl({comment:t,type:e,value:n},r,o,l){const{blockQuote:c,commentString:u,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Es(n,r);const p=r.indent||(r.forceBlockIndent||ga(n)?" ":""),m=c==="literal"?!0:c==="folded"||e===ue.BLOCK_FOLDED?!1:e===ue.BLOCK_LITERAL?!0:!gE(n,d,p.length);if(!n)return m?`|
137
+ |$)`,"g")}catch{Xu=/\n+(?!\n|$)/g}function Fl({comment:t,type:e,value:n},r,o,l){const{blockQuote:c,commentString:u,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Es(n,r);const p=r.indent||(r.forceBlockIndent||ga(n)?" ":""),m=c==="literal"?!0:c==="folded"||e===ue.BLOCK_FOLDED?!1:e===ue.BLOCK_LITERAL?!0:!mE(n,d,p.length);if(!n)return m?`|
138
138
  `:`>
139
139
  `;let y,v;for(v=n.length;v>0;--v){const z=n[v-1];if(z!==`
140
140
  `&&z!==" "&&z!==" ")break}let x=n.substring(v);const k=x.indexOf(`
141
141
  `);k===-1?y="-":n===x||k!==x.length-1?(y="+",l&&l()):y="",x&&(n=n.slice(0,-x.length),x[x.length-1]===`
142
- `&&(x=x.slice(0,-1)),x=x.replace(Ju,`$&${p}`));let S=!1,E,N=-1;for(E=0;E<n.length;++E){const z=n[E];if(z===" ")S=!0;else if(z===`
142
+ `&&(x=x.slice(0,-1)),x=x.replace(Xu,`$&${p}`));let S=!1,E,N=-1;for(E=0;E<n.length;++E){const z=n[E];if(z===" ")S=!0;else if(z===`
143
143
  `)N=E;else break}let T=n.substring(0,N<E?N+1:E);T&&(n=n.substring(T.length),T=T.replace(/\n+/g,`$&${p}`));let O=(m?"|":">")+(S?p?"2":"1":"")+y;if(t&&(O+=" "+u(t.replace(/ ?[\r\n]+/g," ")),o&&o()),m)return n=n.replace(/\n+/g,`$&${p}`),`${O}
144
144
  ${p}${T}${n}${x}`;n=n.replace(/\n+/g,`
145
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const D=ha(`${T}${n}${x}`,p,Gu,pa(r,!0));return`${O}
146
- ${p}${D}`}function mE(t,e,n,r){const{type:o,value:l}=t,{actualString:c,implicitKey:u,indent:d,indentStep:p,inFlow:m}=e;if(u&&l.includes(`
145
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const D=ha(`${T}${n}${x}`,p,Qu,pa(r,!0));return`${O}
146
+ ${p}${D}`}function yE(t,e,n,r){const{type:o,value:l}=t,{actualString:c,implicitKey:u,indent:d,indentStep:p,inFlow:m}=e;if(u&&l.includes(`
147
147
  `)||m&&/[[\]{},]/.test(l))return Es(l,e);if(!l||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return u||m||!l.includes(`
148
148
  `)?Es(l,e):Fl(t,e,n,r);if(!u&&!m&&o!==ue.PLAIN&&l.includes(`
149
149
  `))return Fl(t,e,n,r);if(ga(l)){if(d==="")return e.forceBlockIndent=!0,Fl(t,e,n,r);if(u&&d===p)return Es(l,e)}const y=l.replace(/\n+/g,`$&
150
- ${d}`);if(c){const v=S=>{var E;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((E=S.test)==null?void 0:E.test(y))},{compat:x,tags:k}=e.doc.schema;if(k.some(v)||x!=null&&x.some(v))return Es(l,e)}return u?y:ha(y,d,$y,pa(e,!1))}function no(t,e,n,r){const{implicitKey:o,inFlow:l}=e,c=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:u}=t;u!==ue.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(u=ue.QUOTE_DOUBLE);const d=m=>{switch(m){case ue.BLOCK_FOLDED:case ue.BLOCK_LITERAL:return o||l?Es(c.value,e):Fl(c,e,n,r);case ue.QUOTE_DOUBLE:return Ki(c.value,e);case ue.QUOTE_SINGLE:return Qu(c.value,e);case ue.PLAIN:return mE(c,e,n,r);default:return null}};let p=d(u);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,v=o&&m||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Dy(t,e){const n=Object.assign({blockQuote:!0,commentString:pE,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},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function yE(t,e){var o;if(e.tag){const l=t.filter(c=>c.tag===e.tag);if(l.length>0)return l.find(c=>c.format===e.format)??l[0]}let n,r;if(Te(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){const c=l.filter(u=>u.test);c.length>0&&(l=c)}n=l.find(c=>c.format===e.format)??l.find(c=>!c.format)}else r=e,n=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=((o=r==null?void 0:r.constructor)==null?void 0:o.name)??typeof r;throw new Error(`Tag not resolved for ${l} value`)}return n}function vE(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const o=[],l=(Te(t)||$e(t))&&t.anchor;l&&My(l)&&(n.add(l),o.push(`&${l}`));const c=t.tag?t.tag:e.default?null:e.tag;return c&&o.push(r.directives.tagString(c)),o.join(" ")}function Ns(t,e,n,r){var d;if(je(t))return t.toString(e,n,r);if(Rr(t)){if(e.doc.directives)return t.toString(e);if((d=e.resolvedAliases)!=null&&d.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let o;const l=De(t)?t:e.doc.createNode(t,{onTagObj:p=>o=p});o||(o=yE(e.doc.schema.tags,l));const c=vE(l,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);const u=typeof o.stringify=="function"?o.stringify(l,e,n,r):Te(l)?no(l,e,n,r):l.toString(e,n,r);return c?Te(l)||u[0]==="{"||u[0]==="["?`${c} ${u}`:`${c}
151
- ${e.indent}${u}`:u}function wE({key:t,value:e},n,r,o){const{allNullValues:l,doc:c,indent:u,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=n;let v=De(t)&&t.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if($e(t)||!De(t)&&typeof t=="object"){const G="With simple keys, collection cannot be used as a key value";throw new Error(G)}}let x=!y&&(!t||v&&e==null&&!n.inFlow||$e(t)||(Te(t)?t.type===ue.BLOCK_FOLDED||t.type===ue.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(y||!l),indent:u+d});let k=!1,S=!1,E=Ns(t,n,()=>k=!0,()=>S=!0);if(!x&&!n.inFlow&&E.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(n.inFlow){if(l||e==null)return k&&r&&r(),E===""?"?":x?`? ${E}`:E}else if(l&&!y||e==null&&x)return E=`? ${E}`,v&&!k?E+=Nr(E,n.indent,p(v)):S&&o&&o(),E;k&&(v=null),x?(v&&(E+=Nr(E,n.indent,p(v))),E=`? ${E}
150
+ ${d}`);if(c){const v=S=>{var E;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((E=S.test)==null?void 0:E.test(y))},{compat:x,tags:k}=e.doc.schema;if(k.some(v)||x!=null&&x.some(v))return Es(l,e)}return u?y:ha(y,d,Dy,pa(e,!1))}function no(t,e,n,r){const{implicitKey:o,inFlow:l}=e,c=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:u}=t;u!==ue.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(u=ue.QUOTE_DOUBLE);const d=m=>{switch(m){case ue.BLOCK_FOLDED:case ue.BLOCK_LITERAL:return o||l?Es(c.value,e):Fl(c,e,n,r);case ue.QUOTE_DOUBLE:return Ki(c.value,e);case ue.QUOTE_SINGLE:return Ju(c.value,e);case ue.PLAIN:return yE(c,e,n,r);default:return null}};let p=d(u);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,v=o&&m||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function By(t,e){const n=Object.assign({blockQuote:!0,commentString:gE,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},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function vE(t,e){var o;if(e.tag){const l=t.filter(c=>c.tag===e.tag);if(l.length>0)return l.find(c=>c.format===e.format)??l[0]}let n,r;if(Te(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){const c=l.filter(u=>u.test);c.length>0&&(l=c)}n=l.find(c=>c.format===e.format)??l.find(c=>!c.format)}else r=e,n=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=((o=r==null?void 0:r.constructor)==null?void 0:o.name)??typeof r;throw new Error(`Tag not resolved for ${l} value`)}return n}function wE(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const o=[],l=(Te(t)||$e(t))&&t.anchor;l&&jy(l)&&(n.add(l),o.push(`&${l}`));const c=t.tag?t.tag:e.default?null:e.tag;return c&&o.push(r.directives.tagString(c)),o.join(" ")}function Ns(t,e,n,r){var d;if(je(t))return t.toString(e,n,r);if(Rr(t)){if(e.doc.directives)return t.toString(e);if((d=e.resolvedAliases)!=null&&d.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let o;const l=De(t)?t:e.doc.createNode(t,{onTagObj:p=>o=p});o||(o=vE(e.doc.schema.tags,l));const c=wE(l,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);const u=typeof o.stringify=="function"?o.stringify(l,e,n,r):Te(l)?no(l,e,n,r):l.toString(e,n,r);return c?Te(l)||u[0]==="{"||u[0]==="["?`${c} ${u}`:`${c}
151
+ ${e.indent}${u}`:u}function SE({key:t,value:e},n,r,o){const{allNullValues:l,doc:c,indent:u,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=n;let v=De(t)&&t.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if($e(t)||!De(t)&&typeof t=="object"){const G="With simple keys, collection cannot be used as a key value";throw new Error(G)}}let x=!y&&(!t||v&&e==null&&!n.inFlow||$e(t)||(Te(t)?t.type===ue.BLOCK_FOLDED||t.type===ue.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(y||!l),indent:u+d});let k=!1,S=!1,E=Ns(t,n,()=>k=!0,()=>S=!0);if(!x&&!n.inFlow&&E.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(n.inFlow){if(l||e==null)return k&&r&&r(),E===""?"?":x?`? ${E}`:E}else if(l&&!y||e==null&&x)return E=`? ${E}`,v&&!k?E+=Nr(E,n.indent,p(v)):S&&o&&o(),E;k&&(v=null),x?(v&&(E+=Nr(E,n.indent,p(v))),E=`? ${E}
152
152
  ${u}:`):(E=`${E}:`,v&&(E+=Nr(E,n.indent,p(v))));let N,T,F;De(e)?(N=!!e.spaceBefore,T=e.commentBefore,F=e.comment):(N=!1,T=null,F=null,e&&typeof e=="object"&&(e=c.createNode(e))),n.implicitKey=!1,!x&&!v&&Te(e)&&(n.indentAtStart=E.length+1),S=!1,!m&&d.length>=2&&!n.inFlow&&!x&&Rs(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let O=!1;const D=Ns(e,n,()=>O=!0,()=>S=!0);let z=" ";if(v||N||T){if(z=N?`
153
153
  `:"",T){const G=p(T);z+=`
154
154
  ${Cn(G,n.indent)}`}D===""&&!n.inFlow?z===`
@@ -158,32 +158,32 @@ ${Cn(G,n.indent)}`}D===""&&!n.inFlow?z===`
158
158
  ${n.indent}`}else if(!x&&$e(e)){const G=D[0],B=D.indexOf(`
159
159
  `),I=B!==-1,Z=n.inFlow??e.flow??e.items.length===0;if(I||!Z){let oe=!1;if(I&&(G==="&"||G==="!")){let M=D.indexOf(" ");G==="&"&&M!==-1&&M<B&&D[M+1]==="!"&&(M=D.indexOf(" ",M+1)),(M===-1||B<M)&&(oe=!0)}oe||(z=`
160
160
  ${n.indent}`)}}else(D===""||D[0]===`
161
- `)&&(z="");return E+=z+D,n.inFlow?O&&r&&r():F&&!O?E+=Nr(E,n.indent,p(F)):S&&o&&o(),E}function By(t,e){(t==="debug"||t==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const kl="<<",An={identify:t=>t===kl||typeof t=="symbol"&&t.description===kl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ue(Symbol(kl)),{addToJSMap:Fy}),stringify:()=>kl},SE=(t,e)=>(An.identify(e)||Te(e)&&(!e.type||e.type===ue.PLAIN)&&An.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(n=>n.tag===An.tag&&n.default));function Fy(t,e,n){if(n=t&&Rr(n)?n.resolve(t.doc):n,Rs(n))for(const r of n.items)Nu(t,e,r);else if(Array.isArray(n))for(const r of n)Nu(t,e,r);else Nu(t,e,n)}function Nu(t,e,n){const r=t&&Rr(n)?n.resolve(t.doc):n;if(!Os(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,t,Map);for(const[l,c]of o)e instanceof Map?e.has(l)||e.set(l,c):e instanceof Set?e.add(l):Object.prototype.hasOwnProperty.call(e,l)||Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}function zy(t,e,{key:n,value:r}){if(De(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(SE(t,n))Fy(t,e,r);else{const o=Ht(n,"",t);if(e instanceof Map)e.set(o,Ht(r,o,t));else if(e instanceof Set)e.add(o);else{const l=xE(n,o,t),c=Ht(r,l,t);l in e?Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[l]=c}}return e}function xE(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(De(t)&&(n!=null&&n.doc)){const r=Dy(n.doc,{});r.anchors=new Set;for(const l of n.anchors.keys())r.anchors.add(l.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=t.toString(r);if(!n.mapKeyWarned){let l=JSON.stringify(o);l.length>40&&(l=l.substring(0,36)+'..."'),By(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Of(t,e,n){const r=Xi(t,void 0,n),o=Xi(e,void 0,n);return new ct(r,o)}class ct{constructor(e,n=null){Object.defineProperty(this,qt,{value:Cy}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return De(n)&&(n=n.clone(e)),De(r)&&(r=r.clone(e)),new ct(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return zy(n,r,this)}toString(e,n,r){return e!=null&&e.doc?wE(this,e,n,r):JSON.stringify(this)}}function Uy(t,e,n){return(e.inFlow??t.flow?EE:_E)(t,e,n)}function _E({comment:t,items:e},n,{blockItemPrefix:r,flowChars:o,itemIndent:l,onChompKeep:c,onComment:u}){const{indent:d,options:{commentString:p}}=n,m=Object.assign({},n,{indent:l,type:null});let y=!1;const v=[];for(let k=0;k<e.length;++k){const S=e[k];let E=null;if(De(S))!y&&S.spaceBefore&&v.push(""),ta(n,v,S.commentBefore,y),S.comment&&(E=S.comment);else if(je(S)){const T=De(S.key)?S.key:null;T&&(!y&&T.spaceBefore&&v.push(""),ta(n,v,T.commentBefore,y))}y=!1;let N=Ns(S,m,()=>E=null,()=>y=!0);E&&(N+=Nr(N,l,p(E))),y&&E&&(y=!1),v.push(r+N)}let x;if(v.length===0)x=o.start+o.end;else{x=v[0];for(let k=1;k<v.length;++k){const S=v[k];x+=S?`
161
+ `)&&(z="");return E+=z+D,n.inFlow?O&&r&&r():F&&!O?E+=Nr(E,n.indent,p(F)):S&&o&&o(),E}function Fy(t,e){(t==="debug"||t==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const kl="<<",An={identify:t=>t===kl||typeof t=="symbol"&&t.description===kl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ue(Symbol(kl)),{addToJSMap:zy}),stringify:()=>kl},xE=(t,e)=>(An.identify(e)||Te(e)&&(!e.type||e.type===ue.PLAIN)&&An.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(n=>n.tag===An.tag&&n.default));function zy(t,e,n){if(n=t&&Rr(n)?n.resolve(t.doc):n,Rs(n))for(const r of n.items)Au(t,e,r);else if(Array.isArray(n))for(const r of n)Au(t,e,r);else Au(t,e,n)}function Au(t,e,n){const r=t&&Rr(n)?n.resolve(t.doc):n;if(!Os(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,t,Map);for(const[l,c]of o)e instanceof Map?e.has(l)||e.set(l,c):e instanceof Set?e.add(l):Object.prototype.hasOwnProperty.call(e,l)||Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}function Uy(t,e,{key:n,value:r}){if(De(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(xE(t,n))zy(t,e,r);else{const o=Ht(n,"",t);if(e instanceof Map)e.set(o,Ht(r,o,t));else if(e instanceof Set)e.add(o);else{const l=_E(n,o,t),c=Ht(r,l,t);l in e?Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[l]=c}}return e}function _E(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(De(t)&&(n!=null&&n.doc)){const r=By(n.doc,{});r.anchors=new Set;for(const l of n.anchors.keys())r.anchors.add(l.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=t.toString(r);if(!n.mapKeyWarned){let l=JSON.stringify(o);l.length>40&&(l=l.substring(0,36)+'..."'),Fy(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Of(t,e,n){const r=Xi(t,void 0,n),o=Xi(e,void 0,n);return new ct(r,o)}class ct{constructor(e,n=null){Object.defineProperty(this,qt,{value:Ny}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return De(n)&&(n=n.clone(e)),De(r)&&(r=r.clone(e)),new ct(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return Uy(n,r,this)}toString(e,n,r){return e!=null&&e.doc?SE(this,e,n,r):JSON.stringify(this)}}function Hy(t,e,n){return(e.inFlow??t.flow?kE:EE)(t,e,n)}function EE({comment:t,items:e},n,{blockItemPrefix:r,flowChars:o,itemIndent:l,onChompKeep:c,onComment:u}){const{indent:d,options:{commentString:p}}=n,m=Object.assign({},n,{indent:l,type:null});let y=!1;const v=[];for(let k=0;k<e.length;++k){const S=e[k];let E=null;if(De(S))!y&&S.spaceBefore&&v.push(""),ta(n,v,S.commentBefore,y),S.comment&&(E=S.comment);else if(je(S)){const T=De(S.key)?S.key:null;T&&(!y&&T.spaceBefore&&v.push(""),ta(n,v,T.commentBefore,y))}y=!1;let N=Ns(S,m,()=>E=null,()=>y=!0);E&&(N+=Nr(N,l,p(E))),y&&E&&(y=!1),v.push(r+N)}let x;if(v.length===0)x=o.start+o.end;else{x=v[0];for(let k=1;k<v.length;++k){const S=v[k];x+=S?`
162
162
  ${d}${S}`:`
163
163
  `}}return t?(x+=`
164
- `+Cn(p(t),d),u&&u()):y&&c&&c(),x}function EE({items:t},e,{flowChars:n,itemIndent:r}){const{indent:o,indentStep:l,flowCollectionPadding:c,options:{commentString:u}}=e;r+=l;const d=Object.assign({},e,{indent:r,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let k=0;k<t.length;++k){const S=t[k];let E=null;if(De(S))S.spaceBefore&&y.push(""),ta(e,y,S.commentBefore,!1),S.comment&&(E=S.comment);else if(je(S)){const T=De(S.key)?S.key:null;T&&(T.spaceBefore&&y.push(""),ta(e,y,T.commentBefore,!1),T.comment&&(p=!0));const F=De(S.value)?S.value:null;F?(F.comment&&(E=F.comment),F.commentBefore&&(p=!0)):S.value==null&&(T!=null&&T.comment)&&(E=T.comment)}E&&(p=!0);let N=Ns(S,d,()=>E=null);k<t.length-1&&(N+=","),E&&(N+=Nr(N,r,u(E))),!p&&(y.length>m||N.includes(`
164
+ `+Cn(p(t),d),u&&u()):y&&c&&c(),x}function kE({items:t},e,{flowChars:n,itemIndent:r}){const{indent:o,indentStep:l,flowCollectionPadding:c,options:{commentString:u}}=e;r+=l;const d=Object.assign({},e,{indent:r,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let k=0;k<t.length;++k){const S=t[k];let E=null;if(De(S))S.spaceBefore&&y.push(""),ta(e,y,S.commentBefore,!1),S.comment&&(E=S.comment);else if(je(S)){const T=De(S.key)?S.key:null;T&&(T.spaceBefore&&y.push(""),ta(e,y,T.commentBefore,!1),T.comment&&(p=!0));const F=De(S.value)?S.value:null;F?(F.comment&&(E=F.comment),F.commentBefore&&(p=!0)):S.value==null&&(T!=null&&T.comment)&&(E=T.comment)}E&&(p=!0);let N=Ns(S,d,()=>E=null);k<t.length-1&&(N+=","),E&&(N+=Nr(N,r,u(E))),!p&&(y.length>m||N.includes(`
165
165
  `))&&(p=!0),y.push(N),m=y.length}const{start:v,end:x}=n;if(y.length===0)return v+x;if(!p){const k=y.reduce((S,E)=>S+E.length+2,2);p=e.options.lineWidth>0&&k>e.options.lineWidth}if(p){let k=v;for(const S of y)k+=S?`
166
166
  ${l}${o}${S}`:`
167
167
  `;return`${k}
168
- ${o}${x}`}else return`${v}${c}${y.join(" ")}${c}${x}`}function ta({indent:t,options:{commentString:e}},n,r,o){if(r&&o&&(r=r.replace(/^\n+/,"")),r){const l=Cn(e(r),t);n.push(l.trimStart())}}function Ar(t,e){const n=Te(e)?e.value:e;for(const r of t)if(je(r)&&(r.key===e||r.key===n||Te(r.key)&&r.key.value===n))return r}class It extends Ry{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Zn,e),this.items=[]}static from(e,n,r){const{keepUndefined:o,replacer:l}=r,c=new this(e),u=(d,p)=>{if(typeof l=="function")p=l.call(n,d,p);else if(Array.isArray(l)&&!l.includes(d))return;(p!==void 0||o)&&c.items.push(Of(d,p,r))};if(n instanceof Map)for(const[d,p]of n)u(d,p);else if(n&&typeof n=="object")for(const d of Object.keys(n))u(d,n[d]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,n){var c;let r;je(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new ct(e,e==null?void 0:e.value):r=new ct(e.key,e.value);const o=Ar(this.items,r.key),l=(c=this.schema)==null?void 0:c.sortMapEntries;if(o){if(!n)throw new Error(`Key ${r.key} already set`);Te(o.value)&&Oy(r.value)?o.value.value=r.value:o.value=r.value}else if(l){const u=this.items.findIndex(d=>l(r,d)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(e){const n=Ar(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Ar(this.items,e),o=r==null?void 0:r.value;return(!n&&Te(o)?o.value:o)??void 0}has(e){return!!Ar(this.items,e)}set(e,n){this.add(new ct(e,n),!0)}toJSON(e,n,r){const o=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(o);for(const l of this.items)zy(n,o,l);return o}toString(e,n,r){if(!e)return JSON.stringify(this);for(const o of this.items)if(!je(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Uy(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const $s={collection:"map",default:!0,nodeClass:It,tag:"tag:yaml.org,2002:map",resolve(t,e){return Os(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>It.from(t,e,n)};class tr extends Ry{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ps,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=bl(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=bl(e);if(typeof r!="number")return;const o=this.items[r];return!n&&Te(o)?o.value:o}has(e){const n=bl(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=bl(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[r];Te(o)&&Oy(n)?o.value=n:this.items[r]=n}toJSON(e,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let o=0;for(const l of this.items)r.push(Ht(l,String(o++),n));return r}toString(e,n,r){return e?Uy(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n)){let c=0;for(let u of n){if(typeof o=="function"){const d=n instanceof Set?u:String(c++);u=o.call(n,d,u)}l.items.push(Xi(u,void 0,r))}}return l}}function bl(t){let e=Te(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Ds={collection:"seq",default:!0,nodeClass:tr,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Rs(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>tr.from(t,e,n)},ma={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),no(t,e,n,r)}},ya={identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ue(null),stringify:({source:t},e)=>typeof t=="string"&&ya.test.test(t)?t:e.options.nullStr},Rf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ue(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Rf.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function nn({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const o=typeof r=="number"?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let l=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let c=l.indexOf(".");c<0&&(c=l.length,l+=".");let u=e-(l.length-c-1);for(;u-- >0;)l+="0"}return l}const Hy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},qy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():nn(t)}},Vy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new ue(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:nn},va=t=>typeof t=="bigint"||Number.isInteger(t),$f=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function Wy(t,e,n){const{value:r}=t;return va(r)&&r>=0?n+r.toString(e):nn(t)}const Ky={identify:t=>va(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>$f(t,2,8,n),stringify:t=>Wy(t,8,"0o")},Gy={identify:va,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>$f(t,0,10,n),stringify:nn},Qy={identify:t=>va(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>$f(t,2,16,n),stringify:t=>Wy(t,16,"0x")},kE=[$s,Ds,ma,ya,Rf,Ky,Gy,Qy,Hy,qy,Vy];function Cg(t){return typeof t=="bigint"||Number.isInteger(t)}const Tl=({value:t})=>JSON.stringify(t),bE=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Tl},{identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Tl},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Tl},{identify:Cg,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Cg(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Tl}],TE={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},CE=[$s,Ds].concat(bE,TE),Df={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Buffer=="function")return Buffer.from(t,"base64");if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,o,l){const c=n;let u;if(typeof Buffer=="function")u=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<c.length;++p)d+=String.fromCharCode(c[p]);u=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=ue.BLOCK_LITERAL),e!==ue.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),p=Math.ceil(u.length/d),m=new Array(p);for(let y=0,v=0;y<p;++y,v+=d)m[y]=u.substr(v,d);u=m.join(e===ue.BLOCK_LITERAL?`
169
- `:" ")}return no({comment:t,type:e,value:u},r,o,l)}};function Jy(t,e){if(Rs(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!je(r)){if(Os(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const o=r.items[0]||new ct(new ue(null));if(r.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${r.commentBefore}
168
+ ${o}${x}`}else return`${v}${c}${y.join(" ")}${c}${x}`}function ta({indent:t,options:{commentString:e}},n,r,o){if(r&&o&&(r=r.replace(/^\n+/,"")),r){const l=Cn(e(r),t);n.push(l.trimStart())}}function Ar(t,e){const n=Te(e)?e.value:e;for(const r of t)if(je(r)&&(r.key===e||r.key===n||Te(r.key)&&r.key.value===n))return r}class It extends $y{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Zn,e),this.items=[]}static from(e,n,r){const{keepUndefined:o,replacer:l}=r,c=new this(e),u=(d,p)=>{if(typeof l=="function")p=l.call(n,d,p);else if(Array.isArray(l)&&!l.includes(d))return;(p!==void 0||o)&&c.items.push(Of(d,p,r))};if(n instanceof Map)for(const[d,p]of n)u(d,p);else if(n&&typeof n=="object")for(const d of Object.keys(n))u(d,n[d]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,n){var c;let r;je(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new ct(e,e==null?void 0:e.value):r=new ct(e.key,e.value);const o=Ar(this.items,r.key),l=(c=this.schema)==null?void 0:c.sortMapEntries;if(o){if(!n)throw new Error(`Key ${r.key} already set`);Te(o.value)&&Ry(r.value)?o.value.value=r.value:o.value=r.value}else if(l){const u=this.items.findIndex(d=>l(r,d)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(e){const n=Ar(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Ar(this.items,e),o=r==null?void 0:r.value;return(!n&&Te(o)?o.value:o)??void 0}has(e){return!!Ar(this.items,e)}set(e,n){this.add(new ct(e,n),!0)}toJSON(e,n,r){const o=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(o);for(const l of this.items)Uy(n,o,l);return o}toString(e,n,r){if(!e)return JSON.stringify(this);for(const o of this.items)if(!je(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Hy(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const $s={collection:"map",default:!0,nodeClass:It,tag:"tag:yaml.org,2002:map",resolve(t,e){return Os(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>It.from(t,e,n)};class tr extends $y{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ps,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=bl(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=bl(e);if(typeof r!="number")return;const o=this.items[r];return!n&&Te(o)?o.value:o}has(e){const n=bl(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=bl(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[r];Te(o)&&Ry(n)?o.value=n:this.items[r]=n}toJSON(e,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let o=0;for(const l of this.items)r.push(Ht(l,String(o++),n));return r}toString(e,n,r){return e?Hy(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n)){let c=0;for(let u of n){if(typeof o=="function"){const d=n instanceof Set?u:String(c++);u=o.call(n,d,u)}l.items.push(Xi(u,void 0,r))}}return l}}function bl(t){let e=Te(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Ds={collection:"seq",default:!0,nodeClass:tr,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Rs(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>tr.from(t,e,n)},ma={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),no(t,e,n,r)}},ya={identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ue(null),stringify:({source:t},e)=>typeof t=="string"&&ya.test.test(t)?t:e.options.nullStr},Rf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ue(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Rf.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function nn({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const o=typeof r=="number"?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let l=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let c=l.indexOf(".");c<0&&(c=l.length,l+=".");let u=e-(l.length-c-1);for(;u-- >0;)l+="0"}return l}const qy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},Vy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():nn(t)}},Wy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new ue(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:nn},va=t=>typeof t=="bigint"||Number.isInteger(t),$f=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function Ky(t,e,n){const{value:r}=t;return va(r)&&r>=0?n+r.toString(e):nn(t)}const Gy={identify:t=>va(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>$f(t,2,8,n),stringify:t=>Ky(t,8,"0o")},Qy={identify:va,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>$f(t,0,10,n),stringify:nn},Jy={identify:t=>va(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>$f(t,2,16,n),stringify:t=>Ky(t,16,"0x")},bE=[$s,Ds,ma,ya,Rf,Gy,Qy,Jy,qy,Vy,Wy];function Ng(t){return typeof t=="bigint"||Number.isInteger(t)}const Tl=({value:t})=>JSON.stringify(t),TE=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Tl},{identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Tl},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Tl},{identify:Ng,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Ng(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Tl}],CE={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},NE=[$s,Ds].concat(TE,CE),Df={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Buffer=="function")return Buffer.from(t,"base64");if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,o,l){const c=n;let u;if(typeof Buffer=="function")u=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<c.length;++p)d+=String.fromCharCode(c[p]);u=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=ue.BLOCK_LITERAL),e!==ue.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),p=Math.ceil(u.length/d),m=new Array(p);for(let y=0,v=0;y<p;++y,v+=d)m[y]=u.substr(v,d);u=m.join(e===ue.BLOCK_LITERAL?`
169
+ `:" ")}return no({comment:t,type:e,value:u},r,o,l)}};function Xy(t,e){if(Rs(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!je(r)){if(Os(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const o=r.items[0]||new ct(new ue(null));if(r.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${r.commentBefore}
170
170
  ${o.key.commentBefore}`:r.commentBefore),r.comment){const l=o.value??o.key;l.comment=l.comment?`${r.comment}
171
- ${l.comment}`:r.comment}r=o}t.items[n]=je(r)?r:new ct(r)}}else e("Expected a sequence for this tag");return t}function Xy(t,e,n){const{replacer:r}=n,o=new tr(t);o.tag="tag:yaml.org,2002:pairs";let l=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof r=="function"&&(c=r.call(e,String(l++),c));let u,d;if(Array.isArray(c))if(c.length===2)u=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const p=Object.keys(c);if(p.length===1)u=p[0],d=c[u];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else u=c;o.items.push(Of(u,d,n))}return o}const Bf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Jy,createNode:Xy};class bs extends tr{constructor(){super(),this.add=It.prototype.add.bind(this),this.delete=It.prototype.delete.bind(this),this.get=It.prototype.get.bind(this),this.has=It.prototype.has.bind(this),this.set=It.prototype.set.bind(this),this.tag=bs.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const o of this.items){let l,c;if(je(o)?(l=Ht(o.key,"",n),c=Ht(o.value,l,n)):l=Ht(o,"",n),r.has(l))throw new Error("Ordered maps must not include duplicate keys");r.set(l,c)}return r}static from(e,n,r){const o=Xy(e,n,r),l=new this;return l.items=o.items,l}}bs.tag="tag:yaml.org,2002:omap";const Ff={collection:"seq",identify:t=>t instanceof Map,nodeClass:bs,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=Jy(t,e),r=[];for(const{key:o}of n.items)Te(o)&&(r.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):r.push(o.value));return Object.assign(new bs,n)},createNode:(t,e,n)=>bs.from(t,e,n)};function Yy({value:t,source:e},n){return e&&(t?Zy:ev).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const Zy={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ue(!0),stringify:Yy},ev={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ue(!1),stringify:Yy},NE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},AE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():nn(t)}},LE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ue(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:nn},ro=t=>typeof t=="bigint"||Number.isInteger(t);function wa(t,e,n,{intAsBigInt:r}){const o=t[0];if((o==="-"||o==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const c=BigInt(t);return o==="-"?BigInt(-1)*c:c}const l=parseInt(t,n);return o==="-"?-1*l:l}function zf(t,e,n){const{value:r}=t;if(ro(r)){const o=r.toString(e);return r<0?"-"+n+o.substr(1):n+o}return nn(t)}const IE={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>wa(t,2,2,n),stringify:t=>zf(t,2,"0b")},ME={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>wa(t,1,8,n),stringify:t=>zf(t,8,"0")},jE={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>wa(t,0,10,n),stringify:nn},PE={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>wa(t,2,16,n),stringify:t=>zf(t,16,"0x")};class Ts extends It{constructor(e){super(e),this.tag=Ts.tag}add(e){let n;je(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new ct(e.key,null):n=new ct(e,null),Ar(this.items,n.key)||this.items.push(n)}get(e,n){const r=Ar(this.items,e);return!n&&je(r)?Te(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ar(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new ct(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof o=="function"&&(c=o.call(n,c,c)),l.items.push(Of(c,null,r));return l}}Ts.tag="tag:yaml.org,2002:set";const Uf={collection:"map",identify:t=>t instanceof Set,nodeClass:Ts,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>Ts.from(t,e,n),resolve(t,e){if(Os(t)){if(t.hasAllNullValues(!0))return Object.assign(new Ts,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Hf(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,o=c=>e?BigInt(c):Number(c),l=r.replace(/_/g,"").split(":").reduce((c,u)=>c*o(60)+o(u),o(0));return n==="-"?o(-1)*l:l}function tv(t){let{value:e}=t,n=c=>c;if(typeof e=="bigint")n=c=>BigInt(c);else if(isNaN(e)||!isFinite(e))return nn(t);let r="";e<0&&(r="-",e*=n(-1));const o=n(60),l=[e%o];return e<60?l.unshift(0):(e=(e-l[0])/o,l.unshift(e%o),e>=60&&(e=(e-l[0])/o,l.unshift(e))),r+l.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const nv={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Hf(t,n),stringify:tv},rv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Hf(t,!1),stringify:tv},Sa={identify:t=>t 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(t){const e=t.match(Sa.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,o,l,c,u]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(n,r-1,o,l||0,c||0,u||0,d);const m=e[8];if(m&&m!=="Z"){let y=Hf(m,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Ng=[$s,Ds,ma,ya,Zy,ev,IE,ME,jE,PE,NE,AE,LE,Df,An,Ff,Bf,Uf,nv,rv,Sa],Ag=new Map([["core",kE],["failsafe",[$s,Ds,ma]],["json",CE],["yaml11",Ng],["yaml-1.1",Ng]]),Lg={binary:Df,bool:Rf,float:Vy,floatExp:qy,floatNaN:Hy,floatTime:rv,int:Gy,intHex:Qy,intOct:Ky,intTime:nv,map:$s,merge:An,null:ya,omap:Ff,pairs:Bf,seq:Ds,set:Uf,timestamp:Sa},OE={"tag:yaml.org,2002:binary":Df,"tag:yaml.org,2002:merge":An,"tag:yaml.org,2002:omap":Ff,"tag:yaml.org,2002:pairs":Bf,"tag:yaml.org,2002:set":Uf,"tag:yaml.org,2002:timestamp":Sa};function Au(t,e,n){const r=Ag.get(e);if(r&&!t)return n&&!r.includes(An)?r.concat(An):r.slice();let o=r;if(!o)if(Array.isArray(t))o=[];else{const l=Array.from(Ag.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${l} or define customTags array`)}if(Array.isArray(t))for(const l of t)o=o.concat(l);else typeof t=="function"&&(o=t(o.slice()));return n&&(o=o.concat(An)),o.reduce((l,c)=>{const u=typeof c=="string"?Lg[c]:c;if(!u){const d=JSON.stringify(c),p=Object.keys(Lg).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return l.includes(u)||l.push(u),l},[])}const RE=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class xa{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:o,schema:l,sortMapEntries:c,toStringDefaults:u}){this.compat=Array.isArray(e)?Au(e,"compat"):e?Au(null,e):null,this.name=typeof l=="string"&&l||"core",this.knownTags=o?OE:{},this.tags=Au(n,this.name,r),this.toStringOptions=u??null,Object.defineProperty(this,Zn,{value:$s}),Object.defineProperty(this,dn,{value:ma}),Object.defineProperty(this,Ps,{value:Ds}),this.sortMapEntries=typeof c=="function"?c:c===!0?RE:null}clone(){const e=Object.create(xa.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function $E(t,e){var d;const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const p=t.directives.toString(t);p?(n.push(p),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const o=Dy(t,e),{commentString:l}=o.options;if(t.commentBefore){n.length!==1&&n.unshift("");const p=l(t.commentBefore);n.unshift(Cn(p,""))}let c=!1,u=null;if(t.contents){if(De(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const y=l(t.contents.commentBefore);n.push(Cn(y,""))}o.forceBlockIndent=!!t.comment,u=t.contents.comment}const p=u?void 0:()=>c=!0;let m=Ns(t.contents,o,()=>u=null,p);u&&(m+=Nr(m,"",l(u))),(m[0]==="|"||m[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${m}`:n.push(m)}else n.push(Ns(t.contents,o));if((d=t.directives)!=null&&d.docEnd)if(t.comment){const p=l(t.comment);p.includes(`
171
+ ${l.comment}`:r.comment}r=o}t.items[n]=je(r)?r:new ct(r)}}else e("Expected a sequence for this tag");return t}function Yy(t,e,n){const{replacer:r}=n,o=new tr(t);o.tag="tag:yaml.org,2002:pairs";let l=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof r=="function"&&(c=r.call(e,String(l++),c));let u,d;if(Array.isArray(c))if(c.length===2)u=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const p=Object.keys(c);if(p.length===1)u=p[0],d=c[u];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else u=c;o.items.push(Of(u,d,n))}return o}const Bf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Xy,createNode:Yy};class bs extends tr{constructor(){super(),this.add=It.prototype.add.bind(this),this.delete=It.prototype.delete.bind(this),this.get=It.prototype.get.bind(this),this.has=It.prototype.has.bind(this),this.set=It.prototype.set.bind(this),this.tag=bs.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const o of this.items){let l,c;if(je(o)?(l=Ht(o.key,"",n),c=Ht(o.value,l,n)):l=Ht(o,"",n),r.has(l))throw new Error("Ordered maps must not include duplicate keys");r.set(l,c)}return r}static from(e,n,r){const o=Yy(e,n,r),l=new this;return l.items=o.items,l}}bs.tag="tag:yaml.org,2002:omap";const Ff={collection:"seq",identify:t=>t instanceof Map,nodeClass:bs,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=Xy(t,e),r=[];for(const{key:o}of n.items)Te(o)&&(r.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):r.push(o.value));return Object.assign(new bs,n)},createNode:(t,e,n)=>bs.from(t,e,n)};function Zy({value:t,source:e},n){return e&&(t?ev:tv).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const ev={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ue(!0),stringify:Zy},tv={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ue(!1),stringify:Zy},AE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},LE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():nn(t)}},IE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ue(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:nn},ro=t=>typeof t=="bigint"||Number.isInteger(t);function wa(t,e,n,{intAsBigInt:r}){const o=t[0];if((o==="-"||o==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const c=BigInt(t);return o==="-"?BigInt(-1)*c:c}const l=parseInt(t,n);return o==="-"?-1*l:l}function zf(t,e,n){const{value:r}=t;if(ro(r)){const o=r.toString(e);return r<0?"-"+n+o.substr(1):n+o}return nn(t)}const ME={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>wa(t,2,2,n),stringify:t=>zf(t,2,"0b")},jE={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>wa(t,1,8,n),stringify:t=>zf(t,8,"0")},PE={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>wa(t,0,10,n),stringify:nn},OE={identify:ro,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>wa(t,2,16,n),stringify:t=>zf(t,16,"0x")};class Ts extends It{constructor(e){super(e),this.tag=Ts.tag}add(e){let n;je(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new ct(e.key,null):n=new ct(e,null),Ar(this.items,n.key)||this.items.push(n)}get(e,n){const r=Ar(this.items,e);return!n&&je(r)?Te(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ar(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new ct(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof o=="function"&&(c=o.call(n,c,c)),l.items.push(Of(c,null,r));return l}}Ts.tag="tag:yaml.org,2002:set";const Uf={collection:"map",identify:t=>t instanceof Set,nodeClass:Ts,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>Ts.from(t,e,n),resolve(t,e){if(Os(t)){if(t.hasAllNullValues(!0))return Object.assign(new Ts,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Hf(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,o=c=>e?BigInt(c):Number(c),l=r.replace(/_/g,"").split(":").reduce((c,u)=>c*o(60)+o(u),o(0));return n==="-"?o(-1)*l:l}function nv(t){let{value:e}=t,n=c=>c;if(typeof e=="bigint")n=c=>BigInt(c);else if(isNaN(e)||!isFinite(e))return nn(t);let r="";e<0&&(r="-",e*=n(-1));const o=n(60),l=[e%o];return e<60?l.unshift(0):(e=(e-l[0])/o,l.unshift(e%o),e>=60&&(e=(e-l[0])/o,l.unshift(e))),r+l.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const rv={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Hf(t,n),stringify:nv},sv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Hf(t,!1),stringify:nv},Sa={identify:t=>t 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(t){const e=t.match(Sa.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,o,l,c,u]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(n,r-1,o,l||0,c||0,u||0,d);const m=e[8];if(m&&m!=="Z"){let y=Hf(m,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Ag=[$s,Ds,ma,ya,ev,tv,ME,jE,PE,OE,AE,LE,IE,Df,An,Ff,Bf,Uf,rv,sv,Sa],Lg=new Map([["core",bE],["failsafe",[$s,Ds,ma]],["json",NE],["yaml11",Ag],["yaml-1.1",Ag]]),Ig={binary:Df,bool:Rf,float:Wy,floatExp:Vy,floatNaN:qy,floatTime:sv,int:Qy,intHex:Jy,intOct:Gy,intTime:rv,map:$s,merge:An,null:ya,omap:Ff,pairs:Bf,seq:Ds,set:Uf,timestamp:Sa},RE={"tag:yaml.org,2002:binary":Df,"tag:yaml.org,2002:merge":An,"tag:yaml.org,2002:omap":Ff,"tag:yaml.org,2002:pairs":Bf,"tag:yaml.org,2002:set":Uf,"tag:yaml.org,2002:timestamp":Sa};function Lu(t,e,n){const r=Lg.get(e);if(r&&!t)return n&&!r.includes(An)?r.concat(An):r.slice();let o=r;if(!o)if(Array.isArray(t))o=[];else{const l=Array.from(Lg.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${l} or define customTags array`)}if(Array.isArray(t))for(const l of t)o=o.concat(l);else typeof t=="function"&&(o=t(o.slice()));return n&&(o=o.concat(An)),o.reduce((l,c)=>{const u=typeof c=="string"?Ig[c]:c;if(!u){const d=JSON.stringify(c),p=Object.keys(Ig).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return l.includes(u)||l.push(u),l},[])}const $E=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class xa{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:o,schema:l,sortMapEntries:c,toStringDefaults:u}){this.compat=Array.isArray(e)?Lu(e,"compat"):e?Lu(null,e):null,this.name=typeof l=="string"&&l||"core",this.knownTags=o?RE:{},this.tags=Lu(n,this.name,r),this.toStringOptions=u??null,Object.defineProperty(this,Zn,{value:$s}),Object.defineProperty(this,dn,{value:ma}),Object.defineProperty(this,Ps,{value:Ds}),this.sortMapEntries=typeof c=="function"?c:c===!0?$E:null}clone(){const e=Object.create(xa.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function DE(t,e){var d;const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const p=t.directives.toString(t);p?(n.push(p),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const o=By(t,e),{commentString:l}=o.options;if(t.commentBefore){n.length!==1&&n.unshift("");const p=l(t.commentBefore);n.unshift(Cn(p,""))}let c=!1,u=null;if(t.contents){if(De(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const y=l(t.contents.commentBefore);n.push(Cn(y,""))}o.forceBlockIndent=!!t.comment,u=t.contents.comment}const p=u?void 0:()=>c=!0;let m=Ns(t.contents,o,()=>u=null,p);u&&(m+=Nr(m,"",l(u))),(m[0]==="|"||m[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${m}`:n.push(m)}else n.push(Ns(t.contents,o));if((d=t.directives)!=null&&d.docEnd)if(t.comment){const p=l(t.comment);p.includes(`
172
172
  `)?(n.push("..."),n.push(Cn(p,""))):n.push(`... ${p}`)}else n.push("...");else{let p=t.comment;p&&c&&(p=p.replace(/^\n+/,"")),p&&((!c||u)&&n[n.length-1]!==""&&n.push(""),n.push(Cn(l(p),"")))}return n.join(`
173
173
  `)+`
174
- `}class Bs{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qt,{value:Ku});let o=null;typeof n=="function"||Array.isArray(n)?o=n:r===void 0&&n&&(r=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=l;let{version:c}=l;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new dt({version:c}),this.setSchema(c,r),this.contents=e===void 0?null:this.createNode(e,o,r)}clone(){const e=Object.create(Bs.prototype,{[qt]:{value:Ku}});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=De(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ps(this.contents)&&this.contents.add(e)}addIn(e,n){ps(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=jy(this);e.anchor=!n||r.has(n)?Py(n||"a",r):n}return new da(e.anchor)}createNode(e,n,r){let o;if(typeof n=="function")e=n.call({"":e},"",e),o=n;else if(Array.isArray(n)){const E=T=>typeof T=="number"||T instanceof String||T instanceof Number,N=n.filter(E).map(String);N.length>0&&(n=n.concat(N)),o=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:c,flow:u,keepUndefined:d,onTagObj:p,tag:m}=r??{},{onAnchor:y,setAnchors:v,sourceObjects:x}=fE(this,c||"a"),k={aliasDuplicateObjects:l??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:x},S=Xi(e,m,k);return u&&$e(S)&&(S.flow=!0),v(),S}createPair(e,n,r={}){const o=this.createNode(e,null,r),l=this.createNode(n,null,r);return new ct(o,l)}delete(e){return ps(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Bi(e)?this.contents==null?!1:(this.contents=null,!0):ps(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return $e(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Bi(e)?!n&&Te(this.contents)?this.contents.value:this.contents:$e(this.contents)?this.contents.getIn(e,n):void 0}has(e){return $e(this.contents)?this.contents.has(e):!1}hasIn(e){return Bi(e)?this.contents!==void 0:$e(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=ea(this.schema,[e],n):ps(this.contents)&&this.contents.set(e,n)}setIn(e,n){Bi(e)?this.contents=n:this.contents==null?this.contents=ea(this.schema,Array.from(e),n):ps(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new dt({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 dt({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new xa(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:o,onAnchor:l,reviver:c}={}){const u={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},d=Ht(this.contents,n??"",u);if(typeof l=="function")for(const{count:p,res:m}of u.anchors.values())l(m,p);return typeof c=="function"?_s(c,{"":d},"",d):d}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}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 n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return $E(this,e)}}function ps(t){if($e(t))return!0;throw new Error("Expected a YAML collection as document contents")}class qf extends Error{constructor(e,n,r,o){super(),this.name=e,this.code=r,this.message=o,this.pos=n}}class Lr extends qf{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class sv extends qf{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const na=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>e.linePos(u));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let l=o-1,c=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(l>=60&&c.length>80){const u=Math.min(l-39,c.length-79);c="…"+c.substring(u),l-=u-1}if(c.length>80&&(c=c.substring(0,79)+"…"),r>1&&/^ *$/.test(c.substring(0,l))){let u=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);u.length>80&&(u=u.substring(0,79)+`…
174
+ `}class Bs{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qt,{value:Gu});let o=null;typeof n=="function"||Array.isArray(n)?o=n:r===void 0&&n&&(r=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=l;let{version:c}=l;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new dt({version:c}),this.setSchema(c,r),this.contents=e===void 0?null:this.createNode(e,o,r)}clone(){const e=Object.create(Bs.prototype,{[qt]:{value:Gu}});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=De(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ps(this.contents)&&this.contents.add(e)}addIn(e,n){ps(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=Py(this);e.anchor=!n||r.has(n)?Oy(n||"a",r):n}return new da(e.anchor)}createNode(e,n,r){let o;if(typeof n=="function")e=n.call({"":e},"",e),o=n;else if(Array.isArray(n)){const E=T=>typeof T=="number"||T instanceof String||T instanceof Number,N=n.filter(E).map(String);N.length>0&&(n=n.concat(N)),o=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:c,flow:u,keepUndefined:d,onTagObj:p,tag:m}=r??{},{onAnchor:y,setAnchors:v,sourceObjects:x}=dE(this,c||"a"),k={aliasDuplicateObjects:l??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:x},S=Xi(e,m,k);return u&&$e(S)&&(S.flow=!0),v(),S}createPair(e,n,r={}){const o=this.createNode(e,null,r),l=this.createNode(n,null,r);return new ct(o,l)}delete(e){return ps(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Bi(e)?this.contents==null?!1:(this.contents=null,!0):ps(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return $e(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Bi(e)?!n&&Te(this.contents)?this.contents.value:this.contents:$e(this.contents)?this.contents.getIn(e,n):void 0}has(e){return $e(this.contents)?this.contents.has(e):!1}hasIn(e){return Bi(e)?this.contents!==void 0:$e(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=ea(this.schema,[e],n):ps(this.contents)&&this.contents.set(e,n)}setIn(e,n){Bi(e)?this.contents=n:this.contents==null?this.contents=ea(this.schema,Array.from(e),n):ps(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new dt({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 dt({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new xa(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:o,onAnchor:l,reviver:c}={}){const u={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},d=Ht(this.contents,n??"",u);if(typeof l=="function")for(const{count:p,res:m}of u.anchors.values())l(m,p);return typeof c=="function"?_s(c,{"":d},"",d):d}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}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 n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return DE(this,e)}}function ps(t){if($e(t))return!0;throw new Error("Expected a YAML collection as document contents")}class qf extends Error{constructor(e,n,r,o){super(),this.name=e,this.code=r,this.message=o,this.pos=n}}class Lr extends qf{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class iv extends qf{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const na=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>e.linePos(u));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let l=o-1,c=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(l>=60&&c.length>80){const u=Math.min(l-39,c.length-79);c="…"+c.substring(u),l-=u-1}if(c.length>80&&(c=c.substring(0,79)+"…"),r>1&&/^ *$/.test(c.substring(0,l))){let u=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);u.length>80&&(u=u.substring(0,79)+`…
175
175
  `),c=u+c}if(/[^ ]/.test(c)){let u=1;const d=n.linePos[1];d&&d.line===r&&d.col>o&&(u=Math.max(1,Math.min(d.col-o,80-l)));const p=" ".repeat(l)+"^".repeat(u);n.message+=`:
176
176
 
177
177
  ${c}
178
178
  ${p}
179
179
  `}};function As(t,{flow:e,indicator:n,next:r,offset:o,onError:l,parentIndent:c,startOnNewline:u}){let d=!1,p=u,m=u,y="",v="",x=!1,k=!1,S=null,E=null,N=null,T=null,F=null,O=null,D=null;for(const B of t)switch(k&&(B.type!=="space"&&B.type!=="newline"&&B.type!=="comma"&&l(B.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k=!1),S&&(p&&B.type!=="comment"&&B.type!=="newline"&&l(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),B.type){case"space":!e&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&B.source.includes(" ")&&(S=B),m=!0;break;case"comment":{m||l(B,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const I=B.source.substring(1)||" ";y?y+=v+I:y=I,v="",p=!1;break}case"newline":p?y?y+=B.source:d=!0:v+=B.source,p=!0,x=!0,(E||N)&&(T=B),m=!0;break;case"anchor":E&&l(B,"MULTIPLE_ANCHORS","A node can have at most one anchor"),B.source.endsWith(":")&&l(B.offset+B.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=B,D===null&&(D=B.offset),p=!1,m=!1,k=!0;break;case"tag":{N&&l(B,"MULTIPLE_TAGS","A node can have at most one tag"),N=B,D===null&&(D=B.offset),p=!1,m=!1,k=!0;break}case n:(E||N)&&l(B,"BAD_PROP_ORDER",`Anchors and tags must be after the ${B.source} indicator`),O&&l(B,"UNEXPECTED_TOKEN",`Unexpected ${B.source} in ${e??"collection"}`),O=B,p=n==="seq-item-ind"||n==="explicit-key-ind",m=!1;break;case"comma":if(e){F&&l(B,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),F=B,p=!1,m=!1;break}default:l(B,"UNEXPECTED_TOKEN",`Unexpected ${B.type} token`),p=!1,m=!1}const z=t[t.length-1],G=z?z.offset+z.source.length:o;return k&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&l(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(p&&S.indent<=c||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&l(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:F,found:O,spaceBefore:d,comment:y,hasNewline:x,anchor:E,tag:N,newlineAfterProp:T,end:G,start:D??G}}function Yi(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
180
- `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Yi(e.key)||Yi(e.value))return!0}return!1;default:return!0}}function Xu(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Yi(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function iv(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const o=typeof r=="function"?r:(l,c)=>l===c||Te(l)&&Te(c)&&l.value===c.value;return e.some(l=>o(l.key,n))}const Ig="All mapping items must start at the same column";function DE({composeNode:t,composeEmptyNode:e},n,r,o,l){var m;const c=(l==null?void 0:l.nodeClass)??It,u=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=r.offset,p=null;for(const y of r.items){const{start:v,key:x,sep:k,value:S}=y,E=As(v,{indicator:"explicit-key-ind",next:x??(k==null?void 0:k[0]),offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0}),N=!E.found;if(N){if(x&&(x.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==r.indent&&o(d,"BAD_INDENT",Ig)),!E.anchor&&!E.tag&&!k){p=E.end,E.comment&&(u.comment?u.comment+=`
181
- `+E.comment:u.comment=E.comment);continue}(E.newlineAfterProp||Yi(x))&&o(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=E.found)==null?void 0:m.indent)!==r.indent&&o(d,"BAD_INDENT",Ig);n.atKey=!0;const T=E.end,F=x?t(n,x,E,o):e(n,T,v,null,E,o);n.schema.compat&&Xu(r.indent,x,o),n.atKey=!1,iv(n,u.items,F)&&o(T,"DUPLICATE_KEY","Map keys must be unique");const O=As(k??[],{indicator:"map-value-ind",next:S,offset:F.range[2],onError:o,parentIndent:r.indent,startOnNewline:!x||x.type==="block-scalar"});if(d=O.end,O.found){N&&((S==null?void 0:S.type)==="block-map"&&!O.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&E.start<O.found.offset-1024&&o(F.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=S?t(n,S,O,o):e(n,d,k,null,O,o);n.schema.compat&&Xu(r.indent,S,o),d=D.range[2];const z=new ct(F,D);n.options.keepSourceTokens&&(z.srcToken=y),u.items.push(z)}else{N&&o(F.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),O.comment&&(F.comment?F.comment+=`
182
- `+O.comment:F.comment=O.comment);const D=new ct(F);n.options.keepSourceTokens&&(D.srcToken=y),u.items.push(D)}}return p&&p<d&&o(p,"IMPOSSIBLE","Map comment with trailing content"),u.range=[r.offset,d,p??d],u}function BE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=(l==null?void 0:l.nodeClass)??tr,u=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=r.offset,p=null;for(const{start:m,value:y}of r.items){const v=As(m,{indicator:"seq-item-ind",next:y,offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?o(v.end,"BAD_INDENT","All sequence items must start at the same column"):o(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(u.comment=v.comment);continue}const x=y?t(n,y,v,o):e(n,v.end,m,null,v,o);n.schema.compat&&Xu(r.indent,y,o),d=x.range[2],u.items.push(x)}return u.range=[r.offset,d,p??d],u}function so(t,e,n,r){let o="";if(t){let l=!1,c="";for(const u of t){const{source:d,type:p}=u;switch(p){case"space":l=!0;break;case"comment":{n&&!l&&r(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";o?o+=c+m:o=m,c="";break}case"newline":o&&(c+=d),l=!0;break;default:r(u,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:o,offset:e}}const Lu="Block collections are not allowed within flow collections",Iu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function FE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=r.start.source==="{",u=c?"flow map":"flow sequence",d=(l==null?void 0:l.nodeClass)??(c?It:tr),p=new d(n.schema);p.flow=!0;const m=n.atRoot;m&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let y=r.offset+r.start.source.length;for(let E=0;E<r.items.length;++E){const N=r.items[E],{start:T,key:F,sep:O,value:D}=N,z=As(T,{flow:u,indicator:"explicit-key-ind",next:F??(O==null?void 0:O[0]),offset:y,onError:o,parentIndent:r.indent,startOnNewline:!1});if(!z.found){if(!z.anchor&&!z.tag&&!O&&!D){E===0&&z.comma?o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):E<r.items.length-1&&o(z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),z.comment&&(p.comment?p.comment+=`
180
+ `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Yi(e.key)||Yi(e.value))return!0}return!1;default:return!0}}function Yu(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Yi(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function ov(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const o=typeof r=="function"?r:(l,c)=>l===c||Te(l)&&Te(c)&&l.value===c.value;return e.some(l=>o(l.key,n))}const Mg="All mapping items must start at the same column";function BE({composeNode:t,composeEmptyNode:e},n,r,o,l){var m;const c=(l==null?void 0:l.nodeClass)??It,u=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=r.offset,p=null;for(const y of r.items){const{start:v,key:x,sep:k,value:S}=y,E=As(v,{indicator:"explicit-key-ind",next:x??(k==null?void 0:k[0]),offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0}),N=!E.found;if(N){if(x&&(x.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==r.indent&&o(d,"BAD_INDENT",Mg)),!E.anchor&&!E.tag&&!k){p=E.end,E.comment&&(u.comment?u.comment+=`
181
+ `+E.comment:u.comment=E.comment);continue}(E.newlineAfterProp||Yi(x))&&o(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=E.found)==null?void 0:m.indent)!==r.indent&&o(d,"BAD_INDENT",Mg);n.atKey=!0;const T=E.end,F=x?t(n,x,E,o):e(n,T,v,null,E,o);n.schema.compat&&Yu(r.indent,x,o),n.atKey=!1,ov(n,u.items,F)&&o(T,"DUPLICATE_KEY","Map keys must be unique");const O=As(k??[],{indicator:"map-value-ind",next:S,offset:F.range[2],onError:o,parentIndent:r.indent,startOnNewline:!x||x.type==="block-scalar"});if(d=O.end,O.found){N&&((S==null?void 0:S.type)==="block-map"&&!O.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&E.start<O.found.offset-1024&&o(F.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=S?t(n,S,O,o):e(n,d,k,null,O,o);n.schema.compat&&Yu(r.indent,S,o),d=D.range[2];const z=new ct(F,D);n.options.keepSourceTokens&&(z.srcToken=y),u.items.push(z)}else{N&&o(F.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),O.comment&&(F.comment?F.comment+=`
182
+ `+O.comment:F.comment=O.comment);const D=new ct(F);n.options.keepSourceTokens&&(D.srcToken=y),u.items.push(D)}}return p&&p<d&&o(p,"IMPOSSIBLE","Map comment with trailing content"),u.range=[r.offset,d,p??d],u}function FE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=(l==null?void 0:l.nodeClass)??tr,u=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=r.offset,p=null;for(const{start:m,value:y}of r.items){const v=As(m,{indicator:"seq-item-ind",next:y,offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?o(v.end,"BAD_INDENT","All sequence items must start at the same column"):o(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(u.comment=v.comment);continue}const x=y?t(n,y,v,o):e(n,v.end,m,null,v,o);n.schema.compat&&Yu(r.indent,y,o),d=x.range[2],u.items.push(x)}return u.range=[r.offset,d,p??d],u}function so(t,e,n,r){let o="";if(t){let l=!1,c="";for(const u of t){const{source:d,type:p}=u;switch(p){case"space":l=!0;break;case"comment":{n&&!l&&r(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";o?o+=c+m:o=m,c="";break}case"newline":o&&(c+=d),l=!0;break;default:r(u,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:o,offset:e}}const Iu="Block collections are not allowed within flow collections",Mu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function zE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=r.start.source==="{",u=c?"flow map":"flow sequence",d=(l==null?void 0:l.nodeClass)??(c?It:tr),p=new d(n.schema);p.flow=!0;const m=n.atRoot;m&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let y=r.offset+r.start.source.length;for(let E=0;E<r.items.length;++E){const N=r.items[E],{start:T,key:F,sep:O,value:D}=N,z=As(T,{flow:u,indicator:"explicit-key-ind",next:F??(O==null?void 0:O[0]),offset:y,onError:o,parentIndent:r.indent,startOnNewline:!1});if(!z.found){if(!z.anchor&&!z.tag&&!O&&!D){E===0&&z.comma?o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):E<r.items.length-1&&o(z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),z.comment&&(p.comment?p.comment+=`
183
183
  `+z.comment:p.comment=z.comment),y=z.end;continue}!c&&n.options.strict&&Yi(F)&&o(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)z.comma&&o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(z.comma||o(z.start,"MISSING_CHAR",`Missing , between ${u} items`),z.comment){let G="";e:for(const B of T)switch(B.type){case"comma":case"space":break;case"comment":G=B.source.substring(1);break e;default:break e}if(G){let B=p.items[p.items.length-1];je(B)&&(B=B.value??B.key),B.comment?B.comment+=`
184
- `+G:B.comment=G,z.comment=z.comment.substring(G.length+1)}}if(!c&&!O&&!z.found){const G=D?t(n,D,z,o):e(n,z.end,O,null,z,o);p.items.push(G),y=G.range[2],Iu(D)&&o(G.range,"BLOCK_IN_FLOW",Lu)}else{n.atKey=!0;const G=z.end,B=F?t(n,F,z,o):e(n,G,T,null,z,o);Iu(F)&&o(B.range,"BLOCK_IN_FLOW",Lu),n.atKey=!1;const I=As(O??[],{flow:u,indicator:"map-value-ind",next:D,offset:B.range[2],onError:o,parentIndent:r.indent,startOnNewline:!1});if(I.found){if(!c&&!z.found&&n.options.strict){if(O)for(const M of O){if(M===I.found)break;if(M.type==="newline"){o(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}z.start<I.found.offset-1024&&o(I.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]===":"?o(D,"MISSING_CHAR",`Missing space after : in ${u}`):o(I.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const Z=D?t(n,D,I,o):I.found?e(n,I.end,O,null,I,o):null;Z?Iu(D)&&o(Z.range,"BLOCK_IN_FLOW",Lu):I.comment&&(B.comment?B.comment+=`
185
- `+I.comment:B.comment=I.comment);const oe=new ct(B,Z);if(n.options.keepSourceTokens&&(oe.srcToken=N),c){const M=p;iv(n,M.items,B)&&o(G,"DUPLICATE_KEY","Map keys must be unique"),M.items.push(oe)}else{const M=new It(n.schema);M.flow=!0,M.items.push(oe);const H=(Z??B).range;M.range=[B.range[0],H[1],H[2]],p.items.push(M)}y=Z?Z.range[2]:I.end}}const v=c?"}":"]",[x,...k]=r.end;let S=y;if(x&&x.source===v)S=x.offset+x.source.length;else{const E=u[0].toUpperCase()+u.substring(1),N=m?`${E} must end with a ${v}`:`${E} in block collection must be sufficiently indented and end with a ${v}`;o(y,m?"MISSING_CHAR":"BAD_INDENT",N),x&&x.source.length!==1&&k.unshift(x)}if(k.length>0){const E=so(k,S,n.options.strict,o);E.comment&&(p.comment?p.comment+=`
186
- `+E.comment:p.comment=E.comment),p.range=[r.offset,S,E.offset]}else p.range=[r.offset,S,S];return p}function Mu(t,e,n,r,o,l){const c=n.type==="block-map"?DE(t,e,n,r,l):n.type==="block-seq"?BE(t,e,n,r,l):FE(t,e,n,r,l),u=c.constructor;return o==="!"||o===u.tagName?(c.tag=u.tagName,c):(o&&(c.tag=o),c)}function zE(t,e,n,r,o){var v;const l=r.tag,c=l?e.directives.tagName(l.source,x=>o(l,"TAG_RESOLVE_FAILED",x)):null;if(n.type==="block-seq"){const{anchor:x,newlineAfterProp:k}=r,S=x&&l?x.offset>l.offset?x:l:x??l;S&&(!k||k.offset<S.offset)&&o(S,"MISSING_CHAR","Missing newline after block sequence props")}const u=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===It.tagName&&u==="map"||c===tr.tagName&&u==="seq")return Mu(t,e,n,o,c);let d=e.schema.tags.find(x=>x.tag===c&&x.collection===u);if(!d){const x=e.schema.knownTags[c];if(x&&x.collection===u)e.schema.tags.push(Object.assign({},x,{default:!1})),d=x;else return x!=null&&x.collection?o(l,"BAD_COLLECTION_TYPE",`${x.tag} used for ${u} collection, but expects ${x.collection}`,!0):o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),Mu(t,e,n,o,c)}const p=Mu(t,e,n,o,c,d),m=((v=d.resolve)==null?void 0:v.call(d,p,x=>o(l,"TAG_RESOLVE_FAILED",x),e.options))??p,y=De(m)?m:new ue(m);return y.range=p.range,y.tag=c,d!=null&&d.format&&(y.format=d.format),y}function ov(t,e,n){const r=e.offset,o=UE(e,t.options.strict,n);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const l=o.mode===">"?ue.BLOCK_FOLDED:ue.BLOCK_LITERAL,c=e.source?HE(e.source):[];let u=c.length;for(let S=c.length-1;S>=0;--S){const E=c[S][1];if(E===""||E==="\r")u=S;else break}if(u===0){const S=o.chomp==="+"&&c.length>0?`
184
+ `+G:B.comment=G,z.comment=z.comment.substring(G.length+1)}}if(!c&&!O&&!z.found){const G=D?t(n,D,z,o):e(n,z.end,O,null,z,o);p.items.push(G),y=G.range[2],Mu(D)&&o(G.range,"BLOCK_IN_FLOW",Iu)}else{n.atKey=!0;const G=z.end,B=F?t(n,F,z,o):e(n,G,T,null,z,o);Mu(F)&&o(B.range,"BLOCK_IN_FLOW",Iu),n.atKey=!1;const I=As(O??[],{flow:u,indicator:"map-value-ind",next:D,offset:B.range[2],onError:o,parentIndent:r.indent,startOnNewline:!1});if(I.found){if(!c&&!z.found&&n.options.strict){if(O)for(const M of O){if(M===I.found)break;if(M.type==="newline"){o(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}z.start<I.found.offset-1024&&o(I.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]===":"?o(D,"MISSING_CHAR",`Missing space after : in ${u}`):o(I.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const Z=D?t(n,D,I,o):I.found?e(n,I.end,O,null,I,o):null;Z?Mu(D)&&o(Z.range,"BLOCK_IN_FLOW",Iu):I.comment&&(B.comment?B.comment+=`
185
+ `+I.comment:B.comment=I.comment);const oe=new ct(B,Z);if(n.options.keepSourceTokens&&(oe.srcToken=N),c){const M=p;ov(n,M.items,B)&&o(G,"DUPLICATE_KEY","Map keys must be unique"),M.items.push(oe)}else{const M=new It(n.schema);M.flow=!0,M.items.push(oe);const H=(Z??B).range;M.range=[B.range[0],H[1],H[2]],p.items.push(M)}y=Z?Z.range[2]:I.end}}const v=c?"}":"]",[x,...k]=r.end;let S=y;if(x&&x.source===v)S=x.offset+x.source.length;else{const E=u[0].toUpperCase()+u.substring(1),N=m?`${E} must end with a ${v}`:`${E} in block collection must be sufficiently indented and end with a ${v}`;o(y,m?"MISSING_CHAR":"BAD_INDENT",N),x&&x.source.length!==1&&k.unshift(x)}if(k.length>0){const E=so(k,S,n.options.strict,o);E.comment&&(p.comment?p.comment+=`
186
+ `+E.comment:p.comment=E.comment),p.range=[r.offset,S,E.offset]}else p.range=[r.offset,S,S];return p}function ju(t,e,n,r,o,l){const c=n.type==="block-map"?BE(t,e,n,r,l):n.type==="block-seq"?FE(t,e,n,r,l):zE(t,e,n,r,l),u=c.constructor;return o==="!"||o===u.tagName?(c.tag=u.tagName,c):(o&&(c.tag=o),c)}function UE(t,e,n,r,o){var v;const l=r.tag,c=l?e.directives.tagName(l.source,x=>o(l,"TAG_RESOLVE_FAILED",x)):null;if(n.type==="block-seq"){const{anchor:x,newlineAfterProp:k}=r,S=x&&l?x.offset>l.offset?x:l:x??l;S&&(!k||k.offset<S.offset)&&o(S,"MISSING_CHAR","Missing newline after block sequence props")}const u=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===It.tagName&&u==="map"||c===tr.tagName&&u==="seq")return ju(t,e,n,o,c);let d=e.schema.tags.find(x=>x.tag===c&&x.collection===u);if(!d){const x=e.schema.knownTags[c];if(x&&x.collection===u)e.schema.tags.push(Object.assign({},x,{default:!1})),d=x;else return x!=null&&x.collection?o(l,"BAD_COLLECTION_TYPE",`${x.tag} used for ${u} collection, but expects ${x.collection}`,!0):o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),ju(t,e,n,o,c)}const p=ju(t,e,n,o,c,d),m=((v=d.resolve)==null?void 0:v.call(d,p,x=>o(l,"TAG_RESOLVE_FAILED",x),e.options))??p,y=De(m)?m:new ue(m);return y.range=p.range,y.tag=c,d!=null&&d.format&&(y.format=d.format),y}function lv(t,e,n){const r=e.offset,o=HE(e,t.options.strict,n);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const l=o.mode===">"?ue.BLOCK_FOLDED:ue.BLOCK_LITERAL,c=e.source?qE(e.source):[];let u=c.length;for(let S=c.length-1;S>=0;--S){const E=c[S][1];if(E===""||E==="\r")u=S;else break}if(u===0){const S=o.chomp==="+"&&c.length>0?`
187
187
  `.repeat(Math.max(1,c.length-1)):"";let E=r+o.length;return e.source&&(E+=e.source.length),{value:S,type:l,comment:o.comment,range:[r,E,E]}}let d=e.indent+o.indent,p=e.offset+o.length,m=0;for(let S=0;S<u;++S){const[E,N]=c[S];if(N===""||N==="\r")o.indent===0&&E.length>d&&(d=E.length);else{E.length<d&&n(p+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(d=E.length),m=S,d===0&&!t.atRoot&&n(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=E.length+N.length+1}for(let S=c.length-1;S>=u;--S)c[S][0].length>d&&(u=S+1);let y="",v="",x=!1;for(let S=0;S<m;++S)y+=c[S][0].slice(d)+`
188
188
  `;for(let S=m;S<u;++S){let[E,N]=c[S];p+=E.length+N.length+1;const T=N[N.length-1]==="\r";if(T&&(N=N.slice(0,-1)),N&&E.length<d){const O=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;n(p-N.length-(T?2:1),"BAD_INDENT",O),E=""}l===ue.BLOCK_LITERAL?(y+=v+E.slice(d)+N,v=`
189
189
  `):E.length>d||N[0]===" "?(v===" "?v=`
@@ -198,46 +198,46 @@ ${p}
198
198
  `+c[S][0].slice(d);y[y.length-1]!==`
199
199
  `&&(y+=`
200
200
  `);break;default:y+=`
201
- `}const k=r+o.length+e.source.length;return{value:y,type:l,comment:o.comment,range:[r,k,k]}}function UE({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=e[0],l=o[0];let c=0,u="",d=-1;for(let v=1;v<o.length;++v){const x=o[v];if(!u&&(x==="-"||x==="+"))u=x;else{const k=Number(x);!c&&k?c=k:d===-1&&(d=t+v)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,m="",y=o.length;for(let v=1;v<e.length;++v){const x=e[v];switch(x.type){case"space":p=!0;case"newline":y+=x.source.length;break;case"comment":n&&!p&&r(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=x.source.length,m=x.source.substring(1);break;case"error":r(x,"UNEXPECTED_TOKEN",x.message),y+=x.source.length;break;default:{const k=`Unexpected token in block scalar header: ${x.type}`;r(x,"UNEXPECTED_TOKEN",k);const S=x.source;S&&typeof S=="string"&&(y+=S.length)}}}return{mode:l,indent:c,chomp:u,comment:m,length:y}}function HE(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),l=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let c=1;c<e.length;c+=2)l.push([e[c],e[c+1]]);return l}function lv(t,e,n){const{offset:r,type:o,source:l,end:c}=t;let u,d;const p=(v,x,k)=>n(r+v,x,k);switch(o){case"scalar":u=ue.PLAIN,d=qE(l,p);break;case"single-quoted-scalar":u=ue.QUOTE_SINGLE,d=VE(l,p);break;case"double-quoted-scalar":u=ue.QUOTE_DOUBLE,d=WE(l,p);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}const m=r+l.length,y=so(c,m,e,n);return{value:d,type:u,comment:y.comment,range:[r,m,y.offset]}}function qE(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),av(t)}function VE(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),av(t.slice(1,-1)).replace(/''/g,"'")}function av(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
201
+ `}const k=r+o.length+e.source.length;return{value:y,type:l,comment:o.comment,range:[r,k,k]}}function HE({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=e[0],l=o[0];let c=0,u="",d=-1;for(let v=1;v<o.length;++v){const x=o[v];if(!u&&(x==="-"||x==="+"))u=x;else{const k=Number(x);!c&&k?c=k:d===-1&&(d=t+v)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,m="",y=o.length;for(let v=1;v<e.length;++v){const x=e[v];switch(x.type){case"space":p=!0;case"newline":y+=x.source.length;break;case"comment":n&&!p&&r(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=x.source.length,m=x.source.substring(1);break;case"error":r(x,"UNEXPECTED_TOKEN",x.message),y+=x.source.length;break;default:{const k=`Unexpected token in block scalar header: ${x.type}`;r(x,"UNEXPECTED_TOKEN",k);const S=x.source;S&&typeof S=="string"&&(y+=S.length)}}}return{mode:l,indent:c,chomp:u,comment:m,length:y}}function qE(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),l=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let c=1;c<e.length;c+=2)l.push([e[c],e[c+1]]);return l}function av(t,e,n){const{offset:r,type:o,source:l,end:c}=t;let u,d;const p=(v,x,k)=>n(r+v,x,k);switch(o){case"scalar":u=ue.PLAIN,d=VE(l,p);break;case"single-quoted-scalar":u=ue.QUOTE_SINGLE,d=WE(l,p);break;case"double-quoted-scalar":u=ue.QUOTE_DOUBLE,d=KE(l,p);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}const m=r+l.length,y=so(c,m,e,n);return{value:d,type:u,comment:y.comment,range:[r,m,y.offset]}}function VE(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),cv(t)}function WE(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),cv(t.slice(1,-1)).replace(/''/g,"'")}function cv(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
202
202
  `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
203
203
  `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let o=r[1],l=" ",c=e.lastIndex;for(n.lastIndex=c;r=n.exec(t);)r[1]===""?l===`
204
204
  `?o+=l:l=`
205
- `:(o+=l+r[1],l=" "),c=n.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=c,r=u.exec(t),o+l+((r==null?void 0:r[1])??"")}function WE(t,e){let n="";for(let r=1;r<t.length-1;++r){const o=t[r];if(!(o==="\r"&&t[r+1]===`
205
+ `:(o+=l+r[1],l=" "),c=n.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=c,r=u.exec(t),o+l+((r==null?void 0:r[1])??"")}function KE(t,e){let n="";for(let r=1;r<t.length-1;++r){const o=t[r];if(!(o==="\r"&&t[r+1]===`
206
206
  `))if(o===`
207
- `){const{fold:l,offset:c}=KE(t,r);n+=l,r=c}else if(o==="\\"){let l=t[++r];const c=GE[l];if(c)n+=c;else if(l===`
207
+ `){const{fold:l,offset:c}=GE(t,r);n+=l,r=c}else if(o==="\\"){let l=t[++r];const c=QE[l];if(c)n+=c;else if(l===`
208
208
  `)for(l=t[r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="\r"&&t[r+1]===`
209
- `)for(l=t[++r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="x"||l==="u"||l==="U"){const u={x:2,u:4,U:8}[l];n+=QE(t,r+1,u,e),r+=u}else{const u=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),n+=u}}else if(o===" "||o===" "){const l=r;let c=t[r+1];for(;c===" "||c===" ";)c=t[++r+1];c!==`
209
+ `)for(l=t[++r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="x"||l==="u"||l==="U"){const u={x:2,u:4,U:8}[l];n+=JE(t,r+1,u,e),r+=u}else{const u=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),n+=u}}else if(o===" "||o===" "){const l=r;let c=t[r+1];for(;c===" "||c===" ";)c=t[++r+1];c!==`
210
210
  `&&!(c==="\r"&&t[r+2]===`
211
- `)&&(n+=r>l?t.slice(l,r+1):o)}else n+=o}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function KE(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
211
+ `)&&(n+=r>l?t.slice(l,r+1):o)}else n+=o}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function GE(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
212
212
  `||r==="\r")&&!(r==="\r"&&t[e+2]!==`
213
213
  `);)r===`
214
214
  `&&(n+=`
215
- `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const GE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
216
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function QE(t,e,n,r){const o=t.substr(e,n),c=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){const u=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(c)}function cv(t,e,n,r){const{value:o,type:l,comment:c,range:u}=e.type==="block-scalar"?ov(t,e,r):lv(e,t.options.strict,r),d=n?t.directives.tagName(n.source,y=>r(n,"TAG_RESOLVE_FAILED",y)):null;let p;t.options.stringKeys&&t.atKey?p=t.schema[dn]:d?p=JE(t.schema,o,d,n,r):e.type==="scalar"?p=XE(t,o,e,r):p=t.schema[dn];let m;try{const y=p.resolve(o,v=>r(n??e,"TAG_RESOLVE_FAILED",v),t.options);m=Te(y)?y:new ue(y)}catch(y){const v=y instanceof Error?y.message:String(y);r(n??e,"TAG_RESOLVE_FAILED",v),m=new ue(o)}return m.range=u,m.source=o,l&&(m.type=l),d&&(m.tag=d),p.format&&(m.format=p.format),c&&(m.comment=c),m}function JE(t,e,n,r,o){var u;if(n==="!")return t[dn];const l=[];for(const d of t.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)l.push(d);else return d;for(const d of l)if((u=d.test)!=null&&u.test(e))return d;const c=t.knownTags[n];return c&&!c.collection?(t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[dn])}function XE({atKey:t,directives:e,schema:n},r,o,l){const c=n.tags.find(u=>{var d;return(u.default===!0||t&&u.default==="key")&&((d=u.test)==null?void 0:d.test(r))})||n[dn];if(n.compat){const u=n.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(r))})??n[dn];if(c.tag!==u.tag){const d=e.tagString(c.tag),p=e.tagString(u.tag),m=`Value may be parsed as either ${d} or ${p}`;l(o,"TAG_RESOLVE_FAILED",m,!0)}}return c}function YE(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let o=e[r];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=e[++r];(o==null?void 0:o.type)==="space";)t+=o.source.length,o=e[++r];break}}return t}const ZE={composeNode:uv,composeEmptyNode:Vf};function uv(t,e,n,r){const o=t.atKey,{spaceBefore:l,comment:c,anchor:u,tag:d}=n;let p,m=!0;switch(e.type){case"alias":p=ek(t,e,r),(u||d)&&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":p=cv(t,e,d,r),u&&(p.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=zE(ZE,t,e,n,r),u&&(p.anchor=u.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",y),p=Vf(t,e.offset,void 0,null,n,r),m=!1}}return u&&p.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Te(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&r(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(p.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?p.comment=c:p.commentBefore=c),t.options.keepSourceTokens&&m&&(p.srcToken=e),p}function Vf(t,e,n,r,{spaceBefore:o,comment:l,anchor:c,tag:u,end:d},p){const m={type:"scalar",offset:YE(e,n,r),indent:-1,source:""},y=cv(t,m,u,p);return c&&(y.anchor=c.source.substring(1),y.anchor===""&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(y.spaceBefore=!0),l&&(y.comment=l,y.range[2]=d),y}function ek({options:t},{offset:e,source:n,end:r},o){const l=new da(n.substring(1));l.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&o(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=e+n.length,u=so(r,c,t.strict,o);return l.range=[e,c,u.offset],u.comment&&(l.comment=u.comment),l}function tk(t,e,{offset:n,start:r,value:o,end:l},c){const u=Object.assign({_directives:e},t),d=new Bs(void 0,u),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=As(r,{indicator:"doc-start",next:o??(l==null?void 0:l[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!m.hasNewline&&c(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=o?uv(p,o,m,c):Vf(p,m.end,r,null,m,c);const y=d.contents.range[2],v=so(l,y,!1,c);return v.comment&&(d.comment=v.comment),d.range=[n,y,v.offset],d}function Ii(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Mg(t){var o;let e="",n=!1,r=!1;for(let l=0;l<t.length;++l){const c=t[l];switch(c[0]){case"#":e+=(e===""?"":r?`
215
+ `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const QE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
216
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function JE(t,e,n,r){const o=t.substr(e,n),c=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){const u=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(c)}function uv(t,e,n,r){const{value:o,type:l,comment:c,range:u}=e.type==="block-scalar"?lv(t,e,r):av(e,t.options.strict,r),d=n?t.directives.tagName(n.source,y=>r(n,"TAG_RESOLVE_FAILED",y)):null;let p;t.options.stringKeys&&t.atKey?p=t.schema[dn]:d?p=XE(t.schema,o,d,n,r):e.type==="scalar"?p=YE(t,o,e,r):p=t.schema[dn];let m;try{const y=p.resolve(o,v=>r(n??e,"TAG_RESOLVE_FAILED",v),t.options);m=Te(y)?y:new ue(y)}catch(y){const v=y instanceof Error?y.message:String(y);r(n??e,"TAG_RESOLVE_FAILED",v),m=new ue(o)}return m.range=u,m.source=o,l&&(m.type=l),d&&(m.tag=d),p.format&&(m.format=p.format),c&&(m.comment=c),m}function XE(t,e,n,r,o){var u;if(n==="!")return t[dn];const l=[];for(const d of t.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)l.push(d);else return d;for(const d of l)if((u=d.test)!=null&&u.test(e))return d;const c=t.knownTags[n];return c&&!c.collection?(t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[dn])}function YE({atKey:t,directives:e,schema:n},r,o,l){const c=n.tags.find(u=>{var d;return(u.default===!0||t&&u.default==="key")&&((d=u.test)==null?void 0:d.test(r))})||n[dn];if(n.compat){const u=n.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(r))})??n[dn];if(c.tag!==u.tag){const d=e.tagString(c.tag),p=e.tagString(u.tag),m=`Value may be parsed as either ${d} or ${p}`;l(o,"TAG_RESOLVE_FAILED",m,!0)}}return c}function ZE(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let o=e[r];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=e[++r];(o==null?void 0:o.type)==="space";)t+=o.source.length,o=e[++r];break}}return t}const ek={composeNode:fv,composeEmptyNode:Vf};function fv(t,e,n,r){const o=t.atKey,{spaceBefore:l,comment:c,anchor:u,tag:d}=n;let p,m=!0;switch(e.type){case"alias":p=tk(t,e,r),(u||d)&&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":p=uv(t,e,d,r),u&&(p.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=UE(ek,t,e,n,r),u&&(p.anchor=u.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",y),p=Vf(t,e.offset,void 0,null,n,r),m=!1}}return u&&p.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Te(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&r(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(p.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?p.comment=c:p.commentBefore=c),t.options.keepSourceTokens&&m&&(p.srcToken=e),p}function Vf(t,e,n,r,{spaceBefore:o,comment:l,anchor:c,tag:u,end:d},p){const m={type:"scalar",offset:ZE(e,n,r),indent:-1,source:""},y=uv(t,m,u,p);return c&&(y.anchor=c.source.substring(1),y.anchor===""&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(y.spaceBefore=!0),l&&(y.comment=l,y.range[2]=d),y}function tk({options:t},{offset:e,source:n,end:r},o){const l=new da(n.substring(1));l.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&o(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=e+n.length,u=so(r,c,t.strict,o);return l.range=[e,c,u.offset],u.comment&&(l.comment=u.comment),l}function nk(t,e,{offset:n,start:r,value:o,end:l},c){const u=Object.assign({_directives:e},t),d=new Bs(void 0,u),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=As(r,{indicator:"doc-start",next:o??(l==null?void 0:l[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!m.hasNewline&&c(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=o?fv(p,o,m,c):Vf(p,m.end,r,null,m,c);const y=d.contents.range[2],v=so(l,y,!1,c);return v.comment&&(d.comment=v.comment),d.range=[n,y,v.offset],d}function Ii(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function jg(t){var o;let e="",n=!1,r=!1;for(let l=0;l<t.length;++l){const c=t[l];switch(c[0]){case"#":e+=(e===""?"":r?`
217
217
 
218
218
  `:`
219
- `)+(c.substring(1)||" "),n=!0,r=!1;break;case"%":((o=t[l+1])==null?void 0:o[0])!=="#"&&(l+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class Wf{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,o,l)=>{const c=Ii(n);l?this.warnings.push(new sv(c,r,o)):this.errors.push(new Lr(c,r,o))},this.directives=new dt({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:o}=Mg(this.prelude);if(r){const l=e.contents;if(n)e.comment=e.comment?`${e.comment}
219
+ `)+(c.substring(1)||" "),n=!0,r=!1;break;case"%":((o=t[l+1])==null?void 0:o[0])!=="#"&&(l+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class Wf{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,o,l)=>{const c=Ii(n);l?this.warnings.push(new iv(c,r,o)):this.errors.push(new Lr(c,r,o))},this.directives=new dt({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:o}=jg(this.prelude);if(r){const l=e.contents;if(n)e.comment=e.comment?`${e.comment}
220
220
  ${r}`:r;else if(o||e.directives.docStart||!l)e.commentBefore=r;else if($e(l)&&!l.flow&&l.items.length>0){let c=l.items[0];je(c)&&(c=c.key);const u=c.commentBefore;c.commentBefore=u?`${r}
221
221
  ${u}`:r}else{const c=l.commentBefore;l.commentBefore=c?`${r}
222
- ${c}`:r}}n?(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:Mg(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const o of e)yield*this.next(o);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,o)=>{const l=Ii(e);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",r,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=tk(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Lr(Ii(e),"UNEXPECTED_TOKEN",n);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 Lr(Ii(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=so(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
223
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Lr(Ii(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-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),o=new Bs(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,n,n],this.decorate(o,!1),yield o}}}function nk(t,e=!0,n){if(t){const r=(o,l,c)=>{const u=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(n)n(u,l,c);else throw new Lr([u,u+1],l,c)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return lv(t,e,r);case"block-scalar":return ov({options:{strict:e}},t,r)}}return null}function rk(t,e){const{implicitKey:n=!1,indent:r,inFlow:o=!1,offset:l=-1,type:c="PLAIN"}=e,u=no({type:c,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:r,source:`
222
+ ${c}`:r}}n?(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:jg(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const o of e)yield*this.next(o);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,o)=>{const l=Ii(e);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",r,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=nk(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Lr(Ii(e),"UNEXPECTED_TOKEN",n);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 Lr(Ii(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=so(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
223
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Lr(Ii(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-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),o=new Bs(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,n,n],this.decorate(o,!1),yield o}}}function rk(t,e=!0,n){if(t){const r=(o,l,c)=>{const u=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(n)n(u,l,c);else throw new Lr([u,u+1],l,c)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return av(t,e,r);case"block-scalar":return lv({options:{strict:e}},t,r)}}return null}function sk(t,e){const{implicitKey:n=!1,indent:r,inFlow:o=!1,offset:l=-1,type:c="PLAIN"}=e,u=no({type:c,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:r,source:`
224
224
  `}];switch(u[0]){case"|":case">":{const p=u.indexOf(`
225
225
  `),m=u.substring(0,p),y=u.substring(p+1)+`
226
- `,v=[{type:"block-scalar-header",offset:l,indent:r,source:m}];return fv(v,d)||v.push({type:"newline",offset:-1,indent:r,source:`
227
- `}),{type:"block-scalar",offset:l,indent:r,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:l,indent:r,source:u,end:d};case"'":return{type:"single-quoted-scalar",offset:l,indent:r,source:u,end:d};default:return{type:"scalar",offset:l,indent:r,source:u,end:d}}}function sk(t,e,n={}){let{afterKey:r=!1,implicitKey:o=!1,inFlow:l=!1,type:c}=n,u="indent"in t?t.indent:null;if(r&&typeof u=="number"&&(u+=2),!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const p=t.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=no({type:c,value:e},{implicitKey:o||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":ik(t,d);break;case'"':ju(t,d,"double-quoted-scalar");break;case"'":ju(t,d,"single-quoted-scalar");break;default:ju(t,d,"scalar")}}function ik(t,e){const n=e.indexOf(`
226
+ `,v=[{type:"block-scalar-header",offset:l,indent:r,source:m}];return dv(v,d)||v.push({type:"newline",offset:-1,indent:r,source:`
227
+ `}),{type:"block-scalar",offset:l,indent:r,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:l,indent:r,source:u,end:d};case"'":return{type:"single-quoted-scalar",offset:l,indent:r,source:u,end:d};default:return{type:"scalar",offset:l,indent:r,source:u,end:d}}}function ik(t,e,n={}){let{afterKey:r=!1,implicitKey:o=!1,inFlow:l=!1,type:c}=n,u="indent"in t?t.indent:null;if(r&&typeof u=="number"&&(u+=2),!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const p=t.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=no({type:c,value:e},{implicitKey:o||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":ok(t,d);break;case'"':Pu(t,d,"double-quoted-scalar");break;case"'":Pu(t,d,"single-quoted-scalar");break;default:Pu(t,d,"scalar")}}function ok(t,e){const n=e.indexOf(`
228
228
  `),r=e.substring(0,n),o=e.substring(n+1)+`
229
- `;if(t.type==="block-scalar"){const l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=r,t.source=o}else{const{offset:l}=t,c="indent"in t?t.indent:-1,u=[{type:"block-scalar-header",offset:l,indent:c,source:r}];fv(u,"end"in t?t.end:void 0)||u.push({type:"newline",offset:-1,indent:c,source:`
230
- `});for(const d of Object.keys(t))d!=="type"&&d!=="offset"&&delete t[d];Object.assign(t,{type:"block-scalar",indent:c,props:u,source:o})}}function fv(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function ju(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let o=e.length;t.props[0].type==="block-scalar-header"&&(o-=t.props[0].source.length);for(const l of r)l.offset+=o;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const o={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
231
- `};delete t.items,Object.assign(t,{type:n,source:e,end:[o]});break}default:{const r="indent"in t?t.indent:-1,o="end"in t&&Array.isArray(t.end)?t.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:n,indent:r,source:e,end:o})}}}const ok=t=>"type"in t?ra(t):zl(t);function ra(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=ra(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=zl(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=zl(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=zl(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function zl({start:t,key:e,sep:n,value:r}){let o="";for(const l of t)o+=l.source;if(e&&(o+=ra(e)),n)for(const l of n)o+=l.source;return r&&(o+=ra(r)),o}const Yu=Symbol("break visit"),lk=Symbol("skip children"),dv=Symbol("remove item");function jr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),hv(Object.freeze([]),t,e)}jr.BREAK=Yu;jr.SKIP=lk;jr.REMOVE=dv;jr.itemAtPath=(t,e)=>{let n=t;for(const[r,o]of e){const l=n==null?void 0:n[r];if(l&&"items"in l)n=l.items[o];else return}return n};jr.parentCollection=(t,e)=>{const n=jr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],o=n==null?void 0:n[r];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function hv(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const o of["key","value"]){const l=e[o];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){const u=hv(Object.freeze(t.concat([[o,c]])),l.items[c],n);if(typeof u=="number")c=u-1;else{if(u===Yu)return Yu;u===dv&&(l.items.splice(c,1),c-=1)}}typeof r=="function"&&o==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const _a="\uFEFF",Ea="",ka="",Zi="",ak=t=>!!t&&"items"in t,ck=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function uk(t){switch(t){case _a:return"<BOM>";case Ea:return"<DOC>";case ka:return"<FLOW_END>";case Zi:return"<SCALAR>";default:return JSON.stringify(t)}}function pv(t){switch(t){case _a:return"byte-order-mark";case Ea:return"doc-mode";case ka:return"flow-error-end";case Zi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
229
+ `;if(t.type==="block-scalar"){const l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=r,t.source=o}else{const{offset:l}=t,c="indent"in t?t.indent:-1,u=[{type:"block-scalar-header",offset:l,indent:c,source:r}];dv(u,"end"in t?t.end:void 0)||u.push({type:"newline",offset:-1,indent:c,source:`
230
+ `});for(const d of Object.keys(t))d!=="type"&&d!=="offset"&&delete t[d];Object.assign(t,{type:"block-scalar",indent:c,props:u,source:o})}}function dv(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Pu(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let o=e.length;t.props[0].type==="block-scalar-header"&&(o-=t.props[0].source.length);for(const l of r)l.offset+=o;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const o={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
231
+ `};delete t.items,Object.assign(t,{type:n,source:e,end:[o]});break}default:{const r="indent"in t?t.indent:-1,o="end"in t&&Array.isArray(t.end)?t.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:n,indent:r,source:e,end:o})}}}const lk=t=>"type"in t?ra(t):zl(t);function ra(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=ra(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=zl(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=zl(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=zl(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function zl({start:t,key:e,sep:n,value:r}){let o="";for(const l of t)o+=l.source;if(e&&(o+=ra(e)),n)for(const l of n)o+=l.source;return r&&(o+=ra(r)),o}const Zu=Symbol("break visit"),ak=Symbol("skip children"),hv=Symbol("remove item");function jr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),pv(Object.freeze([]),t,e)}jr.BREAK=Zu;jr.SKIP=ak;jr.REMOVE=hv;jr.itemAtPath=(t,e)=>{let n=t;for(const[r,o]of e){const l=n==null?void 0:n[r];if(l&&"items"in l)n=l.items[o];else return}return n};jr.parentCollection=(t,e)=>{const n=jr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],o=n==null?void 0:n[r];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function pv(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const o of["key","value"]){const l=e[o];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){const u=pv(Object.freeze(t.concat([[o,c]])),l.items[c],n);if(typeof u=="number")c=u-1;else{if(u===Zu)return Zu;u===hv&&(l.items.splice(c,1),c-=1)}}typeof r=="function"&&o==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const _a="\uFEFF",Ea="",ka="",Zi="",ck=t=>!!t&&"items"in t,uk=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function fk(t){switch(t){case _a:return"<BOM>";case Ea:return"<DOC>";case ka:return"<FLOW_END>";case Zi:return"<SCALAR>";default:return JSON.stringify(t)}}function gv(t){switch(t){case _a:return"byte-order-mark";case Ea:return"doc-mode";case ka:return"flow-error-end";case Zi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
232
232
  `:case`\r
233
- `: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(t[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 fk=Object.freeze(Object.defineProperty({__proto__:null,BOM:_a,DOCUMENT:Ea,FLOW_END:ka,SCALAR:Zi,createScalarToken:rk,isCollection:ak,isScalar:ck,prettyToken:uk,resolveAsScalar:nk,setScalarValue:sk,stringify:ok,tokenType:pv,visit:jr},Symbol.toStringTag,{value:"Module"}));function en(t){switch(t){case void 0:case" ":case`
234
- `:case"\r":case" ":return!0;default:return!1}}const jg=new Set("0123456789ABCDEFabcdef"),dk=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Cl=new Set(",[]{}"),hk=new Set(` ,[]{}
235
- \r `),Pu=t=>!t||hk.has(t);class gv{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,n=!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=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
233
+ `: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(t[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 dk=Object.freeze(Object.defineProperty({__proto__:null,BOM:_a,DOCUMENT:Ea,FLOW_END:ka,SCALAR:Zi,createScalarToken:sk,isCollection:ck,isScalar:uk,prettyToken:fk,resolveAsScalar:rk,setScalarValue:ik,stringify:lk,tokenType:gv,visit:jr},Symbol.toStringTag,{value:"Module"}));function en(t){switch(t){case void 0:case" ":case`
234
+ `:case"\r":case" ":return!0;default:return!1}}const Pg=new Set("0123456789ABCDEFabcdef"),hk=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Cl=new Set(",[]{}"),pk=new Set(` ,[]{}
235
+ \r `),Ou=t=>!t||pk.has(t);class mv{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,n=!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=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
236
236
  `?!0:n==="\r"?this.buffer[e+1]===`
237
237
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const o=this.buffer[r+e+1];if(o===`
238
238
  `||!o&&!this.atEnd)return e+r+1}return n===`
239
239
  `||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&en(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(`
240
- `,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]===_a&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const l=e[r-1];if(l===" "||l===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const l=e[n-1];if(l===" "||l===" ")n-=1;else break}const o=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Ea,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 n=this.peek(3);if((n==="---"||n==="...")&&en(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!en(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&en(n)){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 n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);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(Pu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&o[0]!=="#"||r===0&&(o.startsWith("---")||o.startsWith("..."))&&en(o[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield ka,yield*this.parseLineStart();let l=0;for(;o[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),o[l]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-l),"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(Pu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||en(c)||c===",")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 n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let o=r.indexOf(`
240
+ `,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]===_a&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const l=e[r-1];if(l===" "||l===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const l=e[n-1];if(l===" "||l===" ")n-=1;else break}const o=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Ea,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 n=this.peek(3);if((n==="---"||n==="...")&&en(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!en(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&en(n)){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 n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);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(Ou),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&o[0]!=="#"||r===0&&(o.startsWith("---")||o.startsWith("..."))&&en(o[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield ka,yield*this.parseLineStart();let l=0;for(;o[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),o[l]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-l),"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(Ou),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||en(c)||c===",")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 n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let o=r.indexOf(`
241
241
  `,this.pos);if(o!==-1){for(;o!==-1;){const l=this.continueScalar(o+1);if(l===-1)break;o=r.indexOf(`
242
242
  `,l)}o!==-1&&(n=o-(r[o-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>en(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let l=this.pos;r=this.buffer[l];++l)switch(r){case" ":n+=1;break;case`
243
243
  `:e=l,n=0;break;case"\r":{const c=this.buffer[l+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
@@ -247,10 +247,10 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
247
247
  `&&l>=this.pos&&l+1+n>u)e=l;else break}while(!0);return yield Zi,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,o;for(;o=this.buffer[++r];)if(o===":"){const l=this.buffer[r+1];if(en(l)||e&&Cl.has(l))break;n=r}else if(en(o)){let l=this.buffer[r+1];if(o==="\r"&&(l===`
248
248
  `?(r+=1,o=`
249
249
  `,l=this.buffer[r+1]):n=r),l==="#"||e&&Cl.has(l))break;if(o===`
250
- `){const c=this.continueScalar(r+1);if(c===-1)break;r=Math.max(r,c-2)}}else{if(e&&Cl.has(o))break;n=r}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Zi,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Pu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(en(n)||e&&Cl.has(n))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,n=this.buffer[e];for(;!en(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(dk.has(n))n=this.buffer[++e];else if(n==="%"&&jg.has(this.buffer[e+1])&&jg.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
250
+ `){const c=this.continueScalar(r+1);if(c===-1)break;r=Math.max(r,c-2)}}else{if(e&&Cl.has(o))break;n=r}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Zi,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ou))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(en(n)||e&&Cl.has(n))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,n=this.buffer[e];for(;!en(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(hk.has(n))n=this.buffer[++e];else if(n==="%"&&Pg.has(this.buffer[e+1])&&Pg.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
251
251
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
252
- `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const o=n-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=n),o}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class mv{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const l=n+r>>1;this.lineStarts[l]<e?n=l+1:r=l}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const o=this.lineStarts[n-1];return{line:n,col:e-o+1}}}}function Cr(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Pg(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function yv(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Nl(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function gs(t){var n;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function Og(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Cr(e.start,"explicit-key-ind")&&!Cr(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,yv(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 Kf{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 gv,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=pv(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){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 n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Og(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const o=r.items[r.items.length-1];if(o.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=n;else{Object.assign(o,{key:n,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=r.items[r.items.length-1];o.value?r.items.push({start:[],value:n}):o.value=n;break}case"flow-collection":{const o=r.items[r.items.length-1];!o||o.value?r.items.push({start:[],key:n,sep:[]}):o.sep?o.value=n:Object.assign(o,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const o=n.items[n.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Pg(o.start)===-1&&(n.indent===0||o.start.every(l=>l.type!=="comment"||l.indent<n.indent))&&(r.type==="document"?r.end=o.start:r.items.push({start:o.start}),n.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":{Pg(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 n=this.startBlockValue(e);n?this.stack.push(n):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 n=Nl(this.peek(2)),r=gs(n);let o;e.end?(o=e.end,o.push(this.sourceToken),delete e.end):o=[this.sourceToken];const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}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 n=this.source.indexOf(`
252
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const o=n-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=n),o}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class yv{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const l=n+r>>1;this.lineStarts[l]<e?n=l+1:r=l}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const o=this.lineStarts[n-1];return{line:n,col:e-o+1}}}}function Cr(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Og(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function vv(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Nl(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function gs(t){var n;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function Rg(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Cr(e.start,"explicit-key-ind")&&!Cr(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,vv(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 Kf{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 mv,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=gv(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){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 n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Rg(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const o=r.items[r.items.length-1];if(o.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=n;else{Object.assign(o,{key:n,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=r.items[r.items.length-1];o.value?r.items.push({start:[],value:n}):o.value=n;break}case"flow-collection":{const o=r.items[r.items.length-1];!o||o.value?r.items.push({start:[],key:n,sep:[]}):o.sep?o.value=n:Object.assign(o,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const o=n.items[n.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Og(o.start)===-1&&(n.indent===0||o.start.every(l=>l.type!=="comment"||l.indent<n.indent))&&(r.type==="document"?r.end=o.start:r.items.push({start:o.start}),n.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":{Og(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 n=this.startBlockValue(e);n?this.stack.push(n):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 n=Nl(this.peek(2)),r=gs(n);let o;e.end?(o=e.end,o.push(this.sourceToken),delete e.end):o=[this.sourceToken];const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}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 n=this.source.indexOf(`
253
253
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
254
- `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,l=o&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&n.sep&&!n.value){const u=[];for(let d=0;d<n.sep.length;++d){const p=n.sep[d];switch(p.type){case"newline":u.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(c.push(this.sourceToken),e.items.push({start:c,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(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Cr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(yv(n.key)&&!Cr(n.sep,"newline")){const u=gs(n.start),d=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:d,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(Cr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=gs(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?e.items.push({start:c,key:null,sep:[this.sourceToken]}):Cr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);l||n.value?(e.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(e);if(u){o&&u.type!=="block-seq"&&e.items.push({start:c}),this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Cr(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=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":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:o,sep:[]}):n.sep?this.stack.push(o):Object.assign(n,{key:o,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 o=Nl(r),l=gs(o);Og(e);const c=e.end.splice(1,e.end.length);c.push(this.sourceToken);const u={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:l,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
254
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,l=o&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&n.sep&&!n.value){const u=[];for(let d=0;d<n.sep.length;++d){const p=n.sep[d];switch(p.type){case"newline":u.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(c.push(this.sourceToken),e.items.push({start:c,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(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Cr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(vv(n.key)&&!Cr(n.sep,"newline")){const u=gs(n.start),d=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:d,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(Cr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=gs(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?e.items.push({start:c,key:null,sep:[this.sourceToken]}):Cr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);l||n.value?(e.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(e);if(u){o&&u.type!=="block-seq"&&e.items.push({start:c}),this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Cr(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=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":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:o,sep:[]}):n.sep?this.stack.push(o):Object.assign(n,{key:o,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 o=Nl(r),l=gs(o);Rg(e);const c=e.end.splice(1,e.end.length);c.push(this.sourceToken);const u={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:l,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
255
255
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
256
- `,n)+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 n=Nl(e),r=gs(n);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 n=Nl(e),r=gs(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!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 vv(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new mv||null,prettyErrors:e}}function pk(t,e={}){const{lineCounter:n,prettyErrors:r}=vv(e),o=new Kf(n==null?void 0:n.addNewLine),l=new Wf(e),c=Array.from(l.compose(o.parse(t)));if(r&&n)for(const u of c)u.errors.forEach(na(t,n)),u.warnings.forEach(na(t,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function wv(t,e={}){const{lineCounter:n,prettyErrors:r}=vv(e),o=new Kf(n==null?void 0:n.addNewLine),l=new Wf(e);let c=null;for(const u of l.compose(o.parse(t),!0,t.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new Lr(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(c.errors.forEach(na(t,n)),c.warnings.forEach(na(t,n))),c}function gk(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const o=wv(t,n);if(!o)return null;if(o.warnings.forEach(l=>By(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function mk(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){const{keepUndefined:o}=n??e??{};if(!o)return}return $r(t)&&!r?t.toString(n):new Bs(t,r,n).toString(n)}const Sv=Object.freeze(Object.defineProperty({__proto__:null,Alias:da,CST:fk,Composer:Wf,Document:Bs,Lexer:gv,LineCounter:mv,Pair:ct,Parser:Kf,Scalar:ue,Schema:xa,YAMLError:qf,YAMLMap:It,YAMLParseError:Lr,YAMLSeq:tr,YAMLWarning:sv,isAlias:Rr,isCollection:$e,isDocument:$r,isMap:Os,isNode:De,isPair:je,isScalar:Te,isSeq:Rs,parse:gk,parseAllDocuments:pk,parseDocument:wv,stringify:mk,visit:er,visitAsync:fa},Symbol.toStringTag,{value:"Module"})),yk=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const[u,d]=$.useState("action"),[p]=Nn("shouldPopulateCanvasFromScreenshot",!1),m=$.useMemo(()=>xk(t),[t]),{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}=$.useMemo(()=>{const S=m[u];return S?_k(S,p):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,u,p]),k=$.useMemo(()=>y!==void 0?{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}:void 0,[y,v,x]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(af,{children:[w.jsx(jt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>o(!r)}),["action","before","after"].map(S=>w.jsx(Em,{id:S,title:Sk(S),selected:u===S,onSelect:()=>d(S)},S)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(jt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(k!=null&&k.popoutUrl),onClick:()=>{const S=window.open((k==null?void 0:k.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{new _y(S,{isUnderTest:_v,sdkLanguage:e,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(vk,{snapshotUrls:k,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})]})},vk=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const u=$.useRef(null),d=$.useRef(null),[p,m]=$.useState({viewport:Ev,url:""}),y=$.useRef({iteration:0,visibleIframe:0});return $.useEffect(()=>{(async()=>{const v=y.current.iteration+1,x=1-y.current.visibleIframe;y.current.iteration=v;const k=await Ek(t==null?void 0:t.snapshotInfoUrl);if(y.current.iteration!==v)return;const S=[u,d][x].current;if(S){let E=()=>{};const N=new Promise(T=>E=T);try{S.addEventListener("load",E),S.addEventListener("error",E);const T=(t==null?void 0:t.snapshotUrl)||kk;S.contentWindow?S.contentWindow.location.replace(T):S.src=T,await N}catch{}finally{S.removeEventListener("load",E),S.removeEventListener("error",E)}}y.current.iteration===v&&(y.current.visibleIframe=x,m(k))})()},[t]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&r&&o(!1)},children:[w.jsx(Rg,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:u.current,iteration:y.current.iteration}),w.jsx(Rg,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:d.current,iteration:y.current.iteration}),w.jsx(wk,{snapshotInfo:p,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:u,name:"snapshot",title:"DOM Snapshot",className:Ue(y.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ue(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},wk=({snapshotInfo:t,children:e})=>{const[n,r]=Pr(),l={width:t.viewport.width,height:t.viewport.height+40},c=Math.min(n.width/l.width,n.height/l.height,1),u={x:(n.width-l.width)/2,y:(n.height-l.height)/2};return w.jsx("div",{ref:r,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:l.width+"px",height:l.height+"px",transform:`translate(${u.x}px, ${u.y}px) scale(${c})`},children:[w.jsx(lE,{url:t.url}),e]})})};function Sk(t){return t==="before"?"Before":t==="after"?"After":t==="action"?"Action":t}const Rg=({iframe:t,isInspecting:e,sdkLanguage:n,testIdAttributeName:r,highlightedElement:o,setHighlightedElement:l,iteration:c})=>($.useEffect(()=>{const u=o.lastEdited==="ariaSnapshot"?o.ariaSnapshot:void 0,d=o.lastEdited==="locator"?o.locator:void 0,p=!!u||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{xv(m,p,n,r,y,"",t==null?void 0:t.contentWindow)}catch{}const v=u?cf(Sv,u):void 0,x=d?iE(n,d,r):void 0;for(const{recorder:k,frameSelector:S}of m){const E=x!=null&&x.startsWith(S)?x.substring(S.length).trim():void 0,N=(v==null?void 0:v.errors.length)===0?v.fragment:void 0;k.setUIState({mode:e?"inspecting":"none",actionSelector:E,ariaTemplate:N,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(T){l({locator:Mr(n,S+T.selector),ariaSnapshot:T.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const T of m)T.recorder!==k&&T.recorder.clearHighlight()}})}},[t,e,o,l,n,r,c]),w.jsx(w.Fragment,{}));function xv(t,e,n,r,o,l,c){if(!c)return;const u=c;if(!u._recorder&&e){const d=new _y(c,{isUnderTest:o,sdkLanguage:n,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new Z_(d);u._injectedScript=d,u._recorder={recorder:p,frameSelector:l},o&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}u._recorder&&t.push(u._recorder);for(let d=0;d<c.frames.length;++d){const p=c.frames[d],m=p.frameElement?u._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";xv(t,e,n,r,o,l+m,p)}}const Mi=(t,e,n=!1)=>{if(!t)return;const r=t[e];if(r){if(!t.pageId){console.error("snapshot action must have a pageId");return}return{action:t,snapshotName:r,pageId:t.pageId,point:t.point,hasInputTarget:n}}};function xk(t){if(!t)return{};let e=Mi(t,"beforeSnapshot");if(!e){for(let o=qp(t);o;o=qp(o))if(o.endTime<=t.startTime&&o.afterSnapshot){e=Mi(o,"afterSnapshot");break}}let n=Mi(t,"afterSnapshot");if(!n){let o;for(let l=Vp(t);l&&l.startTime<=t.endTime;l=Vp(l))l.endTime>t.endTime||!l.afterSnapshot||o&&o.endTime>l.endTime||(o=l);o?n=Mi(o,"afterSnapshot"):n=e}const r=Mi(t,"inputSnapshot",!0)??n;return r&&(r.point=t.point),{action:r,before:e,after:n}}const _v=new URLSearchParams(window.location.search).has("isUnderTest"),$g=new URLSearchParams(window.location.search).get("server");function _k(t,e){const n=new URLSearchParams;n.set("trace",Hl(t.action).traceUrl),n.set("name",t.snapshotName),_v&&n.set("isUnderTest","true"),t.point&&(n.set("pointX",String(t.point.x)),n.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1")),e&&n.set("shouldPopulateCanvasFromScreenshot","1");const r=new URL(`snapshot/${t.pageId}?${n.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${t.pageId}?${n.toString()}`,window.location.href).toString(),l=new URLSearchParams;l.set("r",r),$g&&l.set("server",$g),l.set("trace",Hl(t.action).traceUrl),t.point&&(l.set("pointX",String(t.point.x)),l.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1"));const c=new URL(`snapshot.html?${l.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:r,popoutUrl:c}}async function Ek(t){const e={url:"",viewport:Ev,timestamp:void 0,wallTime:void 0};if(t){const r=await(await fetch(t)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const Ev={width:1280,height:720},kk='data:text/html,<body style="background: #ddd"></body>',kv={width:200,height:45},ys=2.5,bk=kv.height+ys*2,Tk=({model:t,boundaries:e,previewPoint:n})=>{var m,y;const[r,o]=Pr(),l=$.useRef(null);let c=0;if(l.current&&n){const v=l.current.getBoundingClientRect();c=(n.clientY-v.top+l.current.scrollTop)/bk|0}const u=(y=(m=t==null?void 0:t.pages)==null?void 0:m[c])==null?void 0:y.screencastFrames;let d,p;if(n!==void 0&&u&&u.length){const v=e.minimum+(e.maximum-e.minimum)*n.x/r.width;d=u[Fg(u,v,bv)-1];const x={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?Tv({width:d.width,height:d.height},x):void 0}return w.jsxs("div",{className:"film-strip",ref:o,children:[w.jsx("div",{className:"film-strip-lanes",ref:l,children:t==null?void 0:t.pages.map((v,x)=>v.screencastFrames.length?w.jsx(Ck,{boundaries:e,page:v,width:r.width},x):null)}),(n==null?void 0:n.x)!==void 0&&w.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(n.x,r.width-(p?p.width:0)-10)},children:[n.action&&w.jsx("div",{className:"film-strip-hover-title",children:of(n.action,n)}),d&&p&&w.jsx("div",{style:{width:p.width,height:p.height},children:w.jsx("img",{src:`sha1/${d.sha1}`,width:p.width,height:p.height})})]})]})},Ck=({boundaries:t,page:e,width:n})=>{const r={width:0,height:0},o=e.screencastFrames;for(const S of o)r.width=Math.max(r.width,S.width),r.height=Math.max(r.height,S.height);const l=Tv(r,kv),c=o[0].timestamp,u=o[o.length-1].timestamp,d=t.maximum-t.minimum,p=(c-t.minimum)/d*n,m=(t.maximum-u)/d*n,v=(u-c)/d*n/(l.width+2*ys)|0,x=(u-c)/v,k=[];for(let S=0;c&&x&&S<v;++S){const E=c+x*S,N=Fg(o,E,bv)-1;k.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[N].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},S))}return k.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[o.length-1].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},k.length)),w.jsx("div",{className:"film-strip-lane",style:{marginLeft:p+"px",marginRight:m+"px"},children:k})};function bv(t,e){return t-e.timestamp}function Tv(t,e){const n=Math.max(t.width/e.width,t.height/e.height);return{width:t.width/n|0,height:t.height/n|0}}const Nk=({model:t,boundaries:e,consoleEntries:n,onSelected:r,highlightedAction:o,highlightedEntry:l,highlightedConsoleEntry:c,selectedTime:u,setSelectedTime:d,sdkLanguage:p})=>{const[m,y]=Pr(),[v,x]=$.useState(),[k,S]=$.useState(),[E]=Nn("actionsFilter",[]),{offsets:N,curtainLeft:T,curtainRight:F}=$.useMemo(()=>{let M=u||e;if(v&&v.startX!==v.endX){const pe=un(m.width,e,v.startX),me=un(m.width,e,v.endX);M={minimum:Math.min(pe,me),maximum:Math.max(pe,me)}}const H=Ft(m.width,e,M.minimum),xe=Ft(m.width,e,e.maximum)-Ft(m.width,e,M.maximum);return{offsets:Ak(m.width,e),curtainLeft:H,curtainRight:xe}},[u,e,v,m]),O=$.useMemo(()=>t==null?void 0:t.filteredActions(E),[t,E]),D=$.useMemo(()=>{const M=[];for(const H of O||[])M.push({action:H,leftTime:H.startTime,rightTime:H.endTime||e.maximum,leftPosition:Ft(m.width,e,H.startTime),rightPosition:Ft(m.width,e,H.endTime||e.maximum),active:!1,error:!!H.error});for(const H of(t==null?void 0:t.resources)||[]){const fe=H._monotonicTime,xe=H._monotonicTime+H.time;M.push({resource:H,leftTime:fe,rightTime:xe,leftPosition:Ft(m.width,e,fe),rightPosition:Ft(m.width,e,xe),active:!1,error:!1})}for(const H of n||[])M.push({consoleMessage:H,leftTime:H.timestamp,rightTime:H.timestamp,leftPosition:Ft(m.width,e,H.timestamp),rightPosition:Ft(m.width,e,H.timestamp),active:!1,error:H.isError});return M},[t,O,n,e,m]);$.useMemo(()=>{for(const M of D)o?M.active=M.action===o:l?M.active=M.resource===l:c?M.active=M.consoleMessage===c:M.active=!1},[D,o,l,c]);const z=$.useCallback(M=>{if(S(void 0),!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(m.width,e,H),xe=u?Ft(m.width,e,u.minimum):0,pe=u?Ft(m.width,e,u.maximum):0;u&&Math.abs(H-xe)<10?x({startX:pe,endX:H,type:"resize"}):u&&Math.abs(H-pe)<10?x({startX:xe,endX:H,type:"resize"}):u&&fe>u.minimum&&fe<u.maximum&&M.clientY-y.current.getBoundingClientRect().top<20?x({startX:xe,endX:pe,pivot:H,type:"move"}):x({startX:H,endX:H,type:"resize"})},[e,m,y,u]),G=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(m.width,e,H),xe=O==null?void 0:O.findLast(re=>re.startTime<=fe);if(!M.buttons){x(void 0);return}if(xe&&r(xe),!v)return;let pe=v;if(v.type==="resize")pe={...v,endX:H};else{const re=H-v.pivot;let J=v.startX+re,L=v.endX+re;J<0&&(J=0,L=J+(v.endX-v.startX)),L>m.width&&(L=m.width,J=L-(v.endX-v.startX)),pe={...v,startX:J,endX:L,pivot:H}}x(pe);const me=un(m.width,e,pe.startX),Q=un(m.width,e,pe.endX);me!==Q&&d({minimum:Math.min(me,Q),maximum:Math.max(me,Q)})},[e,v,m,O,r,y,d]),B=$.useCallback(()=>{if(S(void 0),!!v){if(v.startX!==v.endX){const M=un(m.width,e,v.startX),H=un(m.width,e,v.endX);d({minimum:Math.min(M,H),maximum:Math.max(M,H)})}else{const M=un(m.width,e,v.startX),H=O==null?void 0:O.findLast(fe=>fe.startTime<=M);H&&r(H),d(void 0)}x(void 0)}},[e,v,m,O,d,r]),I=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(m.width,e,H),xe=O==null?void 0:O.findLast(pe=>pe.startTime<=fe);S({x:H,clientY:M.clientY,action:xe,sdkLanguage:p})},[e,m,O,y,p]),Z=$.useCallback(()=>{S(void 0)},[]),oe=$.useCallback(()=>{d(void 0)},[d]);return w.jsxs("div",{className:"timeline-view-container",children:[!!v&&w.jsx(vm,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:B,onPaneMouseMove:G,onPaneDoubleClick:oe}),w.jsxs("div",{ref:y,className:"timeline-view",onMouseDown:z,onMouseMove:I,onMouseLeave:Z,children:[w.jsx("div",{className:"timeline-grid",children:N.map((M,H)=>w.jsx("div",{className:"timeline-divider",style:{left:M.position+"px"},children:w.jsx("div",{className:"timeline-time",children:pt(M.time-e.minimum)})},H))}),w.jsx("div",{style:{height:8}}),w.jsx(Tk,{model:t,boundaries:e,previewPoint:k}),w.jsx("div",{className:"timeline-bars",children:D.filter(M=>!M.action||M.action.class!=="Test").map((M,H)=>w.jsx("div",{className:Ue("timeline-bar",M.action&&"action",M.resource&&"network",M.consoleMessage&&"console-message",M.active&&"active",M.error&&"error"),style:{left:M.leftPosition,width:Math.max(5,M.rightPosition-M.leftPosition),top:Lk(M),bottom:0}},H))}),w.jsx("div",{className:"timeline-marker",style:{display:k!==void 0?"block":"none",left:((k==null?void 0:k.x)||0)+"px"}}),u&&w.jsxs("div",{className:"timeline-window",children:[w.jsx("div",{className:"timeline-window-curtain left",style:{width:T}}),w.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),w.jsx("div",{className:"timeline-window-center",children:w.jsx("div",{className:"timeline-window-drag"})}),w.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),w.jsx("div",{className:"timeline-window-curtain right",style:{width:F}})]})]})]})};function Ak(t,e){let r=t/64;const o=e.maximum-e.minimum,l=t/o;let c=o/r;const u=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,u),c*l>=320&&(c=c/5),c*l>=128&&(c=c/2);const d=e.minimum;let p=e.maximum;p+=64/l,r=Math.ceil((p-d)/c),c||(r=0);const m=[];for(let y=0;y<r;++y){const v=d+c*y;m.push({position:Ft(t,e,v),time:v})}return m}function Ft(t,e,n){return(n-e.minimum)/(e.maximum-e.minimum)*t}function un(t,e,n){return n/t*(e.maximum-e.minimum)+e.minimum}function Lk(t){return t.resource?25:20}const Ik=({model:t})=>{var n,r;if(!t)return w.jsx(w.Fragment,{});const e=t.wallTime!==void 0?new Date(t.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return w.jsxs("div",{className:"vbox",style:{flexShrink:0},children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&w.jsxs("div",{className:"call-line",children:["start time:",w.jsx("span",{className:"call-value datetime",title:e,children:e})]}),w.jsxs("div",{className:"call-line",children:["duration:",w.jsx("span",{className:"call-value number",title:pt(t.endTime-t.startTime),children:pt(t.endTime-t.startTime)})]}),w.jsx("div",{className:"call-section",children:"Browser"}),w.jsxs("div",{className:"call-line",children:["engine:",w.jsx("span",{className:"call-value string",title:t.browserName,children:t.browserName})]}),t.channel&&w.jsxs("div",{className:"call-line",children:["channel:",w.jsx("span",{className:"call-value string",title:t.channel,children:t.channel})]}),t.platform&&w.jsxs("div",{className:"call-line",children:["platform:",w.jsx("span",{className:"call-value string",title:t.platform,children:t.platform})]}),t.options.userAgent&&w.jsxs("div",{className:"call-line",children:["user agent:",w.jsx("span",{className:"call-value datetime",title:t.options.userAgent,children:t.options.userAgent})]}),t.options.baseURL&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),w.jsxs("div",{className:"call-line",children:["baseURL:",w.jsx("a",{className:"call-value string",href:t.options.baseURL,title:t.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:t.options.baseURL})]})]}),w.jsx("div",{className:"call-section",children:"Viewport"}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["width:",w.jsx("span",{className:"call-value number",title:String(!!((n=t.options.viewport)!=null&&n.width)),children:t.options.viewport.width})]}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["height:",w.jsx("span",{className:"call-value number",title:String(!!((r=t.options.viewport)!=null&&r.height)),children:t.options.viewport.height})]}),w.jsxs("div",{className:"call-line",children:["is mobile:",w.jsx("span",{className:"call-value boolean",title:String(!!t.options.isMobile),children:String(!!t.options.isMobile)})]}),t.options.deviceScaleFactor&&w.jsxs("div",{className:"call-line",children:["device scale:",w.jsx("span",{className:"call-value number",title:String(t.options.deviceScaleFactor),children:String(t.options.deviceScaleFactor)})]}),w.jsx("div",{className:"call-section",children:"Counts"}),w.jsxs("div",{className:"call-line",children:["pages:",w.jsx("span",{className:"call-value number",children:t.pages.length})]}),w.jsxs("div",{className:"call-line",children:["actions:",w.jsx("span",{className:"call-value number",children:t.actions.length})]}),w.jsxs("div",{className:"call-line",children:["events:",w.jsx("span",{className:"call-value number",children:t.events.length})]})]})},Mk=({annotations:t})=>t.length?w.jsx("div",{className:"annotations-tab",children:t.map((e,n)=>w.jsxs("div",{className:"annotation-item",children:[w.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&w.jsxs("span",{children:[": ",Sm(e.description)]})]},`annotation-${n}`))}):w.jsx(Or,{text:"No annotations"}),jk=({sdkLanguage:t,setIsInspecting:e,highlightedElement:n,setHighlightedElement:r})=>{const[o,l]=$.useState(),c=$.useCallback(u=>{const{errors:d}=cf(Sv,u,{prettyErrors:!1}),p=d.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));l(p),r({...n,ariaSnapshot:u,lastEdited:"ariaSnapshot"}),e(!1)},[n,r,e]);return w.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Locator"}),w.jsx(jt,{icon:"files",title:"Copy locator",onClick:()=>{Op(n.locator||"")}})]}),w.jsx("div",{style:{height:50},children:w.jsx(Cs,{text:n.locator||"",highlighter:t,isFocused:!0,wrapLines:!0,onChange:u=>{r({...n,locator:u,lastEdited:"locator"}),e(!1)}})}),w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),w.jsx(jt,{icon:"files",title:"Copy snapshot",onClick:()=>{Op(n.ariaSnapshot||"")}})]}),w.jsx("div",{style:{height:150},children:w.jsx(Cs,{text:n.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:c})})]})},Pk=({className:t,style:e,open:n,isModal:r,width:o,verticalOffset:l,requestClose:c,anchor:u,dataTestId:d,children:p})=>{const m=$.useRef(null),[y,v]=$.useState(0);let x=e;if(u!=null&&u.current){const k=u.current.getBoundingClientRect();x={position:"fixed",margin:0,top:k.bottom+(l??0),left:Ok(k,o??0),width:o,zIndex:100,...e}}return $.useEffect(()=>{const k=E=>{!m.current||!(E.target instanceof Node)||m.current.contains(E.target)||c==null||c()},S=E=>{E.key==="Escape"&&(c==null||c())};return n?(document.addEventListener("mousedown",k),document.addEventListener("keydown",S),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",S)}):()=>{}},[n,c]),$.useEffect(()=>{const k=()=>v(S=>S+1);return window.addEventListener("resize",k),()=>{window.removeEventListener("resize",k)}},[]),$.useLayoutEffect(()=>{m.current&&(n?r?m.current.showModal():m.current.show():m.current.close())},[n,r]),w.jsx("dialog",{ref:m,style:x,className:t,"data-testid":d,children:p})},Ok=(t,e)=>{const n=Dg(t,e,"left");if(n.inBounds)return n.value;const r=Dg(t,e,"right");return r.inBounds?r.value:n.value},Dg=(t,e,n)=>{const r=document.documentElement.clientWidth;if(n==="left"){const o=t.left;return{value:o,inBounds:o+e<=r}}else return{value:t.right-e,inBounds:t.right-e>=0}},Rk=({title:t,icon:e,dialogDataTestId:n,children:r})=>{const o=$.useRef(null),[l,c]=$.useState(!1);return w.jsxs(w.Fragment,{children:[w.jsx(jt,{ref:o,icon:e,title:t,onClick:()=>c(u=>!u)}),w.jsx(Pk,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:l,width:200,verticalOffset:8,requestClose:()=>c(!1),anchor:o,dataTestId:n,children:r})]})},Cv=({settings:t})=>w.jsx("div",{className:"vbox settings-view",children:t.map(e=>{const n=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return w.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:$k(e,n)},e.name)})}),$k=(t,e)=>{switch(t.type){case"check":return w.jsxs(w.Fragment,{children:[w.jsx("input",{type:"checkbox",id:e,checked:t.value,onChange:()=>t.set(!t.value)}),w.jsx("label",{htmlFor:e,children:t.name})]});case"select":return w.jsxs(w.Fragment,{children:[w.jsxs("label",{htmlFor:e,children:[t.name,":"]}),w.jsx("select",{id:e,value:t.value,onChange:n=>t.set(n.target.value),children:t.options.map(n=>w.jsx("option",{value:n.value,children:n.label},n.value))})]});default:return null}},Wk=({model:t,showSourcesFirst:e,rootDir:n,fallbackLocation:r,isLive:o,hideTimeline:l,status:c,annotations:u,inert:d,onOpenExternally:p,revealSource:m,testRunMetadata:y})=>{var uo;const[v,x]=$.useState(void 0),[k,S]=$.useState(void 0),[E,N]=$.useState(void 0),[T,F]=$.useState(),[O,D]=$.useState(),[z,G]=$.useState(),[B,I]=$.useState("actions"),[Z,oe]=Nn("propertiesTab",e?"source":"call"),[M,H]=$.useState(!1),[fe,xe]=$.useState({lastEdited:"none"}),[pe,me]=$.useState(),[Q,re]=Nn("propertiesSidebarLocation","bottom"),[J]=Nn("actionsFilter",[]),L=$.useCallback(le=>{x(le==null?void 0:le.callId),S(void 0)},[]),U=$.useMemo(()=>t==null?void 0:t.filteredActions(J),[t,J]),ce=$.useMemo(()=>U==null?void 0:U.find(le=>le.callId===T),[U,T]),de=$.useCallback(le=>{F(le==null?void 0:le.callId)},[]),ye=$.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);$.useEffect(()=>{me(void 0),S(void 0)},[t]);const ge=$.useMemo(()=>{if(v){const Vt=U==null?void 0:U.find(Wt=>Wt.callId===v);if(Vt)return Vt}const le=t==null?void 0:t.failedAction();if(le)return le;if(U!=null&&U.length){let Vt=U.length-1;for(let Wt=0;Wt<U.length;++Wt)if(U[Wt].title==="After Hooks"&&Wt){Vt=Wt-1;break}return U[Vt]}},[t,U,v]),ve=$.useMemo(()=>ce||ge,[ge,ce]),_e=$.useMemo(()=>k?k.stack:ve==null?void 0:ve.stack,[ve,k]),ke=$.useCallback(le=>{L(le),de(void 0)},[L,de]),Ne=$.useCallback(le=>{oe(le),le!=="inspector"&&H(!1)},[oe]),rr=$.useCallback(le=>{!M&&le&&Ne("inspector"),H(le)},[H,Ne,M]),io=$.useCallback(le=>{xe(le),Ne("inspector")},[Ne]),Dr=$.useCallback(le=>{Ne("attachments"),N(Vt=>{if(!Vt)return[le,0];const Wt=Vt[1];return[le,Wt+1]})},[Ne]);$.useEffect(()=>{m&&Ne("source")},[m,Ne]);const sr=wx(t,pe),Fs=qx(t,pe),zs=px(t),rn=(t==null?void 0:t.sdkLanguage)||"javascript",oo={id:"inspector",title:"Locator",render:()=>w.jsx(jk,{sdkLanguage:rn,setIsInspecting:rr,highlightedElement:fe,setHighlightedElement:xe})},Us={id:"call",title:"Call",render:()=>w.jsx(PS,{action:ve,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:rn})},ir={id:"log",title:"Log",render:()=>w.jsx($S,{action:ve,isLive:o})},Ln={id:"errors",title:"Errors",errorCount:zs.errors.size,render:()=>w.jsx(mx,{errorsModel:zs,model:t,testRunMetadata:y,sdkLanguage:rn,revealInSource:le=>{le.action?L(le.action):S(le),Ne("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let Br;!ge&&r&&(Br=(uo=r.source)==null?void 0:uo.errors.length);const Fr={id:"source",title:"Source",errorCount:Br,render:()=>w.jsx(fx,{stack:_e,sources:ye,rootDir:n,stackFrameLocation:Q==="bottom"?"right":"bottom",fallbackLocation:r,onOpenExternally:p})},lo={id:"console",title:"Console",count:sr.entries.length,render:()=>w.jsx(Sx,{consoleModel:sr,boundaries:In,selectedTime:pe,onAccepted:le=>me({minimum:le.timestamp,maximum:le.timestamp}),onEntryHovered:G})},ao={id:"network",title:"Network",count:Fs.resources.length,render:()=>w.jsx(Vx,{boundaries:In,networkModel:Fs,onEntryHovered:D,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},co={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>w.jsx(nx,{model:t,revealedAttachment:E})},hn=[oo,Us,ir,Ln,lo,ao,Fr,co];if(u!==void 0){const le={id:"annotations",title:"Annotations",count:u.length,render:()=>w.jsx(Mk,{annotations:u})};hn.push(le)}if(e){const le=hn.indexOf(Fr);hn.splice(le,1),hn.splice(1,0,Fr)}const{boundaries:In}=$.useMemo(()=>{const le={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return le.minimum>le.maximum&&(le.minimum=0,le.maximum=3e4),le.maximum+=(le.maximum-le.minimum)/20,{boundaries:le}},[t]);let or=0;!o&&t&&t.endTime>=0?or=t.endTime-t.startTime:t&&t.wallTime&&(or=Date.now()-t.wallTime);const lr={id:"actions",title:"Actions",component:w.jsxs("div",{className:"vbox",children:[c&&w.jsxs("div",{className:"workbench-run-status",children:[w.jsx("span",{className:Ue("codicon",ym(c))}),w.jsx("div",{children:LS(c)}),w.jsx("div",{className:"spacer"}),w.jsx("div",{className:"workbench-run-duration",children:or?pt(or):""})]}),w.jsx(MS,{sdkLanguage:rn,actions:U||[],selectedAction:t?ge:void 0,selectedTime:pe,setSelectedTime:me,onSelected:ke,onHighlighted:de,revealAttachment:Dr,revealConsole:()=>Ne("console"),isLive:o})]})},ar={id:"metadata",title:"Metadata",component:w.jsx(Ik,{model:t})};return w.jsxs("div",{className:"vbox workbench",...d?{inert:"true"}:{},children:[!l&&w.jsx(Nk,{model:t,consoleEntries:sr.entries,boundaries:In,highlightedAction:ce,highlightedEntry:O,highlightedConsoleEntry:z,onSelected:ke,sdkLanguage:rn,selectedTime:pe,setSelectedTime:me}),w.jsx(ql,{sidebarSize:250,orientation:Q==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:w.jsx(ql,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:w.jsx(yk,{action:ve,model:t,sdkLanguage:rn,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:M,setIsInspecting:rr,highlightedElement:fe,setHighlightedElement:io}),sidebar:w.jsx(Bu,{tabs:[lr,ar],selectedTab:B,setSelectedTab:I,rightToolbar:[w.jsx(Dk,{},"filter")]})}),sidebar:w.jsx(Bu,{tabs:hn,selectedTab:Z,setSelectedTab:Ne,rightToolbar:[Q==="bottom"?w.jsx(jt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{re("right")}}):w.jsx(jt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{re("bottom")}})],mode:Q==="bottom"?"default":"select"})})]})},Dk=()=>{const[t,e]=Nn("actionsFilter",[]);return w.jsx(Rk,{icon:"filter",title:"Filter actions",children:w.jsx(Cv,{settings:[{type:"check",value:t.includes("getter"),set:n=>e(n?[...t,"getter"]:t.filter(r=>r!=="getter")),name:"Getters"},{type:"check",value:t.includes("route"),set:n=>e(n?[...t,"route"]:t.filter(r=>r!=="route")),name:"Network routes"},{type:"check",value:t.includes("configuration"),set:n=>e(n?[...t,"configuration"]:t.filter(r=>r!=="configuration")),name:"Configuration"}]})})};var Bg;(t=>{function e(n){for(const r of n.splice(0))r.dispose()}t.disposeAll=e})(Bg||(Bg={}));class ji{constructor(){this._listeners=new Set,this.event=(e,n)=>{this._listeners.add(e);let r=!1;const o=this,l={dispose(){r||(r=!0,o._listeners.delete(e))}};return n&&n.push(l),l}}fire(e){const n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(n){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:o,event:l}=this._deliveryQueue[r];o.call(null,l)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class Kk{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",n=>e(n.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 Gk{constructor(e){this._onCloseEmitter=new ji,this._onReportEmitter=new ji,this._onStdioEmitter=new ji,this._onTestFilesChangedEmitter=new ji,this._onLoadTraceRequestedEmitter=new ji,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._transport=e,this._transport.onmessage(r=>{const o=JSON.parse(r),{id:l,result:c,error:u,method:d,params:p}=o;if(l){const m=this._callbacks.get(l);if(!m)return;this._callbacks.delete(l),u?m.reject(new Error(u)):m.resolve(c)}else this._dispatchEvent(d,p)});const n=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,o)=>{this._transport.onopen(r),this._transport.onerror(o)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(n)})}isClosed(){return this._isClosed}async _sendMessage(e,n){const r=globalThis.__logForTest;r==null||r({method:e,params:n}),await this._connectedPromise;const o=++this._lastId,l={id:o,method:e,params:n};return this._transport.send(JSON.stringify(l)),new Promise((c,u)=>{this._callbacks.set(o,{resolve:c,reject:u})})}_sendMessageNoReply(e,n){this._sendMessage(e,n).catch(()=>{})}_dispatchEvent(e,n){e==="report"?this._onReportEmitter.fire(n):e==="stdio"?this._onStdioEmitter.fire(n):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(n):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(n)}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 Qk=()=>{const[t,e]=Nn("shouldPopulateCanvasFromScreenshot",!1),[n,r]=M0();return w.jsx(Cv,{settings:[{type:"check",value:n,set:r,name:"Dark mode"},{type:"check",value:t,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{Rk as D,ZS as E,qk as M,Mt as R,ql as S,Gk as T,Kk as W,WS as _,Qk as a,Wk as b,Pk as c,Fk as d,Hk as e,Ou as f,zk as g,Uk as h,Ue as i,w as j,NS as k,af as l,pt as m,jt as n,Nn as o,Cv as p,k0 as q,$ as r,br as s,ym as t,Pr as u};
256
+ `,n)+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 n=Nl(e),r=gs(n);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 n=Nl(e),r=gs(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!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 wv(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new yv||null,prettyErrors:e}}function gk(t,e={}){const{lineCounter:n,prettyErrors:r}=wv(e),o=new Kf(n==null?void 0:n.addNewLine),l=new Wf(e),c=Array.from(l.compose(o.parse(t)));if(r&&n)for(const u of c)u.errors.forEach(na(t,n)),u.warnings.forEach(na(t,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function Sv(t,e={}){const{lineCounter:n,prettyErrors:r}=wv(e),o=new Kf(n==null?void 0:n.addNewLine),l=new Wf(e);let c=null;for(const u of l.compose(o.parse(t),!0,t.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new Lr(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(c.errors.forEach(na(t,n)),c.warnings.forEach(na(t,n))),c}function mk(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const o=Sv(t,n);if(!o)return null;if(o.warnings.forEach(l=>Fy(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function yk(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){const{keepUndefined:o}=n??e??{};if(!o)return}return $r(t)&&!r?t.toString(n):new Bs(t,r,n).toString(n)}const xv=Object.freeze(Object.defineProperty({__proto__:null,Alias:da,CST:dk,Composer:Wf,Document:Bs,Lexer:mv,LineCounter:yv,Pair:ct,Parser:Kf,Scalar:ue,Schema:xa,YAMLError:qf,YAMLMap:It,YAMLParseError:Lr,YAMLSeq:tr,YAMLWarning:iv,isAlias:Rr,isCollection:$e,isDocument:$r,isMap:Os,isNode:De,isPair:je,isScalar:Te,isSeq:Rs,parse:mk,parseAllDocuments:gk,parseDocument:Sv,stringify:yk,visit:er,visitAsync:fa},Symbol.toStringTag,{value:"Module"})),vk=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const[u,d]=$.useState("action"),[p]=Nn("shouldPopulateCanvasFromScreenshot",!1),m=$.useMemo(()=>_k(t),[t]),{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}=$.useMemo(()=>{const S=m[u];return S?Ek(S,p):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,u,p]),k=$.useMemo(()=>y!==void 0?{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}:void 0,[y,v,x]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(cf,{children:[w.jsx(jt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>o(!r)}),["action","before","after"].map(S=>w.jsx(km,{id:S,title:xk(S),selected:u===S,onSelect:()=>d(S)},S)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(jt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(k!=null&&k.popoutUrl),onClick:()=>{const S=window.open((k==null?void 0:k.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{new Ey(S,{isUnderTest:Ev,sdkLanguage:e,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(wk,{snapshotUrls:k,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})]})},wk=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const u=$.useRef(null),d=$.useRef(null),[p,m]=$.useState({viewport:kv,url:""}),y=$.useRef({iteration:0,visibleIframe:0});return $.useEffect(()=>{(async()=>{const v=y.current.iteration+1,x=1-y.current.visibleIframe;y.current.iteration=v;const k=await kk(t==null?void 0:t.snapshotInfoUrl);if(y.current.iteration!==v)return;const S=[u,d][x].current;if(S){let E=()=>{};const N=new Promise(T=>E=T);try{S.addEventListener("load",E),S.addEventListener("error",E);const T=(t==null?void 0:t.snapshotUrl)||bk;S.contentWindow?S.contentWindow.location.replace(T):S.src=T,await N}catch{}finally{S.removeEventListener("load",E),S.removeEventListener("error",E)}}y.current.iteration===v&&(y.current.visibleIframe=x,m(k))})()},[t]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&r&&o(!1)},children:[w.jsx($g,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:u.current,iteration:y.current.iteration}),w.jsx($g,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:d.current,iteration:y.current.iteration}),w.jsx(Sk,{snapshotInfo:p,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:u,name:"snapshot",title:"DOM Snapshot",className:Ue(y.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ue(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},Sk=({snapshotInfo:t,children:e})=>{const[n,r]=Pr(),l={width:t.viewport.width,height:t.viewport.height+40},c=Math.min(n.width/l.width,n.height/l.height,1),u={x:(n.width-l.width)/2,y:(n.height-l.height)/2};return w.jsx("div",{ref:r,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:l.width+"px",height:l.height+"px",transform:`translate(${u.x}px, ${u.y}px) scale(${c})`},children:[w.jsx(aE,{url:t.url}),e]})})};function xk(t){return t==="before"?"Before":t==="after"?"After":t==="action"?"Action":t}const $g=({iframe:t,isInspecting:e,sdkLanguage:n,testIdAttributeName:r,highlightedElement:o,setHighlightedElement:l,iteration:c})=>($.useEffect(()=>{const u=o.lastEdited==="ariaSnapshot"?o.ariaSnapshot:void 0,d=o.lastEdited==="locator"?o.locator:void 0,p=!!u||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{_v(m,p,n,r,y,"",t==null?void 0:t.contentWindow)}catch{}const v=u?uf(xv,u):void 0,x=d?oE(n,d,r):void 0;for(const{recorder:k,frameSelector:S}of m){const E=x!=null&&x.startsWith(S)?x.substring(S.length).trim():void 0,N=(v==null?void 0:v.errors.length)===0?v.fragment:void 0;k.setUIState({mode:e?"inspecting":"none",actionSelector:E,ariaTemplate:N,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(T){l({locator:Mr(n,S+T.selector),ariaSnapshot:T.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const T of m)T.recorder!==k&&T.recorder.clearHighlight()}})}},[t,e,o,l,n,r,c]),w.jsx(w.Fragment,{}));function _v(t,e,n,r,o,l,c){if(!c)return;const u=c;if(!u._recorder&&e){const d=new Ey(c,{isUnderTest:o,sdkLanguage:n,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new eE(d);u._injectedScript=d,u._recorder={recorder:p,frameSelector:l},o&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}u._recorder&&t.push(u._recorder);for(let d=0;d<c.frames.length;++d){const p=c.frames[d],m=p.frameElement?u._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";_v(t,e,n,r,o,l+m,p)}}const Mi=(t,e,n=!1)=>{if(!t)return;const r=t[e];if(r){if(!t.pageId){console.error("snapshot action must have a pageId");return}return{action:t,snapshotName:r,pageId:t.pageId,point:t.point,hasInputTarget:n}}};function _k(t){if(!t)return{};let e=Mi(t,"beforeSnapshot");if(!e){for(let o=qp(t);o;o=qp(o))if(o.endTime<=t.startTime&&o.afterSnapshot){e=Mi(o,"afterSnapshot");break}}let n=Mi(t,"afterSnapshot");if(!n){let o;for(let l=Vp(t);l&&l.startTime<=t.endTime;l=Vp(l))l.endTime>t.endTime||!l.afterSnapshot||o&&o.endTime>l.endTime||(o=l);o?n=Mi(o,"afterSnapshot"):n=e}const r=Mi(t,"inputSnapshot",!0)??n;return r&&(r.point=t.point),{action:r,before:e,after:n}}const Ev=new URLSearchParams(window.location.search).has("isUnderTest"),Dg=new URLSearchParams(window.location.search).get("server");function Ek(t,e){const n=new URLSearchParams;n.set("trace",Hl(t.action).traceUrl),n.set("name",t.snapshotName),Ev&&n.set("isUnderTest","true"),t.point&&(n.set("pointX",String(t.point.x)),n.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1")),e&&n.set("shouldPopulateCanvasFromScreenshot","1");const r=new URL(`snapshot/${t.pageId}?${n.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${t.pageId}?${n.toString()}`,window.location.href).toString(),l=new URLSearchParams;l.set("r",r),Dg&&l.set("server",Dg),l.set("trace",Hl(t.action).traceUrl),t.point&&(l.set("pointX",String(t.point.x)),l.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1"));const c=new URL(`snapshot.html?${l.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:r,popoutUrl:c}}async function kk(t){const e={url:"",viewport:kv,timestamp:void 0,wallTime:void 0};if(t){const r=await(await fetch(t)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const kv={width:1280,height:720},bk='data:text/html,<body style="background: #ddd"></body>',bv={width:200,height:45},ys=2.5,Tk=bv.height+ys*2,Ck=({model:t,boundaries:e,previewPoint:n})=>{var m,y;const[r,o]=Pr(),l=$.useRef(null);let c=0;if(l.current&&n){const v=l.current.getBoundingClientRect();c=(n.clientY-v.top+l.current.scrollTop)/Tk|0}const u=(y=(m=t==null?void 0:t.pages)==null?void 0:m[c])==null?void 0:y.screencastFrames;let d,p;if(n!==void 0&&u&&u.length){const v=e.minimum+(e.maximum-e.minimum)*n.x/r.width;d=u[zg(u,v,Tv)-1];const x={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?Cv({width:d.width,height:d.height},x):void 0}return w.jsxs("div",{className:"film-strip",ref:o,children:[w.jsx("div",{className:"film-strip-lanes",ref:l,children:t==null?void 0:t.pages.map((v,x)=>v.screencastFrames.length?w.jsx(Nk,{boundaries:e,page:v,width:r.width},x):null)}),(n==null?void 0:n.x)!==void 0&&w.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(n.x,r.width-(p?p.width:0)-10)},children:[n.action&&w.jsx("div",{className:"film-strip-hover-title",children:lf(n.action,n)}),d&&p&&w.jsx("div",{style:{width:p.width,height:p.height},children:w.jsx("img",{src:`sha1/${d.sha1}`,width:p.width,height:p.height})})]})]})},Nk=({boundaries:t,page:e,width:n})=>{const r={width:0,height:0},o=e.screencastFrames;for(const S of o)r.width=Math.max(r.width,S.width),r.height=Math.max(r.height,S.height);const l=Cv(r,bv),c=o[0].timestamp,u=o[o.length-1].timestamp,d=t.maximum-t.minimum,p=(c-t.minimum)/d*n,m=(t.maximum-u)/d*n,v=(u-c)/d*n/(l.width+2*ys)|0,x=(u-c)/v,k=[];for(let S=0;c&&x&&S<v;++S){const E=c+x*S,N=zg(o,E,Tv)-1;k.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[N].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},S))}return k.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[o.length-1].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},k.length)),w.jsx("div",{className:"film-strip-lane",style:{marginLeft:p+"px",marginRight:m+"px"},children:k})};function Tv(t,e){return t-e.timestamp}function Cv(t,e){const n=Math.max(t.width/e.width,t.height/e.height);return{width:t.width/n|0,height:t.height/n|0}}const Ak=({model:t,boundaries:e,consoleEntries:n,onSelected:r,highlightedAction:o,highlightedEntry:l,highlightedConsoleEntry:c,selectedTime:u,setSelectedTime:d,sdkLanguage:p})=>{const[m,y]=Pr(),[v,x]=$.useState(),[k,S]=$.useState(),[E]=Nn("actionsFilter",[]),{offsets:N,curtainLeft:T,curtainRight:F}=$.useMemo(()=>{let M=u||e;if(v&&v.startX!==v.endX){const pe=un(m.width,e,v.startX),me=un(m.width,e,v.endX);M={minimum:Math.min(pe,me),maximum:Math.max(pe,me)}}const H=Ft(m.width,e,M.minimum),xe=Ft(m.width,e,e.maximum)-Ft(m.width,e,M.maximum);return{offsets:Lk(m.width,e),curtainLeft:H,curtainRight:xe}},[u,e,v,m]),O=$.useMemo(()=>t==null?void 0:t.filteredActions(E),[t,E]),D=$.useMemo(()=>{const M=[];for(const H of O||[])M.push({action:H,leftTime:H.startTime,rightTime:H.endTime||e.maximum,leftPosition:Ft(m.width,e,H.startTime),rightPosition:Ft(m.width,e,H.endTime||e.maximum),active:!1,error:!!H.error});for(const H of(t==null?void 0:t.resources)||[]){const fe=H._monotonicTime,xe=H._monotonicTime+H.time;M.push({resource:H,leftTime:fe,rightTime:xe,leftPosition:Ft(m.width,e,fe),rightPosition:Ft(m.width,e,xe),active:!1,error:!1})}for(const H of n||[])M.push({consoleMessage:H,leftTime:H.timestamp,rightTime:H.timestamp,leftPosition:Ft(m.width,e,H.timestamp),rightPosition:Ft(m.width,e,H.timestamp),active:!1,error:H.isError});return M},[t,O,n,e,m]);$.useMemo(()=>{for(const M of D)o?M.active=M.action===o:l?M.active=M.resource===l:c?M.active=M.consoleMessage===c:M.active=!1},[D,o,l,c]);const z=$.useCallback(M=>{if(S(void 0),!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(m.width,e,H),xe=u?Ft(m.width,e,u.minimum):0,pe=u?Ft(m.width,e,u.maximum):0;u&&Math.abs(H-xe)<10?x({startX:pe,endX:H,type:"resize"}):u&&Math.abs(H-pe)<10?x({startX:xe,endX:H,type:"resize"}):u&&fe>u.minimum&&fe<u.maximum&&M.clientY-y.current.getBoundingClientRect().top<20?x({startX:xe,endX:pe,pivot:H,type:"move"}):x({startX:H,endX:H,type:"resize"})},[e,m,y,u]),G=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(m.width,e,H),xe=O==null?void 0:O.findLast(re=>re.startTime<=fe);if(!M.buttons){x(void 0);return}if(xe&&r(xe),!v)return;let pe=v;if(v.type==="resize")pe={...v,endX:H};else{const re=H-v.pivot;let J=v.startX+re,L=v.endX+re;J<0&&(J=0,L=J+(v.endX-v.startX)),L>m.width&&(L=m.width,J=L-(v.endX-v.startX)),pe={...v,startX:J,endX:L,pivot:H}}x(pe);const me=un(m.width,e,pe.startX),Q=un(m.width,e,pe.endX);me!==Q&&d({minimum:Math.min(me,Q),maximum:Math.max(me,Q)})},[e,v,m,O,r,y,d]),B=$.useCallback(()=>{if(S(void 0),!!v){if(v.startX!==v.endX){const M=un(m.width,e,v.startX),H=un(m.width,e,v.endX);d({minimum:Math.min(M,H),maximum:Math.max(M,H)})}else{const M=un(m.width,e,v.startX),H=O==null?void 0:O.findLast(fe=>fe.startTime<=M);H&&r(H),d(void 0)}x(void 0)}},[e,v,m,O,d,r]),I=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(m.width,e,H),xe=O==null?void 0:O.findLast(pe=>pe.startTime<=fe);S({x:H,clientY:M.clientY,action:xe,sdkLanguage:p})},[e,m,O,y,p]),Z=$.useCallback(()=>{S(void 0)},[]),oe=$.useCallback(()=>{d(void 0)},[d]);return w.jsxs("div",{className:"timeline-view-container",children:[!!v&&w.jsx(wm,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:B,onPaneMouseMove:G,onPaneDoubleClick:oe}),w.jsxs("div",{ref:y,className:"timeline-view",onMouseDown:z,onMouseMove:I,onMouseLeave:Z,children:[w.jsx("div",{className:"timeline-grid",children:N.map((M,H)=>w.jsx("div",{className:"timeline-divider",style:{left:M.position+"px"},children:w.jsx("div",{className:"timeline-time",children:pt(M.time-e.minimum)})},H))}),w.jsx("div",{style:{height:8}}),w.jsx(Ck,{model:t,boundaries:e,previewPoint:k}),w.jsx("div",{className:"timeline-bars",children:D.filter(M=>!M.action||M.action.class!=="Test").map((M,H)=>w.jsx("div",{className:Ue("timeline-bar",M.action&&"action",M.resource&&"network",M.consoleMessage&&"console-message",M.active&&"active",M.error&&"error"),style:{left:M.leftPosition,width:Math.max(5,M.rightPosition-M.leftPosition),top:Ik(M),bottom:0}},H))}),w.jsx("div",{className:"timeline-marker",style:{display:k!==void 0?"block":"none",left:((k==null?void 0:k.x)||0)+"px"}}),u&&w.jsxs("div",{className:"timeline-window",children:[w.jsx("div",{className:"timeline-window-curtain left",style:{width:T}}),w.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),w.jsx("div",{className:"timeline-window-center",children:w.jsx("div",{className:"timeline-window-drag"})}),w.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),w.jsx("div",{className:"timeline-window-curtain right",style:{width:F}})]})]})]})};function Lk(t,e){let r=t/64;const o=e.maximum-e.minimum,l=t/o;let c=o/r;const u=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,u),c*l>=320&&(c=c/5),c*l>=128&&(c=c/2);const d=e.minimum;let p=e.maximum;p+=64/l,r=Math.ceil((p-d)/c),c||(r=0);const m=[];for(let y=0;y<r;++y){const v=d+c*y;m.push({position:Ft(t,e,v),time:v})}return m}function Ft(t,e,n){return(n-e.minimum)/(e.maximum-e.minimum)*t}function un(t,e,n){return n/t*(e.maximum-e.minimum)+e.minimum}function Ik(t){return t.resource?25:20}const Mk=({model:t})=>{var n,r;if(!t)return w.jsx(w.Fragment,{});const e=t.wallTime!==void 0?new Date(t.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return w.jsxs("div",{className:"vbox",style:{flexShrink:0},children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&w.jsxs("div",{className:"call-line",children:["start time:",w.jsx("span",{className:"call-value datetime",title:e,children:e})]}),w.jsxs("div",{className:"call-line",children:["duration:",w.jsx("span",{className:"call-value number",title:pt(t.endTime-t.startTime),children:pt(t.endTime-t.startTime)})]}),w.jsx("div",{className:"call-section",children:"Browser"}),w.jsxs("div",{className:"call-line",children:["engine:",w.jsx("span",{className:"call-value string",title:t.browserName,children:t.browserName})]}),t.channel&&w.jsxs("div",{className:"call-line",children:["channel:",w.jsx("span",{className:"call-value string",title:t.channel,children:t.channel})]}),t.platform&&w.jsxs("div",{className:"call-line",children:["platform:",w.jsx("span",{className:"call-value string",title:t.platform,children:t.platform})]}),t.options.userAgent&&w.jsxs("div",{className:"call-line",children:["user agent:",w.jsx("span",{className:"call-value datetime",title:t.options.userAgent,children:t.options.userAgent})]}),t.options.baseURL&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),w.jsxs("div",{className:"call-line",children:["baseURL:",w.jsx("a",{className:"call-value string",href:t.options.baseURL,title:t.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:t.options.baseURL})]})]}),w.jsx("div",{className:"call-section",children:"Viewport"}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["width:",w.jsx("span",{className:"call-value number",title:String(!!((n=t.options.viewport)!=null&&n.width)),children:t.options.viewport.width})]}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["height:",w.jsx("span",{className:"call-value number",title:String(!!((r=t.options.viewport)!=null&&r.height)),children:t.options.viewport.height})]}),w.jsxs("div",{className:"call-line",children:["is mobile:",w.jsx("span",{className:"call-value boolean",title:String(!!t.options.isMobile),children:String(!!t.options.isMobile)})]}),t.options.deviceScaleFactor&&w.jsxs("div",{className:"call-line",children:["device scale:",w.jsx("span",{className:"call-value number",title:String(t.options.deviceScaleFactor),children:String(t.options.deviceScaleFactor)})]}),w.jsx("div",{className:"call-section",children:"Counts"}),w.jsxs("div",{className:"call-line",children:["pages:",w.jsx("span",{className:"call-value number",children:t.pages.length})]}),w.jsxs("div",{className:"call-line",children:["actions:",w.jsx("span",{className:"call-value number",children:t.actions.length})]}),w.jsxs("div",{className:"call-line",children:["events:",w.jsx("span",{className:"call-value number",children:t.events.length})]})]})},jk=({annotations:t})=>t.length?w.jsx("div",{className:"annotations-tab",children:t.map((e,n)=>w.jsxs("div",{className:"annotation-item",children:[w.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&w.jsxs("span",{children:[": ",xm(e.description)]})]},`annotation-${n}`))}):w.jsx(Or,{text:"No annotations"}),Pk=({sdkLanguage:t,setIsInspecting:e,highlightedElement:n,setHighlightedElement:r})=>{const[o,l]=$.useState(),c=$.useCallback(u=>{const{errors:d}=uf(xv,u,{prettyErrors:!1}),p=d.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));l(p),r({...n,ariaSnapshot:u,lastEdited:"ariaSnapshot"}),e(!1)},[n,r,e]);return w.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Locator"}),w.jsx(jt,{icon:"files",title:"Copy locator",onClick:()=>{Op(n.locator||"")}})]}),w.jsx("div",{style:{height:50},children:w.jsx(Cs,{text:n.locator||"",highlighter:t,isFocused:!0,wrapLines:!0,onChange:u=>{r({...n,locator:u,lastEdited:"locator"}),e(!1)}})}),w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),w.jsx(jt,{icon:"files",title:"Copy snapshot",onClick:()=>{Op(n.ariaSnapshot||"")}})]}),w.jsx("div",{style:{height:150},children:w.jsx(Cs,{text:n.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:c})})]})},Ok=({className:t,style:e,open:n,isModal:r,width:o,verticalOffset:l,requestClose:c,anchor:u,dataTestId:d,children:p})=>{const m=$.useRef(null),[y,v]=$.useState(0);let x=e;if(u!=null&&u.current){const k=u.current.getBoundingClientRect();x={position:"fixed",margin:0,top:k.bottom+(l??0),left:Rk(k,o??0),width:o,zIndex:100,...e}}return $.useEffect(()=>{const k=E=>{!m.current||!(E.target instanceof Node)||m.current.contains(E.target)||c==null||c()},S=E=>{E.key==="Escape"&&(c==null||c())};return n?(document.addEventListener("mousedown",k),document.addEventListener("keydown",S),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",S)}):()=>{}},[n,c]),$.useEffect(()=>{const k=()=>v(S=>S+1);return window.addEventListener("resize",k),()=>{window.removeEventListener("resize",k)}},[]),$.useLayoutEffect(()=>{m.current&&(n?r?m.current.showModal():m.current.show():m.current.close())},[n,r]),w.jsx("dialog",{ref:m,style:x,className:t,"data-testid":d,children:p})},Rk=(t,e)=>{const n=Bg(t,e,"left");if(n.inBounds)return n.value;const r=Bg(t,e,"right");return r.inBounds?r.value:n.value},Bg=(t,e,n)=>{const r=document.documentElement.clientWidth;if(n==="left"){const o=t.left;return{value:o,inBounds:o+e<=r}}else return{value:t.right-e,inBounds:t.right-e>=0}},$k=({title:t,icon:e,dialogDataTestId:n,children:r})=>{const o=$.useRef(null),[l,c]=$.useState(!1);return w.jsxs(w.Fragment,{children:[w.jsx(jt,{ref:o,icon:e,title:t,onClick:()=>c(u=>!u)}),w.jsx(Ok,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:l,width:200,verticalOffset:8,requestClose:()=>c(!1),anchor:o,dataTestId:n,children:r})]})},Nv=({settings:t})=>w.jsx("div",{className:"vbox settings-view",children:t.map(e=>{const n=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return w.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:Dk(e,n)},e.name)})}),Dk=(t,e)=>{switch(t.type){case"check":return w.jsxs(w.Fragment,{children:[w.jsx("input",{type:"checkbox",id:e,checked:t.value,onChange:()=>t.set(!t.value)}),w.jsx("label",{htmlFor:e,children:t.name})]});case"select":return w.jsxs(w.Fragment,{children:[w.jsxs("label",{htmlFor:e,children:[t.name,":"]}),w.jsx("select",{id:e,value:t.value,onChange:n=>t.set(n.target.value),children:t.options.map(n=>w.jsx("option",{value:n.value,children:n.label},n.value))})]});default:return null}},Kk=({model:t,showSourcesFirst:e,rootDir:n,fallbackLocation:r,isLive:o,hideTimeline:l,status:c,annotations:u,inert:d,onOpenExternally:p,revealSource:m,testRunMetadata:y})=>{var uo;const[v,x]=$.useState(void 0),[k,S]=$.useState(void 0),[E,N]=$.useState(void 0),[T,F]=$.useState(),[O,D]=$.useState(),[z,G]=$.useState(),[B,I]=$.useState("actions"),[Z,oe]=Nn("propertiesTab",e?"source":"call"),[M,H]=$.useState(!1),[fe,xe]=$.useState({lastEdited:"none"}),[pe,me]=$.useState(),[Q,re]=Nn("propertiesSidebarLocation","bottom"),[J]=Nn("actionsFilter",[]),L=$.useCallback(le=>{x(le==null?void 0:le.callId),S(void 0)},[]),U=$.useMemo(()=>t==null?void 0:t.filteredActions(J),[t,J]),ce=$.useMemo(()=>U==null?void 0:U.find(le=>le.callId===T),[U,T]),de=$.useCallback(le=>{F(le==null?void 0:le.callId)},[]),ye=$.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);$.useEffect(()=>{me(void 0),S(void 0)},[t]);const ge=$.useMemo(()=>{if(v){const Vt=U==null?void 0:U.find(Wt=>Wt.callId===v);if(Vt)return Vt}const le=t==null?void 0:t.failedAction();if(le)return le;if(U!=null&&U.length){let Vt=U.length-1;for(let Wt=0;Wt<U.length;++Wt)if(U[Wt].title==="After Hooks"&&Wt){Vt=Wt-1;break}return U[Vt]}},[t,U,v]),ve=$.useMemo(()=>ce||ge,[ge,ce]),_e=$.useMemo(()=>k?k.stack:ve==null?void 0:ve.stack,[ve,k]),ke=$.useCallback(le=>{L(le),de(void 0)},[L,de]),Ne=$.useCallback(le=>{oe(le),le!=="inspector"&&H(!1)},[oe]),rr=$.useCallback(le=>{!M&&le&&Ne("inspector"),H(le)},[H,Ne,M]),io=$.useCallback(le=>{xe(le),Ne("inspector")},[Ne]),Dr=$.useCallback(le=>{Ne("attachments"),N(Vt=>{if(!Vt)return[le,0];const Wt=Vt[1];return[le,Wt+1]})},[Ne]);$.useEffect(()=>{m&&Ne("source")},[m,Ne]);const sr=Sx(t,pe),Fs=Vx(t,pe),zs=gx(t),rn=(t==null?void 0:t.sdkLanguage)||"javascript",oo={id:"inspector",title:"Locator",render:()=>w.jsx(Pk,{sdkLanguage:rn,setIsInspecting:rr,highlightedElement:fe,setHighlightedElement:xe})},Us={id:"call",title:"Call",render:()=>w.jsx(OS,{action:ve,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:rn})},ir={id:"log",title:"Log",render:()=>w.jsx(DS,{action:ve,isLive:o})},Ln={id:"errors",title:"Errors",errorCount:zs.errors.size,render:()=>w.jsx(yx,{errorsModel:zs,model:t,testRunMetadata:y,sdkLanguage:rn,revealInSource:le=>{le.action?L(le.action):S(le),Ne("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let Br;!ge&&r&&(Br=(uo=r.source)==null?void 0:uo.errors.length);const Fr={id:"source",title:"Source",errorCount:Br,render:()=>w.jsx(dx,{stack:_e,sources:ye,rootDir:n,stackFrameLocation:Q==="bottom"?"right":"bottom",fallbackLocation:r,onOpenExternally:p})},lo={id:"console",title:"Console",count:sr.entries.length,render:()=>w.jsx(xx,{consoleModel:sr,boundaries:In,selectedTime:pe,onAccepted:le=>me({minimum:le.timestamp,maximum:le.timestamp}),onEntryHovered:G})},ao={id:"network",title:"Network",count:Fs.resources.length,render:()=>w.jsx(Wx,{boundaries:In,networkModel:Fs,onEntryHovered:D,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},co={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>w.jsx(rx,{model:t,revealedAttachment:E})},hn=[oo,Us,ir,Ln,lo,ao,Fr,co];if(u!==void 0){const le={id:"annotations",title:"Annotations",count:u.length,render:()=>w.jsx(jk,{annotations:u})};hn.push(le)}if(e){const le=hn.indexOf(Fr);hn.splice(le,1),hn.splice(1,0,Fr)}const{boundaries:In}=$.useMemo(()=>{const le={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return le.minimum>le.maximum&&(le.minimum=0,le.maximum=3e4),le.maximum+=(le.maximum-le.minimum)/20,{boundaries:le}},[t]);let or=0;!o&&t&&t.endTime>=0?or=t.endTime-t.startTime:t&&t.wallTime&&(or=Date.now()-t.wallTime);const lr={id:"actions",title:"Actions",component:w.jsxs("div",{className:"vbox",children:[c&&w.jsxs("div",{className:"workbench-run-status",children:[w.jsx("span",{className:Ue("codicon",vm(c))}),w.jsx("div",{children:IS(c)}),w.jsx("div",{className:"spacer"}),w.jsx("div",{className:"workbench-run-duration",children:or?pt(or):""})]}),w.jsx(jS,{sdkLanguage:rn,actions:U||[],selectedAction:t?ge:void 0,selectedTime:pe,setSelectedTime:me,onSelected:ke,onHighlighted:de,revealAttachment:Dr,revealConsole:()=>Ne("console"),isLive:o})]})},ar={id:"metadata",title:"Metadata",component:w.jsx(Mk,{model:t})};return w.jsxs("div",{className:"vbox workbench",...d?{inert:"true"}:{},children:[!l&&w.jsx(Ak,{model:t,consoleEntries:sr.entries,boundaries:In,highlightedAction:ce,highlightedEntry:O,highlightedConsoleEntry:z,onSelected:ke,sdkLanguage:rn,selectedTime:pe,setSelectedTime:me}),w.jsx(ql,{sidebarSize:250,orientation:Q==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:w.jsx(ql,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:w.jsx(vk,{action:ve,model:t,sdkLanguage:rn,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:M,setIsInspecting:rr,highlightedElement:fe,setHighlightedElement:io}),sidebar:w.jsx(Fu,{tabs:[lr,ar],selectedTab:B,setSelectedTab:I,rightToolbar:[w.jsx(Bk,{},"filter")]})}),sidebar:w.jsx(Fu,{tabs:hn,selectedTab:Z,setSelectedTab:Ne,rightToolbar:[Q==="bottom"?w.jsx(jt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{re("right")}}):w.jsx(jt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{re("bottom")}})],mode:Q==="bottom"?"default":"select"})})]})},Bk=()=>{const[t,e]=Nn("actionsFilter",[]);return w.jsx($k,{icon:"filter",title:"Filter actions",children:w.jsx(Nv,{settings:[{type:"check",value:t.includes("getter"),set:n=>e(n?[...t,"getter"]:t.filter(r=>r!=="getter")),name:"Getters"},{type:"check",value:t.includes("route"),set:n=>e(n?[...t,"route"]:t.filter(r=>r!=="route")),name:"Network routes"},{type:"check",value:t.includes("configuration"),set:n=>e(n?[...t,"configuration"]:t.filter(r=>r!=="configuration")),name:"Configuration"}]})})};var Fg;(t=>{function e(n){for(const r of n.splice(0))r.dispose()}t.disposeAll=e})(Fg||(Fg={}));class ji{constructor(){this._listeners=new Set,this.event=(e,n)=>{this._listeners.add(e);let r=!1;const o=this,l={dispose(){r||(r=!0,o._listeners.delete(e))}};return n&&n.push(l),l}}fire(e){const n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(n){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:o,event:l}=this._deliveryQueue[r];o.call(null,l)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class Gk{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",n=>e(n.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 Qk{constructor(e){this._onCloseEmitter=new ji,this._onReportEmitter=new ji,this._onStdioEmitter=new ji,this._onTestFilesChangedEmitter=new ji,this._onLoadTraceRequestedEmitter=new ji,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._transport=e,this._transport.onmessage(r=>{const o=JSON.parse(r),{id:l,result:c,error:u,method:d,params:p}=o;if(l){const m=this._callbacks.get(l);if(!m)return;this._callbacks.delete(l),u?m.reject(new Error(u)):m.resolve(c)}else this._dispatchEvent(d,p)});const n=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,o)=>{this._transport.onopen(r),this._transport.onerror(o)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(n)})}isClosed(){return this._isClosed}async _sendMessage(e,n){const r=globalThis.__logForTest;r==null||r({method:e,params:n}),await this._connectedPromise;const o=++this._lastId,l={id:o,method:e,params:n};return this._transport.send(JSON.stringify(l)),new Promise((c,u)=>{this._callbacks.set(o,{resolve:c,reject:u})})}_sendMessageNoReply(e,n){this._sendMessage(e,n).catch(()=>{})}_dispatchEvent(e,n){e==="report"?this._onReportEmitter.fire(n):e==="stdio"?this._onStdioEmitter.fire(n):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(n):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(n)}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 Jk=()=>{const[t,e]=Nn("shouldPopulateCanvasFromScreenshot",!1),[n,r]=j0();return w.jsx(Nv,{settings:[{type:"check",value:n,set:r,name:"Dark mode"},{type:"check",value:t,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{$k as D,ex as E,Vk as M,Mt as R,ql as S,Qk as T,Gk as W,KS as _,Jk as a,Kk as b,Ok as c,zk as d,qk as e,Ru as f,Uk as g,Hk as h,Ue as i,w as j,AS as k,cf as l,pt as m,jt as n,Nn as o,Nv as p,b0 as q,$ as r,br as s,vm as t,Pr as u};